blob: d702068205ecdc4b2c3f751e2f7c434d6b1f5949 [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 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700129 "requests": [ # A list of updates to apply to the spreadsheet.
130 { # A single kind of update to apply to a spreadsheet.
131 "duplicateFilterView": { # Duplicates a particular filter view. # Duplicates a filter view.
132 "filterId": 42, # The ID of the filter being duplicated.
133 },
134 "sortRange": { # Sorts data in rows based on a sort order per column. # Sorts data in a range.
135 "range": { # A range on a sheet. # The range to sort.
136 # All indexes are zero-based.
137 # Indexes are half open, e.g the start index is inclusive
138 # and the end index is exclusive -- [start_index, end_index).
139 # Missing indexes indicate the range is unbounded on that side.
140 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700141 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700143 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700144 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700145 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700146 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700147 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700148 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700149 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700151 # `Sheet1!A:B == sheet_id: 0,
152 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700155 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700156 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700158 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700159 #
160 # The start index must always be less than or equal to the end index.
161 # If the start index equals the end index, then the range is empty.
162 # Empty ranges are typically not meaningful and are usually rendered in the
163 # UI as `#REF!`.
164 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -0700165 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700166 "sheetId": 42, # The sheet this range is on.
167 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -0700168 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700169 },
170 "sortSpecs": [ # The sort order per column. Later specifications are used when values
171 # are equal in the earlier specifications.
172 { # A sort order associated with a specific column or row.
173 "sortOrder": "A String", # The order data should be sorted.
174 "dimensionIndex": 42, # The dimension the sort should be applied to.
175 },
176 ],
177 },
178 "updateEmbeddedObjectPosition": { # Update an embedded object's position (such as a moving or resizing a # Updates an embedded object's (e.g. chart, image) position.
179 # chart or image).
180 "newPosition": { # The position of an embedded object such as a chart. # An explicit position to move the embedded object to.
181 # If newPosition.sheetId is set,
182 # a new sheet with that ID will be created.
183 # If newPosition.newSheet is set to true,
184 # a new sheet will be created with an ID that will be chosen for you.
185 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
186 # is chosen for you. Used only when writing.
187 "sheetId": 42, # The sheet this is on. Set only if the embedded object
188 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700189 "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 -0700190 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
191 # All indexes are zero-based.
192 "rowIndex": 42, # The row index of the coordinate.
193 "columnIndex": 42, # The column index of the coordinate.
194 "sheetId": 42, # The sheet this coordinate is on.
195 },
196 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
197 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -0700198 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700199 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
200 # from the anchor cell.
201 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
202 },
203 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700204 "fields": "A String", # The fields of OverlayPosition
205 # that should be updated when setting a new position. Used only if
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700206 # newPosition.overlayPosition
207 # is set, in which case at least one field must
208 # be specified. The root `newPosition.overlayPosition` is implied and
209 # should not be specified.
210 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700211 "objectId": 42, # The ID of the object to moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700212 },
213 "updateConditionalFormatRule": { # Updates a conditional format rule at the given index, # Updates an existing conditional format rule.
214 # or moves a conditional format rule to another index.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700215 "rule": { # A rule describing a conditional format. # The rule that should replace the rule at the given index.
216 "ranges": [ # The ranges that will be formatted if the condition is true.
217 # All the ranges must be on the same grid.
218 { # A range on a sheet.
219 # All indexes are zero-based.
220 # Indexes are half open, e.g the start index is inclusive
221 # and the end index is exclusive -- [start_index, end_index).
222 # Missing indexes indicate the range is unbounded on that side.
223 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700224 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700225 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700226 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700227 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700228 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700229 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700231 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700232 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700233 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 # `Sheet1!A:B == sheet_id: 0,
235 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700236 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700237 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700238 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700239 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700240 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700241 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700242 #
243 # The start index must always be less than or equal to the end index.
244 # If the start index equals the end index, then the range is empty.
245 # Empty ranges are typically not meaningful and are usually rendered in the
246 # UI as `#REF!`.
247 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -0700248 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700249 "sheetId": 42, # The sheet this range is on.
250 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -0700251 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700252 },
253 ],
254 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
255 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
256 # the format will be applied.
257 # BooleanConditions are used by conditional formatting,
258 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700259 "values": [ # The values of the condition. The number of supported values depends
260 # on the condition type. Some support zero values,
261 # others one or two values,
262 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
263 { # The value of the condition.
264 "relativeDate": "A String", # A relative date (based on the current date).
265 # Valid only if the type is
266 # DATE_BEFORE,
267 # DATE_AFTER,
268 # DATE_ON_OR_BEFORE or
269 # DATE_ON_OR_AFTER.
270 #
271 # Relative dates are not supported in data validation.
272 # They are supported only in conditional formatting and
273 # conditional filters.
274 "userEnteredValue": "A String", # A value the condition is based on.
275 # The value will be parsed as if the user typed into a cell.
276 # Formulas are supported (and must begin with an `=`).
277 },
278 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400279 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700280 },
281 "format": { # The format of a cell. # The format to apply.
282 # Conditional formatting can only apply a subset of formatting:
283 # bold, italic,
284 # strikethrough,
285 # foreground color &
286 # background color.
287 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700288 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
289 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400290 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700291 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700292 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700293 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700294 },
295 "textDirection": "A String", # The direction of the text in the cell.
296 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
297 # When updating padding, every field must be specified.
298 "top": 42, # The top padding of the cell.
299 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700300 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400301 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700302 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700303 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
305 # for simplicity of conversion to/from color representations in various
306 # languages over compactness; for example, the fields of this representation
307 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
308 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
309 # method in iOS; and, with just a little work, it can be easily formatted into
310 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
311 #
312 # Example (Java):
313 #
314 # import com.google.type.Color;
315 #
316 # // ...
317 # public static java.awt.Color fromProto(Color protocolor) {
318 # float alpha = protocolor.hasAlpha()
319 # ? protocolor.getAlpha().getValue()
320 # : 1.0;
321 #
322 # return new java.awt.Color(
323 # protocolor.getRed(),
324 # protocolor.getGreen(),
325 # protocolor.getBlue(),
326 # alpha);
327 # }
328 #
329 # public static Color toProto(java.awt.Color color) {
330 # float red = (float) color.getRed();
331 # float green = (float) color.getGreen();
332 # float blue = (float) color.getBlue();
333 # float denominator = 255.0;
334 # Color.Builder resultBuilder =
335 # Color
336 # .newBuilder()
337 # .setRed(red / denominator)
338 # .setGreen(green / denominator)
339 # .setBlue(blue / denominator);
340 # int alpha = color.getAlpha();
341 # if (alpha != 255) {
342 # result.setAlpha(
343 # FloatValue
344 # .newBuilder()
345 # .setValue(((float) alpha) / denominator)
346 # .build());
347 # }
348 # return resultBuilder.build();
349 # }
350 # // ...
351 #
352 # Example (iOS / Obj-C):
353 #
354 # // ...
355 # static UIColor* fromProto(Color* protocolor) {
356 # float red = [protocolor red];
357 # float green = [protocolor green];
358 # float blue = [protocolor blue];
359 # FloatValue* alpha_wrapper = [protocolor alpha];
360 # float alpha = 1.0;
361 # if (alpha_wrapper != nil) {
362 # alpha = [alpha_wrapper value];
363 # }
364 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
365 # }
366 #
367 # static Color* toProto(UIColor* color) {
368 # CGFloat red, green, blue, alpha;
369 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
370 # return nil;
371 # }
372 # Color* result = [Color alloc] init];
373 # [result setRed:red];
374 # [result setGreen:green];
375 # [result setBlue:blue];
376 # if (alpha <= 0.9999) {
377 # [result setAlpha:floatWrapperWithValue(alpha)];
378 # }
379 # [result autorelease];
380 # return result;
381 # }
382 # // ...
383 #
384 # Example (JavaScript):
385 #
386 # // ...
387 #
388 # var protoToCssColor = function(rgb_color) {
389 # var redFrac = rgb_color.red || 0.0;
390 # var greenFrac = rgb_color.green || 0.0;
391 # var blueFrac = rgb_color.blue || 0.0;
392 # var red = Math.floor(redFrac * 255);
393 # var green = Math.floor(greenFrac * 255);
394 # var blue = Math.floor(blueFrac * 255);
395 #
396 # if (!('alpha' in rgb_color)) {
397 # return rgbToCssColor_(red, green, blue);
398 # }
399 #
400 # var alphaFrac = rgb_color.alpha.value || 0.0;
401 # var rgbParams = [red, green, blue].join(',');
402 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
403 # };
404 #
405 # var rgbToCssColor_ = function(red, green, blue) {
406 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
407 # var hexString = rgbNumber.toString(16);
408 # var missingZeros = 6 - hexString.length;
409 # var resultBuilder = ['#'];
410 # for (var i = 0; i < missingZeros; i++) {
411 # resultBuilder.push('0');
412 # }
413 # resultBuilder.push(hexString);
414 # return resultBuilder.join('');
415 # };
416 #
417 # // ...
418 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
419 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
420 # the final pixel color is defined by the equation:
421 #
422 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
423 #
424 # This means that a value of 1.0 corresponds to a solid color, whereas
425 # a value of 0.0 corresponds to a completely transparent color. This
426 # uses a wrapper message rather than a simple float scalar so that it is
427 # possible to distinguish between a default value and the value being unset.
428 # If omitted, this color object is to be rendered as a solid color
429 # (as if the alpha value had been explicitly given with a value of 1.0).
430 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
431 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
432 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700433 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700434 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
435 # Absent values indicate that the field isn't specified.
436 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
437 # for simplicity of conversion to/from color representations in various
438 # languages over compactness; for example, the fields of this representation
439 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
440 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
441 # method in iOS; and, with just a little work, it can be easily formatted into
442 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
443 #
444 # Example (Java):
445 #
446 # import com.google.type.Color;
447 #
448 # // ...
449 # public static java.awt.Color fromProto(Color protocolor) {
450 # float alpha = protocolor.hasAlpha()
451 # ? protocolor.getAlpha().getValue()
452 # : 1.0;
453 #
454 # return new java.awt.Color(
455 # protocolor.getRed(),
456 # protocolor.getGreen(),
457 # protocolor.getBlue(),
458 # alpha);
459 # }
460 #
461 # public static Color toProto(java.awt.Color color) {
462 # float red = (float) color.getRed();
463 # float green = (float) color.getGreen();
464 # float blue = (float) color.getBlue();
465 # float denominator = 255.0;
466 # Color.Builder resultBuilder =
467 # Color
468 # .newBuilder()
469 # .setRed(red / denominator)
470 # .setGreen(green / denominator)
471 # .setBlue(blue / denominator);
472 # int alpha = color.getAlpha();
473 # if (alpha != 255) {
474 # result.setAlpha(
475 # FloatValue
476 # .newBuilder()
477 # .setValue(((float) alpha) / denominator)
478 # .build());
479 # }
480 # return resultBuilder.build();
481 # }
482 # // ...
483 #
484 # Example (iOS / Obj-C):
485 #
486 # // ...
487 # static UIColor* fromProto(Color* protocolor) {
488 # float red = [protocolor red];
489 # float green = [protocolor green];
490 # float blue = [protocolor blue];
491 # FloatValue* alpha_wrapper = [protocolor alpha];
492 # float alpha = 1.0;
493 # if (alpha_wrapper != nil) {
494 # alpha = [alpha_wrapper value];
495 # }
496 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
497 # }
498 #
499 # static Color* toProto(UIColor* color) {
500 # CGFloat red, green, blue, alpha;
501 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
502 # return nil;
503 # }
504 # Color* result = [Color alloc] init];
505 # [result setRed:red];
506 # [result setGreen:green];
507 # [result setBlue:blue];
508 # if (alpha <= 0.9999) {
509 # [result setAlpha:floatWrapperWithValue(alpha)];
510 # }
511 # [result autorelease];
512 # return result;
513 # }
514 # // ...
515 #
516 # Example (JavaScript):
517 #
518 # // ...
519 #
520 # var protoToCssColor = function(rgb_color) {
521 # var redFrac = rgb_color.red || 0.0;
522 # var greenFrac = rgb_color.green || 0.0;
523 # var blueFrac = rgb_color.blue || 0.0;
524 # var red = Math.floor(redFrac * 255);
525 # var green = Math.floor(greenFrac * 255);
526 # var blue = Math.floor(blueFrac * 255);
527 #
528 # if (!('alpha' in rgb_color)) {
529 # return rgbToCssColor_(red, green, blue);
530 # }
531 #
532 # var alphaFrac = rgb_color.alpha.value || 0.0;
533 # var rgbParams = [red, green, blue].join(',');
534 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
535 # };
536 #
537 # var rgbToCssColor_ = function(red, green, blue) {
538 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
539 # var hexString = rgbNumber.toString(16);
540 # var missingZeros = 6 - hexString.length;
541 # var resultBuilder = ['#'];
542 # for (var i = 0; i < missingZeros; i++) {
543 # resultBuilder.push('0');
544 # }
545 # resultBuilder.push(hexString);
546 # return resultBuilder.join('');
547 # };
548 #
549 # // ...
550 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
551 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
552 # the final pixel color is defined by the equation:
553 #
554 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
555 #
556 # This means that a value of 1.0 corresponds to a solid color, whereas
557 # a value of 0.0 corresponds to a completely transparent color. This
558 # uses a wrapper message rather than a simple float scalar so that it is
559 # possible to distinguish between a default value and the value being unset.
560 # If omitted, this color object is to be rendered as a solid color
561 # (as if the alpha value had been explicitly given with a value of 1.0).
562 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
563 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
564 },
565 "bold": True or False, # True if the text is bold.
566 "strikethrough": True or False, # True if the text has a strikethrough.
567 "fontFamily": "A String", # The font family.
568 "fontSize": 42, # The size of the font.
569 "italic": True or False, # True if the text is italicized.
570 "underline": True or False, # True if the text is underlined.
571 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700572 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
573 "angle": 42, # The angle between the standard orientation and the desired orientation.
574 # Measured in degrees. Valid values are between -90 and 90. Positive
575 # angles are angled upwards, negative are angled downwards.
576 #
577 # Note: For LTR text direction positive angles are in the counterclockwise
578 # direction, whereas for RTL they are in the clockwise direction
579 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
580 # characters is unchanged.
581 # For example:
582 #
583 # | V |
584 # | e |
585 # | r |
586 # | t |
587 # | i |
588 # | c |
589 # | a |
590 # | l |
591 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700592 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
593 "borders": { # The borders of the cell. # The borders of the cell.
594 "top": { # A border along a cell. # The top border of the cell.
595 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
596 # for simplicity of conversion to/from color representations in various
597 # languages over compactness; for example, the fields of this representation
598 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
599 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
600 # method in iOS; and, with just a little work, it can be easily formatted into
601 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
602 #
603 # Example (Java):
604 #
605 # import com.google.type.Color;
606 #
607 # // ...
608 # public static java.awt.Color fromProto(Color protocolor) {
609 # float alpha = protocolor.hasAlpha()
610 # ? protocolor.getAlpha().getValue()
611 # : 1.0;
612 #
613 # return new java.awt.Color(
614 # protocolor.getRed(),
615 # protocolor.getGreen(),
616 # protocolor.getBlue(),
617 # alpha);
618 # }
619 #
620 # public static Color toProto(java.awt.Color color) {
621 # float red = (float) color.getRed();
622 # float green = (float) color.getGreen();
623 # float blue = (float) color.getBlue();
624 # float denominator = 255.0;
625 # Color.Builder resultBuilder =
626 # Color
627 # .newBuilder()
628 # .setRed(red / denominator)
629 # .setGreen(green / denominator)
630 # .setBlue(blue / denominator);
631 # int alpha = color.getAlpha();
632 # if (alpha != 255) {
633 # result.setAlpha(
634 # FloatValue
635 # .newBuilder()
636 # .setValue(((float) alpha) / denominator)
637 # .build());
638 # }
639 # return resultBuilder.build();
640 # }
641 # // ...
642 #
643 # Example (iOS / Obj-C):
644 #
645 # // ...
646 # static UIColor* fromProto(Color* protocolor) {
647 # float red = [protocolor red];
648 # float green = [protocolor green];
649 # float blue = [protocolor blue];
650 # FloatValue* alpha_wrapper = [protocolor alpha];
651 # float alpha = 1.0;
652 # if (alpha_wrapper != nil) {
653 # alpha = [alpha_wrapper value];
654 # }
655 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
656 # }
657 #
658 # static Color* toProto(UIColor* color) {
659 # CGFloat red, green, blue, alpha;
660 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
661 # return nil;
662 # }
663 # Color* result = [Color alloc] init];
664 # [result setRed:red];
665 # [result setGreen:green];
666 # [result setBlue:blue];
667 # if (alpha <= 0.9999) {
668 # [result setAlpha:floatWrapperWithValue(alpha)];
669 # }
670 # [result autorelease];
671 # return result;
672 # }
673 # // ...
674 #
675 # Example (JavaScript):
676 #
677 # // ...
678 #
679 # var protoToCssColor = function(rgb_color) {
680 # var redFrac = rgb_color.red || 0.0;
681 # var greenFrac = rgb_color.green || 0.0;
682 # var blueFrac = rgb_color.blue || 0.0;
683 # var red = Math.floor(redFrac * 255);
684 # var green = Math.floor(greenFrac * 255);
685 # var blue = Math.floor(blueFrac * 255);
686 #
687 # if (!('alpha' in rgb_color)) {
688 # return rgbToCssColor_(red, green, blue);
689 # }
690 #
691 # var alphaFrac = rgb_color.alpha.value || 0.0;
692 # var rgbParams = [red, green, blue].join(',');
693 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
694 # };
695 #
696 # var rgbToCssColor_ = function(red, green, blue) {
697 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
698 # var hexString = rgbNumber.toString(16);
699 # var missingZeros = 6 - hexString.length;
700 # var resultBuilder = ['#'];
701 # for (var i = 0; i < missingZeros; i++) {
702 # resultBuilder.push('0');
703 # }
704 # resultBuilder.push(hexString);
705 # return resultBuilder.join('');
706 # };
707 #
708 # // ...
709 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
710 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
711 # the final pixel color is defined by the equation:
712 #
713 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
714 #
715 # This means that a value of 1.0 corresponds to a solid color, whereas
716 # a value of 0.0 corresponds to a completely transparent color. This
717 # uses a wrapper message rather than a simple float scalar so that it is
718 # possible to distinguish between a default value and the value being unset.
719 # If omitted, this color object is to be rendered as a solid color
720 # (as if the alpha value had been explicitly given with a value of 1.0).
721 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
722 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
723 },
724 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700725 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700726 "style": "A String", # The style of the border.
727 },
728 "right": { # A border along a cell. # The right border of the cell.
729 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
730 # for simplicity of conversion to/from color representations in various
731 # languages over compactness; for example, the fields of this representation
732 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
733 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
734 # method in iOS; and, with just a little work, it can be easily formatted into
735 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
736 #
737 # Example (Java):
738 #
739 # import com.google.type.Color;
740 #
741 # // ...
742 # public static java.awt.Color fromProto(Color protocolor) {
743 # float alpha = protocolor.hasAlpha()
744 # ? protocolor.getAlpha().getValue()
745 # : 1.0;
746 #
747 # return new java.awt.Color(
748 # protocolor.getRed(),
749 # protocolor.getGreen(),
750 # protocolor.getBlue(),
751 # alpha);
752 # }
753 #
754 # public static Color toProto(java.awt.Color color) {
755 # float red = (float) color.getRed();
756 # float green = (float) color.getGreen();
757 # float blue = (float) color.getBlue();
758 # float denominator = 255.0;
759 # Color.Builder resultBuilder =
760 # Color
761 # .newBuilder()
762 # .setRed(red / denominator)
763 # .setGreen(green / denominator)
764 # .setBlue(blue / denominator);
765 # int alpha = color.getAlpha();
766 # if (alpha != 255) {
767 # result.setAlpha(
768 # FloatValue
769 # .newBuilder()
770 # .setValue(((float) alpha) / denominator)
771 # .build());
772 # }
773 # return resultBuilder.build();
774 # }
775 # // ...
776 #
777 # Example (iOS / Obj-C):
778 #
779 # // ...
780 # static UIColor* fromProto(Color* protocolor) {
781 # float red = [protocolor red];
782 # float green = [protocolor green];
783 # float blue = [protocolor blue];
784 # FloatValue* alpha_wrapper = [protocolor alpha];
785 # float alpha = 1.0;
786 # if (alpha_wrapper != nil) {
787 # alpha = [alpha_wrapper value];
788 # }
789 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
790 # }
791 #
792 # static Color* toProto(UIColor* color) {
793 # CGFloat red, green, blue, alpha;
794 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
795 # return nil;
796 # }
797 # Color* result = [Color alloc] init];
798 # [result setRed:red];
799 # [result setGreen:green];
800 # [result setBlue:blue];
801 # if (alpha <= 0.9999) {
802 # [result setAlpha:floatWrapperWithValue(alpha)];
803 # }
804 # [result autorelease];
805 # return result;
806 # }
807 # // ...
808 #
809 # Example (JavaScript):
810 #
811 # // ...
812 #
813 # var protoToCssColor = function(rgb_color) {
814 # var redFrac = rgb_color.red || 0.0;
815 # var greenFrac = rgb_color.green || 0.0;
816 # var blueFrac = rgb_color.blue || 0.0;
817 # var red = Math.floor(redFrac * 255);
818 # var green = Math.floor(greenFrac * 255);
819 # var blue = Math.floor(blueFrac * 255);
820 #
821 # if (!('alpha' in rgb_color)) {
822 # return rgbToCssColor_(red, green, blue);
823 # }
824 #
825 # var alphaFrac = rgb_color.alpha.value || 0.0;
826 # var rgbParams = [red, green, blue].join(',');
827 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
828 # };
829 #
830 # var rgbToCssColor_ = function(red, green, blue) {
831 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
832 # var hexString = rgbNumber.toString(16);
833 # var missingZeros = 6 - hexString.length;
834 # var resultBuilder = ['#'];
835 # for (var i = 0; i < missingZeros; i++) {
836 # resultBuilder.push('0');
837 # }
838 # resultBuilder.push(hexString);
839 # return resultBuilder.join('');
840 # };
841 #
842 # // ...
843 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
844 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
845 # the final pixel color is defined by the equation:
846 #
847 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
848 #
849 # This means that a value of 1.0 corresponds to a solid color, whereas
850 # a value of 0.0 corresponds to a completely transparent color. This
851 # uses a wrapper message rather than a simple float scalar so that it is
852 # possible to distinguish between a default value and the value being unset.
853 # If omitted, this color object is to be rendered as a solid color
854 # (as if the alpha value had been explicitly given with a value of 1.0).
855 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
856 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
857 },
858 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700859 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700860 "style": "A String", # The style of the border.
861 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700862 "left": { # A border along a cell. # The left border of the cell.
863 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
864 # for simplicity of conversion to/from color representations in various
865 # languages over compactness; for example, the fields of this representation
866 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
867 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
868 # method in iOS; and, with just a little work, it can be easily formatted into
869 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
870 #
871 # Example (Java):
872 #
873 # import com.google.type.Color;
874 #
875 # // ...
876 # public static java.awt.Color fromProto(Color protocolor) {
877 # float alpha = protocolor.hasAlpha()
878 # ? protocolor.getAlpha().getValue()
879 # : 1.0;
880 #
881 # return new java.awt.Color(
882 # protocolor.getRed(),
883 # protocolor.getGreen(),
884 # protocolor.getBlue(),
885 # alpha);
886 # }
887 #
888 # public static Color toProto(java.awt.Color color) {
889 # float red = (float) color.getRed();
890 # float green = (float) color.getGreen();
891 # float blue = (float) color.getBlue();
892 # float denominator = 255.0;
893 # Color.Builder resultBuilder =
894 # Color
895 # .newBuilder()
896 # .setRed(red / denominator)
897 # .setGreen(green / denominator)
898 # .setBlue(blue / denominator);
899 # int alpha = color.getAlpha();
900 # if (alpha != 255) {
901 # result.setAlpha(
902 # FloatValue
903 # .newBuilder()
904 # .setValue(((float) alpha) / denominator)
905 # .build());
906 # }
907 # return resultBuilder.build();
908 # }
909 # // ...
910 #
911 # Example (iOS / Obj-C):
912 #
913 # // ...
914 # static UIColor* fromProto(Color* protocolor) {
915 # float red = [protocolor red];
916 # float green = [protocolor green];
917 # float blue = [protocolor blue];
918 # FloatValue* alpha_wrapper = [protocolor alpha];
919 # float alpha = 1.0;
920 # if (alpha_wrapper != nil) {
921 # alpha = [alpha_wrapper value];
922 # }
923 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
924 # }
925 #
926 # static Color* toProto(UIColor* color) {
927 # CGFloat red, green, blue, alpha;
928 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
929 # return nil;
930 # }
931 # Color* result = [Color alloc] init];
932 # [result setRed:red];
933 # [result setGreen:green];
934 # [result setBlue:blue];
935 # if (alpha <= 0.9999) {
936 # [result setAlpha:floatWrapperWithValue(alpha)];
937 # }
938 # [result autorelease];
939 # return result;
940 # }
941 # // ...
942 #
943 # Example (JavaScript):
944 #
945 # // ...
946 #
947 # var protoToCssColor = function(rgb_color) {
948 # var redFrac = rgb_color.red || 0.0;
949 # var greenFrac = rgb_color.green || 0.0;
950 # var blueFrac = rgb_color.blue || 0.0;
951 # var red = Math.floor(redFrac * 255);
952 # var green = Math.floor(greenFrac * 255);
953 # var blue = Math.floor(blueFrac * 255);
954 #
955 # if (!('alpha' in rgb_color)) {
956 # return rgbToCssColor_(red, green, blue);
957 # }
958 #
959 # var alphaFrac = rgb_color.alpha.value || 0.0;
960 # var rgbParams = [red, green, blue].join(',');
961 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
962 # };
963 #
964 # var rgbToCssColor_ = function(red, green, blue) {
965 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
966 # var hexString = rgbNumber.toString(16);
967 # var missingZeros = 6 - hexString.length;
968 # var resultBuilder = ['#'];
969 # for (var i = 0; i < missingZeros; i++) {
970 # resultBuilder.push('0');
971 # }
972 # resultBuilder.push(hexString);
973 # return resultBuilder.join('');
974 # };
975 #
976 # // ...
977 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
978 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
979 # the final pixel color is defined by the equation:
980 #
981 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
982 #
983 # This means that a value of 1.0 corresponds to a solid color, whereas
984 # a value of 0.0 corresponds to a completely transparent color. This
985 # uses a wrapper message rather than a simple float scalar so that it is
986 # possible to distinguish between a default value and the value being unset.
987 # If omitted, this color object is to be rendered as a solid color
988 # (as if the alpha value had been explicitly given with a value of 1.0).
989 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
990 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
991 },
992 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700993 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700994 "style": "A String", # The style of the border.
995 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700996 "bottom": { # A border along a cell. # The bottom border of the cell.
997 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
998 # for simplicity of conversion to/from color representations in various
999 # languages over compactness; for example, the fields of this representation
1000 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1001 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1002 # method in iOS; and, with just a little work, it can be easily formatted into
1003 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1004 #
1005 # Example (Java):
1006 #
1007 # import com.google.type.Color;
1008 #
1009 # // ...
1010 # public static java.awt.Color fromProto(Color protocolor) {
1011 # float alpha = protocolor.hasAlpha()
1012 # ? protocolor.getAlpha().getValue()
1013 # : 1.0;
1014 #
1015 # return new java.awt.Color(
1016 # protocolor.getRed(),
1017 # protocolor.getGreen(),
1018 # protocolor.getBlue(),
1019 # alpha);
1020 # }
1021 #
1022 # public static Color toProto(java.awt.Color color) {
1023 # float red = (float) color.getRed();
1024 # float green = (float) color.getGreen();
1025 # float blue = (float) color.getBlue();
1026 # float denominator = 255.0;
1027 # Color.Builder resultBuilder =
1028 # Color
1029 # .newBuilder()
1030 # .setRed(red / denominator)
1031 # .setGreen(green / denominator)
1032 # .setBlue(blue / denominator);
1033 # int alpha = color.getAlpha();
1034 # if (alpha != 255) {
1035 # result.setAlpha(
1036 # FloatValue
1037 # .newBuilder()
1038 # .setValue(((float) alpha) / denominator)
1039 # .build());
1040 # }
1041 # return resultBuilder.build();
1042 # }
1043 # // ...
1044 #
1045 # Example (iOS / Obj-C):
1046 #
1047 # // ...
1048 # static UIColor* fromProto(Color* protocolor) {
1049 # float red = [protocolor red];
1050 # float green = [protocolor green];
1051 # float blue = [protocolor blue];
1052 # FloatValue* alpha_wrapper = [protocolor alpha];
1053 # float alpha = 1.0;
1054 # if (alpha_wrapper != nil) {
1055 # alpha = [alpha_wrapper value];
1056 # }
1057 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1058 # }
1059 #
1060 # static Color* toProto(UIColor* color) {
1061 # CGFloat red, green, blue, alpha;
1062 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1063 # return nil;
1064 # }
1065 # Color* result = [Color alloc] init];
1066 # [result setRed:red];
1067 # [result setGreen:green];
1068 # [result setBlue:blue];
1069 # if (alpha <= 0.9999) {
1070 # [result setAlpha:floatWrapperWithValue(alpha)];
1071 # }
1072 # [result autorelease];
1073 # return result;
1074 # }
1075 # // ...
1076 #
1077 # Example (JavaScript):
1078 #
1079 # // ...
1080 #
1081 # var protoToCssColor = function(rgb_color) {
1082 # var redFrac = rgb_color.red || 0.0;
1083 # var greenFrac = rgb_color.green || 0.0;
1084 # var blueFrac = rgb_color.blue || 0.0;
1085 # var red = Math.floor(redFrac * 255);
1086 # var green = Math.floor(greenFrac * 255);
1087 # var blue = Math.floor(blueFrac * 255);
1088 #
1089 # if (!('alpha' in rgb_color)) {
1090 # return rgbToCssColor_(red, green, blue);
1091 # }
1092 #
1093 # var alphaFrac = rgb_color.alpha.value || 0.0;
1094 # var rgbParams = [red, green, blue].join(',');
1095 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1096 # };
1097 #
1098 # var rgbToCssColor_ = function(red, green, blue) {
1099 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1100 # var hexString = rgbNumber.toString(16);
1101 # var missingZeros = 6 - hexString.length;
1102 # var resultBuilder = ['#'];
1103 # for (var i = 0; i < missingZeros; i++) {
1104 # resultBuilder.push('0');
1105 # }
1106 # resultBuilder.push(hexString);
1107 # return resultBuilder.join('');
1108 # };
1109 #
1110 # // ...
1111 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1112 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1113 # the final pixel color is defined by the equation:
1114 #
1115 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1116 #
1117 # This means that a value of 1.0 corresponds to a solid color, whereas
1118 # a value of 0.0 corresponds to a completely transparent color. This
1119 # uses a wrapper message rather than a simple float scalar so that it is
1120 # possible to distinguish between a default value and the value being unset.
1121 # If omitted, this color object is to be rendered as a solid color
1122 # (as if the alpha value had been explicitly given with a value of 1.0).
1123 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1124 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1125 },
1126 "width": 42, # The width of the border, in pixels.
1127 # Deprecated; the width is determined by the "style" field.
1128 "style": "A String", # The style of the border.
1129 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001130 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001131 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001132 },
1133 },
1134 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1135 # the interpolation points listed. The format of a cell will vary
1136 # based on its contents as compared to the values of the interpolation
1137 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001138 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001139 # These pin the gradient color scale according to the color,
1140 # type and value chosen.
1141 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1142 # for simplicity of conversion to/from color representations in various
1143 # languages over compactness; for example, the fields of this representation
1144 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1145 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1146 # method in iOS; and, with just a little work, it can be easily formatted into
1147 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1148 #
1149 # Example (Java):
1150 #
1151 # import com.google.type.Color;
1152 #
1153 # // ...
1154 # public static java.awt.Color fromProto(Color protocolor) {
1155 # float alpha = protocolor.hasAlpha()
1156 # ? protocolor.getAlpha().getValue()
1157 # : 1.0;
1158 #
1159 # return new java.awt.Color(
1160 # protocolor.getRed(),
1161 # protocolor.getGreen(),
1162 # protocolor.getBlue(),
1163 # alpha);
1164 # }
1165 #
1166 # public static Color toProto(java.awt.Color color) {
1167 # float red = (float) color.getRed();
1168 # float green = (float) color.getGreen();
1169 # float blue = (float) color.getBlue();
1170 # float denominator = 255.0;
1171 # Color.Builder resultBuilder =
1172 # Color
1173 # .newBuilder()
1174 # .setRed(red / denominator)
1175 # .setGreen(green / denominator)
1176 # .setBlue(blue / denominator);
1177 # int alpha = color.getAlpha();
1178 # if (alpha != 255) {
1179 # result.setAlpha(
1180 # FloatValue
1181 # .newBuilder()
1182 # .setValue(((float) alpha) / denominator)
1183 # .build());
1184 # }
1185 # return resultBuilder.build();
1186 # }
1187 # // ...
1188 #
1189 # Example (iOS / Obj-C):
1190 #
1191 # // ...
1192 # static UIColor* fromProto(Color* protocolor) {
1193 # float red = [protocolor red];
1194 # float green = [protocolor green];
1195 # float blue = [protocolor blue];
1196 # FloatValue* alpha_wrapper = [protocolor alpha];
1197 # float alpha = 1.0;
1198 # if (alpha_wrapper != nil) {
1199 # alpha = [alpha_wrapper value];
1200 # }
1201 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1202 # }
1203 #
1204 # static Color* toProto(UIColor* color) {
1205 # CGFloat red, green, blue, alpha;
1206 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1207 # return nil;
1208 # }
1209 # Color* result = [Color alloc] init];
1210 # [result setRed:red];
1211 # [result setGreen:green];
1212 # [result setBlue:blue];
1213 # if (alpha <= 0.9999) {
1214 # [result setAlpha:floatWrapperWithValue(alpha)];
1215 # }
1216 # [result autorelease];
1217 # return result;
1218 # }
1219 # // ...
1220 #
1221 # Example (JavaScript):
1222 #
1223 # // ...
1224 #
1225 # var protoToCssColor = function(rgb_color) {
1226 # var redFrac = rgb_color.red || 0.0;
1227 # var greenFrac = rgb_color.green || 0.0;
1228 # var blueFrac = rgb_color.blue || 0.0;
1229 # var red = Math.floor(redFrac * 255);
1230 # var green = Math.floor(greenFrac * 255);
1231 # var blue = Math.floor(blueFrac * 255);
1232 #
1233 # if (!('alpha' in rgb_color)) {
1234 # return rgbToCssColor_(red, green, blue);
1235 # }
1236 #
1237 # var alphaFrac = rgb_color.alpha.value || 0.0;
1238 # var rgbParams = [red, green, blue].join(',');
1239 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1240 # };
1241 #
1242 # var rgbToCssColor_ = function(red, green, blue) {
1243 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1244 # var hexString = rgbNumber.toString(16);
1245 # var missingZeros = 6 - hexString.length;
1246 # var resultBuilder = ['#'];
1247 # for (var i = 0; i < missingZeros; i++) {
1248 # resultBuilder.push('0');
1249 # }
1250 # resultBuilder.push(hexString);
1251 # return resultBuilder.join('');
1252 # };
1253 #
1254 # // ...
1255 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1256 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1257 # the final pixel color is defined by the equation:
1258 #
1259 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1260 #
1261 # This means that a value of 1.0 corresponds to a solid color, whereas
1262 # a value of 0.0 corresponds to a completely transparent color. This
1263 # uses a wrapper message rather than a simple float scalar so that it is
1264 # possible to distinguish between a default value and the value being unset.
1265 # If omitted, this color object is to be rendered as a solid color
1266 # (as if the alpha value had been explicitly given with a value of 1.0).
1267 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1268 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1269 },
1270 "type": "A String", # How the value should be interpreted.
1271 "value": "A String", # The value this interpolation point uses. May be a formula.
1272 # Unused if type is MIN or
1273 # MAX.
1274 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001275 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001276 # These pin the gradient color scale according to the color,
1277 # type and value chosen.
1278 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1279 # for simplicity of conversion to/from color representations in various
1280 # languages over compactness; for example, the fields of this representation
1281 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1282 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1283 # method in iOS; and, with just a little work, it can be easily formatted into
1284 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1285 #
1286 # Example (Java):
1287 #
1288 # import com.google.type.Color;
1289 #
1290 # // ...
1291 # public static java.awt.Color fromProto(Color protocolor) {
1292 # float alpha = protocolor.hasAlpha()
1293 # ? protocolor.getAlpha().getValue()
1294 # : 1.0;
1295 #
1296 # return new java.awt.Color(
1297 # protocolor.getRed(),
1298 # protocolor.getGreen(),
1299 # protocolor.getBlue(),
1300 # alpha);
1301 # }
1302 #
1303 # public static Color toProto(java.awt.Color color) {
1304 # float red = (float) color.getRed();
1305 # float green = (float) color.getGreen();
1306 # float blue = (float) color.getBlue();
1307 # float denominator = 255.0;
1308 # Color.Builder resultBuilder =
1309 # Color
1310 # .newBuilder()
1311 # .setRed(red / denominator)
1312 # .setGreen(green / denominator)
1313 # .setBlue(blue / denominator);
1314 # int alpha = color.getAlpha();
1315 # if (alpha != 255) {
1316 # result.setAlpha(
1317 # FloatValue
1318 # .newBuilder()
1319 # .setValue(((float) alpha) / denominator)
1320 # .build());
1321 # }
1322 # return resultBuilder.build();
1323 # }
1324 # // ...
1325 #
1326 # Example (iOS / Obj-C):
1327 #
1328 # // ...
1329 # static UIColor* fromProto(Color* protocolor) {
1330 # float red = [protocolor red];
1331 # float green = [protocolor green];
1332 # float blue = [protocolor blue];
1333 # FloatValue* alpha_wrapper = [protocolor alpha];
1334 # float alpha = 1.0;
1335 # if (alpha_wrapper != nil) {
1336 # alpha = [alpha_wrapper value];
1337 # }
1338 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1339 # }
1340 #
1341 # static Color* toProto(UIColor* color) {
1342 # CGFloat red, green, blue, alpha;
1343 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1344 # return nil;
1345 # }
1346 # Color* result = [Color alloc] init];
1347 # [result setRed:red];
1348 # [result setGreen:green];
1349 # [result setBlue:blue];
1350 # if (alpha <= 0.9999) {
1351 # [result setAlpha:floatWrapperWithValue(alpha)];
1352 # }
1353 # [result autorelease];
1354 # return result;
1355 # }
1356 # // ...
1357 #
1358 # Example (JavaScript):
1359 #
1360 # // ...
1361 #
1362 # var protoToCssColor = function(rgb_color) {
1363 # var redFrac = rgb_color.red || 0.0;
1364 # var greenFrac = rgb_color.green || 0.0;
1365 # var blueFrac = rgb_color.blue || 0.0;
1366 # var red = Math.floor(redFrac * 255);
1367 # var green = Math.floor(greenFrac * 255);
1368 # var blue = Math.floor(blueFrac * 255);
1369 #
1370 # if (!('alpha' in rgb_color)) {
1371 # return rgbToCssColor_(red, green, blue);
1372 # }
1373 #
1374 # var alphaFrac = rgb_color.alpha.value || 0.0;
1375 # var rgbParams = [red, green, blue].join(',');
1376 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1377 # };
1378 #
1379 # var rgbToCssColor_ = function(red, green, blue) {
1380 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1381 # var hexString = rgbNumber.toString(16);
1382 # var missingZeros = 6 - hexString.length;
1383 # var resultBuilder = ['#'];
1384 # for (var i = 0; i < missingZeros; i++) {
1385 # resultBuilder.push('0');
1386 # }
1387 # resultBuilder.push(hexString);
1388 # return resultBuilder.join('');
1389 # };
1390 #
1391 # // ...
1392 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1393 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1394 # the final pixel color is defined by the equation:
1395 #
1396 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1397 #
1398 # This means that a value of 1.0 corresponds to a solid color, whereas
1399 # a value of 0.0 corresponds to a completely transparent color. This
1400 # uses a wrapper message rather than a simple float scalar so that it is
1401 # possible to distinguish between a default value and the value being unset.
1402 # If omitted, this color object is to be rendered as a solid color
1403 # (as if the alpha value had been explicitly given with a value of 1.0).
1404 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1405 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1406 },
1407 "type": "A String", # How the value should be interpreted.
1408 "value": "A String", # The value this interpolation point uses. May be a formula.
1409 # Unused if type is MIN or
1410 # MAX.
1411 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001412 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001413 # These pin the gradient color scale according to the color,
1414 # type and value chosen.
1415 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1416 # for simplicity of conversion to/from color representations in various
1417 # languages over compactness; for example, the fields of this representation
1418 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1419 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1420 # method in iOS; and, with just a little work, it can be easily formatted into
1421 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1422 #
1423 # Example (Java):
1424 #
1425 # import com.google.type.Color;
1426 #
1427 # // ...
1428 # public static java.awt.Color fromProto(Color protocolor) {
1429 # float alpha = protocolor.hasAlpha()
1430 # ? protocolor.getAlpha().getValue()
1431 # : 1.0;
1432 #
1433 # return new java.awt.Color(
1434 # protocolor.getRed(),
1435 # protocolor.getGreen(),
1436 # protocolor.getBlue(),
1437 # alpha);
1438 # }
1439 #
1440 # public static Color toProto(java.awt.Color color) {
1441 # float red = (float) color.getRed();
1442 # float green = (float) color.getGreen();
1443 # float blue = (float) color.getBlue();
1444 # float denominator = 255.0;
1445 # Color.Builder resultBuilder =
1446 # Color
1447 # .newBuilder()
1448 # .setRed(red / denominator)
1449 # .setGreen(green / denominator)
1450 # .setBlue(blue / denominator);
1451 # int alpha = color.getAlpha();
1452 # if (alpha != 255) {
1453 # result.setAlpha(
1454 # FloatValue
1455 # .newBuilder()
1456 # .setValue(((float) alpha) / denominator)
1457 # .build());
1458 # }
1459 # return resultBuilder.build();
1460 # }
1461 # // ...
1462 #
1463 # Example (iOS / Obj-C):
1464 #
1465 # // ...
1466 # static UIColor* fromProto(Color* protocolor) {
1467 # float red = [protocolor red];
1468 # float green = [protocolor green];
1469 # float blue = [protocolor blue];
1470 # FloatValue* alpha_wrapper = [protocolor alpha];
1471 # float alpha = 1.0;
1472 # if (alpha_wrapper != nil) {
1473 # alpha = [alpha_wrapper value];
1474 # }
1475 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1476 # }
1477 #
1478 # static Color* toProto(UIColor* color) {
1479 # CGFloat red, green, blue, alpha;
1480 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1481 # return nil;
1482 # }
1483 # Color* result = [Color alloc] init];
1484 # [result setRed:red];
1485 # [result setGreen:green];
1486 # [result setBlue:blue];
1487 # if (alpha <= 0.9999) {
1488 # [result setAlpha:floatWrapperWithValue(alpha)];
1489 # }
1490 # [result autorelease];
1491 # return result;
1492 # }
1493 # // ...
1494 #
1495 # Example (JavaScript):
1496 #
1497 # // ...
1498 #
1499 # var protoToCssColor = function(rgb_color) {
1500 # var redFrac = rgb_color.red || 0.0;
1501 # var greenFrac = rgb_color.green || 0.0;
1502 # var blueFrac = rgb_color.blue || 0.0;
1503 # var red = Math.floor(redFrac * 255);
1504 # var green = Math.floor(greenFrac * 255);
1505 # var blue = Math.floor(blueFrac * 255);
1506 #
1507 # if (!('alpha' in rgb_color)) {
1508 # return rgbToCssColor_(red, green, blue);
1509 # }
1510 #
1511 # var alphaFrac = rgb_color.alpha.value || 0.0;
1512 # var rgbParams = [red, green, blue].join(',');
1513 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1514 # };
1515 #
1516 # var rgbToCssColor_ = function(red, green, blue) {
1517 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1518 # var hexString = rgbNumber.toString(16);
1519 # var missingZeros = 6 - hexString.length;
1520 # var resultBuilder = ['#'];
1521 # for (var i = 0; i < missingZeros; i++) {
1522 # resultBuilder.push('0');
1523 # }
1524 # resultBuilder.push(hexString);
1525 # return resultBuilder.join('');
1526 # };
1527 #
1528 # // ...
1529 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1530 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1531 # the final pixel color is defined by the equation:
1532 #
1533 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1534 #
1535 # This means that a value of 1.0 corresponds to a solid color, whereas
1536 # a value of 0.0 corresponds to a completely transparent color. This
1537 # uses a wrapper message rather than a simple float scalar so that it is
1538 # possible to distinguish between a default value and the value being unset.
1539 # If omitted, this color object is to be rendered as a solid color
1540 # (as if the alpha value had been explicitly given with a value of 1.0).
1541 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1542 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1543 },
1544 "type": "A String", # How the value should be interpreted.
1545 "value": "A String", # The value this interpolation point uses. May be a formula.
1546 # Unused if type is MIN or
1547 # MAX.
1548 },
1549 },
1550 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001551 "sheetId": 42, # The sheet of the rule to move. Required if new_index is set,
1552 # unused otherwise.
1553 "newIndex": 42, # The zero-based new index the rule should end up at.
Thomas Coffee2f245372017-03-27 10:39:26 -07001554 "index": 42, # The zero-based index of the rule that should be replaced or moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001555 },
1556 "updateProtectedRange": { # Updates an existing protected range with the specified # Updates a protected range.
1557 # protectedRangeId.
1558 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1559 # The root `protectedRange` is implied and should not be specified.
1560 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001561 "protectedRange": { # A protected range. # The protected range to update with the new properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001562 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1563 # Unprotected ranges are only supported on protected sheets.
1564 { # A range on a sheet.
1565 # All indexes are zero-based.
1566 # Indexes are half open, e.g the start index is inclusive
1567 # and the end index is exclusive -- [start_index, end_index).
1568 # Missing indexes indicate the range is unbounded on that side.
1569 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001570 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001571 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001572 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001573 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001574 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001575 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001576 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001577 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001578 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001579 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001580 # `Sheet1!A:B == sheet_id: 0,
1581 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001582 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001583 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001584 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001585 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001586 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001587 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001588 #
1589 # The start index must always be less than or equal to the end index.
1590 # If the start index equals the end index, then the range is empty.
1591 # Empty ranges are typically not meaningful and are usually rendered in the
1592 # UI as `#REF!`.
1593 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001594 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001595 "sheetId": 42, # The sheet this range is on.
1596 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001597 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001598 },
1599 ],
1600 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1601 # protected area.
1602 # This field is read-only.
1603 "description": "A String", # The description of this protected range.
1604 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1605 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001606 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001607 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001608 "range": { # A range on a sheet. # The range that is being protected.
1609 # The range may be fully unbounded, in which case this is considered
1610 # a protected sheet.
1611 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001612 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001613 # may be set.
1614 # All indexes are zero-based.
1615 # Indexes are half open, e.g the start index is inclusive
1616 # and the end index is exclusive -- [start_index, end_index).
1617 # Missing indexes indicate the range is unbounded on that side.
1618 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001619 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001621 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001622 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001623 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001625 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001626 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001627 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001628 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001629 # `Sheet1!A:B == sheet_id: 0,
1630 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001631 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001632 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001633 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001634 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001636 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001637 #
1638 # The start index must always be less than or equal to the end index.
1639 # If the start index equals the end index, then the range is empty.
1640 # Empty ranges are typically not meaningful and are usually rendered in the
1641 # UI as `#REF!`.
1642 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001643 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001644 "sheetId": 42, # The sheet this range is on.
1645 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001646 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001647 },
Thomas Coffee2f245372017-03-27 10:39:26 -07001648 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1649 # This field is only visible to users with edit access to the protected
1650 # range and the document.
1651 # Editors are not supported with warning_only protection.
1652 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1653 # range. Domain protection is only supported on documents within a domain.
1654 "users": [ # The email addresses of users with edit access to the protected range.
1655 "A String",
1656 ],
1657 "groups": [ # The email addresses of groups with edit access to the protected range.
1658 "A String",
1659 ],
1660 },
1661 "protectedRangeId": 42, # The ID of the protected range.
1662 # This field is read-only.
1663 "warningOnly": True or False, # True if this protected range will show a warning when editing.
1664 # Warning-based protection means that every user can edit data in the
1665 # protected range, except editing will prompt a warning asking the user
1666 # to confirm the edit.
1667 #
1668 # When writing: if this field is true, then editors is ignored.
1669 # Additionally, if this field is changed from true to false and the
1670 # `editors` field is not set (nor included in the field mask), then
1671 # the editors will be set to all the editors in the document.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001672 },
1673 },
1674 "deleteDimension": { # Deletes the dimensions from the sheet. # Deletes rows or columns in a sheet.
1675 "range": { # A range along a single dimension on a sheet. # The dimensions to delete from the sheet.
1676 # All indexes are zero-based.
1677 # Indexes are half open: the start index is inclusive
1678 # and the end index is exclusive.
1679 # Missing indexes indicate the range is unbounded on that side.
1680 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1681 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1682 "sheetId": 42, # The sheet this span is on.
1683 "dimension": "A String", # The dimension of the span.
1684 },
1685 },
1686 "addProtectedRange": { # Adds a new protected range. # Adds a protected range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001687 "protectedRange": { # A protected range. # The protected range to be added. The
1688 # protectedRangeId field is optional; if
1689 # one is not set, an id will be randomly generated. (It is an error to
1690 # specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001691 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1692 # Unprotected ranges are only supported on protected sheets.
1693 { # A range on a sheet.
1694 # All indexes are zero-based.
1695 # Indexes are half open, e.g the start index is inclusive
1696 # and the end index is exclusive -- [start_index, end_index).
1697 # Missing indexes indicate the range is unbounded on that side.
1698 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001699 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001700 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001701 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001702 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001703 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001704 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001705 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001706 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001707 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001708 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001709 # `Sheet1!A:B == sheet_id: 0,
1710 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001711 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001712 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001713 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001714 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001715 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001716 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001717 #
1718 # The start index must always be less than or equal to the end index.
1719 # If the start index equals the end index, then the range is empty.
1720 # Empty ranges are typically not meaningful and are usually rendered in the
1721 # UI as `#REF!`.
1722 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001723 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001724 "sheetId": 42, # The sheet this range is on.
1725 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001726 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001727 },
1728 ],
1729 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1730 # protected area.
1731 # This field is read-only.
1732 "description": "A String", # The description of this protected range.
1733 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1734 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001735 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001736 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001737 "range": { # A range on a sheet. # The range that is being protected.
1738 # The range may be fully unbounded, in which case this is considered
1739 # a protected sheet.
1740 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001741 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001742 # may be set.
1743 # All indexes are zero-based.
1744 # Indexes are half open, e.g the start index is inclusive
1745 # and the end index is exclusive -- [start_index, end_index).
1746 # Missing indexes indicate the range is unbounded on that side.
1747 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001748 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001749 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001750 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001751 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001752 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001754 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001755 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001756 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001758 # `Sheet1!A:B == sheet_id: 0,
1759 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001760 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001761 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001762 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001763 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001764 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001765 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001766 #
1767 # The start index must always be less than or equal to the end index.
1768 # If the start index equals the end index, then the range is empty.
1769 # Empty ranges are typically not meaningful and are usually rendered in the
1770 # UI as `#REF!`.
1771 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001772 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001773 "sheetId": 42, # The sheet this range is on.
1774 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07001775 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001776 },
Thomas Coffee2f245372017-03-27 10:39:26 -07001777 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1778 # This field is only visible to users with edit access to the protected
1779 # range and the document.
1780 # Editors are not supported with warning_only protection.
1781 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1782 # range. Domain protection is only supported on documents within a domain.
1783 "users": [ # The email addresses of users with edit access to the protected range.
1784 "A String",
1785 ],
1786 "groups": [ # The email addresses of groups with edit access to the protected range.
1787 "A String",
1788 ],
1789 },
1790 "protectedRangeId": 42, # The ID of the protected range.
1791 # This field is read-only.
1792 "warningOnly": True or False, # True if this protected range will show a warning when editing.
1793 # Warning-based protection means that every user can edit data in the
1794 # protected range, except editing will prompt a warning asking the user
1795 # to confirm the edit.
1796 #
1797 # When writing: if this field is true, then editors is ignored.
1798 # Additionally, if this field is changed from true to false and the
1799 # `editors` field is not set (nor included in the field mask), then
1800 # the editors will be set to all the editors in the document.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001801 },
1802 },
1803 "deleteEmbeddedObject": { # Deletes the embedded object with the given ID. # Deletes an embedded object (e.g, chart, image) in a sheet.
1804 "objectId": 42, # The ID of the embedded object to delete.
1805 },
1806 "pasteData": { # Inserts data into the spreadsheet starting at the specified coordinate. # Pastes data (HTML or delimited) into a sheet.
1807 "coordinate": { # A coordinate in a sheet. # The coordinate at which the data should start being inserted.
1808 # All indexes are zero-based.
1809 "rowIndex": 42, # The row index of the coordinate.
1810 "columnIndex": 42, # The column index of the coordinate.
1811 "sheetId": 42, # The sheet this coordinate is on.
1812 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001813 "data": "A String", # The data to insert.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001814 "delimiter": "A String", # The delimiter in the data.
1815 "html": True or False, # True if the data is HTML.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001816 "type": "A String", # How the data should be pasted.
1817 },
1818 "updateSpreadsheetProperties": { # Updates properties of a spreadsheet. # Updates the spreadsheet's properties.
1819 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1820 # The root 'properties' is implied and should not be specified.
1821 # A single `"*"` can be used as short-hand for listing every field.
1822 "properties": { # Properties of a spreadsheet. # The properties to update.
1823 "title": "A String", # The title of the spreadsheet.
1824 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
1825 #
1826 # * an ISO 639-1 language code such as `en`
1827 #
1828 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
1829 #
1830 # * a combination of the ISO language code and country code, such as `en_US`
1831 #
1832 # Note: when updating this field, not all locales/languages are supported.
Thomas Coffee2f245372017-03-27 10:39:26 -07001833 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001834 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
1835 # CellData.effectiveFormat will not be set if the
1836 # cell's format is equal to this default format.
1837 # This field is read-only.
1838 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
1839 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
1840 # the user's locale will be used if necessary for the given type.
1841 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
1842 # information about the supported patterns.
1843 "type": "A String", # The type of the number format.
1844 # When writing, this field must be set.
1845 },
1846 "textDirection": "A String", # The direction of the text in the cell.
1847 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
1848 # When updating padding, every field must be specified.
1849 "top": 42, # The top padding of the cell.
1850 "right": 42, # The right padding of the cell.
1851 "left": 42, # The left padding of the cell.
1852 "bottom": 42, # The bottom padding of the cell.
1853 },
Thomas Coffee2f245372017-03-27 10:39:26 -07001854 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001855 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
1856 # for simplicity of conversion to/from color representations in various
1857 # languages over compactness; for example, the fields of this representation
1858 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1859 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1860 # method in iOS; and, with just a little work, it can be easily formatted into
1861 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1862 #
1863 # Example (Java):
1864 #
1865 # import com.google.type.Color;
1866 #
1867 # // ...
1868 # public static java.awt.Color fromProto(Color protocolor) {
1869 # float alpha = protocolor.hasAlpha()
1870 # ? protocolor.getAlpha().getValue()
1871 # : 1.0;
1872 #
1873 # return new java.awt.Color(
1874 # protocolor.getRed(),
1875 # protocolor.getGreen(),
1876 # protocolor.getBlue(),
1877 # alpha);
1878 # }
1879 #
1880 # public static Color toProto(java.awt.Color color) {
1881 # float red = (float) color.getRed();
1882 # float green = (float) color.getGreen();
1883 # float blue = (float) color.getBlue();
1884 # float denominator = 255.0;
1885 # Color.Builder resultBuilder =
1886 # Color
1887 # .newBuilder()
1888 # .setRed(red / denominator)
1889 # .setGreen(green / denominator)
1890 # .setBlue(blue / denominator);
1891 # int alpha = color.getAlpha();
1892 # if (alpha != 255) {
1893 # result.setAlpha(
1894 # FloatValue
1895 # .newBuilder()
1896 # .setValue(((float) alpha) / denominator)
1897 # .build());
1898 # }
1899 # return resultBuilder.build();
1900 # }
1901 # // ...
1902 #
1903 # Example (iOS / Obj-C):
1904 #
1905 # // ...
1906 # static UIColor* fromProto(Color* protocolor) {
1907 # float red = [protocolor red];
1908 # float green = [protocolor green];
1909 # float blue = [protocolor blue];
1910 # FloatValue* alpha_wrapper = [protocolor alpha];
1911 # float alpha = 1.0;
1912 # if (alpha_wrapper != nil) {
1913 # alpha = [alpha_wrapper value];
1914 # }
1915 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1916 # }
1917 #
1918 # static Color* toProto(UIColor* color) {
1919 # CGFloat red, green, blue, alpha;
1920 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1921 # return nil;
1922 # }
1923 # Color* result = [Color alloc] init];
1924 # [result setRed:red];
1925 # [result setGreen:green];
1926 # [result setBlue:blue];
1927 # if (alpha <= 0.9999) {
1928 # [result setAlpha:floatWrapperWithValue(alpha)];
1929 # }
1930 # [result autorelease];
1931 # return result;
1932 # }
1933 # // ...
1934 #
1935 # Example (JavaScript):
1936 #
1937 # // ...
1938 #
1939 # var protoToCssColor = function(rgb_color) {
1940 # var redFrac = rgb_color.red || 0.0;
1941 # var greenFrac = rgb_color.green || 0.0;
1942 # var blueFrac = rgb_color.blue || 0.0;
1943 # var red = Math.floor(redFrac * 255);
1944 # var green = Math.floor(greenFrac * 255);
1945 # var blue = Math.floor(blueFrac * 255);
1946 #
1947 # if (!('alpha' in rgb_color)) {
1948 # return rgbToCssColor_(red, green, blue);
1949 # }
1950 #
1951 # var alphaFrac = rgb_color.alpha.value || 0.0;
1952 # var rgbParams = [red, green, blue].join(',');
1953 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1954 # };
1955 #
1956 # var rgbToCssColor_ = function(red, green, blue) {
1957 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1958 # var hexString = rgbNumber.toString(16);
1959 # var missingZeros = 6 - hexString.length;
1960 # var resultBuilder = ['#'];
1961 # for (var i = 0; i < missingZeros; i++) {
1962 # resultBuilder.push('0');
1963 # }
1964 # resultBuilder.push(hexString);
1965 # return resultBuilder.join('');
1966 # };
1967 #
1968 # // ...
1969 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1970 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1971 # the final pixel color is defined by the equation:
1972 #
1973 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1974 #
1975 # This means that a value of 1.0 corresponds to a solid color, whereas
1976 # a value of 0.0 corresponds to a completely transparent color. This
1977 # uses a wrapper message rather than a simple float scalar so that it is
1978 # possible to distinguish between a default value and the value being unset.
1979 # If omitted, this color object is to be rendered as a solid color
1980 # (as if the alpha value had been explicitly given with a value of 1.0).
1981 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1982 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1983 },
Thomas Coffee2f245372017-03-27 10:39:26 -07001984 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001985 "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).
1986 # Absent values indicate that the field isn't specified.
1987 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
1988 # for simplicity of conversion to/from color representations in various
1989 # languages over compactness; for example, the fields of this representation
1990 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1991 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1992 # method in iOS; and, with just a little work, it can be easily formatted into
1993 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1994 #
1995 # Example (Java):
1996 #
1997 # import com.google.type.Color;
1998 #
1999 # // ...
2000 # public static java.awt.Color fromProto(Color protocolor) {
2001 # float alpha = protocolor.hasAlpha()
2002 # ? protocolor.getAlpha().getValue()
2003 # : 1.0;
2004 #
2005 # return new java.awt.Color(
2006 # protocolor.getRed(),
2007 # protocolor.getGreen(),
2008 # protocolor.getBlue(),
2009 # alpha);
2010 # }
2011 #
2012 # public static Color toProto(java.awt.Color color) {
2013 # float red = (float) color.getRed();
2014 # float green = (float) color.getGreen();
2015 # float blue = (float) color.getBlue();
2016 # float denominator = 255.0;
2017 # Color.Builder resultBuilder =
2018 # Color
2019 # .newBuilder()
2020 # .setRed(red / denominator)
2021 # .setGreen(green / denominator)
2022 # .setBlue(blue / denominator);
2023 # int alpha = color.getAlpha();
2024 # if (alpha != 255) {
2025 # result.setAlpha(
2026 # FloatValue
2027 # .newBuilder()
2028 # .setValue(((float) alpha) / denominator)
2029 # .build());
2030 # }
2031 # return resultBuilder.build();
2032 # }
2033 # // ...
2034 #
2035 # Example (iOS / Obj-C):
2036 #
2037 # // ...
2038 # static UIColor* fromProto(Color* protocolor) {
2039 # float red = [protocolor red];
2040 # float green = [protocolor green];
2041 # float blue = [protocolor blue];
2042 # FloatValue* alpha_wrapper = [protocolor alpha];
2043 # float alpha = 1.0;
2044 # if (alpha_wrapper != nil) {
2045 # alpha = [alpha_wrapper value];
2046 # }
2047 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2048 # }
2049 #
2050 # static Color* toProto(UIColor* color) {
2051 # CGFloat red, green, blue, alpha;
2052 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2053 # return nil;
2054 # }
2055 # Color* result = [Color alloc] init];
2056 # [result setRed:red];
2057 # [result setGreen:green];
2058 # [result setBlue:blue];
2059 # if (alpha <= 0.9999) {
2060 # [result setAlpha:floatWrapperWithValue(alpha)];
2061 # }
2062 # [result autorelease];
2063 # return result;
2064 # }
2065 # // ...
2066 #
2067 # Example (JavaScript):
2068 #
2069 # // ...
2070 #
2071 # var protoToCssColor = function(rgb_color) {
2072 # var redFrac = rgb_color.red || 0.0;
2073 # var greenFrac = rgb_color.green || 0.0;
2074 # var blueFrac = rgb_color.blue || 0.0;
2075 # var red = Math.floor(redFrac * 255);
2076 # var green = Math.floor(greenFrac * 255);
2077 # var blue = Math.floor(blueFrac * 255);
2078 #
2079 # if (!('alpha' in rgb_color)) {
2080 # return rgbToCssColor_(red, green, blue);
2081 # }
2082 #
2083 # var alphaFrac = rgb_color.alpha.value || 0.0;
2084 # var rgbParams = [red, green, blue].join(',');
2085 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2086 # };
2087 #
2088 # var rgbToCssColor_ = function(red, green, blue) {
2089 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2090 # var hexString = rgbNumber.toString(16);
2091 # var missingZeros = 6 - hexString.length;
2092 # var resultBuilder = ['#'];
2093 # for (var i = 0; i < missingZeros; i++) {
2094 # resultBuilder.push('0');
2095 # }
2096 # resultBuilder.push(hexString);
2097 # return resultBuilder.join('');
2098 # };
2099 #
2100 # // ...
2101 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2102 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2103 # the final pixel color is defined by the equation:
2104 #
2105 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2106 #
2107 # This means that a value of 1.0 corresponds to a solid color, whereas
2108 # a value of 0.0 corresponds to a completely transparent color. This
2109 # uses a wrapper message rather than a simple float scalar so that it is
2110 # possible to distinguish between a default value and the value being unset.
2111 # If omitted, this color object is to be rendered as a solid color
2112 # (as if the alpha value had been explicitly given with a value of 1.0).
2113 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2114 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2115 },
2116 "bold": True or False, # True if the text is bold.
2117 "strikethrough": True or False, # True if the text has a strikethrough.
2118 "fontFamily": "A String", # The font family.
2119 "fontSize": 42, # The size of the font.
2120 "italic": True or False, # True if the text is italicized.
2121 "underline": True or False, # True if the text is underlined.
2122 },
2123 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
2124 "angle": 42, # The angle between the standard orientation and the desired orientation.
2125 # Measured in degrees. Valid values are between -90 and 90. Positive
2126 # angles are angled upwards, negative are angled downwards.
2127 #
2128 # Note: For LTR text direction positive angles are in the counterclockwise
2129 # direction, whereas for RTL they are in the clockwise direction
2130 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
2131 # characters is unchanged.
2132 # For example:
2133 #
2134 # | V |
2135 # | e |
2136 # | r |
2137 # | t |
2138 # | i |
2139 # | c |
2140 # | a |
2141 # | l |
2142 },
2143 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2144 "borders": { # The borders of the cell. # The borders of the cell.
2145 "top": { # A border along a cell. # The top border of the cell.
2146 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2147 # for simplicity of conversion to/from color representations in various
2148 # languages over compactness; for example, the fields of this representation
2149 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2150 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2151 # method in iOS; and, with just a little work, it can be easily formatted into
2152 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2153 #
2154 # Example (Java):
2155 #
2156 # import com.google.type.Color;
2157 #
2158 # // ...
2159 # public static java.awt.Color fromProto(Color protocolor) {
2160 # float alpha = protocolor.hasAlpha()
2161 # ? protocolor.getAlpha().getValue()
2162 # : 1.0;
2163 #
2164 # return new java.awt.Color(
2165 # protocolor.getRed(),
2166 # protocolor.getGreen(),
2167 # protocolor.getBlue(),
2168 # alpha);
2169 # }
2170 #
2171 # public static Color toProto(java.awt.Color color) {
2172 # float red = (float) color.getRed();
2173 # float green = (float) color.getGreen();
2174 # float blue = (float) color.getBlue();
2175 # float denominator = 255.0;
2176 # Color.Builder resultBuilder =
2177 # Color
2178 # .newBuilder()
2179 # .setRed(red / denominator)
2180 # .setGreen(green / denominator)
2181 # .setBlue(blue / denominator);
2182 # int alpha = color.getAlpha();
2183 # if (alpha != 255) {
2184 # result.setAlpha(
2185 # FloatValue
2186 # .newBuilder()
2187 # .setValue(((float) alpha) / denominator)
2188 # .build());
2189 # }
2190 # return resultBuilder.build();
2191 # }
2192 # // ...
2193 #
2194 # Example (iOS / Obj-C):
2195 #
2196 # // ...
2197 # static UIColor* fromProto(Color* protocolor) {
2198 # float red = [protocolor red];
2199 # float green = [protocolor green];
2200 # float blue = [protocolor blue];
2201 # FloatValue* alpha_wrapper = [protocolor alpha];
2202 # float alpha = 1.0;
2203 # if (alpha_wrapper != nil) {
2204 # alpha = [alpha_wrapper value];
2205 # }
2206 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2207 # }
2208 #
2209 # static Color* toProto(UIColor* color) {
2210 # CGFloat red, green, blue, alpha;
2211 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2212 # return nil;
2213 # }
2214 # Color* result = [Color alloc] init];
2215 # [result setRed:red];
2216 # [result setGreen:green];
2217 # [result setBlue:blue];
2218 # if (alpha <= 0.9999) {
2219 # [result setAlpha:floatWrapperWithValue(alpha)];
2220 # }
2221 # [result autorelease];
2222 # return result;
2223 # }
2224 # // ...
2225 #
2226 # Example (JavaScript):
2227 #
2228 # // ...
2229 #
2230 # var protoToCssColor = function(rgb_color) {
2231 # var redFrac = rgb_color.red || 0.0;
2232 # var greenFrac = rgb_color.green || 0.0;
2233 # var blueFrac = rgb_color.blue || 0.0;
2234 # var red = Math.floor(redFrac * 255);
2235 # var green = Math.floor(greenFrac * 255);
2236 # var blue = Math.floor(blueFrac * 255);
2237 #
2238 # if (!('alpha' in rgb_color)) {
2239 # return rgbToCssColor_(red, green, blue);
2240 # }
2241 #
2242 # var alphaFrac = rgb_color.alpha.value || 0.0;
2243 # var rgbParams = [red, green, blue].join(',');
2244 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2245 # };
2246 #
2247 # var rgbToCssColor_ = function(red, green, blue) {
2248 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2249 # var hexString = rgbNumber.toString(16);
2250 # var missingZeros = 6 - hexString.length;
2251 # var resultBuilder = ['#'];
2252 # for (var i = 0; i < missingZeros; i++) {
2253 # resultBuilder.push('0');
2254 # }
2255 # resultBuilder.push(hexString);
2256 # return resultBuilder.join('');
2257 # };
2258 #
2259 # // ...
2260 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2261 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2262 # the final pixel color is defined by the equation:
2263 #
2264 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2265 #
2266 # This means that a value of 1.0 corresponds to a solid color, whereas
2267 # a value of 0.0 corresponds to a completely transparent color. This
2268 # uses a wrapper message rather than a simple float scalar so that it is
2269 # possible to distinguish between a default value and the value being unset.
2270 # If omitted, this color object is to be rendered as a solid color
2271 # (as if the alpha value had been explicitly given with a value of 1.0).
2272 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2273 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2274 },
2275 "width": 42, # The width of the border, in pixels.
2276 # Deprecated; the width is determined by the "style" field.
2277 "style": "A String", # The style of the border.
2278 },
2279 "right": { # A border along a cell. # The right border of the cell.
2280 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2281 # for simplicity of conversion to/from color representations in various
2282 # languages over compactness; for example, the fields of this representation
2283 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2284 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2285 # method in iOS; and, with just a little work, it can be easily formatted into
2286 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2287 #
2288 # Example (Java):
2289 #
2290 # import com.google.type.Color;
2291 #
2292 # // ...
2293 # public static java.awt.Color fromProto(Color protocolor) {
2294 # float alpha = protocolor.hasAlpha()
2295 # ? protocolor.getAlpha().getValue()
2296 # : 1.0;
2297 #
2298 # return new java.awt.Color(
2299 # protocolor.getRed(),
2300 # protocolor.getGreen(),
2301 # protocolor.getBlue(),
2302 # alpha);
2303 # }
2304 #
2305 # public static Color toProto(java.awt.Color color) {
2306 # float red = (float) color.getRed();
2307 # float green = (float) color.getGreen();
2308 # float blue = (float) color.getBlue();
2309 # float denominator = 255.0;
2310 # Color.Builder resultBuilder =
2311 # Color
2312 # .newBuilder()
2313 # .setRed(red / denominator)
2314 # .setGreen(green / denominator)
2315 # .setBlue(blue / denominator);
2316 # int alpha = color.getAlpha();
2317 # if (alpha != 255) {
2318 # result.setAlpha(
2319 # FloatValue
2320 # .newBuilder()
2321 # .setValue(((float) alpha) / denominator)
2322 # .build());
2323 # }
2324 # return resultBuilder.build();
2325 # }
2326 # // ...
2327 #
2328 # Example (iOS / Obj-C):
2329 #
2330 # // ...
2331 # static UIColor* fromProto(Color* protocolor) {
2332 # float red = [protocolor red];
2333 # float green = [protocolor green];
2334 # float blue = [protocolor blue];
2335 # FloatValue* alpha_wrapper = [protocolor alpha];
2336 # float alpha = 1.0;
2337 # if (alpha_wrapper != nil) {
2338 # alpha = [alpha_wrapper value];
2339 # }
2340 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2341 # }
2342 #
2343 # static Color* toProto(UIColor* color) {
2344 # CGFloat red, green, blue, alpha;
2345 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2346 # return nil;
2347 # }
2348 # Color* result = [Color alloc] init];
2349 # [result setRed:red];
2350 # [result setGreen:green];
2351 # [result setBlue:blue];
2352 # if (alpha <= 0.9999) {
2353 # [result setAlpha:floatWrapperWithValue(alpha)];
2354 # }
2355 # [result autorelease];
2356 # return result;
2357 # }
2358 # // ...
2359 #
2360 # Example (JavaScript):
2361 #
2362 # // ...
2363 #
2364 # var protoToCssColor = function(rgb_color) {
2365 # var redFrac = rgb_color.red || 0.0;
2366 # var greenFrac = rgb_color.green || 0.0;
2367 # var blueFrac = rgb_color.blue || 0.0;
2368 # var red = Math.floor(redFrac * 255);
2369 # var green = Math.floor(greenFrac * 255);
2370 # var blue = Math.floor(blueFrac * 255);
2371 #
2372 # if (!('alpha' in rgb_color)) {
2373 # return rgbToCssColor_(red, green, blue);
2374 # }
2375 #
2376 # var alphaFrac = rgb_color.alpha.value || 0.0;
2377 # var rgbParams = [red, green, blue].join(',');
2378 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2379 # };
2380 #
2381 # var rgbToCssColor_ = function(red, green, blue) {
2382 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2383 # var hexString = rgbNumber.toString(16);
2384 # var missingZeros = 6 - hexString.length;
2385 # var resultBuilder = ['#'];
2386 # for (var i = 0; i < missingZeros; i++) {
2387 # resultBuilder.push('0');
2388 # }
2389 # resultBuilder.push(hexString);
2390 # return resultBuilder.join('');
2391 # };
2392 #
2393 # // ...
2394 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2395 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2396 # the final pixel color is defined by the equation:
2397 #
2398 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2399 #
2400 # This means that a value of 1.0 corresponds to a solid color, whereas
2401 # a value of 0.0 corresponds to a completely transparent color. This
2402 # uses a wrapper message rather than a simple float scalar so that it is
2403 # possible to distinguish between a default value and the value being unset.
2404 # If omitted, this color object is to be rendered as a solid color
2405 # (as if the alpha value had been explicitly given with a value of 1.0).
2406 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2407 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2408 },
2409 "width": 42, # The width of the border, in pixels.
2410 # Deprecated; the width is determined by the "style" field.
2411 "style": "A String", # The style of the border.
2412 },
2413 "left": { # A border along a cell. # The left border of the cell.
2414 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2415 # for simplicity of conversion to/from color representations in various
2416 # languages over compactness; for example, the fields of this representation
2417 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2418 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2419 # method in iOS; and, with just a little work, it can be easily formatted into
2420 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2421 #
2422 # Example (Java):
2423 #
2424 # import com.google.type.Color;
2425 #
2426 # // ...
2427 # public static java.awt.Color fromProto(Color protocolor) {
2428 # float alpha = protocolor.hasAlpha()
2429 # ? protocolor.getAlpha().getValue()
2430 # : 1.0;
2431 #
2432 # return new java.awt.Color(
2433 # protocolor.getRed(),
2434 # protocolor.getGreen(),
2435 # protocolor.getBlue(),
2436 # alpha);
2437 # }
2438 #
2439 # public static Color toProto(java.awt.Color color) {
2440 # float red = (float) color.getRed();
2441 # float green = (float) color.getGreen();
2442 # float blue = (float) color.getBlue();
2443 # float denominator = 255.0;
2444 # Color.Builder resultBuilder =
2445 # Color
2446 # .newBuilder()
2447 # .setRed(red / denominator)
2448 # .setGreen(green / denominator)
2449 # .setBlue(blue / denominator);
2450 # int alpha = color.getAlpha();
2451 # if (alpha != 255) {
2452 # result.setAlpha(
2453 # FloatValue
2454 # .newBuilder()
2455 # .setValue(((float) alpha) / denominator)
2456 # .build());
2457 # }
2458 # return resultBuilder.build();
2459 # }
2460 # // ...
2461 #
2462 # Example (iOS / Obj-C):
2463 #
2464 # // ...
2465 # static UIColor* fromProto(Color* protocolor) {
2466 # float red = [protocolor red];
2467 # float green = [protocolor green];
2468 # float blue = [protocolor blue];
2469 # FloatValue* alpha_wrapper = [protocolor alpha];
2470 # float alpha = 1.0;
2471 # if (alpha_wrapper != nil) {
2472 # alpha = [alpha_wrapper value];
2473 # }
2474 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2475 # }
2476 #
2477 # static Color* toProto(UIColor* color) {
2478 # CGFloat red, green, blue, alpha;
2479 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2480 # return nil;
2481 # }
2482 # Color* result = [Color alloc] init];
2483 # [result setRed:red];
2484 # [result setGreen:green];
2485 # [result setBlue:blue];
2486 # if (alpha <= 0.9999) {
2487 # [result setAlpha:floatWrapperWithValue(alpha)];
2488 # }
2489 # [result autorelease];
2490 # return result;
2491 # }
2492 # // ...
2493 #
2494 # Example (JavaScript):
2495 #
2496 # // ...
2497 #
2498 # var protoToCssColor = function(rgb_color) {
2499 # var redFrac = rgb_color.red || 0.0;
2500 # var greenFrac = rgb_color.green || 0.0;
2501 # var blueFrac = rgb_color.blue || 0.0;
2502 # var red = Math.floor(redFrac * 255);
2503 # var green = Math.floor(greenFrac * 255);
2504 # var blue = Math.floor(blueFrac * 255);
2505 #
2506 # if (!('alpha' in rgb_color)) {
2507 # return rgbToCssColor_(red, green, blue);
2508 # }
2509 #
2510 # var alphaFrac = rgb_color.alpha.value || 0.0;
2511 # var rgbParams = [red, green, blue].join(',');
2512 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2513 # };
2514 #
2515 # var rgbToCssColor_ = function(red, green, blue) {
2516 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2517 # var hexString = rgbNumber.toString(16);
2518 # var missingZeros = 6 - hexString.length;
2519 # var resultBuilder = ['#'];
2520 # for (var i = 0; i < missingZeros; i++) {
2521 # resultBuilder.push('0');
2522 # }
2523 # resultBuilder.push(hexString);
2524 # return resultBuilder.join('');
2525 # };
2526 #
2527 # // ...
2528 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2529 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2530 # the final pixel color is defined by the equation:
2531 #
2532 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2533 #
2534 # This means that a value of 1.0 corresponds to a solid color, whereas
2535 # a value of 0.0 corresponds to a completely transparent color. This
2536 # uses a wrapper message rather than a simple float scalar so that it is
2537 # possible to distinguish between a default value and the value being unset.
2538 # If omitted, this color object is to be rendered as a solid color
2539 # (as if the alpha value had been explicitly given with a value of 1.0).
2540 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2541 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2542 },
2543 "width": 42, # The width of the border, in pixels.
2544 # Deprecated; the width is determined by the "style" field.
2545 "style": "A String", # The style of the border.
2546 },
2547 "bottom": { # A border along a cell. # The bottom border of the cell.
2548 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2549 # for simplicity of conversion to/from color representations in various
2550 # languages over compactness; for example, the fields of this representation
2551 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2552 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2553 # method in iOS; and, with just a little work, it can be easily formatted into
2554 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2555 #
2556 # Example (Java):
2557 #
2558 # import com.google.type.Color;
2559 #
2560 # // ...
2561 # public static java.awt.Color fromProto(Color protocolor) {
2562 # float alpha = protocolor.hasAlpha()
2563 # ? protocolor.getAlpha().getValue()
2564 # : 1.0;
2565 #
2566 # return new java.awt.Color(
2567 # protocolor.getRed(),
2568 # protocolor.getGreen(),
2569 # protocolor.getBlue(),
2570 # alpha);
2571 # }
2572 #
2573 # public static Color toProto(java.awt.Color color) {
2574 # float red = (float) color.getRed();
2575 # float green = (float) color.getGreen();
2576 # float blue = (float) color.getBlue();
2577 # float denominator = 255.0;
2578 # Color.Builder resultBuilder =
2579 # Color
2580 # .newBuilder()
2581 # .setRed(red / denominator)
2582 # .setGreen(green / denominator)
2583 # .setBlue(blue / denominator);
2584 # int alpha = color.getAlpha();
2585 # if (alpha != 255) {
2586 # result.setAlpha(
2587 # FloatValue
2588 # .newBuilder()
2589 # .setValue(((float) alpha) / denominator)
2590 # .build());
2591 # }
2592 # return resultBuilder.build();
2593 # }
2594 # // ...
2595 #
2596 # Example (iOS / Obj-C):
2597 #
2598 # // ...
2599 # static UIColor* fromProto(Color* protocolor) {
2600 # float red = [protocolor red];
2601 # float green = [protocolor green];
2602 # float blue = [protocolor blue];
2603 # FloatValue* alpha_wrapper = [protocolor alpha];
2604 # float alpha = 1.0;
2605 # if (alpha_wrapper != nil) {
2606 # alpha = [alpha_wrapper value];
2607 # }
2608 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2609 # }
2610 #
2611 # static Color* toProto(UIColor* color) {
2612 # CGFloat red, green, blue, alpha;
2613 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2614 # return nil;
2615 # }
2616 # Color* result = [Color alloc] init];
2617 # [result setRed:red];
2618 # [result setGreen:green];
2619 # [result setBlue:blue];
2620 # if (alpha <= 0.9999) {
2621 # [result setAlpha:floatWrapperWithValue(alpha)];
2622 # }
2623 # [result autorelease];
2624 # return result;
2625 # }
2626 # // ...
2627 #
2628 # Example (JavaScript):
2629 #
2630 # // ...
2631 #
2632 # var protoToCssColor = function(rgb_color) {
2633 # var redFrac = rgb_color.red || 0.0;
2634 # var greenFrac = rgb_color.green || 0.0;
2635 # var blueFrac = rgb_color.blue || 0.0;
2636 # var red = Math.floor(redFrac * 255);
2637 # var green = Math.floor(greenFrac * 255);
2638 # var blue = Math.floor(blueFrac * 255);
2639 #
2640 # if (!('alpha' in rgb_color)) {
2641 # return rgbToCssColor_(red, green, blue);
2642 # }
2643 #
2644 # var alphaFrac = rgb_color.alpha.value || 0.0;
2645 # var rgbParams = [red, green, blue].join(',');
2646 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2647 # };
2648 #
2649 # var rgbToCssColor_ = function(red, green, blue) {
2650 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2651 # var hexString = rgbNumber.toString(16);
2652 # var missingZeros = 6 - hexString.length;
2653 # var resultBuilder = ['#'];
2654 # for (var i = 0; i < missingZeros; i++) {
2655 # resultBuilder.push('0');
2656 # }
2657 # resultBuilder.push(hexString);
2658 # return resultBuilder.join('');
2659 # };
2660 #
2661 # // ...
2662 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2663 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2664 # the final pixel color is defined by the equation:
2665 #
2666 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2667 #
2668 # This means that a value of 1.0 corresponds to a solid color, whereas
2669 # a value of 0.0 corresponds to a completely transparent color. This
2670 # uses a wrapper message rather than a simple float scalar so that it is
2671 # possible to distinguish between a default value and the value being unset.
2672 # If omitted, this color object is to be rendered as a solid color
2673 # (as if the alpha value had been explicitly given with a value of 1.0).
2674 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2675 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2676 },
2677 "width": 42, # The width of the border, in pixels.
2678 # Deprecated; the width is determined by the "style" field.
2679 "style": "A String", # The style of the border.
2680 },
2681 },
2682 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
2683 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002684 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
2685 # calculation. Absence of this field means that circular references will
2686 # result in calculation errors.
2687 # calculation.
2688 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
2689 # less than this threshold value, the calculation rounds stop.
2690 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
2691 # rounds to perform.
2692 },
2693 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
2694 # `America/New_York`. If the time zone isn't recognized, this may
2695 # be a custom time zone such as `GMT-07:00`.
2696 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002697 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002698 "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 -07002699 # inserting new rows into the sheet if necessary.
2700 "fields": "A String", # The fields of CellData that should be updated.
2701 # At least one field must be specified.
2702 # The root is the CellData; 'row.values.' should not be specified.
2703 # A single `"*"` can be used as short-hand for listing every field.
2704 "rows": [ # The data to append.
2705 { # Data about each cell in a row.
2706 "values": [ # The values in the row, one per column.
2707 { # Data about a specific cell.
2708 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
2709 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002710 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002711 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002712 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002713 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
2714 # or vertically (as rows).
2715 "rows": [ # Each row grouping in the pivot table.
2716 { # A single grouping (either row or column) in a pivot table.
2717 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
2718 "valueMetadata": [ # Metadata about values in the grouping.
2719 { # Metadata about a value in a pivot grouping.
2720 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
2721 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
2722 # (Note that formulaValue is not valid,
2723 # because the values will be calculated.)
2724 "numberValue": 3.14, # Represents a double value.
2725 # Note: Dates, Times and DateTimes are represented as doubles in
2726 # "serial number" format.
2727 "boolValue": True or False, # Represents a boolean value.
2728 "formulaValue": "A String", # Represents a formula.
2729 "stringValue": "A String", # Represents a string value.
2730 # Leading single quotes are not included. For example, if the user typed
2731 # `'123` into the UI, this would be represented as a `stringValue` of
2732 # `"123"`.
2733 "errorValue": { # An error in a cell. # Represents an error.
2734 # This field is read-only.
2735 "message": "A String", # A message with more information about the error
2736 # (in the spreadsheet's locale).
2737 "type": "A String", # The type of error.
2738 },
2739 },
2740 },
2741 ],
2742 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
2743 # If not specified, sorting is alphabetical by this group's values.
2744 "buckets": [ # Determines the bucket from which values are chosen to sort.
2745 #
2746 # For example, in a pivot table with one row group & two column groups,
2747 # the row group can list up to two values. The first value corresponds
2748 # to a value within the first column group, and the second value
2749 # corresponds to a value in the second column group. If no values
2750 # are listed, this would indicate that the row should be sorted according
2751 # to the "Grand Total" over the column groups. If a single value is listed,
2752 # this would correspond to using the "Total" of that bucket.
2753 { # The kinds of value that a cell in a spreadsheet can have.
2754 "numberValue": 3.14, # Represents a double value.
2755 # Note: Dates, Times and DateTimes are represented as doubles in
2756 # "serial number" format.
2757 "boolValue": True or False, # Represents a boolean value.
2758 "formulaValue": "A String", # Represents a formula.
2759 "stringValue": "A String", # Represents a string value.
2760 # Leading single quotes are not included. For example, if the user typed
2761 # `'123` into the UI, this would be represented as a `stringValue` of
2762 # `"123"`.
2763 "errorValue": { # An error in a cell. # Represents an error.
2764 # This field is read-only.
2765 "message": "A String", # A message with more information about the error
2766 # (in the spreadsheet's locale).
2767 "type": "A String", # The type of error.
2768 },
2769 },
2770 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002771 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002772 # grouping should be sorted by.
2773 },
2774 "sortOrder": "A String", # The order the values in this group should be sorted.
2775 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2776 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002777 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002778 # means this group refers to column `C`, whereas the offset `1` would refer
2779 # to column `D`.
2780 },
2781 ],
2782 "source": { # A range on a sheet. # The range the pivot table is reading data from.
2783 # All indexes are zero-based.
2784 # Indexes are half open, e.g the start index is inclusive
2785 # and the end index is exclusive -- [start_index, end_index).
2786 # Missing indexes indicate the range is unbounded on that side.
2787 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002788 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002789 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002790 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002791 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002792 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002793 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002794 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002795 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002796 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002797 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002798 # `Sheet1!A:B == sheet_id: 0,
2799 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002800 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002801 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002802 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002803 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002804 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002805 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002806 #
2807 # The start index must always be less than or equal to the end index.
2808 # If the start index equals the end index, then the range is empty.
2809 # Empty ranges are typically not meaningful and are usually rendered in the
2810 # UI as `#REF!`.
2811 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07002812 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002813 "sheetId": 42, # The sheet this range is on.
2814 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07002815 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002816 },
2817 "values": [ # A list of values to include in the pivot table.
2818 { # The definition of how a value in a pivot table should be calculated.
2819 "formula": "A String", # A custom formula to calculate the value. The formula must start
2820 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -07002821 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
2822 #
2823 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
2824 # means this value refers to column `C`, whereas the offset `1` would
2825 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002826 "summarizeFunction": "A String", # A function to summarize the value.
2827 # If formula is set, the only supported values are
2828 # SUM and
2829 # CUSTOM.
2830 # If sourceColumnOffset is set, then `CUSTOM`
2831 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002832 "name": "A String", # A name to use for the value. This is only used if formula was set.
2833 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002834 },
2835 ],
2836 "criteria": { # An optional mapping of filters per source column offset.
2837 #
2838 # The filters will be applied before aggregating data into the pivot table.
2839 # The map's key is the column offset of the source range that you want to
2840 # filter, and the value is the criteria for that column.
2841 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002842 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002843 # for column `C`, whereas the key `1` is for column `D`.
2844 "a_key": { # Criteria for showing/hiding rows in a pivot table.
2845 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
2846 "A String",
2847 ],
2848 },
2849 },
2850 "columns": [ # Each column grouping in the pivot table.
2851 { # A single grouping (either row or column) in a pivot table.
2852 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
2853 "valueMetadata": [ # Metadata about values in the grouping.
2854 { # Metadata about a value in a pivot grouping.
2855 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
2856 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
2857 # (Note that formulaValue is not valid,
2858 # because the values will be calculated.)
2859 "numberValue": 3.14, # Represents a double value.
2860 # Note: Dates, Times and DateTimes are represented as doubles in
2861 # "serial number" format.
2862 "boolValue": True or False, # Represents a boolean value.
2863 "formulaValue": "A String", # Represents a formula.
2864 "stringValue": "A String", # Represents a string value.
2865 # Leading single quotes are not included. For example, if the user typed
2866 # `'123` into the UI, this would be represented as a `stringValue` of
2867 # `"123"`.
2868 "errorValue": { # An error in a cell. # Represents an error.
2869 # This field is read-only.
2870 "message": "A String", # A message with more information about the error
2871 # (in the spreadsheet's locale).
2872 "type": "A String", # The type of error.
2873 },
2874 },
2875 },
2876 ],
2877 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
2878 # If not specified, sorting is alphabetical by this group's values.
2879 "buckets": [ # Determines the bucket from which values are chosen to sort.
2880 #
2881 # For example, in a pivot table with one row group & two column groups,
2882 # the row group can list up to two values. The first value corresponds
2883 # to a value within the first column group, and the second value
2884 # corresponds to a value in the second column group. If no values
2885 # are listed, this would indicate that the row should be sorted according
2886 # to the "Grand Total" over the column groups. If a single value is listed,
2887 # this would correspond to using the "Total" of that bucket.
2888 { # The kinds of value that a cell in a spreadsheet can have.
2889 "numberValue": 3.14, # Represents a double value.
2890 # Note: Dates, Times and DateTimes are represented as doubles in
2891 # "serial number" format.
2892 "boolValue": True or False, # Represents a boolean value.
2893 "formulaValue": "A String", # Represents a formula.
2894 "stringValue": "A String", # Represents a string value.
2895 # Leading single quotes are not included. For example, if the user typed
2896 # `'123` into the UI, this would be represented as a `stringValue` of
2897 # `"123"`.
2898 "errorValue": { # An error in a cell. # Represents an error.
2899 # This field is read-only.
2900 "message": "A String", # A message with more information about the error
2901 # (in the spreadsheet's locale).
2902 "type": "A String", # The type of error.
2903 },
2904 },
2905 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002906 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002907 # grouping should be sorted by.
2908 },
2909 "sortOrder": "A String", # The order the values in this group should be sorted.
2910 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2911 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002912 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002913 # means this group refers to column `C`, whereas the offset `1` would refer
2914 # to column `D`.
2915 },
2916 ],
2917 },
2918 "hyperlink": "A String", # A hyperlink this cell points to, if any.
2919 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
2920 "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
2921 # the calculated value. For cells with literals, this will be
2922 # the same as the user_entered_value.
2923 # This field is read-only.
2924 "numberValue": 3.14, # Represents a double value.
2925 # Note: Dates, Times and DateTimes are represented as doubles in
2926 # "serial number" format.
2927 "boolValue": True or False, # Represents a boolean value.
2928 "formulaValue": "A String", # Represents a formula.
2929 "stringValue": "A String", # Represents a string value.
2930 # Leading single quotes are not included. For example, if the user typed
2931 # `'123` into the UI, this would be represented as a `stringValue` of
2932 # `"123"`.
2933 "errorValue": { # An error in a cell. # Represents an error.
2934 # This field is read-only.
2935 "message": "A String", # A message with more information about the error
2936 # (in the spreadsheet's locale).
2937 "type": "A String", # The type of error.
2938 },
2939 },
2940 "formattedValue": "A String", # The formatted value of the cell.
2941 # This is the value as it's shown to the user.
2942 # This field is read-only.
2943 "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()`
2944 # Note: Dates, Times and DateTimes are represented as doubles in
2945 # serial number format.
2946 "numberValue": 3.14, # Represents a double value.
2947 # Note: Dates, Times and DateTimes are represented as doubles in
2948 # "serial number" format.
2949 "boolValue": True or False, # Represents a boolean value.
2950 "formulaValue": "A String", # Represents a formula.
2951 "stringValue": "A String", # Represents a string value.
2952 # Leading single quotes are not included. For example, if the user typed
2953 # `'123` into the UI, this would be represented as a `stringValue` of
2954 # `"123"`.
2955 "errorValue": { # An error in a cell. # Represents an error.
2956 # This field is read-only.
2957 "message": "A String", # A message with more information about the error
2958 # (in the spreadsheet's locale).
2959 "type": "A String", # The type of error.
2960 },
2961 },
2962 "note": "A String", # Any note on the cell.
2963 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
2964 # This includes the results of applying any conditional formatting and,
2965 # if the cell contains a formula, the computed number format.
2966 # If the effective format is the default format, effective format will
2967 # not be written.
2968 # This field is read-only.
2969 "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 -07002970 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2971 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002972 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002973 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002974 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002975 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002976 },
2977 "textDirection": "A String", # The direction of the text in the cell.
2978 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2979 # When updating padding, every field must be specified.
2980 "top": 42, # The top padding of the cell.
2981 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002982 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002983 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002984 },
Thomas Coffee2f245372017-03-27 10:39:26 -07002985 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002986 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2987 # for simplicity of conversion to/from color representations in various
2988 # languages over compactness; for example, the fields of this representation
2989 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2990 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2991 # method in iOS; and, with just a little work, it can be easily formatted into
2992 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2993 #
2994 # Example (Java):
2995 #
2996 # import com.google.type.Color;
2997 #
2998 # // ...
2999 # public static java.awt.Color fromProto(Color protocolor) {
3000 # float alpha = protocolor.hasAlpha()
3001 # ? protocolor.getAlpha().getValue()
3002 # : 1.0;
3003 #
3004 # return new java.awt.Color(
3005 # protocolor.getRed(),
3006 # protocolor.getGreen(),
3007 # protocolor.getBlue(),
3008 # alpha);
3009 # }
3010 #
3011 # public static Color toProto(java.awt.Color color) {
3012 # float red = (float) color.getRed();
3013 # float green = (float) color.getGreen();
3014 # float blue = (float) color.getBlue();
3015 # float denominator = 255.0;
3016 # Color.Builder resultBuilder =
3017 # Color
3018 # .newBuilder()
3019 # .setRed(red / denominator)
3020 # .setGreen(green / denominator)
3021 # .setBlue(blue / denominator);
3022 # int alpha = color.getAlpha();
3023 # if (alpha != 255) {
3024 # result.setAlpha(
3025 # FloatValue
3026 # .newBuilder()
3027 # .setValue(((float) alpha) / denominator)
3028 # .build());
3029 # }
3030 # return resultBuilder.build();
3031 # }
3032 # // ...
3033 #
3034 # Example (iOS / Obj-C):
3035 #
3036 # // ...
3037 # static UIColor* fromProto(Color* protocolor) {
3038 # float red = [protocolor red];
3039 # float green = [protocolor green];
3040 # float blue = [protocolor blue];
3041 # FloatValue* alpha_wrapper = [protocolor alpha];
3042 # float alpha = 1.0;
3043 # if (alpha_wrapper != nil) {
3044 # alpha = [alpha_wrapper value];
3045 # }
3046 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3047 # }
3048 #
3049 # static Color* toProto(UIColor* color) {
3050 # CGFloat red, green, blue, alpha;
3051 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3052 # return nil;
3053 # }
3054 # Color* result = [Color alloc] init];
3055 # [result setRed:red];
3056 # [result setGreen:green];
3057 # [result setBlue:blue];
3058 # if (alpha <= 0.9999) {
3059 # [result setAlpha:floatWrapperWithValue(alpha)];
3060 # }
3061 # [result autorelease];
3062 # return result;
3063 # }
3064 # // ...
3065 #
3066 # Example (JavaScript):
3067 #
3068 # // ...
3069 #
3070 # var protoToCssColor = function(rgb_color) {
3071 # var redFrac = rgb_color.red || 0.0;
3072 # var greenFrac = rgb_color.green || 0.0;
3073 # var blueFrac = rgb_color.blue || 0.0;
3074 # var red = Math.floor(redFrac * 255);
3075 # var green = Math.floor(greenFrac * 255);
3076 # var blue = Math.floor(blueFrac * 255);
3077 #
3078 # if (!('alpha' in rgb_color)) {
3079 # return rgbToCssColor_(red, green, blue);
3080 # }
3081 #
3082 # var alphaFrac = rgb_color.alpha.value || 0.0;
3083 # var rgbParams = [red, green, blue].join(',');
3084 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3085 # };
3086 #
3087 # var rgbToCssColor_ = function(red, green, blue) {
3088 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3089 # var hexString = rgbNumber.toString(16);
3090 # var missingZeros = 6 - hexString.length;
3091 # var resultBuilder = ['#'];
3092 # for (var i = 0; i < missingZeros; i++) {
3093 # resultBuilder.push('0');
3094 # }
3095 # resultBuilder.push(hexString);
3096 # return resultBuilder.join('');
3097 # };
3098 #
3099 # // ...
3100 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3101 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3102 # the final pixel color is defined by the equation:
3103 #
3104 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3105 #
3106 # This means that a value of 1.0 corresponds to a solid color, whereas
3107 # a value of 0.0 corresponds to a completely transparent color. This
3108 # uses a wrapper message rather than a simple float scalar so that it is
3109 # possible to distinguish between a default value and the value being unset.
3110 # If omitted, this color object is to be rendered as a solid color
3111 # (as if the alpha value had been explicitly given with a value of 1.0).
3112 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3113 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3114 },
Thomas Coffee2f245372017-03-27 10:39:26 -07003115 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003116 "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).
3117 # Absent values indicate that the field isn't specified.
3118 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3119 # for simplicity of conversion to/from color representations in various
3120 # languages over compactness; for example, the fields of this representation
3121 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3122 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3123 # method in iOS; and, with just a little work, it can be easily formatted into
3124 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3125 #
3126 # Example (Java):
3127 #
3128 # import com.google.type.Color;
3129 #
3130 # // ...
3131 # public static java.awt.Color fromProto(Color protocolor) {
3132 # float alpha = protocolor.hasAlpha()
3133 # ? protocolor.getAlpha().getValue()
3134 # : 1.0;
3135 #
3136 # return new java.awt.Color(
3137 # protocolor.getRed(),
3138 # protocolor.getGreen(),
3139 # protocolor.getBlue(),
3140 # alpha);
3141 # }
3142 #
3143 # public static Color toProto(java.awt.Color color) {
3144 # float red = (float) color.getRed();
3145 # float green = (float) color.getGreen();
3146 # float blue = (float) color.getBlue();
3147 # float denominator = 255.0;
3148 # Color.Builder resultBuilder =
3149 # Color
3150 # .newBuilder()
3151 # .setRed(red / denominator)
3152 # .setGreen(green / denominator)
3153 # .setBlue(blue / denominator);
3154 # int alpha = color.getAlpha();
3155 # if (alpha != 255) {
3156 # result.setAlpha(
3157 # FloatValue
3158 # .newBuilder()
3159 # .setValue(((float) alpha) / denominator)
3160 # .build());
3161 # }
3162 # return resultBuilder.build();
3163 # }
3164 # // ...
3165 #
3166 # Example (iOS / Obj-C):
3167 #
3168 # // ...
3169 # static UIColor* fromProto(Color* protocolor) {
3170 # float red = [protocolor red];
3171 # float green = [protocolor green];
3172 # float blue = [protocolor blue];
3173 # FloatValue* alpha_wrapper = [protocolor alpha];
3174 # float alpha = 1.0;
3175 # if (alpha_wrapper != nil) {
3176 # alpha = [alpha_wrapper value];
3177 # }
3178 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3179 # }
3180 #
3181 # static Color* toProto(UIColor* color) {
3182 # CGFloat red, green, blue, alpha;
3183 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3184 # return nil;
3185 # }
3186 # Color* result = [Color alloc] init];
3187 # [result setRed:red];
3188 # [result setGreen:green];
3189 # [result setBlue:blue];
3190 # if (alpha <= 0.9999) {
3191 # [result setAlpha:floatWrapperWithValue(alpha)];
3192 # }
3193 # [result autorelease];
3194 # return result;
3195 # }
3196 # // ...
3197 #
3198 # Example (JavaScript):
3199 #
3200 # // ...
3201 #
3202 # var protoToCssColor = function(rgb_color) {
3203 # var redFrac = rgb_color.red || 0.0;
3204 # var greenFrac = rgb_color.green || 0.0;
3205 # var blueFrac = rgb_color.blue || 0.0;
3206 # var red = Math.floor(redFrac * 255);
3207 # var green = Math.floor(greenFrac * 255);
3208 # var blue = Math.floor(blueFrac * 255);
3209 #
3210 # if (!('alpha' in rgb_color)) {
3211 # return rgbToCssColor_(red, green, blue);
3212 # }
3213 #
3214 # var alphaFrac = rgb_color.alpha.value || 0.0;
3215 # var rgbParams = [red, green, blue].join(',');
3216 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3217 # };
3218 #
3219 # var rgbToCssColor_ = function(red, green, blue) {
3220 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3221 # var hexString = rgbNumber.toString(16);
3222 # var missingZeros = 6 - hexString.length;
3223 # var resultBuilder = ['#'];
3224 # for (var i = 0; i < missingZeros; i++) {
3225 # resultBuilder.push('0');
3226 # }
3227 # resultBuilder.push(hexString);
3228 # return resultBuilder.join('');
3229 # };
3230 #
3231 # // ...
3232 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3233 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3234 # the final pixel color is defined by the equation:
3235 #
3236 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3237 #
3238 # This means that a value of 1.0 corresponds to a solid color, whereas
3239 # a value of 0.0 corresponds to a completely transparent color. This
3240 # uses a wrapper message rather than a simple float scalar so that it is
3241 # possible to distinguish between a default value and the value being unset.
3242 # If omitted, this color object is to be rendered as a solid color
3243 # (as if the alpha value had been explicitly given with a value of 1.0).
3244 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3245 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3246 },
3247 "bold": True or False, # True if the text is bold.
3248 "strikethrough": True or False, # True if the text has a strikethrough.
3249 "fontFamily": "A String", # The font family.
3250 "fontSize": 42, # The size of the font.
3251 "italic": True or False, # True if the text is italicized.
3252 "underline": True or False, # True if the text is underlined.
3253 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07003254 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
3255 "angle": 42, # The angle between the standard orientation and the desired orientation.
3256 # Measured in degrees. Valid values are between -90 and 90. Positive
3257 # angles are angled upwards, negative are angled downwards.
3258 #
3259 # Note: For LTR text direction positive angles are in the counterclockwise
3260 # direction, whereas for RTL they are in the clockwise direction
3261 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
3262 # characters is unchanged.
3263 # For example:
3264 #
3265 # | V |
3266 # | e |
3267 # | r |
3268 # | t |
3269 # | i |
3270 # | c |
3271 # | a |
3272 # | l |
3273 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003274 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
3275 "borders": { # The borders of the cell. # The borders of the cell.
3276 "top": { # A border along a cell. # The top border of the cell.
3277 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3278 # for simplicity of conversion to/from color representations in various
3279 # languages over compactness; for example, the fields of this representation
3280 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3281 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3282 # method in iOS; and, with just a little work, it can be easily formatted into
3283 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3284 #
3285 # Example (Java):
3286 #
3287 # import com.google.type.Color;
3288 #
3289 # // ...
3290 # public static java.awt.Color fromProto(Color protocolor) {
3291 # float alpha = protocolor.hasAlpha()
3292 # ? protocolor.getAlpha().getValue()
3293 # : 1.0;
3294 #
3295 # return new java.awt.Color(
3296 # protocolor.getRed(),
3297 # protocolor.getGreen(),
3298 # protocolor.getBlue(),
3299 # alpha);
3300 # }
3301 #
3302 # public static Color toProto(java.awt.Color color) {
3303 # float red = (float) color.getRed();
3304 # float green = (float) color.getGreen();
3305 # float blue = (float) color.getBlue();
3306 # float denominator = 255.0;
3307 # Color.Builder resultBuilder =
3308 # Color
3309 # .newBuilder()
3310 # .setRed(red / denominator)
3311 # .setGreen(green / denominator)
3312 # .setBlue(blue / denominator);
3313 # int alpha = color.getAlpha();
3314 # if (alpha != 255) {
3315 # result.setAlpha(
3316 # FloatValue
3317 # .newBuilder()
3318 # .setValue(((float) alpha) / denominator)
3319 # .build());
3320 # }
3321 # return resultBuilder.build();
3322 # }
3323 # // ...
3324 #
3325 # Example (iOS / Obj-C):
3326 #
3327 # // ...
3328 # static UIColor* fromProto(Color* protocolor) {
3329 # float red = [protocolor red];
3330 # float green = [protocolor green];
3331 # float blue = [protocolor blue];
3332 # FloatValue* alpha_wrapper = [protocolor alpha];
3333 # float alpha = 1.0;
3334 # if (alpha_wrapper != nil) {
3335 # alpha = [alpha_wrapper value];
3336 # }
3337 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3338 # }
3339 #
3340 # static Color* toProto(UIColor* color) {
3341 # CGFloat red, green, blue, alpha;
3342 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3343 # return nil;
3344 # }
3345 # Color* result = [Color alloc] init];
3346 # [result setRed:red];
3347 # [result setGreen:green];
3348 # [result setBlue:blue];
3349 # if (alpha <= 0.9999) {
3350 # [result setAlpha:floatWrapperWithValue(alpha)];
3351 # }
3352 # [result autorelease];
3353 # return result;
3354 # }
3355 # // ...
3356 #
3357 # Example (JavaScript):
3358 #
3359 # // ...
3360 #
3361 # var protoToCssColor = function(rgb_color) {
3362 # var redFrac = rgb_color.red || 0.0;
3363 # var greenFrac = rgb_color.green || 0.0;
3364 # var blueFrac = rgb_color.blue || 0.0;
3365 # var red = Math.floor(redFrac * 255);
3366 # var green = Math.floor(greenFrac * 255);
3367 # var blue = Math.floor(blueFrac * 255);
3368 #
3369 # if (!('alpha' in rgb_color)) {
3370 # return rgbToCssColor_(red, green, blue);
3371 # }
3372 #
3373 # var alphaFrac = rgb_color.alpha.value || 0.0;
3374 # var rgbParams = [red, green, blue].join(',');
3375 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3376 # };
3377 #
3378 # var rgbToCssColor_ = function(red, green, blue) {
3379 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3380 # var hexString = rgbNumber.toString(16);
3381 # var missingZeros = 6 - hexString.length;
3382 # var resultBuilder = ['#'];
3383 # for (var i = 0; i < missingZeros; i++) {
3384 # resultBuilder.push('0');
3385 # }
3386 # resultBuilder.push(hexString);
3387 # return resultBuilder.join('');
3388 # };
3389 #
3390 # // ...
3391 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3392 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3393 # the final pixel color is defined by the equation:
3394 #
3395 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3396 #
3397 # This means that a value of 1.0 corresponds to a solid color, whereas
3398 # a value of 0.0 corresponds to a completely transparent color. This
3399 # uses a wrapper message rather than a simple float scalar so that it is
3400 # possible to distinguish between a default value and the value being unset.
3401 # If omitted, this color object is to be rendered as a solid color
3402 # (as if the alpha value had been explicitly given with a value of 1.0).
3403 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3404 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3405 },
3406 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003407 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003408 "style": "A String", # The style of the border.
3409 },
3410 "right": { # A border along a cell. # The right border of the cell.
3411 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3412 # for simplicity of conversion to/from color representations in various
3413 # languages over compactness; for example, the fields of this representation
3414 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3415 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3416 # method in iOS; and, with just a little work, it can be easily formatted into
3417 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3418 #
3419 # Example (Java):
3420 #
3421 # import com.google.type.Color;
3422 #
3423 # // ...
3424 # public static java.awt.Color fromProto(Color protocolor) {
3425 # float alpha = protocolor.hasAlpha()
3426 # ? protocolor.getAlpha().getValue()
3427 # : 1.0;
3428 #
3429 # return new java.awt.Color(
3430 # protocolor.getRed(),
3431 # protocolor.getGreen(),
3432 # protocolor.getBlue(),
3433 # alpha);
3434 # }
3435 #
3436 # public static Color toProto(java.awt.Color color) {
3437 # float red = (float) color.getRed();
3438 # float green = (float) color.getGreen();
3439 # float blue = (float) color.getBlue();
3440 # float denominator = 255.0;
3441 # Color.Builder resultBuilder =
3442 # Color
3443 # .newBuilder()
3444 # .setRed(red / denominator)
3445 # .setGreen(green / denominator)
3446 # .setBlue(blue / denominator);
3447 # int alpha = color.getAlpha();
3448 # if (alpha != 255) {
3449 # result.setAlpha(
3450 # FloatValue
3451 # .newBuilder()
3452 # .setValue(((float) alpha) / denominator)
3453 # .build());
3454 # }
3455 # return resultBuilder.build();
3456 # }
3457 # // ...
3458 #
3459 # Example (iOS / Obj-C):
3460 #
3461 # // ...
3462 # static UIColor* fromProto(Color* protocolor) {
3463 # float red = [protocolor red];
3464 # float green = [protocolor green];
3465 # float blue = [protocolor blue];
3466 # FloatValue* alpha_wrapper = [protocolor alpha];
3467 # float alpha = 1.0;
3468 # if (alpha_wrapper != nil) {
3469 # alpha = [alpha_wrapper value];
3470 # }
3471 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3472 # }
3473 #
3474 # static Color* toProto(UIColor* color) {
3475 # CGFloat red, green, blue, alpha;
3476 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3477 # return nil;
3478 # }
3479 # Color* result = [Color alloc] init];
3480 # [result setRed:red];
3481 # [result setGreen:green];
3482 # [result setBlue:blue];
3483 # if (alpha <= 0.9999) {
3484 # [result setAlpha:floatWrapperWithValue(alpha)];
3485 # }
3486 # [result autorelease];
3487 # return result;
3488 # }
3489 # // ...
3490 #
3491 # Example (JavaScript):
3492 #
3493 # // ...
3494 #
3495 # var protoToCssColor = function(rgb_color) {
3496 # var redFrac = rgb_color.red || 0.0;
3497 # var greenFrac = rgb_color.green || 0.0;
3498 # var blueFrac = rgb_color.blue || 0.0;
3499 # var red = Math.floor(redFrac * 255);
3500 # var green = Math.floor(greenFrac * 255);
3501 # var blue = Math.floor(blueFrac * 255);
3502 #
3503 # if (!('alpha' in rgb_color)) {
3504 # return rgbToCssColor_(red, green, blue);
3505 # }
3506 #
3507 # var alphaFrac = rgb_color.alpha.value || 0.0;
3508 # var rgbParams = [red, green, blue].join(',');
3509 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3510 # };
3511 #
3512 # var rgbToCssColor_ = function(red, green, blue) {
3513 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3514 # var hexString = rgbNumber.toString(16);
3515 # var missingZeros = 6 - hexString.length;
3516 # var resultBuilder = ['#'];
3517 # for (var i = 0; i < missingZeros; i++) {
3518 # resultBuilder.push('0');
3519 # }
3520 # resultBuilder.push(hexString);
3521 # return resultBuilder.join('');
3522 # };
3523 #
3524 # // ...
3525 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3526 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3527 # the final pixel color is defined by the equation:
3528 #
3529 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3530 #
3531 # This means that a value of 1.0 corresponds to a solid color, whereas
3532 # a value of 0.0 corresponds to a completely transparent color. This
3533 # uses a wrapper message rather than a simple float scalar so that it is
3534 # possible to distinguish between a default value and the value being unset.
3535 # If omitted, this color object is to be rendered as a solid color
3536 # (as if the alpha value had been explicitly given with a value of 1.0).
3537 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3538 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3539 },
3540 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003541 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003542 "style": "A String", # The style of the border.
3543 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003544 "left": { # A border along a cell. # The left border of the cell.
3545 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3546 # for simplicity of conversion to/from color representations in various
3547 # languages over compactness; for example, the fields of this representation
3548 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3549 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3550 # method in iOS; and, with just a little work, it can be easily formatted into
3551 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3552 #
3553 # Example (Java):
3554 #
3555 # import com.google.type.Color;
3556 #
3557 # // ...
3558 # public static java.awt.Color fromProto(Color protocolor) {
3559 # float alpha = protocolor.hasAlpha()
3560 # ? protocolor.getAlpha().getValue()
3561 # : 1.0;
3562 #
3563 # return new java.awt.Color(
3564 # protocolor.getRed(),
3565 # protocolor.getGreen(),
3566 # protocolor.getBlue(),
3567 # alpha);
3568 # }
3569 #
3570 # public static Color toProto(java.awt.Color color) {
3571 # float red = (float) color.getRed();
3572 # float green = (float) color.getGreen();
3573 # float blue = (float) color.getBlue();
3574 # float denominator = 255.0;
3575 # Color.Builder resultBuilder =
3576 # Color
3577 # .newBuilder()
3578 # .setRed(red / denominator)
3579 # .setGreen(green / denominator)
3580 # .setBlue(blue / denominator);
3581 # int alpha = color.getAlpha();
3582 # if (alpha != 255) {
3583 # result.setAlpha(
3584 # FloatValue
3585 # .newBuilder()
3586 # .setValue(((float) alpha) / denominator)
3587 # .build());
3588 # }
3589 # return resultBuilder.build();
3590 # }
3591 # // ...
3592 #
3593 # Example (iOS / Obj-C):
3594 #
3595 # // ...
3596 # static UIColor* fromProto(Color* protocolor) {
3597 # float red = [protocolor red];
3598 # float green = [protocolor green];
3599 # float blue = [protocolor blue];
3600 # FloatValue* alpha_wrapper = [protocolor alpha];
3601 # float alpha = 1.0;
3602 # if (alpha_wrapper != nil) {
3603 # alpha = [alpha_wrapper value];
3604 # }
3605 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3606 # }
3607 #
3608 # static Color* toProto(UIColor* color) {
3609 # CGFloat red, green, blue, alpha;
3610 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3611 # return nil;
3612 # }
3613 # Color* result = [Color alloc] init];
3614 # [result setRed:red];
3615 # [result setGreen:green];
3616 # [result setBlue:blue];
3617 # if (alpha <= 0.9999) {
3618 # [result setAlpha:floatWrapperWithValue(alpha)];
3619 # }
3620 # [result autorelease];
3621 # return result;
3622 # }
3623 # // ...
3624 #
3625 # Example (JavaScript):
3626 #
3627 # // ...
3628 #
3629 # var protoToCssColor = function(rgb_color) {
3630 # var redFrac = rgb_color.red || 0.0;
3631 # var greenFrac = rgb_color.green || 0.0;
3632 # var blueFrac = rgb_color.blue || 0.0;
3633 # var red = Math.floor(redFrac * 255);
3634 # var green = Math.floor(greenFrac * 255);
3635 # var blue = Math.floor(blueFrac * 255);
3636 #
3637 # if (!('alpha' in rgb_color)) {
3638 # return rgbToCssColor_(red, green, blue);
3639 # }
3640 #
3641 # var alphaFrac = rgb_color.alpha.value || 0.0;
3642 # var rgbParams = [red, green, blue].join(',');
3643 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3644 # };
3645 #
3646 # var rgbToCssColor_ = function(red, green, blue) {
3647 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3648 # var hexString = rgbNumber.toString(16);
3649 # var missingZeros = 6 - hexString.length;
3650 # var resultBuilder = ['#'];
3651 # for (var i = 0; i < missingZeros; i++) {
3652 # resultBuilder.push('0');
3653 # }
3654 # resultBuilder.push(hexString);
3655 # return resultBuilder.join('');
3656 # };
3657 #
3658 # // ...
3659 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3660 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3661 # the final pixel color is defined by the equation:
3662 #
3663 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3664 #
3665 # This means that a value of 1.0 corresponds to a solid color, whereas
3666 # a value of 0.0 corresponds to a completely transparent color. This
3667 # uses a wrapper message rather than a simple float scalar so that it is
3668 # possible to distinguish between a default value and the value being unset.
3669 # If omitted, this color object is to be rendered as a solid color
3670 # (as if the alpha value had been explicitly given with a value of 1.0).
3671 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3672 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3673 },
3674 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003675 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003676 "style": "A String", # The style of the border.
3677 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07003678 "bottom": { # A border along a cell. # The bottom border of the cell.
3679 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3680 # for simplicity of conversion to/from color representations in various
3681 # languages over compactness; for example, the fields of this representation
3682 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3683 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3684 # method in iOS; and, with just a little work, it can be easily formatted into
3685 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3686 #
3687 # Example (Java):
3688 #
3689 # import com.google.type.Color;
3690 #
3691 # // ...
3692 # public static java.awt.Color fromProto(Color protocolor) {
3693 # float alpha = protocolor.hasAlpha()
3694 # ? protocolor.getAlpha().getValue()
3695 # : 1.0;
3696 #
3697 # return new java.awt.Color(
3698 # protocolor.getRed(),
3699 # protocolor.getGreen(),
3700 # protocolor.getBlue(),
3701 # alpha);
3702 # }
3703 #
3704 # public static Color toProto(java.awt.Color color) {
3705 # float red = (float) color.getRed();
3706 # float green = (float) color.getGreen();
3707 # float blue = (float) color.getBlue();
3708 # float denominator = 255.0;
3709 # Color.Builder resultBuilder =
3710 # Color
3711 # .newBuilder()
3712 # .setRed(red / denominator)
3713 # .setGreen(green / denominator)
3714 # .setBlue(blue / denominator);
3715 # int alpha = color.getAlpha();
3716 # if (alpha != 255) {
3717 # result.setAlpha(
3718 # FloatValue
3719 # .newBuilder()
3720 # .setValue(((float) alpha) / denominator)
3721 # .build());
3722 # }
3723 # return resultBuilder.build();
3724 # }
3725 # // ...
3726 #
3727 # Example (iOS / Obj-C):
3728 #
3729 # // ...
3730 # static UIColor* fromProto(Color* protocolor) {
3731 # float red = [protocolor red];
3732 # float green = [protocolor green];
3733 # float blue = [protocolor blue];
3734 # FloatValue* alpha_wrapper = [protocolor alpha];
3735 # float alpha = 1.0;
3736 # if (alpha_wrapper != nil) {
3737 # alpha = [alpha_wrapper value];
3738 # }
3739 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3740 # }
3741 #
3742 # static Color* toProto(UIColor* color) {
3743 # CGFloat red, green, blue, alpha;
3744 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3745 # return nil;
3746 # }
3747 # Color* result = [Color alloc] init];
3748 # [result setRed:red];
3749 # [result setGreen:green];
3750 # [result setBlue:blue];
3751 # if (alpha <= 0.9999) {
3752 # [result setAlpha:floatWrapperWithValue(alpha)];
3753 # }
3754 # [result autorelease];
3755 # return result;
3756 # }
3757 # // ...
3758 #
3759 # Example (JavaScript):
3760 #
3761 # // ...
3762 #
3763 # var protoToCssColor = function(rgb_color) {
3764 # var redFrac = rgb_color.red || 0.0;
3765 # var greenFrac = rgb_color.green || 0.0;
3766 # var blueFrac = rgb_color.blue || 0.0;
3767 # var red = Math.floor(redFrac * 255);
3768 # var green = Math.floor(greenFrac * 255);
3769 # var blue = Math.floor(blueFrac * 255);
3770 #
3771 # if (!('alpha' in rgb_color)) {
3772 # return rgbToCssColor_(red, green, blue);
3773 # }
3774 #
3775 # var alphaFrac = rgb_color.alpha.value || 0.0;
3776 # var rgbParams = [red, green, blue].join(',');
3777 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3778 # };
3779 #
3780 # var rgbToCssColor_ = function(red, green, blue) {
3781 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3782 # var hexString = rgbNumber.toString(16);
3783 # var missingZeros = 6 - hexString.length;
3784 # var resultBuilder = ['#'];
3785 # for (var i = 0; i < missingZeros; i++) {
3786 # resultBuilder.push('0');
3787 # }
3788 # resultBuilder.push(hexString);
3789 # return resultBuilder.join('');
3790 # };
3791 #
3792 # // ...
3793 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3794 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3795 # the final pixel color is defined by the equation:
3796 #
3797 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3798 #
3799 # This means that a value of 1.0 corresponds to a solid color, whereas
3800 # a value of 0.0 corresponds to a completely transparent color. This
3801 # uses a wrapper message rather than a simple float scalar so that it is
3802 # possible to distinguish between a default value and the value being unset.
3803 # If omitted, this color object is to be rendered as a solid color
3804 # (as if the alpha value had been explicitly given with a value of 1.0).
3805 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3806 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3807 },
3808 "width": 42, # The width of the border, in pixels.
3809 # Deprecated; the width is determined by the "style" field.
3810 "style": "A String", # The style of the border.
3811 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003812 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07003813 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003814 },
3815 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
3816 #
3817 # When writing, the new format will be merged with the existing format.
3818 "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 -07003819 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
3820 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003821 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07003822 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003823 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003824 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003825 },
3826 "textDirection": "A String", # The direction of the text in the cell.
3827 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
3828 # When updating padding, every field must be specified.
3829 "top": 42, # The top padding of the cell.
3830 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003831 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003832 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003833 },
Thomas Coffee2f245372017-03-27 10:39:26 -07003834 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003835 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
3836 # for simplicity of conversion to/from color representations in various
3837 # languages over compactness; for example, the fields of this representation
3838 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3839 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3840 # method in iOS; and, with just a little work, it can be easily formatted into
3841 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3842 #
3843 # Example (Java):
3844 #
3845 # import com.google.type.Color;
3846 #
3847 # // ...
3848 # public static java.awt.Color fromProto(Color protocolor) {
3849 # float alpha = protocolor.hasAlpha()
3850 # ? protocolor.getAlpha().getValue()
3851 # : 1.0;
3852 #
3853 # return new java.awt.Color(
3854 # protocolor.getRed(),
3855 # protocolor.getGreen(),
3856 # protocolor.getBlue(),
3857 # alpha);
3858 # }
3859 #
3860 # public static Color toProto(java.awt.Color color) {
3861 # float red = (float) color.getRed();
3862 # float green = (float) color.getGreen();
3863 # float blue = (float) color.getBlue();
3864 # float denominator = 255.0;
3865 # Color.Builder resultBuilder =
3866 # Color
3867 # .newBuilder()
3868 # .setRed(red / denominator)
3869 # .setGreen(green / denominator)
3870 # .setBlue(blue / denominator);
3871 # int alpha = color.getAlpha();
3872 # if (alpha != 255) {
3873 # result.setAlpha(
3874 # FloatValue
3875 # .newBuilder()
3876 # .setValue(((float) alpha) / denominator)
3877 # .build());
3878 # }
3879 # return resultBuilder.build();
3880 # }
3881 # // ...
3882 #
3883 # Example (iOS / Obj-C):
3884 #
3885 # // ...
3886 # static UIColor* fromProto(Color* protocolor) {
3887 # float red = [protocolor red];
3888 # float green = [protocolor green];
3889 # float blue = [protocolor blue];
3890 # FloatValue* alpha_wrapper = [protocolor alpha];
3891 # float alpha = 1.0;
3892 # if (alpha_wrapper != nil) {
3893 # alpha = [alpha_wrapper value];
3894 # }
3895 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3896 # }
3897 #
3898 # static Color* toProto(UIColor* color) {
3899 # CGFloat red, green, blue, alpha;
3900 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3901 # return nil;
3902 # }
3903 # Color* result = [Color alloc] init];
3904 # [result setRed:red];
3905 # [result setGreen:green];
3906 # [result setBlue:blue];
3907 # if (alpha <= 0.9999) {
3908 # [result setAlpha:floatWrapperWithValue(alpha)];
3909 # }
3910 # [result autorelease];
3911 # return result;
3912 # }
3913 # // ...
3914 #
3915 # Example (JavaScript):
3916 #
3917 # // ...
3918 #
3919 # var protoToCssColor = function(rgb_color) {
3920 # var redFrac = rgb_color.red || 0.0;
3921 # var greenFrac = rgb_color.green || 0.0;
3922 # var blueFrac = rgb_color.blue || 0.0;
3923 # var red = Math.floor(redFrac * 255);
3924 # var green = Math.floor(greenFrac * 255);
3925 # var blue = Math.floor(blueFrac * 255);
3926 #
3927 # if (!('alpha' in rgb_color)) {
3928 # return rgbToCssColor_(red, green, blue);
3929 # }
3930 #
3931 # var alphaFrac = rgb_color.alpha.value || 0.0;
3932 # var rgbParams = [red, green, blue].join(',');
3933 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3934 # };
3935 #
3936 # var rgbToCssColor_ = function(red, green, blue) {
3937 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3938 # var hexString = rgbNumber.toString(16);
3939 # var missingZeros = 6 - hexString.length;
3940 # var resultBuilder = ['#'];
3941 # for (var i = 0; i < missingZeros; i++) {
3942 # resultBuilder.push('0');
3943 # }
3944 # resultBuilder.push(hexString);
3945 # return resultBuilder.join('');
3946 # };
3947 #
3948 # // ...
3949 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3950 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3951 # the final pixel color is defined by the equation:
3952 #
3953 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3954 #
3955 # This means that a value of 1.0 corresponds to a solid color, whereas
3956 # a value of 0.0 corresponds to a completely transparent color. This
3957 # uses a wrapper message rather than a simple float scalar so that it is
3958 # possible to distinguish between a default value and the value being unset.
3959 # If omitted, this color object is to be rendered as a solid color
3960 # (as if the alpha value had been explicitly given with a value of 1.0).
3961 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3962 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3963 },
Thomas Coffee2f245372017-03-27 10:39:26 -07003964 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003965 "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).
3966 # Absent values indicate that the field isn't specified.
3967 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3968 # for simplicity of conversion to/from color representations in various
3969 # languages over compactness; for example, the fields of this representation
3970 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3971 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3972 # method in iOS; and, with just a little work, it can be easily formatted into
3973 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3974 #
3975 # Example (Java):
3976 #
3977 # import com.google.type.Color;
3978 #
3979 # // ...
3980 # public static java.awt.Color fromProto(Color protocolor) {
3981 # float alpha = protocolor.hasAlpha()
3982 # ? protocolor.getAlpha().getValue()
3983 # : 1.0;
3984 #
3985 # return new java.awt.Color(
3986 # protocolor.getRed(),
3987 # protocolor.getGreen(),
3988 # protocolor.getBlue(),
3989 # alpha);
3990 # }
3991 #
3992 # public static Color toProto(java.awt.Color color) {
3993 # float red = (float) color.getRed();
3994 # float green = (float) color.getGreen();
3995 # float blue = (float) color.getBlue();
3996 # float denominator = 255.0;
3997 # Color.Builder resultBuilder =
3998 # Color
3999 # .newBuilder()
4000 # .setRed(red / denominator)
4001 # .setGreen(green / denominator)
4002 # .setBlue(blue / denominator);
4003 # int alpha = color.getAlpha();
4004 # if (alpha != 255) {
4005 # result.setAlpha(
4006 # FloatValue
4007 # .newBuilder()
4008 # .setValue(((float) alpha) / denominator)
4009 # .build());
4010 # }
4011 # return resultBuilder.build();
4012 # }
4013 # // ...
4014 #
4015 # Example (iOS / Obj-C):
4016 #
4017 # // ...
4018 # static UIColor* fromProto(Color* protocolor) {
4019 # float red = [protocolor red];
4020 # float green = [protocolor green];
4021 # float blue = [protocolor blue];
4022 # FloatValue* alpha_wrapper = [protocolor alpha];
4023 # float alpha = 1.0;
4024 # if (alpha_wrapper != nil) {
4025 # alpha = [alpha_wrapper value];
4026 # }
4027 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4028 # }
4029 #
4030 # static Color* toProto(UIColor* color) {
4031 # CGFloat red, green, blue, alpha;
4032 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4033 # return nil;
4034 # }
4035 # Color* result = [Color alloc] init];
4036 # [result setRed:red];
4037 # [result setGreen:green];
4038 # [result setBlue:blue];
4039 # if (alpha <= 0.9999) {
4040 # [result setAlpha:floatWrapperWithValue(alpha)];
4041 # }
4042 # [result autorelease];
4043 # return result;
4044 # }
4045 # // ...
4046 #
4047 # Example (JavaScript):
4048 #
4049 # // ...
4050 #
4051 # var protoToCssColor = function(rgb_color) {
4052 # var redFrac = rgb_color.red || 0.0;
4053 # var greenFrac = rgb_color.green || 0.0;
4054 # var blueFrac = rgb_color.blue || 0.0;
4055 # var red = Math.floor(redFrac * 255);
4056 # var green = Math.floor(greenFrac * 255);
4057 # var blue = Math.floor(blueFrac * 255);
4058 #
4059 # if (!('alpha' in rgb_color)) {
4060 # return rgbToCssColor_(red, green, blue);
4061 # }
4062 #
4063 # var alphaFrac = rgb_color.alpha.value || 0.0;
4064 # var rgbParams = [red, green, blue].join(',');
4065 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4066 # };
4067 #
4068 # var rgbToCssColor_ = function(red, green, blue) {
4069 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4070 # var hexString = rgbNumber.toString(16);
4071 # var missingZeros = 6 - hexString.length;
4072 # var resultBuilder = ['#'];
4073 # for (var i = 0; i < missingZeros; i++) {
4074 # resultBuilder.push('0');
4075 # }
4076 # resultBuilder.push(hexString);
4077 # return resultBuilder.join('');
4078 # };
4079 #
4080 # // ...
4081 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4082 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4083 # the final pixel color is defined by the equation:
4084 #
4085 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4086 #
4087 # This means that a value of 1.0 corresponds to a solid color, whereas
4088 # a value of 0.0 corresponds to a completely transparent color. This
4089 # uses a wrapper message rather than a simple float scalar so that it is
4090 # possible to distinguish between a default value and the value being unset.
4091 # If omitted, this color object is to be rendered as a solid color
4092 # (as if the alpha value had been explicitly given with a value of 1.0).
4093 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4094 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4095 },
4096 "bold": True or False, # True if the text is bold.
4097 "strikethrough": True or False, # True if the text has a strikethrough.
4098 "fontFamily": "A String", # The font family.
4099 "fontSize": 42, # The size of the font.
4100 "italic": True or False, # True if the text is italicized.
4101 "underline": True or False, # True if the text is underlined.
4102 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07004103 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
4104 "angle": 42, # The angle between the standard orientation and the desired orientation.
4105 # Measured in degrees. Valid values are between -90 and 90. Positive
4106 # angles are angled upwards, negative are angled downwards.
4107 #
4108 # Note: For LTR text direction positive angles are in the counterclockwise
4109 # direction, whereas for RTL they are in the clockwise direction
4110 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
4111 # characters is unchanged.
4112 # For example:
4113 #
4114 # | V |
4115 # | e |
4116 # | r |
4117 # | t |
4118 # | i |
4119 # | c |
4120 # | a |
4121 # | l |
4122 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004123 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
4124 "borders": { # The borders of the cell. # The borders of the cell.
4125 "top": { # A border along a cell. # The top border of the cell.
4126 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4127 # for simplicity of conversion to/from color representations in various
4128 # languages over compactness; for example, the fields of this representation
4129 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4130 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4131 # method in iOS; and, with just a little work, it can be easily formatted into
4132 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4133 #
4134 # Example (Java):
4135 #
4136 # import com.google.type.Color;
4137 #
4138 # // ...
4139 # public static java.awt.Color fromProto(Color protocolor) {
4140 # float alpha = protocolor.hasAlpha()
4141 # ? protocolor.getAlpha().getValue()
4142 # : 1.0;
4143 #
4144 # return new java.awt.Color(
4145 # protocolor.getRed(),
4146 # protocolor.getGreen(),
4147 # protocolor.getBlue(),
4148 # alpha);
4149 # }
4150 #
4151 # public static Color toProto(java.awt.Color color) {
4152 # float red = (float) color.getRed();
4153 # float green = (float) color.getGreen();
4154 # float blue = (float) color.getBlue();
4155 # float denominator = 255.0;
4156 # Color.Builder resultBuilder =
4157 # Color
4158 # .newBuilder()
4159 # .setRed(red / denominator)
4160 # .setGreen(green / denominator)
4161 # .setBlue(blue / denominator);
4162 # int alpha = color.getAlpha();
4163 # if (alpha != 255) {
4164 # result.setAlpha(
4165 # FloatValue
4166 # .newBuilder()
4167 # .setValue(((float) alpha) / denominator)
4168 # .build());
4169 # }
4170 # return resultBuilder.build();
4171 # }
4172 # // ...
4173 #
4174 # Example (iOS / Obj-C):
4175 #
4176 # // ...
4177 # static UIColor* fromProto(Color* protocolor) {
4178 # float red = [protocolor red];
4179 # float green = [protocolor green];
4180 # float blue = [protocolor blue];
4181 # FloatValue* alpha_wrapper = [protocolor alpha];
4182 # float alpha = 1.0;
4183 # if (alpha_wrapper != nil) {
4184 # alpha = [alpha_wrapper value];
4185 # }
4186 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4187 # }
4188 #
4189 # static Color* toProto(UIColor* color) {
4190 # CGFloat red, green, blue, alpha;
4191 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4192 # return nil;
4193 # }
4194 # Color* result = [Color alloc] init];
4195 # [result setRed:red];
4196 # [result setGreen:green];
4197 # [result setBlue:blue];
4198 # if (alpha <= 0.9999) {
4199 # [result setAlpha:floatWrapperWithValue(alpha)];
4200 # }
4201 # [result autorelease];
4202 # return result;
4203 # }
4204 # // ...
4205 #
4206 # Example (JavaScript):
4207 #
4208 # // ...
4209 #
4210 # var protoToCssColor = function(rgb_color) {
4211 # var redFrac = rgb_color.red || 0.0;
4212 # var greenFrac = rgb_color.green || 0.0;
4213 # var blueFrac = rgb_color.blue || 0.0;
4214 # var red = Math.floor(redFrac * 255);
4215 # var green = Math.floor(greenFrac * 255);
4216 # var blue = Math.floor(blueFrac * 255);
4217 #
4218 # if (!('alpha' in rgb_color)) {
4219 # return rgbToCssColor_(red, green, blue);
4220 # }
4221 #
4222 # var alphaFrac = rgb_color.alpha.value || 0.0;
4223 # var rgbParams = [red, green, blue].join(',');
4224 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4225 # };
4226 #
4227 # var rgbToCssColor_ = function(red, green, blue) {
4228 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4229 # var hexString = rgbNumber.toString(16);
4230 # var missingZeros = 6 - hexString.length;
4231 # var resultBuilder = ['#'];
4232 # for (var i = 0; i < missingZeros; i++) {
4233 # resultBuilder.push('0');
4234 # }
4235 # resultBuilder.push(hexString);
4236 # return resultBuilder.join('');
4237 # };
4238 #
4239 # // ...
4240 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4241 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4242 # the final pixel color is defined by the equation:
4243 #
4244 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4245 #
4246 # This means that a value of 1.0 corresponds to a solid color, whereas
4247 # a value of 0.0 corresponds to a completely transparent color. This
4248 # uses a wrapper message rather than a simple float scalar so that it is
4249 # possible to distinguish between a default value and the value being unset.
4250 # If omitted, this color object is to be rendered as a solid color
4251 # (as if the alpha value had been explicitly given with a value of 1.0).
4252 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4253 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4254 },
4255 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004256 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004257 "style": "A String", # The style of the border.
4258 },
4259 "right": { # A border along a cell. # The right border of the cell.
4260 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4261 # for simplicity of conversion to/from color representations in various
4262 # languages over compactness; for example, the fields of this representation
4263 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4264 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4265 # method in iOS; and, with just a little work, it can be easily formatted into
4266 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4267 #
4268 # Example (Java):
4269 #
4270 # import com.google.type.Color;
4271 #
4272 # // ...
4273 # public static java.awt.Color fromProto(Color protocolor) {
4274 # float alpha = protocolor.hasAlpha()
4275 # ? protocolor.getAlpha().getValue()
4276 # : 1.0;
4277 #
4278 # return new java.awt.Color(
4279 # protocolor.getRed(),
4280 # protocolor.getGreen(),
4281 # protocolor.getBlue(),
4282 # alpha);
4283 # }
4284 #
4285 # public static Color toProto(java.awt.Color color) {
4286 # float red = (float) color.getRed();
4287 # float green = (float) color.getGreen();
4288 # float blue = (float) color.getBlue();
4289 # float denominator = 255.0;
4290 # Color.Builder resultBuilder =
4291 # Color
4292 # .newBuilder()
4293 # .setRed(red / denominator)
4294 # .setGreen(green / denominator)
4295 # .setBlue(blue / denominator);
4296 # int alpha = color.getAlpha();
4297 # if (alpha != 255) {
4298 # result.setAlpha(
4299 # FloatValue
4300 # .newBuilder()
4301 # .setValue(((float) alpha) / denominator)
4302 # .build());
4303 # }
4304 # return resultBuilder.build();
4305 # }
4306 # // ...
4307 #
4308 # Example (iOS / Obj-C):
4309 #
4310 # // ...
4311 # static UIColor* fromProto(Color* protocolor) {
4312 # float red = [protocolor red];
4313 # float green = [protocolor green];
4314 # float blue = [protocolor blue];
4315 # FloatValue* alpha_wrapper = [protocolor alpha];
4316 # float alpha = 1.0;
4317 # if (alpha_wrapper != nil) {
4318 # alpha = [alpha_wrapper value];
4319 # }
4320 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4321 # }
4322 #
4323 # static Color* toProto(UIColor* color) {
4324 # CGFloat red, green, blue, alpha;
4325 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4326 # return nil;
4327 # }
4328 # Color* result = [Color alloc] init];
4329 # [result setRed:red];
4330 # [result setGreen:green];
4331 # [result setBlue:blue];
4332 # if (alpha <= 0.9999) {
4333 # [result setAlpha:floatWrapperWithValue(alpha)];
4334 # }
4335 # [result autorelease];
4336 # return result;
4337 # }
4338 # // ...
4339 #
4340 # Example (JavaScript):
4341 #
4342 # // ...
4343 #
4344 # var protoToCssColor = function(rgb_color) {
4345 # var redFrac = rgb_color.red || 0.0;
4346 # var greenFrac = rgb_color.green || 0.0;
4347 # var blueFrac = rgb_color.blue || 0.0;
4348 # var red = Math.floor(redFrac * 255);
4349 # var green = Math.floor(greenFrac * 255);
4350 # var blue = Math.floor(blueFrac * 255);
4351 #
4352 # if (!('alpha' in rgb_color)) {
4353 # return rgbToCssColor_(red, green, blue);
4354 # }
4355 #
4356 # var alphaFrac = rgb_color.alpha.value || 0.0;
4357 # var rgbParams = [red, green, blue].join(',');
4358 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4359 # };
4360 #
4361 # var rgbToCssColor_ = function(red, green, blue) {
4362 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4363 # var hexString = rgbNumber.toString(16);
4364 # var missingZeros = 6 - hexString.length;
4365 # var resultBuilder = ['#'];
4366 # for (var i = 0; i < missingZeros; i++) {
4367 # resultBuilder.push('0');
4368 # }
4369 # resultBuilder.push(hexString);
4370 # return resultBuilder.join('');
4371 # };
4372 #
4373 # // ...
4374 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4375 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4376 # the final pixel color is defined by the equation:
4377 #
4378 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4379 #
4380 # This means that a value of 1.0 corresponds to a solid color, whereas
4381 # a value of 0.0 corresponds to a completely transparent color. This
4382 # uses a wrapper message rather than a simple float scalar so that it is
4383 # possible to distinguish between a default value and the value being unset.
4384 # If omitted, this color object is to be rendered as a solid color
4385 # (as if the alpha value had been explicitly given with a value of 1.0).
4386 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4387 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4388 },
4389 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004390 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004391 "style": "A String", # The style of the border.
4392 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004393 "left": { # A border along a cell. # The left border of the cell.
4394 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4395 # for simplicity of conversion to/from color representations in various
4396 # languages over compactness; for example, the fields of this representation
4397 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4398 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4399 # method in iOS; and, with just a little work, it can be easily formatted into
4400 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4401 #
4402 # Example (Java):
4403 #
4404 # import com.google.type.Color;
4405 #
4406 # // ...
4407 # public static java.awt.Color fromProto(Color protocolor) {
4408 # float alpha = protocolor.hasAlpha()
4409 # ? protocolor.getAlpha().getValue()
4410 # : 1.0;
4411 #
4412 # return new java.awt.Color(
4413 # protocolor.getRed(),
4414 # protocolor.getGreen(),
4415 # protocolor.getBlue(),
4416 # alpha);
4417 # }
4418 #
4419 # public static Color toProto(java.awt.Color color) {
4420 # float red = (float) color.getRed();
4421 # float green = (float) color.getGreen();
4422 # float blue = (float) color.getBlue();
4423 # float denominator = 255.0;
4424 # Color.Builder resultBuilder =
4425 # Color
4426 # .newBuilder()
4427 # .setRed(red / denominator)
4428 # .setGreen(green / denominator)
4429 # .setBlue(blue / denominator);
4430 # int alpha = color.getAlpha();
4431 # if (alpha != 255) {
4432 # result.setAlpha(
4433 # FloatValue
4434 # .newBuilder()
4435 # .setValue(((float) alpha) / denominator)
4436 # .build());
4437 # }
4438 # return resultBuilder.build();
4439 # }
4440 # // ...
4441 #
4442 # Example (iOS / Obj-C):
4443 #
4444 # // ...
4445 # static UIColor* fromProto(Color* protocolor) {
4446 # float red = [protocolor red];
4447 # float green = [protocolor green];
4448 # float blue = [protocolor blue];
4449 # FloatValue* alpha_wrapper = [protocolor alpha];
4450 # float alpha = 1.0;
4451 # if (alpha_wrapper != nil) {
4452 # alpha = [alpha_wrapper value];
4453 # }
4454 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4455 # }
4456 #
4457 # static Color* toProto(UIColor* color) {
4458 # CGFloat red, green, blue, alpha;
4459 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4460 # return nil;
4461 # }
4462 # Color* result = [Color alloc] init];
4463 # [result setRed:red];
4464 # [result setGreen:green];
4465 # [result setBlue:blue];
4466 # if (alpha <= 0.9999) {
4467 # [result setAlpha:floatWrapperWithValue(alpha)];
4468 # }
4469 # [result autorelease];
4470 # return result;
4471 # }
4472 # // ...
4473 #
4474 # Example (JavaScript):
4475 #
4476 # // ...
4477 #
4478 # var protoToCssColor = function(rgb_color) {
4479 # var redFrac = rgb_color.red || 0.0;
4480 # var greenFrac = rgb_color.green || 0.0;
4481 # var blueFrac = rgb_color.blue || 0.0;
4482 # var red = Math.floor(redFrac * 255);
4483 # var green = Math.floor(greenFrac * 255);
4484 # var blue = Math.floor(blueFrac * 255);
4485 #
4486 # if (!('alpha' in rgb_color)) {
4487 # return rgbToCssColor_(red, green, blue);
4488 # }
4489 #
4490 # var alphaFrac = rgb_color.alpha.value || 0.0;
4491 # var rgbParams = [red, green, blue].join(',');
4492 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4493 # };
4494 #
4495 # var rgbToCssColor_ = function(red, green, blue) {
4496 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4497 # var hexString = rgbNumber.toString(16);
4498 # var missingZeros = 6 - hexString.length;
4499 # var resultBuilder = ['#'];
4500 # for (var i = 0; i < missingZeros; i++) {
4501 # resultBuilder.push('0');
4502 # }
4503 # resultBuilder.push(hexString);
4504 # return resultBuilder.join('');
4505 # };
4506 #
4507 # // ...
4508 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4509 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4510 # the final pixel color is defined by the equation:
4511 #
4512 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4513 #
4514 # This means that a value of 1.0 corresponds to a solid color, whereas
4515 # a value of 0.0 corresponds to a completely transparent color. This
4516 # uses a wrapper message rather than a simple float scalar so that it is
4517 # possible to distinguish between a default value and the value being unset.
4518 # If omitted, this color object is to be rendered as a solid color
4519 # (as if the alpha value had been explicitly given with a value of 1.0).
4520 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4521 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4522 },
4523 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004524 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004525 "style": "A String", # The style of the border.
4526 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07004527 "bottom": { # A border along a cell. # The bottom border of the cell.
4528 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
4529 # for simplicity of conversion to/from color representations in various
4530 # languages over compactness; for example, the fields of this representation
4531 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4532 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4533 # method in iOS; and, with just a little work, it can be easily formatted into
4534 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4535 #
4536 # Example (Java):
4537 #
4538 # import com.google.type.Color;
4539 #
4540 # // ...
4541 # public static java.awt.Color fromProto(Color protocolor) {
4542 # float alpha = protocolor.hasAlpha()
4543 # ? protocolor.getAlpha().getValue()
4544 # : 1.0;
4545 #
4546 # return new java.awt.Color(
4547 # protocolor.getRed(),
4548 # protocolor.getGreen(),
4549 # protocolor.getBlue(),
4550 # alpha);
4551 # }
4552 #
4553 # public static Color toProto(java.awt.Color color) {
4554 # float red = (float) color.getRed();
4555 # float green = (float) color.getGreen();
4556 # float blue = (float) color.getBlue();
4557 # float denominator = 255.0;
4558 # Color.Builder resultBuilder =
4559 # Color
4560 # .newBuilder()
4561 # .setRed(red / denominator)
4562 # .setGreen(green / denominator)
4563 # .setBlue(blue / denominator);
4564 # int alpha = color.getAlpha();
4565 # if (alpha != 255) {
4566 # result.setAlpha(
4567 # FloatValue
4568 # .newBuilder()
4569 # .setValue(((float) alpha) / denominator)
4570 # .build());
4571 # }
4572 # return resultBuilder.build();
4573 # }
4574 # // ...
4575 #
4576 # Example (iOS / Obj-C):
4577 #
4578 # // ...
4579 # static UIColor* fromProto(Color* protocolor) {
4580 # float red = [protocolor red];
4581 # float green = [protocolor green];
4582 # float blue = [protocolor blue];
4583 # FloatValue* alpha_wrapper = [protocolor alpha];
4584 # float alpha = 1.0;
4585 # if (alpha_wrapper != nil) {
4586 # alpha = [alpha_wrapper value];
4587 # }
4588 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4589 # }
4590 #
4591 # static Color* toProto(UIColor* color) {
4592 # CGFloat red, green, blue, alpha;
4593 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4594 # return nil;
4595 # }
4596 # Color* result = [Color alloc] init];
4597 # [result setRed:red];
4598 # [result setGreen:green];
4599 # [result setBlue:blue];
4600 # if (alpha <= 0.9999) {
4601 # [result setAlpha:floatWrapperWithValue(alpha)];
4602 # }
4603 # [result autorelease];
4604 # return result;
4605 # }
4606 # // ...
4607 #
4608 # Example (JavaScript):
4609 #
4610 # // ...
4611 #
4612 # var protoToCssColor = function(rgb_color) {
4613 # var redFrac = rgb_color.red || 0.0;
4614 # var greenFrac = rgb_color.green || 0.0;
4615 # var blueFrac = rgb_color.blue || 0.0;
4616 # var red = Math.floor(redFrac * 255);
4617 # var green = Math.floor(greenFrac * 255);
4618 # var blue = Math.floor(blueFrac * 255);
4619 #
4620 # if (!('alpha' in rgb_color)) {
4621 # return rgbToCssColor_(red, green, blue);
4622 # }
4623 #
4624 # var alphaFrac = rgb_color.alpha.value || 0.0;
4625 # var rgbParams = [red, green, blue].join(',');
4626 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4627 # };
4628 #
4629 # var rgbToCssColor_ = function(red, green, blue) {
4630 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4631 # var hexString = rgbNumber.toString(16);
4632 # var missingZeros = 6 - hexString.length;
4633 # var resultBuilder = ['#'];
4634 # for (var i = 0; i < missingZeros; i++) {
4635 # resultBuilder.push('0');
4636 # }
4637 # resultBuilder.push(hexString);
4638 # return resultBuilder.join('');
4639 # };
4640 #
4641 # // ...
4642 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4643 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4644 # the final pixel color is defined by the equation:
4645 #
4646 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4647 #
4648 # This means that a value of 1.0 corresponds to a solid color, whereas
4649 # a value of 0.0 corresponds to a completely transparent color. This
4650 # uses a wrapper message rather than a simple float scalar so that it is
4651 # possible to distinguish between a default value and the value being unset.
4652 # If omitted, this color object is to be rendered as a solid color
4653 # (as if the alpha value had been explicitly given with a value of 1.0).
4654 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4655 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4656 },
4657 "width": 42, # The width of the border, in pixels.
4658 # Deprecated; the width is determined by the "style" field.
4659 "style": "A String", # The style of the border.
4660 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004661 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07004662 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004663 },
4664 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
4665 #
4666 # When writing, the new data validation rule will overwrite any prior rule.
4667 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
4668 # If true, "List" conditions will show a dropdown.
4669 "strict": True or False, # True if invalid data should be rejected.
4670 "inputMessage": "A String", # A message to show the user when adding data to the cell.
4671 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
4672 # BooleanConditions are used by conditional formatting,
4673 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004674 "values": [ # The values of the condition. The number of supported values depends
4675 # on the condition type. Some support zero values,
4676 # others one or two values,
4677 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
4678 { # The value of the condition.
4679 "relativeDate": "A String", # A relative date (based on the current date).
4680 # Valid only if the type is
4681 # DATE_BEFORE,
4682 # DATE_AFTER,
4683 # DATE_ON_OR_BEFORE or
4684 # DATE_ON_OR_AFTER.
4685 #
4686 # Relative dates are not supported in data validation.
4687 # They are supported only in conditional formatting and
4688 # conditional filters.
4689 "userEnteredValue": "A String", # A value the condition is based on.
4690 # The value will be parsed as if the user typed into a cell.
4691 # Formulas are supported (and must begin with an `=`).
4692 },
4693 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004694 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004695 },
4696 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004697 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
4698 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004699 # Runs start at specific indexes in the text and continue until the next
4700 # run. Properties of a run will continue unless explicitly changed
4701 # in a subsequent run (and properties of the first run will continue
4702 # the properties of the cell unless explicitly changed).
4703 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004704 # When writing, the new runs will overwrite any prior runs. When writing a
4705 # new user_entered_value, previous runs will be erased.
4706 { # A run of a text format. The format of this run continues until the start
4707 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004708 # When updating, all fields must be set.
4709 "startIndex": 42, # The character index where this run starts.
4710 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
4711 # Absent values indicate that the field isn't specified.
4712 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4713 # for simplicity of conversion to/from color representations in various
4714 # languages over compactness; for example, the fields of this representation
4715 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4716 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4717 # method in iOS; and, with just a little work, it can be easily formatted into
4718 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4719 #
4720 # Example (Java):
4721 #
4722 # import com.google.type.Color;
4723 #
4724 # // ...
4725 # public static java.awt.Color fromProto(Color protocolor) {
4726 # float alpha = protocolor.hasAlpha()
4727 # ? protocolor.getAlpha().getValue()
4728 # : 1.0;
4729 #
4730 # return new java.awt.Color(
4731 # protocolor.getRed(),
4732 # protocolor.getGreen(),
4733 # protocolor.getBlue(),
4734 # alpha);
4735 # }
4736 #
4737 # public static Color toProto(java.awt.Color color) {
4738 # float red = (float) color.getRed();
4739 # float green = (float) color.getGreen();
4740 # float blue = (float) color.getBlue();
4741 # float denominator = 255.0;
4742 # Color.Builder resultBuilder =
4743 # Color
4744 # .newBuilder()
4745 # .setRed(red / denominator)
4746 # .setGreen(green / denominator)
4747 # .setBlue(blue / denominator);
4748 # int alpha = color.getAlpha();
4749 # if (alpha != 255) {
4750 # result.setAlpha(
4751 # FloatValue
4752 # .newBuilder()
4753 # .setValue(((float) alpha) / denominator)
4754 # .build());
4755 # }
4756 # return resultBuilder.build();
4757 # }
4758 # // ...
4759 #
4760 # Example (iOS / Obj-C):
4761 #
4762 # // ...
4763 # static UIColor* fromProto(Color* protocolor) {
4764 # float red = [protocolor red];
4765 # float green = [protocolor green];
4766 # float blue = [protocolor blue];
4767 # FloatValue* alpha_wrapper = [protocolor alpha];
4768 # float alpha = 1.0;
4769 # if (alpha_wrapper != nil) {
4770 # alpha = [alpha_wrapper value];
4771 # }
4772 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4773 # }
4774 #
4775 # static Color* toProto(UIColor* color) {
4776 # CGFloat red, green, blue, alpha;
4777 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4778 # return nil;
4779 # }
4780 # Color* result = [Color alloc] init];
4781 # [result setRed:red];
4782 # [result setGreen:green];
4783 # [result setBlue:blue];
4784 # if (alpha <= 0.9999) {
4785 # [result setAlpha:floatWrapperWithValue(alpha)];
4786 # }
4787 # [result autorelease];
4788 # return result;
4789 # }
4790 # // ...
4791 #
4792 # Example (JavaScript):
4793 #
4794 # // ...
4795 #
4796 # var protoToCssColor = function(rgb_color) {
4797 # var redFrac = rgb_color.red || 0.0;
4798 # var greenFrac = rgb_color.green || 0.0;
4799 # var blueFrac = rgb_color.blue || 0.0;
4800 # var red = Math.floor(redFrac * 255);
4801 # var green = Math.floor(greenFrac * 255);
4802 # var blue = Math.floor(blueFrac * 255);
4803 #
4804 # if (!('alpha' in rgb_color)) {
4805 # return rgbToCssColor_(red, green, blue);
4806 # }
4807 #
4808 # var alphaFrac = rgb_color.alpha.value || 0.0;
4809 # var rgbParams = [red, green, blue].join(',');
4810 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4811 # };
4812 #
4813 # var rgbToCssColor_ = function(red, green, blue) {
4814 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4815 # var hexString = rgbNumber.toString(16);
4816 # var missingZeros = 6 - hexString.length;
4817 # var resultBuilder = ['#'];
4818 # for (var i = 0; i < missingZeros; i++) {
4819 # resultBuilder.push('0');
4820 # }
4821 # resultBuilder.push(hexString);
4822 # return resultBuilder.join('');
4823 # };
4824 #
4825 # // ...
4826 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4827 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4828 # the final pixel color is defined by the equation:
4829 #
4830 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4831 #
4832 # This means that a value of 1.0 corresponds to a solid color, whereas
4833 # a value of 0.0 corresponds to a completely transparent color. This
4834 # uses a wrapper message rather than a simple float scalar so that it is
4835 # possible to distinguish between a default value and the value being unset.
4836 # If omitted, this color object is to be rendered as a solid color
4837 # (as if the alpha value had been explicitly given with a value of 1.0).
4838 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4839 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4840 },
4841 "bold": True or False, # True if the text is bold.
4842 "strikethrough": True or False, # True if the text has a strikethrough.
4843 "fontFamily": "A String", # The font family.
4844 "fontSize": 42, # The size of the font.
4845 "italic": True or False, # True if the text is italicized.
4846 "underline": True or False, # True if the text is underlined.
4847 },
4848 },
4849 ],
4850 },
4851 ],
4852 },
4853 ],
4854 "sheetId": 42, # The sheet ID to append the data to.
4855 },
4856 "duplicateSheet": { # Duplicates the contents of a sheet. # Duplicates a sheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004857 "newSheetName": "A String", # The name of the new sheet. If empty, a new name is chosen for you.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004858 "insertSheetIndex": 42, # The zero-based index where the new sheet should be inserted.
4859 # The index of all sheets after this are incremented.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004860 "sourceSheetId": 42, # The sheet to duplicate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004861 "newSheetId": 42, # If set, the ID of the new sheet. If not set, an ID is chosen.
4862 # If set, the ID must not conflict with any existing sheet ID.
4863 # If set, it must be non-negative.
4864 },
4865 "updateSheetProperties": { # Updates properties of the sheet with the specified # Updates a sheet's properties.
4866 # sheetId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004867 "fields": "A String", # The fields that should be updated. At least one field must be specified.
4868 # The root `properties` is implied and should not be specified.
4869 # A single `"*"` can be used as short-hand for listing every field.
4870 "properties": { # Properties of a sheet. # The properties to update.
4871 "sheetType": "A String", # The type of sheet. Defaults to GRID.
4872 # This field cannot be changed once set.
4873 "index": 42, # The index of the sheet within the spreadsheet.
4874 # When adding or updating sheet properties, if this field
4875 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004876 # of the sheet list. When updating sheet indices or inserting
4877 # sheets, movement is considered in "before the move" indexes.
4878 # For example, if there were 3 sheets (S1, S2, S3) in order to
4879 # move S1 ahead of S2 the index would have to be set to 2. A sheet
4880 # index update request will be ignored if the requested index is
4881 # identical to the sheets current index or if the requested new
4882 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004883 "title": "A String", # The name of the sheet.
4884 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
4885 # (If the sheet is an object sheet, containing a chart or image, then
4886 # this field will be absent.)
4887 # When writing it is an error to set any grid properties on non-grid sheets.
4888 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -07004889 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004890 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
4891 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -07004892 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004893 },
4894 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
4895 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
4896 # for simplicity of conversion to/from color representations in various
4897 # languages over compactness; for example, the fields of this representation
4898 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4899 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4900 # method in iOS; and, with just a little work, it can be easily formatted into
4901 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4902 #
4903 # Example (Java):
4904 #
4905 # import com.google.type.Color;
4906 #
4907 # // ...
4908 # public static java.awt.Color fromProto(Color protocolor) {
4909 # float alpha = protocolor.hasAlpha()
4910 # ? protocolor.getAlpha().getValue()
4911 # : 1.0;
4912 #
4913 # return new java.awt.Color(
4914 # protocolor.getRed(),
4915 # protocolor.getGreen(),
4916 # protocolor.getBlue(),
4917 # alpha);
4918 # }
4919 #
4920 # public static Color toProto(java.awt.Color color) {
4921 # float red = (float) color.getRed();
4922 # float green = (float) color.getGreen();
4923 # float blue = (float) color.getBlue();
4924 # float denominator = 255.0;
4925 # Color.Builder resultBuilder =
4926 # Color
4927 # .newBuilder()
4928 # .setRed(red / denominator)
4929 # .setGreen(green / denominator)
4930 # .setBlue(blue / denominator);
4931 # int alpha = color.getAlpha();
4932 # if (alpha != 255) {
4933 # result.setAlpha(
4934 # FloatValue
4935 # .newBuilder()
4936 # .setValue(((float) alpha) / denominator)
4937 # .build());
4938 # }
4939 # return resultBuilder.build();
4940 # }
4941 # // ...
4942 #
4943 # Example (iOS / Obj-C):
4944 #
4945 # // ...
4946 # static UIColor* fromProto(Color* protocolor) {
4947 # float red = [protocolor red];
4948 # float green = [protocolor green];
4949 # float blue = [protocolor blue];
4950 # FloatValue* alpha_wrapper = [protocolor alpha];
4951 # float alpha = 1.0;
4952 # if (alpha_wrapper != nil) {
4953 # alpha = [alpha_wrapper value];
4954 # }
4955 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4956 # }
4957 #
4958 # static Color* toProto(UIColor* color) {
4959 # CGFloat red, green, blue, alpha;
4960 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4961 # return nil;
4962 # }
4963 # Color* result = [Color alloc] init];
4964 # [result setRed:red];
4965 # [result setGreen:green];
4966 # [result setBlue:blue];
4967 # if (alpha <= 0.9999) {
4968 # [result setAlpha:floatWrapperWithValue(alpha)];
4969 # }
4970 # [result autorelease];
4971 # return result;
4972 # }
4973 # // ...
4974 #
4975 # Example (JavaScript):
4976 #
4977 # // ...
4978 #
4979 # var protoToCssColor = function(rgb_color) {
4980 # var redFrac = rgb_color.red || 0.0;
4981 # var greenFrac = rgb_color.green || 0.0;
4982 # var blueFrac = rgb_color.blue || 0.0;
4983 # var red = Math.floor(redFrac * 255);
4984 # var green = Math.floor(greenFrac * 255);
4985 # var blue = Math.floor(blueFrac * 255);
4986 #
4987 # if (!('alpha' in rgb_color)) {
4988 # return rgbToCssColor_(red, green, blue);
4989 # }
4990 #
4991 # var alphaFrac = rgb_color.alpha.value || 0.0;
4992 # var rgbParams = [red, green, blue].join(',');
4993 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4994 # };
4995 #
4996 # var rgbToCssColor_ = function(red, green, blue) {
4997 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4998 # var hexString = rgbNumber.toString(16);
4999 # var missingZeros = 6 - hexString.length;
5000 # var resultBuilder = ['#'];
5001 # for (var i = 0; i < missingZeros; i++) {
5002 # resultBuilder.push('0');
5003 # }
5004 # resultBuilder.push(hexString);
5005 # return resultBuilder.join('');
5006 # };
5007 #
5008 # // ...
5009 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5010 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5011 # the final pixel color is defined by the equation:
5012 #
5013 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5014 #
5015 # This means that a value of 1.0 corresponds to a solid color, whereas
5016 # a value of 0.0 corresponds to a completely transparent color. This
5017 # uses a wrapper message rather than a simple float scalar so that it is
5018 # possible to distinguish between a default value and the value being unset.
5019 # If omitted, this color object is to be rendered as a solid color
5020 # (as if the alpha value had been explicitly given with a value of 1.0).
5021 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5022 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5023 },
5024 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
5025 "sheetId": 42, # The ID of the sheet. Must be non-negative.
5026 # This field cannot be changed once set.
5027 },
5028 },
5029 "addChart": { # Adds a chart to a sheet in the spreadsheet. # Adds a chart.
5030 "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 -07005031 # where it should be placed. The chartId
5032 # field is optional; if one is not set, an id will be randomly generated. (It
5033 # is an error to specify the ID of a chart that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005034 "chartId": 42, # The ID of the chart.
5035 "position": { # The position of an embedded object such as a chart. # The position of the chart.
5036 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
5037 # is chosen for you. Used only when writing.
5038 "sheetId": 42, # The sheet this is on. Set only if the embedded object
5039 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005040 "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 -07005041 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
5042 # All indexes are zero-based.
5043 "rowIndex": 42, # The row index of the coordinate.
5044 "columnIndex": 42, # The column index of the coordinate.
5045 "sheetId": 42, # The sheet this coordinate is on.
5046 },
5047 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
5048 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -07005049 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005050 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
5051 # from the anchor cell.
5052 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
5053 },
5054 },
5055 "spec": { # The specifications of a chart. # The specification of the chart.
5056 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005057 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
5058 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
5059 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
5060 "sources": [ # The ranges of data for a series or domain.
5061 # Exactly one dimension must have a length of 1,
5062 # and all sources in the list must have the same dimension
5063 # with length 1.
5064 # The domain (if it exists) & all series must have the same number
5065 # of source ranges. If using more than one source range, then the source
5066 # range at a given offset must be contiguous across the domain and series.
5067 #
5068 # For example, these are valid configurations:
5069 #
5070 # domain sources: A1:A5
5071 # series1 sources: B1:B5
5072 # series2 sources: D6:D10
5073 #
5074 # domain sources: A1:A5, C10:C12
5075 # series1 sources: B1:B5, D10:D12
5076 # series2 sources: C1:C5, E10:E12
5077 { # A range on a sheet.
5078 # All indexes are zero-based.
5079 # Indexes are half open, e.g the start index is inclusive
5080 # and the end index is exclusive -- [start_index, end_index).
5081 # Missing indexes indicate the range is unbounded on that side.
5082 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005083 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005084 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005085 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005086 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005087 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005088 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005089 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005090 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005091 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005092 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005093 # `Sheet1!A:B == sheet_id: 0,
5094 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005095 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005096 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005097 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005098 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005099 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005100 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005101 #
5102 # The start index must always be less than or equal to the end index.
5103 # If the start index equals the end index, then the range is empty.
5104 # Empty ranges are typically not meaningful and are usually rendered in the
5105 # UI as `#REF!`.
5106 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005107 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005108 "sheetId": 42, # The sheet this range is on.
5109 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005110 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005111 },
5112 ],
5113 },
5114 },
5115 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
5116 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
5117 "sources": [ # The ranges of data for a series or domain.
5118 # Exactly one dimension must have a length of 1,
5119 # and all sources in the list must have the same dimension
5120 # with length 1.
5121 # The domain (if it exists) & all series must have the same number
5122 # of source ranges. If using more than one source range, then the source
5123 # range at a given offset must be contiguous across the domain and series.
5124 #
5125 # For example, these are valid configurations:
5126 #
5127 # domain sources: A1:A5
5128 # series1 sources: B1:B5
5129 # series2 sources: D6:D10
5130 #
5131 # domain sources: A1:A5, C10:C12
5132 # series1 sources: B1:B5, D10:D12
5133 # series2 sources: C1:C5, E10:E12
5134 { # A range on a sheet.
5135 # All indexes are zero-based.
5136 # Indexes are half open, e.g the start index is inclusive
5137 # and the end index is exclusive -- [start_index, end_index).
5138 # Missing indexes indicate the range is unbounded on that side.
5139 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005140 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005141 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005142 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005143 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005144 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005145 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005146 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005147 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005148 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005150 # `Sheet1!A:B == sheet_id: 0,
5151 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005152 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005153 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005154 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005155 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005156 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005157 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005158 #
5159 # The start index must always be less than or equal to the end index.
5160 # If the start index equals the end index, then the range is empty.
5161 # Empty ranges are typically not meaningful and are usually rendered in the
5162 # UI as `#REF!`.
5163 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005164 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005165 "sheetId": 42, # The sheet this range is on.
5166 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005167 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005168 },
5169 ],
5170 },
5171 },
5172 "threeDimensional": True or False, # True if the pie is three dimensional.
5173 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
5174 "pieHole": 3.14, # The size of the hole in the pie chart.
5175 },
5176 "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 -07005177 # See BasicChartType for the list of all
5178 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005179 # of charts this supports.
5180 "headerCount": 42, # The number of rows or columns in the data that are "headers".
5181 # If not set, Google Sheets will guess how many rows are headers based
5182 # on the data.
5183 #
5184 # (Note that BasicChartAxis.title may override the axis title
5185 # inferred from the header values.)
5186 "series": [ # The data this chart is visualizing.
5187 { # A single series of data in a chart.
5188 # For example, if charting stock prices over time, multiple series may exist,
5189 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
5190 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
5191 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
5192 "sources": [ # The ranges of data for a series or domain.
5193 # Exactly one dimension must have a length of 1,
5194 # and all sources in the list must have the same dimension
5195 # with length 1.
5196 # The domain (if it exists) & all series must have the same number
5197 # of source ranges. If using more than one source range, then the source
5198 # range at a given offset must be contiguous across the domain and series.
5199 #
5200 # For example, these are valid configurations:
5201 #
5202 # domain sources: A1:A5
5203 # series1 sources: B1:B5
5204 # series2 sources: D6:D10
5205 #
5206 # domain sources: A1:A5, C10:C12
5207 # series1 sources: B1:B5, D10:D12
5208 # series2 sources: C1:C5, E10:E12
5209 { # A range on a sheet.
5210 # All indexes are zero-based.
5211 # Indexes are half open, e.g the start index is inclusive
5212 # and the end index is exclusive -- [start_index, end_index).
5213 # Missing indexes indicate the range is unbounded on that side.
5214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005215 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005216 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005217 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005218 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005219 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005220 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005221 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005222 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005223 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005224 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005225 # `Sheet1!A:B == sheet_id: 0,
5226 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005227 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005228 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005229 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005230 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005231 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005232 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005233 #
5234 # The start index must always be less than or equal to the end index.
5235 # If the start index equals the end index, then the range is empty.
5236 # Empty ranges are typically not meaningful and are usually rendered in the
5237 # UI as `#REF!`.
5238 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005239 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005240 "sheetId": 42, # The sheet this range is on.
5241 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005242 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005243 },
5244 ],
5245 },
5246 },
5247 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
5248 # For example, if charting stocks over time, the "Volume" series
5249 # may want to be pinned to the right with the prices pinned to the left,
5250 # because the scale of trading volume is different than the scale of
5251 # prices.
5252 # It is an error to specify an axis that isn't a valid minor axis
5253 # for the chart's type.
5254 "type": "A String", # The type of this series. Valid only if the
5255 # chartType is
5256 # COMBO.
5257 # Different types will change the way the series is visualized.
5258 # Only LINE, AREA,
5259 # and COLUMN are supported.
5260 },
5261 ],
5262 "legendPosition": "A String", # The position of the chart legend.
5263 "domains": [ # The domain of data this is charting.
5264 # Only a single domain is currently supported.
5265 { # The domain of a chart.
5266 # For example, if charting stock prices over time, this would be the date.
5267 "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 -07005268 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005269 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
5270 "sources": [ # The ranges of data for a series or domain.
5271 # Exactly one dimension must have a length of 1,
5272 # and all sources in the list must have the same dimension
5273 # with length 1.
5274 # The domain (if it exists) & all series must have the same number
5275 # of source ranges. If using more than one source range, then the source
5276 # range at a given offset must be contiguous across the domain and series.
5277 #
5278 # For example, these are valid configurations:
5279 #
5280 # domain sources: A1:A5
5281 # series1 sources: B1:B5
5282 # series2 sources: D6:D10
5283 #
5284 # domain sources: A1:A5, C10:C12
5285 # series1 sources: B1:B5, D10:D12
5286 # series2 sources: C1:C5, E10:E12
5287 { # A range on a sheet.
5288 # All indexes are zero-based.
5289 # Indexes are half open, e.g the start index is inclusive
5290 # and the end index is exclusive -- [start_index, end_index).
5291 # Missing indexes indicate the range is unbounded on that side.
5292 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005293 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005294 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005295 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005296 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005297 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005298 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005299 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005300 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005301 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005302 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005303 # `Sheet1!A:B == sheet_id: 0,
5304 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005305 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005306 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005307 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005308 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005309 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005310 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005311 #
5312 # The start index must always be less than or equal to the end index.
5313 # If the start index equals the end index, then the range is empty.
5314 # Empty ranges are typically not meaningful and are usually rendered in the
5315 # UI as `#REF!`.
5316 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005317 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005318 "sheetId": 42, # The sheet this range is on.
5319 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005320 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005321 },
5322 ],
5323 },
5324 },
5325 },
5326 ],
5327 "chartType": "A String", # The type of the chart.
5328 "axis": [ # The axis on the chart.
5329 { # An axis of the chart.
5330 # A chart may not have more than one axis per
5331 # axis position.
5332 "position": "A String", # The position of this axis.
5333 "format": { # The format of a run of text in a cell. # The format of the title.
5334 # Only valid if the axis is not associated with the domain.
5335 # Absent values indicate that the field isn't specified.
5336 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
5337 # for simplicity of conversion to/from color representations in various
5338 # languages over compactness; for example, the fields of this representation
5339 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5340 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5341 # method in iOS; and, with just a little work, it can be easily formatted into
5342 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5343 #
5344 # Example (Java):
5345 #
5346 # import com.google.type.Color;
5347 #
5348 # // ...
5349 # public static java.awt.Color fromProto(Color protocolor) {
5350 # float alpha = protocolor.hasAlpha()
5351 # ? protocolor.getAlpha().getValue()
5352 # : 1.0;
5353 #
5354 # return new java.awt.Color(
5355 # protocolor.getRed(),
5356 # protocolor.getGreen(),
5357 # protocolor.getBlue(),
5358 # alpha);
5359 # }
5360 #
5361 # public static Color toProto(java.awt.Color color) {
5362 # float red = (float) color.getRed();
5363 # float green = (float) color.getGreen();
5364 # float blue = (float) color.getBlue();
5365 # float denominator = 255.0;
5366 # Color.Builder resultBuilder =
5367 # Color
5368 # .newBuilder()
5369 # .setRed(red / denominator)
5370 # .setGreen(green / denominator)
5371 # .setBlue(blue / denominator);
5372 # int alpha = color.getAlpha();
5373 # if (alpha != 255) {
5374 # result.setAlpha(
5375 # FloatValue
5376 # .newBuilder()
5377 # .setValue(((float) alpha) / denominator)
5378 # .build());
5379 # }
5380 # return resultBuilder.build();
5381 # }
5382 # // ...
5383 #
5384 # Example (iOS / Obj-C):
5385 #
5386 # // ...
5387 # static UIColor* fromProto(Color* protocolor) {
5388 # float red = [protocolor red];
5389 # float green = [protocolor green];
5390 # float blue = [protocolor blue];
5391 # FloatValue* alpha_wrapper = [protocolor alpha];
5392 # float alpha = 1.0;
5393 # if (alpha_wrapper != nil) {
5394 # alpha = [alpha_wrapper value];
5395 # }
5396 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5397 # }
5398 #
5399 # static Color* toProto(UIColor* color) {
5400 # CGFloat red, green, blue, alpha;
5401 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5402 # return nil;
5403 # }
5404 # Color* result = [Color alloc] init];
5405 # [result setRed:red];
5406 # [result setGreen:green];
5407 # [result setBlue:blue];
5408 # if (alpha <= 0.9999) {
5409 # [result setAlpha:floatWrapperWithValue(alpha)];
5410 # }
5411 # [result autorelease];
5412 # return result;
5413 # }
5414 # // ...
5415 #
5416 # Example (JavaScript):
5417 #
5418 # // ...
5419 #
5420 # var protoToCssColor = function(rgb_color) {
5421 # var redFrac = rgb_color.red || 0.0;
5422 # var greenFrac = rgb_color.green || 0.0;
5423 # var blueFrac = rgb_color.blue || 0.0;
5424 # var red = Math.floor(redFrac * 255);
5425 # var green = Math.floor(greenFrac * 255);
5426 # var blue = Math.floor(blueFrac * 255);
5427 #
5428 # if (!('alpha' in rgb_color)) {
5429 # return rgbToCssColor_(red, green, blue);
5430 # }
5431 #
5432 # var alphaFrac = rgb_color.alpha.value || 0.0;
5433 # var rgbParams = [red, green, blue].join(',');
5434 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5435 # };
5436 #
5437 # var rgbToCssColor_ = function(red, green, blue) {
5438 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5439 # var hexString = rgbNumber.toString(16);
5440 # var missingZeros = 6 - hexString.length;
5441 # var resultBuilder = ['#'];
5442 # for (var i = 0; i < missingZeros; i++) {
5443 # resultBuilder.push('0');
5444 # }
5445 # resultBuilder.push(hexString);
5446 # return resultBuilder.join('');
5447 # };
5448 #
5449 # // ...
5450 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5451 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5452 # the final pixel color is defined by the equation:
5453 #
5454 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5455 #
5456 # This means that a value of 1.0 corresponds to a solid color, whereas
5457 # a value of 0.0 corresponds to a completely transparent color. This
5458 # uses a wrapper message rather than a simple float scalar so that it is
5459 # possible to distinguish between a default value and the value being unset.
5460 # If omitted, this color object is to be rendered as a solid color
5461 # (as if the alpha value had been explicitly given with a value of 1.0).
5462 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5463 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5464 },
5465 "bold": True or False, # True if the text is bold.
5466 "strikethrough": True or False, # True if the text has a strikethrough.
5467 "fontFamily": "A String", # The font family.
5468 "fontSize": 42, # The size of the font.
5469 "italic": True or False, # True if the text is italicized.
5470 "underline": True or False, # True if the text is underlined.
5471 },
Thomas Coffee2f245372017-03-27 10:39:26 -07005472 "title": "A String", # The title of this axis. If set, this overrides any title inferred
5473 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005474 },
5475 ],
5476 },
5477 "title": "A String", # The title of the chart.
5478 },
5479 },
5480 },
5481 "addConditionalFormatRule": { # Adds a new conditional format rule at the given index. # Adds a new conditional format rule.
5482 # All subsequent rules' indexes are incremented.
5483 "index": 42, # The zero-based index where the rule should be inserted.
5484 "rule": { # A rule describing a conditional format. # The rule to add.
5485 "ranges": [ # The ranges that will be formatted if the condition is true.
5486 # All the ranges must be on the same grid.
5487 { # A range on a sheet.
5488 # All indexes are zero-based.
5489 # Indexes are half open, e.g the start index is inclusive
5490 # and the end index is exclusive -- [start_index, end_index).
5491 # Missing indexes indicate the range is unbounded on that side.
5492 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005493 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005494 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005495 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005496 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005497 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005498 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005499 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005500 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005501 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005502 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005503 # `Sheet1!A:B == sheet_id: 0,
5504 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005505 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005506 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005507 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005508 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005509 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005510 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005511 #
5512 # The start index must always be less than or equal to the end index.
5513 # If the start index equals the end index, then the range is empty.
5514 # Empty ranges are typically not meaningful and are usually rendered in the
5515 # UI as `#REF!`.
5516 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005517 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005518 "sheetId": 42, # The sheet this range is on.
5519 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07005520 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005521 },
5522 ],
5523 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
5524 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
5525 # the format will be applied.
5526 # BooleanConditions are used by conditional formatting,
5527 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005528 "values": [ # The values of the condition. The number of supported values depends
5529 # on the condition type. Some support zero values,
5530 # others one or two values,
5531 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
5532 { # The value of the condition.
5533 "relativeDate": "A String", # A relative date (based on the current date).
5534 # Valid only if the type is
5535 # DATE_BEFORE,
5536 # DATE_AFTER,
5537 # DATE_ON_OR_BEFORE or
5538 # DATE_ON_OR_AFTER.
5539 #
5540 # Relative dates are not supported in data validation.
5541 # They are supported only in conditional formatting and
5542 # conditional filters.
5543 "userEnteredValue": "A String", # A value the condition is based on.
5544 # The value will be parsed as if the user typed into a cell.
5545 # Formulas are supported (and must begin with an `=`).
5546 },
5547 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005548 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005549 },
5550 "format": { # The format of a cell. # The format to apply.
5551 # Conditional formatting can only apply a subset of formatting:
5552 # bold, italic,
5553 # strikethrough,
5554 # foreground color &
5555 # background color.
5556 "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 -07005557 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
5558 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005559 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07005560 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005561 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005562 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005563 },
5564 "textDirection": "A String", # The direction of the text in the cell.
5565 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
5566 # When updating padding, every field must be specified.
5567 "top": 42, # The top padding of the cell.
5568 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005569 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005570 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005571 },
Thomas Coffee2f245372017-03-27 10:39:26 -07005572 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005573 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
5574 # for simplicity of conversion to/from color representations in various
5575 # languages over compactness; for example, the fields of this representation
5576 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5577 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5578 # method in iOS; and, with just a little work, it can be easily formatted into
5579 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5580 #
5581 # Example (Java):
5582 #
5583 # import com.google.type.Color;
5584 #
5585 # // ...
5586 # public static java.awt.Color fromProto(Color protocolor) {
5587 # float alpha = protocolor.hasAlpha()
5588 # ? protocolor.getAlpha().getValue()
5589 # : 1.0;
5590 #
5591 # return new java.awt.Color(
5592 # protocolor.getRed(),
5593 # protocolor.getGreen(),
5594 # protocolor.getBlue(),
5595 # alpha);
5596 # }
5597 #
5598 # public static Color toProto(java.awt.Color color) {
5599 # float red = (float) color.getRed();
5600 # float green = (float) color.getGreen();
5601 # float blue = (float) color.getBlue();
5602 # float denominator = 255.0;
5603 # Color.Builder resultBuilder =
5604 # Color
5605 # .newBuilder()
5606 # .setRed(red / denominator)
5607 # .setGreen(green / denominator)
5608 # .setBlue(blue / denominator);
5609 # int alpha = color.getAlpha();
5610 # if (alpha != 255) {
5611 # result.setAlpha(
5612 # FloatValue
5613 # .newBuilder()
5614 # .setValue(((float) alpha) / denominator)
5615 # .build());
5616 # }
5617 # return resultBuilder.build();
5618 # }
5619 # // ...
5620 #
5621 # Example (iOS / Obj-C):
5622 #
5623 # // ...
5624 # static UIColor* fromProto(Color* protocolor) {
5625 # float red = [protocolor red];
5626 # float green = [protocolor green];
5627 # float blue = [protocolor blue];
5628 # FloatValue* alpha_wrapper = [protocolor alpha];
5629 # float alpha = 1.0;
5630 # if (alpha_wrapper != nil) {
5631 # alpha = [alpha_wrapper value];
5632 # }
5633 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5634 # }
5635 #
5636 # static Color* toProto(UIColor* color) {
5637 # CGFloat red, green, blue, alpha;
5638 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5639 # return nil;
5640 # }
5641 # Color* result = [Color alloc] init];
5642 # [result setRed:red];
5643 # [result setGreen:green];
5644 # [result setBlue:blue];
5645 # if (alpha <= 0.9999) {
5646 # [result setAlpha:floatWrapperWithValue(alpha)];
5647 # }
5648 # [result autorelease];
5649 # return result;
5650 # }
5651 # // ...
5652 #
5653 # Example (JavaScript):
5654 #
5655 # // ...
5656 #
5657 # var protoToCssColor = function(rgb_color) {
5658 # var redFrac = rgb_color.red || 0.0;
5659 # var greenFrac = rgb_color.green || 0.0;
5660 # var blueFrac = rgb_color.blue || 0.0;
5661 # var red = Math.floor(redFrac * 255);
5662 # var green = Math.floor(greenFrac * 255);
5663 # var blue = Math.floor(blueFrac * 255);
5664 #
5665 # if (!('alpha' in rgb_color)) {
5666 # return rgbToCssColor_(red, green, blue);
5667 # }
5668 #
5669 # var alphaFrac = rgb_color.alpha.value || 0.0;
5670 # var rgbParams = [red, green, blue].join(',');
5671 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5672 # };
5673 #
5674 # var rgbToCssColor_ = function(red, green, blue) {
5675 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5676 # var hexString = rgbNumber.toString(16);
5677 # var missingZeros = 6 - hexString.length;
5678 # var resultBuilder = ['#'];
5679 # for (var i = 0; i < missingZeros; i++) {
5680 # resultBuilder.push('0');
5681 # }
5682 # resultBuilder.push(hexString);
5683 # return resultBuilder.join('');
5684 # };
5685 #
5686 # // ...
5687 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5688 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5689 # the final pixel color is defined by the equation:
5690 #
5691 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5692 #
5693 # This means that a value of 1.0 corresponds to a solid color, whereas
5694 # a value of 0.0 corresponds to a completely transparent color. This
5695 # uses a wrapper message rather than a simple float scalar so that it is
5696 # possible to distinguish between a default value and the value being unset.
5697 # If omitted, this color object is to be rendered as a solid color
5698 # (as if the alpha value had been explicitly given with a value of 1.0).
5699 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5700 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5701 },
Thomas Coffee2f245372017-03-27 10:39:26 -07005702 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005703 "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).
5704 # Absent values indicate that the field isn't specified.
5705 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
5706 # for simplicity of conversion to/from color representations in various
5707 # languages over compactness; for example, the fields of this representation
5708 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5709 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5710 # method in iOS; and, with just a little work, it can be easily formatted into
5711 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5712 #
5713 # Example (Java):
5714 #
5715 # import com.google.type.Color;
5716 #
5717 # // ...
5718 # public static java.awt.Color fromProto(Color protocolor) {
5719 # float alpha = protocolor.hasAlpha()
5720 # ? protocolor.getAlpha().getValue()
5721 # : 1.0;
5722 #
5723 # return new java.awt.Color(
5724 # protocolor.getRed(),
5725 # protocolor.getGreen(),
5726 # protocolor.getBlue(),
5727 # alpha);
5728 # }
5729 #
5730 # public static Color toProto(java.awt.Color color) {
5731 # float red = (float) color.getRed();
5732 # float green = (float) color.getGreen();
5733 # float blue = (float) color.getBlue();
5734 # float denominator = 255.0;
5735 # Color.Builder resultBuilder =
5736 # Color
5737 # .newBuilder()
5738 # .setRed(red / denominator)
5739 # .setGreen(green / denominator)
5740 # .setBlue(blue / denominator);
5741 # int alpha = color.getAlpha();
5742 # if (alpha != 255) {
5743 # result.setAlpha(
5744 # FloatValue
5745 # .newBuilder()
5746 # .setValue(((float) alpha) / denominator)
5747 # .build());
5748 # }
5749 # return resultBuilder.build();
5750 # }
5751 # // ...
5752 #
5753 # Example (iOS / Obj-C):
5754 #
5755 # // ...
5756 # static UIColor* fromProto(Color* protocolor) {
5757 # float red = [protocolor red];
5758 # float green = [protocolor green];
5759 # float blue = [protocolor blue];
5760 # FloatValue* alpha_wrapper = [protocolor alpha];
5761 # float alpha = 1.0;
5762 # if (alpha_wrapper != nil) {
5763 # alpha = [alpha_wrapper value];
5764 # }
5765 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5766 # }
5767 #
5768 # static Color* toProto(UIColor* color) {
5769 # CGFloat red, green, blue, alpha;
5770 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5771 # return nil;
5772 # }
5773 # Color* result = [Color alloc] init];
5774 # [result setRed:red];
5775 # [result setGreen:green];
5776 # [result setBlue:blue];
5777 # if (alpha <= 0.9999) {
5778 # [result setAlpha:floatWrapperWithValue(alpha)];
5779 # }
5780 # [result autorelease];
5781 # return result;
5782 # }
5783 # // ...
5784 #
5785 # Example (JavaScript):
5786 #
5787 # // ...
5788 #
5789 # var protoToCssColor = function(rgb_color) {
5790 # var redFrac = rgb_color.red || 0.0;
5791 # var greenFrac = rgb_color.green || 0.0;
5792 # var blueFrac = rgb_color.blue || 0.0;
5793 # var red = Math.floor(redFrac * 255);
5794 # var green = Math.floor(greenFrac * 255);
5795 # var blue = Math.floor(blueFrac * 255);
5796 #
5797 # if (!('alpha' in rgb_color)) {
5798 # return rgbToCssColor_(red, green, blue);
5799 # }
5800 #
5801 # var alphaFrac = rgb_color.alpha.value || 0.0;
5802 # var rgbParams = [red, green, blue].join(',');
5803 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5804 # };
5805 #
5806 # var rgbToCssColor_ = function(red, green, blue) {
5807 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5808 # var hexString = rgbNumber.toString(16);
5809 # var missingZeros = 6 - hexString.length;
5810 # var resultBuilder = ['#'];
5811 # for (var i = 0; i < missingZeros; i++) {
5812 # resultBuilder.push('0');
5813 # }
5814 # resultBuilder.push(hexString);
5815 # return resultBuilder.join('');
5816 # };
5817 #
5818 # // ...
5819 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5820 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5821 # the final pixel color is defined by the equation:
5822 #
5823 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5824 #
5825 # This means that a value of 1.0 corresponds to a solid color, whereas
5826 # a value of 0.0 corresponds to a completely transparent color. This
5827 # uses a wrapper message rather than a simple float scalar so that it is
5828 # possible to distinguish between a default value and the value being unset.
5829 # If omitted, this color object is to be rendered as a solid color
5830 # (as if the alpha value had been explicitly given with a value of 1.0).
5831 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5832 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5833 },
5834 "bold": True or False, # True if the text is bold.
5835 "strikethrough": True or False, # True if the text has a strikethrough.
5836 "fontFamily": "A String", # The font family.
5837 "fontSize": 42, # The size of the font.
5838 "italic": True or False, # True if the text is italicized.
5839 "underline": True or False, # True if the text is underlined.
5840 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07005841 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
5842 "angle": 42, # The angle between the standard orientation and the desired orientation.
5843 # Measured in degrees. Valid values are between -90 and 90. Positive
5844 # angles are angled upwards, negative are angled downwards.
5845 #
5846 # Note: For LTR text direction positive angles are in the counterclockwise
5847 # direction, whereas for RTL they are in the clockwise direction
5848 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
5849 # characters is unchanged.
5850 # For example:
5851 #
5852 # | V |
5853 # | e |
5854 # | r |
5855 # | t |
5856 # | i |
5857 # | c |
5858 # | a |
5859 # | l |
5860 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005861 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
5862 "borders": { # The borders of the cell. # The borders of the cell.
5863 "top": { # A border along a cell. # The top border of the cell.
5864 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5865 # for simplicity of conversion to/from color representations in various
5866 # languages over compactness; for example, the fields of this representation
5867 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5868 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5869 # method in iOS; and, with just a little work, it can be easily formatted into
5870 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5871 #
5872 # Example (Java):
5873 #
5874 # import com.google.type.Color;
5875 #
5876 # // ...
5877 # public static java.awt.Color fromProto(Color protocolor) {
5878 # float alpha = protocolor.hasAlpha()
5879 # ? protocolor.getAlpha().getValue()
5880 # : 1.0;
5881 #
5882 # return new java.awt.Color(
5883 # protocolor.getRed(),
5884 # protocolor.getGreen(),
5885 # protocolor.getBlue(),
5886 # alpha);
5887 # }
5888 #
5889 # public static Color toProto(java.awt.Color color) {
5890 # float red = (float) color.getRed();
5891 # float green = (float) color.getGreen();
5892 # float blue = (float) color.getBlue();
5893 # float denominator = 255.0;
5894 # Color.Builder resultBuilder =
5895 # Color
5896 # .newBuilder()
5897 # .setRed(red / denominator)
5898 # .setGreen(green / denominator)
5899 # .setBlue(blue / denominator);
5900 # int alpha = color.getAlpha();
5901 # if (alpha != 255) {
5902 # result.setAlpha(
5903 # FloatValue
5904 # .newBuilder()
5905 # .setValue(((float) alpha) / denominator)
5906 # .build());
5907 # }
5908 # return resultBuilder.build();
5909 # }
5910 # // ...
5911 #
5912 # Example (iOS / Obj-C):
5913 #
5914 # // ...
5915 # static UIColor* fromProto(Color* protocolor) {
5916 # float red = [protocolor red];
5917 # float green = [protocolor green];
5918 # float blue = [protocolor blue];
5919 # FloatValue* alpha_wrapper = [protocolor alpha];
5920 # float alpha = 1.0;
5921 # if (alpha_wrapper != nil) {
5922 # alpha = [alpha_wrapper value];
5923 # }
5924 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5925 # }
5926 #
5927 # static Color* toProto(UIColor* color) {
5928 # CGFloat red, green, blue, alpha;
5929 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5930 # return nil;
5931 # }
5932 # Color* result = [Color alloc] init];
5933 # [result setRed:red];
5934 # [result setGreen:green];
5935 # [result setBlue:blue];
5936 # if (alpha <= 0.9999) {
5937 # [result setAlpha:floatWrapperWithValue(alpha)];
5938 # }
5939 # [result autorelease];
5940 # return result;
5941 # }
5942 # // ...
5943 #
5944 # Example (JavaScript):
5945 #
5946 # // ...
5947 #
5948 # var protoToCssColor = function(rgb_color) {
5949 # var redFrac = rgb_color.red || 0.0;
5950 # var greenFrac = rgb_color.green || 0.0;
5951 # var blueFrac = rgb_color.blue || 0.0;
5952 # var red = Math.floor(redFrac * 255);
5953 # var green = Math.floor(greenFrac * 255);
5954 # var blue = Math.floor(blueFrac * 255);
5955 #
5956 # if (!('alpha' in rgb_color)) {
5957 # return rgbToCssColor_(red, green, blue);
5958 # }
5959 #
5960 # var alphaFrac = rgb_color.alpha.value || 0.0;
5961 # var rgbParams = [red, green, blue].join(',');
5962 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5963 # };
5964 #
5965 # var rgbToCssColor_ = function(red, green, blue) {
5966 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5967 # var hexString = rgbNumber.toString(16);
5968 # var missingZeros = 6 - hexString.length;
5969 # var resultBuilder = ['#'];
5970 # for (var i = 0; i < missingZeros; i++) {
5971 # resultBuilder.push('0');
5972 # }
5973 # resultBuilder.push(hexString);
5974 # return resultBuilder.join('');
5975 # };
5976 #
5977 # // ...
5978 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5979 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5980 # the final pixel color is defined by the equation:
5981 #
5982 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5983 #
5984 # This means that a value of 1.0 corresponds to a solid color, whereas
5985 # a value of 0.0 corresponds to a completely transparent color. This
5986 # uses a wrapper message rather than a simple float scalar so that it is
5987 # possible to distinguish between a default value and the value being unset.
5988 # If omitted, this color object is to be rendered as a solid color
5989 # (as if the alpha value had been explicitly given with a value of 1.0).
5990 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5991 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5992 },
5993 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005994 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005995 "style": "A String", # The style of the border.
5996 },
5997 "right": { # A border along a cell. # The right border of the cell.
5998 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5999 # for simplicity of conversion to/from color representations in various
6000 # languages over compactness; for example, the fields of this representation
6001 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6002 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6003 # method in iOS; and, with just a little work, it can be easily formatted into
6004 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6005 #
6006 # Example (Java):
6007 #
6008 # import com.google.type.Color;
6009 #
6010 # // ...
6011 # public static java.awt.Color fromProto(Color protocolor) {
6012 # float alpha = protocolor.hasAlpha()
6013 # ? protocolor.getAlpha().getValue()
6014 # : 1.0;
6015 #
6016 # return new java.awt.Color(
6017 # protocolor.getRed(),
6018 # protocolor.getGreen(),
6019 # protocolor.getBlue(),
6020 # alpha);
6021 # }
6022 #
6023 # public static Color toProto(java.awt.Color color) {
6024 # float red = (float) color.getRed();
6025 # float green = (float) color.getGreen();
6026 # float blue = (float) color.getBlue();
6027 # float denominator = 255.0;
6028 # Color.Builder resultBuilder =
6029 # Color
6030 # .newBuilder()
6031 # .setRed(red / denominator)
6032 # .setGreen(green / denominator)
6033 # .setBlue(blue / denominator);
6034 # int alpha = color.getAlpha();
6035 # if (alpha != 255) {
6036 # result.setAlpha(
6037 # FloatValue
6038 # .newBuilder()
6039 # .setValue(((float) alpha) / denominator)
6040 # .build());
6041 # }
6042 # return resultBuilder.build();
6043 # }
6044 # // ...
6045 #
6046 # Example (iOS / Obj-C):
6047 #
6048 # // ...
6049 # static UIColor* fromProto(Color* protocolor) {
6050 # float red = [protocolor red];
6051 # float green = [protocolor green];
6052 # float blue = [protocolor blue];
6053 # FloatValue* alpha_wrapper = [protocolor alpha];
6054 # float alpha = 1.0;
6055 # if (alpha_wrapper != nil) {
6056 # alpha = [alpha_wrapper value];
6057 # }
6058 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6059 # }
6060 #
6061 # static Color* toProto(UIColor* color) {
6062 # CGFloat red, green, blue, alpha;
6063 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6064 # return nil;
6065 # }
6066 # Color* result = [Color alloc] init];
6067 # [result setRed:red];
6068 # [result setGreen:green];
6069 # [result setBlue:blue];
6070 # if (alpha <= 0.9999) {
6071 # [result setAlpha:floatWrapperWithValue(alpha)];
6072 # }
6073 # [result autorelease];
6074 # return result;
6075 # }
6076 # // ...
6077 #
6078 # Example (JavaScript):
6079 #
6080 # // ...
6081 #
6082 # var protoToCssColor = function(rgb_color) {
6083 # var redFrac = rgb_color.red || 0.0;
6084 # var greenFrac = rgb_color.green || 0.0;
6085 # var blueFrac = rgb_color.blue || 0.0;
6086 # var red = Math.floor(redFrac * 255);
6087 # var green = Math.floor(greenFrac * 255);
6088 # var blue = Math.floor(blueFrac * 255);
6089 #
6090 # if (!('alpha' in rgb_color)) {
6091 # return rgbToCssColor_(red, green, blue);
6092 # }
6093 #
6094 # var alphaFrac = rgb_color.alpha.value || 0.0;
6095 # var rgbParams = [red, green, blue].join(',');
6096 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6097 # };
6098 #
6099 # var rgbToCssColor_ = function(red, green, blue) {
6100 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6101 # var hexString = rgbNumber.toString(16);
6102 # var missingZeros = 6 - hexString.length;
6103 # var resultBuilder = ['#'];
6104 # for (var i = 0; i < missingZeros; i++) {
6105 # resultBuilder.push('0');
6106 # }
6107 # resultBuilder.push(hexString);
6108 # return resultBuilder.join('');
6109 # };
6110 #
6111 # // ...
6112 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6113 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6114 # the final pixel color is defined by the equation:
6115 #
6116 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6117 #
6118 # This means that a value of 1.0 corresponds to a solid color, whereas
6119 # a value of 0.0 corresponds to a completely transparent color. This
6120 # uses a wrapper message rather than a simple float scalar so that it is
6121 # possible to distinguish between a default value and the value being unset.
6122 # If omitted, this color object is to be rendered as a solid color
6123 # (as if the alpha value had been explicitly given with a value of 1.0).
6124 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6125 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6126 },
6127 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006128 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006129 "style": "A String", # The style of the border.
6130 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006131 "left": { # A border along a cell. # The left border of the cell.
6132 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6133 # for simplicity of conversion to/from color representations in various
6134 # languages over compactness; for example, the fields of this representation
6135 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6136 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6137 # method in iOS; and, with just a little work, it can be easily formatted into
6138 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6139 #
6140 # Example (Java):
6141 #
6142 # import com.google.type.Color;
6143 #
6144 # // ...
6145 # public static java.awt.Color fromProto(Color protocolor) {
6146 # float alpha = protocolor.hasAlpha()
6147 # ? protocolor.getAlpha().getValue()
6148 # : 1.0;
6149 #
6150 # return new java.awt.Color(
6151 # protocolor.getRed(),
6152 # protocolor.getGreen(),
6153 # protocolor.getBlue(),
6154 # alpha);
6155 # }
6156 #
6157 # public static Color toProto(java.awt.Color color) {
6158 # float red = (float) color.getRed();
6159 # float green = (float) color.getGreen();
6160 # float blue = (float) color.getBlue();
6161 # float denominator = 255.0;
6162 # Color.Builder resultBuilder =
6163 # Color
6164 # .newBuilder()
6165 # .setRed(red / denominator)
6166 # .setGreen(green / denominator)
6167 # .setBlue(blue / denominator);
6168 # int alpha = color.getAlpha();
6169 # if (alpha != 255) {
6170 # result.setAlpha(
6171 # FloatValue
6172 # .newBuilder()
6173 # .setValue(((float) alpha) / denominator)
6174 # .build());
6175 # }
6176 # return resultBuilder.build();
6177 # }
6178 # // ...
6179 #
6180 # Example (iOS / Obj-C):
6181 #
6182 # // ...
6183 # static UIColor* fromProto(Color* protocolor) {
6184 # float red = [protocolor red];
6185 # float green = [protocolor green];
6186 # float blue = [protocolor blue];
6187 # FloatValue* alpha_wrapper = [protocolor alpha];
6188 # float alpha = 1.0;
6189 # if (alpha_wrapper != nil) {
6190 # alpha = [alpha_wrapper value];
6191 # }
6192 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6193 # }
6194 #
6195 # static Color* toProto(UIColor* color) {
6196 # CGFloat red, green, blue, alpha;
6197 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6198 # return nil;
6199 # }
6200 # Color* result = [Color alloc] init];
6201 # [result setRed:red];
6202 # [result setGreen:green];
6203 # [result setBlue:blue];
6204 # if (alpha <= 0.9999) {
6205 # [result setAlpha:floatWrapperWithValue(alpha)];
6206 # }
6207 # [result autorelease];
6208 # return result;
6209 # }
6210 # // ...
6211 #
6212 # Example (JavaScript):
6213 #
6214 # // ...
6215 #
6216 # var protoToCssColor = function(rgb_color) {
6217 # var redFrac = rgb_color.red || 0.0;
6218 # var greenFrac = rgb_color.green || 0.0;
6219 # var blueFrac = rgb_color.blue || 0.0;
6220 # var red = Math.floor(redFrac * 255);
6221 # var green = Math.floor(greenFrac * 255);
6222 # var blue = Math.floor(blueFrac * 255);
6223 #
6224 # if (!('alpha' in rgb_color)) {
6225 # return rgbToCssColor_(red, green, blue);
6226 # }
6227 #
6228 # var alphaFrac = rgb_color.alpha.value || 0.0;
6229 # var rgbParams = [red, green, blue].join(',');
6230 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6231 # };
6232 #
6233 # var rgbToCssColor_ = function(red, green, blue) {
6234 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6235 # var hexString = rgbNumber.toString(16);
6236 # var missingZeros = 6 - hexString.length;
6237 # var resultBuilder = ['#'];
6238 # for (var i = 0; i < missingZeros; i++) {
6239 # resultBuilder.push('0');
6240 # }
6241 # resultBuilder.push(hexString);
6242 # return resultBuilder.join('');
6243 # };
6244 #
6245 # // ...
6246 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6247 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6248 # the final pixel color is defined by the equation:
6249 #
6250 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6251 #
6252 # This means that a value of 1.0 corresponds to a solid color, whereas
6253 # a value of 0.0 corresponds to a completely transparent color. This
6254 # uses a wrapper message rather than a simple float scalar so that it is
6255 # possible to distinguish between a default value and the value being unset.
6256 # If omitted, this color object is to be rendered as a solid color
6257 # (as if the alpha value had been explicitly given with a value of 1.0).
6258 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6259 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6260 },
6261 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006262 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006263 "style": "A String", # The style of the border.
6264 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07006265 "bottom": { # A border along a cell. # The bottom border of the cell.
6266 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6267 # for simplicity of conversion to/from color representations in various
6268 # languages over compactness; for example, the fields of this representation
6269 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6270 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6271 # method in iOS; and, with just a little work, it can be easily formatted into
6272 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6273 #
6274 # Example (Java):
6275 #
6276 # import com.google.type.Color;
6277 #
6278 # // ...
6279 # public static java.awt.Color fromProto(Color protocolor) {
6280 # float alpha = protocolor.hasAlpha()
6281 # ? protocolor.getAlpha().getValue()
6282 # : 1.0;
6283 #
6284 # return new java.awt.Color(
6285 # protocolor.getRed(),
6286 # protocolor.getGreen(),
6287 # protocolor.getBlue(),
6288 # alpha);
6289 # }
6290 #
6291 # public static Color toProto(java.awt.Color color) {
6292 # float red = (float) color.getRed();
6293 # float green = (float) color.getGreen();
6294 # float blue = (float) color.getBlue();
6295 # float denominator = 255.0;
6296 # Color.Builder resultBuilder =
6297 # Color
6298 # .newBuilder()
6299 # .setRed(red / denominator)
6300 # .setGreen(green / denominator)
6301 # .setBlue(blue / denominator);
6302 # int alpha = color.getAlpha();
6303 # if (alpha != 255) {
6304 # result.setAlpha(
6305 # FloatValue
6306 # .newBuilder()
6307 # .setValue(((float) alpha) / denominator)
6308 # .build());
6309 # }
6310 # return resultBuilder.build();
6311 # }
6312 # // ...
6313 #
6314 # Example (iOS / Obj-C):
6315 #
6316 # // ...
6317 # static UIColor* fromProto(Color* protocolor) {
6318 # float red = [protocolor red];
6319 # float green = [protocolor green];
6320 # float blue = [protocolor blue];
6321 # FloatValue* alpha_wrapper = [protocolor alpha];
6322 # float alpha = 1.0;
6323 # if (alpha_wrapper != nil) {
6324 # alpha = [alpha_wrapper value];
6325 # }
6326 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6327 # }
6328 #
6329 # static Color* toProto(UIColor* color) {
6330 # CGFloat red, green, blue, alpha;
6331 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6332 # return nil;
6333 # }
6334 # Color* result = [Color alloc] init];
6335 # [result setRed:red];
6336 # [result setGreen:green];
6337 # [result setBlue:blue];
6338 # if (alpha <= 0.9999) {
6339 # [result setAlpha:floatWrapperWithValue(alpha)];
6340 # }
6341 # [result autorelease];
6342 # return result;
6343 # }
6344 # // ...
6345 #
6346 # Example (JavaScript):
6347 #
6348 # // ...
6349 #
6350 # var protoToCssColor = function(rgb_color) {
6351 # var redFrac = rgb_color.red || 0.0;
6352 # var greenFrac = rgb_color.green || 0.0;
6353 # var blueFrac = rgb_color.blue || 0.0;
6354 # var red = Math.floor(redFrac * 255);
6355 # var green = Math.floor(greenFrac * 255);
6356 # var blue = Math.floor(blueFrac * 255);
6357 #
6358 # if (!('alpha' in rgb_color)) {
6359 # return rgbToCssColor_(red, green, blue);
6360 # }
6361 #
6362 # var alphaFrac = rgb_color.alpha.value || 0.0;
6363 # var rgbParams = [red, green, blue].join(',');
6364 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6365 # };
6366 #
6367 # var rgbToCssColor_ = function(red, green, blue) {
6368 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6369 # var hexString = rgbNumber.toString(16);
6370 # var missingZeros = 6 - hexString.length;
6371 # var resultBuilder = ['#'];
6372 # for (var i = 0; i < missingZeros; i++) {
6373 # resultBuilder.push('0');
6374 # }
6375 # resultBuilder.push(hexString);
6376 # return resultBuilder.join('');
6377 # };
6378 #
6379 # // ...
6380 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6381 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6382 # the final pixel color is defined by the equation:
6383 #
6384 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6385 #
6386 # This means that a value of 1.0 corresponds to a solid color, whereas
6387 # a value of 0.0 corresponds to a completely transparent color. This
6388 # uses a wrapper message rather than a simple float scalar so that it is
6389 # possible to distinguish between a default value and the value being unset.
6390 # If omitted, this color object is to be rendered as a solid color
6391 # (as if the alpha value had been explicitly given with a value of 1.0).
6392 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6393 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6394 },
6395 "width": 42, # The width of the border, in pixels.
6396 # Deprecated; the width is determined by the "style" field.
6397 "style": "A String", # The style of the border.
6398 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006399 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07006400 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006401 },
6402 },
6403 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
6404 # the interpolation points listed. The format of a cell will vary
6405 # based on its contents as compared to the values of the interpolation
6406 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006407 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006408 # These pin the gradient color scale according to the color,
6409 # type and value chosen.
6410 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
6411 # for simplicity of conversion to/from color representations in various
6412 # languages over compactness; for example, the fields of this representation
6413 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6414 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6415 # method in iOS; and, with just a little work, it can be easily formatted into
6416 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6417 #
6418 # Example (Java):
6419 #
6420 # import com.google.type.Color;
6421 #
6422 # // ...
6423 # public static java.awt.Color fromProto(Color protocolor) {
6424 # float alpha = protocolor.hasAlpha()
6425 # ? protocolor.getAlpha().getValue()
6426 # : 1.0;
6427 #
6428 # return new java.awt.Color(
6429 # protocolor.getRed(),
6430 # protocolor.getGreen(),
6431 # protocolor.getBlue(),
6432 # alpha);
6433 # }
6434 #
6435 # public static Color toProto(java.awt.Color color) {
6436 # float red = (float) color.getRed();
6437 # float green = (float) color.getGreen();
6438 # float blue = (float) color.getBlue();
6439 # float denominator = 255.0;
6440 # Color.Builder resultBuilder =
6441 # Color
6442 # .newBuilder()
6443 # .setRed(red / denominator)
6444 # .setGreen(green / denominator)
6445 # .setBlue(blue / denominator);
6446 # int alpha = color.getAlpha();
6447 # if (alpha != 255) {
6448 # result.setAlpha(
6449 # FloatValue
6450 # .newBuilder()
6451 # .setValue(((float) alpha) / denominator)
6452 # .build());
6453 # }
6454 # return resultBuilder.build();
6455 # }
6456 # // ...
6457 #
6458 # Example (iOS / Obj-C):
6459 #
6460 # // ...
6461 # static UIColor* fromProto(Color* protocolor) {
6462 # float red = [protocolor red];
6463 # float green = [protocolor green];
6464 # float blue = [protocolor blue];
6465 # FloatValue* alpha_wrapper = [protocolor alpha];
6466 # float alpha = 1.0;
6467 # if (alpha_wrapper != nil) {
6468 # alpha = [alpha_wrapper value];
6469 # }
6470 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6471 # }
6472 #
6473 # static Color* toProto(UIColor* color) {
6474 # CGFloat red, green, blue, alpha;
6475 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6476 # return nil;
6477 # }
6478 # Color* result = [Color alloc] init];
6479 # [result setRed:red];
6480 # [result setGreen:green];
6481 # [result setBlue:blue];
6482 # if (alpha <= 0.9999) {
6483 # [result setAlpha:floatWrapperWithValue(alpha)];
6484 # }
6485 # [result autorelease];
6486 # return result;
6487 # }
6488 # // ...
6489 #
6490 # Example (JavaScript):
6491 #
6492 # // ...
6493 #
6494 # var protoToCssColor = function(rgb_color) {
6495 # var redFrac = rgb_color.red || 0.0;
6496 # var greenFrac = rgb_color.green || 0.0;
6497 # var blueFrac = rgb_color.blue || 0.0;
6498 # var red = Math.floor(redFrac * 255);
6499 # var green = Math.floor(greenFrac * 255);
6500 # var blue = Math.floor(blueFrac * 255);
6501 #
6502 # if (!('alpha' in rgb_color)) {
6503 # return rgbToCssColor_(red, green, blue);
6504 # }
6505 #
6506 # var alphaFrac = rgb_color.alpha.value || 0.0;
6507 # var rgbParams = [red, green, blue].join(',');
6508 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6509 # };
6510 #
6511 # var rgbToCssColor_ = function(red, green, blue) {
6512 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6513 # var hexString = rgbNumber.toString(16);
6514 # var missingZeros = 6 - hexString.length;
6515 # var resultBuilder = ['#'];
6516 # for (var i = 0; i < missingZeros; i++) {
6517 # resultBuilder.push('0');
6518 # }
6519 # resultBuilder.push(hexString);
6520 # return resultBuilder.join('');
6521 # };
6522 #
6523 # // ...
6524 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6525 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6526 # the final pixel color is defined by the equation:
6527 #
6528 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6529 #
6530 # This means that a value of 1.0 corresponds to a solid color, whereas
6531 # a value of 0.0 corresponds to a completely transparent color. This
6532 # uses a wrapper message rather than a simple float scalar so that it is
6533 # possible to distinguish between a default value and the value being unset.
6534 # If omitted, this color object is to be rendered as a solid color
6535 # (as if the alpha value had been explicitly given with a value of 1.0).
6536 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6537 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6538 },
6539 "type": "A String", # How the value should be interpreted.
6540 "value": "A String", # The value this interpolation point uses. May be a formula.
6541 # Unused if type is MIN or
6542 # MAX.
6543 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006544 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006545 # These pin the gradient color scale according to the color,
6546 # type and value chosen.
6547 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
6548 # for simplicity of conversion to/from color representations in various
6549 # languages over compactness; for example, the fields of this representation
6550 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6551 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6552 # method in iOS; and, with just a little work, it can be easily formatted into
6553 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6554 #
6555 # Example (Java):
6556 #
6557 # import com.google.type.Color;
6558 #
6559 # // ...
6560 # public static java.awt.Color fromProto(Color protocolor) {
6561 # float alpha = protocolor.hasAlpha()
6562 # ? protocolor.getAlpha().getValue()
6563 # : 1.0;
6564 #
6565 # return new java.awt.Color(
6566 # protocolor.getRed(),
6567 # protocolor.getGreen(),
6568 # protocolor.getBlue(),
6569 # alpha);
6570 # }
6571 #
6572 # public static Color toProto(java.awt.Color color) {
6573 # float red = (float) color.getRed();
6574 # float green = (float) color.getGreen();
6575 # float blue = (float) color.getBlue();
6576 # float denominator = 255.0;
6577 # Color.Builder resultBuilder =
6578 # Color
6579 # .newBuilder()
6580 # .setRed(red / denominator)
6581 # .setGreen(green / denominator)
6582 # .setBlue(blue / denominator);
6583 # int alpha = color.getAlpha();
6584 # if (alpha != 255) {
6585 # result.setAlpha(
6586 # FloatValue
6587 # .newBuilder()
6588 # .setValue(((float) alpha) / denominator)
6589 # .build());
6590 # }
6591 # return resultBuilder.build();
6592 # }
6593 # // ...
6594 #
6595 # Example (iOS / Obj-C):
6596 #
6597 # // ...
6598 # static UIColor* fromProto(Color* protocolor) {
6599 # float red = [protocolor red];
6600 # float green = [protocolor green];
6601 # float blue = [protocolor blue];
6602 # FloatValue* alpha_wrapper = [protocolor alpha];
6603 # float alpha = 1.0;
6604 # if (alpha_wrapper != nil) {
6605 # alpha = [alpha_wrapper value];
6606 # }
6607 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6608 # }
6609 #
6610 # static Color* toProto(UIColor* color) {
6611 # CGFloat red, green, blue, alpha;
6612 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6613 # return nil;
6614 # }
6615 # Color* result = [Color alloc] init];
6616 # [result setRed:red];
6617 # [result setGreen:green];
6618 # [result setBlue:blue];
6619 # if (alpha <= 0.9999) {
6620 # [result setAlpha:floatWrapperWithValue(alpha)];
6621 # }
6622 # [result autorelease];
6623 # return result;
6624 # }
6625 # // ...
6626 #
6627 # Example (JavaScript):
6628 #
6629 # // ...
6630 #
6631 # var protoToCssColor = function(rgb_color) {
6632 # var redFrac = rgb_color.red || 0.0;
6633 # var greenFrac = rgb_color.green || 0.0;
6634 # var blueFrac = rgb_color.blue || 0.0;
6635 # var red = Math.floor(redFrac * 255);
6636 # var green = Math.floor(greenFrac * 255);
6637 # var blue = Math.floor(blueFrac * 255);
6638 #
6639 # if (!('alpha' in rgb_color)) {
6640 # return rgbToCssColor_(red, green, blue);
6641 # }
6642 #
6643 # var alphaFrac = rgb_color.alpha.value || 0.0;
6644 # var rgbParams = [red, green, blue].join(',');
6645 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6646 # };
6647 #
6648 # var rgbToCssColor_ = function(red, green, blue) {
6649 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6650 # var hexString = rgbNumber.toString(16);
6651 # var missingZeros = 6 - hexString.length;
6652 # var resultBuilder = ['#'];
6653 # for (var i = 0; i < missingZeros; i++) {
6654 # resultBuilder.push('0');
6655 # }
6656 # resultBuilder.push(hexString);
6657 # return resultBuilder.join('');
6658 # };
6659 #
6660 # // ...
6661 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6662 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6663 # the final pixel color is defined by the equation:
6664 #
6665 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6666 #
6667 # This means that a value of 1.0 corresponds to a solid color, whereas
6668 # a value of 0.0 corresponds to a completely transparent color. This
6669 # uses a wrapper message rather than a simple float scalar so that it is
6670 # possible to distinguish between a default value and the value being unset.
6671 # If omitted, this color object is to be rendered as a solid color
6672 # (as if the alpha value had been explicitly given with a value of 1.0).
6673 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6674 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6675 },
6676 "type": "A String", # How the value should be interpreted.
6677 "value": "A String", # The value this interpolation point uses. May be a formula.
6678 # Unused if type is MIN or
6679 # MAX.
6680 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006681 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006682 # These pin the gradient color scale according to the color,
6683 # type and value chosen.
6684 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
6685 # for simplicity of conversion to/from color representations in various
6686 # languages over compactness; for example, the fields of this representation
6687 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6688 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6689 # method in iOS; and, with just a little work, it can be easily formatted into
6690 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6691 #
6692 # Example (Java):
6693 #
6694 # import com.google.type.Color;
6695 #
6696 # // ...
6697 # public static java.awt.Color fromProto(Color protocolor) {
6698 # float alpha = protocolor.hasAlpha()
6699 # ? protocolor.getAlpha().getValue()
6700 # : 1.0;
6701 #
6702 # return new java.awt.Color(
6703 # protocolor.getRed(),
6704 # protocolor.getGreen(),
6705 # protocolor.getBlue(),
6706 # alpha);
6707 # }
6708 #
6709 # public static Color toProto(java.awt.Color color) {
6710 # float red = (float) color.getRed();
6711 # float green = (float) color.getGreen();
6712 # float blue = (float) color.getBlue();
6713 # float denominator = 255.0;
6714 # Color.Builder resultBuilder =
6715 # Color
6716 # .newBuilder()
6717 # .setRed(red / denominator)
6718 # .setGreen(green / denominator)
6719 # .setBlue(blue / denominator);
6720 # int alpha = color.getAlpha();
6721 # if (alpha != 255) {
6722 # result.setAlpha(
6723 # FloatValue
6724 # .newBuilder()
6725 # .setValue(((float) alpha) / denominator)
6726 # .build());
6727 # }
6728 # return resultBuilder.build();
6729 # }
6730 # // ...
6731 #
6732 # Example (iOS / Obj-C):
6733 #
6734 # // ...
6735 # static UIColor* fromProto(Color* protocolor) {
6736 # float red = [protocolor red];
6737 # float green = [protocolor green];
6738 # float blue = [protocolor blue];
6739 # FloatValue* alpha_wrapper = [protocolor alpha];
6740 # float alpha = 1.0;
6741 # if (alpha_wrapper != nil) {
6742 # alpha = [alpha_wrapper value];
6743 # }
6744 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6745 # }
6746 #
6747 # static Color* toProto(UIColor* color) {
6748 # CGFloat red, green, blue, alpha;
6749 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6750 # return nil;
6751 # }
6752 # Color* result = [Color alloc] init];
6753 # [result setRed:red];
6754 # [result setGreen:green];
6755 # [result setBlue:blue];
6756 # if (alpha <= 0.9999) {
6757 # [result setAlpha:floatWrapperWithValue(alpha)];
6758 # }
6759 # [result autorelease];
6760 # return result;
6761 # }
6762 # // ...
6763 #
6764 # Example (JavaScript):
6765 #
6766 # // ...
6767 #
6768 # var protoToCssColor = function(rgb_color) {
6769 # var redFrac = rgb_color.red || 0.0;
6770 # var greenFrac = rgb_color.green || 0.0;
6771 # var blueFrac = rgb_color.blue || 0.0;
6772 # var red = Math.floor(redFrac * 255);
6773 # var green = Math.floor(greenFrac * 255);
6774 # var blue = Math.floor(blueFrac * 255);
6775 #
6776 # if (!('alpha' in rgb_color)) {
6777 # return rgbToCssColor_(red, green, blue);
6778 # }
6779 #
6780 # var alphaFrac = rgb_color.alpha.value || 0.0;
6781 # var rgbParams = [red, green, blue].join(',');
6782 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6783 # };
6784 #
6785 # var rgbToCssColor_ = function(red, green, blue) {
6786 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6787 # var hexString = rgbNumber.toString(16);
6788 # var missingZeros = 6 - hexString.length;
6789 # var resultBuilder = ['#'];
6790 # for (var i = 0; i < missingZeros; i++) {
6791 # resultBuilder.push('0');
6792 # }
6793 # resultBuilder.push(hexString);
6794 # return resultBuilder.join('');
6795 # };
6796 #
6797 # // ...
6798 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6799 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6800 # the final pixel color is defined by the equation:
6801 #
6802 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6803 #
6804 # This means that a value of 1.0 corresponds to a solid color, whereas
6805 # a value of 0.0 corresponds to a completely transparent color. This
6806 # uses a wrapper message rather than a simple float scalar so that it is
6807 # possible to distinguish between a default value and the value being unset.
6808 # If omitted, this color object is to be rendered as a solid color
6809 # (as if the alpha value had been explicitly given with a value of 1.0).
6810 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6811 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6812 },
6813 "type": "A String", # How the value should be interpreted.
6814 "value": "A String", # The value this interpolation point uses. May be a formula.
6815 # Unused if type is MIN or
6816 # MAX.
6817 },
6818 },
6819 },
6820 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08006821 "deleteBanding": { # Removes the banded range with the given ID from the spreadsheet. # Removes a banded range
6822 "bandedRangeId": 42, # The ID of the banded range to delete.
6823 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006824 "repeatCell": { # Updates all cells in the range to the values in the given Cell object. # Repeats a single cell across a range.
6825 # Only the fields listed in the fields field are updated; others are
6826 # unchanged.
6827 #
6828 # If writing a cell with a formula, the formula's ranges will automatically
6829 # increment for each field in the range.
6830 # For example, if writing a cell with formula `=A1` into range B2:C4,
6831 # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
6832 # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
6833 #
6834 # To keep the formula's ranges static, use the `$` indicator.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006835 # For example, use the formula `=$A$1` to prevent both the row and the
6836 # column from incrementing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006837 "cell": { # Data about a specific cell. # The data to write.
6838 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
6839 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006840 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006841 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006842 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006843 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
6844 # or vertically (as rows).
6845 "rows": [ # Each row grouping in the pivot table.
6846 { # A single grouping (either row or column) in a pivot table.
6847 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6848 "valueMetadata": [ # Metadata about values in the grouping.
6849 { # Metadata about a value in a pivot grouping.
6850 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6851 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6852 # (Note that formulaValue is not valid,
6853 # because the values will be calculated.)
6854 "numberValue": 3.14, # Represents a double value.
6855 # Note: Dates, Times and DateTimes are represented as doubles in
6856 # "serial number" format.
6857 "boolValue": True or False, # Represents a boolean value.
6858 "formulaValue": "A String", # Represents a formula.
6859 "stringValue": "A String", # Represents a string value.
6860 # Leading single quotes are not included. For example, if the user typed
6861 # `'123` into the UI, this would be represented as a `stringValue` of
6862 # `"123"`.
6863 "errorValue": { # An error in a cell. # Represents an error.
6864 # This field is read-only.
6865 "message": "A String", # A message with more information about the error
6866 # (in the spreadsheet's locale).
6867 "type": "A String", # The type of error.
6868 },
6869 },
6870 },
6871 ],
6872 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6873 # If not specified, sorting is alphabetical by this group's values.
6874 "buckets": [ # Determines the bucket from which values are chosen to sort.
6875 #
6876 # For example, in a pivot table with one row group & two column groups,
6877 # the row group can list up to two values. The first value corresponds
6878 # to a value within the first column group, and the second value
6879 # corresponds to a value in the second column group. If no values
6880 # are listed, this would indicate that the row should be sorted according
6881 # to the "Grand Total" over the column groups. If a single value is listed,
6882 # this would correspond to using the "Total" of that bucket.
6883 { # The kinds of value that a cell in a spreadsheet can have.
6884 "numberValue": 3.14, # Represents a double value.
6885 # Note: Dates, Times and DateTimes are represented as doubles in
6886 # "serial number" format.
6887 "boolValue": True or False, # Represents a boolean value.
6888 "formulaValue": "A String", # Represents a formula.
6889 "stringValue": "A String", # Represents a string value.
6890 # Leading single quotes are not included. For example, if the user typed
6891 # `'123` into the UI, this would be represented as a `stringValue` of
6892 # `"123"`.
6893 "errorValue": { # An error in a cell. # Represents an error.
6894 # This field is read-only.
6895 "message": "A String", # A message with more information about the error
6896 # (in the spreadsheet's locale).
6897 "type": "A String", # The type of error.
6898 },
6899 },
6900 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006901 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006902 # grouping should be sorted by.
6903 },
6904 "sortOrder": "A String", # The order the values in this group should be sorted.
6905 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6906 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006907 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006908 # means this group refers to column `C`, whereas the offset `1` would refer
6909 # to column `D`.
6910 },
6911 ],
6912 "source": { # A range on a sheet. # The range the pivot table is reading data from.
6913 # All indexes are zero-based.
6914 # Indexes are half open, e.g the start index is inclusive
6915 # and the end index is exclusive -- [start_index, end_index).
6916 # Missing indexes indicate the range is unbounded on that side.
6917 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006918 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006919 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006920 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006921 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006922 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006923 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006924 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006925 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006926 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006927 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006928 # `Sheet1!A:B == sheet_id: 0,
6929 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006930 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006931 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006932 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006933 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006934 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006935 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006936 #
6937 # The start index must always be less than or equal to the end index.
6938 # If the start index equals the end index, then the range is empty.
6939 # Empty ranges are typically not meaningful and are usually rendered in the
6940 # UI as `#REF!`.
6941 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07006942 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006943 "sheetId": 42, # The sheet this range is on.
6944 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07006945 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006946 },
6947 "values": [ # A list of values to include in the pivot table.
6948 { # The definition of how a value in a pivot table should be calculated.
6949 "formula": "A String", # A custom formula to calculate the value. The formula must start
6950 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -07006951 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
6952 #
6953 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
6954 # means this value refers to column `C`, whereas the offset `1` would
6955 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006956 "summarizeFunction": "A String", # A function to summarize the value.
6957 # If formula is set, the only supported values are
6958 # SUM and
6959 # CUSTOM.
6960 # If sourceColumnOffset is set, then `CUSTOM`
6961 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006962 "name": "A String", # A name to use for the value. This is only used if formula was set.
6963 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006964 },
6965 ],
6966 "criteria": { # An optional mapping of filters per source column offset.
6967 #
6968 # The filters will be applied before aggregating data into the pivot table.
6969 # The map's key is the column offset of the source range that you want to
6970 # filter, and the value is the criteria for that column.
6971 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006972 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006973 # for column `C`, whereas the key `1` is for column `D`.
6974 "a_key": { # Criteria for showing/hiding rows in a pivot table.
6975 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
6976 "A String",
6977 ],
6978 },
6979 },
6980 "columns": [ # Each column grouping in the pivot table.
6981 { # A single grouping (either row or column) in a pivot table.
6982 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6983 "valueMetadata": [ # Metadata about values in the grouping.
6984 { # Metadata about a value in a pivot grouping.
6985 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6986 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6987 # (Note that formulaValue is not valid,
6988 # because the values will be calculated.)
6989 "numberValue": 3.14, # Represents a double value.
6990 # Note: Dates, Times and DateTimes are represented as doubles in
6991 # "serial number" format.
6992 "boolValue": True or False, # Represents a boolean value.
6993 "formulaValue": "A String", # Represents a formula.
6994 "stringValue": "A String", # Represents a string value.
6995 # Leading single quotes are not included. For example, if the user typed
6996 # `'123` into the UI, this would be represented as a `stringValue` of
6997 # `"123"`.
6998 "errorValue": { # An error in a cell. # Represents an error.
6999 # This field is read-only.
7000 "message": "A String", # A message with more information about the error
7001 # (in the spreadsheet's locale).
7002 "type": "A String", # The type of error.
7003 },
7004 },
7005 },
7006 ],
7007 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
7008 # If not specified, sorting is alphabetical by this group's values.
7009 "buckets": [ # Determines the bucket from which values are chosen to sort.
7010 #
7011 # For example, in a pivot table with one row group & two column groups,
7012 # the row group can list up to two values. The first value corresponds
7013 # to a value within the first column group, and the second value
7014 # corresponds to a value in the second column group. If no values
7015 # are listed, this would indicate that the row should be sorted according
7016 # to the "Grand Total" over the column groups. If a single value is listed,
7017 # this would correspond to using the "Total" of that bucket.
7018 { # The kinds of value that a cell in a spreadsheet can have.
7019 "numberValue": 3.14, # Represents a double value.
7020 # Note: Dates, Times and DateTimes are represented as doubles in
7021 # "serial number" format.
7022 "boolValue": True or False, # Represents a boolean value.
7023 "formulaValue": "A String", # Represents a formula.
7024 "stringValue": "A String", # Represents a string value.
7025 # Leading single quotes are not included. For example, if the user typed
7026 # `'123` into the UI, this would be represented as a `stringValue` of
7027 # `"123"`.
7028 "errorValue": { # An error in a cell. # Represents an error.
7029 # This field is read-only.
7030 "message": "A String", # A message with more information about the error
7031 # (in the spreadsheet's locale).
7032 "type": "A String", # The type of error.
7033 },
7034 },
7035 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007036 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007037 # grouping should be sorted by.
7038 },
7039 "sortOrder": "A String", # The order the values in this group should be sorted.
7040 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
7041 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007042 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007043 # means this group refers to column `C`, whereas the offset `1` would refer
7044 # to column `D`.
7045 },
7046 ],
7047 },
7048 "hyperlink": "A String", # A hyperlink this cell points to, if any.
7049 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
7050 "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
7051 # the calculated value. For cells with literals, this will be
7052 # the same as the user_entered_value.
7053 # This field is read-only.
7054 "numberValue": 3.14, # Represents a double value.
7055 # Note: Dates, Times and DateTimes are represented as doubles in
7056 # "serial number" format.
7057 "boolValue": True or False, # Represents a boolean value.
7058 "formulaValue": "A String", # Represents a formula.
7059 "stringValue": "A String", # Represents a string value.
7060 # Leading single quotes are not included. For example, if the user typed
7061 # `'123` into the UI, this would be represented as a `stringValue` of
7062 # `"123"`.
7063 "errorValue": { # An error in a cell. # Represents an error.
7064 # This field is read-only.
7065 "message": "A String", # A message with more information about the error
7066 # (in the spreadsheet's locale).
7067 "type": "A String", # The type of error.
7068 },
7069 },
7070 "formattedValue": "A String", # The formatted value of the cell.
7071 # This is the value as it's shown to the user.
7072 # This field is read-only.
7073 "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()`
7074 # Note: Dates, Times and DateTimes are represented as doubles in
7075 # serial number format.
7076 "numberValue": 3.14, # Represents a double value.
7077 # Note: Dates, Times and DateTimes are represented as doubles in
7078 # "serial number" format.
7079 "boolValue": True or False, # Represents a boolean value.
7080 "formulaValue": "A String", # Represents a formula.
7081 "stringValue": "A String", # Represents a string value.
7082 # Leading single quotes are not included. For example, if the user typed
7083 # `'123` into the UI, this would be represented as a `stringValue` of
7084 # `"123"`.
7085 "errorValue": { # An error in a cell. # Represents an error.
7086 # This field is read-only.
7087 "message": "A String", # A message with more information about the error
7088 # (in the spreadsheet's locale).
7089 "type": "A String", # The type of error.
7090 },
7091 },
7092 "note": "A String", # Any note on the cell.
7093 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
7094 # This includes the results of applying any conditional formatting and,
7095 # if the cell contains a formula, the computed number format.
7096 # If the effective format is the default format, effective format will
7097 # not be written.
7098 # This field is read-only.
7099 "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 -07007100 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
7101 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007102 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07007103 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007104 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007105 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007106 },
7107 "textDirection": "A String", # The direction of the text in the cell.
7108 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
7109 # When updating padding, every field must be specified.
7110 "top": 42, # The top padding of the cell.
7111 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007112 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007113 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007114 },
Thomas Coffee2f245372017-03-27 10:39:26 -07007115 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007116 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
7117 # for simplicity of conversion to/from color representations in various
7118 # languages over compactness; for example, the fields of this representation
7119 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7120 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7121 # method in iOS; and, with just a little work, it can be easily formatted into
7122 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7123 #
7124 # Example (Java):
7125 #
7126 # import com.google.type.Color;
7127 #
7128 # // ...
7129 # public static java.awt.Color fromProto(Color protocolor) {
7130 # float alpha = protocolor.hasAlpha()
7131 # ? protocolor.getAlpha().getValue()
7132 # : 1.0;
7133 #
7134 # return new java.awt.Color(
7135 # protocolor.getRed(),
7136 # protocolor.getGreen(),
7137 # protocolor.getBlue(),
7138 # alpha);
7139 # }
7140 #
7141 # public static Color toProto(java.awt.Color color) {
7142 # float red = (float) color.getRed();
7143 # float green = (float) color.getGreen();
7144 # float blue = (float) color.getBlue();
7145 # float denominator = 255.0;
7146 # Color.Builder resultBuilder =
7147 # Color
7148 # .newBuilder()
7149 # .setRed(red / denominator)
7150 # .setGreen(green / denominator)
7151 # .setBlue(blue / denominator);
7152 # int alpha = color.getAlpha();
7153 # if (alpha != 255) {
7154 # result.setAlpha(
7155 # FloatValue
7156 # .newBuilder()
7157 # .setValue(((float) alpha) / denominator)
7158 # .build());
7159 # }
7160 # return resultBuilder.build();
7161 # }
7162 # // ...
7163 #
7164 # Example (iOS / Obj-C):
7165 #
7166 # // ...
7167 # static UIColor* fromProto(Color* protocolor) {
7168 # float red = [protocolor red];
7169 # float green = [protocolor green];
7170 # float blue = [protocolor blue];
7171 # FloatValue* alpha_wrapper = [protocolor alpha];
7172 # float alpha = 1.0;
7173 # if (alpha_wrapper != nil) {
7174 # alpha = [alpha_wrapper value];
7175 # }
7176 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7177 # }
7178 #
7179 # static Color* toProto(UIColor* color) {
7180 # CGFloat red, green, blue, alpha;
7181 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7182 # return nil;
7183 # }
7184 # Color* result = [Color alloc] init];
7185 # [result setRed:red];
7186 # [result setGreen:green];
7187 # [result setBlue:blue];
7188 # if (alpha <= 0.9999) {
7189 # [result setAlpha:floatWrapperWithValue(alpha)];
7190 # }
7191 # [result autorelease];
7192 # return result;
7193 # }
7194 # // ...
7195 #
7196 # Example (JavaScript):
7197 #
7198 # // ...
7199 #
7200 # var protoToCssColor = function(rgb_color) {
7201 # var redFrac = rgb_color.red || 0.0;
7202 # var greenFrac = rgb_color.green || 0.0;
7203 # var blueFrac = rgb_color.blue || 0.0;
7204 # var red = Math.floor(redFrac * 255);
7205 # var green = Math.floor(greenFrac * 255);
7206 # var blue = Math.floor(blueFrac * 255);
7207 #
7208 # if (!('alpha' in rgb_color)) {
7209 # return rgbToCssColor_(red, green, blue);
7210 # }
7211 #
7212 # var alphaFrac = rgb_color.alpha.value || 0.0;
7213 # var rgbParams = [red, green, blue].join(',');
7214 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7215 # };
7216 #
7217 # var rgbToCssColor_ = function(red, green, blue) {
7218 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7219 # var hexString = rgbNumber.toString(16);
7220 # var missingZeros = 6 - hexString.length;
7221 # var resultBuilder = ['#'];
7222 # for (var i = 0; i < missingZeros; i++) {
7223 # resultBuilder.push('0');
7224 # }
7225 # resultBuilder.push(hexString);
7226 # return resultBuilder.join('');
7227 # };
7228 #
7229 # // ...
7230 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7231 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7232 # the final pixel color is defined by the equation:
7233 #
7234 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7235 #
7236 # This means that a value of 1.0 corresponds to a solid color, whereas
7237 # a value of 0.0 corresponds to a completely transparent color. This
7238 # uses a wrapper message rather than a simple float scalar so that it is
7239 # possible to distinguish between a default value and the value being unset.
7240 # If omitted, this color object is to be rendered as a solid color
7241 # (as if the alpha value had been explicitly given with a value of 1.0).
7242 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7243 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7244 },
Thomas Coffee2f245372017-03-27 10:39:26 -07007245 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007246 "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).
7247 # Absent values indicate that the field isn't specified.
7248 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7249 # for simplicity of conversion to/from color representations in various
7250 # languages over compactness; for example, the fields of this representation
7251 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7252 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7253 # method in iOS; and, with just a little work, it can be easily formatted into
7254 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7255 #
7256 # Example (Java):
7257 #
7258 # import com.google.type.Color;
7259 #
7260 # // ...
7261 # public static java.awt.Color fromProto(Color protocolor) {
7262 # float alpha = protocolor.hasAlpha()
7263 # ? protocolor.getAlpha().getValue()
7264 # : 1.0;
7265 #
7266 # return new java.awt.Color(
7267 # protocolor.getRed(),
7268 # protocolor.getGreen(),
7269 # protocolor.getBlue(),
7270 # alpha);
7271 # }
7272 #
7273 # public static Color toProto(java.awt.Color color) {
7274 # float red = (float) color.getRed();
7275 # float green = (float) color.getGreen();
7276 # float blue = (float) color.getBlue();
7277 # float denominator = 255.0;
7278 # Color.Builder resultBuilder =
7279 # Color
7280 # .newBuilder()
7281 # .setRed(red / denominator)
7282 # .setGreen(green / denominator)
7283 # .setBlue(blue / denominator);
7284 # int alpha = color.getAlpha();
7285 # if (alpha != 255) {
7286 # result.setAlpha(
7287 # FloatValue
7288 # .newBuilder()
7289 # .setValue(((float) alpha) / denominator)
7290 # .build());
7291 # }
7292 # return resultBuilder.build();
7293 # }
7294 # // ...
7295 #
7296 # Example (iOS / Obj-C):
7297 #
7298 # // ...
7299 # static UIColor* fromProto(Color* protocolor) {
7300 # float red = [protocolor red];
7301 # float green = [protocolor green];
7302 # float blue = [protocolor blue];
7303 # FloatValue* alpha_wrapper = [protocolor alpha];
7304 # float alpha = 1.0;
7305 # if (alpha_wrapper != nil) {
7306 # alpha = [alpha_wrapper value];
7307 # }
7308 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7309 # }
7310 #
7311 # static Color* toProto(UIColor* color) {
7312 # CGFloat red, green, blue, alpha;
7313 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7314 # return nil;
7315 # }
7316 # Color* result = [Color alloc] init];
7317 # [result setRed:red];
7318 # [result setGreen:green];
7319 # [result setBlue:blue];
7320 # if (alpha <= 0.9999) {
7321 # [result setAlpha:floatWrapperWithValue(alpha)];
7322 # }
7323 # [result autorelease];
7324 # return result;
7325 # }
7326 # // ...
7327 #
7328 # Example (JavaScript):
7329 #
7330 # // ...
7331 #
7332 # var protoToCssColor = function(rgb_color) {
7333 # var redFrac = rgb_color.red || 0.0;
7334 # var greenFrac = rgb_color.green || 0.0;
7335 # var blueFrac = rgb_color.blue || 0.0;
7336 # var red = Math.floor(redFrac * 255);
7337 # var green = Math.floor(greenFrac * 255);
7338 # var blue = Math.floor(blueFrac * 255);
7339 #
7340 # if (!('alpha' in rgb_color)) {
7341 # return rgbToCssColor_(red, green, blue);
7342 # }
7343 #
7344 # var alphaFrac = rgb_color.alpha.value || 0.0;
7345 # var rgbParams = [red, green, blue].join(',');
7346 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7347 # };
7348 #
7349 # var rgbToCssColor_ = function(red, green, blue) {
7350 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7351 # var hexString = rgbNumber.toString(16);
7352 # var missingZeros = 6 - hexString.length;
7353 # var resultBuilder = ['#'];
7354 # for (var i = 0; i < missingZeros; i++) {
7355 # resultBuilder.push('0');
7356 # }
7357 # resultBuilder.push(hexString);
7358 # return resultBuilder.join('');
7359 # };
7360 #
7361 # // ...
7362 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7363 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7364 # the final pixel color is defined by the equation:
7365 #
7366 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7367 #
7368 # This means that a value of 1.0 corresponds to a solid color, whereas
7369 # a value of 0.0 corresponds to a completely transparent color. This
7370 # uses a wrapper message rather than a simple float scalar so that it is
7371 # possible to distinguish between a default value and the value being unset.
7372 # If omitted, this color object is to be rendered as a solid color
7373 # (as if the alpha value had been explicitly given with a value of 1.0).
7374 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7375 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7376 },
7377 "bold": True or False, # True if the text is bold.
7378 "strikethrough": True or False, # True if the text has a strikethrough.
7379 "fontFamily": "A String", # The font family.
7380 "fontSize": 42, # The size of the font.
7381 "italic": True or False, # True if the text is italicized.
7382 "underline": True or False, # True if the text is underlined.
7383 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07007384 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
7385 "angle": 42, # The angle between the standard orientation and the desired orientation.
7386 # Measured in degrees. Valid values are between -90 and 90. Positive
7387 # angles are angled upwards, negative are angled downwards.
7388 #
7389 # Note: For LTR text direction positive angles are in the counterclockwise
7390 # direction, whereas for RTL they are in the clockwise direction
7391 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
7392 # characters is unchanged.
7393 # For example:
7394 #
7395 # | V |
7396 # | e |
7397 # | r |
7398 # | t |
7399 # | i |
7400 # | c |
7401 # | a |
7402 # | l |
7403 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007404 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
7405 "borders": { # The borders of the cell. # The borders of the cell.
7406 "top": { # A border along a cell. # The top border of the cell.
7407 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7408 # for simplicity of conversion to/from color representations in various
7409 # languages over compactness; for example, the fields of this representation
7410 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7411 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7412 # method in iOS; and, with just a little work, it can be easily formatted into
7413 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7414 #
7415 # Example (Java):
7416 #
7417 # import com.google.type.Color;
7418 #
7419 # // ...
7420 # public static java.awt.Color fromProto(Color protocolor) {
7421 # float alpha = protocolor.hasAlpha()
7422 # ? protocolor.getAlpha().getValue()
7423 # : 1.0;
7424 #
7425 # return new java.awt.Color(
7426 # protocolor.getRed(),
7427 # protocolor.getGreen(),
7428 # protocolor.getBlue(),
7429 # alpha);
7430 # }
7431 #
7432 # public static Color toProto(java.awt.Color color) {
7433 # float red = (float) color.getRed();
7434 # float green = (float) color.getGreen();
7435 # float blue = (float) color.getBlue();
7436 # float denominator = 255.0;
7437 # Color.Builder resultBuilder =
7438 # Color
7439 # .newBuilder()
7440 # .setRed(red / denominator)
7441 # .setGreen(green / denominator)
7442 # .setBlue(blue / denominator);
7443 # int alpha = color.getAlpha();
7444 # if (alpha != 255) {
7445 # result.setAlpha(
7446 # FloatValue
7447 # .newBuilder()
7448 # .setValue(((float) alpha) / denominator)
7449 # .build());
7450 # }
7451 # return resultBuilder.build();
7452 # }
7453 # // ...
7454 #
7455 # Example (iOS / Obj-C):
7456 #
7457 # // ...
7458 # static UIColor* fromProto(Color* protocolor) {
7459 # float red = [protocolor red];
7460 # float green = [protocolor green];
7461 # float blue = [protocolor blue];
7462 # FloatValue* alpha_wrapper = [protocolor alpha];
7463 # float alpha = 1.0;
7464 # if (alpha_wrapper != nil) {
7465 # alpha = [alpha_wrapper value];
7466 # }
7467 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7468 # }
7469 #
7470 # static Color* toProto(UIColor* color) {
7471 # CGFloat red, green, blue, alpha;
7472 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7473 # return nil;
7474 # }
7475 # Color* result = [Color alloc] init];
7476 # [result setRed:red];
7477 # [result setGreen:green];
7478 # [result setBlue:blue];
7479 # if (alpha <= 0.9999) {
7480 # [result setAlpha:floatWrapperWithValue(alpha)];
7481 # }
7482 # [result autorelease];
7483 # return result;
7484 # }
7485 # // ...
7486 #
7487 # Example (JavaScript):
7488 #
7489 # // ...
7490 #
7491 # var protoToCssColor = function(rgb_color) {
7492 # var redFrac = rgb_color.red || 0.0;
7493 # var greenFrac = rgb_color.green || 0.0;
7494 # var blueFrac = rgb_color.blue || 0.0;
7495 # var red = Math.floor(redFrac * 255);
7496 # var green = Math.floor(greenFrac * 255);
7497 # var blue = Math.floor(blueFrac * 255);
7498 #
7499 # if (!('alpha' in rgb_color)) {
7500 # return rgbToCssColor_(red, green, blue);
7501 # }
7502 #
7503 # var alphaFrac = rgb_color.alpha.value || 0.0;
7504 # var rgbParams = [red, green, blue].join(',');
7505 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7506 # };
7507 #
7508 # var rgbToCssColor_ = function(red, green, blue) {
7509 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7510 # var hexString = rgbNumber.toString(16);
7511 # var missingZeros = 6 - hexString.length;
7512 # var resultBuilder = ['#'];
7513 # for (var i = 0; i < missingZeros; i++) {
7514 # resultBuilder.push('0');
7515 # }
7516 # resultBuilder.push(hexString);
7517 # return resultBuilder.join('');
7518 # };
7519 #
7520 # // ...
7521 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7522 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7523 # the final pixel color is defined by the equation:
7524 #
7525 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7526 #
7527 # This means that a value of 1.0 corresponds to a solid color, whereas
7528 # a value of 0.0 corresponds to a completely transparent color. This
7529 # uses a wrapper message rather than a simple float scalar so that it is
7530 # possible to distinguish between a default value and the value being unset.
7531 # If omitted, this color object is to be rendered as a solid color
7532 # (as if the alpha value had been explicitly given with a value of 1.0).
7533 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7534 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7535 },
7536 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007537 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007538 "style": "A String", # The style of the border.
7539 },
7540 "right": { # A border along a cell. # The right border of the cell.
7541 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7542 # for simplicity of conversion to/from color representations in various
7543 # languages over compactness; for example, the fields of this representation
7544 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7545 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7546 # method in iOS; and, with just a little work, it can be easily formatted into
7547 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7548 #
7549 # Example (Java):
7550 #
7551 # import com.google.type.Color;
7552 #
7553 # // ...
7554 # public static java.awt.Color fromProto(Color protocolor) {
7555 # float alpha = protocolor.hasAlpha()
7556 # ? protocolor.getAlpha().getValue()
7557 # : 1.0;
7558 #
7559 # return new java.awt.Color(
7560 # protocolor.getRed(),
7561 # protocolor.getGreen(),
7562 # protocolor.getBlue(),
7563 # alpha);
7564 # }
7565 #
7566 # public static Color toProto(java.awt.Color color) {
7567 # float red = (float) color.getRed();
7568 # float green = (float) color.getGreen();
7569 # float blue = (float) color.getBlue();
7570 # float denominator = 255.0;
7571 # Color.Builder resultBuilder =
7572 # Color
7573 # .newBuilder()
7574 # .setRed(red / denominator)
7575 # .setGreen(green / denominator)
7576 # .setBlue(blue / denominator);
7577 # int alpha = color.getAlpha();
7578 # if (alpha != 255) {
7579 # result.setAlpha(
7580 # FloatValue
7581 # .newBuilder()
7582 # .setValue(((float) alpha) / denominator)
7583 # .build());
7584 # }
7585 # return resultBuilder.build();
7586 # }
7587 # // ...
7588 #
7589 # Example (iOS / Obj-C):
7590 #
7591 # // ...
7592 # static UIColor* fromProto(Color* protocolor) {
7593 # float red = [protocolor red];
7594 # float green = [protocolor green];
7595 # float blue = [protocolor blue];
7596 # FloatValue* alpha_wrapper = [protocolor alpha];
7597 # float alpha = 1.0;
7598 # if (alpha_wrapper != nil) {
7599 # alpha = [alpha_wrapper value];
7600 # }
7601 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7602 # }
7603 #
7604 # static Color* toProto(UIColor* color) {
7605 # CGFloat red, green, blue, alpha;
7606 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7607 # return nil;
7608 # }
7609 # Color* result = [Color alloc] init];
7610 # [result setRed:red];
7611 # [result setGreen:green];
7612 # [result setBlue:blue];
7613 # if (alpha <= 0.9999) {
7614 # [result setAlpha:floatWrapperWithValue(alpha)];
7615 # }
7616 # [result autorelease];
7617 # return result;
7618 # }
7619 # // ...
7620 #
7621 # Example (JavaScript):
7622 #
7623 # // ...
7624 #
7625 # var protoToCssColor = function(rgb_color) {
7626 # var redFrac = rgb_color.red || 0.0;
7627 # var greenFrac = rgb_color.green || 0.0;
7628 # var blueFrac = rgb_color.blue || 0.0;
7629 # var red = Math.floor(redFrac * 255);
7630 # var green = Math.floor(greenFrac * 255);
7631 # var blue = Math.floor(blueFrac * 255);
7632 #
7633 # if (!('alpha' in rgb_color)) {
7634 # return rgbToCssColor_(red, green, blue);
7635 # }
7636 #
7637 # var alphaFrac = rgb_color.alpha.value || 0.0;
7638 # var rgbParams = [red, green, blue].join(',');
7639 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7640 # };
7641 #
7642 # var rgbToCssColor_ = function(red, green, blue) {
7643 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7644 # var hexString = rgbNumber.toString(16);
7645 # var missingZeros = 6 - hexString.length;
7646 # var resultBuilder = ['#'];
7647 # for (var i = 0; i < missingZeros; i++) {
7648 # resultBuilder.push('0');
7649 # }
7650 # resultBuilder.push(hexString);
7651 # return resultBuilder.join('');
7652 # };
7653 #
7654 # // ...
7655 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7656 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7657 # the final pixel color is defined by the equation:
7658 #
7659 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7660 #
7661 # This means that a value of 1.0 corresponds to a solid color, whereas
7662 # a value of 0.0 corresponds to a completely transparent color. This
7663 # uses a wrapper message rather than a simple float scalar so that it is
7664 # possible to distinguish between a default value and the value being unset.
7665 # If omitted, this color object is to be rendered as a solid color
7666 # (as if the alpha value had been explicitly given with a value of 1.0).
7667 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7668 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7669 },
7670 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007671 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007672 "style": "A String", # The style of the border.
7673 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007674 "left": { # A border along a cell. # The left border of the cell.
7675 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7676 # for simplicity of conversion to/from color representations in various
7677 # languages over compactness; for example, the fields of this representation
7678 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7679 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7680 # method in iOS; and, with just a little work, it can be easily formatted into
7681 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7682 #
7683 # Example (Java):
7684 #
7685 # import com.google.type.Color;
7686 #
7687 # // ...
7688 # public static java.awt.Color fromProto(Color protocolor) {
7689 # float alpha = protocolor.hasAlpha()
7690 # ? protocolor.getAlpha().getValue()
7691 # : 1.0;
7692 #
7693 # return new java.awt.Color(
7694 # protocolor.getRed(),
7695 # protocolor.getGreen(),
7696 # protocolor.getBlue(),
7697 # alpha);
7698 # }
7699 #
7700 # public static Color toProto(java.awt.Color color) {
7701 # float red = (float) color.getRed();
7702 # float green = (float) color.getGreen();
7703 # float blue = (float) color.getBlue();
7704 # float denominator = 255.0;
7705 # Color.Builder resultBuilder =
7706 # Color
7707 # .newBuilder()
7708 # .setRed(red / denominator)
7709 # .setGreen(green / denominator)
7710 # .setBlue(blue / denominator);
7711 # int alpha = color.getAlpha();
7712 # if (alpha != 255) {
7713 # result.setAlpha(
7714 # FloatValue
7715 # .newBuilder()
7716 # .setValue(((float) alpha) / denominator)
7717 # .build());
7718 # }
7719 # return resultBuilder.build();
7720 # }
7721 # // ...
7722 #
7723 # Example (iOS / Obj-C):
7724 #
7725 # // ...
7726 # static UIColor* fromProto(Color* protocolor) {
7727 # float red = [protocolor red];
7728 # float green = [protocolor green];
7729 # float blue = [protocolor blue];
7730 # FloatValue* alpha_wrapper = [protocolor alpha];
7731 # float alpha = 1.0;
7732 # if (alpha_wrapper != nil) {
7733 # alpha = [alpha_wrapper value];
7734 # }
7735 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7736 # }
7737 #
7738 # static Color* toProto(UIColor* color) {
7739 # CGFloat red, green, blue, alpha;
7740 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7741 # return nil;
7742 # }
7743 # Color* result = [Color alloc] init];
7744 # [result setRed:red];
7745 # [result setGreen:green];
7746 # [result setBlue:blue];
7747 # if (alpha <= 0.9999) {
7748 # [result setAlpha:floatWrapperWithValue(alpha)];
7749 # }
7750 # [result autorelease];
7751 # return result;
7752 # }
7753 # // ...
7754 #
7755 # Example (JavaScript):
7756 #
7757 # // ...
7758 #
7759 # var protoToCssColor = function(rgb_color) {
7760 # var redFrac = rgb_color.red || 0.0;
7761 # var greenFrac = rgb_color.green || 0.0;
7762 # var blueFrac = rgb_color.blue || 0.0;
7763 # var red = Math.floor(redFrac * 255);
7764 # var green = Math.floor(greenFrac * 255);
7765 # var blue = Math.floor(blueFrac * 255);
7766 #
7767 # if (!('alpha' in rgb_color)) {
7768 # return rgbToCssColor_(red, green, blue);
7769 # }
7770 #
7771 # var alphaFrac = rgb_color.alpha.value || 0.0;
7772 # var rgbParams = [red, green, blue].join(',');
7773 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7774 # };
7775 #
7776 # var rgbToCssColor_ = function(red, green, blue) {
7777 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7778 # var hexString = rgbNumber.toString(16);
7779 # var missingZeros = 6 - hexString.length;
7780 # var resultBuilder = ['#'];
7781 # for (var i = 0; i < missingZeros; i++) {
7782 # resultBuilder.push('0');
7783 # }
7784 # resultBuilder.push(hexString);
7785 # return resultBuilder.join('');
7786 # };
7787 #
7788 # // ...
7789 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7790 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7791 # the final pixel color is defined by the equation:
7792 #
7793 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7794 #
7795 # This means that a value of 1.0 corresponds to a solid color, whereas
7796 # a value of 0.0 corresponds to a completely transparent color. This
7797 # uses a wrapper message rather than a simple float scalar so that it is
7798 # possible to distinguish between a default value and the value being unset.
7799 # If omitted, this color object is to be rendered as a solid color
7800 # (as if the alpha value had been explicitly given with a value of 1.0).
7801 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7802 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7803 },
7804 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007805 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007806 "style": "A String", # The style of the border.
7807 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07007808 "bottom": { # A border along a cell. # The bottom border of the cell.
7809 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7810 # for simplicity of conversion to/from color representations in various
7811 # languages over compactness; for example, the fields of this representation
7812 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7813 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7814 # method in iOS; and, with just a little work, it can be easily formatted into
7815 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7816 #
7817 # Example (Java):
7818 #
7819 # import com.google.type.Color;
7820 #
7821 # // ...
7822 # public static java.awt.Color fromProto(Color protocolor) {
7823 # float alpha = protocolor.hasAlpha()
7824 # ? protocolor.getAlpha().getValue()
7825 # : 1.0;
7826 #
7827 # return new java.awt.Color(
7828 # protocolor.getRed(),
7829 # protocolor.getGreen(),
7830 # protocolor.getBlue(),
7831 # alpha);
7832 # }
7833 #
7834 # public static Color toProto(java.awt.Color color) {
7835 # float red = (float) color.getRed();
7836 # float green = (float) color.getGreen();
7837 # float blue = (float) color.getBlue();
7838 # float denominator = 255.0;
7839 # Color.Builder resultBuilder =
7840 # Color
7841 # .newBuilder()
7842 # .setRed(red / denominator)
7843 # .setGreen(green / denominator)
7844 # .setBlue(blue / denominator);
7845 # int alpha = color.getAlpha();
7846 # if (alpha != 255) {
7847 # result.setAlpha(
7848 # FloatValue
7849 # .newBuilder()
7850 # .setValue(((float) alpha) / denominator)
7851 # .build());
7852 # }
7853 # return resultBuilder.build();
7854 # }
7855 # // ...
7856 #
7857 # Example (iOS / Obj-C):
7858 #
7859 # // ...
7860 # static UIColor* fromProto(Color* protocolor) {
7861 # float red = [protocolor red];
7862 # float green = [protocolor green];
7863 # float blue = [protocolor blue];
7864 # FloatValue* alpha_wrapper = [protocolor alpha];
7865 # float alpha = 1.0;
7866 # if (alpha_wrapper != nil) {
7867 # alpha = [alpha_wrapper value];
7868 # }
7869 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7870 # }
7871 #
7872 # static Color* toProto(UIColor* color) {
7873 # CGFloat red, green, blue, alpha;
7874 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7875 # return nil;
7876 # }
7877 # Color* result = [Color alloc] init];
7878 # [result setRed:red];
7879 # [result setGreen:green];
7880 # [result setBlue:blue];
7881 # if (alpha <= 0.9999) {
7882 # [result setAlpha:floatWrapperWithValue(alpha)];
7883 # }
7884 # [result autorelease];
7885 # return result;
7886 # }
7887 # // ...
7888 #
7889 # Example (JavaScript):
7890 #
7891 # // ...
7892 #
7893 # var protoToCssColor = function(rgb_color) {
7894 # var redFrac = rgb_color.red || 0.0;
7895 # var greenFrac = rgb_color.green || 0.0;
7896 # var blueFrac = rgb_color.blue || 0.0;
7897 # var red = Math.floor(redFrac * 255);
7898 # var green = Math.floor(greenFrac * 255);
7899 # var blue = Math.floor(blueFrac * 255);
7900 #
7901 # if (!('alpha' in rgb_color)) {
7902 # return rgbToCssColor_(red, green, blue);
7903 # }
7904 #
7905 # var alphaFrac = rgb_color.alpha.value || 0.0;
7906 # var rgbParams = [red, green, blue].join(',');
7907 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7908 # };
7909 #
7910 # var rgbToCssColor_ = function(red, green, blue) {
7911 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7912 # var hexString = rgbNumber.toString(16);
7913 # var missingZeros = 6 - hexString.length;
7914 # var resultBuilder = ['#'];
7915 # for (var i = 0; i < missingZeros; i++) {
7916 # resultBuilder.push('0');
7917 # }
7918 # resultBuilder.push(hexString);
7919 # return resultBuilder.join('');
7920 # };
7921 #
7922 # // ...
7923 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7924 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7925 # the final pixel color is defined by the equation:
7926 #
7927 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7928 #
7929 # This means that a value of 1.0 corresponds to a solid color, whereas
7930 # a value of 0.0 corresponds to a completely transparent color. This
7931 # uses a wrapper message rather than a simple float scalar so that it is
7932 # possible to distinguish between a default value and the value being unset.
7933 # If omitted, this color object is to be rendered as a solid color
7934 # (as if the alpha value had been explicitly given with a value of 1.0).
7935 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7936 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7937 },
7938 "width": 42, # The width of the border, in pixels.
7939 # Deprecated; the width is determined by the "style" field.
7940 "style": "A String", # The style of the border.
7941 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007942 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07007943 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007944 },
7945 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
7946 #
7947 # When writing, the new format will be merged with the existing format.
7948 "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 -07007949 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
7950 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007951 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07007952 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007953 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007954 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007955 },
7956 "textDirection": "A String", # The direction of the text in the cell.
7957 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
7958 # When updating padding, every field must be specified.
7959 "top": 42, # The top padding of the cell.
7960 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007961 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007962 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007963 },
Thomas Coffee2f245372017-03-27 10:39:26 -07007964 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007965 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
7966 # for simplicity of conversion to/from color representations in various
7967 # languages over compactness; for example, the fields of this representation
7968 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7969 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7970 # method in iOS; and, with just a little work, it can be easily formatted into
7971 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7972 #
7973 # Example (Java):
7974 #
7975 # import com.google.type.Color;
7976 #
7977 # // ...
7978 # public static java.awt.Color fromProto(Color protocolor) {
7979 # float alpha = protocolor.hasAlpha()
7980 # ? protocolor.getAlpha().getValue()
7981 # : 1.0;
7982 #
7983 # return new java.awt.Color(
7984 # protocolor.getRed(),
7985 # protocolor.getGreen(),
7986 # protocolor.getBlue(),
7987 # alpha);
7988 # }
7989 #
7990 # public static Color toProto(java.awt.Color color) {
7991 # float red = (float) color.getRed();
7992 # float green = (float) color.getGreen();
7993 # float blue = (float) color.getBlue();
7994 # float denominator = 255.0;
7995 # Color.Builder resultBuilder =
7996 # Color
7997 # .newBuilder()
7998 # .setRed(red / denominator)
7999 # .setGreen(green / denominator)
8000 # .setBlue(blue / denominator);
8001 # int alpha = color.getAlpha();
8002 # if (alpha != 255) {
8003 # result.setAlpha(
8004 # FloatValue
8005 # .newBuilder()
8006 # .setValue(((float) alpha) / denominator)
8007 # .build());
8008 # }
8009 # return resultBuilder.build();
8010 # }
8011 # // ...
8012 #
8013 # Example (iOS / Obj-C):
8014 #
8015 # // ...
8016 # static UIColor* fromProto(Color* protocolor) {
8017 # float red = [protocolor red];
8018 # float green = [protocolor green];
8019 # float blue = [protocolor blue];
8020 # FloatValue* alpha_wrapper = [protocolor alpha];
8021 # float alpha = 1.0;
8022 # if (alpha_wrapper != nil) {
8023 # alpha = [alpha_wrapper value];
8024 # }
8025 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8026 # }
8027 #
8028 # static Color* toProto(UIColor* color) {
8029 # CGFloat red, green, blue, alpha;
8030 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8031 # return nil;
8032 # }
8033 # Color* result = [Color alloc] init];
8034 # [result setRed:red];
8035 # [result setGreen:green];
8036 # [result setBlue:blue];
8037 # if (alpha <= 0.9999) {
8038 # [result setAlpha:floatWrapperWithValue(alpha)];
8039 # }
8040 # [result autorelease];
8041 # return result;
8042 # }
8043 # // ...
8044 #
8045 # Example (JavaScript):
8046 #
8047 # // ...
8048 #
8049 # var protoToCssColor = function(rgb_color) {
8050 # var redFrac = rgb_color.red || 0.0;
8051 # var greenFrac = rgb_color.green || 0.0;
8052 # var blueFrac = rgb_color.blue || 0.0;
8053 # var red = Math.floor(redFrac * 255);
8054 # var green = Math.floor(greenFrac * 255);
8055 # var blue = Math.floor(blueFrac * 255);
8056 #
8057 # if (!('alpha' in rgb_color)) {
8058 # return rgbToCssColor_(red, green, blue);
8059 # }
8060 #
8061 # var alphaFrac = rgb_color.alpha.value || 0.0;
8062 # var rgbParams = [red, green, blue].join(',');
8063 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8064 # };
8065 #
8066 # var rgbToCssColor_ = function(red, green, blue) {
8067 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8068 # var hexString = rgbNumber.toString(16);
8069 # var missingZeros = 6 - hexString.length;
8070 # var resultBuilder = ['#'];
8071 # for (var i = 0; i < missingZeros; i++) {
8072 # resultBuilder.push('0');
8073 # }
8074 # resultBuilder.push(hexString);
8075 # return resultBuilder.join('');
8076 # };
8077 #
8078 # // ...
8079 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8080 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8081 # the final pixel color is defined by the equation:
8082 #
8083 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8084 #
8085 # This means that a value of 1.0 corresponds to a solid color, whereas
8086 # a value of 0.0 corresponds to a completely transparent color. This
8087 # uses a wrapper message rather than a simple float scalar so that it is
8088 # possible to distinguish between a default value and the value being unset.
8089 # If omitted, this color object is to be rendered as a solid color
8090 # (as if the alpha value had been explicitly given with a value of 1.0).
8091 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8092 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8093 },
Thomas Coffee2f245372017-03-27 10:39:26 -07008094 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008095 "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).
8096 # Absent values indicate that the field isn't specified.
8097 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8098 # for simplicity of conversion to/from color representations in various
8099 # languages over compactness; for example, the fields of this representation
8100 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8101 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8102 # method in iOS; and, with just a little work, it can be easily formatted into
8103 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8104 #
8105 # Example (Java):
8106 #
8107 # import com.google.type.Color;
8108 #
8109 # // ...
8110 # public static java.awt.Color fromProto(Color protocolor) {
8111 # float alpha = protocolor.hasAlpha()
8112 # ? protocolor.getAlpha().getValue()
8113 # : 1.0;
8114 #
8115 # return new java.awt.Color(
8116 # protocolor.getRed(),
8117 # protocolor.getGreen(),
8118 # protocolor.getBlue(),
8119 # alpha);
8120 # }
8121 #
8122 # public static Color toProto(java.awt.Color color) {
8123 # float red = (float) color.getRed();
8124 # float green = (float) color.getGreen();
8125 # float blue = (float) color.getBlue();
8126 # float denominator = 255.0;
8127 # Color.Builder resultBuilder =
8128 # Color
8129 # .newBuilder()
8130 # .setRed(red / denominator)
8131 # .setGreen(green / denominator)
8132 # .setBlue(blue / denominator);
8133 # int alpha = color.getAlpha();
8134 # if (alpha != 255) {
8135 # result.setAlpha(
8136 # FloatValue
8137 # .newBuilder()
8138 # .setValue(((float) alpha) / denominator)
8139 # .build());
8140 # }
8141 # return resultBuilder.build();
8142 # }
8143 # // ...
8144 #
8145 # Example (iOS / Obj-C):
8146 #
8147 # // ...
8148 # static UIColor* fromProto(Color* protocolor) {
8149 # float red = [protocolor red];
8150 # float green = [protocolor green];
8151 # float blue = [protocolor blue];
8152 # FloatValue* alpha_wrapper = [protocolor alpha];
8153 # float alpha = 1.0;
8154 # if (alpha_wrapper != nil) {
8155 # alpha = [alpha_wrapper value];
8156 # }
8157 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8158 # }
8159 #
8160 # static Color* toProto(UIColor* color) {
8161 # CGFloat red, green, blue, alpha;
8162 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8163 # return nil;
8164 # }
8165 # Color* result = [Color alloc] init];
8166 # [result setRed:red];
8167 # [result setGreen:green];
8168 # [result setBlue:blue];
8169 # if (alpha <= 0.9999) {
8170 # [result setAlpha:floatWrapperWithValue(alpha)];
8171 # }
8172 # [result autorelease];
8173 # return result;
8174 # }
8175 # // ...
8176 #
8177 # Example (JavaScript):
8178 #
8179 # // ...
8180 #
8181 # var protoToCssColor = function(rgb_color) {
8182 # var redFrac = rgb_color.red || 0.0;
8183 # var greenFrac = rgb_color.green || 0.0;
8184 # var blueFrac = rgb_color.blue || 0.0;
8185 # var red = Math.floor(redFrac * 255);
8186 # var green = Math.floor(greenFrac * 255);
8187 # var blue = Math.floor(blueFrac * 255);
8188 #
8189 # if (!('alpha' in rgb_color)) {
8190 # return rgbToCssColor_(red, green, blue);
8191 # }
8192 #
8193 # var alphaFrac = rgb_color.alpha.value || 0.0;
8194 # var rgbParams = [red, green, blue].join(',');
8195 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8196 # };
8197 #
8198 # var rgbToCssColor_ = function(red, green, blue) {
8199 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8200 # var hexString = rgbNumber.toString(16);
8201 # var missingZeros = 6 - hexString.length;
8202 # var resultBuilder = ['#'];
8203 # for (var i = 0; i < missingZeros; i++) {
8204 # resultBuilder.push('0');
8205 # }
8206 # resultBuilder.push(hexString);
8207 # return resultBuilder.join('');
8208 # };
8209 #
8210 # // ...
8211 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8212 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8213 # the final pixel color is defined by the equation:
8214 #
8215 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8216 #
8217 # This means that a value of 1.0 corresponds to a solid color, whereas
8218 # a value of 0.0 corresponds to a completely transparent color. This
8219 # uses a wrapper message rather than a simple float scalar so that it is
8220 # possible to distinguish between a default value and the value being unset.
8221 # If omitted, this color object is to be rendered as a solid color
8222 # (as if the alpha value had been explicitly given with a value of 1.0).
8223 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8224 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8225 },
8226 "bold": True or False, # True if the text is bold.
8227 "strikethrough": True or False, # True if the text has a strikethrough.
8228 "fontFamily": "A String", # The font family.
8229 "fontSize": 42, # The size of the font.
8230 "italic": True or False, # True if the text is italicized.
8231 "underline": True or False, # True if the text is underlined.
8232 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07008233 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
8234 "angle": 42, # The angle between the standard orientation and the desired orientation.
8235 # Measured in degrees. Valid values are between -90 and 90. Positive
8236 # angles are angled upwards, negative are angled downwards.
8237 #
8238 # Note: For LTR text direction positive angles are in the counterclockwise
8239 # direction, whereas for RTL they are in the clockwise direction
8240 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
8241 # characters is unchanged.
8242 # For example:
8243 #
8244 # | V |
8245 # | e |
8246 # | r |
8247 # | t |
8248 # | i |
8249 # | c |
8250 # | a |
8251 # | l |
8252 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008253 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
8254 "borders": { # The borders of the cell. # The borders of the cell.
8255 "top": { # A border along a cell. # The top border of the cell.
8256 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8257 # for simplicity of conversion to/from color representations in various
8258 # languages over compactness; for example, the fields of this representation
8259 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8260 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8261 # method in iOS; and, with just a little work, it can be easily formatted into
8262 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8263 #
8264 # Example (Java):
8265 #
8266 # import com.google.type.Color;
8267 #
8268 # // ...
8269 # public static java.awt.Color fromProto(Color protocolor) {
8270 # float alpha = protocolor.hasAlpha()
8271 # ? protocolor.getAlpha().getValue()
8272 # : 1.0;
8273 #
8274 # return new java.awt.Color(
8275 # protocolor.getRed(),
8276 # protocolor.getGreen(),
8277 # protocolor.getBlue(),
8278 # alpha);
8279 # }
8280 #
8281 # public static Color toProto(java.awt.Color color) {
8282 # float red = (float) color.getRed();
8283 # float green = (float) color.getGreen();
8284 # float blue = (float) color.getBlue();
8285 # float denominator = 255.0;
8286 # Color.Builder resultBuilder =
8287 # Color
8288 # .newBuilder()
8289 # .setRed(red / denominator)
8290 # .setGreen(green / denominator)
8291 # .setBlue(blue / denominator);
8292 # int alpha = color.getAlpha();
8293 # if (alpha != 255) {
8294 # result.setAlpha(
8295 # FloatValue
8296 # .newBuilder()
8297 # .setValue(((float) alpha) / denominator)
8298 # .build());
8299 # }
8300 # return resultBuilder.build();
8301 # }
8302 # // ...
8303 #
8304 # Example (iOS / Obj-C):
8305 #
8306 # // ...
8307 # static UIColor* fromProto(Color* protocolor) {
8308 # float red = [protocolor red];
8309 # float green = [protocolor green];
8310 # float blue = [protocolor blue];
8311 # FloatValue* alpha_wrapper = [protocolor alpha];
8312 # float alpha = 1.0;
8313 # if (alpha_wrapper != nil) {
8314 # alpha = [alpha_wrapper value];
8315 # }
8316 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8317 # }
8318 #
8319 # static Color* toProto(UIColor* color) {
8320 # CGFloat red, green, blue, alpha;
8321 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8322 # return nil;
8323 # }
8324 # Color* result = [Color alloc] init];
8325 # [result setRed:red];
8326 # [result setGreen:green];
8327 # [result setBlue:blue];
8328 # if (alpha <= 0.9999) {
8329 # [result setAlpha:floatWrapperWithValue(alpha)];
8330 # }
8331 # [result autorelease];
8332 # return result;
8333 # }
8334 # // ...
8335 #
8336 # Example (JavaScript):
8337 #
8338 # // ...
8339 #
8340 # var protoToCssColor = function(rgb_color) {
8341 # var redFrac = rgb_color.red || 0.0;
8342 # var greenFrac = rgb_color.green || 0.0;
8343 # var blueFrac = rgb_color.blue || 0.0;
8344 # var red = Math.floor(redFrac * 255);
8345 # var green = Math.floor(greenFrac * 255);
8346 # var blue = Math.floor(blueFrac * 255);
8347 #
8348 # if (!('alpha' in rgb_color)) {
8349 # return rgbToCssColor_(red, green, blue);
8350 # }
8351 #
8352 # var alphaFrac = rgb_color.alpha.value || 0.0;
8353 # var rgbParams = [red, green, blue].join(',');
8354 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8355 # };
8356 #
8357 # var rgbToCssColor_ = function(red, green, blue) {
8358 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8359 # var hexString = rgbNumber.toString(16);
8360 # var missingZeros = 6 - hexString.length;
8361 # var resultBuilder = ['#'];
8362 # for (var i = 0; i < missingZeros; i++) {
8363 # resultBuilder.push('0');
8364 # }
8365 # resultBuilder.push(hexString);
8366 # return resultBuilder.join('');
8367 # };
8368 #
8369 # // ...
8370 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8371 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8372 # the final pixel color is defined by the equation:
8373 #
8374 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8375 #
8376 # This means that a value of 1.0 corresponds to a solid color, whereas
8377 # a value of 0.0 corresponds to a completely transparent color. This
8378 # uses a wrapper message rather than a simple float scalar so that it is
8379 # possible to distinguish between a default value and the value being unset.
8380 # If omitted, this color object is to be rendered as a solid color
8381 # (as if the alpha value had been explicitly given with a value of 1.0).
8382 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8383 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8384 },
8385 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008386 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008387 "style": "A String", # The style of the border.
8388 },
8389 "right": { # A border along a cell. # The right border of the cell.
8390 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8391 # for simplicity of conversion to/from color representations in various
8392 # languages over compactness; for example, the fields of this representation
8393 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8394 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8395 # method in iOS; and, with just a little work, it can be easily formatted into
8396 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8397 #
8398 # Example (Java):
8399 #
8400 # import com.google.type.Color;
8401 #
8402 # // ...
8403 # public static java.awt.Color fromProto(Color protocolor) {
8404 # float alpha = protocolor.hasAlpha()
8405 # ? protocolor.getAlpha().getValue()
8406 # : 1.0;
8407 #
8408 # return new java.awt.Color(
8409 # protocolor.getRed(),
8410 # protocolor.getGreen(),
8411 # protocolor.getBlue(),
8412 # alpha);
8413 # }
8414 #
8415 # public static Color toProto(java.awt.Color color) {
8416 # float red = (float) color.getRed();
8417 # float green = (float) color.getGreen();
8418 # float blue = (float) color.getBlue();
8419 # float denominator = 255.0;
8420 # Color.Builder resultBuilder =
8421 # Color
8422 # .newBuilder()
8423 # .setRed(red / denominator)
8424 # .setGreen(green / denominator)
8425 # .setBlue(blue / denominator);
8426 # int alpha = color.getAlpha();
8427 # if (alpha != 255) {
8428 # result.setAlpha(
8429 # FloatValue
8430 # .newBuilder()
8431 # .setValue(((float) alpha) / denominator)
8432 # .build());
8433 # }
8434 # return resultBuilder.build();
8435 # }
8436 # // ...
8437 #
8438 # Example (iOS / Obj-C):
8439 #
8440 # // ...
8441 # static UIColor* fromProto(Color* protocolor) {
8442 # float red = [protocolor red];
8443 # float green = [protocolor green];
8444 # float blue = [protocolor blue];
8445 # FloatValue* alpha_wrapper = [protocolor alpha];
8446 # float alpha = 1.0;
8447 # if (alpha_wrapper != nil) {
8448 # alpha = [alpha_wrapper value];
8449 # }
8450 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8451 # }
8452 #
8453 # static Color* toProto(UIColor* color) {
8454 # CGFloat red, green, blue, alpha;
8455 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8456 # return nil;
8457 # }
8458 # Color* result = [Color alloc] init];
8459 # [result setRed:red];
8460 # [result setGreen:green];
8461 # [result setBlue:blue];
8462 # if (alpha <= 0.9999) {
8463 # [result setAlpha:floatWrapperWithValue(alpha)];
8464 # }
8465 # [result autorelease];
8466 # return result;
8467 # }
8468 # // ...
8469 #
8470 # Example (JavaScript):
8471 #
8472 # // ...
8473 #
8474 # var protoToCssColor = function(rgb_color) {
8475 # var redFrac = rgb_color.red || 0.0;
8476 # var greenFrac = rgb_color.green || 0.0;
8477 # var blueFrac = rgb_color.blue || 0.0;
8478 # var red = Math.floor(redFrac * 255);
8479 # var green = Math.floor(greenFrac * 255);
8480 # var blue = Math.floor(blueFrac * 255);
8481 #
8482 # if (!('alpha' in rgb_color)) {
8483 # return rgbToCssColor_(red, green, blue);
8484 # }
8485 #
8486 # var alphaFrac = rgb_color.alpha.value || 0.0;
8487 # var rgbParams = [red, green, blue].join(',');
8488 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8489 # };
8490 #
8491 # var rgbToCssColor_ = function(red, green, blue) {
8492 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8493 # var hexString = rgbNumber.toString(16);
8494 # var missingZeros = 6 - hexString.length;
8495 # var resultBuilder = ['#'];
8496 # for (var i = 0; i < missingZeros; i++) {
8497 # resultBuilder.push('0');
8498 # }
8499 # resultBuilder.push(hexString);
8500 # return resultBuilder.join('');
8501 # };
8502 #
8503 # // ...
8504 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8505 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8506 # the final pixel color is defined by the equation:
8507 #
8508 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8509 #
8510 # This means that a value of 1.0 corresponds to a solid color, whereas
8511 # a value of 0.0 corresponds to a completely transparent color. This
8512 # uses a wrapper message rather than a simple float scalar so that it is
8513 # possible to distinguish between a default value and the value being unset.
8514 # If omitted, this color object is to be rendered as a solid color
8515 # (as if the alpha value had been explicitly given with a value of 1.0).
8516 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8517 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8518 },
8519 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008520 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008521 "style": "A String", # The style of the border.
8522 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008523 "left": { # A border along a cell. # The left border of the cell.
8524 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8525 # for simplicity of conversion to/from color representations in various
8526 # languages over compactness; for example, the fields of this representation
8527 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8528 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8529 # method in iOS; and, with just a little work, it can be easily formatted into
8530 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8531 #
8532 # Example (Java):
8533 #
8534 # import com.google.type.Color;
8535 #
8536 # // ...
8537 # public static java.awt.Color fromProto(Color protocolor) {
8538 # float alpha = protocolor.hasAlpha()
8539 # ? protocolor.getAlpha().getValue()
8540 # : 1.0;
8541 #
8542 # return new java.awt.Color(
8543 # protocolor.getRed(),
8544 # protocolor.getGreen(),
8545 # protocolor.getBlue(),
8546 # alpha);
8547 # }
8548 #
8549 # public static Color toProto(java.awt.Color color) {
8550 # float red = (float) color.getRed();
8551 # float green = (float) color.getGreen();
8552 # float blue = (float) color.getBlue();
8553 # float denominator = 255.0;
8554 # Color.Builder resultBuilder =
8555 # Color
8556 # .newBuilder()
8557 # .setRed(red / denominator)
8558 # .setGreen(green / denominator)
8559 # .setBlue(blue / denominator);
8560 # int alpha = color.getAlpha();
8561 # if (alpha != 255) {
8562 # result.setAlpha(
8563 # FloatValue
8564 # .newBuilder()
8565 # .setValue(((float) alpha) / denominator)
8566 # .build());
8567 # }
8568 # return resultBuilder.build();
8569 # }
8570 # // ...
8571 #
8572 # Example (iOS / Obj-C):
8573 #
8574 # // ...
8575 # static UIColor* fromProto(Color* protocolor) {
8576 # float red = [protocolor red];
8577 # float green = [protocolor green];
8578 # float blue = [protocolor blue];
8579 # FloatValue* alpha_wrapper = [protocolor alpha];
8580 # float alpha = 1.0;
8581 # if (alpha_wrapper != nil) {
8582 # alpha = [alpha_wrapper value];
8583 # }
8584 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8585 # }
8586 #
8587 # static Color* toProto(UIColor* color) {
8588 # CGFloat red, green, blue, alpha;
8589 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8590 # return nil;
8591 # }
8592 # Color* result = [Color alloc] init];
8593 # [result setRed:red];
8594 # [result setGreen:green];
8595 # [result setBlue:blue];
8596 # if (alpha <= 0.9999) {
8597 # [result setAlpha:floatWrapperWithValue(alpha)];
8598 # }
8599 # [result autorelease];
8600 # return result;
8601 # }
8602 # // ...
8603 #
8604 # Example (JavaScript):
8605 #
8606 # // ...
8607 #
8608 # var protoToCssColor = function(rgb_color) {
8609 # var redFrac = rgb_color.red || 0.0;
8610 # var greenFrac = rgb_color.green || 0.0;
8611 # var blueFrac = rgb_color.blue || 0.0;
8612 # var red = Math.floor(redFrac * 255);
8613 # var green = Math.floor(greenFrac * 255);
8614 # var blue = Math.floor(blueFrac * 255);
8615 #
8616 # if (!('alpha' in rgb_color)) {
8617 # return rgbToCssColor_(red, green, blue);
8618 # }
8619 #
8620 # var alphaFrac = rgb_color.alpha.value || 0.0;
8621 # var rgbParams = [red, green, blue].join(',');
8622 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8623 # };
8624 #
8625 # var rgbToCssColor_ = function(red, green, blue) {
8626 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8627 # var hexString = rgbNumber.toString(16);
8628 # var missingZeros = 6 - hexString.length;
8629 # var resultBuilder = ['#'];
8630 # for (var i = 0; i < missingZeros; i++) {
8631 # resultBuilder.push('0');
8632 # }
8633 # resultBuilder.push(hexString);
8634 # return resultBuilder.join('');
8635 # };
8636 #
8637 # // ...
8638 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8639 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8640 # the final pixel color is defined by the equation:
8641 #
8642 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8643 #
8644 # This means that a value of 1.0 corresponds to a solid color, whereas
8645 # a value of 0.0 corresponds to a completely transparent color. This
8646 # uses a wrapper message rather than a simple float scalar so that it is
8647 # possible to distinguish between a default value and the value being unset.
8648 # If omitted, this color object is to be rendered as a solid color
8649 # (as if the alpha value had been explicitly given with a value of 1.0).
8650 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8651 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8652 },
8653 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008654 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008655 "style": "A String", # The style of the border.
8656 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07008657 "bottom": { # A border along a cell. # The bottom border of the cell.
8658 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8659 # for simplicity of conversion to/from color representations in various
8660 # languages over compactness; for example, the fields of this representation
8661 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8662 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8663 # method in iOS; and, with just a little work, it can be easily formatted into
8664 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8665 #
8666 # Example (Java):
8667 #
8668 # import com.google.type.Color;
8669 #
8670 # // ...
8671 # public static java.awt.Color fromProto(Color protocolor) {
8672 # float alpha = protocolor.hasAlpha()
8673 # ? protocolor.getAlpha().getValue()
8674 # : 1.0;
8675 #
8676 # return new java.awt.Color(
8677 # protocolor.getRed(),
8678 # protocolor.getGreen(),
8679 # protocolor.getBlue(),
8680 # alpha);
8681 # }
8682 #
8683 # public static Color toProto(java.awt.Color color) {
8684 # float red = (float) color.getRed();
8685 # float green = (float) color.getGreen();
8686 # float blue = (float) color.getBlue();
8687 # float denominator = 255.0;
8688 # Color.Builder resultBuilder =
8689 # Color
8690 # .newBuilder()
8691 # .setRed(red / denominator)
8692 # .setGreen(green / denominator)
8693 # .setBlue(blue / denominator);
8694 # int alpha = color.getAlpha();
8695 # if (alpha != 255) {
8696 # result.setAlpha(
8697 # FloatValue
8698 # .newBuilder()
8699 # .setValue(((float) alpha) / denominator)
8700 # .build());
8701 # }
8702 # return resultBuilder.build();
8703 # }
8704 # // ...
8705 #
8706 # Example (iOS / Obj-C):
8707 #
8708 # // ...
8709 # static UIColor* fromProto(Color* protocolor) {
8710 # float red = [protocolor red];
8711 # float green = [protocolor green];
8712 # float blue = [protocolor blue];
8713 # FloatValue* alpha_wrapper = [protocolor alpha];
8714 # float alpha = 1.0;
8715 # if (alpha_wrapper != nil) {
8716 # alpha = [alpha_wrapper value];
8717 # }
8718 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8719 # }
8720 #
8721 # static Color* toProto(UIColor* color) {
8722 # CGFloat red, green, blue, alpha;
8723 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8724 # return nil;
8725 # }
8726 # Color* result = [Color alloc] init];
8727 # [result setRed:red];
8728 # [result setGreen:green];
8729 # [result setBlue:blue];
8730 # if (alpha <= 0.9999) {
8731 # [result setAlpha:floatWrapperWithValue(alpha)];
8732 # }
8733 # [result autorelease];
8734 # return result;
8735 # }
8736 # // ...
8737 #
8738 # Example (JavaScript):
8739 #
8740 # // ...
8741 #
8742 # var protoToCssColor = function(rgb_color) {
8743 # var redFrac = rgb_color.red || 0.0;
8744 # var greenFrac = rgb_color.green || 0.0;
8745 # var blueFrac = rgb_color.blue || 0.0;
8746 # var red = Math.floor(redFrac * 255);
8747 # var green = Math.floor(greenFrac * 255);
8748 # var blue = Math.floor(blueFrac * 255);
8749 #
8750 # if (!('alpha' in rgb_color)) {
8751 # return rgbToCssColor_(red, green, blue);
8752 # }
8753 #
8754 # var alphaFrac = rgb_color.alpha.value || 0.0;
8755 # var rgbParams = [red, green, blue].join(',');
8756 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8757 # };
8758 #
8759 # var rgbToCssColor_ = function(red, green, blue) {
8760 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8761 # var hexString = rgbNumber.toString(16);
8762 # var missingZeros = 6 - hexString.length;
8763 # var resultBuilder = ['#'];
8764 # for (var i = 0; i < missingZeros; i++) {
8765 # resultBuilder.push('0');
8766 # }
8767 # resultBuilder.push(hexString);
8768 # return resultBuilder.join('');
8769 # };
8770 #
8771 # // ...
8772 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8773 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8774 # the final pixel color is defined by the equation:
8775 #
8776 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8777 #
8778 # This means that a value of 1.0 corresponds to a solid color, whereas
8779 # a value of 0.0 corresponds to a completely transparent color. This
8780 # uses a wrapper message rather than a simple float scalar so that it is
8781 # possible to distinguish between a default value and the value being unset.
8782 # If omitted, this color object is to be rendered as a solid color
8783 # (as if the alpha value had been explicitly given with a value of 1.0).
8784 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8785 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8786 },
8787 "width": 42, # The width of the border, in pixels.
8788 # Deprecated; the width is determined by the "style" field.
8789 "style": "A String", # The style of the border.
8790 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008791 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07008792 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008793 },
8794 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
8795 #
8796 # When writing, the new data validation rule will overwrite any prior rule.
8797 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
8798 # If true, "List" conditions will show a dropdown.
8799 "strict": True or False, # True if invalid data should be rejected.
8800 "inputMessage": "A String", # A message to show the user when adding data to the cell.
8801 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
8802 # BooleanConditions are used by conditional formatting,
8803 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008804 "values": [ # The values of the condition. The number of supported values depends
8805 # on the condition type. Some support zero values,
8806 # others one or two values,
8807 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8808 { # The value of the condition.
8809 "relativeDate": "A String", # A relative date (based on the current date).
8810 # Valid only if the type is
8811 # DATE_BEFORE,
8812 # DATE_AFTER,
8813 # DATE_ON_OR_BEFORE or
8814 # DATE_ON_OR_AFTER.
8815 #
8816 # Relative dates are not supported in data validation.
8817 # They are supported only in conditional formatting and
8818 # conditional filters.
8819 "userEnteredValue": "A String", # A value the condition is based on.
8820 # The value will be parsed as if the user typed into a cell.
8821 # Formulas are supported (and must begin with an `=`).
8822 },
8823 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008824 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008825 },
8826 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008827 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
8828 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008829 # Runs start at specific indexes in the text and continue until the next
8830 # run. Properties of a run will continue unless explicitly changed
8831 # in a subsequent run (and properties of the first run will continue
8832 # the properties of the cell unless explicitly changed).
8833 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008834 # When writing, the new runs will overwrite any prior runs. When writing a
8835 # new user_entered_value, previous runs will be erased.
8836 { # A run of a text format. The format of this run continues until the start
8837 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008838 # When updating, all fields must be set.
8839 "startIndex": 42, # The character index where this run starts.
8840 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
8841 # Absent values indicate that the field isn't specified.
8842 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8843 # for simplicity of conversion to/from color representations in various
8844 # languages over compactness; for example, the fields of this representation
8845 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8846 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8847 # method in iOS; and, with just a little work, it can be easily formatted into
8848 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8849 #
8850 # Example (Java):
8851 #
8852 # import com.google.type.Color;
8853 #
8854 # // ...
8855 # public static java.awt.Color fromProto(Color protocolor) {
8856 # float alpha = protocolor.hasAlpha()
8857 # ? protocolor.getAlpha().getValue()
8858 # : 1.0;
8859 #
8860 # return new java.awt.Color(
8861 # protocolor.getRed(),
8862 # protocolor.getGreen(),
8863 # protocolor.getBlue(),
8864 # alpha);
8865 # }
8866 #
8867 # public static Color toProto(java.awt.Color color) {
8868 # float red = (float) color.getRed();
8869 # float green = (float) color.getGreen();
8870 # float blue = (float) color.getBlue();
8871 # float denominator = 255.0;
8872 # Color.Builder resultBuilder =
8873 # Color
8874 # .newBuilder()
8875 # .setRed(red / denominator)
8876 # .setGreen(green / denominator)
8877 # .setBlue(blue / denominator);
8878 # int alpha = color.getAlpha();
8879 # if (alpha != 255) {
8880 # result.setAlpha(
8881 # FloatValue
8882 # .newBuilder()
8883 # .setValue(((float) alpha) / denominator)
8884 # .build());
8885 # }
8886 # return resultBuilder.build();
8887 # }
8888 # // ...
8889 #
8890 # Example (iOS / Obj-C):
8891 #
8892 # // ...
8893 # static UIColor* fromProto(Color* protocolor) {
8894 # float red = [protocolor red];
8895 # float green = [protocolor green];
8896 # float blue = [protocolor blue];
8897 # FloatValue* alpha_wrapper = [protocolor alpha];
8898 # float alpha = 1.0;
8899 # if (alpha_wrapper != nil) {
8900 # alpha = [alpha_wrapper value];
8901 # }
8902 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8903 # }
8904 #
8905 # static Color* toProto(UIColor* color) {
8906 # CGFloat red, green, blue, alpha;
8907 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8908 # return nil;
8909 # }
8910 # Color* result = [Color alloc] init];
8911 # [result setRed:red];
8912 # [result setGreen:green];
8913 # [result setBlue:blue];
8914 # if (alpha <= 0.9999) {
8915 # [result setAlpha:floatWrapperWithValue(alpha)];
8916 # }
8917 # [result autorelease];
8918 # return result;
8919 # }
8920 # // ...
8921 #
8922 # Example (JavaScript):
8923 #
8924 # // ...
8925 #
8926 # var protoToCssColor = function(rgb_color) {
8927 # var redFrac = rgb_color.red || 0.0;
8928 # var greenFrac = rgb_color.green || 0.0;
8929 # var blueFrac = rgb_color.blue || 0.0;
8930 # var red = Math.floor(redFrac * 255);
8931 # var green = Math.floor(greenFrac * 255);
8932 # var blue = Math.floor(blueFrac * 255);
8933 #
8934 # if (!('alpha' in rgb_color)) {
8935 # return rgbToCssColor_(red, green, blue);
8936 # }
8937 #
8938 # var alphaFrac = rgb_color.alpha.value || 0.0;
8939 # var rgbParams = [red, green, blue].join(',');
8940 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8941 # };
8942 #
8943 # var rgbToCssColor_ = function(red, green, blue) {
8944 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8945 # var hexString = rgbNumber.toString(16);
8946 # var missingZeros = 6 - hexString.length;
8947 # var resultBuilder = ['#'];
8948 # for (var i = 0; i < missingZeros; i++) {
8949 # resultBuilder.push('0');
8950 # }
8951 # resultBuilder.push(hexString);
8952 # return resultBuilder.join('');
8953 # };
8954 #
8955 # // ...
8956 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8957 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8958 # the final pixel color is defined by the equation:
8959 #
8960 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8961 #
8962 # This means that a value of 1.0 corresponds to a solid color, whereas
8963 # a value of 0.0 corresponds to a completely transparent color. This
8964 # uses a wrapper message rather than a simple float scalar so that it is
8965 # possible to distinguish between a default value and the value being unset.
8966 # If omitted, this color object is to be rendered as a solid color
8967 # (as if the alpha value had been explicitly given with a value of 1.0).
8968 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8969 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8970 },
8971 "bold": True or False, # True if the text is bold.
8972 "strikethrough": True or False, # True if the text has a strikethrough.
8973 "fontFamily": "A String", # The font family.
8974 "fontSize": 42, # The size of the font.
8975 "italic": True or False, # True if the text is italicized.
8976 "underline": True or False, # True if the text is underlined.
8977 },
8978 },
8979 ],
8980 },
8981 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8982 # The root `cell` is implied and should not be specified.
8983 # A single `"*"` can be used as short-hand for listing every field.
8984 "range": { # A range on a sheet. # The range to repeat the cell in.
8985 # All indexes are zero-based.
8986 # Indexes are half open, e.g the start index is inclusive
8987 # and the end index is exclusive -- [start_index, end_index).
8988 # Missing indexes indicate the range is unbounded on that side.
8989 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008990 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008991 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008992 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008993 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008994 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008995 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008996 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008997 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008998 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008999 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009000 # `Sheet1!A:B == sheet_id: 0,
9001 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009002 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009003 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009004 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009005 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009006 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009007 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009008 #
9009 # The start index must always be less than or equal to the end index.
9010 # If the start index equals the end index, then the range is empty.
9011 # Empty ranges are typically not meaningful and are usually rendered in the
9012 # UI as `#REF!`.
9013 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009014 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009015 "sheetId": 42, # The sheet this range is on.
9016 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009017 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009018 },
9019 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009020 "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 -07009021 "includeFormulas": True or False, # True if the search should include cells with formulas.
9022 # False to skip cells with formulas.
9023 "matchEntireCell": True or False, # True if the find value should match the entire cell.
9024 "allSheets": True or False, # True to find/replace over all sheets.
9025 "matchCase": True or False, # True if the search is case sensitive.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009026 "find": "A String", # The value to search.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009027 "range": { # A range on a sheet. # The range to find/replace over.
9028 # All indexes are zero-based.
9029 # Indexes are half open, e.g the start index is inclusive
9030 # and the end index is exclusive -- [start_index, end_index).
9031 # Missing indexes indicate the range is unbounded on that side.
9032 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009033 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009034 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009035 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009036 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009037 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009038 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009039 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009040 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009041 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009042 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009043 # `Sheet1!A:B == sheet_id: 0,
9044 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009045 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009046 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009047 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009048 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009049 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009050 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009051 #
9052 # The start index must always be less than or equal to the end index.
9053 # If the start index equals the end index, then the range is empty.
9054 # Empty ranges are typically not meaningful and are usually rendered in the
9055 # UI as `#REF!`.
9056 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009057 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009058 "sheetId": 42, # The sheet this range is on.
9059 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009060 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009061 },
9062 "searchByRegex": True or False, # True if the find value is a regex.
9063 # The regular expression and replacement should follow Java regex rules
9064 # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
9065 # The replacement string is allowed to refer to capturing groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009066 # For example, if one cell has the contents `"Google Sheets"` and another
9067 # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of
9068 # `"$1 Rocks"` would change the contents of the cells to
9069 # `"GSheets Rocks"` and `"GDocs Rocks"` respectively.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009070 "sheetId": 42, # The sheet to find/replace over.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009071 "replacement": "A String", # The value to use as the replacement.
9072 },
9073 "setBasicFilter": { # Sets the basic filter associated with a sheet. # Sets the basic filter on a sheet.
9074 "filter": { # The default filter associated with a sheet. # The filter to set.
9075 "range": { # A range on a sheet. # The range the filter covers.
9076 # All indexes are zero-based.
9077 # Indexes are half open, e.g the start index is inclusive
9078 # and the end index is exclusive -- [start_index, end_index).
9079 # Missing indexes indicate the range is unbounded on that side.
9080 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009081 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009082 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009083 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009084 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009085 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009086 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009087 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009088 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009089 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009090 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009091 # `Sheet1!A:B == sheet_id: 0,
9092 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009093 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009094 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009095 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009096 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009097 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009098 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009099 #
9100 # The start index must always be less than or equal to the end index.
9101 # If the start index equals the end index, then the range is empty.
9102 # Empty ranges are typically not meaningful and are usually rendered in the
9103 # UI as `#REF!`.
9104 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009105 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009106 "sheetId": 42, # The sheet this range is on.
9107 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009108 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009109 },
9110 "sortSpecs": [ # The sort order per column. Later specifications are used when values
9111 # are equal in the earlier specifications.
9112 { # A sort order associated with a specific column or row.
9113 "sortOrder": "A String", # The order data should be sorted.
9114 "dimensionIndex": 42, # The dimension the sort should be applied to.
9115 },
9116 ],
9117 "criteria": { # The criteria for showing/hiding values per column.
9118 # The map's key is the column index, and the value is the criteria for
9119 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009120 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009121 "hiddenValues": [ # Values that should be hidden.
9122 "A String",
9123 ],
9124 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
9125 # (This does not override hiddenValues -- if a value is listed there,
9126 # it will still be hidden.)
9127 # BooleanConditions are used by conditional formatting,
9128 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009129 "values": [ # The values of the condition. The number of supported values depends
9130 # on the condition type. Some support zero values,
9131 # others one or two values,
9132 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
9133 { # The value of the condition.
9134 "relativeDate": "A String", # A relative date (based on the current date).
9135 # Valid only if the type is
9136 # DATE_BEFORE,
9137 # DATE_AFTER,
9138 # DATE_ON_OR_BEFORE or
9139 # DATE_ON_OR_AFTER.
9140 #
9141 # Relative dates are not supported in data validation.
9142 # They are supported only in conditional formatting and
9143 # conditional filters.
9144 "userEnteredValue": "A String", # A value the condition is based on.
9145 # The value will be parsed as if the user typed into a cell.
9146 # Formulas are supported (and must begin with an `=`).
9147 },
9148 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009149 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009150 },
9151 },
9152 },
9153 },
9154 },
Thomas Coffee2f245372017-03-27 10:39:26 -07009155 "addFilterView": { # Adds a filter view. # Adds a filter view.
9156 "filter": { # A filter view. # The filter to add. The filterViewId
9157 # field is optional; if one is not set, an id will be randomly generated. (It
9158 # is an error to specify the ID of a filter that already exists.)
9159 "title": "A String", # The name of the filter view.
9160 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
9161 #
9162 # When writing, only one of range or named_range_id
9163 # may be set.
9164 "filterViewId": 42, # The ID of the filter view.
9165 "range": { # A range on a sheet. # The range this filter view covers.
9166 #
9167 # When writing, only one of range or named_range_id
9168 # may be set.
9169 # All indexes are zero-based.
9170 # Indexes are half open, e.g the start index is inclusive
9171 # and the end index is exclusive -- [start_index, end_index).
9172 # Missing indexes indicate the range is unbounded on that side.
9173 #
9174 # For example, if `"Sheet1"` is sheet ID 0, then:
9175 #
9176 # `Sheet1!A1:A1 == sheet_id: 0,
9177 # start_row_index: 0, end_row_index: 1,
9178 # start_column_index: 0, end_column_index: 1`
9179 #
9180 # `Sheet1!A3:B4 == sheet_id: 0,
9181 # start_row_index: 2, end_row_index: 4,
9182 # start_column_index: 0, end_column_index: 2`
9183 #
9184 # `Sheet1!A:B == sheet_id: 0,
9185 # start_column_index: 0, end_column_index: 2`
9186 #
9187 # `Sheet1!A5:B == sheet_id: 0,
9188 # start_row_index: 4,
9189 # start_column_index: 0, end_column_index: 2`
9190 #
9191 # `Sheet1 == sheet_id:0`
9192 #
9193 # The start index must always be less than or equal to the end index.
9194 # If the start index equals the end index, then the range is empty.
9195 # Empty ranges are typically not meaningful and are usually rendered in the
9196 # UI as `#REF!`.
9197 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9198 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
9199 "sheetId": 42, # The sheet this range is on.
9200 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9201 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9202 },
9203 "sortSpecs": [ # The sort order per column. Later specifications are used when values
9204 # are equal in the earlier specifications.
9205 { # A sort order associated with a specific column or row.
9206 "sortOrder": "A String", # The order data should be sorted.
9207 "dimensionIndex": 42, # The dimension the sort should be applied to.
9208 },
9209 ],
9210 "criteria": { # The criteria for showing/hiding values per column.
9211 # The map's key is the column index, and the value is the criteria for
9212 # that column.
9213 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
9214 "hiddenValues": [ # Values that should be hidden.
9215 "A String",
9216 ],
9217 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
9218 # (This does not override hiddenValues -- if a value is listed there,
9219 # it will still be hidden.)
9220 # BooleanConditions are used by conditional formatting,
9221 # data validation, and the criteria in filters.
9222 "values": [ # The values of the condition. The number of supported values depends
9223 # on the condition type. Some support zero values,
9224 # others one or two values,
9225 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
9226 { # The value of the condition.
9227 "relativeDate": "A String", # A relative date (based on the current date).
9228 # Valid only if the type is
9229 # DATE_BEFORE,
9230 # DATE_AFTER,
9231 # DATE_ON_OR_BEFORE or
9232 # DATE_ON_OR_AFTER.
9233 #
9234 # Relative dates are not supported in data validation.
9235 # They are supported only in conditional formatting and
9236 # conditional filters.
9237 "userEnteredValue": "A String", # A value the condition is based on.
9238 # The value will be parsed as if the user typed into a cell.
9239 # Formulas are supported (and must begin with an `=`).
9240 },
9241 ],
9242 "type": "A String", # The type of condition.
9243 },
9244 },
9245 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009246 },
9247 },
9248 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009249 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
9250 # Any number of rows and columns (including a different number of
9251 # columns per row) may be written.
9252 # All indexes are zero-based.
9253 "rowIndex": 42, # The row index of the coordinate.
9254 "columnIndex": 42, # The column index of the coordinate.
9255 "sheetId": 42, # The sheet this coordinate is on.
9256 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009257 "range": { # A range on a sheet. # The range to write data to.
9258 #
9259 # If the data in rows does not cover the entire requested range,
9260 # the fields matching those set in fields will be cleared.
9261 # All indexes are zero-based.
9262 # Indexes are half open, e.g the start index is inclusive
9263 # and the end index is exclusive -- [start_index, end_index).
9264 # Missing indexes indicate the range is unbounded on that side.
9265 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009266 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009267 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009268 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009269 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009270 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009271 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009272 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009273 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009274 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009275 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009276 # `Sheet1!A:B == sheet_id: 0,
9277 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009278 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009279 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009280 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009281 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009282 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009283 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009284 #
9285 # The start index must always be less than or equal to the end index.
9286 # If the start index equals the end index, then the range is empty.
9287 # Empty ranges are typically not meaningful and are usually rendered in the
9288 # UI as `#REF!`.
9289 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009290 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009291 "sheetId": 42, # The sheet this range is on.
9292 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009293 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009294 },
9295 "rows": [ # The data to write.
9296 { # Data about each cell in a row.
9297 "values": [ # The values in the row, one per column.
9298 { # Data about a specific cell.
9299 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9300 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009301 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009302 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009303 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009304 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9305 # or vertically (as rows).
9306 "rows": [ # Each row grouping in the pivot table.
9307 { # A single grouping (either row or column) in a pivot table.
9308 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9309 "valueMetadata": [ # Metadata about values in the grouping.
9310 { # Metadata about a value in a pivot grouping.
9311 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9312 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9313 # (Note that formulaValue is not valid,
9314 # because the values will be calculated.)
9315 "numberValue": 3.14, # Represents a double value.
9316 # Note: Dates, Times and DateTimes are represented as doubles in
9317 # "serial number" format.
9318 "boolValue": True or False, # Represents a boolean value.
9319 "formulaValue": "A String", # Represents a formula.
9320 "stringValue": "A String", # Represents a string value.
9321 # Leading single quotes are not included. For example, if the user typed
9322 # `'123` into the UI, this would be represented as a `stringValue` of
9323 # `"123"`.
9324 "errorValue": { # An error in a cell. # Represents an error.
9325 # This field is read-only.
9326 "message": "A String", # A message with more information about the error
9327 # (in the spreadsheet's locale).
9328 "type": "A String", # The type of error.
9329 },
9330 },
9331 },
9332 ],
9333 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9334 # If not specified, sorting is alphabetical by this group's values.
9335 "buckets": [ # Determines the bucket from which values are chosen to sort.
9336 #
9337 # For example, in a pivot table with one row group & two column groups,
9338 # the row group can list up to two values. The first value corresponds
9339 # to a value within the first column group, and the second value
9340 # corresponds to a value in the second column group. If no values
9341 # are listed, this would indicate that the row should be sorted according
9342 # to the "Grand Total" over the column groups. If a single value is listed,
9343 # this would correspond to using the "Total" of that bucket.
9344 { # The kinds of value that a cell in a spreadsheet can have.
9345 "numberValue": 3.14, # Represents a double value.
9346 # Note: Dates, Times and DateTimes are represented as doubles in
9347 # "serial number" format.
9348 "boolValue": True or False, # Represents a boolean value.
9349 "formulaValue": "A String", # Represents a formula.
9350 "stringValue": "A String", # Represents a string value.
9351 # Leading single quotes are not included. For example, if the user typed
9352 # `'123` into the UI, this would be represented as a `stringValue` of
9353 # `"123"`.
9354 "errorValue": { # An error in a cell. # Represents an error.
9355 # This field is read-only.
9356 "message": "A String", # A message with more information about the error
9357 # (in the spreadsheet's locale).
9358 "type": "A String", # The type of error.
9359 },
9360 },
9361 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009362 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009363 # grouping should be sorted by.
9364 },
9365 "sortOrder": "A String", # The order the values in this group should be sorted.
9366 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9367 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009368 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009369 # means this group refers to column `C`, whereas the offset `1` would refer
9370 # to column `D`.
9371 },
9372 ],
9373 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9374 # All indexes are zero-based.
9375 # Indexes are half open, e.g the start index is inclusive
9376 # and the end index is exclusive -- [start_index, end_index).
9377 # Missing indexes indicate the range is unbounded on that side.
9378 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009379 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009380 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009381 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009382 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009383 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009384 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009385 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009386 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009387 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009388 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009389 # `Sheet1!A:B == sheet_id: 0,
9390 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009391 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009392 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009393 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009394 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009395 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009396 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009397 #
9398 # The start index must always be less than or equal to the end index.
9399 # If the start index equals the end index, then the range is empty.
9400 # Empty ranges are typically not meaningful and are usually rendered in the
9401 # UI as `#REF!`.
9402 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009403 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009404 "sheetId": 42, # The sheet this range is on.
9405 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -07009406 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009407 },
9408 "values": [ # A list of values to include in the pivot table.
9409 { # The definition of how a value in a pivot table should be calculated.
9410 "formula": "A String", # A custom formula to calculate the value. The formula must start
9411 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -07009412 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9413 #
9414 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
9415 # means this value refers to column `C`, whereas the offset `1` would
9416 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009417 "summarizeFunction": "A String", # A function to summarize the value.
9418 # If formula is set, the only supported values are
9419 # SUM and
9420 # CUSTOM.
9421 # If sourceColumnOffset is set, then `CUSTOM`
9422 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009423 "name": "A String", # A name to use for the value. This is only used if formula was set.
9424 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009425 },
9426 ],
9427 "criteria": { # An optional mapping of filters per source column offset.
9428 #
9429 # The filters will be applied before aggregating data into the pivot table.
9430 # The map's key is the column offset of the source range that you want to
9431 # filter, and the value is the criteria for that column.
9432 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009433 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009434 # for column `C`, whereas the key `1` is for column `D`.
9435 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9436 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9437 "A String",
9438 ],
9439 },
9440 },
9441 "columns": [ # Each column grouping in the pivot table.
9442 { # A single grouping (either row or column) in a pivot table.
9443 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9444 "valueMetadata": [ # Metadata about values in the grouping.
9445 { # Metadata about a value in a pivot grouping.
9446 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9447 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9448 # (Note that formulaValue is not valid,
9449 # because the values will be calculated.)
9450 "numberValue": 3.14, # Represents a double value.
9451 # Note: Dates, Times and DateTimes are represented as doubles in
9452 # "serial number" format.
9453 "boolValue": True or False, # Represents a boolean value.
9454 "formulaValue": "A String", # Represents a formula.
9455 "stringValue": "A String", # Represents a string value.
9456 # Leading single quotes are not included. For example, if the user typed
9457 # `'123` into the UI, this would be represented as a `stringValue` of
9458 # `"123"`.
9459 "errorValue": { # An error in a cell. # Represents an error.
9460 # This field is read-only.
9461 "message": "A String", # A message with more information about the error
9462 # (in the spreadsheet's locale).
9463 "type": "A String", # The type of error.
9464 },
9465 },
9466 },
9467 ],
9468 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9469 # If not specified, sorting is alphabetical by this group's values.
9470 "buckets": [ # Determines the bucket from which values are chosen to sort.
9471 #
9472 # For example, in a pivot table with one row group & two column groups,
9473 # the row group can list up to two values. The first value corresponds
9474 # to a value within the first column group, and the second value
9475 # corresponds to a value in the second column group. If no values
9476 # are listed, this would indicate that the row should be sorted according
9477 # to the "Grand Total" over the column groups. If a single value is listed,
9478 # this would correspond to using the "Total" of that bucket.
9479 { # The kinds of value that a cell in a spreadsheet can have.
9480 "numberValue": 3.14, # Represents a double value.
9481 # Note: Dates, Times and DateTimes are represented as doubles in
9482 # "serial number" format.
9483 "boolValue": True or False, # Represents a boolean value.
9484 "formulaValue": "A String", # Represents a formula.
9485 "stringValue": "A String", # Represents a string value.
9486 # Leading single quotes are not included. For example, if the user typed
9487 # `'123` into the UI, this would be represented as a `stringValue` of
9488 # `"123"`.
9489 "errorValue": { # An error in a cell. # Represents an error.
9490 # This field is read-only.
9491 "message": "A String", # A message with more information about the error
9492 # (in the spreadsheet's locale).
9493 "type": "A String", # The type of error.
9494 },
9495 },
9496 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009497 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009498 # grouping should be sorted by.
9499 },
9500 "sortOrder": "A String", # The order the values in this group should be sorted.
9501 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9502 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009503 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009504 # means this group refers to column `C`, whereas the offset `1` would refer
9505 # to column `D`.
9506 },
9507 ],
9508 },
9509 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9510 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9511 "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
9512 # the calculated value. For cells with literals, this will be
9513 # the same as the user_entered_value.
9514 # This field is read-only.
9515 "numberValue": 3.14, # Represents a double value.
9516 # Note: Dates, Times and DateTimes are represented as doubles in
9517 # "serial number" format.
9518 "boolValue": True or False, # Represents a boolean value.
9519 "formulaValue": "A String", # Represents a formula.
9520 "stringValue": "A String", # Represents a string value.
9521 # Leading single quotes are not included. For example, if the user typed
9522 # `'123` into the UI, this would be represented as a `stringValue` of
9523 # `"123"`.
9524 "errorValue": { # An error in a cell. # Represents an error.
9525 # This field is read-only.
9526 "message": "A String", # A message with more information about the error
9527 # (in the spreadsheet's locale).
9528 "type": "A String", # The type of error.
9529 },
9530 },
9531 "formattedValue": "A String", # The formatted value of the cell.
9532 # This is the value as it's shown to the user.
9533 # This field is read-only.
9534 "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()`
9535 # Note: Dates, Times and DateTimes are represented as doubles in
9536 # serial number format.
9537 "numberValue": 3.14, # Represents a double value.
9538 # Note: Dates, Times and DateTimes are represented as doubles in
9539 # "serial number" format.
9540 "boolValue": True or False, # Represents a boolean value.
9541 "formulaValue": "A String", # Represents a formula.
9542 "stringValue": "A String", # Represents a string value.
9543 # Leading single quotes are not included. For example, if the user typed
9544 # `'123` into the UI, this would be represented as a `stringValue` of
9545 # `"123"`.
9546 "errorValue": { # An error in a cell. # Represents an error.
9547 # This field is read-only.
9548 "message": "A String", # A message with more information about the error
9549 # (in the spreadsheet's locale).
9550 "type": "A String", # The type of error.
9551 },
9552 },
9553 "note": "A String", # Any note on the cell.
9554 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9555 # This includes the results of applying any conditional formatting and,
9556 # if the cell contains a formula, the computed number format.
9557 # If the effective format is the default format, effective format will
9558 # not be written.
9559 # This field is read-only.
9560 "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 -07009561 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9562 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009563 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07009564 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009565 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009566 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009567 },
9568 "textDirection": "A String", # The direction of the text in the cell.
9569 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9570 # When updating padding, every field must be specified.
9571 "top": 42, # The top padding of the cell.
9572 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009573 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009574 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009575 },
Thomas Coffee2f245372017-03-27 10:39:26 -07009576 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009577 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9578 # for simplicity of conversion to/from color representations in various
9579 # languages over compactness; for example, the fields of this representation
9580 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9581 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9582 # method in iOS; and, with just a little work, it can be easily formatted into
9583 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9584 #
9585 # Example (Java):
9586 #
9587 # import com.google.type.Color;
9588 #
9589 # // ...
9590 # public static java.awt.Color fromProto(Color protocolor) {
9591 # float alpha = protocolor.hasAlpha()
9592 # ? protocolor.getAlpha().getValue()
9593 # : 1.0;
9594 #
9595 # return new java.awt.Color(
9596 # protocolor.getRed(),
9597 # protocolor.getGreen(),
9598 # protocolor.getBlue(),
9599 # alpha);
9600 # }
9601 #
9602 # public static Color toProto(java.awt.Color color) {
9603 # float red = (float) color.getRed();
9604 # float green = (float) color.getGreen();
9605 # float blue = (float) color.getBlue();
9606 # float denominator = 255.0;
9607 # Color.Builder resultBuilder =
9608 # Color
9609 # .newBuilder()
9610 # .setRed(red / denominator)
9611 # .setGreen(green / denominator)
9612 # .setBlue(blue / denominator);
9613 # int alpha = color.getAlpha();
9614 # if (alpha != 255) {
9615 # result.setAlpha(
9616 # FloatValue
9617 # .newBuilder()
9618 # .setValue(((float) alpha) / denominator)
9619 # .build());
9620 # }
9621 # return resultBuilder.build();
9622 # }
9623 # // ...
9624 #
9625 # Example (iOS / Obj-C):
9626 #
9627 # // ...
9628 # static UIColor* fromProto(Color* protocolor) {
9629 # float red = [protocolor red];
9630 # float green = [protocolor green];
9631 # float blue = [protocolor blue];
9632 # FloatValue* alpha_wrapper = [protocolor alpha];
9633 # float alpha = 1.0;
9634 # if (alpha_wrapper != nil) {
9635 # alpha = [alpha_wrapper value];
9636 # }
9637 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9638 # }
9639 #
9640 # static Color* toProto(UIColor* color) {
9641 # CGFloat red, green, blue, alpha;
9642 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9643 # return nil;
9644 # }
9645 # Color* result = [Color alloc] init];
9646 # [result setRed:red];
9647 # [result setGreen:green];
9648 # [result setBlue:blue];
9649 # if (alpha <= 0.9999) {
9650 # [result setAlpha:floatWrapperWithValue(alpha)];
9651 # }
9652 # [result autorelease];
9653 # return result;
9654 # }
9655 # // ...
9656 #
9657 # Example (JavaScript):
9658 #
9659 # // ...
9660 #
9661 # var protoToCssColor = function(rgb_color) {
9662 # var redFrac = rgb_color.red || 0.0;
9663 # var greenFrac = rgb_color.green || 0.0;
9664 # var blueFrac = rgb_color.blue || 0.0;
9665 # var red = Math.floor(redFrac * 255);
9666 # var green = Math.floor(greenFrac * 255);
9667 # var blue = Math.floor(blueFrac * 255);
9668 #
9669 # if (!('alpha' in rgb_color)) {
9670 # return rgbToCssColor_(red, green, blue);
9671 # }
9672 #
9673 # var alphaFrac = rgb_color.alpha.value || 0.0;
9674 # var rgbParams = [red, green, blue].join(',');
9675 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9676 # };
9677 #
9678 # var rgbToCssColor_ = function(red, green, blue) {
9679 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9680 # var hexString = rgbNumber.toString(16);
9681 # var missingZeros = 6 - hexString.length;
9682 # var resultBuilder = ['#'];
9683 # for (var i = 0; i < missingZeros; i++) {
9684 # resultBuilder.push('0');
9685 # }
9686 # resultBuilder.push(hexString);
9687 # return resultBuilder.join('');
9688 # };
9689 #
9690 # // ...
9691 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9692 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9693 # the final pixel color is defined by the equation:
9694 #
9695 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9696 #
9697 # This means that a value of 1.0 corresponds to a solid color, whereas
9698 # a value of 0.0 corresponds to a completely transparent color. This
9699 # uses a wrapper message rather than a simple float scalar so that it is
9700 # possible to distinguish between a default value and the value being unset.
9701 # If omitted, this color object is to be rendered as a solid color
9702 # (as if the alpha value had been explicitly given with a value of 1.0).
9703 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9704 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9705 },
Thomas Coffee2f245372017-03-27 10:39:26 -07009706 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009707 "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).
9708 # Absent values indicate that the field isn't specified.
9709 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9710 # for simplicity of conversion to/from color representations in various
9711 # languages over compactness; for example, the fields of this representation
9712 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9713 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9714 # method in iOS; and, with just a little work, it can be easily formatted into
9715 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9716 #
9717 # Example (Java):
9718 #
9719 # import com.google.type.Color;
9720 #
9721 # // ...
9722 # public static java.awt.Color fromProto(Color protocolor) {
9723 # float alpha = protocolor.hasAlpha()
9724 # ? protocolor.getAlpha().getValue()
9725 # : 1.0;
9726 #
9727 # return new java.awt.Color(
9728 # protocolor.getRed(),
9729 # protocolor.getGreen(),
9730 # protocolor.getBlue(),
9731 # alpha);
9732 # }
9733 #
9734 # public static Color toProto(java.awt.Color color) {
9735 # float red = (float) color.getRed();
9736 # float green = (float) color.getGreen();
9737 # float blue = (float) color.getBlue();
9738 # float denominator = 255.0;
9739 # Color.Builder resultBuilder =
9740 # Color
9741 # .newBuilder()
9742 # .setRed(red / denominator)
9743 # .setGreen(green / denominator)
9744 # .setBlue(blue / denominator);
9745 # int alpha = color.getAlpha();
9746 # if (alpha != 255) {
9747 # result.setAlpha(
9748 # FloatValue
9749 # .newBuilder()
9750 # .setValue(((float) alpha) / denominator)
9751 # .build());
9752 # }
9753 # return resultBuilder.build();
9754 # }
9755 # // ...
9756 #
9757 # Example (iOS / Obj-C):
9758 #
9759 # // ...
9760 # static UIColor* fromProto(Color* protocolor) {
9761 # float red = [protocolor red];
9762 # float green = [protocolor green];
9763 # float blue = [protocolor blue];
9764 # FloatValue* alpha_wrapper = [protocolor alpha];
9765 # float alpha = 1.0;
9766 # if (alpha_wrapper != nil) {
9767 # alpha = [alpha_wrapper value];
9768 # }
9769 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9770 # }
9771 #
9772 # static Color* toProto(UIColor* color) {
9773 # CGFloat red, green, blue, alpha;
9774 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9775 # return nil;
9776 # }
9777 # Color* result = [Color alloc] init];
9778 # [result setRed:red];
9779 # [result setGreen:green];
9780 # [result setBlue:blue];
9781 # if (alpha <= 0.9999) {
9782 # [result setAlpha:floatWrapperWithValue(alpha)];
9783 # }
9784 # [result autorelease];
9785 # return result;
9786 # }
9787 # // ...
9788 #
9789 # Example (JavaScript):
9790 #
9791 # // ...
9792 #
9793 # var protoToCssColor = function(rgb_color) {
9794 # var redFrac = rgb_color.red || 0.0;
9795 # var greenFrac = rgb_color.green || 0.0;
9796 # var blueFrac = rgb_color.blue || 0.0;
9797 # var red = Math.floor(redFrac * 255);
9798 # var green = Math.floor(greenFrac * 255);
9799 # var blue = Math.floor(blueFrac * 255);
9800 #
9801 # if (!('alpha' in rgb_color)) {
9802 # return rgbToCssColor_(red, green, blue);
9803 # }
9804 #
9805 # var alphaFrac = rgb_color.alpha.value || 0.0;
9806 # var rgbParams = [red, green, blue].join(',');
9807 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9808 # };
9809 #
9810 # var rgbToCssColor_ = function(red, green, blue) {
9811 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9812 # var hexString = rgbNumber.toString(16);
9813 # var missingZeros = 6 - hexString.length;
9814 # var resultBuilder = ['#'];
9815 # for (var i = 0; i < missingZeros; i++) {
9816 # resultBuilder.push('0');
9817 # }
9818 # resultBuilder.push(hexString);
9819 # return resultBuilder.join('');
9820 # };
9821 #
9822 # // ...
9823 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9824 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9825 # the final pixel color is defined by the equation:
9826 #
9827 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9828 #
9829 # This means that a value of 1.0 corresponds to a solid color, whereas
9830 # a value of 0.0 corresponds to a completely transparent color. This
9831 # uses a wrapper message rather than a simple float scalar so that it is
9832 # possible to distinguish between a default value and the value being unset.
9833 # If omitted, this color object is to be rendered as a solid color
9834 # (as if the alpha value had been explicitly given with a value of 1.0).
9835 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9836 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9837 },
9838 "bold": True or False, # True if the text is bold.
9839 "strikethrough": True or False, # True if the text has a strikethrough.
9840 "fontFamily": "A String", # The font family.
9841 "fontSize": 42, # The size of the font.
9842 "italic": True or False, # True if the text is italicized.
9843 "underline": True or False, # True if the text is underlined.
9844 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07009845 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
9846 "angle": 42, # The angle between the standard orientation and the desired orientation.
9847 # Measured in degrees. Valid values are between -90 and 90. Positive
9848 # angles are angled upwards, negative are angled downwards.
9849 #
9850 # Note: For LTR text direction positive angles are in the counterclockwise
9851 # direction, whereas for RTL they are in the clockwise direction
9852 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
9853 # characters is unchanged.
9854 # For example:
9855 #
9856 # | V |
9857 # | e |
9858 # | r |
9859 # | t |
9860 # | i |
9861 # | c |
9862 # | a |
9863 # | l |
9864 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009865 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9866 "borders": { # The borders of the cell. # The borders of the cell.
9867 "top": { # A border along a cell. # The top border of the cell.
9868 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9869 # for simplicity of conversion to/from color representations in various
9870 # languages over compactness; for example, the fields of this representation
9871 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9872 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9873 # method in iOS; and, with just a little work, it can be easily formatted into
9874 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9875 #
9876 # Example (Java):
9877 #
9878 # import com.google.type.Color;
9879 #
9880 # // ...
9881 # public static java.awt.Color fromProto(Color protocolor) {
9882 # float alpha = protocolor.hasAlpha()
9883 # ? protocolor.getAlpha().getValue()
9884 # : 1.0;
9885 #
9886 # return new java.awt.Color(
9887 # protocolor.getRed(),
9888 # protocolor.getGreen(),
9889 # protocolor.getBlue(),
9890 # alpha);
9891 # }
9892 #
9893 # public static Color toProto(java.awt.Color color) {
9894 # float red = (float) color.getRed();
9895 # float green = (float) color.getGreen();
9896 # float blue = (float) color.getBlue();
9897 # float denominator = 255.0;
9898 # Color.Builder resultBuilder =
9899 # Color
9900 # .newBuilder()
9901 # .setRed(red / denominator)
9902 # .setGreen(green / denominator)
9903 # .setBlue(blue / denominator);
9904 # int alpha = color.getAlpha();
9905 # if (alpha != 255) {
9906 # result.setAlpha(
9907 # FloatValue
9908 # .newBuilder()
9909 # .setValue(((float) alpha) / denominator)
9910 # .build());
9911 # }
9912 # return resultBuilder.build();
9913 # }
9914 # // ...
9915 #
9916 # Example (iOS / Obj-C):
9917 #
9918 # // ...
9919 # static UIColor* fromProto(Color* protocolor) {
9920 # float red = [protocolor red];
9921 # float green = [protocolor green];
9922 # float blue = [protocolor blue];
9923 # FloatValue* alpha_wrapper = [protocolor alpha];
9924 # float alpha = 1.0;
9925 # if (alpha_wrapper != nil) {
9926 # alpha = [alpha_wrapper value];
9927 # }
9928 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9929 # }
9930 #
9931 # static Color* toProto(UIColor* color) {
9932 # CGFloat red, green, blue, alpha;
9933 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9934 # return nil;
9935 # }
9936 # Color* result = [Color alloc] init];
9937 # [result setRed:red];
9938 # [result setGreen:green];
9939 # [result setBlue:blue];
9940 # if (alpha <= 0.9999) {
9941 # [result setAlpha:floatWrapperWithValue(alpha)];
9942 # }
9943 # [result autorelease];
9944 # return result;
9945 # }
9946 # // ...
9947 #
9948 # Example (JavaScript):
9949 #
9950 # // ...
9951 #
9952 # var protoToCssColor = function(rgb_color) {
9953 # var redFrac = rgb_color.red || 0.0;
9954 # var greenFrac = rgb_color.green || 0.0;
9955 # var blueFrac = rgb_color.blue || 0.0;
9956 # var red = Math.floor(redFrac * 255);
9957 # var green = Math.floor(greenFrac * 255);
9958 # var blue = Math.floor(blueFrac * 255);
9959 #
9960 # if (!('alpha' in rgb_color)) {
9961 # return rgbToCssColor_(red, green, blue);
9962 # }
9963 #
9964 # var alphaFrac = rgb_color.alpha.value || 0.0;
9965 # var rgbParams = [red, green, blue].join(',');
9966 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9967 # };
9968 #
9969 # var rgbToCssColor_ = function(red, green, blue) {
9970 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9971 # var hexString = rgbNumber.toString(16);
9972 # var missingZeros = 6 - hexString.length;
9973 # var resultBuilder = ['#'];
9974 # for (var i = 0; i < missingZeros; i++) {
9975 # resultBuilder.push('0');
9976 # }
9977 # resultBuilder.push(hexString);
9978 # return resultBuilder.join('');
9979 # };
9980 #
9981 # // ...
9982 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9983 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9984 # the final pixel color is defined by the equation:
9985 #
9986 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9987 #
9988 # This means that a value of 1.0 corresponds to a solid color, whereas
9989 # a value of 0.0 corresponds to a completely transparent color. This
9990 # uses a wrapper message rather than a simple float scalar so that it is
9991 # possible to distinguish between a default value and the value being unset.
9992 # If omitted, this color object is to be rendered as a solid color
9993 # (as if the alpha value had been explicitly given with a value of 1.0).
9994 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9995 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9996 },
9997 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009998 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009999 "style": "A String", # The style of the border.
10000 },
10001 "right": { # A border along a cell. # The right border of the cell.
10002 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10003 # for simplicity of conversion to/from color representations in various
10004 # languages over compactness; for example, the fields of this representation
10005 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10006 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10007 # method in iOS; and, with just a little work, it can be easily formatted into
10008 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10009 #
10010 # Example (Java):
10011 #
10012 # import com.google.type.Color;
10013 #
10014 # // ...
10015 # public static java.awt.Color fromProto(Color protocolor) {
10016 # float alpha = protocolor.hasAlpha()
10017 # ? protocolor.getAlpha().getValue()
10018 # : 1.0;
10019 #
10020 # return new java.awt.Color(
10021 # protocolor.getRed(),
10022 # protocolor.getGreen(),
10023 # protocolor.getBlue(),
10024 # alpha);
10025 # }
10026 #
10027 # public static Color toProto(java.awt.Color color) {
10028 # float red = (float) color.getRed();
10029 # float green = (float) color.getGreen();
10030 # float blue = (float) color.getBlue();
10031 # float denominator = 255.0;
10032 # Color.Builder resultBuilder =
10033 # Color
10034 # .newBuilder()
10035 # .setRed(red / denominator)
10036 # .setGreen(green / denominator)
10037 # .setBlue(blue / denominator);
10038 # int alpha = color.getAlpha();
10039 # if (alpha != 255) {
10040 # result.setAlpha(
10041 # FloatValue
10042 # .newBuilder()
10043 # .setValue(((float) alpha) / denominator)
10044 # .build());
10045 # }
10046 # return resultBuilder.build();
10047 # }
10048 # // ...
10049 #
10050 # Example (iOS / Obj-C):
10051 #
10052 # // ...
10053 # static UIColor* fromProto(Color* protocolor) {
10054 # float red = [protocolor red];
10055 # float green = [protocolor green];
10056 # float blue = [protocolor blue];
10057 # FloatValue* alpha_wrapper = [protocolor alpha];
10058 # float alpha = 1.0;
10059 # if (alpha_wrapper != nil) {
10060 # alpha = [alpha_wrapper value];
10061 # }
10062 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10063 # }
10064 #
10065 # static Color* toProto(UIColor* color) {
10066 # CGFloat red, green, blue, alpha;
10067 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10068 # return nil;
10069 # }
10070 # Color* result = [Color alloc] init];
10071 # [result setRed:red];
10072 # [result setGreen:green];
10073 # [result setBlue:blue];
10074 # if (alpha <= 0.9999) {
10075 # [result setAlpha:floatWrapperWithValue(alpha)];
10076 # }
10077 # [result autorelease];
10078 # return result;
10079 # }
10080 # // ...
10081 #
10082 # Example (JavaScript):
10083 #
10084 # // ...
10085 #
10086 # var protoToCssColor = function(rgb_color) {
10087 # var redFrac = rgb_color.red || 0.0;
10088 # var greenFrac = rgb_color.green || 0.0;
10089 # var blueFrac = rgb_color.blue || 0.0;
10090 # var red = Math.floor(redFrac * 255);
10091 # var green = Math.floor(greenFrac * 255);
10092 # var blue = Math.floor(blueFrac * 255);
10093 #
10094 # if (!('alpha' in rgb_color)) {
10095 # return rgbToCssColor_(red, green, blue);
10096 # }
10097 #
10098 # var alphaFrac = rgb_color.alpha.value || 0.0;
10099 # var rgbParams = [red, green, blue].join(',');
10100 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10101 # };
10102 #
10103 # var rgbToCssColor_ = function(red, green, blue) {
10104 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10105 # var hexString = rgbNumber.toString(16);
10106 # var missingZeros = 6 - hexString.length;
10107 # var resultBuilder = ['#'];
10108 # for (var i = 0; i < missingZeros; i++) {
10109 # resultBuilder.push('0');
10110 # }
10111 # resultBuilder.push(hexString);
10112 # return resultBuilder.join('');
10113 # };
10114 #
10115 # // ...
10116 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10117 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10118 # the final pixel color is defined by the equation:
10119 #
10120 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10121 #
10122 # This means that a value of 1.0 corresponds to a solid color, whereas
10123 # a value of 0.0 corresponds to a completely transparent color. This
10124 # uses a wrapper message rather than a simple float scalar so that it is
10125 # possible to distinguish between a default value and the value being unset.
10126 # If omitted, this color object is to be rendered as a solid color
10127 # (as if the alpha value had been explicitly given with a value of 1.0).
10128 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10129 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10130 },
10131 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010132 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010133 "style": "A String", # The style of the border.
10134 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010135 "left": { # A border along a cell. # The left border of the cell.
10136 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10137 # for simplicity of conversion to/from color representations in various
10138 # languages over compactness; for example, the fields of this representation
10139 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10140 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10141 # method in iOS; and, with just a little work, it can be easily formatted into
10142 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10143 #
10144 # Example (Java):
10145 #
10146 # import com.google.type.Color;
10147 #
10148 # // ...
10149 # public static java.awt.Color fromProto(Color protocolor) {
10150 # float alpha = protocolor.hasAlpha()
10151 # ? protocolor.getAlpha().getValue()
10152 # : 1.0;
10153 #
10154 # return new java.awt.Color(
10155 # protocolor.getRed(),
10156 # protocolor.getGreen(),
10157 # protocolor.getBlue(),
10158 # alpha);
10159 # }
10160 #
10161 # public static Color toProto(java.awt.Color color) {
10162 # float red = (float) color.getRed();
10163 # float green = (float) color.getGreen();
10164 # float blue = (float) color.getBlue();
10165 # float denominator = 255.0;
10166 # Color.Builder resultBuilder =
10167 # Color
10168 # .newBuilder()
10169 # .setRed(red / denominator)
10170 # .setGreen(green / denominator)
10171 # .setBlue(blue / denominator);
10172 # int alpha = color.getAlpha();
10173 # if (alpha != 255) {
10174 # result.setAlpha(
10175 # FloatValue
10176 # .newBuilder()
10177 # .setValue(((float) alpha) / denominator)
10178 # .build());
10179 # }
10180 # return resultBuilder.build();
10181 # }
10182 # // ...
10183 #
10184 # Example (iOS / Obj-C):
10185 #
10186 # // ...
10187 # static UIColor* fromProto(Color* protocolor) {
10188 # float red = [protocolor red];
10189 # float green = [protocolor green];
10190 # float blue = [protocolor blue];
10191 # FloatValue* alpha_wrapper = [protocolor alpha];
10192 # float alpha = 1.0;
10193 # if (alpha_wrapper != nil) {
10194 # alpha = [alpha_wrapper value];
10195 # }
10196 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10197 # }
10198 #
10199 # static Color* toProto(UIColor* color) {
10200 # CGFloat red, green, blue, alpha;
10201 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10202 # return nil;
10203 # }
10204 # Color* result = [Color alloc] init];
10205 # [result setRed:red];
10206 # [result setGreen:green];
10207 # [result setBlue:blue];
10208 # if (alpha <= 0.9999) {
10209 # [result setAlpha:floatWrapperWithValue(alpha)];
10210 # }
10211 # [result autorelease];
10212 # return result;
10213 # }
10214 # // ...
10215 #
10216 # Example (JavaScript):
10217 #
10218 # // ...
10219 #
10220 # var protoToCssColor = function(rgb_color) {
10221 # var redFrac = rgb_color.red || 0.0;
10222 # var greenFrac = rgb_color.green || 0.0;
10223 # var blueFrac = rgb_color.blue || 0.0;
10224 # var red = Math.floor(redFrac * 255);
10225 # var green = Math.floor(greenFrac * 255);
10226 # var blue = Math.floor(blueFrac * 255);
10227 #
10228 # if (!('alpha' in rgb_color)) {
10229 # return rgbToCssColor_(red, green, blue);
10230 # }
10231 #
10232 # var alphaFrac = rgb_color.alpha.value || 0.0;
10233 # var rgbParams = [red, green, blue].join(',');
10234 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10235 # };
10236 #
10237 # var rgbToCssColor_ = function(red, green, blue) {
10238 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10239 # var hexString = rgbNumber.toString(16);
10240 # var missingZeros = 6 - hexString.length;
10241 # var resultBuilder = ['#'];
10242 # for (var i = 0; i < missingZeros; i++) {
10243 # resultBuilder.push('0');
10244 # }
10245 # resultBuilder.push(hexString);
10246 # return resultBuilder.join('');
10247 # };
10248 #
10249 # // ...
10250 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10251 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10252 # the final pixel color is defined by the equation:
10253 #
10254 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10255 #
10256 # This means that a value of 1.0 corresponds to a solid color, whereas
10257 # a value of 0.0 corresponds to a completely transparent color. This
10258 # uses a wrapper message rather than a simple float scalar so that it is
10259 # possible to distinguish between a default value and the value being unset.
10260 # If omitted, this color object is to be rendered as a solid color
10261 # (as if the alpha value had been explicitly given with a value of 1.0).
10262 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10263 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10264 },
10265 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010266 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010267 "style": "A String", # The style of the border.
10268 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010269 "bottom": { # A border along a cell. # The bottom border of the cell.
10270 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10271 # for simplicity of conversion to/from color representations in various
10272 # languages over compactness; for example, the fields of this representation
10273 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10274 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10275 # method in iOS; and, with just a little work, it can be easily formatted into
10276 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10277 #
10278 # Example (Java):
10279 #
10280 # import com.google.type.Color;
10281 #
10282 # // ...
10283 # public static java.awt.Color fromProto(Color protocolor) {
10284 # float alpha = protocolor.hasAlpha()
10285 # ? protocolor.getAlpha().getValue()
10286 # : 1.0;
10287 #
10288 # return new java.awt.Color(
10289 # protocolor.getRed(),
10290 # protocolor.getGreen(),
10291 # protocolor.getBlue(),
10292 # alpha);
10293 # }
10294 #
10295 # public static Color toProto(java.awt.Color color) {
10296 # float red = (float) color.getRed();
10297 # float green = (float) color.getGreen();
10298 # float blue = (float) color.getBlue();
10299 # float denominator = 255.0;
10300 # Color.Builder resultBuilder =
10301 # Color
10302 # .newBuilder()
10303 # .setRed(red / denominator)
10304 # .setGreen(green / denominator)
10305 # .setBlue(blue / denominator);
10306 # int alpha = color.getAlpha();
10307 # if (alpha != 255) {
10308 # result.setAlpha(
10309 # FloatValue
10310 # .newBuilder()
10311 # .setValue(((float) alpha) / denominator)
10312 # .build());
10313 # }
10314 # return resultBuilder.build();
10315 # }
10316 # // ...
10317 #
10318 # Example (iOS / Obj-C):
10319 #
10320 # // ...
10321 # static UIColor* fromProto(Color* protocolor) {
10322 # float red = [protocolor red];
10323 # float green = [protocolor green];
10324 # float blue = [protocolor blue];
10325 # FloatValue* alpha_wrapper = [protocolor alpha];
10326 # float alpha = 1.0;
10327 # if (alpha_wrapper != nil) {
10328 # alpha = [alpha_wrapper value];
10329 # }
10330 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10331 # }
10332 #
10333 # static Color* toProto(UIColor* color) {
10334 # CGFloat red, green, blue, alpha;
10335 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10336 # return nil;
10337 # }
10338 # Color* result = [Color alloc] init];
10339 # [result setRed:red];
10340 # [result setGreen:green];
10341 # [result setBlue:blue];
10342 # if (alpha <= 0.9999) {
10343 # [result setAlpha:floatWrapperWithValue(alpha)];
10344 # }
10345 # [result autorelease];
10346 # return result;
10347 # }
10348 # // ...
10349 #
10350 # Example (JavaScript):
10351 #
10352 # // ...
10353 #
10354 # var protoToCssColor = function(rgb_color) {
10355 # var redFrac = rgb_color.red || 0.0;
10356 # var greenFrac = rgb_color.green || 0.0;
10357 # var blueFrac = rgb_color.blue || 0.0;
10358 # var red = Math.floor(redFrac * 255);
10359 # var green = Math.floor(greenFrac * 255);
10360 # var blue = Math.floor(blueFrac * 255);
10361 #
10362 # if (!('alpha' in rgb_color)) {
10363 # return rgbToCssColor_(red, green, blue);
10364 # }
10365 #
10366 # var alphaFrac = rgb_color.alpha.value || 0.0;
10367 # var rgbParams = [red, green, blue].join(',');
10368 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10369 # };
10370 #
10371 # var rgbToCssColor_ = function(red, green, blue) {
10372 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10373 # var hexString = rgbNumber.toString(16);
10374 # var missingZeros = 6 - hexString.length;
10375 # var resultBuilder = ['#'];
10376 # for (var i = 0; i < missingZeros; i++) {
10377 # resultBuilder.push('0');
10378 # }
10379 # resultBuilder.push(hexString);
10380 # return resultBuilder.join('');
10381 # };
10382 #
10383 # // ...
10384 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10385 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10386 # the final pixel color is defined by the equation:
10387 #
10388 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10389 #
10390 # This means that a value of 1.0 corresponds to a solid color, whereas
10391 # a value of 0.0 corresponds to a completely transparent color. This
10392 # uses a wrapper message rather than a simple float scalar so that it is
10393 # possible to distinguish between a default value and the value being unset.
10394 # If omitted, this color object is to be rendered as a solid color
10395 # (as if the alpha value had been explicitly given with a value of 1.0).
10396 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10397 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10398 },
10399 "width": 42, # The width of the border, in pixels.
10400 # Deprecated; the width is determined by the "style" field.
10401 "style": "A String", # The style of the border.
10402 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010403 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010404 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010405 },
10406 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10407 #
10408 # When writing, the new format will be merged with the existing format.
10409 "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 -070010410 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10411 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010412 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070010413 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010414 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010415 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010416 },
10417 "textDirection": "A String", # The direction of the text in the cell.
10418 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10419 # When updating padding, every field must be specified.
10420 "top": 42, # The top padding of the cell.
10421 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010422 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010423 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010424 },
Thomas Coffee2f245372017-03-27 10:39:26 -070010425 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010426 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10427 # for simplicity of conversion to/from color representations in various
10428 # languages over compactness; for example, the fields of this representation
10429 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10430 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10431 # method in iOS; and, with just a little work, it can be easily formatted into
10432 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10433 #
10434 # Example (Java):
10435 #
10436 # import com.google.type.Color;
10437 #
10438 # // ...
10439 # public static java.awt.Color fromProto(Color protocolor) {
10440 # float alpha = protocolor.hasAlpha()
10441 # ? protocolor.getAlpha().getValue()
10442 # : 1.0;
10443 #
10444 # return new java.awt.Color(
10445 # protocolor.getRed(),
10446 # protocolor.getGreen(),
10447 # protocolor.getBlue(),
10448 # alpha);
10449 # }
10450 #
10451 # public static Color toProto(java.awt.Color color) {
10452 # float red = (float) color.getRed();
10453 # float green = (float) color.getGreen();
10454 # float blue = (float) color.getBlue();
10455 # float denominator = 255.0;
10456 # Color.Builder resultBuilder =
10457 # Color
10458 # .newBuilder()
10459 # .setRed(red / denominator)
10460 # .setGreen(green / denominator)
10461 # .setBlue(blue / denominator);
10462 # int alpha = color.getAlpha();
10463 # if (alpha != 255) {
10464 # result.setAlpha(
10465 # FloatValue
10466 # .newBuilder()
10467 # .setValue(((float) alpha) / denominator)
10468 # .build());
10469 # }
10470 # return resultBuilder.build();
10471 # }
10472 # // ...
10473 #
10474 # Example (iOS / Obj-C):
10475 #
10476 # // ...
10477 # static UIColor* fromProto(Color* protocolor) {
10478 # float red = [protocolor red];
10479 # float green = [protocolor green];
10480 # float blue = [protocolor blue];
10481 # FloatValue* alpha_wrapper = [protocolor alpha];
10482 # float alpha = 1.0;
10483 # if (alpha_wrapper != nil) {
10484 # alpha = [alpha_wrapper value];
10485 # }
10486 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10487 # }
10488 #
10489 # static Color* toProto(UIColor* color) {
10490 # CGFloat red, green, blue, alpha;
10491 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10492 # return nil;
10493 # }
10494 # Color* result = [Color alloc] init];
10495 # [result setRed:red];
10496 # [result setGreen:green];
10497 # [result setBlue:blue];
10498 # if (alpha <= 0.9999) {
10499 # [result setAlpha:floatWrapperWithValue(alpha)];
10500 # }
10501 # [result autorelease];
10502 # return result;
10503 # }
10504 # // ...
10505 #
10506 # Example (JavaScript):
10507 #
10508 # // ...
10509 #
10510 # var protoToCssColor = function(rgb_color) {
10511 # var redFrac = rgb_color.red || 0.0;
10512 # var greenFrac = rgb_color.green || 0.0;
10513 # var blueFrac = rgb_color.blue || 0.0;
10514 # var red = Math.floor(redFrac * 255);
10515 # var green = Math.floor(greenFrac * 255);
10516 # var blue = Math.floor(blueFrac * 255);
10517 #
10518 # if (!('alpha' in rgb_color)) {
10519 # return rgbToCssColor_(red, green, blue);
10520 # }
10521 #
10522 # var alphaFrac = rgb_color.alpha.value || 0.0;
10523 # var rgbParams = [red, green, blue].join(',');
10524 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10525 # };
10526 #
10527 # var rgbToCssColor_ = function(red, green, blue) {
10528 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10529 # var hexString = rgbNumber.toString(16);
10530 # var missingZeros = 6 - hexString.length;
10531 # var resultBuilder = ['#'];
10532 # for (var i = 0; i < missingZeros; i++) {
10533 # resultBuilder.push('0');
10534 # }
10535 # resultBuilder.push(hexString);
10536 # return resultBuilder.join('');
10537 # };
10538 #
10539 # // ...
10540 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10541 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10542 # the final pixel color is defined by the equation:
10543 #
10544 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10545 #
10546 # This means that a value of 1.0 corresponds to a solid color, whereas
10547 # a value of 0.0 corresponds to a completely transparent color. This
10548 # uses a wrapper message rather than a simple float scalar so that it is
10549 # possible to distinguish between a default value and the value being unset.
10550 # If omitted, this color object is to be rendered as a solid color
10551 # (as if the alpha value had been explicitly given with a value of 1.0).
10552 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10553 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10554 },
Thomas Coffee2f245372017-03-27 10:39:26 -070010555 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010556 "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).
10557 # Absent values indicate that the field isn't specified.
10558 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10559 # for simplicity of conversion to/from color representations in various
10560 # languages over compactness; for example, the fields of this representation
10561 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10562 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10563 # method in iOS; and, with just a little work, it can be easily formatted into
10564 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10565 #
10566 # Example (Java):
10567 #
10568 # import com.google.type.Color;
10569 #
10570 # // ...
10571 # public static java.awt.Color fromProto(Color protocolor) {
10572 # float alpha = protocolor.hasAlpha()
10573 # ? protocolor.getAlpha().getValue()
10574 # : 1.0;
10575 #
10576 # return new java.awt.Color(
10577 # protocolor.getRed(),
10578 # protocolor.getGreen(),
10579 # protocolor.getBlue(),
10580 # alpha);
10581 # }
10582 #
10583 # public static Color toProto(java.awt.Color color) {
10584 # float red = (float) color.getRed();
10585 # float green = (float) color.getGreen();
10586 # float blue = (float) color.getBlue();
10587 # float denominator = 255.0;
10588 # Color.Builder resultBuilder =
10589 # Color
10590 # .newBuilder()
10591 # .setRed(red / denominator)
10592 # .setGreen(green / denominator)
10593 # .setBlue(blue / denominator);
10594 # int alpha = color.getAlpha();
10595 # if (alpha != 255) {
10596 # result.setAlpha(
10597 # FloatValue
10598 # .newBuilder()
10599 # .setValue(((float) alpha) / denominator)
10600 # .build());
10601 # }
10602 # return resultBuilder.build();
10603 # }
10604 # // ...
10605 #
10606 # Example (iOS / Obj-C):
10607 #
10608 # // ...
10609 # static UIColor* fromProto(Color* protocolor) {
10610 # float red = [protocolor red];
10611 # float green = [protocolor green];
10612 # float blue = [protocolor blue];
10613 # FloatValue* alpha_wrapper = [protocolor alpha];
10614 # float alpha = 1.0;
10615 # if (alpha_wrapper != nil) {
10616 # alpha = [alpha_wrapper value];
10617 # }
10618 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10619 # }
10620 #
10621 # static Color* toProto(UIColor* color) {
10622 # CGFloat red, green, blue, alpha;
10623 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10624 # return nil;
10625 # }
10626 # Color* result = [Color alloc] init];
10627 # [result setRed:red];
10628 # [result setGreen:green];
10629 # [result setBlue:blue];
10630 # if (alpha <= 0.9999) {
10631 # [result setAlpha:floatWrapperWithValue(alpha)];
10632 # }
10633 # [result autorelease];
10634 # return result;
10635 # }
10636 # // ...
10637 #
10638 # Example (JavaScript):
10639 #
10640 # // ...
10641 #
10642 # var protoToCssColor = function(rgb_color) {
10643 # var redFrac = rgb_color.red || 0.0;
10644 # var greenFrac = rgb_color.green || 0.0;
10645 # var blueFrac = rgb_color.blue || 0.0;
10646 # var red = Math.floor(redFrac * 255);
10647 # var green = Math.floor(greenFrac * 255);
10648 # var blue = Math.floor(blueFrac * 255);
10649 #
10650 # if (!('alpha' in rgb_color)) {
10651 # return rgbToCssColor_(red, green, blue);
10652 # }
10653 #
10654 # var alphaFrac = rgb_color.alpha.value || 0.0;
10655 # var rgbParams = [red, green, blue].join(',');
10656 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10657 # };
10658 #
10659 # var rgbToCssColor_ = function(red, green, blue) {
10660 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10661 # var hexString = rgbNumber.toString(16);
10662 # var missingZeros = 6 - hexString.length;
10663 # var resultBuilder = ['#'];
10664 # for (var i = 0; i < missingZeros; i++) {
10665 # resultBuilder.push('0');
10666 # }
10667 # resultBuilder.push(hexString);
10668 # return resultBuilder.join('');
10669 # };
10670 #
10671 # // ...
10672 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10673 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10674 # the final pixel color is defined by the equation:
10675 #
10676 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10677 #
10678 # This means that a value of 1.0 corresponds to a solid color, whereas
10679 # a value of 0.0 corresponds to a completely transparent color. This
10680 # uses a wrapper message rather than a simple float scalar so that it is
10681 # possible to distinguish between a default value and the value being unset.
10682 # If omitted, this color object is to be rendered as a solid color
10683 # (as if the alpha value had been explicitly given with a value of 1.0).
10684 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10685 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10686 },
10687 "bold": True or False, # True if the text is bold.
10688 "strikethrough": True or False, # True if the text has a strikethrough.
10689 "fontFamily": "A String", # The font family.
10690 "fontSize": 42, # The size of the font.
10691 "italic": True or False, # True if the text is italicized.
10692 "underline": True or False, # True if the text is underlined.
10693 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010694 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
10695 "angle": 42, # The angle between the standard orientation and the desired orientation.
10696 # Measured in degrees. Valid values are between -90 and 90. Positive
10697 # angles are angled upwards, negative are angled downwards.
10698 #
10699 # Note: For LTR text direction positive angles are in the counterclockwise
10700 # direction, whereas for RTL they are in the clockwise direction
10701 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
10702 # characters is unchanged.
10703 # For example:
10704 #
10705 # | V |
10706 # | e |
10707 # | r |
10708 # | t |
10709 # | i |
10710 # | c |
10711 # | a |
10712 # | l |
10713 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010714 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10715 "borders": { # The borders of the cell. # The borders of the cell.
10716 "top": { # A border along a cell. # The top border of the cell.
10717 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10718 # for simplicity of conversion to/from color representations in various
10719 # languages over compactness; for example, the fields of this representation
10720 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10721 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10722 # method in iOS; and, with just a little work, it can be easily formatted into
10723 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10724 #
10725 # Example (Java):
10726 #
10727 # import com.google.type.Color;
10728 #
10729 # // ...
10730 # public static java.awt.Color fromProto(Color protocolor) {
10731 # float alpha = protocolor.hasAlpha()
10732 # ? protocolor.getAlpha().getValue()
10733 # : 1.0;
10734 #
10735 # return new java.awt.Color(
10736 # protocolor.getRed(),
10737 # protocolor.getGreen(),
10738 # protocolor.getBlue(),
10739 # alpha);
10740 # }
10741 #
10742 # public static Color toProto(java.awt.Color color) {
10743 # float red = (float) color.getRed();
10744 # float green = (float) color.getGreen();
10745 # float blue = (float) color.getBlue();
10746 # float denominator = 255.0;
10747 # Color.Builder resultBuilder =
10748 # Color
10749 # .newBuilder()
10750 # .setRed(red / denominator)
10751 # .setGreen(green / denominator)
10752 # .setBlue(blue / denominator);
10753 # int alpha = color.getAlpha();
10754 # if (alpha != 255) {
10755 # result.setAlpha(
10756 # FloatValue
10757 # .newBuilder()
10758 # .setValue(((float) alpha) / denominator)
10759 # .build());
10760 # }
10761 # return resultBuilder.build();
10762 # }
10763 # // ...
10764 #
10765 # Example (iOS / Obj-C):
10766 #
10767 # // ...
10768 # static UIColor* fromProto(Color* protocolor) {
10769 # float red = [protocolor red];
10770 # float green = [protocolor green];
10771 # float blue = [protocolor blue];
10772 # FloatValue* alpha_wrapper = [protocolor alpha];
10773 # float alpha = 1.0;
10774 # if (alpha_wrapper != nil) {
10775 # alpha = [alpha_wrapper value];
10776 # }
10777 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10778 # }
10779 #
10780 # static Color* toProto(UIColor* color) {
10781 # CGFloat red, green, blue, alpha;
10782 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10783 # return nil;
10784 # }
10785 # Color* result = [Color alloc] init];
10786 # [result setRed:red];
10787 # [result setGreen:green];
10788 # [result setBlue:blue];
10789 # if (alpha <= 0.9999) {
10790 # [result setAlpha:floatWrapperWithValue(alpha)];
10791 # }
10792 # [result autorelease];
10793 # return result;
10794 # }
10795 # // ...
10796 #
10797 # Example (JavaScript):
10798 #
10799 # // ...
10800 #
10801 # var protoToCssColor = function(rgb_color) {
10802 # var redFrac = rgb_color.red || 0.0;
10803 # var greenFrac = rgb_color.green || 0.0;
10804 # var blueFrac = rgb_color.blue || 0.0;
10805 # var red = Math.floor(redFrac * 255);
10806 # var green = Math.floor(greenFrac * 255);
10807 # var blue = Math.floor(blueFrac * 255);
10808 #
10809 # if (!('alpha' in rgb_color)) {
10810 # return rgbToCssColor_(red, green, blue);
10811 # }
10812 #
10813 # var alphaFrac = rgb_color.alpha.value || 0.0;
10814 # var rgbParams = [red, green, blue].join(',');
10815 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10816 # };
10817 #
10818 # var rgbToCssColor_ = function(red, green, blue) {
10819 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10820 # var hexString = rgbNumber.toString(16);
10821 # var missingZeros = 6 - hexString.length;
10822 # var resultBuilder = ['#'];
10823 # for (var i = 0; i < missingZeros; i++) {
10824 # resultBuilder.push('0');
10825 # }
10826 # resultBuilder.push(hexString);
10827 # return resultBuilder.join('');
10828 # };
10829 #
10830 # // ...
10831 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10832 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10833 # the final pixel color is defined by the equation:
10834 #
10835 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10836 #
10837 # This means that a value of 1.0 corresponds to a solid color, whereas
10838 # a value of 0.0 corresponds to a completely transparent color. This
10839 # uses a wrapper message rather than a simple float scalar so that it is
10840 # possible to distinguish between a default value and the value being unset.
10841 # If omitted, this color object is to be rendered as a solid color
10842 # (as if the alpha value had been explicitly given with a value of 1.0).
10843 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10844 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10845 },
10846 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010847 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010848 "style": "A String", # The style of the border.
10849 },
10850 "right": { # A border along a cell. # The right border of the cell.
10851 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10852 # for simplicity of conversion to/from color representations in various
10853 # languages over compactness; for example, the fields of this representation
10854 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10855 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10856 # method in iOS; and, with just a little work, it can be easily formatted into
10857 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10858 #
10859 # Example (Java):
10860 #
10861 # import com.google.type.Color;
10862 #
10863 # // ...
10864 # public static java.awt.Color fromProto(Color protocolor) {
10865 # float alpha = protocolor.hasAlpha()
10866 # ? protocolor.getAlpha().getValue()
10867 # : 1.0;
10868 #
10869 # return new java.awt.Color(
10870 # protocolor.getRed(),
10871 # protocolor.getGreen(),
10872 # protocolor.getBlue(),
10873 # alpha);
10874 # }
10875 #
10876 # public static Color toProto(java.awt.Color color) {
10877 # float red = (float) color.getRed();
10878 # float green = (float) color.getGreen();
10879 # float blue = (float) color.getBlue();
10880 # float denominator = 255.0;
10881 # Color.Builder resultBuilder =
10882 # Color
10883 # .newBuilder()
10884 # .setRed(red / denominator)
10885 # .setGreen(green / denominator)
10886 # .setBlue(blue / denominator);
10887 # int alpha = color.getAlpha();
10888 # if (alpha != 255) {
10889 # result.setAlpha(
10890 # FloatValue
10891 # .newBuilder()
10892 # .setValue(((float) alpha) / denominator)
10893 # .build());
10894 # }
10895 # return resultBuilder.build();
10896 # }
10897 # // ...
10898 #
10899 # Example (iOS / Obj-C):
10900 #
10901 # // ...
10902 # static UIColor* fromProto(Color* protocolor) {
10903 # float red = [protocolor red];
10904 # float green = [protocolor green];
10905 # float blue = [protocolor blue];
10906 # FloatValue* alpha_wrapper = [protocolor alpha];
10907 # float alpha = 1.0;
10908 # if (alpha_wrapper != nil) {
10909 # alpha = [alpha_wrapper value];
10910 # }
10911 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10912 # }
10913 #
10914 # static Color* toProto(UIColor* color) {
10915 # CGFloat red, green, blue, alpha;
10916 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10917 # return nil;
10918 # }
10919 # Color* result = [Color alloc] init];
10920 # [result setRed:red];
10921 # [result setGreen:green];
10922 # [result setBlue:blue];
10923 # if (alpha <= 0.9999) {
10924 # [result setAlpha:floatWrapperWithValue(alpha)];
10925 # }
10926 # [result autorelease];
10927 # return result;
10928 # }
10929 # // ...
10930 #
10931 # Example (JavaScript):
10932 #
10933 # // ...
10934 #
10935 # var protoToCssColor = function(rgb_color) {
10936 # var redFrac = rgb_color.red || 0.0;
10937 # var greenFrac = rgb_color.green || 0.0;
10938 # var blueFrac = rgb_color.blue || 0.0;
10939 # var red = Math.floor(redFrac * 255);
10940 # var green = Math.floor(greenFrac * 255);
10941 # var blue = Math.floor(blueFrac * 255);
10942 #
10943 # if (!('alpha' in rgb_color)) {
10944 # return rgbToCssColor_(red, green, blue);
10945 # }
10946 #
10947 # var alphaFrac = rgb_color.alpha.value || 0.0;
10948 # var rgbParams = [red, green, blue].join(',');
10949 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10950 # };
10951 #
10952 # var rgbToCssColor_ = function(red, green, blue) {
10953 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10954 # var hexString = rgbNumber.toString(16);
10955 # var missingZeros = 6 - hexString.length;
10956 # var resultBuilder = ['#'];
10957 # for (var i = 0; i < missingZeros; i++) {
10958 # resultBuilder.push('0');
10959 # }
10960 # resultBuilder.push(hexString);
10961 # return resultBuilder.join('');
10962 # };
10963 #
10964 # // ...
10965 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10966 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10967 # the final pixel color is defined by the equation:
10968 #
10969 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10970 #
10971 # This means that a value of 1.0 corresponds to a solid color, whereas
10972 # a value of 0.0 corresponds to a completely transparent color. This
10973 # uses a wrapper message rather than a simple float scalar so that it is
10974 # possible to distinguish between a default value and the value being unset.
10975 # If omitted, this color object is to be rendered as a solid color
10976 # (as if the alpha value had been explicitly given with a value of 1.0).
10977 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10978 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10979 },
10980 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010981 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010982 "style": "A String", # The style of the border.
10983 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010984 "left": { # A border along a cell. # The left border of the cell.
10985 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10986 # for simplicity of conversion to/from color representations in various
10987 # languages over compactness; for example, the fields of this representation
10988 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10989 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10990 # method in iOS; and, with just a little work, it can be easily formatted into
10991 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10992 #
10993 # Example (Java):
10994 #
10995 # import com.google.type.Color;
10996 #
10997 # // ...
10998 # public static java.awt.Color fromProto(Color protocolor) {
10999 # float alpha = protocolor.hasAlpha()
11000 # ? protocolor.getAlpha().getValue()
11001 # : 1.0;
11002 #
11003 # return new java.awt.Color(
11004 # protocolor.getRed(),
11005 # protocolor.getGreen(),
11006 # protocolor.getBlue(),
11007 # alpha);
11008 # }
11009 #
11010 # public static Color toProto(java.awt.Color color) {
11011 # float red = (float) color.getRed();
11012 # float green = (float) color.getGreen();
11013 # float blue = (float) color.getBlue();
11014 # float denominator = 255.0;
11015 # Color.Builder resultBuilder =
11016 # Color
11017 # .newBuilder()
11018 # .setRed(red / denominator)
11019 # .setGreen(green / denominator)
11020 # .setBlue(blue / denominator);
11021 # int alpha = color.getAlpha();
11022 # if (alpha != 255) {
11023 # result.setAlpha(
11024 # FloatValue
11025 # .newBuilder()
11026 # .setValue(((float) alpha) / denominator)
11027 # .build());
11028 # }
11029 # return resultBuilder.build();
11030 # }
11031 # // ...
11032 #
11033 # Example (iOS / Obj-C):
11034 #
11035 # // ...
11036 # static UIColor* fromProto(Color* protocolor) {
11037 # float red = [protocolor red];
11038 # float green = [protocolor green];
11039 # float blue = [protocolor blue];
11040 # FloatValue* alpha_wrapper = [protocolor alpha];
11041 # float alpha = 1.0;
11042 # if (alpha_wrapper != nil) {
11043 # alpha = [alpha_wrapper value];
11044 # }
11045 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11046 # }
11047 #
11048 # static Color* toProto(UIColor* color) {
11049 # CGFloat red, green, blue, alpha;
11050 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11051 # return nil;
11052 # }
11053 # Color* result = [Color alloc] init];
11054 # [result setRed:red];
11055 # [result setGreen:green];
11056 # [result setBlue:blue];
11057 # if (alpha <= 0.9999) {
11058 # [result setAlpha:floatWrapperWithValue(alpha)];
11059 # }
11060 # [result autorelease];
11061 # return result;
11062 # }
11063 # // ...
11064 #
11065 # Example (JavaScript):
11066 #
11067 # // ...
11068 #
11069 # var protoToCssColor = function(rgb_color) {
11070 # var redFrac = rgb_color.red || 0.0;
11071 # var greenFrac = rgb_color.green || 0.0;
11072 # var blueFrac = rgb_color.blue || 0.0;
11073 # var red = Math.floor(redFrac * 255);
11074 # var green = Math.floor(greenFrac * 255);
11075 # var blue = Math.floor(blueFrac * 255);
11076 #
11077 # if (!('alpha' in rgb_color)) {
11078 # return rgbToCssColor_(red, green, blue);
11079 # }
11080 #
11081 # var alphaFrac = rgb_color.alpha.value || 0.0;
11082 # var rgbParams = [red, green, blue].join(',');
11083 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11084 # };
11085 #
11086 # var rgbToCssColor_ = function(red, green, blue) {
11087 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11088 # var hexString = rgbNumber.toString(16);
11089 # var missingZeros = 6 - hexString.length;
11090 # var resultBuilder = ['#'];
11091 # for (var i = 0; i < missingZeros; i++) {
11092 # resultBuilder.push('0');
11093 # }
11094 # resultBuilder.push(hexString);
11095 # return resultBuilder.join('');
11096 # };
11097 #
11098 # // ...
11099 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11100 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11101 # the final pixel color is defined by the equation:
11102 #
11103 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11104 #
11105 # This means that a value of 1.0 corresponds to a solid color, whereas
11106 # a value of 0.0 corresponds to a completely transparent color. This
11107 # uses a wrapper message rather than a simple float scalar so that it is
11108 # possible to distinguish between a default value and the value being unset.
11109 # If omitted, this color object is to be rendered as a solid color
11110 # (as if the alpha value had been explicitly given with a value of 1.0).
11111 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11112 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11113 },
11114 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070011115 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011116 "style": "A String", # The style of the border.
11117 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011118 "bottom": { # A border along a cell. # The bottom border of the cell.
11119 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
11120 # for simplicity of conversion to/from color representations in various
11121 # languages over compactness; for example, the fields of this representation
11122 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11123 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11124 # method in iOS; and, with just a little work, it can be easily formatted into
11125 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11126 #
11127 # Example (Java):
11128 #
11129 # import com.google.type.Color;
11130 #
11131 # // ...
11132 # public static java.awt.Color fromProto(Color protocolor) {
11133 # float alpha = protocolor.hasAlpha()
11134 # ? protocolor.getAlpha().getValue()
11135 # : 1.0;
11136 #
11137 # return new java.awt.Color(
11138 # protocolor.getRed(),
11139 # protocolor.getGreen(),
11140 # protocolor.getBlue(),
11141 # alpha);
11142 # }
11143 #
11144 # public static Color toProto(java.awt.Color color) {
11145 # float red = (float) color.getRed();
11146 # float green = (float) color.getGreen();
11147 # float blue = (float) color.getBlue();
11148 # float denominator = 255.0;
11149 # Color.Builder resultBuilder =
11150 # Color
11151 # .newBuilder()
11152 # .setRed(red / denominator)
11153 # .setGreen(green / denominator)
11154 # .setBlue(blue / denominator);
11155 # int alpha = color.getAlpha();
11156 # if (alpha != 255) {
11157 # result.setAlpha(
11158 # FloatValue
11159 # .newBuilder()
11160 # .setValue(((float) alpha) / denominator)
11161 # .build());
11162 # }
11163 # return resultBuilder.build();
11164 # }
11165 # // ...
11166 #
11167 # Example (iOS / Obj-C):
11168 #
11169 # // ...
11170 # static UIColor* fromProto(Color* protocolor) {
11171 # float red = [protocolor red];
11172 # float green = [protocolor green];
11173 # float blue = [protocolor blue];
11174 # FloatValue* alpha_wrapper = [protocolor alpha];
11175 # float alpha = 1.0;
11176 # if (alpha_wrapper != nil) {
11177 # alpha = [alpha_wrapper value];
11178 # }
11179 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11180 # }
11181 #
11182 # static Color* toProto(UIColor* color) {
11183 # CGFloat red, green, blue, alpha;
11184 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11185 # return nil;
11186 # }
11187 # Color* result = [Color alloc] init];
11188 # [result setRed:red];
11189 # [result setGreen:green];
11190 # [result setBlue:blue];
11191 # if (alpha <= 0.9999) {
11192 # [result setAlpha:floatWrapperWithValue(alpha)];
11193 # }
11194 # [result autorelease];
11195 # return result;
11196 # }
11197 # // ...
11198 #
11199 # Example (JavaScript):
11200 #
11201 # // ...
11202 #
11203 # var protoToCssColor = function(rgb_color) {
11204 # var redFrac = rgb_color.red || 0.0;
11205 # var greenFrac = rgb_color.green || 0.0;
11206 # var blueFrac = rgb_color.blue || 0.0;
11207 # var red = Math.floor(redFrac * 255);
11208 # var green = Math.floor(greenFrac * 255);
11209 # var blue = Math.floor(blueFrac * 255);
11210 #
11211 # if (!('alpha' in rgb_color)) {
11212 # return rgbToCssColor_(red, green, blue);
11213 # }
11214 #
11215 # var alphaFrac = rgb_color.alpha.value || 0.0;
11216 # var rgbParams = [red, green, blue].join(',');
11217 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11218 # };
11219 #
11220 # var rgbToCssColor_ = function(red, green, blue) {
11221 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11222 # var hexString = rgbNumber.toString(16);
11223 # var missingZeros = 6 - hexString.length;
11224 # var resultBuilder = ['#'];
11225 # for (var i = 0; i < missingZeros; i++) {
11226 # resultBuilder.push('0');
11227 # }
11228 # resultBuilder.push(hexString);
11229 # return resultBuilder.join('');
11230 # };
11231 #
11232 # // ...
11233 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11234 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11235 # the final pixel color is defined by the equation:
11236 #
11237 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11238 #
11239 # This means that a value of 1.0 corresponds to a solid color, whereas
11240 # a value of 0.0 corresponds to a completely transparent color. This
11241 # uses a wrapper message rather than a simple float scalar so that it is
11242 # possible to distinguish between a default value and the value being unset.
11243 # If omitted, this color object is to be rendered as a solid color
11244 # (as if the alpha value had been explicitly given with a value of 1.0).
11245 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11246 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11247 },
11248 "width": 42, # The width of the border, in pixels.
11249 # Deprecated; the width is determined by the "style" field.
11250 "style": "A String", # The style of the border.
11251 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011252 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011253 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011254 },
11255 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
11256 #
11257 # When writing, the new data validation rule will overwrite any prior rule.
11258 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
11259 # If true, "List" conditions will show a dropdown.
11260 "strict": True or False, # True if invalid data should be rejected.
11261 "inputMessage": "A String", # A message to show the user when adding data to the cell.
11262 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
11263 # BooleanConditions are used by conditional formatting,
11264 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011265 "values": [ # The values of the condition. The number of supported values depends
11266 # on the condition type. Some support zero values,
11267 # others one or two values,
11268 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
11269 { # The value of the condition.
11270 "relativeDate": "A String", # A relative date (based on the current date).
11271 # Valid only if the type is
11272 # DATE_BEFORE,
11273 # DATE_AFTER,
11274 # DATE_ON_OR_BEFORE or
11275 # DATE_ON_OR_AFTER.
11276 #
11277 # Relative dates are not supported in data validation.
11278 # They are supported only in conditional formatting and
11279 # conditional filters.
11280 "userEnteredValue": "A String", # A value the condition is based on.
11281 # The value will be parsed as if the user typed into a cell.
11282 # Formulas are supported (and must begin with an `=`).
11283 },
11284 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011285 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011286 },
11287 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011288 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
11289 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011290 # Runs start at specific indexes in the text and continue until the next
11291 # run. Properties of a run will continue unless explicitly changed
11292 # in a subsequent run (and properties of the first run will continue
11293 # the properties of the cell unless explicitly changed).
11294 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011295 # When writing, the new runs will overwrite any prior runs. When writing a
11296 # new user_entered_value, previous runs will be erased.
11297 { # A run of a text format. The format of this run continues until the start
11298 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011299 # When updating, all fields must be set.
11300 "startIndex": 42, # The character index where this run starts.
11301 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
11302 # Absent values indicate that the field isn't specified.
11303 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11304 # for simplicity of conversion to/from color representations in various
11305 # languages over compactness; for example, the fields of this representation
11306 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11307 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11308 # method in iOS; and, with just a little work, it can be easily formatted into
11309 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11310 #
11311 # Example (Java):
11312 #
11313 # import com.google.type.Color;
11314 #
11315 # // ...
11316 # public static java.awt.Color fromProto(Color protocolor) {
11317 # float alpha = protocolor.hasAlpha()
11318 # ? protocolor.getAlpha().getValue()
11319 # : 1.0;
11320 #
11321 # return new java.awt.Color(
11322 # protocolor.getRed(),
11323 # protocolor.getGreen(),
11324 # protocolor.getBlue(),
11325 # alpha);
11326 # }
11327 #
11328 # public static Color toProto(java.awt.Color color) {
11329 # float red = (float) color.getRed();
11330 # float green = (float) color.getGreen();
11331 # float blue = (float) color.getBlue();
11332 # float denominator = 255.0;
11333 # Color.Builder resultBuilder =
11334 # Color
11335 # .newBuilder()
11336 # .setRed(red / denominator)
11337 # .setGreen(green / denominator)
11338 # .setBlue(blue / denominator);
11339 # int alpha = color.getAlpha();
11340 # if (alpha != 255) {
11341 # result.setAlpha(
11342 # FloatValue
11343 # .newBuilder()
11344 # .setValue(((float) alpha) / denominator)
11345 # .build());
11346 # }
11347 # return resultBuilder.build();
11348 # }
11349 # // ...
11350 #
11351 # Example (iOS / Obj-C):
11352 #
11353 # // ...
11354 # static UIColor* fromProto(Color* protocolor) {
11355 # float red = [protocolor red];
11356 # float green = [protocolor green];
11357 # float blue = [protocolor blue];
11358 # FloatValue* alpha_wrapper = [protocolor alpha];
11359 # float alpha = 1.0;
11360 # if (alpha_wrapper != nil) {
11361 # alpha = [alpha_wrapper value];
11362 # }
11363 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11364 # }
11365 #
11366 # static Color* toProto(UIColor* color) {
11367 # CGFloat red, green, blue, alpha;
11368 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11369 # return nil;
11370 # }
11371 # Color* result = [Color alloc] init];
11372 # [result setRed:red];
11373 # [result setGreen:green];
11374 # [result setBlue:blue];
11375 # if (alpha <= 0.9999) {
11376 # [result setAlpha:floatWrapperWithValue(alpha)];
11377 # }
11378 # [result autorelease];
11379 # return result;
11380 # }
11381 # // ...
11382 #
11383 # Example (JavaScript):
11384 #
11385 # // ...
11386 #
11387 # var protoToCssColor = function(rgb_color) {
11388 # var redFrac = rgb_color.red || 0.0;
11389 # var greenFrac = rgb_color.green || 0.0;
11390 # var blueFrac = rgb_color.blue || 0.0;
11391 # var red = Math.floor(redFrac * 255);
11392 # var green = Math.floor(greenFrac * 255);
11393 # var blue = Math.floor(blueFrac * 255);
11394 #
11395 # if (!('alpha' in rgb_color)) {
11396 # return rgbToCssColor_(red, green, blue);
11397 # }
11398 #
11399 # var alphaFrac = rgb_color.alpha.value || 0.0;
11400 # var rgbParams = [red, green, blue].join(',');
11401 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11402 # };
11403 #
11404 # var rgbToCssColor_ = function(red, green, blue) {
11405 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11406 # var hexString = rgbNumber.toString(16);
11407 # var missingZeros = 6 - hexString.length;
11408 # var resultBuilder = ['#'];
11409 # for (var i = 0; i < missingZeros; i++) {
11410 # resultBuilder.push('0');
11411 # }
11412 # resultBuilder.push(hexString);
11413 # return resultBuilder.join('');
11414 # };
11415 #
11416 # // ...
11417 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11418 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11419 # the final pixel color is defined by the equation:
11420 #
11421 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11422 #
11423 # This means that a value of 1.0 corresponds to a solid color, whereas
11424 # a value of 0.0 corresponds to a completely transparent color. This
11425 # uses a wrapper message rather than a simple float scalar so that it is
11426 # possible to distinguish between a default value and the value being unset.
11427 # If omitted, this color object is to be rendered as a solid color
11428 # (as if the alpha value had been explicitly given with a value of 1.0).
11429 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11430 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11431 },
11432 "bold": True or False, # True if the text is bold.
11433 "strikethrough": True or False, # True if the text has a strikethrough.
11434 "fontFamily": "A String", # The font family.
11435 "fontSize": 42, # The size of the font.
11436 "italic": True or False, # True if the text is italicized.
11437 "underline": True or False, # True if the text is underlined.
11438 },
11439 },
11440 ],
11441 },
11442 ],
11443 },
11444 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011445 "fields": "A String", # The fields of CellData that should be updated.
11446 # At least one field must be specified.
11447 # The root is the CellData; 'row.values.' should not be specified.
11448 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011449 },
11450 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11451 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11452 # This differs based on the type and amount of source data.
11453 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11454 # the location that has data and automatically fill that data
11455 # in to the rest of the range.
11456 # All indexes are zero-based.
11457 # Indexes are half open, e.g the start index is inclusive
11458 # and the end index is exclusive -- [start_index, end_index).
11459 # Missing indexes indicate the range is unbounded on that side.
11460 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011461 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011462 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011463 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011464 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011465 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011466 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011467 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011468 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011469 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011471 # `Sheet1!A:B == sheet_id: 0,
11472 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011473 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011474 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011475 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011476 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011477 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011478 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011479 #
11480 # The start index must always be less than or equal to the end index.
11481 # If the start index equals the end index, then the range is empty.
11482 # Empty ranges are typically not meaningful and are usually rendered in the
11483 # UI as `#REF!`.
11484 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011485 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011486 "sheetId": 42, # The sheet this range is on.
11487 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011488 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011489 },
11490 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11491 # This explicitly lists the source of the autofill and where to
11492 # extend that data.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011493 "fillLength": 42, # The number of rows or columns that data should be filled into.
11494 # Positive numbers expand beyond the last row or last column
11495 # of the source. Negative numbers expand before the first row
11496 # or first column of the source.
11497 "dimension": "A String", # The dimension that data should be filled into.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011498 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11499 # All indexes are zero-based.
11500 # Indexes are half open, e.g the start index is inclusive
11501 # and the end index is exclusive -- [start_index, end_index).
11502 # Missing indexes indicate the range is unbounded on that side.
11503 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011504 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011505 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011506 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011507 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011508 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011509 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011510 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011511 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011512 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011513 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011514 # `Sheet1!A:B == sheet_id: 0,
11515 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011516 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011517 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011518 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011519 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011520 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011521 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011522 #
11523 # The start index must always be less than or equal to the end index.
11524 # If the start index equals the end index, then the range is empty.
11525 # Empty ranges are typically not meaningful and are usually rendered in the
11526 # UI as `#REF!`.
11527 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011528 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011529 "sheetId": 42, # The sheet this range is on.
11530 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011531 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011532 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011533 },
11534 },
11535 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11536 "length": 42, # The number of rows or columns to append.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011537 "sheetId": 42, # The sheet to append rows or columns to.
Thomas Coffee2f245372017-03-27 10:39:26 -070011538 "dimension": "A String", # Whether rows or columns should be appended.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011539 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011540 "updateBanding": { # Updates properties of the supplied banded range. # Updates a banded range
11541 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11542 # The root `bandedRange` is implied and should not be specified.
11543 # A single `"*"` can be used as short-hand for listing every field.
11544 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to update with the new properties.
11545 "range": { # A range on a sheet. # The range over which these properties are applied.
11546 # All indexes are zero-based.
11547 # Indexes are half open, e.g the start index is inclusive
11548 # and the end index is exclusive -- [start_index, end_index).
11549 # Missing indexes indicate the range is unbounded on that side.
11550 #
11551 # For example, if `"Sheet1"` is sheet ID 0, then:
11552 #
11553 # `Sheet1!A1:A1 == sheet_id: 0,
11554 # start_row_index: 0, end_row_index: 1,
11555 # start_column_index: 0, end_column_index: 1`
11556 #
11557 # `Sheet1!A3:B4 == sheet_id: 0,
11558 # start_row_index: 2, end_row_index: 4,
11559 # start_column_index: 0, end_column_index: 2`
11560 #
11561 # `Sheet1!A:B == sheet_id: 0,
11562 # start_column_index: 0, end_column_index: 2`
11563 #
11564 # `Sheet1!A5:B == sheet_id: 0,
11565 # start_row_index: 4,
11566 # start_column_index: 0, end_column_index: 2`
11567 #
11568 # `Sheet1 == sheet_id:0`
11569 #
11570 # The start index must always be less than or equal to the end index.
11571 # If the start index equals the end index, then the range is empty.
11572 # Empty ranges are typically not meaningful and are usually rendered in the
11573 # UI as `#REF!`.
11574 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011575 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011576 "sheetId": 42, # The sheet this range is on.
11577 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070011578 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011579 },
11580 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
11581 # by-column basis throughout all the columns in the range. At least one of
11582 # row_properties or column_properties must be specified.
11583 # BandedRange.row_properties and BandedRange.column_properties are
11584 # set, the fill colors are applied to cells according to the following rules:
11585 #
11586 # * header_color and footer_color take priority over band colors.
11587 # * first_band_color takes priority over second_band_color.
11588 # * row_properties takes priority over column_properties.
11589 #
11590 # For example, the first row color takes priority over the first column
11591 # color, but the first column color takes priority over the second row color.
11592 # Similarly, the row header takes priority over the column header in the
11593 # top left cell, but the column header takes priority over the first row
11594 # color if the row header is not set.
11595 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
11596 # for simplicity of conversion to/from color representations in various
11597 # languages over compactness; for example, the fields of this representation
11598 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11599 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11600 # method in iOS; and, with just a little work, it can be easily formatted into
11601 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11602 #
11603 # Example (Java):
11604 #
11605 # import com.google.type.Color;
11606 #
11607 # // ...
11608 # public static java.awt.Color fromProto(Color protocolor) {
11609 # float alpha = protocolor.hasAlpha()
11610 # ? protocolor.getAlpha().getValue()
11611 # : 1.0;
11612 #
11613 # return new java.awt.Color(
11614 # protocolor.getRed(),
11615 # protocolor.getGreen(),
11616 # protocolor.getBlue(),
11617 # alpha);
11618 # }
11619 #
11620 # public static Color toProto(java.awt.Color color) {
11621 # float red = (float) color.getRed();
11622 # float green = (float) color.getGreen();
11623 # float blue = (float) color.getBlue();
11624 # float denominator = 255.0;
11625 # Color.Builder resultBuilder =
11626 # Color
11627 # .newBuilder()
11628 # .setRed(red / denominator)
11629 # .setGreen(green / denominator)
11630 # .setBlue(blue / denominator);
11631 # int alpha = color.getAlpha();
11632 # if (alpha != 255) {
11633 # result.setAlpha(
11634 # FloatValue
11635 # .newBuilder()
11636 # .setValue(((float) alpha) / denominator)
11637 # .build());
11638 # }
11639 # return resultBuilder.build();
11640 # }
11641 # // ...
11642 #
11643 # Example (iOS / Obj-C):
11644 #
11645 # // ...
11646 # static UIColor* fromProto(Color* protocolor) {
11647 # float red = [protocolor red];
11648 # float green = [protocolor green];
11649 # float blue = [protocolor blue];
11650 # FloatValue* alpha_wrapper = [protocolor alpha];
11651 # float alpha = 1.0;
11652 # if (alpha_wrapper != nil) {
11653 # alpha = [alpha_wrapper value];
11654 # }
11655 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11656 # }
11657 #
11658 # static Color* toProto(UIColor* color) {
11659 # CGFloat red, green, blue, alpha;
11660 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11661 # return nil;
11662 # }
11663 # Color* result = [Color alloc] init];
11664 # [result setRed:red];
11665 # [result setGreen:green];
11666 # [result setBlue:blue];
11667 # if (alpha <= 0.9999) {
11668 # [result setAlpha:floatWrapperWithValue(alpha)];
11669 # }
11670 # [result autorelease];
11671 # return result;
11672 # }
11673 # // ...
11674 #
11675 # Example (JavaScript):
11676 #
11677 # // ...
11678 #
11679 # var protoToCssColor = function(rgb_color) {
11680 # var redFrac = rgb_color.red || 0.0;
11681 # var greenFrac = rgb_color.green || 0.0;
11682 # var blueFrac = rgb_color.blue || 0.0;
11683 # var red = Math.floor(redFrac * 255);
11684 # var green = Math.floor(greenFrac * 255);
11685 # var blue = Math.floor(blueFrac * 255);
11686 #
11687 # if (!('alpha' in rgb_color)) {
11688 # return rgbToCssColor_(red, green, blue);
11689 # }
11690 #
11691 # var alphaFrac = rgb_color.alpha.value || 0.0;
11692 # var rgbParams = [red, green, blue].join(',');
11693 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11694 # };
11695 #
11696 # var rgbToCssColor_ = function(red, green, blue) {
11697 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11698 # var hexString = rgbNumber.toString(16);
11699 # var missingZeros = 6 - hexString.length;
11700 # var resultBuilder = ['#'];
11701 # for (var i = 0; i < missingZeros; i++) {
11702 # resultBuilder.push('0');
11703 # }
11704 # resultBuilder.push(hexString);
11705 # return resultBuilder.join('');
11706 # };
11707 #
11708 # // ...
11709 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11710 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11711 # the final pixel color is defined by the equation:
11712 #
11713 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11714 #
11715 # This means that a value of 1.0 corresponds to a solid color, whereas
11716 # a value of 0.0 corresponds to a completely transparent color. This
11717 # uses a wrapper message rather than a simple float scalar so that it is
11718 # possible to distinguish between a default value and the value being unset.
11719 # If omitted, this color object is to be rendered as a solid color
11720 # (as if the alpha value had been explicitly given with a value of 1.0).
11721 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11722 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11723 },
11724 "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
11725 # row or column will be filled with this color and the colors will
11726 # alternate between first_band_color and second_band_color starting
11727 # from the second row or column. Otherwise, the first row or column will be
11728 # filled with first_band_color and the colors will proceed to alternate
11729 # as they normally would.
11730 # for simplicity of conversion to/from color representations in various
11731 # languages over compactness; for example, the fields of this representation
11732 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11733 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11734 # method in iOS; and, with just a little work, it can be easily formatted into
11735 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11736 #
11737 # Example (Java):
11738 #
11739 # import com.google.type.Color;
11740 #
11741 # // ...
11742 # public static java.awt.Color fromProto(Color protocolor) {
11743 # float alpha = protocolor.hasAlpha()
11744 # ? protocolor.getAlpha().getValue()
11745 # : 1.0;
11746 #
11747 # return new java.awt.Color(
11748 # protocolor.getRed(),
11749 # protocolor.getGreen(),
11750 # protocolor.getBlue(),
11751 # alpha);
11752 # }
11753 #
11754 # public static Color toProto(java.awt.Color color) {
11755 # float red = (float) color.getRed();
11756 # float green = (float) color.getGreen();
11757 # float blue = (float) color.getBlue();
11758 # float denominator = 255.0;
11759 # Color.Builder resultBuilder =
11760 # Color
11761 # .newBuilder()
11762 # .setRed(red / denominator)
11763 # .setGreen(green / denominator)
11764 # .setBlue(blue / denominator);
11765 # int alpha = color.getAlpha();
11766 # if (alpha != 255) {
11767 # result.setAlpha(
11768 # FloatValue
11769 # .newBuilder()
11770 # .setValue(((float) alpha) / denominator)
11771 # .build());
11772 # }
11773 # return resultBuilder.build();
11774 # }
11775 # // ...
11776 #
11777 # Example (iOS / Obj-C):
11778 #
11779 # // ...
11780 # static UIColor* fromProto(Color* protocolor) {
11781 # float red = [protocolor red];
11782 # float green = [protocolor green];
11783 # float blue = [protocolor blue];
11784 # FloatValue* alpha_wrapper = [protocolor alpha];
11785 # float alpha = 1.0;
11786 # if (alpha_wrapper != nil) {
11787 # alpha = [alpha_wrapper value];
11788 # }
11789 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11790 # }
11791 #
11792 # static Color* toProto(UIColor* color) {
11793 # CGFloat red, green, blue, alpha;
11794 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11795 # return nil;
11796 # }
11797 # Color* result = [Color alloc] init];
11798 # [result setRed:red];
11799 # [result setGreen:green];
11800 # [result setBlue:blue];
11801 # if (alpha <= 0.9999) {
11802 # [result setAlpha:floatWrapperWithValue(alpha)];
11803 # }
11804 # [result autorelease];
11805 # return result;
11806 # }
11807 # // ...
11808 #
11809 # Example (JavaScript):
11810 #
11811 # // ...
11812 #
11813 # var protoToCssColor = function(rgb_color) {
11814 # var redFrac = rgb_color.red || 0.0;
11815 # var greenFrac = rgb_color.green || 0.0;
11816 # var blueFrac = rgb_color.blue || 0.0;
11817 # var red = Math.floor(redFrac * 255);
11818 # var green = Math.floor(greenFrac * 255);
11819 # var blue = Math.floor(blueFrac * 255);
11820 #
11821 # if (!('alpha' in rgb_color)) {
11822 # return rgbToCssColor_(red, green, blue);
11823 # }
11824 #
11825 # var alphaFrac = rgb_color.alpha.value || 0.0;
11826 # var rgbParams = [red, green, blue].join(',');
11827 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11828 # };
11829 #
11830 # var rgbToCssColor_ = function(red, green, blue) {
11831 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11832 # var hexString = rgbNumber.toString(16);
11833 # var missingZeros = 6 - hexString.length;
11834 # var resultBuilder = ['#'];
11835 # for (var i = 0; i < missingZeros; i++) {
11836 # resultBuilder.push('0');
11837 # }
11838 # resultBuilder.push(hexString);
11839 # return resultBuilder.join('');
11840 # };
11841 #
11842 # // ...
11843 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11844 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11845 # the final pixel color is defined by the equation:
11846 #
11847 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11848 #
11849 # This means that a value of 1.0 corresponds to a solid color, whereas
11850 # a value of 0.0 corresponds to a completely transparent color. This
11851 # uses a wrapper message rather than a simple float scalar so that it is
11852 # possible to distinguish between a default value and the value being unset.
11853 # If omitted, this color object is to be rendered as a solid color
11854 # (as if the alpha value had been explicitly given with a value of 1.0).
11855 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11856 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11857 },
11858 "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
11859 # row or column will be filled with either first_band_color or
11860 # second_band_color, depending on the color of the previous row or
11861 # column.
11862 # for simplicity of conversion to/from color representations in various
11863 # languages over compactness; for example, the fields of this representation
11864 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11865 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11866 # method in iOS; and, with just a little work, it can be easily formatted into
11867 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11868 #
11869 # Example (Java):
11870 #
11871 # import com.google.type.Color;
11872 #
11873 # // ...
11874 # public static java.awt.Color fromProto(Color protocolor) {
11875 # float alpha = protocolor.hasAlpha()
11876 # ? protocolor.getAlpha().getValue()
11877 # : 1.0;
11878 #
11879 # return new java.awt.Color(
11880 # protocolor.getRed(),
11881 # protocolor.getGreen(),
11882 # protocolor.getBlue(),
11883 # alpha);
11884 # }
11885 #
11886 # public static Color toProto(java.awt.Color color) {
11887 # float red = (float) color.getRed();
11888 # float green = (float) color.getGreen();
11889 # float blue = (float) color.getBlue();
11890 # float denominator = 255.0;
11891 # Color.Builder resultBuilder =
11892 # Color
11893 # .newBuilder()
11894 # .setRed(red / denominator)
11895 # .setGreen(green / denominator)
11896 # .setBlue(blue / denominator);
11897 # int alpha = color.getAlpha();
11898 # if (alpha != 255) {
11899 # result.setAlpha(
11900 # FloatValue
11901 # .newBuilder()
11902 # .setValue(((float) alpha) / denominator)
11903 # .build());
11904 # }
11905 # return resultBuilder.build();
11906 # }
11907 # // ...
11908 #
11909 # Example (iOS / Obj-C):
11910 #
11911 # // ...
11912 # static UIColor* fromProto(Color* protocolor) {
11913 # float red = [protocolor red];
11914 # float green = [protocolor green];
11915 # float blue = [protocolor blue];
11916 # FloatValue* alpha_wrapper = [protocolor alpha];
11917 # float alpha = 1.0;
11918 # if (alpha_wrapper != nil) {
11919 # alpha = [alpha_wrapper value];
11920 # }
11921 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11922 # }
11923 #
11924 # static Color* toProto(UIColor* color) {
11925 # CGFloat red, green, blue, alpha;
11926 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11927 # return nil;
11928 # }
11929 # Color* result = [Color alloc] init];
11930 # [result setRed:red];
11931 # [result setGreen:green];
11932 # [result setBlue:blue];
11933 # if (alpha <= 0.9999) {
11934 # [result setAlpha:floatWrapperWithValue(alpha)];
11935 # }
11936 # [result autorelease];
11937 # return result;
11938 # }
11939 # // ...
11940 #
11941 # Example (JavaScript):
11942 #
11943 # // ...
11944 #
11945 # var protoToCssColor = function(rgb_color) {
11946 # var redFrac = rgb_color.red || 0.0;
11947 # var greenFrac = rgb_color.green || 0.0;
11948 # var blueFrac = rgb_color.blue || 0.0;
11949 # var red = Math.floor(redFrac * 255);
11950 # var green = Math.floor(greenFrac * 255);
11951 # var blue = Math.floor(blueFrac * 255);
11952 #
11953 # if (!('alpha' in rgb_color)) {
11954 # return rgbToCssColor_(red, green, blue);
11955 # }
11956 #
11957 # var alphaFrac = rgb_color.alpha.value || 0.0;
11958 # var rgbParams = [red, green, blue].join(',');
11959 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11960 # };
11961 #
11962 # var rgbToCssColor_ = function(red, green, blue) {
11963 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11964 # var hexString = rgbNumber.toString(16);
11965 # var missingZeros = 6 - hexString.length;
11966 # var resultBuilder = ['#'];
11967 # for (var i = 0; i < missingZeros; i++) {
11968 # resultBuilder.push('0');
11969 # }
11970 # resultBuilder.push(hexString);
11971 # return resultBuilder.join('');
11972 # };
11973 #
11974 # // ...
11975 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11976 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11977 # the final pixel color is defined by the equation:
11978 #
11979 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11980 #
11981 # This means that a value of 1.0 corresponds to a solid color, whereas
11982 # a value of 0.0 corresponds to a completely transparent color. This
11983 # uses a wrapper message rather than a simple float scalar so that it is
11984 # possible to distinguish between a default value and the value being unset.
11985 # If omitted, this color object is to be rendered as a solid color
11986 # (as if the alpha value had been explicitly given with a value of 1.0).
11987 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11988 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11989 },
11990 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
11991 # for simplicity of conversion to/from color representations in various
11992 # languages over compactness; for example, the fields of this representation
11993 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11994 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11995 # method in iOS; and, with just a little work, it can be easily formatted into
11996 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11997 #
11998 # Example (Java):
11999 #
12000 # import com.google.type.Color;
12001 #
12002 # // ...
12003 # public static java.awt.Color fromProto(Color protocolor) {
12004 # float alpha = protocolor.hasAlpha()
12005 # ? protocolor.getAlpha().getValue()
12006 # : 1.0;
12007 #
12008 # return new java.awt.Color(
12009 # protocolor.getRed(),
12010 # protocolor.getGreen(),
12011 # protocolor.getBlue(),
12012 # alpha);
12013 # }
12014 #
12015 # public static Color toProto(java.awt.Color color) {
12016 # float red = (float) color.getRed();
12017 # float green = (float) color.getGreen();
12018 # float blue = (float) color.getBlue();
12019 # float denominator = 255.0;
12020 # Color.Builder resultBuilder =
12021 # Color
12022 # .newBuilder()
12023 # .setRed(red / denominator)
12024 # .setGreen(green / denominator)
12025 # .setBlue(blue / denominator);
12026 # int alpha = color.getAlpha();
12027 # if (alpha != 255) {
12028 # result.setAlpha(
12029 # FloatValue
12030 # .newBuilder()
12031 # .setValue(((float) alpha) / denominator)
12032 # .build());
12033 # }
12034 # return resultBuilder.build();
12035 # }
12036 # // ...
12037 #
12038 # Example (iOS / Obj-C):
12039 #
12040 # // ...
12041 # static UIColor* fromProto(Color* protocolor) {
12042 # float red = [protocolor red];
12043 # float green = [protocolor green];
12044 # float blue = [protocolor blue];
12045 # FloatValue* alpha_wrapper = [protocolor alpha];
12046 # float alpha = 1.0;
12047 # if (alpha_wrapper != nil) {
12048 # alpha = [alpha_wrapper value];
12049 # }
12050 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12051 # }
12052 #
12053 # static Color* toProto(UIColor* color) {
12054 # CGFloat red, green, blue, alpha;
12055 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12056 # return nil;
12057 # }
12058 # Color* result = [Color alloc] init];
12059 # [result setRed:red];
12060 # [result setGreen:green];
12061 # [result setBlue:blue];
12062 # if (alpha <= 0.9999) {
12063 # [result setAlpha:floatWrapperWithValue(alpha)];
12064 # }
12065 # [result autorelease];
12066 # return result;
12067 # }
12068 # // ...
12069 #
12070 # Example (JavaScript):
12071 #
12072 # // ...
12073 #
12074 # var protoToCssColor = function(rgb_color) {
12075 # var redFrac = rgb_color.red || 0.0;
12076 # var greenFrac = rgb_color.green || 0.0;
12077 # var blueFrac = rgb_color.blue || 0.0;
12078 # var red = Math.floor(redFrac * 255);
12079 # var green = Math.floor(greenFrac * 255);
12080 # var blue = Math.floor(blueFrac * 255);
12081 #
12082 # if (!('alpha' in rgb_color)) {
12083 # return rgbToCssColor_(red, green, blue);
12084 # }
12085 #
12086 # var alphaFrac = rgb_color.alpha.value || 0.0;
12087 # var rgbParams = [red, green, blue].join(',');
12088 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12089 # };
12090 #
12091 # var rgbToCssColor_ = function(red, green, blue) {
12092 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12093 # var hexString = rgbNumber.toString(16);
12094 # var missingZeros = 6 - hexString.length;
12095 # var resultBuilder = ['#'];
12096 # for (var i = 0; i < missingZeros; i++) {
12097 # resultBuilder.push('0');
12098 # }
12099 # resultBuilder.push(hexString);
12100 # return resultBuilder.join('');
12101 # };
12102 #
12103 # // ...
12104 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12105 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12106 # the final pixel color is defined by the equation:
12107 #
12108 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12109 #
12110 # This means that a value of 1.0 corresponds to a solid color, whereas
12111 # a value of 0.0 corresponds to a completely transparent color. This
12112 # uses a wrapper message rather than a simple float scalar so that it is
12113 # possible to distinguish between a default value and the value being unset.
12114 # If omitted, this color object is to be rendered as a solid color
12115 # (as if the alpha value had been explicitly given with a value of 1.0).
12116 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12117 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12118 },
12119 },
12120 "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
12121 # basis throughout all the rows in the range. At least one of
12122 # row_properties or column_properties must be specified.
12123 # BandedRange.row_properties and BandedRange.column_properties are
12124 # set, the fill colors are applied to cells according to the following rules:
12125 #
12126 # * header_color and footer_color take priority over band colors.
12127 # * first_band_color takes priority over second_band_color.
12128 # * row_properties takes priority over column_properties.
12129 #
12130 # For example, the first row color takes priority over the first column
12131 # color, but the first column color takes priority over the second row color.
12132 # Similarly, the row header takes priority over the column header in the
12133 # top left cell, but the column header takes priority over the first row
12134 # color if the row header is not set.
12135 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
12136 # for simplicity of conversion to/from color representations in various
12137 # languages over compactness; for example, the fields of this representation
12138 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12139 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12140 # method in iOS; and, with just a little work, it can be easily formatted into
12141 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12142 #
12143 # Example (Java):
12144 #
12145 # import com.google.type.Color;
12146 #
12147 # // ...
12148 # public static java.awt.Color fromProto(Color protocolor) {
12149 # float alpha = protocolor.hasAlpha()
12150 # ? protocolor.getAlpha().getValue()
12151 # : 1.0;
12152 #
12153 # return new java.awt.Color(
12154 # protocolor.getRed(),
12155 # protocolor.getGreen(),
12156 # protocolor.getBlue(),
12157 # alpha);
12158 # }
12159 #
12160 # public static Color toProto(java.awt.Color color) {
12161 # float red = (float) color.getRed();
12162 # float green = (float) color.getGreen();
12163 # float blue = (float) color.getBlue();
12164 # float denominator = 255.0;
12165 # Color.Builder resultBuilder =
12166 # Color
12167 # .newBuilder()
12168 # .setRed(red / denominator)
12169 # .setGreen(green / denominator)
12170 # .setBlue(blue / denominator);
12171 # int alpha = color.getAlpha();
12172 # if (alpha != 255) {
12173 # result.setAlpha(
12174 # FloatValue
12175 # .newBuilder()
12176 # .setValue(((float) alpha) / denominator)
12177 # .build());
12178 # }
12179 # return resultBuilder.build();
12180 # }
12181 # // ...
12182 #
12183 # Example (iOS / Obj-C):
12184 #
12185 # // ...
12186 # static UIColor* fromProto(Color* protocolor) {
12187 # float red = [protocolor red];
12188 # float green = [protocolor green];
12189 # float blue = [protocolor blue];
12190 # FloatValue* alpha_wrapper = [protocolor alpha];
12191 # float alpha = 1.0;
12192 # if (alpha_wrapper != nil) {
12193 # alpha = [alpha_wrapper value];
12194 # }
12195 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12196 # }
12197 #
12198 # static Color* toProto(UIColor* color) {
12199 # CGFloat red, green, blue, alpha;
12200 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12201 # return nil;
12202 # }
12203 # Color* result = [Color alloc] init];
12204 # [result setRed:red];
12205 # [result setGreen:green];
12206 # [result setBlue:blue];
12207 # if (alpha <= 0.9999) {
12208 # [result setAlpha:floatWrapperWithValue(alpha)];
12209 # }
12210 # [result autorelease];
12211 # return result;
12212 # }
12213 # // ...
12214 #
12215 # Example (JavaScript):
12216 #
12217 # // ...
12218 #
12219 # var protoToCssColor = function(rgb_color) {
12220 # var redFrac = rgb_color.red || 0.0;
12221 # var greenFrac = rgb_color.green || 0.0;
12222 # var blueFrac = rgb_color.blue || 0.0;
12223 # var red = Math.floor(redFrac * 255);
12224 # var green = Math.floor(greenFrac * 255);
12225 # var blue = Math.floor(blueFrac * 255);
12226 #
12227 # if (!('alpha' in rgb_color)) {
12228 # return rgbToCssColor_(red, green, blue);
12229 # }
12230 #
12231 # var alphaFrac = rgb_color.alpha.value || 0.0;
12232 # var rgbParams = [red, green, blue].join(',');
12233 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12234 # };
12235 #
12236 # var rgbToCssColor_ = function(red, green, blue) {
12237 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12238 # var hexString = rgbNumber.toString(16);
12239 # var missingZeros = 6 - hexString.length;
12240 # var resultBuilder = ['#'];
12241 # for (var i = 0; i < missingZeros; i++) {
12242 # resultBuilder.push('0');
12243 # }
12244 # resultBuilder.push(hexString);
12245 # return resultBuilder.join('');
12246 # };
12247 #
12248 # // ...
12249 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12250 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12251 # the final pixel color is defined by the equation:
12252 #
12253 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12254 #
12255 # This means that a value of 1.0 corresponds to a solid color, whereas
12256 # a value of 0.0 corresponds to a completely transparent color. This
12257 # uses a wrapper message rather than a simple float scalar so that it is
12258 # possible to distinguish between a default value and the value being unset.
12259 # If omitted, this color object is to be rendered as a solid color
12260 # (as if the alpha value had been explicitly given with a value of 1.0).
12261 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12262 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12263 },
12264 "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
12265 # row or column will be filled with this color and the colors will
12266 # alternate between first_band_color and second_band_color starting
12267 # from the second row or column. Otherwise, the first row or column will be
12268 # filled with first_band_color and the colors will proceed to alternate
12269 # as they normally would.
12270 # for simplicity of conversion to/from color representations in various
12271 # languages over compactness; for example, the fields of this representation
12272 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12273 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12274 # method in iOS; and, with just a little work, it can be easily formatted into
12275 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12276 #
12277 # Example (Java):
12278 #
12279 # import com.google.type.Color;
12280 #
12281 # // ...
12282 # public static java.awt.Color fromProto(Color protocolor) {
12283 # float alpha = protocolor.hasAlpha()
12284 # ? protocolor.getAlpha().getValue()
12285 # : 1.0;
12286 #
12287 # return new java.awt.Color(
12288 # protocolor.getRed(),
12289 # protocolor.getGreen(),
12290 # protocolor.getBlue(),
12291 # alpha);
12292 # }
12293 #
12294 # public static Color toProto(java.awt.Color color) {
12295 # float red = (float) color.getRed();
12296 # float green = (float) color.getGreen();
12297 # float blue = (float) color.getBlue();
12298 # float denominator = 255.0;
12299 # Color.Builder resultBuilder =
12300 # Color
12301 # .newBuilder()
12302 # .setRed(red / denominator)
12303 # .setGreen(green / denominator)
12304 # .setBlue(blue / denominator);
12305 # int alpha = color.getAlpha();
12306 # if (alpha != 255) {
12307 # result.setAlpha(
12308 # FloatValue
12309 # .newBuilder()
12310 # .setValue(((float) alpha) / denominator)
12311 # .build());
12312 # }
12313 # return resultBuilder.build();
12314 # }
12315 # // ...
12316 #
12317 # Example (iOS / Obj-C):
12318 #
12319 # // ...
12320 # static UIColor* fromProto(Color* protocolor) {
12321 # float red = [protocolor red];
12322 # float green = [protocolor green];
12323 # float blue = [protocolor blue];
12324 # FloatValue* alpha_wrapper = [protocolor alpha];
12325 # float alpha = 1.0;
12326 # if (alpha_wrapper != nil) {
12327 # alpha = [alpha_wrapper value];
12328 # }
12329 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12330 # }
12331 #
12332 # static Color* toProto(UIColor* color) {
12333 # CGFloat red, green, blue, alpha;
12334 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12335 # return nil;
12336 # }
12337 # Color* result = [Color alloc] init];
12338 # [result setRed:red];
12339 # [result setGreen:green];
12340 # [result setBlue:blue];
12341 # if (alpha <= 0.9999) {
12342 # [result setAlpha:floatWrapperWithValue(alpha)];
12343 # }
12344 # [result autorelease];
12345 # return result;
12346 # }
12347 # // ...
12348 #
12349 # Example (JavaScript):
12350 #
12351 # // ...
12352 #
12353 # var protoToCssColor = function(rgb_color) {
12354 # var redFrac = rgb_color.red || 0.0;
12355 # var greenFrac = rgb_color.green || 0.0;
12356 # var blueFrac = rgb_color.blue || 0.0;
12357 # var red = Math.floor(redFrac * 255);
12358 # var green = Math.floor(greenFrac * 255);
12359 # var blue = Math.floor(blueFrac * 255);
12360 #
12361 # if (!('alpha' in rgb_color)) {
12362 # return rgbToCssColor_(red, green, blue);
12363 # }
12364 #
12365 # var alphaFrac = rgb_color.alpha.value || 0.0;
12366 # var rgbParams = [red, green, blue].join(',');
12367 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12368 # };
12369 #
12370 # var rgbToCssColor_ = function(red, green, blue) {
12371 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12372 # var hexString = rgbNumber.toString(16);
12373 # var missingZeros = 6 - hexString.length;
12374 # var resultBuilder = ['#'];
12375 # for (var i = 0; i < missingZeros; i++) {
12376 # resultBuilder.push('0');
12377 # }
12378 # resultBuilder.push(hexString);
12379 # return resultBuilder.join('');
12380 # };
12381 #
12382 # // ...
12383 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12384 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12385 # the final pixel color is defined by the equation:
12386 #
12387 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12388 #
12389 # This means that a value of 1.0 corresponds to a solid color, whereas
12390 # a value of 0.0 corresponds to a completely transparent color. This
12391 # uses a wrapper message rather than a simple float scalar so that it is
12392 # possible to distinguish between a default value and the value being unset.
12393 # If omitted, this color object is to be rendered as a solid color
12394 # (as if the alpha value had been explicitly given with a value of 1.0).
12395 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12396 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12397 },
12398 "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
12399 # row or column will be filled with either first_band_color or
12400 # second_band_color, depending on the color of the previous row or
12401 # column.
12402 # for simplicity of conversion to/from color representations in various
12403 # languages over compactness; for example, the fields of this representation
12404 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12405 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12406 # method in iOS; and, with just a little work, it can be easily formatted into
12407 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12408 #
12409 # Example (Java):
12410 #
12411 # import com.google.type.Color;
12412 #
12413 # // ...
12414 # public static java.awt.Color fromProto(Color protocolor) {
12415 # float alpha = protocolor.hasAlpha()
12416 # ? protocolor.getAlpha().getValue()
12417 # : 1.0;
12418 #
12419 # return new java.awt.Color(
12420 # protocolor.getRed(),
12421 # protocolor.getGreen(),
12422 # protocolor.getBlue(),
12423 # alpha);
12424 # }
12425 #
12426 # public static Color toProto(java.awt.Color color) {
12427 # float red = (float) color.getRed();
12428 # float green = (float) color.getGreen();
12429 # float blue = (float) color.getBlue();
12430 # float denominator = 255.0;
12431 # Color.Builder resultBuilder =
12432 # Color
12433 # .newBuilder()
12434 # .setRed(red / denominator)
12435 # .setGreen(green / denominator)
12436 # .setBlue(blue / denominator);
12437 # int alpha = color.getAlpha();
12438 # if (alpha != 255) {
12439 # result.setAlpha(
12440 # FloatValue
12441 # .newBuilder()
12442 # .setValue(((float) alpha) / denominator)
12443 # .build());
12444 # }
12445 # return resultBuilder.build();
12446 # }
12447 # // ...
12448 #
12449 # Example (iOS / Obj-C):
12450 #
12451 # // ...
12452 # static UIColor* fromProto(Color* protocolor) {
12453 # float red = [protocolor red];
12454 # float green = [protocolor green];
12455 # float blue = [protocolor blue];
12456 # FloatValue* alpha_wrapper = [protocolor alpha];
12457 # float alpha = 1.0;
12458 # if (alpha_wrapper != nil) {
12459 # alpha = [alpha_wrapper value];
12460 # }
12461 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12462 # }
12463 #
12464 # static Color* toProto(UIColor* color) {
12465 # CGFloat red, green, blue, alpha;
12466 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12467 # return nil;
12468 # }
12469 # Color* result = [Color alloc] init];
12470 # [result setRed:red];
12471 # [result setGreen:green];
12472 # [result setBlue:blue];
12473 # if (alpha <= 0.9999) {
12474 # [result setAlpha:floatWrapperWithValue(alpha)];
12475 # }
12476 # [result autorelease];
12477 # return result;
12478 # }
12479 # // ...
12480 #
12481 # Example (JavaScript):
12482 #
12483 # // ...
12484 #
12485 # var protoToCssColor = function(rgb_color) {
12486 # var redFrac = rgb_color.red || 0.0;
12487 # var greenFrac = rgb_color.green || 0.0;
12488 # var blueFrac = rgb_color.blue || 0.0;
12489 # var red = Math.floor(redFrac * 255);
12490 # var green = Math.floor(greenFrac * 255);
12491 # var blue = Math.floor(blueFrac * 255);
12492 #
12493 # if (!('alpha' in rgb_color)) {
12494 # return rgbToCssColor_(red, green, blue);
12495 # }
12496 #
12497 # var alphaFrac = rgb_color.alpha.value || 0.0;
12498 # var rgbParams = [red, green, blue].join(',');
12499 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12500 # };
12501 #
12502 # var rgbToCssColor_ = function(red, green, blue) {
12503 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12504 # var hexString = rgbNumber.toString(16);
12505 # var missingZeros = 6 - hexString.length;
12506 # var resultBuilder = ['#'];
12507 # for (var i = 0; i < missingZeros; i++) {
12508 # resultBuilder.push('0');
12509 # }
12510 # resultBuilder.push(hexString);
12511 # return resultBuilder.join('');
12512 # };
12513 #
12514 # // ...
12515 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12516 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12517 # the final pixel color is defined by the equation:
12518 #
12519 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12520 #
12521 # This means that a value of 1.0 corresponds to a solid color, whereas
12522 # a value of 0.0 corresponds to a completely transparent color. This
12523 # uses a wrapper message rather than a simple float scalar so that it is
12524 # possible to distinguish between a default value and the value being unset.
12525 # If omitted, this color object is to be rendered as a solid color
12526 # (as if the alpha value had been explicitly given with a value of 1.0).
12527 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12528 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12529 },
12530 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
12531 # for simplicity of conversion to/from color representations in various
12532 # languages over compactness; for example, the fields of this representation
12533 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12534 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12535 # method in iOS; and, with just a little work, it can be easily formatted into
12536 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12537 #
12538 # Example (Java):
12539 #
12540 # import com.google.type.Color;
12541 #
12542 # // ...
12543 # public static java.awt.Color fromProto(Color protocolor) {
12544 # float alpha = protocolor.hasAlpha()
12545 # ? protocolor.getAlpha().getValue()
12546 # : 1.0;
12547 #
12548 # return new java.awt.Color(
12549 # protocolor.getRed(),
12550 # protocolor.getGreen(),
12551 # protocolor.getBlue(),
12552 # alpha);
12553 # }
12554 #
12555 # public static Color toProto(java.awt.Color color) {
12556 # float red = (float) color.getRed();
12557 # float green = (float) color.getGreen();
12558 # float blue = (float) color.getBlue();
12559 # float denominator = 255.0;
12560 # Color.Builder resultBuilder =
12561 # Color
12562 # .newBuilder()
12563 # .setRed(red / denominator)
12564 # .setGreen(green / denominator)
12565 # .setBlue(blue / denominator);
12566 # int alpha = color.getAlpha();
12567 # if (alpha != 255) {
12568 # result.setAlpha(
12569 # FloatValue
12570 # .newBuilder()
12571 # .setValue(((float) alpha) / denominator)
12572 # .build());
12573 # }
12574 # return resultBuilder.build();
12575 # }
12576 # // ...
12577 #
12578 # Example (iOS / Obj-C):
12579 #
12580 # // ...
12581 # static UIColor* fromProto(Color* protocolor) {
12582 # float red = [protocolor red];
12583 # float green = [protocolor green];
12584 # float blue = [protocolor blue];
12585 # FloatValue* alpha_wrapper = [protocolor alpha];
12586 # float alpha = 1.0;
12587 # if (alpha_wrapper != nil) {
12588 # alpha = [alpha_wrapper value];
12589 # }
12590 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12591 # }
12592 #
12593 # static Color* toProto(UIColor* color) {
12594 # CGFloat red, green, blue, alpha;
12595 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12596 # return nil;
12597 # }
12598 # Color* result = [Color alloc] init];
12599 # [result setRed:red];
12600 # [result setGreen:green];
12601 # [result setBlue:blue];
12602 # if (alpha <= 0.9999) {
12603 # [result setAlpha:floatWrapperWithValue(alpha)];
12604 # }
12605 # [result autorelease];
12606 # return result;
12607 # }
12608 # // ...
12609 #
12610 # Example (JavaScript):
12611 #
12612 # // ...
12613 #
12614 # var protoToCssColor = function(rgb_color) {
12615 # var redFrac = rgb_color.red || 0.0;
12616 # var greenFrac = rgb_color.green || 0.0;
12617 # var blueFrac = rgb_color.blue || 0.0;
12618 # var red = Math.floor(redFrac * 255);
12619 # var green = Math.floor(greenFrac * 255);
12620 # var blue = Math.floor(blueFrac * 255);
12621 #
12622 # if (!('alpha' in rgb_color)) {
12623 # return rgbToCssColor_(red, green, blue);
12624 # }
12625 #
12626 # var alphaFrac = rgb_color.alpha.value || 0.0;
12627 # var rgbParams = [red, green, blue].join(',');
12628 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12629 # };
12630 #
12631 # var rgbToCssColor_ = function(red, green, blue) {
12632 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12633 # var hexString = rgbNumber.toString(16);
12634 # var missingZeros = 6 - hexString.length;
12635 # var resultBuilder = ['#'];
12636 # for (var i = 0; i < missingZeros; i++) {
12637 # resultBuilder.push('0');
12638 # }
12639 # resultBuilder.push(hexString);
12640 # return resultBuilder.join('');
12641 # };
12642 #
12643 # // ...
12644 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12645 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12646 # the final pixel color is defined by the equation:
12647 #
12648 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12649 #
12650 # This means that a value of 1.0 corresponds to a solid color, whereas
12651 # a value of 0.0 corresponds to a completely transparent color. This
12652 # uses a wrapper message rather than a simple float scalar so that it is
12653 # possible to distinguish between a default value and the value being unset.
12654 # If omitted, this color object is to be rendered as a solid color
12655 # (as if the alpha value had been explicitly given with a value of 1.0).
12656 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12657 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12658 },
12659 },
12660 "bandedRangeId": 42, # The id of the banded range.
12661 },
12662 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012663 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
12664 # of the cells in that dimension.
12665 # of the cells in that dimension.
12666 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
12667 # Only COLUMNS are supported.
12668 # All indexes are zero-based.
12669 # Indexes are half open: the start index is inclusive
12670 # and the end index is exclusive.
12671 # Missing indexes indicate the range is unbounded on that side.
12672 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12673 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12674 "sheetId": 42, # The sheet this span is on.
12675 "dimension": "A String", # The dimension of the span.
12676 },
12677 },
12678 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012679 "fields": "A String", # The fields that should be updated. At least one field must be specified.
12680 # The root `properties` is implied and should not be specified.
12681 # A single `"*"` can be used as short-hand for listing every field.
12682 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
12683 # All indexes are zero-based.
12684 # Indexes are half open: the start index is inclusive
12685 # and the end index is exclusive.
12686 # Missing indexes indicate the range is unbounded on that side.
12687 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12688 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12689 "sheetId": 42, # The sheet this span is on.
12690 "dimension": "A String", # The dimension of the span.
12691 },
12692 "properties": { # Properties about a dimension. # Properties to update.
12693 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
12694 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
12695 "hiddenByFilter": True or False, # True if this dimension is being filtered.
12696 # This field is read-only.
12697 },
12698 },
12699 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
12700 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
12701 # If the range spans multiple merges, all will be unmerged.
12702 # The range must not partially span any merge.
12703 # All indexes are zero-based.
12704 # Indexes are half open, e.g the start index is inclusive
12705 # and the end index is exclusive -- [start_index, end_index).
12706 # Missing indexes indicate the range is unbounded on that side.
12707 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012708 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012709 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012710 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012711 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012712 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012713 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012714 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012715 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012716 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012717 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012718 # `Sheet1!A:B == sheet_id: 0,
12719 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012720 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012721 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012722 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012723 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012724 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012725 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012726 #
12727 # The start index must always be less than or equal to the end index.
12728 # If the start index equals the end index, then the range is empty.
12729 # Empty ranges are typically not meaningful and are usually rendered in the
12730 # UI as `#REF!`.
12731 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012732 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012733 "sheetId": 42, # The sheet this range is on.
12734 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012735 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012736 },
12737 },
12738 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
12739 # To clear validation in a range, call this with no rule specified.
12740 "range": { # A range on a sheet. # The range the data validation rule should apply to.
12741 # All indexes are zero-based.
12742 # Indexes are half open, e.g the start index is inclusive
12743 # and the end index is exclusive -- [start_index, end_index).
12744 # Missing indexes indicate the range is unbounded on that side.
12745 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012746 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012747 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012748 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012749 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012750 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012751 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012752 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012753 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012754 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012755 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012756 # `Sheet1!A:B == sheet_id: 0,
12757 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012758 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012759 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012760 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012761 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012762 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012763 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012764 #
12765 # The start index must always be less than or equal to the end index.
12766 # If the start index equals the end index, then the range is empty.
12767 # Empty ranges are typically not meaningful and are usually rendered in the
12768 # UI as `#REF!`.
12769 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012770 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012771 "sheetId": 42, # The sheet this range is on.
12772 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012773 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012774 },
12775 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
12776 # or empty to clear the data validation in the range.
12777 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
12778 # If true, "List" conditions will show a dropdown.
12779 "strict": True or False, # True if invalid data should be rejected.
12780 "inputMessage": "A String", # A message to show the user when adding data to the cell.
12781 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
12782 # BooleanConditions are used by conditional formatting,
12783 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012784 "values": [ # The values of the condition. The number of supported values depends
12785 # on the condition type. Some support zero values,
12786 # others one or two values,
12787 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12788 { # The value of the condition.
12789 "relativeDate": "A String", # A relative date (based on the current date).
12790 # Valid only if the type is
12791 # DATE_BEFORE,
12792 # DATE_AFTER,
12793 # DATE_ON_OR_BEFORE or
12794 # DATE_ON_OR_AFTER.
12795 #
12796 # Relative dates are not supported in data validation.
12797 # They are supported only in conditional formatting and
12798 # conditional filters.
12799 "userEnteredValue": "A String", # A value the condition is based on.
12800 # The value will be parsed as if the user typed into a cell.
12801 # Formulas are supported (and must begin with an `=`).
12802 },
12803 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012804 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012805 },
12806 },
12807 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012808 "deleteRange": { # Deletes a range of cells, shifting other cells into the deleted area. # Deletes a range of cells from a sheet, shifting the remaining cells.
12809 "range": { # A range on a sheet. # The range of cells to delete.
12810 # All indexes are zero-based.
12811 # Indexes are half open, e.g the start index is inclusive
12812 # and the end index is exclusive -- [start_index, end_index).
12813 # Missing indexes indicate the range is unbounded on that side.
12814 #
12815 # For example, if `"Sheet1"` is sheet ID 0, then:
12816 #
12817 # `Sheet1!A1:A1 == sheet_id: 0,
12818 # start_row_index: 0, end_row_index: 1,
12819 # start_column_index: 0, end_column_index: 1`
12820 #
12821 # `Sheet1!A3:B4 == sheet_id: 0,
12822 # start_row_index: 2, end_row_index: 4,
12823 # start_column_index: 0, end_column_index: 2`
12824 #
12825 # `Sheet1!A:B == sheet_id: 0,
12826 # start_column_index: 0, end_column_index: 2`
12827 #
12828 # `Sheet1!A5:B == sheet_id: 0,
12829 # start_row_index: 4,
12830 # start_column_index: 0, end_column_index: 2`
12831 #
12832 # `Sheet1 == sheet_id:0`
12833 #
12834 # The start index must always be less than or equal to the end index.
12835 # If the start index equals the end index, then the range is empty.
12836 # Empty ranges are typically not meaningful and are usually rendered in the
12837 # UI as `#REF!`.
12838 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012839 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012840 "sheetId": 42, # The sheet this range is on.
12841 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012842 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012843 },
12844 "shiftDimension": "A String", # The dimension from which deleted cells will be replaced with.
12845 # If ROWS, existing cells will be shifted upward to
12846 # replace the deleted cells. If COLUMNS, existing cells
12847 # will be shifted left to replace the deleted cells.
12848 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012849 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
12850 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
12851 },
Thomas Coffee2f245372017-03-27 10:39:26 -070012852 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
12853 "namedRange": { # A named range. # The named range to add. The namedRangeId
12854 # field is optional; if one is not set, an id will be randomly generated. (It
12855 # is an error to specify the ID of a range that already exists.)
12856 "namedRangeId": "A String", # The ID of the named range.
12857 "range": { # A range on a sheet. # The range this represents.
12858 # All indexes are zero-based.
12859 # Indexes are half open, e.g the start index is inclusive
12860 # and the end index is exclusive -- [start_index, end_index).
12861 # Missing indexes indicate the range is unbounded on that side.
12862 #
12863 # For example, if `"Sheet1"` is sheet ID 0, then:
12864 #
12865 # `Sheet1!A1:A1 == sheet_id: 0,
12866 # start_row_index: 0, end_row_index: 1,
12867 # start_column_index: 0, end_column_index: 1`
12868 #
12869 # `Sheet1!A3:B4 == sheet_id: 0,
12870 # start_row_index: 2, end_row_index: 4,
12871 # start_column_index: 0, end_column_index: 2`
12872 #
12873 # `Sheet1!A:B == sheet_id: 0,
12874 # start_column_index: 0, end_column_index: 2`
12875 #
12876 # `Sheet1!A5:B == sheet_id: 0,
12877 # start_row_index: 4,
12878 # start_column_index: 0, end_column_index: 2`
12879 #
12880 # `Sheet1 == sheet_id:0`
12881 #
12882 # The start index must always be less than or equal to the end index.
12883 # If the start index equals the end index, then the range is empty.
12884 # Empty ranges are typically not meaningful and are usually rendered in the
12885 # UI as `#REF!`.
12886 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12887 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12888 "sheetId": 42, # The sheet this range is on.
12889 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12890 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12891 },
12892 "name": "A String", # The name of the named range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012893 },
12894 },
12895 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
12896 # (This does not move or resize a chart. To move or resize a chart, use
12897 # UpdateEmbeddedObjectPositionRequest.)
12898 "chartId": 42, # The ID of the chart to update.
12899 "spec": { # The specifications of a chart. # The specification to apply to the chart.
12900 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012901 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
12902 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
12903 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12904 "sources": [ # The ranges of data for a series or domain.
12905 # Exactly one dimension must have a length of 1,
12906 # and all sources in the list must have the same dimension
12907 # with length 1.
12908 # The domain (if it exists) & all series must have the same number
12909 # of source ranges. If using more than one source range, then the source
12910 # range at a given offset must be contiguous across the domain and series.
12911 #
12912 # For example, these are valid configurations:
12913 #
12914 # domain sources: A1:A5
12915 # series1 sources: B1:B5
12916 # series2 sources: D6:D10
12917 #
12918 # domain sources: A1:A5, C10:C12
12919 # series1 sources: B1:B5, D10:D12
12920 # series2 sources: C1:C5, E10:E12
12921 { # A range on a sheet.
12922 # All indexes are zero-based.
12923 # Indexes are half open, e.g the start index is inclusive
12924 # and the end index is exclusive -- [start_index, end_index).
12925 # Missing indexes indicate the range is unbounded on that side.
12926 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012927 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012928 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012929 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012930 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012931 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012932 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012933 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012934 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012935 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012936 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012937 # `Sheet1!A:B == sheet_id: 0,
12938 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012939 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012940 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012941 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012942 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012943 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012944 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012945 #
12946 # The start index must always be less than or equal to the end index.
12947 # If the start index equals the end index, then the range is empty.
12948 # Empty ranges are typically not meaningful and are usually rendered in the
12949 # UI as `#REF!`.
12950 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012951 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012952 "sheetId": 42, # The sheet this range is on.
12953 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070012954 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012955 },
12956 ],
12957 },
12958 },
12959 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
12960 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12961 "sources": [ # The ranges of data for a series or domain.
12962 # Exactly one dimension must have a length of 1,
12963 # and all sources in the list must have the same dimension
12964 # with length 1.
12965 # The domain (if it exists) & all series must have the same number
12966 # of source ranges. If using more than one source range, then the source
12967 # range at a given offset must be contiguous across the domain and series.
12968 #
12969 # For example, these are valid configurations:
12970 #
12971 # domain sources: A1:A5
12972 # series1 sources: B1:B5
12973 # series2 sources: D6:D10
12974 #
12975 # domain sources: A1:A5, C10:C12
12976 # series1 sources: B1:B5, D10:D12
12977 # series2 sources: C1:C5, E10:E12
12978 { # A range on a sheet.
12979 # All indexes are zero-based.
12980 # Indexes are half open, e.g the start index is inclusive
12981 # and the end index is exclusive -- [start_index, end_index).
12982 # Missing indexes indicate the range is unbounded on that side.
12983 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012984 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012985 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012986 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012987 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012988 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012989 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012990 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012991 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012992 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012993 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012994 # `Sheet1!A:B == sheet_id: 0,
12995 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012996 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012997 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012998 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012999 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013000 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013001 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013002 #
13003 # The start index must always be less than or equal to the end index.
13004 # If the start index equals the end index, then the range is empty.
13005 # Empty ranges are typically not meaningful and are usually rendered in the
13006 # UI as `#REF!`.
13007 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013008 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013009 "sheetId": 42, # The sheet this range is on.
13010 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013011 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013012 },
13013 ],
13014 },
13015 },
13016 "threeDimensional": True or False, # True if the pie is three dimensional.
13017 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
13018 "pieHole": 3.14, # The size of the hole in the pie chart.
13019 },
13020 "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 -070013021 # See BasicChartType for the list of all
13022 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013023 # of charts this supports.
13024 "headerCount": 42, # The number of rows or columns in the data that are "headers".
13025 # If not set, Google Sheets will guess how many rows are headers based
13026 # on the data.
13027 #
13028 # (Note that BasicChartAxis.title may override the axis title
13029 # inferred from the header values.)
13030 "series": [ # The data this chart is visualizing.
13031 { # A single series of data in a chart.
13032 # For example, if charting stock prices over time, multiple series may exist,
13033 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
13034 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
13035 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13036 "sources": [ # The ranges of data for a series or domain.
13037 # Exactly one dimension must have a length of 1,
13038 # and all sources in the list must have the same dimension
13039 # with length 1.
13040 # The domain (if it exists) & all series must have the same number
13041 # of source ranges. If using more than one source range, then the source
13042 # range at a given offset must be contiguous across the domain and series.
13043 #
13044 # For example, these are valid configurations:
13045 #
13046 # domain sources: A1:A5
13047 # series1 sources: B1:B5
13048 # series2 sources: D6:D10
13049 #
13050 # domain sources: A1:A5, C10:C12
13051 # series1 sources: B1:B5, D10:D12
13052 # series2 sources: C1:C5, E10:E12
13053 { # A range on a sheet.
13054 # All indexes are zero-based.
13055 # Indexes are half open, e.g the start index is inclusive
13056 # and the end index is exclusive -- [start_index, end_index).
13057 # Missing indexes indicate the range is unbounded on that side.
13058 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013059 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013060 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013061 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013062 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013063 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013064 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013065 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013066 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013067 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013068 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013069 # `Sheet1!A:B == sheet_id: 0,
13070 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013071 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013072 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013073 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013074 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013075 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013076 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013077 #
13078 # The start index must always be less than or equal to the end index.
13079 # If the start index equals the end index, then the range is empty.
13080 # Empty ranges are typically not meaningful and are usually rendered in the
13081 # UI as `#REF!`.
13082 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013083 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013084 "sheetId": 42, # The sheet this range is on.
13085 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013086 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013087 },
13088 ],
13089 },
13090 },
13091 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
13092 # For example, if charting stocks over time, the "Volume" series
13093 # may want to be pinned to the right with the prices pinned to the left,
13094 # because the scale of trading volume is different than the scale of
13095 # prices.
13096 # It is an error to specify an axis that isn't a valid minor axis
13097 # for the chart's type.
13098 "type": "A String", # The type of this series. Valid only if the
13099 # chartType is
13100 # COMBO.
13101 # Different types will change the way the series is visualized.
13102 # Only LINE, AREA,
13103 # and COLUMN are supported.
13104 },
13105 ],
13106 "legendPosition": "A String", # The position of the chart legend.
13107 "domains": [ # The domain of data this is charting.
13108 # Only a single domain is currently supported.
13109 { # The domain of a chart.
13110 # For example, if charting stock prices over time, this would be the date.
13111 "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 -070013112 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013113 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13114 "sources": [ # The ranges of data for a series or domain.
13115 # Exactly one dimension must have a length of 1,
13116 # and all sources in the list must have the same dimension
13117 # with length 1.
13118 # The domain (if it exists) & all series must have the same number
13119 # of source ranges. If using more than one source range, then the source
13120 # range at a given offset must be contiguous across the domain and series.
13121 #
13122 # For example, these are valid configurations:
13123 #
13124 # domain sources: A1:A5
13125 # series1 sources: B1:B5
13126 # series2 sources: D6:D10
13127 #
13128 # domain sources: A1:A5, C10:C12
13129 # series1 sources: B1:B5, D10:D12
13130 # series2 sources: C1:C5, E10:E12
13131 { # A range on a sheet.
13132 # All indexes are zero-based.
13133 # Indexes are half open, e.g the start index is inclusive
13134 # and the end index is exclusive -- [start_index, end_index).
13135 # Missing indexes indicate the range is unbounded on that side.
13136 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013137 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013138 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013139 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013140 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013141 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013143 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013144 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013145 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013146 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013147 # `Sheet1!A:B == sheet_id: 0,
13148 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013149 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013150 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013151 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013152 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013154 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013155 #
13156 # The start index must always be less than or equal to the end index.
13157 # If the start index equals the end index, then the range is empty.
13158 # Empty ranges are typically not meaningful and are usually rendered in the
13159 # UI as `#REF!`.
13160 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013161 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013162 "sheetId": 42, # The sheet this range is on.
13163 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013164 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013165 },
13166 ],
13167 },
13168 },
13169 },
13170 ],
13171 "chartType": "A String", # The type of the chart.
13172 "axis": [ # The axis on the chart.
13173 { # An axis of the chart.
13174 # A chart may not have more than one axis per
13175 # axis position.
13176 "position": "A String", # The position of this axis.
13177 "format": { # The format of a run of text in a cell. # The format of the title.
13178 # Only valid if the axis is not associated with the domain.
13179 # Absent values indicate that the field isn't specified.
13180 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
13181 # for simplicity of conversion to/from color representations in various
13182 # languages over compactness; for example, the fields of this representation
13183 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13184 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13185 # method in iOS; and, with just a little work, it can be easily formatted into
13186 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13187 #
13188 # Example (Java):
13189 #
13190 # import com.google.type.Color;
13191 #
13192 # // ...
13193 # public static java.awt.Color fromProto(Color protocolor) {
13194 # float alpha = protocolor.hasAlpha()
13195 # ? protocolor.getAlpha().getValue()
13196 # : 1.0;
13197 #
13198 # return new java.awt.Color(
13199 # protocolor.getRed(),
13200 # protocolor.getGreen(),
13201 # protocolor.getBlue(),
13202 # alpha);
13203 # }
13204 #
13205 # public static Color toProto(java.awt.Color color) {
13206 # float red = (float) color.getRed();
13207 # float green = (float) color.getGreen();
13208 # float blue = (float) color.getBlue();
13209 # float denominator = 255.0;
13210 # Color.Builder resultBuilder =
13211 # Color
13212 # .newBuilder()
13213 # .setRed(red / denominator)
13214 # .setGreen(green / denominator)
13215 # .setBlue(blue / denominator);
13216 # int alpha = color.getAlpha();
13217 # if (alpha != 255) {
13218 # result.setAlpha(
13219 # FloatValue
13220 # .newBuilder()
13221 # .setValue(((float) alpha) / denominator)
13222 # .build());
13223 # }
13224 # return resultBuilder.build();
13225 # }
13226 # // ...
13227 #
13228 # Example (iOS / Obj-C):
13229 #
13230 # // ...
13231 # static UIColor* fromProto(Color* protocolor) {
13232 # float red = [protocolor red];
13233 # float green = [protocolor green];
13234 # float blue = [protocolor blue];
13235 # FloatValue* alpha_wrapper = [protocolor alpha];
13236 # float alpha = 1.0;
13237 # if (alpha_wrapper != nil) {
13238 # alpha = [alpha_wrapper value];
13239 # }
13240 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13241 # }
13242 #
13243 # static Color* toProto(UIColor* color) {
13244 # CGFloat red, green, blue, alpha;
13245 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13246 # return nil;
13247 # }
13248 # Color* result = [Color alloc] init];
13249 # [result setRed:red];
13250 # [result setGreen:green];
13251 # [result setBlue:blue];
13252 # if (alpha <= 0.9999) {
13253 # [result setAlpha:floatWrapperWithValue(alpha)];
13254 # }
13255 # [result autorelease];
13256 # return result;
13257 # }
13258 # // ...
13259 #
13260 # Example (JavaScript):
13261 #
13262 # // ...
13263 #
13264 # var protoToCssColor = function(rgb_color) {
13265 # var redFrac = rgb_color.red || 0.0;
13266 # var greenFrac = rgb_color.green || 0.0;
13267 # var blueFrac = rgb_color.blue || 0.0;
13268 # var red = Math.floor(redFrac * 255);
13269 # var green = Math.floor(greenFrac * 255);
13270 # var blue = Math.floor(blueFrac * 255);
13271 #
13272 # if (!('alpha' in rgb_color)) {
13273 # return rgbToCssColor_(red, green, blue);
13274 # }
13275 #
13276 # var alphaFrac = rgb_color.alpha.value || 0.0;
13277 # var rgbParams = [red, green, blue].join(',');
13278 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13279 # };
13280 #
13281 # var rgbToCssColor_ = function(red, green, blue) {
13282 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13283 # var hexString = rgbNumber.toString(16);
13284 # var missingZeros = 6 - hexString.length;
13285 # var resultBuilder = ['#'];
13286 # for (var i = 0; i < missingZeros; i++) {
13287 # resultBuilder.push('0');
13288 # }
13289 # resultBuilder.push(hexString);
13290 # return resultBuilder.join('');
13291 # };
13292 #
13293 # // ...
13294 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13295 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13296 # the final pixel color is defined by the equation:
13297 #
13298 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13299 #
13300 # This means that a value of 1.0 corresponds to a solid color, whereas
13301 # a value of 0.0 corresponds to a completely transparent color. This
13302 # uses a wrapper message rather than a simple float scalar so that it is
13303 # possible to distinguish between a default value and the value being unset.
13304 # If omitted, this color object is to be rendered as a solid color
13305 # (as if the alpha value had been explicitly given with a value of 1.0).
13306 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13307 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13308 },
13309 "bold": True or False, # True if the text is bold.
13310 "strikethrough": True or False, # True if the text has a strikethrough.
13311 "fontFamily": "A String", # The font family.
13312 "fontSize": 42, # The size of the font.
13313 "italic": True or False, # True if the text is italicized.
13314 "underline": True or False, # True if the text is underlined.
13315 },
Thomas Coffee2f245372017-03-27 10:39:26 -070013316 "title": "A String", # The title of this axis. If set, this overrides any title inferred
13317 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013318 },
13319 ],
13320 },
13321 "title": "A String", # The title of the chart.
13322 },
13323 },
13324 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
13325 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
13326 # All indexes are zero-based.
13327 # Indexes are half open: the start index is inclusive
13328 # and the end index is exclusive.
13329 # Missing indexes indicate the range is unbounded on that side.
13330 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13331 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13332 "sheetId": 42, # The sheet this span is on.
13333 "dimension": "A String", # The dimension of the span.
13334 },
13335 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
13336 # based on the coordinates *before* the source data is removed
13337 # from the grid. Existing data will be shifted down or right
13338 # (depending on the dimension) to make room for the moved dimensions.
13339 # The source dimensions are removed from the grid, so the
13340 # the data may end up in a different index than specified.
13341 #
13342 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013343 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
13344 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013345 # (the zero-based index of row 5).
13346 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
13347 },
Thomas Coffee2f245372017-03-27 10:39:26 -070013348 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
13349 # based on a delimiter in each cell.
13350 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
13351 # All indexes are zero-based.
13352 # Indexes are half open, e.g the start index is inclusive
13353 # and the end index is exclusive -- [start_index, end_index).
13354 # Missing indexes indicate the range is unbounded on that side.
13355 #
13356 # For example, if `"Sheet1"` is sheet ID 0, then:
13357 #
13358 # `Sheet1!A1:A1 == sheet_id: 0,
13359 # start_row_index: 0, end_row_index: 1,
13360 # start_column_index: 0, end_column_index: 1`
13361 #
13362 # `Sheet1!A3:B4 == sheet_id: 0,
13363 # start_row_index: 2, end_row_index: 4,
13364 # start_column_index: 0, end_column_index: 2`
13365 #
13366 # `Sheet1!A:B == sheet_id: 0,
13367 # start_column_index: 0, end_column_index: 2`
13368 #
13369 # `Sheet1!A5:B == sheet_id: 0,
13370 # start_row_index: 4,
13371 # start_column_index: 0, end_column_index: 2`
13372 #
13373 # `Sheet1 == sheet_id:0`
13374 #
13375 # The start index must always be less than or equal to the end index.
13376 # If the start index equals the end index, then the range is empty.
13377 # Empty ranges are typically not meaningful and are usually rendered in the
13378 # UI as `#REF!`.
13379 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13380 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13381 "sheetId": 42, # The sheet this range is on.
13382 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13383 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013384 },
Thomas Coffee2f245372017-03-27 10:39:26 -070013385 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
13386 # CUSTOM.
13387 "delimiterType": "A String", # The delimiter type to use.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013388 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013389 "addBanding": { # Adds a new banded range to the spreadsheet. # Adds a new banded range
13390 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to add. The bandedRangeId
13391 # field is optional; if one is not set, an id will be randomly generated. (It
13392 # is an error to specify the ID of a range that already exists.)
13393 "range": { # A range on a sheet. # The range over which these properties are applied.
13394 # All indexes are zero-based.
13395 # Indexes are half open, e.g the start index is inclusive
13396 # and the end index is exclusive -- [start_index, end_index).
13397 # Missing indexes indicate the range is unbounded on that side.
13398 #
13399 # For example, if `"Sheet1"` is sheet ID 0, then:
13400 #
13401 # `Sheet1!A1:A1 == sheet_id: 0,
13402 # start_row_index: 0, end_row_index: 1,
13403 # start_column_index: 0, end_column_index: 1`
13404 #
13405 # `Sheet1!A3:B4 == sheet_id: 0,
13406 # start_row_index: 2, end_row_index: 4,
13407 # start_column_index: 0, end_column_index: 2`
13408 #
13409 # `Sheet1!A:B == sheet_id: 0,
13410 # start_column_index: 0, end_column_index: 2`
13411 #
13412 # `Sheet1!A5:B == sheet_id: 0,
13413 # start_row_index: 4,
13414 # start_column_index: 0, end_column_index: 2`
13415 #
13416 # `Sheet1 == sheet_id:0`
13417 #
13418 # The start index must always be less than or equal to the end index.
13419 # If the start index equals the end index, then the range is empty.
13420 # Empty ranges are typically not meaningful and are usually rendered in the
13421 # UI as `#REF!`.
13422 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013423 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013424 "sheetId": 42, # The sheet this range is on.
13425 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070013426 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013427 },
13428 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
13429 # by-column basis throughout all the columns in the range. At least one of
13430 # row_properties or column_properties must be specified.
13431 # BandedRange.row_properties and BandedRange.column_properties are
13432 # set, the fill colors are applied to cells according to the following rules:
13433 #
13434 # * header_color and footer_color take priority over band colors.
13435 # * first_band_color takes priority over second_band_color.
13436 # * row_properties takes priority over column_properties.
13437 #
13438 # For example, the first row color takes priority over the first column
13439 # color, but the first column color takes priority over the second row color.
13440 # Similarly, the row header takes priority over the column header in the
13441 # top left cell, but the column header takes priority over the first row
13442 # color if the row header is not set.
13443 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13444 # for simplicity of conversion to/from color representations in various
13445 # languages over compactness; for example, the fields of this representation
13446 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13447 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13448 # method in iOS; and, with just a little work, it can be easily formatted into
13449 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13450 #
13451 # Example (Java):
13452 #
13453 # import com.google.type.Color;
13454 #
13455 # // ...
13456 # public static java.awt.Color fromProto(Color protocolor) {
13457 # float alpha = protocolor.hasAlpha()
13458 # ? protocolor.getAlpha().getValue()
13459 # : 1.0;
13460 #
13461 # return new java.awt.Color(
13462 # protocolor.getRed(),
13463 # protocolor.getGreen(),
13464 # protocolor.getBlue(),
13465 # alpha);
13466 # }
13467 #
13468 # public static Color toProto(java.awt.Color color) {
13469 # float red = (float) color.getRed();
13470 # float green = (float) color.getGreen();
13471 # float blue = (float) color.getBlue();
13472 # float denominator = 255.0;
13473 # Color.Builder resultBuilder =
13474 # Color
13475 # .newBuilder()
13476 # .setRed(red / denominator)
13477 # .setGreen(green / denominator)
13478 # .setBlue(blue / denominator);
13479 # int alpha = color.getAlpha();
13480 # if (alpha != 255) {
13481 # result.setAlpha(
13482 # FloatValue
13483 # .newBuilder()
13484 # .setValue(((float) alpha) / denominator)
13485 # .build());
13486 # }
13487 # return resultBuilder.build();
13488 # }
13489 # // ...
13490 #
13491 # Example (iOS / Obj-C):
13492 #
13493 # // ...
13494 # static UIColor* fromProto(Color* protocolor) {
13495 # float red = [protocolor red];
13496 # float green = [protocolor green];
13497 # float blue = [protocolor blue];
13498 # FloatValue* alpha_wrapper = [protocolor alpha];
13499 # float alpha = 1.0;
13500 # if (alpha_wrapper != nil) {
13501 # alpha = [alpha_wrapper value];
13502 # }
13503 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13504 # }
13505 #
13506 # static Color* toProto(UIColor* color) {
13507 # CGFloat red, green, blue, alpha;
13508 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13509 # return nil;
13510 # }
13511 # Color* result = [Color alloc] init];
13512 # [result setRed:red];
13513 # [result setGreen:green];
13514 # [result setBlue:blue];
13515 # if (alpha <= 0.9999) {
13516 # [result setAlpha:floatWrapperWithValue(alpha)];
13517 # }
13518 # [result autorelease];
13519 # return result;
13520 # }
13521 # // ...
13522 #
13523 # Example (JavaScript):
13524 #
13525 # // ...
13526 #
13527 # var protoToCssColor = function(rgb_color) {
13528 # var redFrac = rgb_color.red || 0.0;
13529 # var greenFrac = rgb_color.green || 0.0;
13530 # var blueFrac = rgb_color.blue || 0.0;
13531 # var red = Math.floor(redFrac * 255);
13532 # var green = Math.floor(greenFrac * 255);
13533 # var blue = Math.floor(blueFrac * 255);
13534 #
13535 # if (!('alpha' in rgb_color)) {
13536 # return rgbToCssColor_(red, green, blue);
13537 # }
13538 #
13539 # var alphaFrac = rgb_color.alpha.value || 0.0;
13540 # var rgbParams = [red, green, blue].join(',');
13541 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13542 # };
13543 #
13544 # var rgbToCssColor_ = function(red, green, blue) {
13545 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13546 # var hexString = rgbNumber.toString(16);
13547 # var missingZeros = 6 - hexString.length;
13548 # var resultBuilder = ['#'];
13549 # for (var i = 0; i < missingZeros; i++) {
13550 # resultBuilder.push('0');
13551 # }
13552 # resultBuilder.push(hexString);
13553 # return resultBuilder.join('');
13554 # };
13555 #
13556 # // ...
13557 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13558 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13559 # the final pixel color is defined by the equation:
13560 #
13561 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13562 #
13563 # This means that a value of 1.0 corresponds to a solid color, whereas
13564 # a value of 0.0 corresponds to a completely transparent color. This
13565 # uses a wrapper message rather than a simple float scalar so that it is
13566 # possible to distinguish between a default value and the value being unset.
13567 # If omitted, this color object is to be rendered as a solid color
13568 # (as if the alpha value had been explicitly given with a value of 1.0).
13569 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13570 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13571 },
13572 "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
13573 # row or column will be filled with this color and the colors will
13574 # alternate between first_band_color and second_band_color starting
13575 # from the second row or column. Otherwise, the first row or column will be
13576 # filled with first_band_color and the colors will proceed to alternate
13577 # as they normally would.
13578 # for simplicity of conversion to/from color representations in various
13579 # languages over compactness; for example, the fields of this representation
13580 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13581 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13582 # method in iOS; and, with just a little work, it can be easily formatted into
13583 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13584 #
13585 # Example (Java):
13586 #
13587 # import com.google.type.Color;
13588 #
13589 # // ...
13590 # public static java.awt.Color fromProto(Color protocolor) {
13591 # float alpha = protocolor.hasAlpha()
13592 # ? protocolor.getAlpha().getValue()
13593 # : 1.0;
13594 #
13595 # return new java.awt.Color(
13596 # protocolor.getRed(),
13597 # protocolor.getGreen(),
13598 # protocolor.getBlue(),
13599 # alpha);
13600 # }
13601 #
13602 # public static Color toProto(java.awt.Color color) {
13603 # float red = (float) color.getRed();
13604 # float green = (float) color.getGreen();
13605 # float blue = (float) color.getBlue();
13606 # float denominator = 255.0;
13607 # Color.Builder resultBuilder =
13608 # Color
13609 # .newBuilder()
13610 # .setRed(red / denominator)
13611 # .setGreen(green / denominator)
13612 # .setBlue(blue / denominator);
13613 # int alpha = color.getAlpha();
13614 # if (alpha != 255) {
13615 # result.setAlpha(
13616 # FloatValue
13617 # .newBuilder()
13618 # .setValue(((float) alpha) / denominator)
13619 # .build());
13620 # }
13621 # return resultBuilder.build();
13622 # }
13623 # // ...
13624 #
13625 # Example (iOS / Obj-C):
13626 #
13627 # // ...
13628 # static UIColor* fromProto(Color* protocolor) {
13629 # float red = [protocolor red];
13630 # float green = [protocolor green];
13631 # float blue = [protocolor blue];
13632 # FloatValue* alpha_wrapper = [protocolor alpha];
13633 # float alpha = 1.0;
13634 # if (alpha_wrapper != nil) {
13635 # alpha = [alpha_wrapper value];
13636 # }
13637 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13638 # }
13639 #
13640 # static Color* toProto(UIColor* color) {
13641 # CGFloat red, green, blue, alpha;
13642 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13643 # return nil;
13644 # }
13645 # Color* result = [Color alloc] init];
13646 # [result setRed:red];
13647 # [result setGreen:green];
13648 # [result setBlue:blue];
13649 # if (alpha <= 0.9999) {
13650 # [result setAlpha:floatWrapperWithValue(alpha)];
13651 # }
13652 # [result autorelease];
13653 # return result;
13654 # }
13655 # // ...
13656 #
13657 # Example (JavaScript):
13658 #
13659 # // ...
13660 #
13661 # var protoToCssColor = function(rgb_color) {
13662 # var redFrac = rgb_color.red || 0.0;
13663 # var greenFrac = rgb_color.green || 0.0;
13664 # var blueFrac = rgb_color.blue || 0.0;
13665 # var red = Math.floor(redFrac * 255);
13666 # var green = Math.floor(greenFrac * 255);
13667 # var blue = Math.floor(blueFrac * 255);
13668 #
13669 # if (!('alpha' in rgb_color)) {
13670 # return rgbToCssColor_(red, green, blue);
13671 # }
13672 #
13673 # var alphaFrac = rgb_color.alpha.value || 0.0;
13674 # var rgbParams = [red, green, blue].join(',');
13675 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13676 # };
13677 #
13678 # var rgbToCssColor_ = function(red, green, blue) {
13679 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13680 # var hexString = rgbNumber.toString(16);
13681 # var missingZeros = 6 - hexString.length;
13682 # var resultBuilder = ['#'];
13683 # for (var i = 0; i < missingZeros; i++) {
13684 # resultBuilder.push('0');
13685 # }
13686 # resultBuilder.push(hexString);
13687 # return resultBuilder.join('');
13688 # };
13689 #
13690 # // ...
13691 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13692 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13693 # the final pixel color is defined by the equation:
13694 #
13695 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13696 #
13697 # This means that a value of 1.0 corresponds to a solid color, whereas
13698 # a value of 0.0 corresponds to a completely transparent color. This
13699 # uses a wrapper message rather than a simple float scalar so that it is
13700 # possible to distinguish between a default value and the value being unset.
13701 # If omitted, this color object is to be rendered as a solid color
13702 # (as if the alpha value had been explicitly given with a value of 1.0).
13703 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13704 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13705 },
13706 "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
13707 # row or column will be filled with either first_band_color or
13708 # second_band_color, depending on the color of the previous row or
13709 # column.
13710 # for simplicity of conversion to/from color representations in various
13711 # languages over compactness; for example, the fields of this representation
13712 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13713 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13714 # method in iOS; and, with just a little work, it can be easily formatted into
13715 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13716 #
13717 # Example (Java):
13718 #
13719 # import com.google.type.Color;
13720 #
13721 # // ...
13722 # public static java.awt.Color fromProto(Color protocolor) {
13723 # float alpha = protocolor.hasAlpha()
13724 # ? protocolor.getAlpha().getValue()
13725 # : 1.0;
13726 #
13727 # return new java.awt.Color(
13728 # protocolor.getRed(),
13729 # protocolor.getGreen(),
13730 # protocolor.getBlue(),
13731 # alpha);
13732 # }
13733 #
13734 # public static Color toProto(java.awt.Color color) {
13735 # float red = (float) color.getRed();
13736 # float green = (float) color.getGreen();
13737 # float blue = (float) color.getBlue();
13738 # float denominator = 255.0;
13739 # Color.Builder resultBuilder =
13740 # Color
13741 # .newBuilder()
13742 # .setRed(red / denominator)
13743 # .setGreen(green / denominator)
13744 # .setBlue(blue / denominator);
13745 # int alpha = color.getAlpha();
13746 # if (alpha != 255) {
13747 # result.setAlpha(
13748 # FloatValue
13749 # .newBuilder()
13750 # .setValue(((float) alpha) / denominator)
13751 # .build());
13752 # }
13753 # return resultBuilder.build();
13754 # }
13755 # // ...
13756 #
13757 # Example (iOS / Obj-C):
13758 #
13759 # // ...
13760 # static UIColor* fromProto(Color* protocolor) {
13761 # float red = [protocolor red];
13762 # float green = [protocolor green];
13763 # float blue = [protocolor blue];
13764 # FloatValue* alpha_wrapper = [protocolor alpha];
13765 # float alpha = 1.0;
13766 # if (alpha_wrapper != nil) {
13767 # alpha = [alpha_wrapper value];
13768 # }
13769 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13770 # }
13771 #
13772 # static Color* toProto(UIColor* color) {
13773 # CGFloat red, green, blue, alpha;
13774 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13775 # return nil;
13776 # }
13777 # Color* result = [Color alloc] init];
13778 # [result setRed:red];
13779 # [result setGreen:green];
13780 # [result setBlue:blue];
13781 # if (alpha <= 0.9999) {
13782 # [result setAlpha:floatWrapperWithValue(alpha)];
13783 # }
13784 # [result autorelease];
13785 # return result;
13786 # }
13787 # // ...
13788 #
13789 # Example (JavaScript):
13790 #
13791 # // ...
13792 #
13793 # var protoToCssColor = function(rgb_color) {
13794 # var redFrac = rgb_color.red || 0.0;
13795 # var greenFrac = rgb_color.green || 0.0;
13796 # var blueFrac = rgb_color.blue || 0.0;
13797 # var red = Math.floor(redFrac * 255);
13798 # var green = Math.floor(greenFrac * 255);
13799 # var blue = Math.floor(blueFrac * 255);
13800 #
13801 # if (!('alpha' in rgb_color)) {
13802 # return rgbToCssColor_(red, green, blue);
13803 # }
13804 #
13805 # var alphaFrac = rgb_color.alpha.value || 0.0;
13806 # var rgbParams = [red, green, blue].join(',');
13807 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13808 # };
13809 #
13810 # var rgbToCssColor_ = function(red, green, blue) {
13811 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13812 # var hexString = rgbNumber.toString(16);
13813 # var missingZeros = 6 - hexString.length;
13814 # var resultBuilder = ['#'];
13815 # for (var i = 0; i < missingZeros; i++) {
13816 # resultBuilder.push('0');
13817 # }
13818 # resultBuilder.push(hexString);
13819 # return resultBuilder.join('');
13820 # };
13821 #
13822 # // ...
13823 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13824 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13825 # the final pixel color is defined by the equation:
13826 #
13827 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13828 #
13829 # This means that a value of 1.0 corresponds to a solid color, whereas
13830 # a value of 0.0 corresponds to a completely transparent color. This
13831 # uses a wrapper message rather than a simple float scalar so that it is
13832 # possible to distinguish between a default value and the value being unset.
13833 # If omitted, this color object is to be rendered as a solid color
13834 # (as if the alpha value had been explicitly given with a value of 1.0).
13835 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13836 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13837 },
13838 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
13839 # for simplicity of conversion to/from color representations in various
13840 # languages over compactness; for example, the fields of this representation
13841 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13842 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13843 # method in iOS; and, with just a little work, it can be easily formatted into
13844 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13845 #
13846 # Example (Java):
13847 #
13848 # import com.google.type.Color;
13849 #
13850 # // ...
13851 # public static java.awt.Color fromProto(Color protocolor) {
13852 # float alpha = protocolor.hasAlpha()
13853 # ? protocolor.getAlpha().getValue()
13854 # : 1.0;
13855 #
13856 # return new java.awt.Color(
13857 # protocolor.getRed(),
13858 # protocolor.getGreen(),
13859 # protocolor.getBlue(),
13860 # alpha);
13861 # }
13862 #
13863 # public static Color toProto(java.awt.Color color) {
13864 # float red = (float) color.getRed();
13865 # float green = (float) color.getGreen();
13866 # float blue = (float) color.getBlue();
13867 # float denominator = 255.0;
13868 # Color.Builder resultBuilder =
13869 # Color
13870 # .newBuilder()
13871 # .setRed(red / denominator)
13872 # .setGreen(green / denominator)
13873 # .setBlue(blue / denominator);
13874 # int alpha = color.getAlpha();
13875 # if (alpha != 255) {
13876 # result.setAlpha(
13877 # FloatValue
13878 # .newBuilder()
13879 # .setValue(((float) alpha) / denominator)
13880 # .build());
13881 # }
13882 # return resultBuilder.build();
13883 # }
13884 # // ...
13885 #
13886 # Example (iOS / Obj-C):
13887 #
13888 # // ...
13889 # static UIColor* fromProto(Color* protocolor) {
13890 # float red = [protocolor red];
13891 # float green = [protocolor green];
13892 # float blue = [protocolor blue];
13893 # FloatValue* alpha_wrapper = [protocolor alpha];
13894 # float alpha = 1.0;
13895 # if (alpha_wrapper != nil) {
13896 # alpha = [alpha_wrapper value];
13897 # }
13898 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13899 # }
13900 #
13901 # static Color* toProto(UIColor* color) {
13902 # CGFloat red, green, blue, alpha;
13903 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13904 # return nil;
13905 # }
13906 # Color* result = [Color alloc] init];
13907 # [result setRed:red];
13908 # [result setGreen:green];
13909 # [result setBlue:blue];
13910 # if (alpha <= 0.9999) {
13911 # [result setAlpha:floatWrapperWithValue(alpha)];
13912 # }
13913 # [result autorelease];
13914 # return result;
13915 # }
13916 # // ...
13917 #
13918 # Example (JavaScript):
13919 #
13920 # // ...
13921 #
13922 # var protoToCssColor = function(rgb_color) {
13923 # var redFrac = rgb_color.red || 0.0;
13924 # var greenFrac = rgb_color.green || 0.0;
13925 # var blueFrac = rgb_color.blue || 0.0;
13926 # var red = Math.floor(redFrac * 255);
13927 # var green = Math.floor(greenFrac * 255);
13928 # var blue = Math.floor(blueFrac * 255);
13929 #
13930 # if (!('alpha' in rgb_color)) {
13931 # return rgbToCssColor_(red, green, blue);
13932 # }
13933 #
13934 # var alphaFrac = rgb_color.alpha.value || 0.0;
13935 # var rgbParams = [red, green, blue].join(',');
13936 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13937 # };
13938 #
13939 # var rgbToCssColor_ = function(red, green, blue) {
13940 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13941 # var hexString = rgbNumber.toString(16);
13942 # var missingZeros = 6 - hexString.length;
13943 # var resultBuilder = ['#'];
13944 # for (var i = 0; i < missingZeros; i++) {
13945 # resultBuilder.push('0');
13946 # }
13947 # resultBuilder.push(hexString);
13948 # return resultBuilder.join('');
13949 # };
13950 #
13951 # // ...
13952 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13953 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13954 # the final pixel color is defined by the equation:
13955 #
13956 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13957 #
13958 # This means that a value of 1.0 corresponds to a solid color, whereas
13959 # a value of 0.0 corresponds to a completely transparent color. This
13960 # uses a wrapper message rather than a simple float scalar so that it is
13961 # possible to distinguish between a default value and the value being unset.
13962 # If omitted, this color object is to be rendered as a solid color
13963 # (as if the alpha value had been explicitly given with a value of 1.0).
13964 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13965 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13966 },
13967 },
13968 "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
13969 # basis throughout all the rows in the range. At least one of
13970 # row_properties or column_properties must be specified.
13971 # BandedRange.row_properties and BandedRange.column_properties are
13972 # set, the fill colors are applied to cells according to the following rules:
13973 #
13974 # * header_color and footer_color take priority over band colors.
13975 # * first_band_color takes priority over second_band_color.
13976 # * row_properties takes priority over column_properties.
13977 #
13978 # For example, the first row color takes priority over the first column
13979 # color, but the first column color takes priority over the second row color.
13980 # Similarly, the row header takes priority over the column header in the
13981 # top left cell, but the column header takes priority over the first row
13982 # color if the row header is not set.
13983 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13984 # for simplicity of conversion to/from color representations in various
13985 # languages over compactness; for example, the fields of this representation
13986 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13987 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13988 # method in iOS; and, with just a little work, it can be easily formatted into
13989 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13990 #
13991 # Example (Java):
13992 #
13993 # import com.google.type.Color;
13994 #
13995 # // ...
13996 # public static java.awt.Color fromProto(Color protocolor) {
13997 # float alpha = protocolor.hasAlpha()
13998 # ? protocolor.getAlpha().getValue()
13999 # : 1.0;
14000 #
14001 # return new java.awt.Color(
14002 # protocolor.getRed(),
14003 # protocolor.getGreen(),
14004 # protocolor.getBlue(),
14005 # alpha);
14006 # }
14007 #
14008 # public static Color toProto(java.awt.Color color) {
14009 # float red = (float) color.getRed();
14010 # float green = (float) color.getGreen();
14011 # float blue = (float) color.getBlue();
14012 # float denominator = 255.0;
14013 # Color.Builder resultBuilder =
14014 # Color
14015 # .newBuilder()
14016 # .setRed(red / denominator)
14017 # .setGreen(green / denominator)
14018 # .setBlue(blue / denominator);
14019 # int alpha = color.getAlpha();
14020 # if (alpha != 255) {
14021 # result.setAlpha(
14022 # FloatValue
14023 # .newBuilder()
14024 # .setValue(((float) alpha) / denominator)
14025 # .build());
14026 # }
14027 # return resultBuilder.build();
14028 # }
14029 # // ...
14030 #
14031 # Example (iOS / Obj-C):
14032 #
14033 # // ...
14034 # static UIColor* fromProto(Color* protocolor) {
14035 # float red = [protocolor red];
14036 # float green = [protocolor green];
14037 # float blue = [protocolor blue];
14038 # FloatValue* alpha_wrapper = [protocolor alpha];
14039 # float alpha = 1.0;
14040 # if (alpha_wrapper != nil) {
14041 # alpha = [alpha_wrapper value];
14042 # }
14043 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14044 # }
14045 #
14046 # static Color* toProto(UIColor* color) {
14047 # CGFloat red, green, blue, alpha;
14048 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14049 # return nil;
14050 # }
14051 # Color* result = [Color alloc] init];
14052 # [result setRed:red];
14053 # [result setGreen:green];
14054 # [result setBlue:blue];
14055 # if (alpha <= 0.9999) {
14056 # [result setAlpha:floatWrapperWithValue(alpha)];
14057 # }
14058 # [result autorelease];
14059 # return result;
14060 # }
14061 # // ...
14062 #
14063 # Example (JavaScript):
14064 #
14065 # // ...
14066 #
14067 # var protoToCssColor = function(rgb_color) {
14068 # var redFrac = rgb_color.red || 0.0;
14069 # var greenFrac = rgb_color.green || 0.0;
14070 # var blueFrac = rgb_color.blue || 0.0;
14071 # var red = Math.floor(redFrac * 255);
14072 # var green = Math.floor(greenFrac * 255);
14073 # var blue = Math.floor(blueFrac * 255);
14074 #
14075 # if (!('alpha' in rgb_color)) {
14076 # return rgbToCssColor_(red, green, blue);
14077 # }
14078 #
14079 # var alphaFrac = rgb_color.alpha.value || 0.0;
14080 # var rgbParams = [red, green, blue].join(',');
14081 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14082 # };
14083 #
14084 # var rgbToCssColor_ = function(red, green, blue) {
14085 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14086 # var hexString = rgbNumber.toString(16);
14087 # var missingZeros = 6 - hexString.length;
14088 # var resultBuilder = ['#'];
14089 # for (var i = 0; i < missingZeros; i++) {
14090 # resultBuilder.push('0');
14091 # }
14092 # resultBuilder.push(hexString);
14093 # return resultBuilder.join('');
14094 # };
14095 #
14096 # // ...
14097 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14098 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14099 # the final pixel color is defined by the equation:
14100 #
14101 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14102 #
14103 # This means that a value of 1.0 corresponds to a solid color, whereas
14104 # a value of 0.0 corresponds to a completely transparent color. This
14105 # uses a wrapper message rather than a simple float scalar so that it is
14106 # possible to distinguish between a default value and the value being unset.
14107 # If omitted, this color object is to be rendered as a solid color
14108 # (as if the alpha value had been explicitly given with a value of 1.0).
14109 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14110 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14111 },
14112 "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
14113 # row or column will be filled with this color and the colors will
14114 # alternate between first_band_color and second_band_color starting
14115 # from the second row or column. Otherwise, the first row or column will be
14116 # filled with first_band_color and the colors will proceed to alternate
14117 # as they normally would.
14118 # for simplicity of conversion to/from color representations in various
14119 # languages over compactness; for example, the fields of this representation
14120 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14121 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14122 # method in iOS; and, with just a little work, it can be easily formatted into
14123 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14124 #
14125 # Example (Java):
14126 #
14127 # import com.google.type.Color;
14128 #
14129 # // ...
14130 # public static java.awt.Color fromProto(Color protocolor) {
14131 # float alpha = protocolor.hasAlpha()
14132 # ? protocolor.getAlpha().getValue()
14133 # : 1.0;
14134 #
14135 # return new java.awt.Color(
14136 # protocolor.getRed(),
14137 # protocolor.getGreen(),
14138 # protocolor.getBlue(),
14139 # alpha);
14140 # }
14141 #
14142 # public static Color toProto(java.awt.Color color) {
14143 # float red = (float) color.getRed();
14144 # float green = (float) color.getGreen();
14145 # float blue = (float) color.getBlue();
14146 # float denominator = 255.0;
14147 # Color.Builder resultBuilder =
14148 # Color
14149 # .newBuilder()
14150 # .setRed(red / denominator)
14151 # .setGreen(green / denominator)
14152 # .setBlue(blue / denominator);
14153 # int alpha = color.getAlpha();
14154 # if (alpha != 255) {
14155 # result.setAlpha(
14156 # FloatValue
14157 # .newBuilder()
14158 # .setValue(((float) alpha) / denominator)
14159 # .build());
14160 # }
14161 # return resultBuilder.build();
14162 # }
14163 # // ...
14164 #
14165 # Example (iOS / Obj-C):
14166 #
14167 # // ...
14168 # static UIColor* fromProto(Color* protocolor) {
14169 # float red = [protocolor red];
14170 # float green = [protocolor green];
14171 # float blue = [protocolor blue];
14172 # FloatValue* alpha_wrapper = [protocolor alpha];
14173 # float alpha = 1.0;
14174 # if (alpha_wrapper != nil) {
14175 # alpha = [alpha_wrapper value];
14176 # }
14177 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14178 # }
14179 #
14180 # static Color* toProto(UIColor* color) {
14181 # CGFloat red, green, blue, alpha;
14182 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14183 # return nil;
14184 # }
14185 # Color* result = [Color alloc] init];
14186 # [result setRed:red];
14187 # [result setGreen:green];
14188 # [result setBlue:blue];
14189 # if (alpha <= 0.9999) {
14190 # [result setAlpha:floatWrapperWithValue(alpha)];
14191 # }
14192 # [result autorelease];
14193 # return result;
14194 # }
14195 # // ...
14196 #
14197 # Example (JavaScript):
14198 #
14199 # // ...
14200 #
14201 # var protoToCssColor = function(rgb_color) {
14202 # var redFrac = rgb_color.red || 0.0;
14203 # var greenFrac = rgb_color.green || 0.0;
14204 # var blueFrac = rgb_color.blue || 0.0;
14205 # var red = Math.floor(redFrac * 255);
14206 # var green = Math.floor(greenFrac * 255);
14207 # var blue = Math.floor(blueFrac * 255);
14208 #
14209 # if (!('alpha' in rgb_color)) {
14210 # return rgbToCssColor_(red, green, blue);
14211 # }
14212 #
14213 # var alphaFrac = rgb_color.alpha.value || 0.0;
14214 # var rgbParams = [red, green, blue].join(',');
14215 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14216 # };
14217 #
14218 # var rgbToCssColor_ = function(red, green, blue) {
14219 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14220 # var hexString = rgbNumber.toString(16);
14221 # var missingZeros = 6 - hexString.length;
14222 # var resultBuilder = ['#'];
14223 # for (var i = 0; i < missingZeros; i++) {
14224 # resultBuilder.push('0');
14225 # }
14226 # resultBuilder.push(hexString);
14227 # return resultBuilder.join('');
14228 # };
14229 #
14230 # // ...
14231 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14232 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14233 # the final pixel color is defined by the equation:
14234 #
14235 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14236 #
14237 # This means that a value of 1.0 corresponds to a solid color, whereas
14238 # a value of 0.0 corresponds to a completely transparent color. This
14239 # uses a wrapper message rather than a simple float scalar so that it is
14240 # possible to distinguish between a default value and the value being unset.
14241 # If omitted, this color object is to be rendered as a solid color
14242 # (as if the alpha value had been explicitly given with a value of 1.0).
14243 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14244 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14245 },
14246 "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
14247 # row or column will be filled with either first_band_color or
14248 # second_band_color, depending on the color of the previous row or
14249 # column.
14250 # for simplicity of conversion to/from color representations in various
14251 # languages over compactness; for example, the fields of this representation
14252 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14253 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14254 # method in iOS; and, with just a little work, it can be easily formatted into
14255 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14256 #
14257 # Example (Java):
14258 #
14259 # import com.google.type.Color;
14260 #
14261 # // ...
14262 # public static java.awt.Color fromProto(Color protocolor) {
14263 # float alpha = protocolor.hasAlpha()
14264 # ? protocolor.getAlpha().getValue()
14265 # : 1.0;
14266 #
14267 # return new java.awt.Color(
14268 # protocolor.getRed(),
14269 # protocolor.getGreen(),
14270 # protocolor.getBlue(),
14271 # alpha);
14272 # }
14273 #
14274 # public static Color toProto(java.awt.Color color) {
14275 # float red = (float) color.getRed();
14276 # float green = (float) color.getGreen();
14277 # float blue = (float) color.getBlue();
14278 # float denominator = 255.0;
14279 # Color.Builder resultBuilder =
14280 # Color
14281 # .newBuilder()
14282 # .setRed(red / denominator)
14283 # .setGreen(green / denominator)
14284 # .setBlue(blue / denominator);
14285 # int alpha = color.getAlpha();
14286 # if (alpha != 255) {
14287 # result.setAlpha(
14288 # FloatValue
14289 # .newBuilder()
14290 # .setValue(((float) alpha) / denominator)
14291 # .build());
14292 # }
14293 # return resultBuilder.build();
14294 # }
14295 # // ...
14296 #
14297 # Example (iOS / Obj-C):
14298 #
14299 # // ...
14300 # static UIColor* fromProto(Color* protocolor) {
14301 # float red = [protocolor red];
14302 # float green = [protocolor green];
14303 # float blue = [protocolor blue];
14304 # FloatValue* alpha_wrapper = [protocolor alpha];
14305 # float alpha = 1.0;
14306 # if (alpha_wrapper != nil) {
14307 # alpha = [alpha_wrapper value];
14308 # }
14309 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14310 # }
14311 #
14312 # static Color* toProto(UIColor* color) {
14313 # CGFloat red, green, blue, alpha;
14314 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14315 # return nil;
14316 # }
14317 # Color* result = [Color alloc] init];
14318 # [result setRed:red];
14319 # [result setGreen:green];
14320 # [result setBlue:blue];
14321 # if (alpha <= 0.9999) {
14322 # [result setAlpha:floatWrapperWithValue(alpha)];
14323 # }
14324 # [result autorelease];
14325 # return result;
14326 # }
14327 # // ...
14328 #
14329 # Example (JavaScript):
14330 #
14331 # // ...
14332 #
14333 # var protoToCssColor = function(rgb_color) {
14334 # var redFrac = rgb_color.red || 0.0;
14335 # var greenFrac = rgb_color.green || 0.0;
14336 # var blueFrac = rgb_color.blue || 0.0;
14337 # var red = Math.floor(redFrac * 255);
14338 # var green = Math.floor(greenFrac * 255);
14339 # var blue = Math.floor(blueFrac * 255);
14340 #
14341 # if (!('alpha' in rgb_color)) {
14342 # return rgbToCssColor_(red, green, blue);
14343 # }
14344 #
14345 # var alphaFrac = rgb_color.alpha.value || 0.0;
14346 # var rgbParams = [red, green, blue].join(',');
14347 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14348 # };
14349 #
14350 # var rgbToCssColor_ = function(red, green, blue) {
14351 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14352 # var hexString = rgbNumber.toString(16);
14353 # var missingZeros = 6 - hexString.length;
14354 # var resultBuilder = ['#'];
14355 # for (var i = 0; i < missingZeros; i++) {
14356 # resultBuilder.push('0');
14357 # }
14358 # resultBuilder.push(hexString);
14359 # return resultBuilder.join('');
14360 # };
14361 #
14362 # // ...
14363 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14364 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14365 # the final pixel color is defined by the equation:
14366 #
14367 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14368 #
14369 # This means that a value of 1.0 corresponds to a solid color, whereas
14370 # a value of 0.0 corresponds to a completely transparent color. This
14371 # uses a wrapper message rather than a simple float scalar so that it is
14372 # possible to distinguish between a default value and the value being unset.
14373 # If omitted, this color object is to be rendered as a solid color
14374 # (as if the alpha value had been explicitly given with a value of 1.0).
14375 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14376 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14377 },
14378 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
14379 # for simplicity of conversion to/from color representations in various
14380 # languages over compactness; for example, the fields of this representation
14381 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14382 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14383 # method in iOS; and, with just a little work, it can be easily formatted into
14384 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14385 #
14386 # Example (Java):
14387 #
14388 # import com.google.type.Color;
14389 #
14390 # // ...
14391 # public static java.awt.Color fromProto(Color protocolor) {
14392 # float alpha = protocolor.hasAlpha()
14393 # ? protocolor.getAlpha().getValue()
14394 # : 1.0;
14395 #
14396 # return new java.awt.Color(
14397 # protocolor.getRed(),
14398 # protocolor.getGreen(),
14399 # protocolor.getBlue(),
14400 # alpha);
14401 # }
14402 #
14403 # public static Color toProto(java.awt.Color color) {
14404 # float red = (float) color.getRed();
14405 # float green = (float) color.getGreen();
14406 # float blue = (float) color.getBlue();
14407 # float denominator = 255.0;
14408 # Color.Builder resultBuilder =
14409 # Color
14410 # .newBuilder()
14411 # .setRed(red / denominator)
14412 # .setGreen(green / denominator)
14413 # .setBlue(blue / denominator);
14414 # int alpha = color.getAlpha();
14415 # if (alpha != 255) {
14416 # result.setAlpha(
14417 # FloatValue
14418 # .newBuilder()
14419 # .setValue(((float) alpha) / denominator)
14420 # .build());
14421 # }
14422 # return resultBuilder.build();
14423 # }
14424 # // ...
14425 #
14426 # Example (iOS / Obj-C):
14427 #
14428 # // ...
14429 # static UIColor* fromProto(Color* protocolor) {
14430 # float red = [protocolor red];
14431 # float green = [protocolor green];
14432 # float blue = [protocolor blue];
14433 # FloatValue* alpha_wrapper = [protocolor alpha];
14434 # float alpha = 1.0;
14435 # if (alpha_wrapper != nil) {
14436 # alpha = [alpha_wrapper value];
14437 # }
14438 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14439 # }
14440 #
14441 # static Color* toProto(UIColor* color) {
14442 # CGFloat red, green, blue, alpha;
14443 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14444 # return nil;
14445 # }
14446 # Color* result = [Color alloc] init];
14447 # [result setRed:red];
14448 # [result setGreen:green];
14449 # [result setBlue:blue];
14450 # if (alpha <= 0.9999) {
14451 # [result setAlpha:floatWrapperWithValue(alpha)];
14452 # }
14453 # [result autorelease];
14454 # return result;
14455 # }
14456 # // ...
14457 #
14458 # Example (JavaScript):
14459 #
14460 # // ...
14461 #
14462 # var protoToCssColor = function(rgb_color) {
14463 # var redFrac = rgb_color.red || 0.0;
14464 # var greenFrac = rgb_color.green || 0.0;
14465 # var blueFrac = rgb_color.blue || 0.0;
14466 # var red = Math.floor(redFrac * 255);
14467 # var green = Math.floor(greenFrac * 255);
14468 # var blue = Math.floor(blueFrac * 255);
14469 #
14470 # if (!('alpha' in rgb_color)) {
14471 # return rgbToCssColor_(red, green, blue);
14472 # }
14473 #
14474 # var alphaFrac = rgb_color.alpha.value || 0.0;
14475 # var rgbParams = [red, green, blue].join(',');
14476 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14477 # };
14478 #
14479 # var rgbToCssColor_ = function(red, green, blue) {
14480 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14481 # var hexString = rgbNumber.toString(16);
14482 # var missingZeros = 6 - hexString.length;
14483 # var resultBuilder = ['#'];
14484 # for (var i = 0; i < missingZeros; i++) {
14485 # resultBuilder.push('0');
14486 # }
14487 # resultBuilder.push(hexString);
14488 # return resultBuilder.join('');
14489 # };
14490 #
14491 # // ...
14492 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14493 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14494 # the final pixel color is defined by the equation:
14495 #
14496 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14497 #
14498 # This means that a value of 1.0 corresponds to a solid color, whereas
14499 # a value of 0.0 corresponds to a completely transparent color. This
14500 # uses a wrapper message rather than a simple float scalar so that it is
14501 # possible to distinguish between a default value and the value being unset.
14502 # If omitted, this color object is to be rendered as a solid color
14503 # (as if the alpha value had been explicitly given with a value of 1.0).
14504 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14505 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14506 },
14507 },
14508 "bandedRangeId": 42, # The id of the banded range.
14509 },
14510 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014511 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
14512 "filterId": 42, # The ID of the filter to delete.
14513 },
14514 "mergeCells": { # Merges all cells in the range. # Merges cells together.
14515 "range": { # A range on a sheet. # The range of cells to merge.
14516 # All indexes are zero-based.
14517 # Indexes are half open, e.g the start index is inclusive
14518 # and the end index is exclusive -- [start_index, end_index).
14519 # Missing indexes indicate the range is unbounded on that side.
14520 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014521 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014522 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014523 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014524 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014525 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014526 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014527 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014528 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014529 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014530 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014531 # `Sheet1!A:B == sheet_id: 0,
14532 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014533 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014534 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014535 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014536 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014537 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014538 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014539 #
14540 # The start index must always be less than or equal to the end index.
14541 # If the start index equals the end index, then the range is empty.
14542 # Empty ranges are typically not meaningful and are usually rendered in the
14543 # UI as `#REF!`.
14544 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070014545 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014546 "sheetId": 42, # The sheet this range is on.
14547 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070014548 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014549 },
14550 "mergeType": "A String", # How the cells should be merged.
14551 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014552 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014553 "protectedRangeId": 42, # The ID of the protected range to delete.
14554 },
Thomas Coffee2f245372017-03-27 10:39:26 -070014555 "insertRange": { # Inserts cells into a range, shifting the existing cells over or down. # Inserts new cells in a sheet, shifting the existing cells.
14556 "range": { # A range on a sheet. # The range to insert new cells into.
14557 # All indexes are zero-based.
14558 # Indexes are half open, e.g the start index is inclusive
14559 # and the end index is exclusive -- [start_index, end_index).
14560 # Missing indexes indicate the range is unbounded on that side.
14561 #
14562 # For example, if `"Sheet1"` is sheet ID 0, then:
14563 #
14564 # `Sheet1!A1:A1 == sheet_id: 0,
14565 # start_row_index: 0, end_row_index: 1,
14566 # start_column_index: 0, end_column_index: 1`
14567 #
14568 # `Sheet1!A3:B4 == sheet_id: 0,
14569 # start_row_index: 2, end_row_index: 4,
14570 # start_column_index: 0, end_column_index: 2`
14571 #
14572 # `Sheet1!A:B == sheet_id: 0,
14573 # start_column_index: 0, end_column_index: 2`
14574 #
14575 # `Sheet1!A5:B == sheet_id: 0,
14576 # start_row_index: 4,
14577 # start_column_index: 0, end_column_index: 2`
14578 #
14579 # `Sheet1 == sheet_id:0`
14580 #
14581 # The start index must always be less than or equal to the end index.
14582 # If the start index equals the end index, then the range is empty.
14583 # Empty ranges are typically not meaningful and are usually rendered in the
14584 # UI as `#REF!`.
14585 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14586 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14587 "sheetId": 42, # The sheet this range is on.
14588 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14589 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014590 },
Thomas Coffee2f245372017-03-27 10:39:26 -070014591 "shiftDimension": "A String", # The dimension which will be shifted when inserting cells.
14592 # If ROWS, existing cells will be shifted down.
14593 # If COLUMNS, existing cells will be shifted right.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014594 },
14595 "deleteSheet": { # Deletes the requested sheet. # Deletes a sheet.
14596 "sheetId": 42, # The ID of the sheet to delete.
14597 },
14598 "updateBorders": { # Updates the borders of a range. # Updates the borders in a range of cells.
14599 # If a field is not set in the request, that means the border remains as-is.
14600 # For example, with two subsequent UpdateBordersRequest:
14601 #
14602 # 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
14603 # 2. range: A1:A5 `{ left: BLUE }`
14604 #
14605 # That would result in A1:A5 having a borders of
14606 # `{ top: RED, bottom: WHITE, left: BLUE }`.
14607 # If you want to clear a border, explicitly set the style to
14608 # NONE.
14609 "right": { # A border along a cell. # The border to put at the right of the range.
14610 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14611 # for simplicity of conversion to/from color representations in various
14612 # languages over compactness; for example, the fields of this representation
14613 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14614 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14615 # method in iOS; and, with just a little work, it can be easily formatted into
14616 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14617 #
14618 # Example (Java):
14619 #
14620 # import com.google.type.Color;
14621 #
14622 # // ...
14623 # public static java.awt.Color fromProto(Color protocolor) {
14624 # float alpha = protocolor.hasAlpha()
14625 # ? protocolor.getAlpha().getValue()
14626 # : 1.0;
14627 #
14628 # return new java.awt.Color(
14629 # protocolor.getRed(),
14630 # protocolor.getGreen(),
14631 # protocolor.getBlue(),
14632 # alpha);
14633 # }
14634 #
14635 # public static Color toProto(java.awt.Color color) {
14636 # float red = (float) color.getRed();
14637 # float green = (float) color.getGreen();
14638 # float blue = (float) color.getBlue();
14639 # float denominator = 255.0;
14640 # Color.Builder resultBuilder =
14641 # Color
14642 # .newBuilder()
14643 # .setRed(red / denominator)
14644 # .setGreen(green / denominator)
14645 # .setBlue(blue / denominator);
14646 # int alpha = color.getAlpha();
14647 # if (alpha != 255) {
14648 # result.setAlpha(
14649 # FloatValue
14650 # .newBuilder()
14651 # .setValue(((float) alpha) / denominator)
14652 # .build());
14653 # }
14654 # return resultBuilder.build();
14655 # }
14656 # // ...
14657 #
14658 # Example (iOS / Obj-C):
14659 #
14660 # // ...
14661 # static UIColor* fromProto(Color* protocolor) {
14662 # float red = [protocolor red];
14663 # float green = [protocolor green];
14664 # float blue = [protocolor blue];
14665 # FloatValue* alpha_wrapper = [protocolor alpha];
14666 # float alpha = 1.0;
14667 # if (alpha_wrapper != nil) {
14668 # alpha = [alpha_wrapper value];
14669 # }
14670 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14671 # }
14672 #
14673 # static Color* toProto(UIColor* color) {
14674 # CGFloat red, green, blue, alpha;
14675 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14676 # return nil;
14677 # }
14678 # Color* result = [Color alloc] init];
14679 # [result setRed:red];
14680 # [result setGreen:green];
14681 # [result setBlue:blue];
14682 # if (alpha <= 0.9999) {
14683 # [result setAlpha:floatWrapperWithValue(alpha)];
14684 # }
14685 # [result autorelease];
14686 # return result;
14687 # }
14688 # // ...
14689 #
14690 # Example (JavaScript):
14691 #
14692 # // ...
14693 #
14694 # var protoToCssColor = function(rgb_color) {
14695 # var redFrac = rgb_color.red || 0.0;
14696 # var greenFrac = rgb_color.green || 0.0;
14697 # var blueFrac = rgb_color.blue || 0.0;
14698 # var red = Math.floor(redFrac * 255);
14699 # var green = Math.floor(greenFrac * 255);
14700 # var blue = Math.floor(blueFrac * 255);
14701 #
14702 # if (!('alpha' in rgb_color)) {
14703 # return rgbToCssColor_(red, green, blue);
14704 # }
14705 #
14706 # var alphaFrac = rgb_color.alpha.value || 0.0;
14707 # var rgbParams = [red, green, blue].join(',');
14708 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14709 # };
14710 #
14711 # var rgbToCssColor_ = function(red, green, blue) {
14712 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14713 # var hexString = rgbNumber.toString(16);
14714 # var missingZeros = 6 - hexString.length;
14715 # var resultBuilder = ['#'];
14716 # for (var i = 0; i < missingZeros; i++) {
14717 # resultBuilder.push('0');
14718 # }
14719 # resultBuilder.push(hexString);
14720 # return resultBuilder.join('');
14721 # };
14722 #
14723 # // ...
14724 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14725 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14726 # the final pixel color is defined by the equation:
14727 #
14728 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14729 #
14730 # This means that a value of 1.0 corresponds to a solid color, whereas
14731 # a value of 0.0 corresponds to a completely transparent color. This
14732 # uses a wrapper message rather than a simple float scalar so that it is
14733 # possible to distinguish between a default value and the value being unset.
14734 # If omitted, this color object is to be rendered as a solid color
14735 # (as if the alpha value had been explicitly given with a value of 1.0).
14736 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14737 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14738 },
14739 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014740 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014741 "style": "A String", # The style of the border.
14742 },
14743 "bottom": { # A border along a cell. # The border to put at the bottom of the range.
14744 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14745 # for simplicity of conversion to/from color representations in various
14746 # languages over compactness; for example, the fields of this representation
14747 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14748 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14749 # method in iOS; and, with just a little work, it can be easily formatted into
14750 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14751 #
14752 # Example (Java):
14753 #
14754 # import com.google.type.Color;
14755 #
14756 # // ...
14757 # public static java.awt.Color fromProto(Color protocolor) {
14758 # float alpha = protocolor.hasAlpha()
14759 # ? protocolor.getAlpha().getValue()
14760 # : 1.0;
14761 #
14762 # return new java.awt.Color(
14763 # protocolor.getRed(),
14764 # protocolor.getGreen(),
14765 # protocolor.getBlue(),
14766 # alpha);
14767 # }
14768 #
14769 # public static Color toProto(java.awt.Color color) {
14770 # float red = (float) color.getRed();
14771 # float green = (float) color.getGreen();
14772 # float blue = (float) color.getBlue();
14773 # float denominator = 255.0;
14774 # Color.Builder resultBuilder =
14775 # Color
14776 # .newBuilder()
14777 # .setRed(red / denominator)
14778 # .setGreen(green / denominator)
14779 # .setBlue(blue / denominator);
14780 # int alpha = color.getAlpha();
14781 # if (alpha != 255) {
14782 # result.setAlpha(
14783 # FloatValue
14784 # .newBuilder()
14785 # .setValue(((float) alpha) / denominator)
14786 # .build());
14787 # }
14788 # return resultBuilder.build();
14789 # }
14790 # // ...
14791 #
14792 # Example (iOS / Obj-C):
14793 #
14794 # // ...
14795 # static UIColor* fromProto(Color* protocolor) {
14796 # float red = [protocolor red];
14797 # float green = [protocolor green];
14798 # float blue = [protocolor blue];
14799 # FloatValue* alpha_wrapper = [protocolor alpha];
14800 # float alpha = 1.0;
14801 # if (alpha_wrapper != nil) {
14802 # alpha = [alpha_wrapper value];
14803 # }
14804 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14805 # }
14806 #
14807 # static Color* toProto(UIColor* color) {
14808 # CGFloat red, green, blue, alpha;
14809 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14810 # return nil;
14811 # }
14812 # Color* result = [Color alloc] init];
14813 # [result setRed:red];
14814 # [result setGreen:green];
14815 # [result setBlue:blue];
14816 # if (alpha <= 0.9999) {
14817 # [result setAlpha:floatWrapperWithValue(alpha)];
14818 # }
14819 # [result autorelease];
14820 # return result;
14821 # }
14822 # // ...
14823 #
14824 # Example (JavaScript):
14825 #
14826 # // ...
14827 #
14828 # var protoToCssColor = function(rgb_color) {
14829 # var redFrac = rgb_color.red || 0.0;
14830 # var greenFrac = rgb_color.green || 0.0;
14831 # var blueFrac = rgb_color.blue || 0.0;
14832 # var red = Math.floor(redFrac * 255);
14833 # var green = Math.floor(greenFrac * 255);
14834 # var blue = Math.floor(blueFrac * 255);
14835 #
14836 # if (!('alpha' in rgb_color)) {
14837 # return rgbToCssColor_(red, green, blue);
14838 # }
14839 #
14840 # var alphaFrac = rgb_color.alpha.value || 0.0;
14841 # var rgbParams = [red, green, blue].join(',');
14842 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14843 # };
14844 #
14845 # var rgbToCssColor_ = function(red, green, blue) {
14846 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14847 # var hexString = rgbNumber.toString(16);
14848 # var missingZeros = 6 - hexString.length;
14849 # var resultBuilder = ['#'];
14850 # for (var i = 0; i < missingZeros; i++) {
14851 # resultBuilder.push('0');
14852 # }
14853 # resultBuilder.push(hexString);
14854 # return resultBuilder.join('');
14855 # };
14856 #
14857 # // ...
14858 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14859 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14860 # the final pixel color is defined by the equation:
14861 #
14862 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14863 #
14864 # This means that a value of 1.0 corresponds to a solid color, whereas
14865 # a value of 0.0 corresponds to a completely transparent color. This
14866 # uses a wrapper message rather than a simple float scalar so that it is
14867 # possible to distinguish between a default value and the value being unset.
14868 # If omitted, this color object is to be rendered as a solid color
14869 # (as if the alpha value had been explicitly given with a value of 1.0).
14870 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14871 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14872 },
14873 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014874 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014875 "style": "A String", # The style of the border.
14876 },
14877 "top": { # A border along a cell. # The border to put at the top of the range.
14878 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14879 # for simplicity of conversion to/from color representations in various
14880 # languages over compactness; for example, the fields of this representation
14881 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14882 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14883 # method in iOS; and, with just a little work, it can be easily formatted into
14884 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14885 #
14886 # Example (Java):
14887 #
14888 # import com.google.type.Color;
14889 #
14890 # // ...
14891 # public static java.awt.Color fromProto(Color protocolor) {
14892 # float alpha = protocolor.hasAlpha()
14893 # ? protocolor.getAlpha().getValue()
14894 # : 1.0;
14895 #
14896 # return new java.awt.Color(
14897 # protocolor.getRed(),
14898 # protocolor.getGreen(),
14899 # protocolor.getBlue(),
14900 # alpha);
14901 # }
14902 #
14903 # public static Color toProto(java.awt.Color color) {
14904 # float red = (float) color.getRed();
14905 # float green = (float) color.getGreen();
14906 # float blue = (float) color.getBlue();
14907 # float denominator = 255.0;
14908 # Color.Builder resultBuilder =
14909 # Color
14910 # .newBuilder()
14911 # .setRed(red / denominator)
14912 # .setGreen(green / denominator)
14913 # .setBlue(blue / denominator);
14914 # int alpha = color.getAlpha();
14915 # if (alpha != 255) {
14916 # result.setAlpha(
14917 # FloatValue
14918 # .newBuilder()
14919 # .setValue(((float) alpha) / denominator)
14920 # .build());
14921 # }
14922 # return resultBuilder.build();
14923 # }
14924 # // ...
14925 #
14926 # Example (iOS / Obj-C):
14927 #
14928 # // ...
14929 # static UIColor* fromProto(Color* protocolor) {
14930 # float red = [protocolor red];
14931 # float green = [protocolor green];
14932 # float blue = [protocolor blue];
14933 # FloatValue* alpha_wrapper = [protocolor alpha];
14934 # float alpha = 1.0;
14935 # if (alpha_wrapper != nil) {
14936 # alpha = [alpha_wrapper value];
14937 # }
14938 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14939 # }
14940 #
14941 # static Color* toProto(UIColor* color) {
14942 # CGFloat red, green, blue, alpha;
14943 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14944 # return nil;
14945 # }
14946 # Color* result = [Color alloc] init];
14947 # [result setRed:red];
14948 # [result setGreen:green];
14949 # [result setBlue:blue];
14950 # if (alpha <= 0.9999) {
14951 # [result setAlpha:floatWrapperWithValue(alpha)];
14952 # }
14953 # [result autorelease];
14954 # return result;
14955 # }
14956 # // ...
14957 #
14958 # Example (JavaScript):
14959 #
14960 # // ...
14961 #
14962 # var protoToCssColor = function(rgb_color) {
14963 # var redFrac = rgb_color.red || 0.0;
14964 # var greenFrac = rgb_color.green || 0.0;
14965 # var blueFrac = rgb_color.blue || 0.0;
14966 # var red = Math.floor(redFrac * 255);
14967 # var green = Math.floor(greenFrac * 255);
14968 # var blue = Math.floor(blueFrac * 255);
14969 #
14970 # if (!('alpha' in rgb_color)) {
14971 # return rgbToCssColor_(red, green, blue);
14972 # }
14973 #
14974 # var alphaFrac = rgb_color.alpha.value || 0.0;
14975 # var rgbParams = [red, green, blue].join(',');
14976 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14977 # };
14978 #
14979 # var rgbToCssColor_ = function(red, green, blue) {
14980 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14981 # var hexString = rgbNumber.toString(16);
14982 # var missingZeros = 6 - hexString.length;
14983 # var resultBuilder = ['#'];
14984 # for (var i = 0; i < missingZeros; i++) {
14985 # resultBuilder.push('0');
14986 # }
14987 # resultBuilder.push(hexString);
14988 # return resultBuilder.join('');
14989 # };
14990 #
14991 # // ...
14992 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14993 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14994 # the final pixel color is defined by the equation:
14995 #
14996 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14997 #
14998 # This means that a value of 1.0 corresponds to a solid color, whereas
14999 # a value of 0.0 corresponds to a completely transparent color. This
15000 # uses a wrapper message rather than a simple float scalar so that it is
15001 # possible to distinguish between a default value and the value being unset.
15002 # If omitted, this color object is to be rendered as a solid color
15003 # (as if the alpha value had been explicitly given with a value of 1.0).
15004 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15005 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15006 },
15007 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015008 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015009 "style": "A String", # The style of the border.
15010 },
15011 "innerHorizontal": { # A border along a cell. # The horizontal border to put within the range.
15012 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15013 # for simplicity of conversion to/from color representations in various
15014 # languages over compactness; for example, the fields of this representation
15015 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15016 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15017 # method in iOS; and, with just a little work, it can be easily formatted into
15018 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15019 #
15020 # Example (Java):
15021 #
15022 # import com.google.type.Color;
15023 #
15024 # // ...
15025 # public static java.awt.Color fromProto(Color protocolor) {
15026 # float alpha = protocolor.hasAlpha()
15027 # ? protocolor.getAlpha().getValue()
15028 # : 1.0;
15029 #
15030 # return new java.awt.Color(
15031 # protocolor.getRed(),
15032 # protocolor.getGreen(),
15033 # protocolor.getBlue(),
15034 # alpha);
15035 # }
15036 #
15037 # public static Color toProto(java.awt.Color color) {
15038 # float red = (float) color.getRed();
15039 # float green = (float) color.getGreen();
15040 # float blue = (float) color.getBlue();
15041 # float denominator = 255.0;
15042 # Color.Builder resultBuilder =
15043 # Color
15044 # .newBuilder()
15045 # .setRed(red / denominator)
15046 # .setGreen(green / denominator)
15047 # .setBlue(blue / denominator);
15048 # int alpha = color.getAlpha();
15049 # if (alpha != 255) {
15050 # result.setAlpha(
15051 # FloatValue
15052 # .newBuilder()
15053 # .setValue(((float) alpha) / denominator)
15054 # .build());
15055 # }
15056 # return resultBuilder.build();
15057 # }
15058 # // ...
15059 #
15060 # Example (iOS / Obj-C):
15061 #
15062 # // ...
15063 # static UIColor* fromProto(Color* protocolor) {
15064 # float red = [protocolor red];
15065 # float green = [protocolor green];
15066 # float blue = [protocolor blue];
15067 # FloatValue* alpha_wrapper = [protocolor alpha];
15068 # float alpha = 1.0;
15069 # if (alpha_wrapper != nil) {
15070 # alpha = [alpha_wrapper value];
15071 # }
15072 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15073 # }
15074 #
15075 # static Color* toProto(UIColor* color) {
15076 # CGFloat red, green, blue, alpha;
15077 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15078 # return nil;
15079 # }
15080 # Color* result = [Color alloc] init];
15081 # [result setRed:red];
15082 # [result setGreen:green];
15083 # [result setBlue:blue];
15084 # if (alpha <= 0.9999) {
15085 # [result setAlpha:floatWrapperWithValue(alpha)];
15086 # }
15087 # [result autorelease];
15088 # return result;
15089 # }
15090 # // ...
15091 #
15092 # Example (JavaScript):
15093 #
15094 # // ...
15095 #
15096 # var protoToCssColor = function(rgb_color) {
15097 # var redFrac = rgb_color.red || 0.0;
15098 # var greenFrac = rgb_color.green || 0.0;
15099 # var blueFrac = rgb_color.blue || 0.0;
15100 # var red = Math.floor(redFrac * 255);
15101 # var green = Math.floor(greenFrac * 255);
15102 # var blue = Math.floor(blueFrac * 255);
15103 #
15104 # if (!('alpha' in rgb_color)) {
15105 # return rgbToCssColor_(red, green, blue);
15106 # }
15107 #
15108 # var alphaFrac = rgb_color.alpha.value || 0.0;
15109 # var rgbParams = [red, green, blue].join(',');
15110 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15111 # };
15112 #
15113 # var rgbToCssColor_ = function(red, green, blue) {
15114 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15115 # var hexString = rgbNumber.toString(16);
15116 # var missingZeros = 6 - hexString.length;
15117 # var resultBuilder = ['#'];
15118 # for (var i = 0; i < missingZeros; i++) {
15119 # resultBuilder.push('0');
15120 # }
15121 # resultBuilder.push(hexString);
15122 # return resultBuilder.join('');
15123 # };
15124 #
15125 # // ...
15126 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15127 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15128 # the final pixel color is defined by the equation:
15129 #
15130 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15131 #
15132 # This means that a value of 1.0 corresponds to a solid color, whereas
15133 # a value of 0.0 corresponds to a completely transparent color. This
15134 # uses a wrapper message rather than a simple float scalar so that it is
15135 # possible to distinguish between a default value and the value being unset.
15136 # If omitted, this color object is to be rendered as a solid color
15137 # (as if the alpha value had been explicitly given with a value of 1.0).
15138 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15139 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15140 },
15141 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015142 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015143 "style": "A String", # The style of the border.
15144 },
15145 "range": { # A range on a sheet. # The range whose borders should be updated.
15146 # All indexes are zero-based.
15147 # Indexes are half open, e.g the start index is inclusive
15148 # and the end index is exclusive -- [start_index, end_index).
15149 # Missing indexes indicate the range is unbounded on that side.
15150 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015151 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015152 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015153 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015154 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015155 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015156 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015157 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015158 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015159 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015160 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015161 # `Sheet1!A:B == sheet_id: 0,
15162 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015163 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015164 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015165 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015166 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015167 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015168 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015169 #
15170 # The start index must always be less than or equal to the end index.
15171 # If the start index equals the end index, then the range is empty.
15172 # Empty ranges are typically not meaningful and are usually rendered in the
15173 # UI as `#REF!`.
15174 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015175 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015176 "sheetId": 42, # The sheet this range is on.
15177 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015178 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015179 },
15180 "innerVertical": { # A border along a cell. # The vertical border to put within the range.
15181 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15182 # for simplicity of conversion to/from color representations in various
15183 # languages over compactness; for example, the fields of this representation
15184 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15185 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15186 # method in iOS; and, with just a little work, it can be easily formatted into
15187 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15188 #
15189 # Example (Java):
15190 #
15191 # import com.google.type.Color;
15192 #
15193 # // ...
15194 # public static java.awt.Color fromProto(Color protocolor) {
15195 # float alpha = protocolor.hasAlpha()
15196 # ? protocolor.getAlpha().getValue()
15197 # : 1.0;
15198 #
15199 # return new java.awt.Color(
15200 # protocolor.getRed(),
15201 # protocolor.getGreen(),
15202 # protocolor.getBlue(),
15203 # alpha);
15204 # }
15205 #
15206 # public static Color toProto(java.awt.Color color) {
15207 # float red = (float) color.getRed();
15208 # float green = (float) color.getGreen();
15209 # float blue = (float) color.getBlue();
15210 # float denominator = 255.0;
15211 # Color.Builder resultBuilder =
15212 # Color
15213 # .newBuilder()
15214 # .setRed(red / denominator)
15215 # .setGreen(green / denominator)
15216 # .setBlue(blue / denominator);
15217 # int alpha = color.getAlpha();
15218 # if (alpha != 255) {
15219 # result.setAlpha(
15220 # FloatValue
15221 # .newBuilder()
15222 # .setValue(((float) alpha) / denominator)
15223 # .build());
15224 # }
15225 # return resultBuilder.build();
15226 # }
15227 # // ...
15228 #
15229 # Example (iOS / Obj-C):
15230 #
15231 # // ...
15232 # static UIColor* fromProto(Color* protocolor) {
15233 # float red = [protocolor red];
15234 # float green = [protocolor green];
15235 # float blue = [protocolor blue];
15236 # FloatValue* alpha_wrapper = [protocolor alpha];
15237 # float alpha = 1.0;
15238 # if (alpha_wrapper != nil) {
15239 # alpha = [alpha_wrapper value];
15240 # }
15241 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15242 # }
15243 #
15244 # static Color* toProto(UIColor* color) {
15245 # CGFloat red, green, blue, alpha;
15246 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15247 # return nil;
15248 # }
15249 # Color* result = [Color alloc] init];
15250 # [result setRed:red];
15251 # [result setGreen:green];
15252 # [result setBlue:blue];
15253 # if (alpha <= 0.9999) {
15254 # [result setAlpha:floatWrapperWithValue(alpha)];
15255 # }
15256 # [result autorelease];
15257 # return result;
15258 # }
15259 # // ...
15260 #
15261 # Example (JavaScript):
15262 #
15263 # // ...
15264 #
15265 # var protoToCssColor = function(rgb_color) {
15266 # var redFrac = rgb_color.red || 0.0;
15267 # var greenFrac = rgb_color.green || 0.0;
15268 # var blueFrac = rgb_color.blue || 0.0;
15269 # var red = Math.floor(redFrac * 255);
15270 # var green = Math.floor(greenFrac * 255);
15271 # var blue = Math.floor(blueFrac * 255);
15272 #
15273 # if (!('alpha' in rgb_color)) {
15274 # return rgbToCssColor_(red, green, blue);
15275 # }
15276 #
15277 # var alphaFrac = rgb_color.alpha.value || 0.0;
15278 # var rgbParams = [red, green, blue].join(',');
15279 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15280 # };
15281 #
15282 # var rgbToCssColor_ = function(red, green, blue) {
15283 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15284 # var hexString = rgbNumber.toString(16);
15285 # var missingZeros = 6 - hexString.length;
15286 # var resultBuilder = ['#'];
15287 # for (var i = 0; i < missingZeros; i++) {
15288 # resultBuilder.push('0');
15289 # }
15290 # resultBuilder.push(hexString);
15291 # return resultBuilder.join('');
15292 # };
15293 #
15294 # // ...
15295 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15296 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15297 # the final pixel color is defined by the equation:
15298 #
15299 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15300 #
15301 # This means that a value of 1.0 corresponds to a solid color, whereas
15302 # a value of 0.0 corresponds to a completely transparent color. This
15303 # uses a wrapper message rather than a simple float scalar so that it is
15304 # possible to distinguish between a default value and the value being unset.
15305 # If omitted, this color object is to be rendered as a solid color
15306 # (as if the alpha value had been explicitly given with a value of 1.0).
15307 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15308 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15309 },
15310 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015311 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015312 "style": "A String", # The style of the border.
15313 },
15314 "left": { # A border along a cell. # The border to put at the left of the range.
15315 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15316 # for simplicity of conversion to/from color representations in various
15317 # languages over compactness; for example, the fields of this representation
15318 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15319 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15320 # method in iOS; and, with just a little work, it can be easily formatted into
15321 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15322 #
15323 # Example (Java):
15324 #
15325 # import com.google.type.Color;
15326 #
15327 # // ...
15328 # public static java.awt.Color fromProto(Color protocolor) {
15329 # float alpha = protocolor.hasAlpha()
15330 # ? protocolor.getAlpha().getValue()
15331 # : 1.0;
15332 #
15333 # return new java.awt.Color(
15334 # protocolor.getRed(),
15335 # protocolor.getGreen(),
15336 # protocolor.getBlue(),
15337 # alpha);
15338 # }
15339 #
15340 # public static Color toProto(java.awt.Color color) {
15341 # float red = (float) color.getRed();
15342 # float green = (float) color.getGreen();
15343 # float blue = (float) color.getBlue();
15344 # float denominator = 255.0;
15345 # Color.Builder resultBuilder =
15346 # Color
15347 # .newBuilder()
15348 # .setRed(red / denominator)
15349 # .setGreen(green / denominator)
15350 # .setBlue(blue / denominator);
15351 # int alpha = color.getAlpha();
15352 # if (alpha != 255) {
15353 # result.setAlpha(
15354 # FloatValue
15355 # .newBuilder()
15356 # .setValue(((float) alpha) / denominator)
15357 # .build());
15358 # }
15359 # return resultBuilder.build();
15360 # }
15361 # // ...
15362 #
15363 # Example (iOS / Obj-C):
15364 #
15365 # // ...
15366 # static UIColor* fromProto(Color* protocolor) {
15367 # float red = [protocolor red];
15368 # float green = [protocolor green];
15369 # float blue = [protocolor blue];
15370 # FloatValue* alpha_wrapper = [protocolor alpha];
15371 # float alpha = 1.0;
15372 # if (alpha_wrapper != nil) {
15373 # alpha = [alpha_wrapper value];
15374 # }
15375 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15376 # }
15377 #
15378 # static Color* toProto(UIColor* color) {
15379 # CGFloat red, green, blue, alpha;
15380 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15381 # return nil;
15382 # }
15383 # Color* result = [Color alloc] init];
15384 # [result setRed:red];
15385 # [result setGreen:green];
15386 # [result setBlue:blue];
15387 # if (alpha <= 0.9999) {
15388 # [result setAlpha:floatWrapperWithValue(alpha)];
15389 # }
15390 # [result autorelease];
15391 # return result;
15392 # }
15393 # // ...
15394 #
15395 # Example (JavaScript):
15396 #
15397 # // ...
15398 #
15399 # var protoToCssColor = function(rgb_color) {
15400 # var redFrac = rgb_color.red || 0.0;
15401 # var greenFrac = rgb_color.green || 0.0;
15402 # var blueFrac = rgb_color.blue || 0.0;
15403 # var red = Math.floor(redFrac * 255);
15404 # var green = Math.floor(greenFrac * 255);
15405 # var blue = Math.floor(blueFrac * 255);
15406 #
15407 # if (!('alpha' in rgb_color)) {
15408 # return rgbToCssColor_(red, green, blue);
15409 # }
15410 #
15411 # var alphaFrac = rgb_color.alpha.value || 0.0;
15412 # var rgbParams = [red, green, blue].join(',');
15413 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15414 # };
15415 #
15416 # var rgbToCssColor_ = function(red, green, blue) {
15417 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15418 # var hexString = rgbNumber.toString(16);
15419 # var missingZeros = 6 - hexString.length;
15420 # var resultBuilder = ['#'];
15421 # for (var i = 0; i < missingZeros; i++) {
15422 # resultBuilder.push('0');
15423 # }
15424 # resultBuilder.push(hexString);
15425 # return resultBuilder.join('');
15426 # };
15427 #
15428 # // ...
15429 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15430 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15431 # the final pixel color is defined by the equation:
15432 #
15433 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15434 #
15435 # This means that a value of 1.0 corresponds to a solid color, whereas
15436 # a value of 0.0 corresponds to a completely transparent color. This
15437 # uses a wrapper message rather than a simple float scalar so that it is
15438 # possible to distinguish between a default value and the value being unset.
15439 # If omitted, this color object is to be rendered as a solid color
15440 # (as if the alpha value had been explicitly given with a value of 1.0).
15441 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15442 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15443 },
15444 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015445 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015446 "style": "A String", # The style of the border.
15447 },
15448 },
15449 "cutPaste": { # Moves data from the source to the destination. # Cuts data from one area and pastes it to another.
15450 "pasteType": "A String", # What kind of data to paste. All the source data will be cut, regardless
15451 # of what is pasted.
15452 "source": { # A range on a sheet. # The source data to cut.
15453 # All indexes are zero-based.
15454 # Indexes are half open, e.g the start index is inclusive
15455 # and the end index is exclusive -- [start_index, end_index).
15456 # Missing indexes indicate the range is unbounded on that side.
15457 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015458 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015459 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015460 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015461 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015462 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015463 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015464 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015465 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015466 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015468 # `Sheet1!A:B == sheet_id: 0,
15469 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015471 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015472 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015473 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015474 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015475 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015476 #
15477 # The start index must always be less than or equal to the end index.
15478 # If the start index equals the end index, then the range is empty.
15479 # Empty ranges are typically not meaningful and are usually rendered in the
15480 # UI as `#REF!`.
15481 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015482 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015483 "sheetId": 42, # The sheet this range is on.
15484 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015485 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015486 },
15487 "destination": { # A coordinate in a sheet. # The top-left coordinate where the data should be pasted.
15488 # All indexes are zero-based.
15489 "rowIndex": 42, # The row index of the coordinate.
15490 "columnIndex": 42, # The column index of the coordinate.
15491 "sheetId": 42, # The sheet this coordinate is on.
15492 },
15493 },
15494 "copyPaste": { # Copies data from the source to the destination. # Copies data from one area and pastes it to another.
15495 "pasteType": "A String", # What kind of data to paste.
15496 "source": { # A range on a sheet. # The source range to copy.
15497 # All indexes are zero-based.
15498 # Indexes are half open, e.g the start index is inclusive
15499 # and the end index is exclusive -- [start_index, end_index).
15500 # Missing indexes indicate the range is unbounded on that side.
15501 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015502 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015503 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015504 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015505 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015506 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015507 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015508 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015509 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015510 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015511 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015512 # `Sheet1!A:B == sheet_id: 0,
15513 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015514 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015515 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015516 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015517 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015518 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015519 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015520 #
15521 # The start index must always be less than or equal to the end index.
15522 # If the start index equals the end index, then the range is empty.
15523 # Empty ranges are typically not meaningful and are usually rendered in the
15524 # UI as `#REF!`.
15525 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015526 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015527 "sheetId": 42, # The sheet this range is on.
15528 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015529 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015530 },
15531 "destination": { # A range on a sheet. # The location to paste to. If the range covers a span that's
15532 # a multiple of the source's height or width, then the
15533 # data will be repeated to fill in the destination range.
15534 # If the range is smaller than the source range, the entire
15535 # source data will still be copied (beyond the end of the destination range).
15536 # All indexes are zero-based.
15537 # Indexes are half open, e.g the start index is inclusive
15538 # and the end index is exclusive -- [start_index, end_index).
15539 # Missing indexes indicate the range is unbounded on that side.
15540 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015541 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015542 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015543 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015544 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015545 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015546 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015547 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015548 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015549 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015550 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015551 # `Sheet1!A:B == sheet_id: 0,
15552 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015553 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015554 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015555 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015556 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015557 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015558 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015559 #
15560 # The start index must always be less than or equal to the end index.
15561 # If the start index equals the end index, then the range is empty.
15562 # Empty ranges are typically not meaningful and are usually rendered in the
15563 # UI as `#REF!`.
15564 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015565 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015566 "sheetId": 42, # The sheet this range is on.
15567 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015568 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015569 },
15570 "pasteOrientation": "A String", # How that data should be oriented when pasting.
15571 },
15572 "addSheet": { # Adds a new sheet. # Adds a sheet.
15573 # When a sheet is added at a given index,
15574 # all subsequent sheets' indexes are incremented.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015575 # To add an object sheet, use AddChartRequest instead and specify
15576 # EmbeddedObjectPosition.sheetId or
15577 # EmbeddedObjectPosition.newSheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015578 "properties": { # Properties of a sheet. # The properties the new sheet should have.
15579 # All properties are optional.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015580 # The sheetId field is optional; if one is not
15581 # set, an id will be randomly generated. (It is an error to specify the ID
15582 # of a sheet that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015583 "sheetType": "A String", # The type of sheet. Defaults to GRID.
15584 # This field cannot be changed once set.
15585 "index": 42, # The index of the sheet within the spreadsheet.
15586 # When adding or updating sheet properties, if this field
15587 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015588 # of the sheet list. When updating sheet indices or inserting
15589 # sheets, movement is considered in "before the move" indexes.
15590 # For example, if there were 3 sheets (S1, S2, S3) in order to
15591 # move S1 ahead of S2 the index would have to be set to 2. A sheet
15592 # index update request will be ignored if the requested index is
15593 # identical to the sheets current index or if the requested new
15594 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015595 "title": "A String", # The name of the sheet.
15596 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
15597 # (If the sheet is an object sheet, containing a chart or image, then
15598 # this field will be absent.)
15599 # When writing it is an error to set any grid properties on non-grid sheets.
15600 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070015601 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015602 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
15603 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070015604 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015605 },
15606 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
15607 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
15608 # for simplicity of conversion to/from color representations in various
15609 # languages over compactness; for example, the fields of this representation
15610 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15611 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15612 # method in iOS; and, with just a little work, it can be easily formatted into
15613 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15614 #
15615 # Example (Java):
15616 #
15617 # import com.google.type.Color;
15618 #
15619 # // ...
15620 # public static java.awt.Color fromProto(Color protocolor) {
15621 # float alpha = protocolor.hasAlpha()
15622 # ? protocolor.getAlpha().getValue()
15623 # : 1.0;
15624 #
15625 # return new java.awt.Color(
15626 # protocolor.getRed(),
15627 # protocolor.getGreen(),
15628 # protocolor.getBlue(),
15629 # alpha);
15630 # }
15631 #
15632 # public static Color toProto(java.awt.Color color) {
15633 # float red = (float) color.getRed();
15634 # float green = (float) color.getGreen();
15635 # float blue = (float) color.getBlue();
15636 # float denominator = 255.0;
15637 # Color.Builder resultBuilder =
15638 # Color
15639 # .newBuilder()
15640 # .setRed(red / denominator)
15641 # .setGreen(green / denominator)
15642 # .setBlue(blue / denominator);
15643 # int alpha = color.getAlpha();
15644 # if (alpha != 255) {
15645 # result.setAlpha(
15646 # FloatValue
15647 # .newBuilder()
15648 # .setValue(((float) alpha) / denominator)
15649 # .build());
15650 # }
15651 # return resultBuilder.build();
15652 # }
15653 # // ...
15654 #
15655 # Example (iOS / Obj-C):
15656 #
15657 # // ...
15658 # static UIColor* fromProto(Color* protocolor) {
15659 # float red = [protocolor red];
15660 # float green = [protocolor green];
15661 # float blue = [protocolor blue];
15662 # FloatValue* alpha_wrapper = [protocolor alpha];
15663 # float alpha = 1.0;
15664 # if (alpha_wrapper != nil) {
15665 # alpha = [alpha_wrapper value];
15666 # }
15667 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15668 # }
15669 #
15670 # static Color* toProto(UIColor* color) {
15671 # CGFloat red, green, blue, alpha;
15672 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15673 # return nil;
15674 # }
15675 # Color* result = [Color alloc] init];
15676 # [result setRed:red];
15677 # [result setGreen:green];
15678 # [result setBlue:blue];
15679 # if (alpha <= 0.9999) {
15680 # [result setAlpha:floatWrapperWithValue(alpha)];
15681 # }
15682 # [result autorelease];
15683 # return result;
15684 # }
15685 # // ...
15686 #
15687 # Example (JavaScript):
15688 #
15689 # // ...
15690 #
15691 # var protoToCssColor = function(rgb_color) {
15692 # var redFrac = rgb_color.red || 0.0;
15693 # var greenFrac = rgb_color.green || 0.0;
15694 # var blueFrac = rgb_color.blue || 0.0;
15695 # var red = Math.floor(redFrac * 255);
15696 # var green = Math.floor(greenFrac * 255);
15697 # var blue = Math.floor(blueFrac * 255);
15698 #
15699 # if (!('alpha' in rgb_color)) {
15700 # return rgbToCssColor_(red, green, blue);
15701 # }
15702 #
15703 # var alphaFrac = rgb_color.alpha.value || 0.0;
15704 # var rgbParams = [red, green, blue].join(',');
15705 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15706 # };
15707 #
15708 # var rgbToCssColor_ = function(red, green, blue) {
15709 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15710 # var hexString = rgbNumber.toString(16);
15711 # var missingZeros = 6 - hexString.length;
15712 # var resultBuilder = ['#'];
15713 # for (var i = 0; i < missingZeros; i++) {
15714 # resultBuilder.push('0');
15715 # }
15716 # resultBuilder.push(hexString);
15717 # return resultBuilder.join('');
15718 # };
15719 #
15720 # // ...
15721 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15722 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15723 # the final pixel color is defined by the equation:
15724 #
15725 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15726 #
15727 # This means that a value of 1.0 corresponds to a solid color, whereas
15728 # a value of 0.0 corresponds to a completely transparent color. This
15729 # uses a wrapper message rather than a simple float scalar so that it is
15730 # possible to distinguish between a default value and the value being unset.
15731 # If omitted, this color object is to be rendered as a solid color
15732 # (as if the alpha value had been explicitly given with a value of 1.0).
15733 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15734 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15735 },
15736 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
15737 "sheetId": 42, # The ID of the sheet. Must be non-negative.
15738 # This field cannot be changed once set.
15739 },
15740 },
15741 "deleteNamedRange": { # Removes the named range with the given ID from the spreadsheet. # Deletes a named range.
15742 "namedRangeId": "A String", # The ID of the named range to delete.
15743 },
15744 "updateNamedRange": { # Updates properties of the named range with the specified # Updates a named range.
15745 # namedRangeId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015746 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15747 # The root `namedRange` is implied and should not be specified.
15748 # A single `"*"` can be used as short-hand for listing every field.
15749 "namedRange": { # A named range. # The named range to update with the new properties.
15750 "namedRangeId": "A String", # The ID of the named range.
15751 "range": { # A range on a sheet. # The range this represents.
15752 # All indexes are zero-based.
15753 # Indexes are half open, e.g the start index is inclusive
15754 # and the end index is exclusive -- [start_index, end_index).
15755 # Missing indexes indicate the range is unbounded on that side.
15756 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015757 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015758 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015759 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015760 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015761 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015762 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015763 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015764 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015765 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015766 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015767 # `Sheet1!A:B == sheet_id: 0,
15768 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015769 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015770 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015771 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015772 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015773 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015774 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015775 #
15776 # The start index must always be less than or equal to the end index.
15777 # If the start index equals the end index, then the range is empty.
15778 # Empty ranges are typically not meaningful and are usually rendered in the
15779 # UI as `#REF!`.
15780 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015781 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015782 "sheetId": 42, # The sheet this range is on.
15783 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015784 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015785 },
15786 "name": "A String", # The name of the named range.
15787 },
15788 },
15789 "insertDimension": { # Inserts rows or columns in a sheet at a particular index. # Inserts new rows or columns in a sheet.
15790 "inheritFromBefore": True or False, # Whether dimension properties should be extended from the dimensions
15791 # before or after the newly inserted dimensions.
15792 # True to inherit from the dimensions before (in which case the start
15793 # index must be greater than 0), and false to inherit from the dimensions
15794 # after.
15795 #
15796 # For example, if row index 0 has red background and row index 1
15797 # has a green background, then inserting 2 rows at index 1 can inherit
15798 # either the green or red background. If `inheritFromBefore` is true,
15799 # the two new rows will be red (because the row before the insertion point
15800 # was red), whereas if `inheritFromBefore` is false, the two new rows will
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015801 # be green (because the row after the insertion point was green).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015802 "range": { # A range along a single dimension on a sheet. # The dimensions to insert. Both the start and end indexes must be bounded.
15803 # All indexes are zero-based.
15804 # Indexes are half open: the start index is inclusive
15805 # and the end index is exclusive.
15806 # Missing indexes indicate the range is unbounded on that side.
15807 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
15808 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
15809 "sheetId": 42, # The sheet this span is on.
15810 "dimension": "A String", # The dimension of the span.
15811 },
15812 },
15813 "updateFilterView": { # Updates properties of the filter view. # Updates the properties of a filter view.
15814 "filter": { # A filter view. # The new properties of the filter view.
15815 "title": "A String", # The name of the filter view.
15816 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
15817 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015818 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015819 # may be set.
15820 "filterViewId": 42, # The ID of the filter view.
15821 "range": { # A range on a sheet. # The range this filter view covers.
15822 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015823 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015824 # may be set.
15825 # All indexes are zero-based.
15826 # Indexes are half open, e.g the start index is inclusive
15827 # and the end index is exclusive -- [start_index, end_index).
15828 # Missing indexes indicate the range is unbounded on that side.
15829 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015830 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015831 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015832 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015833 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015834 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015835 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015836 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015837 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015838 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015839 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015840 # `Sheet1!A:B == sheet_id: 0,
15841 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015842 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015843 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015844 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015845 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015846 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015847 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015848 #
15849 # The start index must always be less than or equal to the end index.
15850 # If the start index equals the end index, then the range is empty.
15851 # Empty ranges are typically not meaningful and are usually rendered in the
15852 # UI as `#REF!`.
15853 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015854 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015855 "sheetId": 42, # The sheet this range is on.
15856 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015857 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015858 },
15859 "sortSpecs": [ # The sort order per column. Later specifications are used when values
15860 # are equal in the earlier specifications.
15861 { # A sort order associated with a specific column or row.
15862 "sortOrder": "A String", # The order data should be sorted.
15863 "dimensionIndex": 42, # The dimension the sort should be applied to.
15864 },
15865 ],
15866 "criteria": { # The criteria for showing/hiding values per column.
15867 # The map's key is the column index, and the value is the criteria for
15868 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015869 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015870 "hiddenValues": [ # Values that should be hidden.
15871 "A String",
15872 ],
15873 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
15874 # (This does not override hiddenValues -- if a value is listed there,
15875 # it will still be hidden.)
15876 # BooleanConditions are used by conditional formatting,
15877 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015878 "values": [ # The values of the condition. The number of supported values depends
15879 # on the condition type. Some support zero values,
15880 # others one or two values,
15881 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
15882 { # The value of the condition.
15883 "relativeDate": "A String", # A relative date (based on the current date).
15884 # Valid only if the type is
15885 # DATE_BEFORE,
15886 # DATE_AFTER,
15887 # DATE_ON_OR_BEFORE or
15888 # DATE_ON_OR_AFTER.
15889 #
15890 # Relative dates are not supported in data validation.
15891 # They are supported only in conditional formatting and
15892 # conditional filters.
15893 "userEnteredValue": "A String", # A value the condition is based on.
15894 # The value will be parsed as if the user typed into a cell.
15895 # Formulas are supported (and must begin with an `=`).
15896 },
15897 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015898 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015899 },
15900 },
15901 },
15902 },
15903 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15904 # The root `filter` is implied and should not be specified.
15905 # A single `"*"` can be used as short-hand for listing every field.
15906 },
15907 "deleteConditionalFormatRule": { # Deletes a conditional format rule at the given index. # Deletes an existing conditional format rule.
15908 # All subsequent rules' indexes are decremented.
15909 "index": 42, # The zero-based index of the rule to be deleted.
15910 "sheetId": 42, # The sheet the rule is being deleted from.
15911 },
15912 },
15913 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -070015914 "responseIncludeGridData": True or False, # True if grid data should be returned. Meaningful only if
15915 # if include_spreadsheet_response is 'true'.
15916 # This parameter is ignored if a field mask was set in the request.
15917 "includeSpreadsheetInResponse": True or False, # Determines if the update response should include the spreadsheet
15918 # resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015919 }
15920
15921 x__xgafv: string, V1 error format.
15922 Allowed values
15923 1 - v1 error format
15924 2 - v2 error format
15925
15926Returns:
15927 An object of the form:
15928
15929 { # The reply for batch updating a spreadsheet.
15930 "spreadsheetId": "A String", # The spreadsheet the updates were applied to.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015931 "updatedSpreadsheet": { # Resource that represents a spreadsheet. # The spreadsheet after updates were applied. This is only set if
15932 # [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`.
15933 "spreadsheetId": "A String", # The ID of the spreadsheet.
15934 # This field is read-only.
15935 "namedRanges": [ # The named ranges defined in a spreadsheet.
15936 { # A named range.
15937 "namedRangeId": "A String", # The ID of the named range.
15938 "range": { # A range on a sheet. # The range this represents.
15939 # All indexes are zero-based.
15940 # Indexes are half open, e.g the start index is inclusive
15941 # and the end index is exclusive -- [start_index, end_index).
15942 # Missing indexes indicate the range is unbounded on that side.
15943 #
15944 # For example, if `"Sheet1"` is sheet ID 0, then:
15945 #
15946 # `Sheet1!A1:A1 == sheet_id: 0,
15947 # start_row_index: 0, end_row_index: 1,
15948 # start_column_index: 0, end_column_index: 1`
15949 #
15950 # `Sheet1!A3:B4 == sheet_id: 0,
15951 # start_row_index: 2, end_row_index: 4,
15952 # start_column_index: 0, end_column_index: 2`
15953 #
15954 # `Sheet1!A:B == sheet_id: 0,
15955 # start_column_index: 0, end_column_index: 2`
15956 #
15957 # `Sheet1!A5:B == sheet_id: 0,
15958 # start_row_index: 4,
15959 # start_column_index: 0, end_column_index: 2`
15960 #
15961 # `Sheet1 == sheet_id:0`
15962 #
15963 # The start index must always be less than or equal to the end index.
15964 # If the start index equals the end index, then the range is empty.
15965 # Empty ranges are typically not meaningful and are usually rendered in the
15966 # UI as `#REF!`.
15967 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015968 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015969 "sheetId": 42, # The sheet this range is on.
15970 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070015971 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015972 },
15973 "name": "A String", # The name of the named range.
15974 },
15975 ],
15976 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015977 "title": "A String", # The title of the spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015978 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
15979 #
15980 # * an ISO 639-1 language code such as `en`
15981 #
15982 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
15983 #
15984 # * a combination of the ISO language code and country code, such as `en_US`
15985 #
15986 # Note: when updating this field, not all locales/languages are supported.
Thomas Coffee2f245372017-03-27 10:39:26 -070015987 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015988 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
15989 # CellData.effectiveFormat will not be set if the
15990 # cell's format is equal to this default format.
15991 # This field is read-only.
15992 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
15993 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15994 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015995 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015996 # information about the supported patterns.
15997 "type": "A String", # The type of the number format.
15998 # When writing, this field must be set.
15999 },
16000 "textDirection": "A String", # The direction of the text in the cell.
16001 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
16002 # When updating padding, every field must be specified.
16003 "top": 42, # The top padding of the cell.
16004 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016005 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016006 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016007 },
Thomas Coffee2f245372017-03-27 10:39:26 -070016008 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016009 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
16010 # for simplicity of conversion to/from color representations in various
16011 # languages over compactness; for example, the fields of this representation
16012 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16013 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16014 # method in iOS; and, with just a little work, it can be easily formatted into
16015 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16016 #
16017 # Example (Java):
16018 #
16019 # import com.google.type.Color;
16020 #
16021 # // ...
16022 # public static java.awt.Color fromProto(Color protocolor) {
16023 # float alpha = protocolor.hasAlpha()
16024 # ? protocolor.getAlpha().getValue()
16025 # : 1.0;
16026 #
16027 # return new java.awt.Color(
16028 # protocolor.getRed(),
16029 # protocolor.getGreen(),
16030 # protocolor.getBlue(),
16031 # alpha);
16032 # }
16033 #
16034 # public static Color toProto(java.awt.Color color) {
16035 # float red = (float) color.getRed();
16036 # float green = (float) color.getGreen();
16037 # float blue = (float) color.getBlue();
16038 # float denominator = 255.0;
16039 # Color.Builder resultBuilder =
16040 # Color
16041 # .newBuilder()
16042 # .setRed(red / denominator)
16043 # .setGreen(green / denominator)
16044 # .setBlue(blue / denominator);
16045 # int alpha = color.getAlpha();
16046 # if (alpha != 255) {
16047 # result.setAlpha(
16048 # FloatValue
16049 # .newBuilder()
16050 # .setValue(((float) alpha) / denominator)
16051 # .build());
16052 # }
16053 # return resultBuilder.build();
16054 # }
16055 # // ...
16056 #
16057 # Example (iOS / Obj-C):
16058 #
16059 # // ...
16060 # static UIColor* fromProto(Color* protocolor) {
16061 # float red = [protocolor red];
16062 # float green = [protocolor green];
16063 # float blue = [protocolor blue];
16064 # FloatValue* alpha_wrapper = [protocolor alpha];
16065 # float alpha = 1.0;
16066 # if (alpha_wrapper != nil) {
16067 # alpha = [alpha_wrapper value];
16068 # }
16069 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16070 # }
16071 #
16072 # static Color* toProto(UIColor* color) {
16073 # CGFloat red, green, blue, alpha;
16074 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16075 # return nil;
16076 # }
16077 # Color* result = [Color alloc] init];
16078 # [result setRed:red];
16079 # [result setGreen:green];
16080 # [result setBlue:blue];
16081 # if (alpha <= 0.9999) {
16082 # [result setAlpha:floatWrapperWithValue(alpha)];
16083 # }
16084 # [result autorelease];
16085 # return result;
16086 # }
16087 # // ...
16088 #
16089 # Example (JavaScript):
16090 #
16091 # // ...
16092 #
16093 # var protoToCssColor = function(rgb_color) {
16094 # var redFrac = rgb_color.red || 0.0;
16095 # var greenFrac = rgb_color.green || 0.0;
16096 # var blueFrac = rgb_color.blue || 0.0;
16097 # var red = Math.floor(redFrac * 255);
16098 # var green = Math.floor(greenFrac * 255);
16099 # var blue = Math.floor(blueFrac * 255);
16100 #
16101 # if (!('alpha' in rgb_color)) {
16102 # return rgbToCssColor_(red, green, blue);
16103 # }
16104 #
16105 # var alphaFrac = rgb_color.alpha.value || 0.0;
16106 # var rgbParams = [red, green, blue].join(',');
16107 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16108 # };
16109 #
16110 # var rgbToCssColor_ = function(red, green, blue) {
16111 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16112 # var hexString = rgbNumber.toString(16);
16113 # var missingZeros = 6 - hexString.length;
16114 # var resultBuilder = ['#'];
16115 # for (var i = 0; i < missingZeros; i++) {
16116 # resultBuilder.push('0');
16117 # }
16118 # resultBuilder.push(hexString);
16119 # return resultBuilder.join('');
16120 # };
16121 #
16122 # // ...
16123 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16124 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16125 # the final pixel color is defined by the equation:
16126 #
16127 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16128 #
16129 # This means that a value of 1.0 corresponds to a solid color, whereas
16130 # a value of 0.0 corresponds to a completely transparent color. This
16131 # uses a wrapper message rather than a simple float scalar so that it is
16132 # possible to distinguish between a default value and the value being unset.
16133 # If omitted, this color object is to be rendered as a solid color
16134 # (as if the alpha value had been explicitly given with a value of 1.0).
16135 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16136 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16137 },
Thomas Coffee2f245372017-03-27 10:39:26 -070016138 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016139 "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).
16140 # Absent values indicate that the field isn't specified.
16141 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
16142 # for simplicity of conversion to/from color representations in various
16143 # languages over compactness; for example, the fields of this representation
16144 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16145 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16146 # method in iOS; and, with just a little work, it can be easily formatted into
16147 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16148 #
16149 # Example (Java):
16150 #
16151 # import com.google.type.Color;
16152 #
16153 # // ...
16154 # public static java.awt.Color fromProto(Color protocolor) {
16155 # float alpha = protocolor.hasAlpha()
16156 # ? protocolor.getAlpha().getValue()
16157 # : 1.0;
16158 #
16159 # return new java.awt.Color(
16160 # protocolor.getRed(),
16161 # protocolor.getGreen(),
16162 # protocolor.getBlue(),
16163 # alpha);
16164 # }
16165 #
16166 # public static Color toProto(java.awt.Color color) {
16167 # float red = (float) color.getRed();
16168 # float green = (float) color.getGreen();
16169 # float blue = (float) color.getBlue();
16170 # float denominator = 255.0;
16171 # Color.Builder resultBuilder =
16172 # Color
16173 # .newBuilder()
16174 # .setRed(red / denominator)
16175 # .setGreen(green / denominator)
16176 # .setBlue(blue / denominator);
16177 # int alpha = color.getAlpha();
16178 # if (alpha != 255) {
16179 # result.setAlpha(
16180 # FloatValue
16181 # .newBuilder()
16182 # .setValue(((float) alpha) / denominator)
16183 # .build());
16184 # }
16185 # return resultBuilder.build();
16186 # }
16187 # // ...
16188 #
16189 # Example (iOS / Obj-C):
16190 #
16191 # // ...
16192 # static UIColor* fromProto(Color* protocolor) {
16193 # float red = [protocolor red];
16194 # float green = [protocolor green];
16195 # float blue = [protocolor blue];
16196 # FloatValue* alpha_wrapper = [protocolor alpha];
16197 # float alpha = 1.0;
16198 # if (alpha_wrapper != nil) {
16199 # alpha = [alpha_wrapper value];
16200 # }
16201 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16202 # }
16203 #
16204 # static Color* toProto(UIColor* color) {
16205 # CGFloat red, green, blue, alpha;
16206 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16207 # return nil;
16208 # }
16209 # Color* result = [Color alloc] init];
16210 # [result setRed:red];
16211 # [result setGreen:green];
16212 # [result setBlue:blue];
16213 # if (alpha <= 0.9999) {
16214 # [result setAlpha:floatWrapperWithValue(alpha)];
16215 # }
16216 # [result autorelease];
16217 # return result;
16218 # }
16219 # // ...
16220 #
16221 # Example (JavaScript):
16222 #
16223 # // ...
16224 #
16225 # var protoToCssColor = function(rgb_color) {
16226 # var redFrac = rgb_color.red || 0.0;
16227 # var greenFrac = rgb_color.green || 0.0;
16228 # var blueFrac = rgb_color.blue || 0.0;
16229 # var red = Math.floor(redFrac * 255);
16230 # var green = Math.floor(greenFrac * 255);
16231 # var blue = Math.floor(blueFrac * 255);
16232 #
16233 # if (!('alpha' in rgb_color)) {
16234 # return rgbToCssColor_(red, green, blue);
16235 # }
16236 #
16237 # var alphaFrac = rgb_color.alpha.value || 0.0;
16238 # var rgbParams = [red, green, blue].join(',');
16239 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16240 # };
16241 #
16242 # var rgbToCssColor_ = function(red, green, blue) {
16243 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16244 # var hexString = rgbNumber.toString(16);
16245 # var missingZeros = 6 - hexString.length;
16246 # var resultBuilder = ['#'];
16247 # for (var i = 0; i < missingZeros; i++) {
16248 # resultBuilder.push('0');
16249 # }
16250 # resultBuilder.push(hexString);
16251 # return resultBuilder.join('');
16252 # };
16253 #
16254 # // ...
16255 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16256 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16257 # the final pixel color is defined by the equation:
16258 #
16259 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16260 #
16261 # This means that a value of 1.0 corresponds to a solid color, whereas
16262 # a value of 0.0 corresponds to a completely transparent color. This
16263 # uses a wrapper message rather than a simple float scalar so that it is
16264 # possible to distinguish between a default value and the value being unset.
16265 # If omitted, this color object is to be rendered as a solid color
16266 # (as if the alpha value had been explicitly given with a value of 1.0).
16267 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16268 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16269 },
16270 "bold": True or False, # True if the text is bold.
16271 "strikethrough": True or False, # True if the text has a strikethrough.
16272 "fontFamily": "A String", # The font family.
16273 "fontSize": 42, # The size of the font.
16274 "italic": True or False, # True if the text is italicized.
16275 "underline": True or False, # True if the text is underlined.
16276 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016277 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
16278 "angle": 42, # The angle between the standard orientation and the desired orientation.
16279 # Measured in degrees. Valid values are between -90 and 90. Positive
16280 # angles are angled upwards, negative are angled downwards.
16281 #
16282 # Note: For LTR text direction positive angles are in the counterclockwise
16283 # direction, whereas for RTL they are in the clockwise direction
16284 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
16285 # characters is unchanged.
16286 # For example:
16287 #
16288 # | V |
16289 # | e |
16290 # | r |
16291 # | t |
16292 # | i |
16293 # | c |
16294 # | a |
16295 # | l |
16296 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016297 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
16298 "borders": { # The borders of the cell. # The borders of the cell.
16299 "top": { # A border along a cell. # The top border of the cell.
16300 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16301 # for simplicity of conversion to/from color representations in various
16302 # languages over compactness; for example, the fields of this representation
16303 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16304 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16305 # method in iOS; and, with just a little work, it can be easily formatted into
16306 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16307 #
16308 # Example (Java):
16309 #
16310 # import com.google.type.Color;
16311 #
16312 # // ...
16313 # public static java.awt.Color fromProto(Color protocolor) {
16314 # float alpha = protocolor.hasAlpha()
16315 # ? protocolor.getAlpha().getValue()
16316 # : 1.0;
16317 #
16318 # return new java.awt.Color(
16319 # protocolor.getRed(),
16320 # protocolor.getGreen(),
16321 # protocolor.getBlue(),
16322 # alpha);
16323 # }
16324 #
16325 # public static Color toProto(java.awt.Color color) {
16326 # float red = (float) color.getRed();
16327 # float green = (float) color.getGreen();
16328 # float blue = (float) color.getBlue();
16329 # float denominator = 255.0;
16330 # Color.Builder resultBuilder =
16331 # Color
16332 # .newBuilder()
16333 # .setRed(red / denominator)
16334 # .setGreen(green / denominator)
16335 # .setBlue(blue / denominator);
16336 # int alpha = color.getAlpha();
16337 # if (alpha != 255) {
16338 # result.setAlpha(
16339 # FloatValue
16340 # .newBuilder()
16341 # .setValue(((float) alpha) / denominator)
16342 # .build());
16343 # }
16344 # return resultBuilder.build();
16345 # }
16346 # // ...
16347 #
16348 # Example (iOS / Obj-C):
16349 #
16350 # // ...
16351 # static UIColor* fromProto(Color* protocolor) {
16352 # float red = [protocolor red];
16353 # float green = [protocolor green];
16354 # float blue = [protocolor blue];
16355 # FloatValue* alpha_wrapper = [protocolor alpha];
16356 # float alpha = 1.0;
16357 # if (alpha_wrapper != nil) {
16358 # alpha = [alpha_wrapper value];
16359 # }
16360 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16361 # }
16362 #
16363 # static Color* toProto(UIColor* color) {
16364 # CGFloat red, green, blue, alpha;
16365 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16366 # return nil;
16367 # }
16368 # Color* result = [Color alloc] init];
16369 # [result setRed:red];
16370 # [result setGreen:green];
16371 # [result setBlue:blue];
16372 # if (alpha <= 0.9999) {
16373 # [result setAlpha:floatWrapperWithValue(alpha)];
16374 # }
16375 # [result autorelease];
16376 # return result;
16377 # }
16378 # // ...
16379 #
16380 # Example (JavaScript):
16381 #
16382 # // ...
16383 #
16384 # var protoToCssColor = function(rgb_color) {
16385 # var redFrac = rgb_color.red || 0.0;
16386 # var greenFrac = rgb_color.green || 0.0;
16387 # var blueFrac = rgb_color.blue || 0.0;
16388 # var red = Math.floor(redFrac * 255);
16389 # var green = Math.floor(greenFrac * 255);
16390 # var blue = Math.floor(blueFrac * 255);
16391 #
16392 # if (!('alpha' in rgb_color)) {
16393 # return rgbToCssColor_(red, green, blue);
16394 # }
16395 #
16396 # var alphaFrac = rgb_color.alpha.value || 0.0;
16397 # var rgbParams = [red, green, blue].join(',');
16398 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16399 # };
16400 #
16401 # var rgbToCssColor_ = function(red, green, blue) {
16402 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16403 # var hexString = rgbNumber.toString(16);
16404 # var missingZeros = 6 - hexString.length;
16405 # var resultBuilder = ['#'];
16406 # for (var i = 0; i < missingZeros; i++) {
16407 # resultBuilder.push('0');
16408 # }
16409 # resultBuilder.push(hexString);
16410 # return resultBuilder.join('');
16411 # };
16412 #
16413 # // ...
16414 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16415 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16416 # the final pixel color is defined by the equation:
16417 #
16418 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16419 #
16420 # This means that a value of 1.0 corresponds to a solid color, whereas
16421 # a value of 0.0 corresponds to a completely transparent color. This
16422 # uses a wrapper message rather than a simple float scalar so that it is
16423 # possible to distinguish between a default value and the value being unset.
16424 # If omitted, this color object is to be rendered as a solid color
16425 # (as if the alpha value had been explicitly given with a value of 1.0).
16426 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16427 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16428 },
16429 "width": 42, # The width of the border, in pixels.
16430 # Deprecated; the width is determined by the "style" field.
16431 "style": "A String", # The style of the border.
16432 },
16433 "right": { # A border along a cell. # The right border of the cell.
16434 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16435 # for simplicity of conversion to/from color representations in various
16436 # languages over compactness; for example, the fields of this representation
16437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16439 # method in iOS; and, with just a little work, it can be easily formatted into
16440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16441 #
16442 # Example (Java):
16443 #
16444 # import com.google.type.Color;
16445 #
16446 # // ...
16447 # public static java.awt.Color fromProto(Color protocolor) {
16448 # float alpha = protocolor.hasAlpha()
16449 # ? protocolor.getAlpha().getValue()
16450 # : 1.0;
16451 #
16452 # return new java.awt.Color(
16453 # protocolor.getRed(),
16454 # protocolor.getGreen(),
16455 # protocolor.getBlue(),
16456 # alpha);
16457 # }
16458 #
16459 # public static Color toProto(java.awt.Color color) {
16460 # float red = (float) color.getRed();
16461 # float green = (float) color.getGreen();
16462 # float blue = (float) color.getBlue();
16463 # float denominator = 255.0;
16464 # Color.Builder resultBuilder =
16465 # Color
16466 # .newBuilder()
16467 # .setRed(red / denominator)
16468 # .setGreen(green / denominator)
16469 # .setBlue(blue / denominator);
16470 # int alpha = color.getAlpha();
16471 # if (alpha != 255) {
16472 # result.setAlpha(
16473 # FloatValue
16474 # .newBuilder()
16475 # .setValue(((float) alpha) / denominator)
16476 # .build());
16477 # }
16478 # return resultBuilder.build();
16479 # }
16480 # // ...
16481 #
16482 # Example (iOS / Obj-C):
16483 #
16484 # // ...
16485 # static UIColor* fromProto(Color* protocolor) {
16486 # float red = [protocolor red];
16487 # float green = [protocolor green];
16488 # float blue = [protocolor blue];
16489 # FloatValue* alpha_wrapper = [protocolor alpha];
16490 # float alpha = 1.0;
16491 # if (alpha_wrapper != nil) {
16492 # alpha = [alpha_wrapper value];
16493 # }
16494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16495 # }
16496 #
16497 # static Color* toProto(UIColor* color) {
16498 # CGFloat red, green, blue, alpha;
16499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16500 # return nil;
16501 # }
16502 # Color* result = [Color alloc] init];
16503 # [result setRed:red];
16504 # [result setGreen:green];
16505 # [result setBlue:blue];
16506 # if (alpha <= 0.9999) {
16507 # [result setAlpha:floatWrapperWithValue(alpha)];
16508 # }
16509 # [result autorelease];
16510 # return result;
16511 # }
16512 # // ...
16513 #
16514 # Example (JavaScript):
16515 #
16516 # // ...
16517 #
16518 # var protoToCssColor = function(rgb_color) {
16519 # var redFrac = rgb_color.red || 0.0;
16520 # var greenFrac = rgb_color.green || 0.0;
16521 # var blueFrac = rgb_color.blue || 0.0;
16522 # var red = Math.floor(redFrac * 255);
16523 # var green = Math.floor(greenFrac * 255);
16524 # var blue = Math.floor(blueFrac * 255);
16525 #
16526 # if (!('alpha' in rgb_color)) {
16527 # return rgbToCssColor_(red, green, blue);
16528 # }
16529 #
16530 # var alphaFrac = rgb_color.alpha.value || 0.0;
16531 # var rgbParams = [red, green, blue].join(',');
16532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16533 # };
16534 #
16535 # var rgbToCssColor_ = function(red, green, blue) {
16536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16537 # var hexString = rgbNumber.toString(16);
16538 # var missingZeros = 6 - hexString.length;
16539 # var resultBuilder = ['#'];
16540 # for (var i = 0; i < missingZeros; i++) {
16541 # resultBuilder.push('0');
16542 # }
16543 # resultBuilder.push(hexString);
16544 # return resultBuilder.join('');
16545 # };
16546 #
16547 # // ...
16548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16550 # the final pixel color is defined by the equation:
16551 #
16552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16553 #
16554 # This means that a value of 1.0 corresponds to a solid color, whereas
16555 # a value of 0.0 corresponds to a completely transparent color. This
16556 # uses a wrapper message rather than a simple float scalar so that it is
16557 # possible to distinguish between a default value and the value being unset.
16558 # If omitted, this color object is to be rendered as a solid color
16559 # (as if the alpha value had been explicitly given with a value of 1.0).
16560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16562 },
16563 "width": 42, # The width of the border, in pixels.
16564 # Deprecated; the width is determined by the "style" field.
16565 "style": "A String", # The style of the border.
16566 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016567 "left": { # A border along a cell. # The left border of the cell.
16568 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16569 # for simplicity of conversion to/from color representations in various
16570 # languages over compactness; for example, the fields of this representation
16571 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16572 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16573 # method in iOS; and, with just a little work, it can be easily formatted into
16574 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16575 #
16576 # Example (Java):
16577 #
16578 # import com.google.type.Color;
16579 #
16580 # // ...
16581 # public static java.awt.Color fromProto(Color protocolor) {
16582 # float alpha = protocolor.hasAlpha()
16583 # ? protocolor.getAlpha().getValue()
16584 # : 1.0;
16585 #
16586 # return new java.awt.Color(
16587 # protocolor.getRed(),
16588 # protocolor.getGreen(),
16589 # protocolor.getBlue(),
16590 # alpha);
16591 # }
16592 #
16593 # public static Color toProto(java.awt.Color color) {
16594 # float red = (float) color.getRed();
16595 # float green = (float) color.getGreen();
16596 # float blue = (float) color.getBlue();
16597 # float denominator = 255.0;
16598 # Color.Builder resultBuilder =
16599 # Color
16600 # .newBuilder()
16601 # .setRed(red / denominator)
16602 # .setGreen(green / denominator)
16603 # .setBlue(blue / denominator);
16604 # int alpha = color.getAlpha();
16605 # if (alpha != 255) {
16606 # result.setAlpha(
16607 # FloatValue
16608 # .newBuilder()
16609 # .setValue(((float) alpha) / denominator)
16610 # .build());
16611 # }
16612 # return resultBuilder.build();
16613 # }
16614 # // ...
16615 #
16616 # Example (iOS / Obj-C):
16617 #
16618 # // ...
16619 # static UIColor* fromProto(Color* protocolor) {
16620 # float red = [protocolor red];
16621 # float green = [protocolor green];
16622 # float blue = [protocolor blue];
16623 # FloatValue* alpha_wrapper = [protocolor alpha];
16624 # float alpha = 1.0;
16625 # if (alpha_wrapper != nil) {
16626 # alpha = [alpha_wrapper value];
16627 # }
16628 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16629 # }
16630 #
16631 # static Color* toProto(UIColor* color) {
16632 # CGFloat red, green, blue, alpha;
16633 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16634 # return nil;
16635 # }
16636 # Color* result = [Color alloc] init];
16637 # [result setRed:red];
16638 # [result setGreen:green];
16639 # [result setBlue:blue];
16640 # if (alpha <= 0.9999) {
16641 # [result setAlpha:floatWrapperWithValue(alpha)];
16642 # }
16643 # [result autorelease];
16644 # return result;
16645 # }
16646 # // ...
16647 #
16648 # Example (JavaScript):
16649 #
16650 # // ...
16651 #
16652 # var protoToCssColor = function(rgb_color) {
16653 # var redFrac = rgb_color.red || 0.0;
16654 # var greenFrac = rgb_color.green || 0.0;
16655 # var blueFrac = rgb_color.blue || 0.0;
16656 # var red = Math.floor(redFrac * 255);
16657 # var green = Math.floor(greenFrac * 255);
16658 # var blue = Math.floor(blueFrac * 255);
16659 #
16660 # if (!('alpha' in rgb_color)) {
16661 # return rgbToCssColor_(red, green, blue);
16662 # }
16663 #
16664 # var alphaFrac = rgb_color.alpha.value || 0.0;
16665 # var rgbParams = [red, green, blue].join(',');
16666 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16667 # };
16668 #
16669 # var rgbToCssColor_ = function(red, green, blue) {
16670 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16671 # var hexString = rgbNumber.toString(16);
16672 # var missingZeros = 6 - hexString.length;
16673 # var resultBuilder = ['#'];
16674 # for (var i = 0; i < missingZeros; i++) {
16675 # resultBuilder.push('0');
16676 # }
16677 # resultBuilder.push(hexString);
16678 # return resultBuilder.join('');
16679 # };
16680 #
16681 # // ...
16682 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16683 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16684 # the final pixel color is defined by the equation:
16685 #
16686 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16687 #
16688 # This means that a value of 1.0 corresponds to a solid color, whereas
16689 # a value of 0.0 corresponds to a completely transparent color. This
16690 # uses a wrapper message rather than a simple float scalar so that it is
16691 # possible to distinguish between a default value and the value being unset.
16692 # If omitted, this color object is to be rendered as a solid color
16693 # (as if the alpha value had been explicitly given with a value of 1.0).
16694 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16695 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16696 },
16697 "width": 42, # The width of the border, in pixels.
16698 # Deprecated; the width is determined by the "style" field.
16699 "style": "A String", # The style of the border.
16700 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016701 "bottom": { # A border along a cell. # The bottom border of the cell.
16702 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16703 # for simplicity of conversion to/from color representations in various
16704 # languages over compactness; for example, the fields of this representation
16705 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16706 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16707 # method in iOS; and, with just a little work, it can be easily formatted into
16708 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16709 #
16710 # Example (Java):
16711 #
16712 # import com.google.type.Color;
16713 #
16714 # // ...
16715 # public static java.awt.Color fromProto(Color protocolor) {
16716 # float alpha = protocolor.hasAlpha()
16717 # ? protocolor.getAlpha().getValue()
16718 # : 1.0;
16719 #
16720 # return new java.awt.Color(
16721 # protocolor.getRed(),
16722 # protocolor.getGreen(),
16723 # protocolor.getBlue(),
16724 # alpha);
16725 # }
16726 #
16727 # public static Color toProto(java.awt.Color color) {
16728 # float red = (float) color.getRed();
16729 # float green = (float) color.getGreen();
16730 # float blue = (float) color.getBlue();
16731 # float denominator = 255.0;
16732 # Color.Builder resultBuilder =
16733 # Color
16734 # .newBuilder()
16735 # .setRed(red / denominator)
16736 # .setGreen(green / denominator)
16737 # .setBlue(blue / denominator);
16738 # int alpha = color.getAlpha();
16739 # if (alpha != 255) {
16740 # result.setAlpha(
16741 # FloatValue
16742 # .newBuilder()
16743 # .setValue(((float) alpha) / denominator)
16744 # .build());
16745 # }
16746 # return resultBuilder.build();
16747 # }
16748 # // ...
16749 #
16750 # Example (iOS / Obj-C):
16751 #
16752 # // ...
16753 # static UIColor* fromProto(Color* protocolor) {
16754 # float red = [protocolor red];
16755 # float green = [protocolor green];
16756 # float blue = [protocolor blue];
16757 # FloatValue* alpha_wrapper = [protocolor alpha];
16758 # float alpha = 1.0;
16759 # if (alpha_wrapper != nil) {
16760 # alpha = [alpha_wrapper value];
16761 # }
16762 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16763 # }
16764 #
16765 # static Color* toProto(UIColor* color) {
16766 # CGFloat red, green, blue, alpha;
16767 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16768 # return nil;
16769 # }
16770 # Color* result = [Color alloc] init];
16771 # [result setRed:red];
16772 # [result setGreen:green];
16773 # [result setBlue:blue];
16774 # if (alpha <= 0.9999) {
16775 # [result setAlpha:floatWrapperWithValue(alpha)];
16776 # }
16777 # [result autorelease];
16778 # return result;
16779 # }
16780 # // ...
16781 #
16782 # Example (JavaScript):
16783 #
16784 # // ...
16785 #
16786 # var protoToCssColor = function(rgb_color) {
16787 # var redFrac = rgb_color.red || 0.0;
16788 # var greenFrac = rgb_color.green || 0.0;
16789 # var blueFrac = rgb_color.blue || 0.0;
16790 # var red = Math.floor(redFrac * 255);
16791 # var green = Math.floor(greenFrac * 255);
16792 # var blue = Math.floor(blueFrac * 255);
16793 #
16794 # if (!('alpha' in rgb_color)) {
16795 # return rgbToCssColor_(red, green, blue);
16796 # }
16797 #
16798 # var alphaFrac = rgb_color.alpha.value || 0.0;
16799 # var rgbParams = [red, green, blue].join(',');
16800 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16801 # };
16802 #
16803 # var rgbToCssColor_ = function(red, green, blue) {
16804 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16805 # var hexString = rgbNumber.toString(16);
16806 # var missingZeros = 6 - hexString.length;
16807 # var resultBuilder = ['#'];
16808 # for (var i = 0; i < missingZeros; i++) {
16809 # resultBuilder.push('0');
16810 # }
16811 # resultBuilder.push(hexString);
16812 # return resultBuilder.join('');
16813 # };
16814 #
16815 # // ...
16816 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16817 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16818 # the final pixel color is defined by the equation:
16819 #
16820 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16821 #
16822 # This means that a value of 1.0 corresponds to a solid color, whereas
16823 # a value of 0.0 corresponds to a completely transparent color. This
16824 # uses a wrapper message rather than a simple float scalar so that it is
16825 # possible to distinguish between a default value and the value being unset.
16826 # If omitted, this color object is to be rendered as a solid color
16827 # (as if the alpha value had been explicitly given with a value of 1.0).
16828 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16829 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16830 },
16831 "width": 42, # The width of the border, in pixels.
16832 # Deprecated; the width is determined by the "style" field.
16833 "style": "A String", # The style of the border.
16834 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016835 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016836 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016837 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016838 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
16839 # calculation. Absence of this field means that circular references will
16840 # result in calculation errors.
16841 # calculation.
16842 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
16843 # less than this threshold value, the calculation rounds stop.
16844 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
16845 # rounds to perform.
16846 },
16847 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
16848 # `America/New_York`. If the time zone isn't recognized, this may
16849 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016850 },
16851 "sheets": [ # The sheets that are part of a spreadsheet.
16852 { # A sheet in a spreadsheet.
16853 "conditionalFormats": [ # The conditional format rules in this sheet.
16854 { # A rule describing a conditional format.
16855 "ranges": [ # The ranges that will be formatted if the condition is true.
16856 # All the ranges must be on the same grid.
16857 { # A range on a sheet.
16858 # All indexes are zero-based.
16859 # Indexes are half open, e.g the start index is inclusive
16860 # and the end index is exclusive -- [start_index, end_index).
16861 # Missing indexes indicate the range is unbounded on that side.
16862 #
16863 # For example, if `"Sheet1"` is sheet ID 0, then:
16864 #
16865 # `Sheet1!A1:A1 == sheet_id: 0,
16866 # start_row_index: 0, end_row_index: 1,
16867 # start_column_index: 0, end_column_index: 1`
16868 #
16869 # `Sheet1!A3:B4 == sheet_id: 0,
16870 # start_row_index: 2, end_row_index: 4,
16871 # start_column_index: 0, end_column_index: 2`
16872 #
16873 # `Sheet1!A:B == sheet_id: 0,
16874 # start_column_index: 0, end_column_index: 2`
16875 #
16876 # `Sheet1!A5:B == sheet_id: 0,
16877 # start_row_index: 4,
16878 # start_column_index: 0, end_column_index: 2`
16879 #
16880 # `Sheet1 == sheet_id:0`
16881 #
16882 # The start index must always be less than or equal to the end index.
16883 # If the start index equals the end index, then the range is empty.
16884 # Empty ranges are typically not meaningful and are usually rendered in the
16885 # UI as `#REF!`.
16886 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070016887 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016888 "sheetId": 42, # The sheet this range is on.
16889 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070016890 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016891 },
16892 ],
16893 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
16894 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
16895 # the format will be applied.
16896 # BooleanConditions are used by conditional formatting,
16897 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016898 "values": [ # The values of the condition. The number of supported values depends
16899 # on the condition type. Some support zero values,
16900 # others one or two values,
16901 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
16902 { # The value of the condition.
16903 "relativeDate": "A String", # A relative date (based on the current date).
16904 # Valid only if the type is
16905 # DATE_BEFORE,
16906 # DATE_AFTER,
16907 # DATE_ON_OR_BEFORE or
16908 # DATE_ON_OR_AFTER.
16909 #
16910 # Relative dates are not supported in data validation.
16911 # They are supported only in conditional formatting and
16912 # conditional filters.
16913 "userEnteredValue": "A String", # A value the condition is based on.
16914 # The value will be parsed as if the user typed into a cell.
16915 # Formulas are supported (and must begin with an `=`).
16916 },
16917 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016918 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016919 },
16920 "format": { # The format of a cell. # The format to apply.
16921 # Conditional formatting can only apply a subset of formatting:
16922 # bold, italic,
16923 # strikethrough,
16924 # foreground color &
16925 # background color.
16926 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
16927 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
16928 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016929 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016930 # information about the supported patterns.
16931 "type": "A String", # The type of the number format.
16932 # When writing, this field must be set.
16933 },
16934 "textDirection": "A String", # The direction of the text in the cell.
16935 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
16936 # When updating padding, every field must be specified.
16937 "top": 42, # The top padding of the cell.
16938 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016939 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016940 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016941 },
Thomas Coffee2f245372017-03-27 10:39:26 -070016942 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016943 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
16944 # for simplicity of conversion to/from color representations in various
16945 # languages over compactness; for example, the fields of this representation
16946 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16947 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16948 # method in iOS; and, with just a little work, it can be easily formatted into
16949 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16950 #
16951 # Example (Java):
16952 #
16953 # import com.google.type.Color;
16954 #
16955 # // ...
16956 # public static java.awt.Color fromProto(Color protocolor) {
16957 # float alpha = protocolor.hasAlpha()
16958 # ? protocolor.getAlpha().getValue()
16959 # : 1.0;
16960 #
16961 # return new java.awt.Color(
16962 # protocolor.getRed(),
16963 # protocolor.getGreen(),
16964 # protocolor.getBlue(),
16965 # alpha);
16966 # }
16967 #
16968 # public static Color toProto(java.awt.Color color) {
16969 # float red = (float) color.getRed();
16970 # float green = (float) color.getGreen();
16971 # float blue = (float) color.getBlue();
16972 # float denominator = 255.0;
16973 # Color.Builder resultBuilder =
16974 # Color
16975 # .newBuilder()
16976 # .setRed(red / denominator)
16977 # .setGreen(green / denominator)
16978 # .setBlue(blue / denominator);
16979 # int alpha = color.getAlpha();
16980 # if (alpha != 255) {
16981 # result.setAlpha(
16982 # FloatValue
16983 # .newBuilder()
16984 # .setValue(((float) alpha) / denominator)
16985 # .build());
16986 # }
16987 # return resultBuilder.build();
16988 # }
16989 # // ...
16990 #
16991 # Example (iOS / Obj-C):
16992 #
16993 # // ...
16994 # static UIColor* fromProto(Color* protocolor) {
16995 # float red = [protocolor red];
16996 # float green = [protocolor green];
16997 # float blue = [protocolor blue];
16998 # FloatValue* alpha_wrapper = [protocolor alpha];
16999 # float alpha = 1.0;
17000 # if (alpha_wrapper != nil) {
17001 # alpha = [alpha_wrapper value];
17002 # }
17003 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17004 # }
17005 #
17006 # static Color* toProto(UIColor* color) {
17007 # CGFloat red, green, blue, alpha;
17008 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17009 # return nil;
17010 # }
17011 # Color* result = [Color alloc] init];
17012 # [result setRed:red];
17013 # [result setGreen:green];
17014 # [result setBlue:blue];
17015 # if (alpha <= 0.9999) {
17016 # [result setAlpha:floatWrapperWithValue(alpha)];
17017 # }
17018 # [result autorelease];
17019 # return result;
17020 # }
17021 # // ...
17022 #
17023 # Example (JavaScript):
17024 #
17025 # // ...
17026 #
17027 # var protoToCssColor = function(rgb_color) {
17028 # var redFrac = rgb_color.red || 0.0;
17029 # var greenFrac = rgb_color.green || 0.0;
17030 # var blueFrac = rgb_color.blue || 0.0;
17031 # var red = Math.floor(redFrac * 255);
17032 # var green = Math.floor(greenFrac * 255);
17033 # var blue = Math.floor(blueFrac * 255);
17034 #
17035 # if (!('alpha' in rgb_color)) {
17036 # return rgbToCssColor_(red, green, blue);
17037 # }
17038 #
17039 # var alphaFrac = rgb_color.alpha.value || 0.0;
17040 # var rgbParams = [red, green, blue].join(',');
17041 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17042 # };
17043 #
17044 # var rgbToCssColor_ = function(red, green, blue) {
17045 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17046 # var hexString = rgbNumber.toString(16);
17047 # var missingZeros = 6 - hexString.length;
17048 # var resultBuilder = ['#'];
17049 # for (var i = 0; i < missingZeros; i++) {
17050 # resultBuilder.push('0');
17051 # }
17052 # resultBuilder.push(hexString);
17053 # return resultBuilder.join('');
17054 # };
17055 #
17056 # // ...
17057 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17058 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17059 # the final pixel color is defined by the equation:
17060 #
17061 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17062 #
17063 # This means that a value of 1.0 corresponds to a solid color, whereas
17064 # a value of 0.0 corresponds to a completely transparent color. This
17065 # uses a wrapper message rather than a simple float scalar so that it is
17066 # possible to distinguish between a default value and the value being unset.
17067 # If omitted, this color object is to be rendered as a solid color
17068 # (as if the alpha value had been explicitly given with a value of 1.0).
17069 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17070 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17071 },
Thomas Coffee2f245372017-03-27 10:39:26 -070017072 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017073 "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).
17074 # Absent values indicate that the field isn't specified.
17075 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
17076 # for simplicity of conversion to/from color representations in various
17077 # languages over compactness; for example, the fields of this representation
17078 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17079 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17080 # method in iOS; and, with just a little work, it can be easily formatted into
17081 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17082 #
17083 # Example (Java):
17084 #
17085 # import com.google.type.Color;
17086 #
17087 # // ...
17088 # public static java.awt.Color fromProto(Color protocolor) {
17089 # float alpha = protocolor.hasAlpha()
17090 # ? protocolor.getAlpha().getValue()
17091 # : 1.0;
17092 #
17093 # return new java.awt.Color(
17094 # protocolor.getRed(),
17095 # protocolor.getGreen(),
17096 # protocolor.getBlue(),
17097 # alpha);
17098 # }
17099 #
17100 # public static Color toProto(java.awt.Color color) {
17101 # float red = (float) color.getRed();
17102 # float green = (float) color.getGreen();
17103 # float blue = (float) color.getBlue();
17104 # float denominator = 255.0;
17105 # Color.Builder resultBuilder =
17106 # Color
17107 # .newBuilder()
17108 # .setRed(red / denominator)
17109 # .setGreen(green / denominator)
17110 # .setBlue(blue / denominator);
17111 # int alpha = color.getAlpha();
17112 # if (alpha != 255) {
17113 # result.setAlpha(
17114 # FloatValue
17115 # .newBuilder()
17116 # .setValue(((float) alpha) / denominator)
17117 # .build());
17118 # }
17119 # return resultBuilder.build();
17120 # }
17121 # // ...
17122 #
17123 # Example (iOS / Obj-C):
17124 #
17125 # // ...
17126 # static UIColor* fromProto(Color* protocolor) {
17127 # float red = [protocolor red];
17128 # float green = [protocolor green];
17129 # float blue = [protocolor blue];
17130 # FloatValue* alpha_wrapper = [protocolor alpha];
17131 # float alpha = 1.0;
17132 # if (alpha_wrapper != nil) {
17133 # alpha = [alpha_wrapper value];
17134 # }
17135 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17136 # }
17137 #
17138 # static Color* toProto(UIColor* color) {
17139 # CGFloat red, green, blue, alpha;
17140 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17141 # return nil;
17142 # }
17143 # Color* result = [Color alloc] init];
17144 # [result setRed:red];
17145 # [result setGreen:green];
17146 # [result setBlue:blue];
17147 # if (alpha <= 0.9999) {
17148 # [result setAlpha:floatWrapperWithValue(alpha)];
17149 # }
17150 # [result autorelease];
17151 # return result;
17152 # }
17153 # // ...
17154 #
17155 # Example (JavaScript):
17156 #
17157 # // ...
17158 #
17159 # var protoToCssColor = function(rgb_color) {
17160 # var redFrac = rgb_color.red || 0.0;
17161 # var greenFrac = rgb_color.green || 0.0;
17162 # var blueFrac = rgb_color.blue || 0.0;
17163 # var red = Math.floor(redFrac * 255);
17164 # var green = Math.floor(greenFrac * 255);
17165 # var blue = Math.floor(blueFrac * 255);
17166 #
17167 # if (!('alpha' in rgb_color)) {
17168 # return rgbToCssColor_(red, green, blue);
17169 # }
17170 #
17171 # var alphaFrac = rgb_color.alpha.value || 0.0;
17172 # var rgbParams = [red, green, blue].join(',');
17173 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17174 # };
17175 #
17176 # var rgbToCssColor_ = function(red, green, blue) {
17177 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17178 # var hexString = rgbNumber.toString(16);
17179 # var missingZeros = 6 - hexString.length;
17180 # var resultBuilder = ['#'];
17181 # for (var i = 0; i < missingZeros; i++) {
17182 # resultBuilder.push('0');
17183 # }
17184 # resultBuilder.push(hexString);
17185 # return resultBuilder.join('');
17186 # };
17187 #
17188 # // ...
17189 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17190 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17191 # the final pixel color is defined by the equation:
17192 #
17193 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17194 #
17195 # This means that a value of 1.0 corresponds to a solid color, whereas
17196 # a value of 0.0 corresponds to a completely transparent color. This
17197 # uses a wrapper message rather than a simple float scalar so that it is
17198 # possible to distinguish between a default value and the value being unset.
17199 # If omitted, this color object is to be rendered as a solid color
17200 # (as if the alpha value had been explicitly given with a value of 1.0).
17201 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17202 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17203 },
17204 "bold": True or False, # True if the text is bold.
17205 "strikethrough": True or False, # True if the text has a strikethrough.
17206 "fontFamily": "A String", # The font family.
17207 "fontSize": 42, # The size of the font.
17208 "italic": True or False, # True if the text is italicized.
17209 "underline": True or False, # True if the text is underlined.
17210 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070017211 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
17212 "angle": 42, # The angle between the standard orientation and the desired orientation.
17213 # Measured in degrees. Valid values are between -90 and 90. Positive
17214 # angles are angled upwards, negative are angled downwards.
17215 #
17216 # Note: For LTR text direction positive angles are in the counterclockwise
17217 # direction, whereas for RTL they are in the clockwise direction
17218 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
17219 # characters is unchanged.
17220 # For example:
17221 #
17222 # | V |
17223 # | e |
17224 # | r |
17225 # | t |
17226 # | i |
17227 # | c |
17228 # | a |
17229 # | l |
17230 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017231 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
17232 "borders": { # The borders of the cell. # The borders of the cell.
17233 "top": { # A border along a cell. # The top border of the cell.
17234 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17235 # for simplicity of conversion to/from color representations in various
17236 # languages over compactness; for example, the fields of this representation
17237 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17238 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17239 # method in iOS; and, with just a little work, it can be easily formatted into
17240 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17241 #
17242 # Example (Java):
17243 #
17244 # import com.google.type.Color;
17245 #
17246 # // ...
17247 # public static java.awt.Color fromProto(Color protocolor) {
17248 # float alpha = protocolor.hasAlpha()
17249 # ? protocolor.getAlpha().getValue()
17250 # : 1.0;
17251 #
17252 # return new java.awt.Color(
17253 # protocolor.getRed(),
17254 # protocolor.getGreen(),
17255 # protocolor.getBlue(),
17256 # alpha);
17257 # }
17258 #
17259 # public static Color toProto(java.awt.Color color) {
17260 # float red = (float) color.getRed();
17261 # float green = (float) color.getGreen();
17262 # float blue = (float) color.getBlue();
17263 # float denominator = 255.0;
17264 # Color.Builder resultBuilder =
17265 # Color
17266 # .newBuilder()
17267 # .setRed(red / denominator)
17268 # .setGreen(green / denominator)
17269 # .setBlue(blue / denominator);
17270 # int alpha = color.getAlpha();
17271 # if (alpha != 255) {
17272 # result.setAlpha(
17273 # FloatValue
17274 # .newBuilder()
17275 # .setValue(((float) alpha) / denominator)
17276 # .build());
17277 # }
17278 # return resultBuilder.build();
17279 # }
17280 # // ...
17281 #
17282 # Example (iOS / Obj-C):
17283 #
17284 # // ...
17285 # static UIColor* fromProto(Color* protocolor) {
17286 # float red = [protocolor red];
17287 # float green = [protocolor green];
17288 # float blue = [protocolor blue];
17289 # FloatValue* alpha_wrapper = [protocolor alpha];
17290 # float alpha = 1.0;
17291 # if (alpha_wrapper != nil) {
17292 # alpha = [alpha_wrapper value];
17293 # }
17294 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17295 # }
17296 #
17297 # static Color* toProto(UIColor* color) {
17298 # CGFloat red, green, blue, alpha;
17299 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17300 # return nil;
17301 # }
17302 # Color* result = [Color alloc] init];
17303 # [result setRed:red];
17304 # [result setGreen:green];
17305 # [result setBlue:blue];
17306 # if (alpha <= 0.9999) {
17307 # [result setAlpha:floatWrapperWithValue(alpha)];
17308 # }
17309 # [result autorelease];
17310 # return result;
17311 # }
17312 # // ...
17313 #
17314 # Example (JavaScript):
17315 #
17316 # // ...
17317 #
17318 # var protoToCssColor = function(rgb_color) {
17319 # var redFrac = rgb_color.red || 0.0;
17320 # var greenFrac = rgb_color.green || 0.0;
17321 # var blueFrac = rgb_color.blue || 0.0;
17322 # var red = Math.floor(redFrac * 255);
17323 # var green = Math.floor(greenFrac * 255);
17324 # var blue = Math.floor(blueFrac * 255);
17325 #
17326 # if (!('alpha' in rgb_color)) {
17327 # return rgbToCssColor_(red, green, blue);
17328 # }
17329 #
17330 # var alphaFrac = rgb_color.alpha.value || 0.0;
17331 # var rgbParams = [red, green, blue].join(',');
17332 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17333 # };
17334 #
17335 # var rgbToCssColor_ = function(red, green, blue) {
17336 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17337 # var hexString = rgbNumber.toString(16);
17338 # var missingZeros = 6 - hexString.length;
17339 # var resultBuilder = ['#'];
17340 # for (var i = 0; i < missingZeros; i++) {
17341 # resultBuilder.push('0');
17342 # }
17343 # resultBuilder.push(hexString);
17344 # return resultBuilder.join('');
17345 # };
17346 #
17347 # // ...
17348 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17349 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17350 # the final pixel color is defined by the equation:
17351 #
17352 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17353 #
17354 # This means that a value of 1.0 corresponds to a solid color, whereas
17355 # a value of 0.0 corresponds to a completely transparent color. This
17356 # uses a wrapper message rather than a simple float scalar so that it is
17357 # possible to distinguish between a default value and the value being unset.
17358 # If omitted, this color object is to be rendered as a solid color
17359 # (as if the alpha value had been explicitly given with a value of 1.0).
17360 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17361 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17362 },
17363 "width": 42, # The width of the border, in pixels.
17364 # Deprecated; the width is determined by the "style" field.
17365 "style": "A String", # The style of the border.
17366 },
17367 "right": { # A border along a cell. # The right border of the cell.
17368 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17369 # for simplicity of conversion to/from color representations in various
17370 # languages over compactness; for example, the fields of this representation
17371 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17372 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17373 # method in iOS; and, with just a little work, it can be easily formatted into
17374 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17375 #
17376 # Example (Java):
17377 #
17378 # import com.google.type.Color;
17379 #
17380 # // ...
17381 # public static java.awt.Color fromProto(Color protocolor) {
17382 # float alpha = protocolor.hasAlpha()
17383 # ? protocolor.getAlpha().getValue()
17384 # : 1.0;
17385 #
17386 # return new java.awt.Color(
17387 # protocolor.getRed(),
17388 # protocolor.getGreen(),
17389 # protocolor.getBlue(),
17390 # alpha);
17391 # }
17392 #
17393 # public static Color toProto(java.awt.Color color) {
17394 # float red = (float) color.getRed();
17395 # float green = (float) color.getGreen();
17396 # float blue = (float) color.getBlue();
17397 # float denominator = 255.0;
17398 # Color.Builder resultBuilder =
17399 # Color
17400 # .newBuilder()
17401 # .setRed(red / denominator)
17402 # .setGreen(green / denominator)
17403 # .setBlue(blue / denominator);
17404 # int alpha = color.getAlpha();
17405 # if (alpha != 255) {
17406 # result.setAlpha(
17407 # FloatValue
17408 # .newBuilder()
17409 # .setValue(((float) alpha) / denominator)
17410 # .build());
17411 # }
17412 # return resultBuilder.build();
17413 # }
17414 # // ...
17415 #
17416 # Example (iOS / Obj-C):
17417 #
17418 # // ...
17419 # static UIColor* fromProto(Color* protocolor) {
17420 # float red = [protocolor red];
17421 # float green = [protocolor green];
17422 # float blue = [protocolor blue];
17423 # FloatValue* alpha_wrapper = [protocolor alpha];
17424 # float alpha = 1.0;
17425 # if (alpha_wrapper != nil) {
17426 # alpha = [alpha_wrapper value];
17427 # }
17428 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17429 # }
17430 #
17431 # static Color* toProto(UIColor* color) {
17432 # CGFloat red, green, blue, alpha;
17433 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17434 # return nil;
17435 # }
17436 # Color* result = [Color alloc] init];
17437 # [result setRed:red];
17438 # [result setGreen:green];
17439 # [result setBlue:blue];
17440 # if (alpha <= 0.9999) {
17441 # [result setAlpha:floatWrapperWithValue(alpha)];
17442 # }
17443 # [result autorelease];
17444 # return result;
17445 # }
17446 # // ...
17447 #
17448 # Example (JavaScript):
17449 #
17450 # // ...
17451 #
17452 # var protoToCssColor = function(rgb_color) {
17453 # var redFrac = rgb_color.red || 0.0;
17454 # var greenFrac = rgb_color.green || 0.0;
17455 # var blueFrac = rgb_color.blue || 0.0;
17456 # var red = Math.floor(redFrac * 255);
17457 # var green = Math.floor(greenFrac * 255);
17458 # var blue = Math.floor(blueFrac * 255);
17459 #
17460 # if (!('alpha' in rgb_color)) {
17461 # return rgbToCssColor_(red, green, blue);
17462 # }
17463 #
17464 # var alphaFrac = rgb_color.alpha.value || 0.0;
17465 # var rgbParams = [red, green, blue].join(',');
17466 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17467 # };
17468 #
17469 # var rgbToCssColor_ = function(red, green, blue) {
17470 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17471 # var hexString = rgbNumber.toString(16);
17472 # var missingZeros = 6 - hexString.length;
17473 # var resultBuilder = ['#'];
17474 # for (var i = 0; i < missingZeros; i++) {
17475 # resultBuilder.push('0');
17476 # }
17477 # resultBuilder.push(hexString);
17478 # return resultBuilder.join('');
17479 # };
17480 #
17481 # // ...
17482 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17483 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17484 # the final pixel color is defined by the equation:
17485 #
17486 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17487 #
17488 # This means that a value of 1.0 corresponds to a solid color, whereas
17489 # a value of 0.0 corresponds to a completely transparent color. This
17490 # uses a wrapper message rather than a simple float scalar so that it is
17491 # possible to distinguish between a default value and the value being unset.
17492 # If omitted, this color object is to be rendered as a solid color
17493 # (as if the alpha value had been explicitly given with a value of 1.0).
17494 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17495 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17496 },
17497 "width": 42, # The width of the border, in pixels.
17498 # Deprecated; the width is determined by the "style" field.
17499 "style": "A String", # The style of the border.
17500 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017501 "left": { # A border along a cell. # The left border of the cell.
17502 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17503 # for simplicity of conversion to/from color representations in various
17504 # languages over compactness; for example, the fields of this representation
17505 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17506 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17507 # method in iOS; and, with just a little work, it can be easily formatted into
17508 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17509 #
17510 # Example (Java):
17511 #
17512 # import com.google.type.Color;
17513 #
17514 # // ...
17515 # public static java.awt.Color fromProto(Color protocolor) {
17516 # float alpha = protocolor.hasAlpha()
17517 # ? protocolor.getAlpha().getValue()
17518 # : 1.0;
17519 #
17520 # return new java.awt.Color(
17521 # protocolor.getRed(),
17522 # protocolor.getGreen(),
17523 # protocolor.getBlue(),
17524 # alpha);
17525 # }
17526 #
17527 # public static Color toProto(java.awt.Color color) {
17528 # float red = (float) color.getRed();
17529 # float green = (float) color.getGreen();
17530 # float blue = (float) color.getBlue();
17531 # float denominator = 255.0;
17532 # Color.Builder resultBuilder =
17533 # Color
17534 # .newBuilder()
17535 # .setRed(red / denominator)
17536 # .setGreen(green / denominator)
17537 # .setBlue(blue / denominator);
17538 # int alpha = color.getAlpha();
17539 # if (alpha != 255) {
17540 # result.setAlpha(
17541 # FloatValue
17542 # .newBuilder()
17543 # .setValue(((float) alpha) / denominator)
17544 # .build());
17545 # }
17546 # return resultBuilder.build();
17547 # }
17548 # // ...
17549 #
17550 # Example (iOS / Obj-C):
17551 #
17552 # // ...
17553 # static UIColor* fromProto(Color* protocolor) {
17554 # float red = [protocolor red];
17555 # float green = [protocolor green];
17556 # float blue = [protocolor blue];
17557 # FloatValue* alpha_wrapper = [protocolor alpha];
17558 # float alpha = 1.0;
17559 # if (alpha_wrapper != nil) {
17560 # alpha = [alpha_wrapper value];
17561 # }
17562 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17563 # }
17564 #
17565 # static Color* toProto(UIColor* color) {
17566 # CGFloat red, green, blue, alpha;
17567 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17568 # return nil;
17569 # }
17570 # Color* result = [Color alloc] init];
17571 # [result setRed:red];
17572 # [result setGreen:green];
17573 # [result setBlue:blue];
17574 # if (alpha <= 0.9999) {
17575 # [result setAlpha:floatWrapperWithValue(alpha)];
17576 # }
17577 # [result autorelease];
17578 # return result;
17579 # }
17580 # // ...
17581 #
17582 # Example (JavaScript):
17583 #
17584 # // ...
17585 #
17586 # var protoToCssColor = function(rgb_color) {
17587 # var redFrac = rgb_color.red || 0.0;
17588 # var greenFrac = rgb_color.green || 0.0;
17589 # var blueFrac = rgb_color.blue || 0.0;
17590 # var red = Math.floor(redFrac * 255);
17591 # var green = Math.floor(greenFrac * 255);
17592 # var blue = Math.floor(blueFrac * 255);
17593 #
17594 # if (!('alpha' in rgb_color)) {
17595 # return rgbToCssColor_(red, green, blue);
17596 # }
17597 #
17598 # var alphaFrac = rgb_color.alpha.value || 0.0;
17599 # var rgbParams = [red, green, blue].join(',');
17600 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17601 # };
17602 #
17603 # var rgbToCssColor_ = function(red, green, blue) {
17604 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17605 # var hexString = rgbNumber.toString(16);
17606 # var missingZeros = 6 - hexString.length;
17607 # var resultBuilder = ['#'];
17608 # for (var i = 0; i < missingZeros; i++) {
17609 # resultBuilder.push('0');
17610 # }
17611 # resultBuilder.push(hexString);
17612 # return resultBuilder.join('');
17613 # };
17614 #
17615 # // ...
17616 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17617 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17618 # the final pixel color is defined by the equation:
17619 #
17620 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17621 #
17622 # This means that a value of 1.0 corresponds to a solid color, whereas
17623 # a value of 0.0 corresponds to a completely transparent color. This
17624 # uses a wrapper message rather than a simple float scalar so that it is
17625 # possible to distinguish between a default value and the value being unset.
17626 # If omitted, this color object is to be rendered as a solid color
17627 # (as if the alpha value had been explicitly given with a value of 1.0).
17628 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17629 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17630 },
17631 "width": 42, # The width of the border, in pixels.
17632 # Deprecated; the width is determined by the "style" field.
17633 "style": "A String", # The style of the border.
17634 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070017635 "bottom": { # A border along a cell. # The bottom border of the cell.
17636 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17637 # for simplicity of conversion to/from color representations in various
17638 # languages over compactness; for example, the fields of this representation
17639 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17640 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17641 # method in iOS; and, with just a little work, it can be easily formatted into
17642 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17643 #
17644 # Example (Java):
17645 #
17646 # import com.google.type.Color;
17647 #
17648 # // ...
17649 # public static java.awt.Color fromProto(Color protocolor) {
17650 # float alpha = protocolor.hasAlpha()
17651 # ? protocolor.getAlpha().getValue()
17652 # : 1.0;
17653 #
17654 # return new java.awt.Color(
17655 # protocolor.getRed(),
17656 # protocolor.getGreen(),
17657 # protocolor.getBlue(),
17658 # alpha);
17659 # }
17660 #
17661 # public static Color toProto(java.awt.Color color) {
17662 # float red = (float) color.getRed();
17663 # float green = (float) color.getGreen();
17664 # float blue = (float) color.getBlue();
17665 # float denominator = 255.0;
17666 # Color.Builder resultBuilder =
17667 # Color
17668 # .newBuilder()
17669 # .setRed(red / denominator)
17670 # .setGreen(green / denominator)
17671 # .setBlue(blue / denominator);
17672 # int alpha = color.getAlpha();
17673 # if (alpha != 255) {
17674 # result.setAlpha(
17675 # FloatValue
17676 # .newBuilder()
17677 # .setValue(((float) alpha) / denominator)
17678 # .build());
17679 # }
17680 # return resultBuilder.build();
17681 # }
17682 # // ...
17683 #
17684 # Example (iOS / Obj-C):
17685 #
17686 # // ...
17687 # static UIColor* fromProto(Color* protocolor) {
17688 # float red = [protocolor red];
17689 # float green = [protocolor green];
17690 # float blue = [protocolor blue];
17691 # FloatValue* alpha_wrapper = [protocolor alpha];
17692 # float alpha = 1.0;
17693 # if (alpha_wrapper != nil) {
17694 # alpha = [alpha_wrapper value];
17695 # }
17696 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17697 # }
17698 #
17699 # static Color* toProto(UIColor* color) {
17700 # CGFloat red, green, blue, alpha;
17701 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17702 # return nil;
17703 # }
17704 # Color* result = [Color alloc] init];
17705 # [result setRed:red];
17706 # [result setGreen:green];
17707 # [result setBlue:blue];
17708 # if (alpha <= 0.9999) {
17709 # [result setAlpha:floatWrapperWithValue(alpha)];
17710 # }
17711 # [result autorelease];
17712 # return result;
17713 # }
17714 # // ...
17715 #
17716 # Example (JavaScript):
17717 #
17718 # // ...
17719 #
17720 # var protoToCssColor = function(rgb_color) {
17721 # var redFrac = rgb_color.red || 0.0;
17722 # var greenFrac = rgb_color.green || 0.0;
17723 # var blueFrac = rgb_color.blue || 0.0;
17724 # var red = Math.floor(redFrac * 255);
17725 # var green = Math.floor(greenFrac * 255);
17726 # var blue = Math.floor(blueFrac * 255);
17727 #
17728 # if (!('alpha' in rgb_color)) {
17729 # return rgbToCssColor_(red, green, blue);
17730 # }
17731 #
17732 # var alphaFrac = rgb_color.alpha.value || 0.0;
17733 # var rgbParams = [red, green, blue].join(',');
17734 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17735 # };
17736 #
17737 # var rgbToCssColor_ = function(red, green, blue) {
17738 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17739 # var hexString = rgbNumber.toString(16);
17740 # var missingZeros = 6 - hexString.length;
17741 # var resultBuilder = ['#'];
17742 # for (var i = 0; i < missingZeros; i++) {
17743 # resultBuilder.push('0');
17744 # }
17745 # resultBuilder.push(hexString);
17746 # return resultBuilder.join('');
17747 # };
17748 #
17749 # // ...
17750 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17751 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17752 # the final pixel color is defined by the equation:
17753 #
17754 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17755 #
17756 # This means that a value of 1.0 corresponds to a solid color, whereas
17757 # a value of 0.0 corresponds to a completely transparent color. This
17758 # uses a wrapper message rather than a simple float scalar so that it is
17759 # possible to distinguish between a default value and the value being unset.
17760 # If omitted, this color object is to be rendered as a solid color
17761 # (as if the alpha value had been explicitly given with a value of 1.0).
17762 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17763 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17764 },
17765 "width": 42, # The width of the border, in pixels.
17766 # Deprecated; the width is determined by the "style" field.
17767 "style": "A String", # The style of the border.
17768 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017769 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070017770 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017771 },
17772 },
17773 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
17774 # the interpolation points listed. The format of a cell will vary
17775 # based on its contents as compared to the values of the interpolation
17776 # points.
17777 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
17778 # These pin the gradient color scale according to the color,
17779 # type and value chosen.
17780 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17781 # for simplicity of conversion to/from color representations in various
17782 # languages over compactness; for example, the fields of this representation
17783 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17784 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17785 # method in iOS; and, with just a little work, it can be easily formatted into
17786 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17787 #
17788 # Example (Java):
17789 #
17790 # import com.google.type.Color;
17791 #
17792 # // ...
17793 # public static java.awt.Color fromProto(Color protocolor) {
17794 # float alpha = protocolor.hasAlpha()
17795 # ? protocolor.getAlpha().getValue()
17796 # : 1.0;
17797 #
17798 # return new java.awt.Color(
17799 # protocolor.getRed(),
17800 # protocolor.getGreen(),
17801 # protocolor.getBlue(),
17802 # alpha);
17803 # }
17804 #
17805 # public static Color toProto(java.awt.Color color) {
17806 # float red = (float) color.getRed();
17807 # float green = (float) color.getGreen();
17808 # float blue = (float) color.getBlue();
17809 # float denominator = 255.0;
17810 # Color.Builder resultBuilder =
17811 # Color
17812 # .newBuilder()
17813 # .setRed(red / denominator)
17814 # .setGreen(green / denominator)
17815 # .setBlue(blue / denominator);
17816 # int alpha = color.getAlpha();
17817 # if (alpha != 255) {
17818 # result.setAlpha(
17819 # FloatValue
17820 # .newBuilder()
17821 # .setValue(((float) alpha) / denominator)
17822 # .build());
17823 # }
17824 # return resultBuilder.build();
17825 # }
17826 # // ...
17827 #
17828 # Example (iOS / Obj-C):
17829 #
17830 # // ...
17831 # static UIColor* fromProto(Color* protocolor) {
17832 # float red = [protocolor red];
17833 # float green = [protocolor green];
17834 # float blue = [protocolor blue];
17835 # FloatValue* alpha_wrapper = [protocolor alpha];
17836 # float alpha = 1.0;
17837 # if (alpha_wrapper != nil) {
17838 # alpha = [alpha_wrapper value];
17839 # }
17840 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17841 # }
17842 #
17843 # static Color* toProto(UIColor* color) {
17844 # CGFloat red, green, blue, alpha;
17845 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17846 # return nil;
17847 # }
17848 # Color* result = [Color alloc] init];
17849 # [result setRed:red];
17850 # [result setGreen:green];
17851 # [result setBlue:blue];
17852 # if (alpha <= 0.9999) {
17853 # [result setAlpha:floatWrapperWithValue(alpha)];
17854 # }
17855 # [result autorelease];
17856 # return result;
17857 # }
17858 # // ...
17859 #
17860 # Example (JavaScript):
17861 #
17862 # // ...
17863 #
17864 # var protoToCssColor = function(rgb_color) {
17865 # var redFrac = rgb_color.red || 0.0;
17866 # var greenFrac = rgb_color.green || 0.0;
17867 # var blueFrac = rgb_color.blue || 0.0;
17868 # var red = Math.floor(redFrac * 255);
17869 # var green = Math.floor(greenFrac * 255);
17870 # var blue = Math.floor(blueFrac * 255);
17871 #
17872 # if (!('alpha' in rgb_color)) {
17873 # return rgbToCssColor_(red, green, blue);
17874 # }
17875 #
17876 # var alphaFrac = rgb_color.alpha.value || 0.0;
17877 # var rgbParams = [red, green, blue].join(',');
17878 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17879 # };
17880 #
17881 # var rgbToCssColor_ = function(red, green, blue) {
17882 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17883 # var hexString = rgbNumber.toString(16);
17884 # var missingZeros = 6 - hexString.length;
17885 # var resultBuilder = ['#'];
17886 # for (var i = 0; i < missingZeros; i++) {
17887 # resultBuilder.push('0');
17888 # }
17889 # resultBuilder.push(hexString);
17890 # return resultBuilder.join('');
17891 # };
17892 #
17893 # // ...
17894 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17895 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17896 # the final pixel color is defined by the equation:
17897 #
17898 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17899 #
17900 # This means that a value of 1.0 corresponds to a solid color, whereas
17901 # a value of 0.0 corresponds to a completely transparent color. This
17902 # uses a wrapper message rather than a simple float scalar so that it is
17903 # possible to distinguish between a default value and the value being unset.
17904 # If omitted, this color object is to be rendered as a solid color
17905 # (as if the alpha value had been explicitly given with a value of 1.0).
17906 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17907 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17908 },
17909 "type": "A String", # How the value should be interpreted.
17910 "value": "A String", # The value this interpolation point uses. May be a formula.
17911 # Unused if type is MIN or
17912 # MAX.
17913 },
17914 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
17915 # These pin the gradient color scale according to the color,
17916 # type and value chosen.
17917 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
17918 # for simplicity of conversion to/from color representations in various
17919 # languages over compactness; for example, the fields of this representation
17920 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17921 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17922 # method in iOS; and, with just a little work, it can be easily formatted into
17923 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17924 #
17925 # Example (Java):
17926 #
17927 # import com.google.type.Color;
17928 #
17929 # // ...
17930 # public static java.awt.Color fromProto(Color protocolor) {
17931 # float alpha = protocolor.hasAlpha()
17932 # ? protocolor.getAlpha().getValue()
17933 # : 1.0;
17934 #
17935 # return new java.awt.Color(
17936 # protocolor.getRed(),
17937 # protocolor.getGreen(),
17938 # protocolor.getBlue(),
17939 # alpha);
17940 # }
17941 #
17942 # public static Color toProto(java.awt.Color color) {
17943 # float red = (float) color.getRed();
17944 # float green = (float) color.getGreen();
17945 # float blue = (float) color.getBlue();
17946 # float denominator = 255.0;
17947 # Color.Builder resultBuilder =
17948 # Color
17949 # .newBuilder()
17950 # .setRed(red / denominator)
17951 # .setGreen(green / denominator)
17952 # .setBlue(blue / denominator);
17953 # int alpha = color.getAlpha();
17954 # if (alpha != 255) {
17955 # result.setAlpha(
17956 # FloatValue
17957 # .newBuilder()
17958 # .setValue(((float) alpha) / denominator)
17959 # .build());
17960 # }
17961 # return resultBuilder.build();
17962 # }
17963 # // ...
17964 #
17965 # Example (iOS / Obj-C):
17966 #
17967 # // ...
17968 # static UIColor* fromProto(Color* protocolor) {
17969 # float red = [protocolor red];
17970 # float green = [protocolor green];
17971 # float blue = [protocolor blue];
17972 # FloatValue* alpha_wrapper = [protocolor alpha];
17973 # float alpha = 1.0;
17974 # if (alpha_wrapper != nil) {
17975 # alpha = [alpha_wrapper value];
17976 # }
17977 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17978 # }
17979 #
17980 # static Color* toProto(UIColor* color) {
17981 # CGFloat red, green, blue, alpha;
17982 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17983 # return nil;
17984 # }
17985 # Color* result = [Color alloc] init];
17986 # [result setRed:red];
17987 # [result setGreen:green];
17988 # [result setBlue:blue];
17989 # if (alpha <= 0.9999) {
17990 # [result setAlpha:floatWrapperWithValue(alpha)];
17991 # }
17992 # [result autorelease];
17993 # return result;
17994 # }
17995 # // ...
17996 #
17997 # Example (JavaScript):
17998 #
17999 # // ...
18000 #
18001 # var protoToCssColor = function(rgb_color) {
18002 # var redFrac = rgb_color.red || 0.0;
18003 # var greenFrac = rgb_color.green || 0.0;
18004 # var blueFrac = rgb_color.blue || 0.0;
18005 # var red = Math.floor(redFrac * 255);
18006 # var green = Math.floor(greenFrac * 255);
18007 # var blue = Math.floor(blueFrac * 255);
18008 #
18009 # if (!('alpha' in rgb_color)) {
18010 # return rgbToCssColor_(red, green, blue);
18011 # }
18012 #
18013 # var alphaFrac = rgb_color.alpha.value || 0.0;
18014 # var rgbParams = [red, green, blue].join(',');
18015 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18016 # };
18017 #
18018 # var rgbToCssColor_ = function(red, green, blue) {
18019 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18020 # var hexString = rgbNumber.toString(16);
18021 # var missingZeros = 6 - hexString.length;
18022 # var resultBuilder = ['#'];
18023 # for (var i = 0; i < missingZeros; i++) {
18024 # resultBuilder.push('0');
18025 # }
18026 # resultBuilder.push(hexString);
18027 # return resultBuilder.join('');
18028 # };
18029 #
18030 # // ...
18031 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18032 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18033 # the final pixel color is defined by the equation:
18034 #
18035 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18036 #
18037 # This means that a value of 1.0 corresponds to a solid color, whereas
18038 # a value of 0.0 corresponds to a completely transparent color. This
18039 # uses a wrapper message rather than a simple float scalar so that it is
18040 # possible to distinguish between a default value and the value being unset.
18041 # If omitted, this color object is to be rendered as a solid color
18042 # (as if the alpha value had been explicitly given with a value of 1.0).
18043 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18044 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18045 },
18046 "type": "A String", # How the value should be interpreted.
18047 "value": "A String", # The value this interpolation point uses. May be a formula.
18048 # Unused if type is MIN or
18049 # MAX.
18050 },
18051 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
18052 # These pin the gradient color scale according to the color,
18053 # type and value chosen.
18054 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
18055 # for simplicity of conversion to/from color representations in various
18056 # languages over compactness; for example, the fields of this representation
18057 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18058 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18059 # method in iOS; and, with just a little work, it can be easily formatted into
18060 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18061 #
18062 # Example (Java):
18063 #
18064 # import com.google.type.Color;
18065 #
18066 # // ...
18067 # public static java.awt.Color fromProto(Color protocolor) {
18068 # float alpha = protocolor.hasAlpha()
18069 # ? protocolor.getAlpha().getValue()
18070 # : 1.0;
18071 #
18072 # return new java.awt.Color(
18073 # protocolor.getRed(),
18074 # protocolor.getGreen(),
18075 # protocolor.getBlue(),
18076 # alpha);
18077 # }
18078 #
18079 # public static Color toProto(java.awt.Color color) {
18080 # float red = (float) color.getRed();
18081 # float green = (float) color.getGreen();
18082 # float blue = (float) color.getBlue();
18083 # float denominator = 255.0;
18084 # Color.Builder resultBuilder =
18085 # Color
18086 # .newBuilder()
18087 # .setRed(red / denominator)
18088 # .setGreen(green / denominator)
18089 # .setBlue(blue / denominator);
18090 # int alpha = color.getAlpha();
18091 # if (alpha != 255) {
18092 # result.setAlpha(
18093 # FloatValue
18094 # .newBuilder()
18095 # .setValue(((float) alpha) / denominator)
18096 # .build());
18097 # }
18098 # return resultBuilder.build();
18099 # }
18100 # // ...
18101 #
18102 # Example (iOS / Obj-C):
18103 #
18104 # // ...
18105 # static UIColor* fromProto(Color* protocolor) {
18106 # float red = [protocolor red];
18107 # float green = [protocolor green];
18108 # float blue = [protocolor blue];
18109 # FloatValue* alpha_wrapper = [protocolor alpha];
18110 # float alpha = 1.0;
18111 # if (alpha_wrapper != nil) {
18112 # alpha = [alpha_wrapper value];
18113 # }
18114 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18115 # }
18116 #
18117 # static Color* toProto(UIColor* color) {
18118 # CGFloat red, green, blue, alpha;
18119 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18120 # return nil;
18121 # }
18122 # Color* result = [Color alloc] init];
18123 # [result setRed:red];
18124 # [result setGreen:green];
18125 # [result setBlue:blue];
18126 # if (alpha <= 0.9999) {
18127 # [result setAlpha:floatWrapperWithValue(alpha)];
18128 # }
18129 # [result autorelease];
18130 # return result;
18131 # }
18132 # // ...
18133 #
18134 # Example (JavaScript):
18135 #
18136 # // ...
18137 #
18138 # var protoToCssColor = function(rgb_color) {
18139 # var redFrac = rgb_color.red || 0.0;
18140 # var greenFrac = rgb_color.green || 0.0;
18141 # var blueFrac = rgb_color.blue || 0.0;
18142 # var red = Math.floor(redFrac * 255);
18143 # var green = Math.floor(greenFrac * 255);
18144 # var blue = Math.floor(blueFrac * 255);
18145 #
18146 # if (!('alpha' in rgb_color)) {
18147 # return rgbToCssColor_(red, green, blue);
18148 # }
18149 #
18150 # var alphaFrac = rgb_color.alpha.value || 0.0;
18151 # var rgbParams = [red, green, blue].join(',');
18152 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18153 # };
18154 #
18155 # var rgbToCssColor_ = function(red, green, blue) {
18156 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18157 # var hexString = rgbNumber.toString(16);
18158 # var missingZeros = 6 - hexString.length;
18159 # var resultBuilder = ['#'];
18160 # for (var i = 0; i < missingZeros; i++) {
18161 # resultBuilder.push('0');
18162 # }
18163 # resultBuilder.push(hexString);
18164 # return resultBuilder.join('');
18165 # };
18166 #
18167 # // ...
18168 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18169 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18170 # the final pixel color is defined by the equation:
18171 #
18172 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18173 #
18174 # This means that a value of 1.0 corresponds to a solid color, whereas
18175 # a value of 0.0 corresponds to a completely transparent color. This
18176 # uses a wrapper message rather than a simple float scalar so that it is
18177 # possible to distinguish between a default value and the value being unset.
18178 # If omitted, this color object is to be rendered as a solid color
18179 # (as if the alpha value had been explicitly given with a value of 1.0).
18180 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18181 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18182 },
18183 "type": "A String", # How the value should be interpreted.
18184 "value": "A String", # The value this interpolation point uses. May be a formula.
18185 # Unused if type is MIN or
18186 # MAX.
18187 },
18188 },
18189 },
18190 ],
18191 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
18192 { # A banded (alternating colors) range in a sheet.
18193 "range": { # A range on a sheet. # The range over which these properties are applied.
18194 # All indexes are zero-based.
18195 # Indexes are half open, e.g the start index is inclusive
18196 # and the end index is exclusive -- [start_index, end_index).
18197 # Missing indexes indicate the range is unbounded on that side.
18198 #
18199 # For example, if `"Sheet1"` is sheet ID 0, then:
18200 #
18201 # `Sheet1!A1:A1 == sheet_id: 0,
18202 # start_row_index: 0, end_row_index: 1,
18203 # start_column_index: 0, end_column_index: 1`
18204 #
18205 # `Sheet1!A3:B4 == sheet_id: 0,
18206 # start_row_index: 2, end_row_index: 4,
18207 # start_column_index: 0, end_column_index: 2`
18208 #
18209 # `Sheet1!A:B == sheet_id: 0,
18210 # start_column_index: 0, end_column_index: 2`
18211 #
18212 # `Sheet1!A5:B == sheet_id: 0,
18213 # start_row_index: 4,
18214 # start_column_index: 0, end_column_index: 2`
18215 #
18216 # `Sheet1 == sheet_id:0`
18217 #
18218 # The start index must always be less than or equal to the end index.
18219 # If the start index equals the end index, then the range is empty.
18220 # Empty ranges are typically not meaningful and are usually rendered in the
18221 # UI as `#REF!`.
18222 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070018223 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080018224 "sheetId": 42, # The sheet this range is on.
18225 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070018226 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080018227 },
18228 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
18229 # by-column basis throughout all the columns in the range. At least one of
18230 # row_properties or column_properties must be specified.
18231 # BandedRange.row_properties and BandedRange.column_properties are
18232 # set, the fill colors are applied to cells according to the following rules:
18233 #
18234 # * header_color and footer_color take priority over band colors.
18235 # * first_band_color takes priority over second_band_color.
18236 # * row_properties takes priority over column_properties.
18237 #
18238 # For example, the first row color takes priority over the first column
18239 # color, but the first column color takes priority over the second row color.
18240 # Similarly, the row header takes priority over the column header in the
18241 # top left cell, but the column header takes priority over the first row
18242 # color if the row header is not set.
18243 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
18244 # for simplicity of conversion to/from color representations in various
18245 # languages over compactness; for example, the fields of this representation
18246 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18247 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18248 # method in iOS; and, with just a little work, it can be easily formatted into
18249 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18250 #
18251 # Example (Java):
18252 #
18253 # import com.google.type.Color;
18254 #
18255 # // ...
18256 # public static java.awt.Color fromProto(Color protocolor) {
18257 # float alpha = protocolor.hasAlpha()
18258 # ? protocolor.getAlpha().getValue()
18259 # : 1.0;
18260 #
18261 # return new java.awt.Color(
18262 # protocolor.getRed(),
18263 # protocolor.getGreen(),
18264 # protocolor.getBlue(),
18265 # alpha);
18266 # }
18267 #
18268 # public static Color toProto(java.awt.Color color) {
18269 # float red = (float) color.getRed();
18270 # float green = (float) color.getGreen();
18271 # float blue = (float) color.getBlue();
18272 # float denominator = 255.0;
18273 # Color.Builder resultBuilder =
18274 # Color
18275 # .newBuilder()
18276 # .setRed(red / denominator)
18277 # .setGreen(green / denominator)
18278 # .setBlue(blue / denominator);
18279 # int alpha = color.getAlpha();
18280 # if (alpha != 255) {
18281 # result.setAlpha(
18282 # FloatValue
18283 # .newBuilder()
18284 # .setValue(((float) alpha) / denominator)
18285 # .build());
18286 # }
18287 # return resultBuilder.build();
18288 # }
18289 # // ...
18290 #
18291 # Example (iOS / Obj-C):
18292 #
18293 # // ...
18294 # static UIColor* fromProto(Color* protocolor) {
18295 # float red = [protocolor red];
18296 # float green = [protocolor green];
18297 # float blue = [protocolor blue];
18298 # FloatValue* alpha_wrapper = [protocolor alpha];
18299 # float alpha = 1.0;
18300 # if (alpha_wrapper != nil) {
18301 # alpha = [alpha_wrapper value];
18302 # }
18303 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18304 # }
18305 #
18306 # static Color* toProto(UIColor* color) {
18307 # CGFloat red, green, blue, alpha;
18308 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18309 # return nil;
18310 # }
18311 # Color* result = [Color alloc] init];
18312 # [result setRed:red];
18313 # [result setGreen:green];
18314 # [result setBlue:blue];
18315 # if (alpha <= 0.9999) {
18316 # [result setAlpha:floatWrapperWithValue(alpha)];
18317 # }
18318 # [result autorelease];
18319 # return result;
18320 # }
18321 # // ...
18322 #
18323 # Example (JavaScript):
18324 #
18325 # // ...
18326 #
18327 # var protoToCssColor = function(rgb_color) {
18328 # var redFrac = rgb_color.red || 0.0;
18329 # var greenFrac = rgb_color.green || 0.0;
18330 # var blueFrac = rgb_color.blue || 0.0;
18331 # var red = Math.floor(redFrac * 255);
18332 # var green = Math.floor(greenFrac * 255);
18333 # var blue = Math.floor(blueFrac * 255);
18334 #
18335 # if (!('alpha' in rgb_color)) {
18336 # return rgbToCssColor_(red, green, blue);
18337 # }
18338 #
18339 # var alphaFrac = rgb_color.alpha.value || 0.0;
18340 # var rgbParams = [red, green, blue].join(',');
18341 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18342 # };
18343 #
18344 # var rgbToCssColor_ = function(red, green, blue) {
18345 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18346 # var hexString = rgbNumber.toString(16);
18347 # var missingZeros = 6 - hexString.length;
18348 # var resultBuilder = ['#'];
18349 # for (var i = 0; i < missingZeros; i++) {
18350 # resultBuilder.push('0');
18351 # }
18352 # resultBuilder.push(hexString);
18353 # return resultBuilder.join('');
18354 # };
18355 #
18356 # // ...
18357 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18358 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18359 # the final pixel color is defined by the equation:
18360 #
18361 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18362 #
18363 # This means that a value of 1.0 corresponds to a solid color, whereas
18364 # a value of 0.0 corresponds to a completely transparent color. This
18365 # uses a wrapper message rather than a simple float scalar so that it is
18366 # possible to distinguish between a default value and the value being unset.
18367 # If omitted, this color object is to be rendered as a solid color
18368 # (as if the alpha value had been explicitly given with a value of 1.0).
18369 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18370 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18371 },
18372 "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
18373 # row or column will be filled with this color and the colors will
18374 # alternate between first_band_color and second_band_color starting
18375 # from the second row or column. Otherwise, the first row or column will be
18376 # filled with first_band_color and the colors will proceed to alternate
18377 # as they normally would.
18378 # for simplicity of conversion to/from color representations in various
18379 # languages over compactness; for example, the fields of this representation
18380 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18381 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18382 # method in iOS; and, with just a little work, it can be easily formatted into
18383 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18384 #
18385 # Example (Java):
18386 #
18387 # import com.google.type.Color;
18388 #
18389 # // ...
18390 # public static java.awt.Color fromProto(Color protocolor) {
18391 # float alpha = protocolor.hasAlpha()
18392 # ? protocolor.getAlpha().getValue()
18393 # : 1.0;
18394 #
18395 # return new java.awt.Color(
18396 # protocolor.getRed(),
18397 # protocolor.getGreen(),
18398 # protocolor.getBlue(),
18399 # alpha);
18400 # }
18401 #
18402 # public static Color toProto(java.awt.Color color) {
18403 # float red = (float) color.getRed();
18404 # float green = (float) color.getGreen();
18405 # float blue = (float) color.getBlue();
18406 # float denominator = 255.0;
18407 # Color.Builder resultBuilder =
18408 # Color
18409 # .newBuilder()
18410 # .setRed(red / denominator)
18411 # .setGreen(green / denominator)
18412 # .setBlue(blue / denominator);
18413 # int alpha = color.getAlpha();
18414 # if (alpha != 255) {
18415 # result.setAlpha(
18416 # FloatValue
18417 # .newBuilder()
18418 # .setValue(((float) alpha) / denominator)
18419 # .build());
18420 # }
18421 # return resultBuilder.build();
18422 # }
18423 # // ...
18424 #
18425 # Example (iOS / Obj-C):
18426 #
18427 # // ...
18428 # static UIColor* fromProto(Color* protocolor) {
18429 # float red = [protocolor red];
18430 # float green = [protocolor green];
18431 # float blue = [protocolor blue];
18432 # FloatValue* alpha_wrapper = [protocolor alpha];
18433 # float alpha = 1.0;
18434 # if (alpha_wrapper != nil) {
18435 # alpha = [alpha_wrapper value];
18436 # }
18437 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18438 # }
18439 #
18440 # static Color* toProto(UIColor* color) {
18441 # CGFloat red, green, blue, alpha;
18442 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18443 # return nil;
18444 # }
18445 # Color* result = [Color alloc] init];
18446 # [result setRed:red];
18447 # [result setGreen:green];
18448 # [result setBlue:blue];
18449 # if (alpha <= 0.9999) {
18450 # [result setAlpha:floatWrapperWithValue(alpha)];
18451 # }
18452 # [result autorelease];
18453 # return result;
18454 # }
18455 # // ...
18456 #
18457 # Example (JavaScript):
18458 #
18459 # // ...
18460 #
18461 # var protoToCssColor = function(rgb_color) {
18462 # var redFrac = rgb_color.red || 0.0;
18463 # var greenFrac = rgb_color.green || 0.0;
18464 # var blueFrac = rgb_color.blue || 0.0;
18465 # var red = Math.floor(redFrac * 255);
18466 # var green = Math.floor(greenFrac * 255);
18467 # var blue = Math.floor(blueFrac * 255);
18468 #
18469 # if (!('alpha' in rgb_color)) {
18470 # return rgbToCssColor_(red, green, blue);
18471 # }
18472 #
18473 # var alphaFrac = rgb_color.alpha.value || 0.0;
18474 # var rgbParams = [red, green, blue].join(',');
18475 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18476 # };
18477 #
18478 # var rgbToCssColor_ = function(red, green, blue) {
18479 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18480 # var hexString = rgbNumber.toString(16);
18481 # var missingZeros = 6 - hexString.length;
18482 # var resultBuilder = ['#'];
18483 # for (var i = 0; i < missingZeros; i++) {
18484 # resultBuilder.push('0');
18485 # }
18486 # resultBuilder.push(hexString);
18487 # return resultBuilder.join('');
18488 # };
18489 #
18490 # // ...
18491 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18492 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18493 # the final pixel color is defined by the equation:
18494 #
18495 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18496 #
18497 # This means that a value of 1.0 corresponds to a solid color, whereas
18498 # a value of 0.0 corresponds to a completely transparent color. This
18499 # uses a wrapper message rather than a simple float scalar so that it is
18500 # possible to distinguish between a default value and the value being unset.
18501 # If omitted, this color object is to be rendered as a solid color
18502 # (as if the alpha value had been explicitly given with a value of 1.0).
18503 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18504 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18505 },
18506 "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
18507 # row or column will be filled with either first_band_color or
18508 # second_band_color, depending on the color of the previous row or
18509 # column.
18510 # for simplicity of conversion to/from color representations in various
18511 # languages over compactness; for example, the fields of this representation
18512 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18513 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18514 # method in iOS; and, with just a little work, it can be easily formatted into
18515 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18516 #
18517 # Example (Java):
18518 #
18519 # import com.google.type.Color;
18520 #
18521 # // ...
18522 # public static java.awt.Color fromProto(Color protocolor) {
18523 # float alpha = protocolor.hasAlpha()
18524 # ? protocolor.getAlpha().getValue()
18525 # : 1.0;
18526 #
18527 # return new java.awt.Color(
18528 # protocolor.getRed(),
18529 # protocolor.getGreen(),
18530 # protocolor.getBlue(),
18531 # alpha);
18532 # }
18533 #
18534 # public static Color toProto(java.awt.Color color) {
18535 # float red = (float) color.getRed();
18536 # float green = (float) color.getGreen();
18537 # float blue = (float) color.getBlue();
18538 # float denominator = 255.0;
18539 # Color.Builder resultBuilder =
18540 # Color
18541 # .newBuilder()
18542 # .setRed(red / denominator)
18543 # .setGreen(green / denominator)
18544 # .setBlue(blue / denominator);
18545 # int alpha = color.getAlpha();
18546 # if (alpha != 255) {
18547 # result.setAlpha(
18548 # FloatValue
18549 # .newBuilder()
18550 # .setValue(((float) alpha) / denominator)
18551 # .build());
18552 # }
18553 # return resultBuilder.build();
18554 # }
18555 # // ...
18556 #
18557 # Example (iOS / Obj-C):
18558 #
18559 # // ...
18560 # static UIColor* fromProto(Color* protocolor) {
18561 # float red = [protocolor red];
18562 # float green = [protocolor green];
18563 # float blue = [protocolor blue];
18564 # FloatValue* alpha_wrapper = [protocolor alpha];
18565 # float alpha = 1.0;
18566 # if (alpha_wrapper != nil) {
18567 # alpha = [alpha_wrapper value];
18568 # }
18569 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18570 # }
18571 #
18572 # static Color* toProto(UIColor* color) {
18573 # CGFloat red, green, blue, alpha;
18574 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18575 # return nil;
18576 # }
18577 # Color* result = [Color alloc] init];
18578 # [result setRed:red];
18579 # [result setGreen:green];
18580 # [result setBlue:blue];
18581 # if (alpha <= 0.9999) {
18582 # [result setAlpha:floatWrapperWithValue(alpha)];
18583 # }
18584 # [result autorelease];
18585 # return result;
18586 # }
18587 # // ...
18588 #
18589 # Example (JavaScript):
18590 #
18591 # // ...
18592 #
18593 # var protoToCssColor = function(rgb_color) {
18594 # var redFrac = rgb_color.red || 0.0;
18595 # var greenFrac = rgb_color.green || 0.0;
18596 # var blueFrac = rgb_color.blue || 0.0;
18597 # var red = Math.floor(redFrac * 255);
18598 # var green = Math.floor(greenFrac * 255);
18599 # var blue = Math.floor(blueFrac * 255);
18600 #
18601 # if (!('alpha' in rgb_color)) {
18602 # return rgbToCssColor_(red, green, blue);
18603 # }
18604 #
18605 # var alphaFrac = rgb_color.alpha.value || 0.0;
18606 # var rgbParams = [red, green, blue].join(',');
18607 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18608 # };
18609 #
18610 # var rgbToCssColor_ = function(red, green, blue) {
18611 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18612 # var hexString = rgbNumber.toString(16);
18613 # var missingZeros = 6 - hexString.length;
18614 # var resultBuilder = ['#'];
18615 # for (var i = 0; i < missingZeros; i++) {
18616 # resultBuilder.push('0');
18617 # }
18618 # resultBuilder.push(hexString);
18619 # return resultBuilder.join('');
18620 # };
18621 #
18622 # // ...
18623 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18624 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18625 # the final pixel color is defined by the equation:
18626 #
18627 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18628 #
18629 # This means that a value of 1.0 corresponds to a solid color, whereas
18630 # a value of 0.0 corresponds to a completely transparent color. This
18631 # uses a wrapper message rather than a simple float scalar so that it is
18632 # possible to distinguish between a default value and the value being unset.
18633 # If omitted, this color object is to be rendered as a solid color
18634 # (as if the alpha value had been explicitly given with a value of 1.0).
18635 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18636 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18637 },
18638 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
18639 # for simplicity of conversion to/from color representations in various
18640 # languages over compactness; for example, the fields of this representation
18641 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18642 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18643 # method in iOS; and, with just a little work, it can be easily formatted into
18644 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18645 #
18646 # Example (Java):
18647 #
18648 # import com.google.type.Color;
18649 #
18650 # // ...
18651 # public static java.awt.Color fromProto(Color protocolor) {
18652 # float alpha = protocolor.hasAlpha()
18653 # ? protocolor.getAlpha().getValue()
18654 # : 1.0;
18655 #
18656 # return new java.awt.Color(
18657 # protocolor.getRed(),
18658 # protocolor.getGreen(),
18659 # protocolor.getBlue(),
18660 # alpha);
18661 # }
18662 #
18663 # public static Color toProto(java.awt.Color color) {
18664 # float red = (float) color.getRed();
18665 # float green = (float) color.getGreen();
18666 # float blue = (float) color.getBlue();
18667 # float denominator = 255.0;
18668 # Color.Builder resultBuilder =
18669 # Color
18670 # .newBuilder()
18671 # .setRed(red / denominator)
18672 # .setGreen(green / denominator)
18673 # .setBlue(blue / denominator);
18674 # int alpha = color.getAlpha();
18675 # if (alpha != 255) {
18676 # result.setAlpha(
18677 # FloatValue
18678 # .newBuilder()
18679 # .setValue(((float) alpha) / denominator)
18680 # .build());
18681 # }
18682 # return resultBuilder.build();
18683 # }
18684 # // ...
18685 #
18686 # Example (iOS / Obj-C):
18687 #
18688 # // ...
18689 # static UIColor* fromProto(Color* protocolor) {
18690 # float red = [protocolor red];
18691 # float green = [protocolor green];
18692 # float blue = [protocolor blue];
18693 # FloatValue* alpha_wrapper = [protocolor alpha];
18694 # float alpha = 1.0;
18695 # if (alpha_wrapper != nil) {
18696 # alpha = [alpha_wrapper value];
18697 # }
18698 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18699 # }
18700 #
18701 # static Color* toProto(UIColor* color) {
18702 # CGFloat red, green, blue, alpha;
18703 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18704 # return nil;
18705 # }
18706 # Color* result = [Color alloc] init];
18707 # [result setRed:red];
18708 # [result setGreen:green];
18709 # [result setBlue:blue];
18710 # if (alpha <= 0.9999) {
18711 # [result setAlpha:floatWrapperWithValue(alpha)];
18712 # }
18713 # [result autorelease];
18714 # return result;
18715 # }
18716 # // ...
18717 #
18718 # Example (JavaScript):
18719 #
18720 # // ...
18721 #
18722 # var protoToCssColor = function(rgb_color) {
18723 # var redFrac = rgb_color.red || 0.0;
18724 # var greenFrac = rgb_color.green || 0.0;
18725 # var blueFrac = rgb_color.blue || 0.0;
18726 # var red = Math.floor(redFrac * 255);
18727 # var green = Math.floor(greenFrac * 255);
18728 # var blue = Math.floor(blueFrac * 255);
18729 #
18730 # if (!('alpha' in rgb_color)) {
18731 # return rgbToCssColor_(red, green, blue);
18732 # }
18733 #
18734 # var alphaFrac = rgb_color.alpha.value || 0.0;
18735 # var rgbParams = [red, green, blue].join(',');
18736 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18737 # };
18738 #
18739 # var rgbToCssColor_ = function(red, green, blue) {
18740 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18741 # var hexString = rgbNumber.toString(16);
18742 # var missingZeros = 6 - hexString.length;
18743 # var resultBuilder = ['#'];
18744 # for (var i = 0; i < missingZeros; i++) {
18745 # resultBuilder.push('0');
18746 # }
18747 # resultBuilder.push(hexString);
18748 # return resultBuilder.join('');
18749 # };
18750 #
18751 # // ...
18752 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18753 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18754 # the final pixel color is defined by the equation:
18755 #
18756 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18757 #
18758 # This means that a value of 1.0 corresponds to a solid color, whereas
18759 # a value of 0.0 corresponds to a completely transparent color. This
18760 # uses a wrapper message rather than a simple float scalar so that it is
18761 # possible to distinguish between a default value and the value being unset.
18762 # If omitted, this color object is to be rendered as a solid color
18763 # (as if the alpha value had been explicitly given with a value of 1.0).
18764 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18765 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18766 },
18767 },
18768 "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
18769 # basis throughout all the rows in the range. At least one of
18770 # row_properties or column_properties must be specified.
18771 # BandedRange.row_properties and BandedRange.column_properties are
18772 # set, the fill colors are applied to cells according to the following rules:
18773 #
18774 # * header_color and footer_color take priority over band colors.
18775 # * first_band_color takes priority over second_band_color.
18776 # * row_properties takes priority over column_properties.
18777 #
18778 # For example, the first row color takes priority over the first column
18779 # color, but the first column color takes priority over the second row color.
18780 # Similarly, the row header takes priority over the column header in the
18781 # top left cell, but the column header takes priority over the first row
18782 # color if the row header is not set.
18783 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
18784 # for simplicity of conversion to/from color representations in various
18785 # languages over compactness; for example, the fields of this representation
18786 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18787 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18788 # method in iOS; and, with just a little work, it can be easily formatted into
18789 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18790 #
18791 # Example (Java):
18792 #
18793 # import com.google.type.Color;
18794 #
18795 # // ...
18796 # public static java.awt.Color fromProto(Color protocolor) {
18797 # float alpha = protocolor.hasAlpha()
18798 # ? protocolor.getAlpha().getValue()
18799 # : 1.0;
18800 #
18801 # return new java.awt.Color(
18802 # protocolor.getRed(),
18803 # protocolor.getGreen(),
18804 # protocolor.getBlue(),
18805 # alpha);
18806 # }
18807 #
18808 # public static Color toProto(java.awt.Color color) {
18809 # float red = (float) color.getRed();
18810 # float green = (float) color.getGreen();
18811 # float blue = (float) color.getBlue();
18812 # float denominator = 255.0;
18813 # Color.Builder resultBuilder =
18814 # Color
18815 # .newBuilder()
18816 # .setRed(red / denominator)
18817 # .setGreen(green / denominator)
18818 # .setBlue(blue / denominator);
18819 # int alpha = color.getAlpha();
18820 # if (alpha != 255) {
18821 # result.setAlpha(
18822 # FloatValue
18823 # .newBuilder()
18824 # .setValue(((float) alpha) / denominator)
18825 # .build());
18826 # }
18827 # return resultBuilder.build();
18828 # }
18829 # // ...
18830 #
18831 # Example (iOS / Obj-C):
18832 #
18833 # // ...
18834 # static UIColor* fromProto(Color* protocolor) {
18835 # float red = [protocolor red];
18836 # float green = [protocolor green];
18837 # float blue = [protocolor blue];
18838 # FloatValue* alpha_wrapper = [protocolor alpha];
18839 # float alpha = 1.0;
18840 # if (alpha_wrapper != nil) {
18841 # alpha = [alpha_wrapper value];
18842 # }
18843 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18844 # }
18845 #
18846 # static Color* toProto(UIColor* color) {
18847 # CGFloat red, green, blue, alpha;
18848 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18849 # return nil;
18850 # }
18851 # Color* result = [Color alloc] init];
18852 # [result setRed:red];
18853 # [result setGreen:green];
18854 # [result setBlue:blue];
18855 # if (alpha <= 0.9999) {
18856 # [result setAlpha:floatWrapperWithValue(alpha)];
18857 # }
18858 # [result autorelease];
18859 # return result;
18860 # }
18861 # // ...
18862 #
18863 # Example (JavaScript):
18864 #
18865 # // ...
18866 #
18867 # var protoToCssColor = function(rgb_color) {
18868 # var redFrac = rgb_color.red || 0.0;
18869 # var greenFrac = rgb_color.green || 0.0;
18870 # var blueFrac = rgb_color.blue || 0.0;
18871 # var red = Math.floor(redFrac * 255);
18872 # var green = Math.floor(greenFrac * 255);
18873 # var blue = Math.floor(blueFrac * 255);
18874 #
18875 # if (!('alpha' in rgb_color)) {
18876 # return rgbToCssColor_(red, green, blue);
18877 # }
18878 #
18879 # var alphaFrac = rgb_color.alpha.value || 0.0;
18880 # var rgbParams = [red, green, blue].join(',');
18881 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
18882 # };
18883 #
18884 # var rgbToCssColor_ = function(red, green, blue) {
18885 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
18886 # var hexString = rgbNumber.toString(16);
18887 # var missingZeros = 6 - hexString.length;
18888 # var resultBuilder = ['#'];
18889 # for (var i = 0; i < missingZeros; i++) {
18890 # resultBuilder.push('0');
18891 # }
18892 # resultBuilder.push(hexString);
18893 # return resultBuilder.join('');
18894 # };
18895 #
18896 # // ...
18897 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
18898 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
18899 # the final pixel color is defined by the equation:
18900 #
18901 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
18902 #
18903 # This means that a value of 1.0 corresponds to a solid color, whereas
18904 # a value of 0.0 corresponds to a completely transparent color. This
18905 # uses a wrapper message rather than a simple float scalar so that it is
18906 # possible to distinguish between a default value and the value being unset.
18907 # If omitted, this color object is to be rendered as a solid color
18908 # (as if the alpha value had been explicitly given with a value of 1.0).
18909 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
18910 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
18911 },
18912 "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
18913 # row or column will be filled with this color and the colors will
18914 # alternate between first_band_color and second_band_color starting
18915 # from the second row or column. Otherwise, the first row or column will be
18916 # filled with first_band_color and the colors will proceed to alternate
18917 # as they normally would.
18918 # for simplicity of conversion to/from color representations in various
18919 # languages over compactness; for example, the fields of this representation
18920 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
18921 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
18922 # method in iOS; and, with just a little work, it can be easily formatted into
18923 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
18924 #
18925 # Example (Java):
18926 #
18927 # import com.google.type.Color;
18928 #
18929 # // ...
18930 # public static java.awt.Color fromProto(Color protocolor) {
18931 # float alpha = protocolor.hasAlpha()
18932 # ? protocolor.getAlpha().getValue()
18933 # : 1.0;
18934 #
18935 # return new java.awt.Color(
18936 # protocolor.getRed(),
18937 # protocolor.getGreen(),
18938 # protocolor.getBlue(),
18939 # alpha);
18940 # }
18941 #
18942 # public static Color toProto(java.awt.Color color) {
18943 # float red = (float) color.getRed();
18944 # float green = (float) color.getGreen();
18945 # float blue = (float) color.getBlue();
18946 # float denominator = 255.0;
18947 # Color.Builder resultBuilder =
18948 # Color
18949 # .newBuilder()
18950 # .setRed(red / denominator)
18951 # .setGreen(green / denominator)
18952 # .setBlue(blue / denominator);
18953 # int alpha = color.getAlpha();
18954 # if (alpha != 255) {
18955 # result.setAlpha(
18956 # FloatValue
18957 # .newBuilder()
18958 # .setValue(((float) alpha) / denominator)
18959 # .build());
18960 # }
18961 # return resultBuilder.build();
18962 # }
18963 # // ...
18964 #
18965 # Example (iOS / Obj-C):
18966 #
18967 # // ...
18968 # static UIColor* fromProto(Color* protocolor) {
18969 # float red = [protocolor red];
18970 # float green = [protocolor green];
18971 # float blue = [protocolor blue];
18972 # FloatValue* alpha_wrapper = [protocolor alpha];
18973 # float alpha = 1.0;
18974 # if (alpha_wrapper != nil) {
18975 # alpha = [alpha_wrapper value];
18976 # }
18977 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
18978 # }
18979 #
18980 # static Color* toProto(UIColor* color) {
18981 # CGFloat red, green, blue, alpha;
18982 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
18983 # return nil;
18984 # }
18985 # Color* result = [Color alloc] init];
18986 # [result setRed:red];
18987 # [result setGreen:green];
18988 # [result setBlue:blue];
18989 # if (alpha <= 0.9999) {
18990 # [result setAlpha:floatWrapperWithValue(alpha)];
18991 # }
18992 # [result autorelease];
18993 # return result;
18994 # }
18995 # // ...
18996 #
18997 # Example (JavaScript):
18998 #
18999 # // ...
19000 #
19001 # var protoToCssColor = function(rgb_color) {
19002 # var redFrac = rgb_color.red || 0.0;
19003 # var greenFrac = rgb_color.green || 0.0;
19004 # var blueFrac = rgb_color.blue || 0.0;
19005 # var red = Math.floor(redFrac * 255);
19006 # var green = Math.floor(greenFrac * 255);
19007 # var blue = Math.floor(blueFrac * 255);
19008 #
19009 # if (!('alpha' in rgb_color)) {
19010 # return rgbToCssColor_(red, green, blue);
19011 # }
19012 #
19013 # var alphaFrac = rgb_color.alpha.value || 0.0;
19014 # var rgbParams = [red, green, blue].join(',');
19015 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19016 # };
19017 #
19018 # var rgbToCssColor_ = function(red, green, blue) {
19019 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19020 # var hexString = rgbNumber.toString(16);
19021 # var missingZeros = 6 - hexString.length;
19022 # var resultBuilder = ['#'];
19023 # for (var i = 0; i < missingZeros; i++) {
19024 # resultBuilder.push('0');
19025 # }
19026 # resultBuilder.push(hexString);
19027 # return resultBuilder.join('');
19028 # };
19029 #
19030 # // ...
19031 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19032 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19033 # the final pixel color is defined by the equation:
19034 #
19035 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19036 #
19037 # This means that a value of 1.0 corresponds to a solid color, whereas
19038 # a value of 0.0 corresponds to a completely transparent color. This
19039 # uses a wrapper message rather than a simple float scalar so that it is
19040 # possible to distinguish between a default value and the value being unset.
19041 # If omitted, this color object is to be rendered as a solid color
19042 # (as if the alpha value had been explicitly given with a value of 1.0).
19043 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19044 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19045 },
19046 "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
19047 # row or column will be filled with either first_band_color or
19048 # second_band_color, depending on the color of the previous row or
19049 # column.
19050 # for simplicity of conversion to/from color representations in various
19051 # languages over compactness; for example, the fields of this representation
19052 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19053 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19054 # method in iOS; and, with just a little work, it can be easily formatted into
19055 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19056 #
19057 # Example (Java):
19058 #
19059 # import com.google.type.Color;
19060 #
19061 # // ...
19062 # public static java.awt.Color fromProto(Color protocolor) {
19063 # float alpha = protocolor.hasAlpha()
19064 # ? protocolor.getAlpha().getValue()
19065 # : 1.0;
19066 #
19067 # return new java.awt.Color(
19068 # protocolor.getRed(),
19069 # protocolor.getGreen(),
19070 # protocolor.getBlue(),
19071 # alpha);
19072 # }
19073 #
19074 # public static Color toProto(java.awt.Color color) {
19075 # float red = (float) color.getRed();
19076 # float green = (float) color.getGreen();
19077 # float blue = (float) color.getBlue();
19078 # float denominator = 255.0;
19079 # Color.Builder resultBuilder =
19080 # Color
19081 # .newBuilder()
19082 # .setRed(red / denominator)
19083 # .setGreen(green / denominator)
19084 # .setBlue(blue / denominator);
19085 # int alpha = color.getAlpha();
19086 # if (alpha != 255) {
19087 # result.setAlpha(
19088 # FloatValue
19089 # .newBuilder()
19090 # .setValue(((float) alpha) / denominator)
19091 # .build());
19092 # }
19093 # return resultBuilder.build();
19094 # }
19095 # // ...
19096 #
19097 # Example (iOS / Obj-C):
19098 #
19099 # // ...
19100 # static UIColor* fromProto(Color* protocolor) {
19101 # float red = [protocolor red];
19102 # float green = [protocolor green];
19103 # float blue = [protocolor blue];
19104 # FloatValue* alpha_wrapper = [protocolor alpha];
19105 # float alpha = 1.0;
19106 # if (alpha_wrapper != nil) {
19107 # alpha = [alpha_wrapper value];
19108 # }
19109 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19110 # }
19111 #
19112 # static Color* toProto(UIColor* color) {
19113 # CGFloat red, green, blue, alpha;
19114 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19115 # return nil;
19116 # }
19117 # Color* result = [Color alloc] init];
19118 # [result setRed:red];
19119 # [result setGreen:green];
19120 # [result setBlue:blue];
19121 # if (alpha <= 0.9999) {
19122 # [result setAlpha:floatWrapperWithValue(alpha)];
19123 # }
19124 # [result autorelease];
19125 # return result;
19126 # }
19127 # // ...
19128 #
19129 # Example (JavaScript):
19130 #
19131 # // ...
19132 #
19133 # var protoToCssColor = function(rgb_color) {
19134 # var redFrac = rgb_color.red || 0.0;
19135 # var greenFrac = rgb_color.green || 0.0;
19136 # var blueFrac = rgb_color.blue || 0.0;
19137 # var red = Math.floor(redFrac * 255);
19138 # var green = Math.floor(greenFrac * 255);
19139 # var blue = Math.floor(blueFrac * 255);
19140 #
19141 # if (!('alpha' in rgb_color)) {
19142 # return rgbToCssColor_(red, green, blue);
19143 # }
19144 #
19145 # var alphaFrac = rgb_color.alpha.value || 0.0;
19146 # var rgbParams = [red, green, blue].join(',');
19147 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19148 # };
19149 #
19150 # var rgbToCssColor_ = function(red, green, blue) {
19151 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19152 # var hexString = rgbNumber.toString(16);
19153 # var missingZeros = 6 - hexString.length;
19154 # var resultBuilder = ['#'];
19155 # for (var i = 0; i < missingZeros; i++) {
19156 # resultBuilder.push('0');
19157 # }
19158 # resultBuilder.push(hexString);
19159 # return resultBuilder.join('');
19160 # };
19161 #
19162 # // ...
19163 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19164 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19165 # the final pixel color is defined by the equation:
19166 #
19167 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19168 #
19169 # This means that a value of 1.0 corresponds to a solid color, whereas
19170 # a value of 0.0 corresponds to a completely transparent color. This
19171 # uses a wrapper message rather than a simple float scalar so that it is
19172 # possible to distinguish between a default value and the value being unset.
19173 # If omitted, this color object is to be rendered as a solid color
19174 # (as if the alpha value had been explicitly given with a value of 1.0).
19175 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19176 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19177 },
19178 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
19179 # for simplicity of conversion to/from color representations in various
19180 # languages over compactness; for example, the fields of this representation
19181 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19182 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19183 # method in iOS; and, with just a little work, it can be easily formatted into
19184 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19185 #
19186 # Example (Java):
19187 #
19188 # import com.google.type.Color;
19189 #
19190 # // ...
19191 # public static java.awt.Color fromProto(Color protocolor) {
19192 # float alpha = protocolor.hasAlpha()
19193 # ? protocolor.getAlpha().getValue()
19194 # : 1.0;
19195 #
19196 # return new java.awt.Color(
19197 # protocolor.getRed(),
19198 # protocolor.getGreen(),
19199 # protocolor.getBlue(),
19200 # alpha);
19201 # }
19202 #
19203 # public static Color toProto(java.awt.Color color) {
19204 # float red = (float) color.getRed();
19205 # float green = (float) color.getGreen();
19206 # float blue = (float) color.getBlue();
19207 # float denominator = 255.0;
19208 # Color.Builder resultBuilder =
19209 # Color
19210 # .newBuilder()
19211 # .setRed(red / denominator)
19212 # .setGreen(green / denominator)
19213 # .setBlue(blue / denominator);
19214 # int alpha = color.getAlpha();
19215 # if (alpha != 255) {
19216 # result.setAlpha(
19217 # FloatValue
19218 # .newBuilder()
19219 # .setValue(((float) alpha) / denominator)
19220 # .build());
19221 # }
19222 # return resultBuilder.build();
19223 # }
19224 # // ...
19225 #
19226 # Example (iOS / Obj-C):
19227 #
19228 # // ...
19229 # static UIColor* fromProto(Color* protocolor) {
19230 # float red = [protocolor red];
19231 # float green = [protocolor green];
19232 # float blue = [protocolor blue];
19233 # FloatValue* alpha_wrapper = [protocolor alpha];
19234 # float alpha = 1.0;
19235 # if (alpha_wrapper != nil) {
19236 # alpha = [alpha_wrapper value];
19237 # }
19238 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19239 # }
19240 #
19241 # static Color* toProto(UIColor* color) {
19242 # CGFloat red, green, blue, alpha;
19243 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19244 # return nil;
19245 # }
19246 # Color* result = [Color alloc] init];
19247 # [result setRed:red];
19248 # [result setGreen:green];
19249 # [result setBlue:blue];
19250 # if (alpha <= 0.9999) {
19251 # [result setAlpha:floatWrapperWithValue(alpha)];
19252 # }
19253 # [result autorelease];
19254 # return result;
19255 # }
19256 # // ...
19257 #
19258 # Example (JavaScript):
19259 #
19260 # // ...
19261 #
19262 # var protoToCssColor = function(rgb_color) {
19263 # var redFrac = rgb_color.red || 0.0;
19264 # var greenFrac = rgb_color.green || 0.0;
19265 # var blueFrac = rgb_color.blue || 0.0;
19266 # var red = Math.floor(redFrac * 255);
19267 # var green = Math.floor(greenFrac * 255);
19268 # var blue = Math.floor(blueFrac * 255);
19269 #
19270 # if (!('alpha' in rgb_color)) {
19271 # return rgbToCssColor_(red, green, blue);
19272 # }
19273 #
19274 # var alphaFrac = rgb_color.alpha.value || 0.0;
19275 # var rgbParams = [red, green, blue].join(',');
19276 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19277 # };
19278 #
19279 # var rgbToCssColor_ = function(red, green, blue) {
19280 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19281 # var hexString = rgbNumber.toString(16);
19282 # var missingZeros = 6 - hexString.length;
19283 # var resultBuilder = ['#'];
19284 # for (var i = 0; i < missingZeros; i++) {
19285 # resultBuilder.push('0');
19286 # }
19287 # resultBuilder.push(hexString);
19288 # return resultBuilder.join('');
19289 # };
19290 #
19291 # // ...
19292 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19293 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19294 # the final pixel color is defined by the equation:
19295 #
19296 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19297 #
19298 # This means that a value of 1.0 corresponds to a solid color, whereas
19299 # a value of 0.0 corresponds to a completely transparent color. This
19300 # uses a wrapper message rather than a simple float scalar so that it is
19301 # possible to distinguish between a default value and the value being unset.
19302 # If omitted, this color object is to be rendered as a solid color
19303 # (as if the alpha value had been explicitly given with a value of 1.0).
19304 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19305 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19306 },
19307 },
19308 "bandedRangeId": 42, # The id of the banded range.
19309 },
19310 ],
19311 "merges": [ # The ranges that are merged together.
19312 { # A range on a sheet.
19313 # All indexes are zero-based.
19314 # Indexes are half open, e.g the start index is inclusive
19315 # and the end index is exclusive -- [start_index, end_index).
19316 # Missing indexes indicate the range is unbounded on that side.
19317 #
19318 # For example, if `"Sheet1"` is sheet ID 0, then:
19319 #
19320 # `Sheet1!A1:A1 == sheet_id: 0,
19321 # start_row_index: 0, end_row_index: 1,
19322 # start_column_index: 0, end_column_index: 1`
19323 #
19324 # `Sheet1!A3:B4 == sheet_id: 0,
19325 # start_row_index: 2, end_row_index: 4,
19326 # start_column_index: 0, end_column_index: 2`
19327 #
19328 # `Sheet1!A:B == sheet_id: 0,
19329 # start_column_index: 0, end_column_index: 2`
19330 #
19331 # `Sheet1!A5:B == sheet_id: 0,
19332 # start_row_index: 4,
19333 # start_column_index: 0, end_column_index: 2`
19334 #
19335 # `Sheet1 == sheet_id:0`
19336 #
19337 # The start index must always be less than or equal to the end index.
19338 # If the start index equals the end index, then the range is empty.
19339 # Empty ranges are typically not meaningful and are usually rendered in the
19340 # UI as `#REF!`.
19341 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019342 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019343 "sheetId": 42, # The sheet this range is on.
19344 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019345 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019346 },
19347 ],
19348 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
19349 "range": { # A range on a sheet. # The range the filter covers.
19350 # All indexes are zero-based.
19351 # Indexes are half open, e.g the start index is inclusive
19352 # and the end index is exclusive -- [start_index, end_index).
19353 # Missing indexes indicate the range is unbounded on that side.
19354 #
19355 # For example, if `"Sheet1"` is sheet ID 0, then:
19356 #
19357 # `Sheet1!A1:A1 == sheet_id: 0,
19358 # start_row_index: 0, end_row_index: 1,
19359 # start_column_index: 0, end_column_index: 1`
19360 #
19361 # `Sheet1!A3:B4 == sheet_id: 0,
19362 # start_row_index: 2, end_row_index: 4,
19363 # start_column_index: 0, end_column_index: 2`
19364 #
19365 # `Sheet1!A:B == sheet_id: 0,
19366 # start_column_index: 0, end_column_index: 2`
19367 #
19368 # `Sheet1!A5:B == sheet_id: 0,
19369 # start_row_index: 4,
19370 # start_column_index: 0, end_column_index: 2`
19371 #
19372 # `Sheet1 == sheet_id:0`
19373 #
19374 # The start index must always be less than or equal to the end index.
19375 # If the start index equals the end index, then the range is empty.
19376 # Empty ranges are typically not meaningful and are usually rendered in the
19377 # UI as `#REF!`.
19378 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019379 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019380 "sheetId": 42, # The sheet this range is on.
19381 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019382 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019383 },
19384 "sortSpecs": [ # The sort order per column. Later specifications are used when values
19385 # are equal in the earlier specifications.
19386 { # A sort order associated with a specific column or row.
19387 "sortOrder": "A String", # The order data should be sorted.
19388 "dimensionIndex": 42, # The dimension the sort should be applied to.
19389 },
19390 ],
19391 "criteria": { # The criteria for showing/hiding values per column.
19392 # The map's key is the column index, and the value is the criteria for
19393 # that column.
19394 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
19395 "hiddenValues": [ # Values that should be hidden.
19396 "A String",
19397 ],
19398 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
19399 # (This does not override hiddenValues -- if a value is listed there,
19400 # it will still be hidden.)
19401 # BooleanConditions are used by conditional formatting,
19402 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019403 "values": [ # The values of the condition. The number of supported values depends
19404 # on the condition type. Some support zero values,
19405 # others one or two values,
19406 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19407 { # The value of the condition.
19408 "relativeDate": "A String", # A relative date (based on the current date).
19409 # Valid only if the type is
19410 # DATE_BEFORE,
19411 # DATE_AFTER,
19412 # DATE_ON_OR_BEFORE or
19413 # DATE_ON_OR_AFTER.
19414 #
19415 # Relative dates are not supported in data validation.
19416 # They are supported only in conditional formatting and
19417 # conditional filters.
19418 "userEnteredValue": "A String", # A value the condition is based on.
19419 # The value will be parsed as if the user typed into a cell.
19420 # Formulas are supported (and must begin with an `=`).
19421 },
19422 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019423 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019424 },
19425 },
19426 },
19427 },
19428 "charts": [ # The specifications of every chart on this sheet.
19429 { # A chart embedded in a sheet.
19430 "chartId": 42, # The ID of the chart.
19431 "position": { # The position of an embedded object such as a chart. # The position of the chart.
19432 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
19433 # is chosen for you. Used only when writing.
19434 "sheetId": 42, # The sheet this is on. Set only if the embedded object
19435 # is on its own sheet. Must be non-negative.
19436 "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.
19437 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
19438 # All indexes are zero-based.
19439 "rowIndex": 42, # The row index of the coordinate.
19440 "columnIndex": 42, # The column index of the coordinate.
19441 "sheetId": 42, # The sheet this coordinate is on.
19442 },
19443 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
19444 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070019445 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019446 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
19447 # from the anchor cell.
19448 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
19449 },
19450 },
19451 "spec": { # The specifications of a chart. # The specification of the chart.
19452 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
19453 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
19454 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
19455 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19456 "sources": [ # The ranges of data for a series or domain.
19457 # Exactly one dimension must have a length of 1,
19458 # and all sources in the list must have the same dimension
19459 # with length 1.
19460 # The domain (if it exists) & all series must have the same number
19461 # of source ranges. If using more than one source range, then the source
19462 # range at a given offset must be contiguous across the domain and series.
19463 #
19464 # For example, these are valid configurations:
19465 #
19466 # domain sources: A1:A5
19467 # series1 sources: B1:B5
19468 # series2 sources: D6:D10
19469 #
19470 # domain sources: A1:A5, C10:C12
19471 # series1 sources: B1:B5, D10:D12
19472 # series2 sources: C1:C5, E10:E12
19473 { # A range on a sheet.
19474 # All indexes are zero-based.
19475 # Indexes are half open, e.g the start index is inclusive
19476 # and the end index is exclusive -- [start_index, end_index).
19477 # Missing indexes indicate the range is unbounded on that side.
19478 #
19479 # For example, if `"Sheet1"` is sheet ID 0, then:
19480 #
19481 # `Sheet1!A1:A1 == sheet_id: 0,
19482 # start_row_index: 0, end_row_index: 1,
19483 # start_column_index: 0, end_column_index: 1`
19484 #
19485 # `Sheet1!A3:B4 == sheet_id: 0,
19486 # start_row_index: 2, end_row_index: 4,
19487 # start_column_index: 0, end_column_index: 2`
19488 #
19489 # `Sheet1!A:B == sheet_id: 0,
19490 # start_column_index: 0, end_column_index: 2`
19491 #
19492 # `Sheet1!A5:B == sheet_id: 0,
19493 # start_row_index: 4,
19494 # start_column_index: 0, end_column_index: 2`
19495 #
19496 # `Sheet1 == sheet_id:0`
19497 #
19498 # The start index must always be less than or equal to the end index.
19499 # If the start index equals the end index, then the range is empty.
19500 # Empty ranges are typically not meaningful and are usually rendered in the
19501 # UI as `#REF!`.
19502 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019503 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019504 "sheetId": 42, # The sheet this range is on.
19505 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019506 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019507 },
19508 ],
19509 },
19510 },
19511 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
19512 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19513 "sources": [ # The ranges of data for a series or domain.
19514 # Exactly one dimension must have a length of 1,
19515 # and all sources in the list must have the same dimension
19516 # with length 1.
19517 # The domain (if it exists) & all series must have the same number
19518 # of source ranges. If using more than one source range, then the source
19519 # range at a given offset must be contiguous across the domain and series.
19520 #
19521 # For example, these are valid configurations:
19522 #
19523 # domain sources: A1:A5
19524 # series1 sources: B1:B5
19525 # series2 sources: D6:D10
19526 #
19527 # domain sources: A1:A5, C10:C12
19528 # series1 sources: B1:B5, D10:D12
19529 # series2 sources: C1:C5, E10:E12
19530 { # A range on a sheet.
19531 # All indexes are zero-based.
19532 # Indexes are half open, e.g the start index is inclusive
19533 # and the end index is exclusive -- [start_index, end_index).
19534 # Missing indexes indicate the range is unbounded on that side.
19535 #
19536 # For example, if `"Sheet1"` is sheet ID 0, then:
19537 #
19538 # `Sheet1!A1:A1 == sheet_id: 0,
19539 # start_row_index: 0, end_row_index: 1,
19540 # start_column_index: 0, end_column_index: 1`
19541 #
19542 # `Sheet1!A3:B4 == sheet_id: 0,
19543 # start_row_index: 2, end_row_index: 4,
19544 # start_column_index: 0, end_column_index: 2`
19545 #
19546 # `Sheet1!A:B == sheet_id: 0,
19547 # start_column_index: 0, end_column_index: 2`
19548 #
19549 # `Sheet1!A5:B == sheet_id: 0,
19550 # start_row_index: 4,
19551 # start_column_index: 0, end_column_index: 2`
19552 #
19553 # `Sheet1 == sheet_id:0`
19554 #
19555 # The start index must always be less than or equal to the end index.
19556 # If the start index equals the end index, then the range is empty.
19557 # Empty ranges are typically not meaningful and are usually rendered in the
19558 # UI as `#REF!`.
19559 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019560 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019561 "sheetId": 42, # The sheet this range is on.
19562 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019563 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019564 },
19565 ],
19566 },
19567 },
19568 "threeDimensional": True or False, # True if the pie is three dimensional.
19569 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
19570 "pieHole": 3.14, # The size of the hole in the pie chart.
19571 },
19572 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
19573 # See BasicChartType for the list of all
19574 # charts this supports.
19575 # of charts this supports.
19576 "headerCount": 42, # The number of rows or columns in the data that are "headers".
19577 # If not set, Google Sheets will guess how many rows are headers based
19578 # on the data.
19579 #
19580 # (Note that BasicChartAxis.title may override the axis title
19581 # inferred from the header values.)
19582 "series": [ # The data this chart is visualizing.
19583 { # A single series of data in a chart.
19584 # For example, if charting stock prices over time, multiple series may exist,
19585 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
19586 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
19587 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19588 "sources": [ # The ranges of data for a series or domain.
19589 # Exactly one dimension must have a length of 1,
19590 # and all sources in the list must have the same dimension
19591 # with length 1.
19592 # The domain (if it exists) & all series must have the same number
19593 # of source ranges. If using more than one source range, then the source
19594 # range at a given offset must be contiguous across the domain and series.
19595 #
19596 # For example, these are valid configurations:
19597 #
19598 # domain sources: A1:A5
19599 # series1 sources: B1:B5
19600 # series2 sources: D6:D10
19601 #
19602 # domain sources: A1:A5, C10:C12
19603 # series1 sources: B1:B5, D10:D12
19604 # series2 sources: C1:C5, E10:E12
19605 { # A range on a sheet.
19606 # All indexes are zero-based.
19607 # Indexes are half open, e.g the start index is inclusive
19608 # and the end index is exclusive -- [start_index, end_index).
19609 # Missing indexes indicate the range is unbounded on that side.
19610 #
19611 # For example, if `"Sheet1"` is sheet ID 0, then:
19612 #
19613 # `Sheet1!A1:A1 == sheet_id: 0,
19614 # start_row_index: 0, end_row_index: 1,
19615 # start_column_index: 0, end_column_index: 1`
19616 #
19617 # `Sheet1!A3:B4 == sheet_id: 0,
19618 # start_row_index: 2, end_row_index: 4,
19619 # start_column_index: 0, end_column_index: 2`
19620 #
19621 # `Sheet1!A:B == sheet_id: 0,
19622 # start_column_index: 0, end_column_index: 2`
19623 #
19624 # `Sheet1!A5:B == sheet_id: 0,
19625 # start_row_index: 4,
19626 # start_column_index: 0, end_column_index: 2`
19627 #
19628 # `Sheet1 == sheet_id:0`
19629 #
19630 # The start index must always be less than or equal to the end index.
19631 # If the start index equals the end index, then the range is empty.
19632 # Empty ranges are typically not meaningful and are usually rendered in the
19633 # UI as `#REF!`.
19634 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019635 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019636 "sheetId": 42, # The sheet this range is on.
19637 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019638 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019639 },
19640 ],
19641 },
19642 },
19643 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
19644 # For example, if charting stocks over time, the "Volume" series
19645 # may want to be pinned to the right with the prices pinned to the left,
19646 # because the scale of trading volume is different than the scale of
19647 # prices.
19648 # It is an error to specify an axis that isn't a valid minor axis
19649 # for the chart's type.
19650 "type": "A String", # The type of this series. Valid only if the
19651 # chartType is
19652 # COMBO.
19653 # Different types will change the way the series is visualized.
19654 # Only LINE, AREA,
19655 # and COLUMN are supported.
19656 },
19657 ],
19658 "legendPosition": "A String", # The position of the chart legend.
19659 "domains": [ # The domain of data this is charting.
19660 # Only a single domain is currently supported.
19661 { # The domain of a chart.
19662 # For example, if charting stock prices over time, this would be the date.
19663 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
19664 # this is the data representing the dates.
19665 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
19666 "sources": [ # The ranges of data for a series or domain.
19667 # Exactly one dimension must have a length of 1,
19668 # and all sources in the list must have the same dimension
19669 # with length 1.
19670 # The domain (if it exists) & all series must have the same number
19671 # of source ranges. If using more than one source range, then the source
19672 # range at a given offset must be contiguous across the domain and series.
19673 #
19674 # For example, these are valid configurations:
19675 #
19676 # domain sources: A1:A5
19677 # series1 sources: B1:B5
19678 # series2 sources: D6:D10
19679 #
19680 # domain sources: A1:A5, C10:C12
19681 # series1 sources: B1:B5, D10:D12
19682 # series2 sources: C1:C5, E10:E12
19683 { # A range on a sheet.
19684 # All indexes are zero-based.
19685 # Indexes are half open, e.g the start index is inclusive
19686 # and the end index is exclusive -- [start_index, end_index).
19687 # Missing indexes indicate the range is unbounded on that side.
19688 #
19689 # For example, if `"Sheet1"` is sheet ID 0, then:
19690 #
19691 # `Sheet1!A1:A1 == sheet_id: 0,
19692 # start_row_index: 0, end_row_index: 1,
19693 # start_column_index: 0, end_column_index: 1`
19694 #
19695 # `Sheet1!A3:B4 == sheet_id: 0,
19696 # start_row_index: 2, end_row_index: 4,
19697 # start_column_index: 0, end_column_index: 2`
19698 #
19699 # `Sheet1!A:B == sheet_id: 0,
19700 # start_column_index: 0, end_column_index: 2`
19701 #
19702 # `Sheet1!A5:B == sheet_id: 0,
19703 # start_row_index: 4,
19704 # start_column_index: 0, end_column_index: 2`
19705 #
19706 # `Sheet1 == sheet_id:0`
19707 #
19708 # The start index must always be less than or equal to the end index.
19709 # If the start index equals the end index, then the range is empty.
19710 # Empty ranges are typically not meaningful and are usually rendered in the
19711 # UI as `#REF!`.
19712 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019713 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019714 "sheetId": 42, # The sheet this range is on.
19715 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019716 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019717 },
19718 ],
19719 },
19720 },
19721 },
19722 ],
19723 "chartType": "A String", # The type of the chart.
19724 "axis": [ # The axis on the chart.
19725 { # An axis of the chart.
19726 # A chart may not have more than one axis per
19727 # axis position.
19728 "position": "A String", # The position of this axis.
19729 "format": { # The format of a run of text in a cell. # The format of the title.
19730 # Only valid if the axis is not associated with the domain.
19731 # Absent values indicate that the field isn't specified.
19732 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19733 # for simplicity of conversion to/from color representations in various
19734 # languages over compactness; for example, the fields of this representation
19735 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19736 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19737 # method in iOS; and, with just a little work, it can be easily formatted into
19738 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19739 #
19740 # Example (Java):
19741 #
19742 # import com.google.type.Color;
19743 #
19744 # // ...
19745 # public static java.awt.Color fromProto(Color protocolor) {
19746 # float alpha = protocolor.hasAlpha()
19747 # ? protocolor.getAlpha().getValue()
19748 # : 1.0;
19749 #
19750 # return new java.awt.Color(
19751 # protocolor.getRed(),
19752 # protocolor.getGreen(),
19753 # protocolor.getBlue(),
19754 # alpha);
19755 # }
19756 #
19757 # public static Color toProto(java.awt.Color color) {
19758 # float red = (float) color.getRed();
19759 # float green = (float) color.getGreen();
19760 # float blue = (float) color.getBlue();
19761 # float denominator = 255.0;
19762 # Color.Builder resultBuilder =
19763 # Color
19764 # .newBuilder()
19765 # .setRed(red / denominator)
19766 # .setGreen(green / denominator)
19767 # .setBlue(blue / denominator);
19768 # int alpha = color.getAlpha();
19769 # if (alpha != 255) {
19770 # result.setAlpha(
19771 # FloatValue
19772 # .newBuilder()
19773 # .setValue(((float) alpha) / denominator)
19774 # .build());
19775 # }
19776 # return resultBuilder.build();
19777 # }
19778 # // ...
19779 #
19780 # Example (iOS / Obj-C):
19781 #
19782 # // ...
19783 # static UIColor* fromProto(Color* protocolor) {
19784 # float red = [protocolor red];
19785 # float green = [protocolor green];
19786 # float blue = [protocolor blue];
19787 # FloatValue* alpha_wrapper = [protocolor alpha];
19788 # float alpha = 1.0;
19789 # if (alpha_wrapper != nil) {
19790 # alpha = [alpha_wrapper value];
19791 # }
19792 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19793 # }
19794 #
19795 # static Color* toProto(UIColor* color) {
19796 # CGFloat red, green, blue, alpha;
19797 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19798 # return nil;
19799 # }
19800 # Color* result = [Color alloc] init];
19801 # [result setRed:red];
19802 # [result setGreen:green];
19803 # [result setBlue:blue];
19804 # if (alpha <= 0.9999) {
19805 # [result setAlpha:floatWrapperWithValue(alpha)];
19806 # }
19807 # [result autorelease];
19808 # return result;
19809 # }
19810 # // ...
19811 #
19812 # Example (JavaScript):
19813 #
19814 # // ...
19815 #
19816 # var protoToCssColor = function(rgb_color) {
19817 # var redFrac = rgb_color.red || 0.0;
19818 # var greenFrac = rgb_color.green || 0.0;
19819 # var blueFrac = rgb_color.blue || 0.0;
19820 # var red = Math.floor(redFrac * 255);
19821 # var green = Math.floor(greenFrac * 255);
19822 # var blue = Math.floor(blueFrac * 255);
19823 #
19824 # if (!('alpha' in rgb_color)) {
19825 # return rgbToCssColor_(red, green, blue);
19826 # }
19827 #
19828 # var alphaFrac = rgb_color.alpha.value || 0.0;
19829 # var rgbParams = [red, green, blue].join(',');
19830 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19831 # };
19832 #
19833 # var rgbToCssColor_ = function(red, green, blue) {
19834 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19835 # var hexString = rgbNumber.toString(16);
19836 # var missingZeros = 6 - hexString.length;
19837 # var resultBuilder = ['#'];
19838 # for (var i = 0; i < missingZeros; i++) {
19839 # resultBuilder.push('0');
19840 # }
19841 # resultBuilder.push(hexString);
19842 # return resultBuilder.join('');
19843 # };
19844 #
19845 # // ...
19846 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19847 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19848 # the final pixel color is defined by the equation:
19849 #
19850 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19851 #
19852 # This means that a value of 1.0 corresponds to a solid color, whereas
19853 # a value of 0.0 corresponds to a completely transparent color. This
19854 # uses a wrapper message rather than a simple float scalar so that it is
19855 # possible to distinguish between a default value and the value being unset.
19856 # If omitted, this color object is to be rendered as a solid color
19857 # (as if the alpha value had been explicitly given with a value of 1.0).
19858 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19859 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19860 },
19861 "bold": True or False, # True if the text is bold.
19862 "strikethrough": True or False, # True if the text has a strikethrough.
19863 "fontFamily": "A String", # The font family.
19864 "fontSize": 42, # The size of the font.
19865 "italic": True or False, # True if the text is italicized.
19866 "underline": True or False, # True if the text is underlined.
19867 },
Thomas Coffee2f245372017-03-27 10:39:26 -070019868 "title": "A String", # The title of this axis. If set, this overrides any title inferred
19869 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019870 },
19871 ],
19872 },
19873 "title": "A String", # The title of the chart.
19874 },
19875 },
19876 ],
19877 "filterViews": [ # The filter views in this sheet.
19878 { # A filter view.
19879 "title": "A String", # The name of the filter view.
19880 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
19881 #
19882 # When writing, only one of range or named_range_id
19883 # may be set.
19884 "filterViewId": 42, # The ID of the filter view.
19885 "range": { # A range on a sheet. # The range this filter view covers.
19886 #
19887 # When writing, only one of range or named_range_id
19888 # may be set.
19889 # All indexes are zero-based.
19890 # Indexes are half open, e.g the start index is inclusive
19891 # and the end index is exclusive -- [start_index, end_index).
19892 # Missing indexes indicate the range is unbounded on that side.
19893 #
19894 # For example, if `"Sheet1"` is sheet ID 0, then:
19895 #
19896 # `Sheet1!A1:A1 == sheet_id: 0,
19897 # start_row_index: 0, end_row_index: 1,
19898 # start_column_index: 0, end_column_index: 1`
19899 #
19900 # `Sheet1!A3:B4 == sheet_id: 0,
19901 # start_row_index: 2, end_row_index: 4,
19902 # start_column_index: 0, end_column_index: 2`
19903 #
19904 # `Sheet1!A:B == sheet_id: 0,
19905 # start_column_index: 0, end_column_index: 2`
19906 #
19907 # `Sheet1!A5:B == sheet_id: 0,
19908 # start_row_index: 4,
19909 # start_column_index: 0, end_column_index: 2`
19910 #
19911 # `Sheet1 == sheet_id:0`
19912 #
19913 # The start index must always be less than or equal to the end index.
19914 # If the start index equals the end index, then the range is empty.
19915 # Empty ranges are typically not meaningful and are usually rendered in the
19916 # UI as `#REF!`.
19917 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019918 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019919 "sheetId": 42, # The sheet this range is on.
19920 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070019921 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019922 },
19923 "sortSpecs": [ # The sort order per column. Later specifications are used when values
19924 # are equal in the earlier specifications.
19925 { # A sort order associated with a specific column or row.
19926 "sortOrder": "A String", # The order data should be sorted.
19927 "dimensionIndex": 42, # The dimension the sort should be applied to.
19928 },
19929 ],
19930 "criteria": { # The criteria for showing/hiding values per column.
19931 # The map's key is the column index, and the value is the criteria for
19932 # that column.
19933 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
19934 "hiddenValues": [ # Values that should be hidden.
19935 "A String",
19936 ],
19937 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
19938 # (This does not override hiddenValues -- if a value is listed there,
19939 # it will still be hidden.)
19940 # BooleanConditions are used by conditional formatting,
19941 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019942 "values": [ # The values of the condition. The number of supported values depends
19943 # on the condition type. Some support zero values,
19944 # others one or two values,
19945 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
19946 { # The value of the condition.
19947 "relativeDate": "A String", # A relative date (based on the current date).
19948 # Valid only if the type is
19949 # DATE_BEFORE,
19950 # DATE_AFTER,
19951 # DATE_ON_OR_BEFORE or
19952 # DATE_ON_OR_AFTER.
19953 #
19954 # Relative dates are not supported in data validation.
19955 # They are supported only in conditional formatting and
19956 # conditional filters.
19957 "userEnteredValue": "A String", # A value the condition is based on.
19958 # The value will be parsed as if the user typed into a cell.
19959 # Formulas are supported (and must begin with an `=`).
19960 },
19961 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019962 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019963 },
19964 },
19965 },
19966 },
19967 ],
19968 "protectedRanges": [ # The protected ranges in this sheet.
19969 { # A protected range.
19970 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
19971 # Unprotected ranges are only supported on protected sheets.
19972 { # A range on a sheet.
19973 # All indexes are zero-based.
19974 # Indexes are half open, e.g the start index is inclusive
19975 # and the end index is exclusive -- [start_index, end_index).
19976 # Missing indexes indicate the range is unbounded on that side.
19977 #
19978 # For example, if `"Sheet1"` is sheet ID 0, then:
19979 #
19980 # `Sheet1!A1:A1 == sheet_id: 0,
19981 # start_row_index: 0, end_row_index: 1,
19982 # start_column_index: 0, end_column_index: 1`
19983 #
19984 # `Sheet1!A3:B4 == sheet_id: 0,
19985 # start_row_index: 2, end_row_index: 4,
19986 # start_column_index: 0, end_column_index: 2`
19987 #
19988 # `Sheet1!A:B == sheet_id: 0,
19989 # start_column_index: 0, end_column_index: 2`
19990 #
19991 # `Sheet1!A5:B == sheet_id: 0,
19992 # start_row_index: 4,
19993 # start_column_index: 0, end_column_index: 2`
19994 #
19995 # `Sheet1 == sheet_id:0`
19996 #
19997 # The start index must always be less than or equal to the end index.
19998 # If the start index equals the end index, then the range is empty.
19999 # Empty ranges are typically not meaningful and are usually rendered in the
20000 # UI as `#REF!`.
20001 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020002 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020003 "sheetId": 42, # The sheet this range is on.
20004 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020005 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020006 },
20007 ],
20008 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
20009 # protected area.
20010 # This field is read-only.
20011 "description": "A String", # The description of this protected range.
20012 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
20013 #
20014 # When writing, only one of range or named_range_id
20015 # may be set.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020016 "range": { # A range on a sheet. # The range that is being protected.
20017 # The range may be fully unbounded, in which case this is considered
20018 # a protected sheet.
20019 #
20020 # When writing, only one of range or named_range_id
20021 # may be set.
20022 # All indexes are zero-based.
20023 # Indexes are half open, e.g the start index is inclusive
20024 # and the end index is exclusive -- [start_index, end_index).
20025 # Missing indexes indicate the range is unbounded on that side.
20026 #
20027 # For example, if `"Sheet1"` is sheet ID 0, then:
20028 #
20029 # `Sheet1!A1:A1 == sheet_id: 0,
20030 # start_row_index: 0, end_row_index: 1,
20031 # start_column_index: 0, end_column_index: 1`
20032 #
20033 # `Sheet1!A3:B4 == sheet_id: 0,
20034 # start_row_index: 2, end_row_index: 4,
20035 # start_column_index: 0, end_column_index: 2`
20036 #
20037 # `Sheet1!A:B == sheet_id: 0,
20038 # start_column_index: 0, end_column_index: 2`
20039 #
20040 # `Sheet1!A5:B == sheet_id: 0,
20041 # start_row_index: 4,
20042 # start_column_index: 0, end_column_index: 2`
20043 #
20044 # `Sheet1 == sheet_id:0`
20045 #
20046 # The start index must always be less than or equal to the end index.
20047 # If the start index equals the end index, then the range is empty.
20048 # Empty ranges are typically not meaningful and are usually rendered in the
20049 # UI as `#REF!`.
20050 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020051 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020052 "sheetId": 42, # The sheet this range is on.
20053 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020054 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020055 },
Thomas Coffee2f245372017-03-27 10:39:26 -070020056 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
20057 # This field is only visible to users with edit access to the protected
20058 # range and the document.
20059 # Editors are not supported with warning_only protection.
20060 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
20061 # range. Domain protection is only supported on documents within a domain.
20062 "users": [ # The email addresses of users with edit access to the protected range.
20063 "A String",
20064 ],
20065 "groups": [ # The email addresses of groups with edit access to the protected range.
20066 "A String",
20067 ],
20068 },
20069 "protectedRangeId": 42, # The ID of the protected range.
20070 # This field is read-only.
20071 "warningOnly": True or False, # True if this protected range will show a warning when editing.
20072 # Warning-based protection means that every user can edit data in the
20073 # protected range, except editing will prompt a warning asking the user
20074 # to confirm the edit.
20075 #
20076 # When writing: if this field is true, then editors is ignored.
20077 # Additionally, if this field is changed from true to false and the
20078 # `editors` field is not set (nor included in the field mask), then
20079 # the editors will be set to all the editors in the document.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020080 },
20081 ],
20082 "data": [ # Data in the grid, if this is a grid sheet.
20083 # The number of GridData objects returned is dependent on the number of
20084 # ranges requested on this sheet. For example, if this is representing
20085 # `Sheet1`, and the spreadsheet was requested with ranges
20086 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
20087 # startRow/startColumn of `0`,
20088 # while the second one will have `startRow 14` (zero-based row 15),
20089 # and `startColumn 3` (zero-based column D).
20090 { # Data in the grid, as well as metadata about the dimensions.
Thomas Coffee2f245372017-03-27 10:39:26 -070020091 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
20092 # in start_row.
20093 { # Properties about a dimension.
20094 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
20095 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
20096 "hiddenByFilter": True or False, # True if this dimension is being filtered.
20097 # This field is read-only.
20098 },
20099 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -070020100 "startColumn": 42, # The first column this GridData refers to, zero-based.
20101 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
20102 # in start_column.
20103 { # Properties about a dimension.
20104 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
20105 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
20106 "hiddenByFilter": True or False, # True if this dimension is being filtered.
20107 # This field is read-only.
20108 },
20109 ],
Thomas Coffee2f245372017-03-27 10:39:26 -070020110 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020111 "rowData": [ # The data in the grid, one entry per row,
20112 # starting with the row in startRow.
20113 # The values in RowData will correspond to columns starting
20114 # at start_column.
20115 { # Data about each cell in a row.
20116 "values": [ # The values in the row, one per column.
20117 { # Data about a specific cell.
20118 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
20119 # is computed dynamically based on its data, grouping, filters, values,
20120 # etc. Only the top-left cell of the pivot table contains the pivot table
20121 # definition. The other cells will contain the calculated values of the
20122 # results of the pivot in their effective_value fields.
20123 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
20124 # or vertically (as rows).
20125 "rows": [ # Each row grouping in the pivot table.
20126 { # A single grouping (either row or column) in a pivot table.
20127 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
20128 "valueMetadata": [ # Metadata about values in the grouping.
20129 { # Metadata about a value in a pivot grouping.
20130 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
20131 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
20132 # (Note that formulaValue is not valid,
20133 # because the values will be calculated.)
20134 "numberValue": 3.14, # Represents a double value.
20135 # Note: Dates, Times and DateTimes are represented as doubles in
20136 # "serial number" format.
20137 "boolValue": True or False, # Represents a boolean value.
20138 "formulaValue": "A String", # Represents a formula.
20139 "stringValue": "A String", # Represents a string value.
20140 # Leading single quotes are not included. For example, if the user typed
20141 # `'123` into the UI, this would be represented as a `stringValue` of
20142 # `"123"`.
20143 "errorValue": { # An error in a cell. # Represents an error.
20144 # This field is read-only.
20145 "message": "A String", # A message with more information about the error
20146 # (in the spreadsheet's locale).
20147 "type": "A String", # The type of error.
20148 },
20149 },
20150 },
20151 ],
20152 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
20153 # If not specified, sorting is alphabetical by this group's values.
20154 "buckets": [ # Determines the bucket from which values are chosen to sort.
20155 #
20156 # For example, in a pivot table with one row group & two column groups,
20157 # the row group can list up to two values. The first value corresponds
20158 # to a value within the first column group, and the second value
20159 # corresponds to a value in the second column group. If no values
20160 # are listed, this would indicate that the row should be sorted according
20161 # to the "Grand Total" over the column groups. If a single value is listed,
20162 # this would correspond to using the "Total" of that bucket.
20163 { # The kinds of value that a cell in a spreadsheet can have.
20164 "numberValue": 3.14, # Represents a double value.
20165 # Note: Dates, Times and DateTimes are represented as doubles in
20166 # "serial number" format.
20167 "boolValue": True or False, # Represents a boolean value.
20168 "formulaValue": "A String", # Represents a formula.
20169 "stringValue": "A String", # Represents a string value.
20170 # Leading single quotes are not included. For example, if the user typed
20171 # `'123` into the UI, this would be represented as a `stringValue` of
20172 # `"123"`.
20173 "errorValue": { # An error in a cell. # Represents an error.
20174 # This field is read-only.
20175 "message": "A String", # A message with more information about the error
20176 # (in the spreadsheet's locale).
20177 "type": "A String", # The type of error.
20178 },
20179 },
20180 ],
20181 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
20182 # grouping should be sorted by.
20183 },
20184 "sortOrder": "A String", # The order the values in this group should be sorted.
20185 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
20186 #
20187 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20188 # means this group refers to column `C`, whereas the offset `1` would refer
20189 # to column `D`.
20190 },
20191 ],
20192 "source": { # A range on a sheet. # The range the pivot table is reading data from.
20193 # All indexes are zero-based.
20194 # Indexes are half open, e.g the start index is inclusive
20195 # and the end index is exclusive -- [start_index, end_index).
20196 # Missing indexes indicate the range is unbounded on that side.
20197 #
20198 # For example, if `"Sheet1"` is sheet ID 0, then:
20199 #
20200 # `Sheet1!A1:A1 == sheet_id: 0,
20201 # start_row_index: 0, end_row_index: 1,
20202 # start_column_index: 0, end_column_index: 1`
20203 #
20204 # `Sheet1!A3:B4 == sheet_id: 0,
20205 # start_row_index: 2, end_row_index: 4,
20206 # start_column_index: 0, end_column_index: 2`
20207 #
20208 # `Sheet1!A:B == sheet_id: 0,
20209 # start_column_index: 0, end_column_index: 2`
20210 #
20211 # `Sheet1!A5:B == sheet_id: 0,
20212 # start_row_index: 4,
20213 # start_column_index: 0, end_column_index: 2`
20214 #
20215 # `Sheet1 == sheet_id:0`
20216 #
20217 # The start index must always be less than or equal to the end index.
20218 # If the start index equals the end index, then the range is empty.
20219 # Empty ranges are typically not meaningful and are usually rendered in the
20220 # UI as `#REF!`.
20221 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020222 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020223 "sheetId": 42, # The sheet this range is on.
20224 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070020225 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020226 },
20227 "values": [ # A list of values to include in the pivot table.
20228 { # The definition of how a value in a pivot table should be calculated.
20229 "formula": "A String", # A custom formula to calculate the value. The formula must start
20230 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -070020231 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
20232 #
20233 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20234 # means this value refers to column `C`, whereas the offset `1` would
20235 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020236 "summarizeFunction": "A String", # A function to summarize the value.
20237 # If formula is set, the only supported values are
20238 # SUM and
20239 # CUSTOM.
20240 # If sourceColumnOffset is set, then `CUSTOM`
20241 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020242 "name": "A String", # A name to use for the value. This is only used if formula was set.
20243 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020244 },
20245 ],
20246 "criteria": { # An optional mapping of filters per source column offset.
20247 #
20248 # The filters will be applied before aggregating data into the pivot table.
20249 # The map's key is the column offset of the source range that you want to
20250 # filter, and the value is the criteria for that column.
20251 #
20252 # For example, if the source was `C10:E15`, a key of `0` will have the filter
20253 # for column `C`, whereas the key `1` is for column `D`.
20254 "a_key": { # Criteria for showing/hiding rows in a pivot table.
20255 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
20256 "A String",
20257 ],
20258 },
20259 },
20260 "columns": [ # Each column grouping in the pivot table.
20261 { # A single grouping (either row or column) in a pivot table.
20262 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
20263 "valueMetadata": [ # Metadata about values in the grouping.
20264 { # Metadata about a value in a pivot grouping.
20265 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
20266 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
20267 # (Note that formulaValue is not valid,
20268 # because the values will be calculated.)
20269 "numberValue": 3.14, # Represents a double value.
20270 # Note: Dates, Times and DateTimes are represented as doubles in
20271 # "serial number" format.
20272 "boolValue": True or False, # Represents a boolean value.
20273 "formulaValue": "A String", # Represents a formula.
20274 "stringValue": "A String", # Represents a string value.
20275 # Leading single quotes are not included. For example, if the user typed
20276 # `'123` into the UI, this would be represented as a `stringValue` of
20277 # `"123"`.
20278 "errorValue": { # An error in a cell. # Represents an error.
20279 # This field is read-only.
20280 "message": "A String", # A message with more information about the error
20281 # (in the spreadsheet's locale).
20282 "type": "A String", # The type of error.
20283 },
20284 },
20285 },
20286 ],
20287 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
20288 # If not specified, sorting is alphabetical by this group's values.
20289 "buckets": [ # Determines the bucket from which values are chosen to sort.
20290 #
20291 # For example, in a pivot table with one row group & two column groups,
20292 # the row group can list up to two values. The first value corresponds
20293 # to a value within the first column group, and the second value
20294 # corresponds to a value in the second column group. If no values
20295 # are listed, this would indicate that the row should be sorted according
20296 # to the "Grand Total" over the column groups. If a single value is listed,
20297 # this would correspond to using the "Total" of that bucket.
20298 { # The kinds of value that a cell in a spreadsheet can have.
20299 "numberValue": 3.14, # Represents a double value.
20300 # Note: Dates, Times and DateTimes are represented as doubles in
20301 # "serial number" format.
20302 "boolValue": True or False, # Represents a boolean value.
20303 "formulaValue": "A String", # Represents a formula.
20304 "stringValue": "A String", # Represents a string value.
20305 # Leading single quotes are not included. For example, if the user typed
20306 # `'123` into the UI, this would be represented as a `stringValue` of
20307 # `"123"`.
20308 "errorValue": { # An error in a cell. # Represents an error.
20309 # This field is read-only.
20310 "message": "A String", # A message with more information about the error
20311 # (in the spreadsheet's locale).
20312 "type": "A String", # The type of error.
20313 },
20314 },
20315 ],
20316 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
20317 # grouping should be sorted by.
20318 },
20319 "sortOrder": "A String", # The order the values in this group should be sorted.
20320 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
20321 #
20322 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20323 # means this group refers to column `C`, whereas the offset `1` would refer
20324 # to column `D`.
20325 },
20326 ],
20327 },
20328 "hyperlink": "A String", # A hyperlink this cell points to, if any.
20329 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
20330 "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
20331 # the calculated value. For cells with literals, this will be
20332 # the same as the user_entered_value.
20333 # This field is read-only.
20334 "numberValue": 3.14, # Represents a double value.
20335 # Note: Dates, Times and DateTimes are represented as doubles in
20336 # "serial number" format.
20337 "boolValue": True or False, # Represents a boolean value.
20338 "formulaValue": "A String", # Represents a formula.
20339 "stringValue": "A String", # Represents a string value.
20340 # Leading single quotes are not included. For example, if the user typed
20341 # `'123` into the UI, this would be represented as a `stringValue` of
20342 # `"123"`.
20343 "errorValue": { # An error in a cell. # Represents an error.
20344 # This field is read-only.
20345 "message": "A String", # A message with more information about the error
20346 # (in the spreadsheet's locale).
20347 "type": "A String", # The type of error.
20348 },
20349 },
20350 "formattedValue": "A String", # The formatted value of the cell.
20351 # This is the value as it's shown to the user.
20352 # This field is read-only.
20353 "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()`
20354 # Note: Dates, Times and DateTimes are represented as doubles in
20355 # serial number format.
20356 "numberValue": 3.14, # Represents a double value.
20357 # Note: Dates, Times and DateTimes are represented as doubles in
20358 # "serial number" format.
20359 "boolValue": True or False, # Represents a boolean value.
20360 "formulaValue": "A String", # Represents a formula.
20361 "stringValue": "A String", # Represents a string value.
20362 # Leading single quotes are not included. For example, if the user typed
20363 # `'123` into the UI, this would be represented as a `stringValue` of
20364 # `"123"`.
20365 "errorValue": { # An error in a cell. # Represents an error.
20366 # This field is read-only.
20367 "message": "A String", # A message with more information about the error
20368 # (in the spreadsheet's locale).
20369 "type": "A String", # The type of error.
20370 },
20371 },
20372 "note": "A String", # Any note on the cell.
20373 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
20374 # This includes the results of applying any conditional formatting and,
20375 # if the cell contains a formula, the computed number format.
20376 # If the effective format is the default format, effective format will
20377 # not be written.
20378 # This field is read-only.
20379 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
20380 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
20381 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020382 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020383 # information about the supported patterns.
20384 "type": "A String", # The type of the number format.
20385 # When writing, this field must be set.
20386 },
20387 "textDirection": "A String", # The direction of the text in the cell.
20388 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
20389 # When updating padding, every field must be specified.
20390 "top": 42, # The top padding of the cell.
20391 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020392 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020393 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020394 },
Thomas Coffee2f245372017-03-27 10:39:26 -070020395 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020396 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
20397 # for simplicity of conversion to/from color representations in various
20398 # languages over compactness; for example, the fields of this representation
20399 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20400 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20401 # method in iOS; and, with just a little work, it can be easily formatted into
20402 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20403 #
20404 # Example (Java):
20405 #
20406 # import com.google.type.Color;
20407 #
20408 # // ...
20409 # public static java.awt.Color fromProto(Color protocolor) {
20410 # float alpha = protocolor.hasAlpha()
20411 # ? protocolor.getAlpha().getValue()
20412 # : 1.0;
20413 #
20414 # return new java.awt.Color(
20415 # protocolor.getRed(),
20416 # protocolor.getGreen(),
20417 # protocolor.getBlue(),
20418 # alpha);
20419 # }
20420 #
20421 # public static Color toProto(java.awt.Color color) {
20422 # float red = (float) color.getRed();
20423 # float green = (float) color.getGreen();
20424 # float blue = (float) color.getBlue();
20425 # float denominator = 255.0;
20426 # Color.Builder resultBuilder =
20427 # Color
20428 # .newBuilder()
20429 # .setRed(red / denominator)
20430 # .setGreen(green / denominator)
20431 # .setBlue(blue / denominator);
20432 # int alpha = color.getAlpha();
20433 # if (alpha != 255) {
20434 # result.setAlpha(
20435 # FloatValue
20436 # .newBuilder()
20437 # .setValue(((float) alpha) / denominator)
20438 # .build());
20439 # }
20440 # return resultBuilder.build();
20441 # }
20442 # // ...
20443 #
20444 # Example (iOS / Obj-C):
20445 #
20446 # // ...
20447 # static UIColor* fromProto(Color* protocolor) {
20448 # float red = [protocolor red];
20449 # float green = [protocolor green];
20450 # float blue = [protocolor blue];
20451 # FloatValue* alpha_wrapper = [protocolor alpha];
20452 # float alpha = 1.0;
20453 # if (alpha_wrapper != nil) {
20454 # alpha = [alpha_wrapper value];
20455 # }
20456 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20457 # }
20458 #
20459 # static Color* toProto(UIColor* color) {
20460 # CGFloat red, green, blue, alpha;
20461 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20462 # return nil;
20463 # }
20464 # Color* result = [Color alloc] init];
20465 # [result setRed:red];
20466 # [result setGreen:green];
20467 # [result setBlue:blue];
20468 # if (alpha <= 0.9999) {
20469 # [result setAlpha:floatWrapperWithValue(alpha)];
20470 # }
20471 # [result autorelease];
20472 # return result;
20473 # }
20474 # // ...
20475 #
20476 # Example (JavaScript):
20477 #
20478 # // ...
20479 #
20480 # var protoToCssColor = function(rgb_color) {
20481 # var redFrac = rgb_color.red || 0.0;
20482 # var greenFrac = rgb_color.green || 0.0;
20483 # var blueFrac = rgb_color.blue || 0.0;
20484 # var red = Math.floor(redFrac * 255);
20485 # var green = Math.floor(greenFrac * 255);
20486 # var blue = Math.floor(blueFrac * 255);
20487 #
20488 # if (!('alpha' in rgb_color)) {
20489 # return rgbToCssColor_(red, green, blue);
20490 # }
20491 #
20492 # var alphaFrac = rgb_color.alpha.value || 0.0;
20493 # var rgbParams = [red, green, blue].join(',');
20494 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20495 # };
20496 #
20497 # var rgbToCssColor_ = function(red, green, blue) {
20498 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20499 # var hexString = rgbNumber.toString(16);
20500 # var missingZeros = 6 - hexString.length;
20501 # var resultBuilder = ['#'];
20502 # for (var i = 0; i < missingZeros; i++) {
20503 # resultBuilder.push('0');
20504 # }
20505 # resultBuilder.push(hexString);
20506 # return resultBuilder.join('');
20507 # };
20508 #
20509 # // ...
20510 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20511 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20512 # the final pixel color is defined by the equation:
20513 #
20514 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20515 #
20516 # This means that a value of 1.0 corresponds to a solid color, whereas
20517 # a value of 0.0 corresponds to a completely transparent color. This
20518 # uses a wrapper message rather than a simple float scalar so that it is
20519 # possible to distinguish between a default value and the value being unset.
20520 # If omitted, this color object is to be rendered as a solid color
20521 # (as if the alpha value had been explicitly given with a value of 1.0).
20522 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20523 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20524 },
Thomas Coffee2f245372017-03-27 10:39:26 -070020525 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020526 "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).
20527 # Absent values indicate that the field isn't specified.
20528 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
20529 # for simplicity of conversion to/from color representations in various
20530 # languages over compactness; for example, the fields of this representation
20531 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20532 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20533 # method in iOS; and, with just a little work, it can be easily formatted into
20534 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20535 #
20536 # Example (Java):
20537 #
20538 # import com.google.type.Color;
20539 #
20540 # // ...
20541 # public static java.awt.Color fromProto(Color protocolor) {
20542 # float alpha = protocolor.hasAlpha()
20543 # ? protocolor.getAlpha().getValue()
20544 # : 1.0;
20545 #
20546 # return new java.awt.Color(
20547 # protocolor.getRed(),
20548 # protocolor.getGreen(),
20549 # protocolor.getBlue(),
20550 # alpha);
20551 # }
20552 #
20553 # public static Color toProto(java.awt.Color color) {
20554 # float red = (float) color.getRed();
20555 # float green = (float) color.getGreen();
20556 # float blue = (float) color.getBlue();
20557 # float denominator = 255.0;
20558 # Color.Builder resultBuilder =
20559 # Color
20560 # .newBuilder()
20561 # .setRed(red / denominator)
20562 # .setGreen(green / denominator)
20563 # .setBlue(blue / denominator);
20564 # int alpha = color.getAlpha();
20565 # if (alpha != 255) {
20566 # result.setAlpha(
20567 # FloatValue
20568 # .newBuilder()
20569 # .setValue(((float) alpha) / denominator)
20570 # .build());
20571 # }
20572 # return resultBuilder.build();
20573 # }
20574 # // ...
20575 #
20576 # Example (iOS / Obj-C):
20577 #
20578 # // ...
20579 # static UIColor* fromProto(Color* protocolor) {
20580 # float red = [protocolor red];
20581 # float green = [protocolor green];
20582 # float blue = [protocolor blue];
20583 # FloatValue* alpha_wrapper = [protocolor alpha];
20584 # float alpha = 1.0;
20585 # if (alpha_wrapper != nil) {
20586 # alpha = [alpha_wrapper value];
20587 # }
20588 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20589 # }
20590 #
20591 # static Color* toProto(UIColor* color) {
20592 # CGFloat red, green, blue, alpha;
20593 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20594 # return nil;
20595 # }
20596 # Color* result = [Color alloc] init];
20597 # [result setRed:red];
20598 # [result setGreen:green];
20599 # [result setBlue:blue];
20600 # if (alpha <= 0.9999) {
20601 # [result setAlpha:floatWrapperWithValue(alpha)];
20602 # }
20603 # [result autorelease];
20604 # return result;
20605 # }
20606 # // ...
20607 #
20608 # Example (JavaScript):
20609 #
20610 # // ...
20611 #
20612 # var protoToCssColor = function(rgb_color) {
20613 # var redFrac = rgb_color.red || 0.0;
20614 # var greenFrac = rgb_color.green || 0.0;
20615 # var blueFrac = rgb_color.blue || 0.0;
20616 # var red = Math.floor(redFrac * 255);
20617 # var green = Math.floor(greenFrac * 255);
20618 # var blue = Math.floor(blueFrac * 255);
20619 #
20620 # if (!('alpha' in rgb_color)) {
20621 # return rgbToCssColor_(red, green, blue);
20622 # }
20623 #
20624 # var alphaFrac = rgb_color.alpha.value || 0.0;
20625 # var rgbParams = [red, green, blue].join(',');
20626 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20627 # };
20628 #
20629 # var rgbToCssColor_ = function(red, green, blue) {
20630 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20631 # var hexString = rgbNumber.toString(16);
20632 # var missingZeros = 6 - hexString.length;
20633 # var resultBuilder = ['#'];
20634 # for (var i = 0; i < missingZeros; i++) {
20635 # resultBuilder.push('0');
20636 # }
20637 # resultBuilder.push(hexString);
20638 # return resultBuilder.join('');
20639 # };
20640 #
20641 # // ...
20642 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20643 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20644 # the final pixel color is defined by the equation:
20645 #
20646 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20647 #
20648 # This means that a value of 1.0 corresponds to a solid color, whereas
20649 # a value of 0.0 corresponds to a completely transparent color. This
20650 # uses a wrapper message rather than a simple float scalar so that it is
20651 # possible to distinguish between a default value and the value being unset.
20652 # If omitted, this color object is to be rendered as a solid color
20653 # (as if the alpha value had been explicitly given with a value of 1.0).
20654 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20655 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20656 },
20657 "bold": True or False, # True if the text is bold.
20658 "strikethrough": True or False, # True if the text has a strikethrough.
20659 "fontFamily": "A String", # The font family.
20660 "fontSize": 42, # The size of the font.
20661 "italic": True or False, # True if the text is italicized.
20662 "underline": True or False, # True if the text is underlined.
20663 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070020664 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
20665 "angle": 42, # The angle between the standard orientation and the desired orientation.
20666 # Measured in degrees. Valid values are between -90 and 90. Positive
20667 # angles are angled upwards, negative are angled downwards.
20668 #
20669 # Note: For LTR text direction positive angles are in the counterclockwise
20670 # direction, whereas for RTL they are in the clockwise direction
20671 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
20672 # characters is unchanged.
20673 # For example:
20674 #
20675 # | V |
20676 # | e |
20677 # | r |
20678 # | t |
20679 # | i |
20680 # | c |
20681 # | a |
20682 # | l |
20683 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020684 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
20685 "borders": { # The borders of the cell. # The borders of the cell.
20686 "top": { # A border along a cell. # The top border of the cell.
20687 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20688 # for simplicity of conversion to/from color representations in various
20689 # languages over compactness; for example, the fields of this representation
20690 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20691 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20692 # method in iOS; and, with just a little work, it can be easily formatted into
20693 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20694 #
20695 # Example (Java):
20696 #
20697 # import com.google.type.Color;
20698 #
20699 # // ...
20700 # public static java.awt.Color fromProto(Color protocolor) {
20701 # float alpha = protocolor.hasAlpha()
20702 # ? protocolor.getAlpha().getValue()
20703 # : 1.0;
20704 #
20705 # return new java.awt.Color(
20706 # protocolor.getRed(),
20707 # protocolor.getGreen(),
20708 # protocolor.getBlue(),
20709 # alpha);
20710 # }
20711 #
20712 # public static Color toProto(java.awt.Color color) {
20713 # float red = (float) color.getRed();
20714 # float green = (float) color.getGreen();
20715 # float blue = (float) color.getBlue();
20716 # float denominator = 255.0;
20717 # Color.Builder resultBuilder =
20718 # Color
20719 # .newBuilder()
20720 # .setRed(red / denominator)
20721 # .setGreen(green / denominator)
20722 # .setBlue(blue / denominator);
20723 # int alpha = color.getAlpha();
20724 # if (alpha != 255) {
20725 # result.setAlpha(
20726 # FloatValue
20727 # .newBuilder()
20728 # .setValue(((float) alpha) / denominator)
20729 # .build());
20730 # }
20731 # return resultBuilder.build();
20732 # }
20733 # // ...
20734 #
20735 # Example (iOS / Obj-C):
20736 #
20737 # // ...
20738 # static UIColor* fromProto(Color* protocolor) {
20739 # float red = [protocolor red];
20740 # float green = [protocolor green];
20741 # float blue = [protocolor blue];
20742 # FloatValue* alpha_wrapper = [protocolor alpha];
20743 # float alpha = 1.0;
20744 # if (alpha_wrapper != nil) {
20745 # alpha = [alpha_wrapper value];
20746 # }
20747 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20748 # }
20749 #
20750 # static Color* toProto(UIColor* color) {
20751 # CGFloat red, green, blue, alpha;
20752 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20753 # return nil;
20754 # }
20755 # Color* result = [Color alloc] init];
20756 # [result setRed:red];
20757 # [result setGreen:green];
20758 # [result setBlue:blue];
20759 # if (alpha <= 0.9999) {
20760 # [result setAlpha:floatWrapperWithValue(alpha)];
20761 # }
20762 # [result autorelease];
20763 # return result;
20764 # }
20765 # // ...
20766 #
20767 # Example (JavaScript):
20768 #
20769 # // ...
20770 #
20771 # var protoToCssColor = function(rgb_color) {
20772 # var redFrac = rgb_color.red || 0.0;
20773 # var greenFrac = rgb_color.green || 0.0;
20774 # var blueFrac = rgb_color.blue || 0.0;
20775 # var red = Math.floor(redFrac * 255);
20776 # var green = Math.floor(greenFrac * 255);
20777 # var blue = Math.floor(blueFrac * 255);
20778 #
20779 # if (!('alpha' in rgb_color)) {
20780 # return rgbToCssColor_(red, green, blue);
20781 # }
20782 #
20783 # var alphaFrac = rgb_color.alpha.value || 0.0;
20784 # var rgbParams = [red, green, blue].join(',');
20785 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20786 # };
20787 #
20788 # var rgbToCssColor_ = function(red, green, blue) {
20789 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20790 # var hexString = rgbNumber.toString(16);
20791 # var missingZeros = 6 - hexString.length;
20792 # var resultBuilder = ['#'];
20793 # for (var i = 0; i < missingZeros; i++) {
20794 # resultBuilder.push('0');
20795 # }
20796 # resultBuilder.push(hexString);
20797 # return resultBuilder.join('');
20798 # };
20799 #
20800 # // ...
20801 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20802 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20803 # the final pixel color is defined by the equation:
20804 #
20805 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20806 #
20807 # This means that a value of 1.0 corresponds to a solid color, whereas
20808 # a value of 0.0 corresponds to a completely transparent color. This
20809 # uses a wrapper message rather than a simple float scalar so that it is
20810 # possible to distinguish between a default value and the value being unset.
20811 # If omitted, this color object is to be rendered as a solid color
20812 # (as if the alpha value had been explicitly given with a value of 1.0).
20813 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20814 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20815 },
20816 "width": 42, # The width of the border, in pixels.
20817 # Deprecated; the width is determined by the "style" field.
20818 "style": "A String", # The style of the border.
20819 },
20820 "right": { # A border along a cell. # The right border of the cell.
20821 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20822 # for simplicity of conversion to/from color representations in various
20823 # languages over compactness; for example, the fields of this representation
20824 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20825 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20826 # method in iOS; and, with just a little work, it can be easily formatted into
20827 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20828 #
20829 # Example (Java):
20830 #
20831 # import com.google.type.Color;
20832 #
20833 # // ...
20834 # public static java.awt.Color fromProto(Color protocolor) {
20835 # float alpha = protocolor.hasAlpha()
20836 # ? protocolor.getAlpha().getValue()
20837 # : 1.0;
20838 #
20839 # return new java.awt.Color(
20840 # protocolor.getRed(),
20841 # protocolor.getGreen(),
20842 # protocolor.getBlue(),
20843 # alpha);
20844 # }
20845 #
20846 # public static Color toProto(java.awt.Color color) {
20847 # float red = (float) color.getRed();
20848 # float green = (float) color.getGreen();
20849 # float blue = (float) color.getBlue();
20850 # float denominator = 255.0;
20851 # Color.Builder resultBuilder =
20852 # Color
20853 # .newBuilder()
20854 # .setRed(red / denominator)
20855 # .setGreen(green / denominator)
20856 # .setBlue(blue / denominator);
20857 # int alpha = color.getAlpha();
20858 # if (alpha != 255) {
20859 # result.setAlpha(
20860 # FloatValue
20861 # .newBuilder()
20862 # .setValue(((float) alpha) / denominator)
20863 # .build());
20864 # }
20865 # return resultBuilder.build();
20866 # }
20867 # // ...
20868 #
20869 # Example (iOS / Obj-C):
20870 #
20871 # // ...
20872 # static UIColor* fromProto(Color* protocolor) {
20873 # float red = [protocolor red];
20874 # float green = [protocolor green];
20875 # float blue = [protocolor blue];
20876 # FloatValue* alpha_wrapper = [protocolor alpha];
20877 # float alpha = 1.0;
20878 # if (alpha_wrapper != nil) {
20879 # alpha = [alpha_wrapper value];
20880 # }
20881 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20882 # }
20883 #
20884 # static Color* toProto(UIColor* color) {
20885 # CGFloat red, green, blue, alpha;
20886 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20887 # return nil;
20888 # }
20889 # Color* result = [Color alloc] init];
20890 # [result setRed:red];
20891 # [result setGreen:green];
20892 # [result setBlue:blue];
20893 # if (alpha <= 0.9999) {
20894 # [result setAlpha:floatWrapperWithValue(alpha)];
20895 # }
20896 # [result autorelease];
20897 # return result;
20898 # }
20899 # // ...
20900 #
20901 # Example (JavaScript):
20902 #
20903 # // ...
20904 #
20905 # var protoToCssColor = function(rgb_color) {
20906 # var redFrac = rgb_color.red || 0.0;
20907 # var greenFrac = rgb_color.green || 0.0;
20908 # var blueFrac = rgb_color.blue || 0.0;
20909 # var red = Math.floor(redFrac * 255);
20910 # var green = Math.floor(greenFrac * 255);
20911 # var blue = Math.floor(blueFrac * 255);
20912 #
20913 # if (!('alpha' in rgb_color)) {
20914 # return rgbToCssColor_(red, green, blue);
20915 # }
20916 #
20917 # var alphaFrac = rgb_color.alpha.value || 0.0;
20918 # var rgbParams = [red, green, blue].join(',');
20919 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20920 # };
20921 #
20922 # var rgbToCssColor_ = function(red, green, blue) {
20923 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20924 # var hexString = rgbNumber.toString(16);
20925 # var missingZeros = 6 - hexString.length;
20926 # var resultBuilder = ['#'];
20927 # for (var i = 0; i < missingZeros; i++) {
20928 # resultBuilder.push('0');
20929 # }
20930 # resultBuilder.push(hexString);
20931 # return resultBuilder.join('');
20932 # };
20933 #
20934 # // ...
20935 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20936 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20937 # the final pixel color is defined by the equation:
20938 #
20939 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20940 #
20941 # This means that a value of 1.0 corresponds to a solid color, whereas
20942 # a value of 0.0 corresponds to a completely transparent color. This
20943 # uses a wrapper message rather than a simple float scalar so that it is
20944 # possible to distinguish between a default value and the value being unset.
20945 # If omitted, this color object is to be rendered as a solid color
20946 # (as if the alpha value had been explicitly given with a value of 1.0).
20947 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20948 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20949 },
20950 "width": 42, # The width of the border, in pixels.
20951 # Deprecated; the width is determined by the "style" field.
20952 "style": "A String", # The style of the border.
20953 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020954 "left": { # A border along a cell. # The left border of the cell.
20955 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20956 # for simplicity of conversion to/from color representations in various
20957 # languages over compactness; for example, the fields of this representation
20958 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20959 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20960 # method in iOS; and, with just a little work, it can be easily formatted into
20961 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20962 #
20963 # Example (Java):
20964 #
20965 # import com.google.type.Color;
20966 #
20967 # // ...
20968 # public static java.awt.Color fromProto(Color protocolor) {
20969 # float alpha = protocolor.hasAlpha()
20970 # ? protocolor.getAlpha().getValue()
20971 # : 1.0;
20972 #
20973 # return new java.awt.Color(
20974 # protocolor.getRed(),
20975 # protocolor.getGreen(),
20976 # protocolor.getBlue(),
20977 # alpha);
20978 # }
20979 #
20980 # public static Color toProto(java.awt.Color color) {
20981 # float red = (float) color.getRed();
20982 # float green = (float) color.getGreen();
20983 # float blue = (float) color.getBlue();
20984 # float denominator = 255.0;
20985 # Color.Builder resultBuilder =
20986 # Color
20987 # .newBuilder()
20988 # .setRed(red / denominator)
20989 # .setGreen(green / denominator)
20990 # .setBlue(blue / denominator);
20991 # int alpha = color.getAlpha();
20992 # if (alpha != 255) {
20993 # result.setAlpha(
20994 # FloatValue
20995 # .newBuilder()
20996 # .setValue(((float) alpha) / denominator)
20997 # .build());
20998 # }
20999 # return resultBuilder.build();
21000 # }
21001 # // ...
21002 #
21003 # Example (iOS / Obj-C):
21004 #
21005 # // ...
21006 # static UIColor* fromProto(Color* protocolor) {
21007 # float red = [protocolor red];
21008 # float green = [protocolor green];
21009 # float blue = [protocolor blue];
21010 # FloatValue* alpha_wrapper = [protocolor alpha];
21011 # float alpha = 1.0;
21012 # if (alpha_wrapper != nil) {
21013 # alpha = [alpha_wrapper value];
21014 # }
21015 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21016 # }
21017 #
21018 # static Color* toProto(UIColor* color) {
21019 # CGFloat red, green, blue, alpha;
21020 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21021 # return nil;
21022 # }
21023 # Color* result = [Color alloc] init];
21024 # [result setRed:red];
21025 # [result setGreen:green];
21026 # [result setBlue:blue];
21027 # if (alpha <= 0.9999) {
21028 # [result setAlpha:floatWrapperWithValue(alpha)];
21029 # }
21030 # [result autorelease];
21031 # return result;
21032 # }
21033 # // ...
21034 #
21035 # Example (JavaScript):
21036 #
21037 # // ...
21038 #
21039 # var protoToCssColor = function(rgb_color) {
21040 # var redFrac = rgb_color.red || 0.0;
21041 # var greenFrac = rgb_color.green || 0.0;
21042 # var blueFrac = rgb_color.blue || 0.0;
21043 # var red = Math.floor(redFrac * 255);
21044 # var green = Math.floor(greenFrac * 255);
21045 # var blue = Math.floor(blueFrac * 255);
21046 #
21047 # if (!('alpha' in rgb_color)) {
21048 # return rgbToCssColor_(red, green, blue);
21049 # }
21050 #
21051 # var alphaFrac = rgb_color.alpha.value || 0.0;
21052 # var rgbParams = [red, green, blue].join(',');
21053 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21054 # };
21055 #
21056 # var rgbToCssColor_ = function(red, green, blue) {
21057 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21058 # var hexString = rgbNumber.toString(16);
21059 # var missingZeros = 6 - hexString.length;
21060 # var resultBuilder = ['#'];
21061 # for (var i = 0; i < missingZeros; i++) {
21062 # resultBuilder.push('0');
21063 # }
21064 # resultBuilder.push(hexString);
21065 # return resultBuilder.join('');
21066 # };
21067 #
21068 # // ...
21069 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21070 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21071 # the final pixel color is defined by the equation:
21072 #
21073 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21074 #
21075 # This means that a value of 1.0 corresponds to a solid color, whereas
21076 # a value of 0.0 corresponds to a completely transparent color. This
21077 # uses a wrapper message rather than a simple float scalar so that it is
21078 # possible to distinguish between a default value and the value being unset.
21079 # If omitted, this color object is to be rendered as a solid color
21080 # (as if the alpha value had been explicitly given with a value of 1.0).
21081 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21082 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21083 },
21084 "width": 42, # The width of the border, in pixels.
21085 # Deprecated; the width is determined by the "style" field.
21086 "style": "A String", # The style of the border.
21087 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070021088 "bottom": { # A border along a cell. # The bottom border of the cell.
21089 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21090 # for simplicity of conversion to/from color representations in various
21091 # languages over compactness; for example, the fields of this representation
21092 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21093 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21094 # method in iOS; and, with just a little work, it can be easily formatted into
21095 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21096 #
21097 # Example (Java):
21098 #
21099 # import com.google.type.Color;
21100 #
21101 # // ...
21102 # public static java.awt.Color fromProto(Color protocolor) {
21103 # float alpha = protocolor.hasAlpha()
21104 # ? protocolor.getAlpha().getValue()
21105 # : 1.0;
21106 #
21107 # return new java.awt.Color(
21108 # protocolor.getRed(),
21109 # protocolor.getGreen(),
21110 # protocolor.getBlue(),
21111 # alpha);
21112 # }
21113 #
21114 # public static Color toProto(java.awt.Color color) {
21115 # float red = (float) color.getRed();
21116 # float green = (float) color.getGreen();
21117 # float blue = (float) color.getBlue();
21118 # float denominator = 255.0;
21119 # Color.Builder resultBuilder =
21120 # Color
21121 # .newBuilder()
21122 # .setRed(red / denominator)
21123 # .setGreen(green / denominator)
21124 # .setBlue(blue / denominator);
21125 # int alpha = color.getAlpha();
21126 # if (alpha != 255) {
21127 # result.setAlpha(
21128 # FloatValue
21129 # .newBuilder()
21130 # .setValue(((float) alpha) / denominator)
21131 # .build());
21132 # }
21133 # return resultBuilder.build();
21134 # }
21135 # // ...
21136 #
21137 # Example (iOS / Obj-C):
21138 #
21139 # // ...
21140 # static UIColor* fromProto(Color* protocolor) {
21141 # float red = [protocolor red];
21142 # float green = [protocolor green];
21143 # float blue = [protocolor blue];
21144 # FloatValue* alpha_wrapper = [protocolor alpha];
21145 # float alpha = 1.0;
21146 # if (alpha_wrapper != nil) {
21147 # alpha = [alpha_wrapper value];
21148 # }
21149 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21150 # }
21151 #
21152 # static Color* toProto(UIColor* color) {
21153 # CGFloat red, green, blue, alpha;
21154 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21155 # return nil;
21156 # }
21157 # Color* result = [Color alloc] init];
21158 # [result setRed:red];
21159 # [result setGreen:green];
21160 # [result setBlue:blue];
21161 # if (alpha <= 0.9999) {
21162 # [result setAlpha:floatWrapperWithValue(alpha)];
21163 # }
21164 # [result autorelease];
21165 # return result;
21166 # }
21167 # // ...
21168 #
21169 # Example (JavaScript):
21170 #
21171 # // ...
21172 #
21173 # var protoToCssColor = function(rgb_color) {
21174 # var redFrac = rgb_color.red || 0.0;
21175 # var greenFrac = rgb_color.green || 0.0;
21176 # var blueFrac = rgb_color.blue || 0.0;
21177 # var red = Math.floor(redFrac * 255);
21178 # var green = Math.floor(greenFrac * 255);
21179 # var blue = Math.floor(blueFrac * 255);
21180 #
21181 # if (!('alpha' in rgb_color)) {
21182 # return rgbToCssColor_(red, green, blue);
21183 # }
21184 #
21185 # var alphaFrac = rgb_color.alpha.value || 0.0;
21186 # var rgbParams = [red, green, blue].join(',');
21187 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21188 # };
21189 #
21190 # var rgbToCssColor_ = function(red, green, blue) {
21191 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21192 # var hexString = rgbNumber.toString(16);
21193 # var missingZeros = 6 - hexString.length;
21194 # var resultBuilder = ['#'];
21195 # for (var i = 0; i < missingZeros; i++) {
21196 # resultBuilder.push('0');
21197 # }
21198 # resultBuilder.push(hexString);
21199 # return resultBuilder.join('');
21200 # };
21201 #
21202 # // ...
21203 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21204 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21205 # the final pixel color is defined by the equation:
21206 #
21207 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21208 #
21209 # This means that a value of 1.0 corresponds to a solid color, whereas
21210 # a value of 0.0 corresponds to a completely transparent color. This
21211 # uses a wrapper message rather than a simple float scalar so that it is
21212 # possible to distinguish between a default value and the value being unset.
21213 # If omitted, this color object is to be rendered as a solid color
21214 # (as if the alpha value had been explicitly given with a value of 1.0).
21215 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21216 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21217 },
21218 "width": 42, # The width of the border, in pixels.
21219 # Deprecated; the width is determined by the "style" field.
21220 "style": "A String", # The style of the border.
21221 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021222 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070021223 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021224 },
21225 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
21226 #
21227 # When writing, the new format will be merged with the existing format.
21228 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
21229 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
21230 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021231 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021232 # information about the supported patterns.
21233 "type": "A String", # The type of the number format.
21234 # When writing, this field must be set.
21235 },
21236 "textDirection": "A String", # The direction of the text in the cell.
21237 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
21238 # When updating padding, every field must be specified.
21239 "top": 42, # The top padding of the cell.
21240 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021241 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021242 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021243 },
Thomas Coffee2f245372017-03-27 10:39:26 -070021244 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021245 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
21246 # for simplicity of conversion to/from color representations in various
21247 # languages over compactness; for example, the fields of this representation
21248 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21249 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21250 # method in iOS; and, with just a little work, it can be easily formatted into
21251 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21252 #
21253 # Example (Java):
21254 #
21255 # import com.google.type.Color;
21256 #
21257 # // ...
21258 # public static java.awt.Color fromProto(Color protocolor) {
21259 # float alpha = protocolor.hasAlpha()
21260 # ? protocolor.getAlpha().getValue()
21261 # : 1.0;
21262 #
21263 # return new java.awt.Color(
21264 # protocolor.getRed(),
21265 # protocolor.getGreen(),
21266 # protocolor.getBlue(),
21267 # alpha);
21268 # }
21269 #
21270 # public static Color toProto(java.awt.Color color) {
21271 # float red = (float) color.getRed();
21272 # float green = (float) color.getGreen();
21273 # float blue = (float) color.getBlue();
21274 # float denominator = 255.0;
21275 # Color.Builder resultBuilder =
21276 # Color
21277 # .newBuilder()
21278 # .setRed(red / denominator)
21279 # .setGreen(green / denominator)
21280 # .setBlue(blue / denominator);
21281 # int alpha = color.getAlpha();
21282 # if (alpha != 255) {
21283 # result.setAlpha(
21284 # FloatValue
21285 # .newBuilder()
21286 # .setValue(((float) alpha) / denominator)
21287 # .build());
21288 # }
21289 # return resultBuilder.build();
21290 # }
21291 # // ...
21292 #
21293 # Example (iOS / Obj-C):
21294 #
21295 # // ...
21296 # static UIColor* fromProto(Color* protocolor) {
21297 # float red = [protocolor red];
21298 # float green = [protocolor green];
21299 # float blue = [protocolor blue];
21300 # FloatValue* alpha_wrapper = [protocolor alpha];
21301 # float alpha = 1.0;
21302 # if (alpha_wrapper != nil) {
21303 # alpha = [alpha_wrapper value];
21304 # }
21305 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21306 # }
21307 #
21308 # static Color* toProto(UIColor* color) {
21309 # CGFloat red, green, blue, alpha;
21310 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21311 # return nil;
21312 # }
21313 # Color* result = [Color alloc] init];
21314 # [result setRed:red];
21315 # [result setGreen:green];
21316 # [result setBlue:blue];
21317 # if (alpha <= 0.9999) {
21318 # [result setAlpha:floatWrapperWithValue(alpha)];
21319 # }
21320 # [result autorelease];
21321 # return result;
21322 # }
21323 # // ...
21324 #
21325 # Example (JavaScript):
21326 #
21327 # // ...
21328 #
21329 # var protoToCssColor = function(rgb_color) {
21330 # var redFrac = rgb_color.red || 0.0;
21331 # var greenFrac = rgb_color.green || 0.0;
21332 # var blueFrac = rgb_color.blue || 0.0;
21333 # var red = Math.floor(redFrac * 255);
21334 # var green = Math.floor(greenFrac * 255);
21335 # var blue = Math.floor(blueFrac * 255);
21336 #
21337 # if (!('alpha' in rgb_color)) {
21338 # return rgbToCssColor_(red, green, blue);
21339 # }
21340 #
21341 # var alphaFrac = rgb_color.alpha.value || 0.0;
21342 # var rgbParams = [red, green, blue].join(',');
21343 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21344 # };
21345 #
21346 # var rgbToCssColor_ = function(red, green, blue) {
21347 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21348 # var hexString = rgbNumber.toString(16);
21349 # var missingZeros = 6 - hexString.length;
21350 # var resultBuilder = ['#'];
21351 # for (var i = 0; i < missingZeros; i++) {
21352 # resultBuilder.push('0');
21353 # }
21354 # resultBuilder.push(hexString);
21355 # return resultBuilder.join('');
21356 # };
21357 #
21358 # // ...
21359 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21360 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21361 # the final pixel color is defined by the equation:
21362 #
21363 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21364 #
21365 # This means that a value of 1.0 corresponds to a solid color, whereas
21366 # a value of 0.0 corresponds to a completely transparent color. This
21367 # uses a wrapper message rather than a simple float scalar so that it is
21368 # possible to distinguish between a default value and the value being unset.
21369 # If omitted, this color object is to be rendered as a solid color
21370 # (as if the alpha value had been explicitly given with a value of 1.0).
21371 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21372 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21373 },
Thomas Coffee2f245372017-03-27 10:39:26 -070021374 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021375 "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).
21376 # Absent values indicate that the field isn't specified.
21377 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21378 # for simplicity of conversion to/from color representations in various
21379 # languages over compactness; for example, the fields of this representation
21380 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21381 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21382 # method in iOS; and, with just a little work, it can be easily formatted into
21383 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21384 #
21385 # Example (Java):
21386 #
21387 # import com.google.type.Color;
21388 #
21389 # // ...
21390 # public static java.awt.Color fromProto(Color protocolor) {
21391 # float alpha = protocolor.hasAlpha()
21392 # ? protocolor.getAlpha().getValue()
21393 # : 1.0;
21394 #
21395 # return new java.awt.Color(
21396 # protocolor.getRed(),
21397 # protocolor.getGreen(),
21398 # protocolor.getBlue(),
21399 # alpha);
21400 # }
21401 #
21402 # public static Color toProto(java.awt.Color color) {
21403 # float red = (float) color.getRed();
21404 # float green = (float) color.getGreen();
21405 # float blue = (float) color.getBlue();
21406 # float denominator = 255.0;
21407 # Color.Builder resultBuilder =
21408 # Color
21409 # .newBuilder()
21410 # .setRed(red / denominator)
21411 # .setGreen(green / denominator)
21412 # .setBlue(blue / denominator);
21413 # int alpha = color.getAlpha();
21414 # if (alpha != 255) {
21415 # result.setAlpha(
21416 # FloatValue
21417 # .newBuilder()
21418 # .setValue(((float) alpha) / denominator)
21419 # .build());
21420 # }
21421 # return resultBuilder.build();
21422 # }
21423 # // ...
21424 #
21425 # Example (iOS / Obj-C):
21426 #
21427 # // ...
21428 # static UIColor* fromProto(Color* protocolor) {
21429 # float red = [protocolor red];
21430 # float green = [protocolor green];
21431 # float blue = [protocolor blue];
21432 # FloatValue* alpha_wrapper = [protocolor alpha];
21433 # float alpha = 1.0;
21434 # if (alpha_wrapper != nil) {
21435 # alpha = [alpha_wrapper value];
21436 # }
21437 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21438 # }
21439 #
21440 # static Color* toProto(UIColor* color) {
21441 # CGFloat red, green, blue, alpha;
21442 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21443 # return nil;
21444 # }
21445 # Color* result = [Color alloc] init];
21446 # [result setRed:red];
21447 # [result setGreen:green];
21448 # [result setBlue:blue];
21449 # if (alpha <= 0.9999) {
21450 # [result setAlpha:floatWrapperWithValue(alpha)];
21451 # }
21452 # [result autorelease];
21453 # return result;
21454 # }
21455 # // ...
21456 #
21457 # Example (JavaScript):
21458 #
21459 # // ...
21460 #
21461 # var protoToCssColor = function(rgb_color) {
21462 # var redFrac = rgb_color.red || 0.0;
21463 # var greenFrac = rgb_color.green || 0.0;
21464 # var blueFrac = rgb_color.blue || 0.0;
21465 # var red = Math.floor(redFrac * 255);
21466 # var green = Math.floor(greenFrac * 255);
21467 # var blue = Math.floor(blueFrac * 255);
21468 #
21469 # if (!('alpha' in rgb_color)) {
21470 # return rgbToCssColor_(red, green, blue);
21471 # }
21472 #
21473 # var alphaFrac = rgb_color.alpha.value || 0.0;
21474 # var rgbParams = [red, green, blue].join(',');
21475 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21476 # };
21477 #
21478 # var rgbToCssColor_ = function(red, green, blue) {
21479 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21480 # var hexString = rgbNumber.toString(16);
21481 # var missingZeros = 6 - hexString.length;
21482 # var resultBuilder = ['#'];
21483 # for (var i = 0; i < missingZeros; i++) {
21484 # resultBuilder.push('0');
21485 # }
21486 # resultBuilder.push(hexString);
21487 # return resultBuilder.join('');
21488 # };
21489 #
21490 # // ...
21491 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21492 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21493 # the final pixel color is defined by the equation:
21494 #
21495 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21496 #
21497 # This means that a value of 1.0 corresponds to a solid color, whereas
21498 # a value of 0.0 corresponds to a completely transparent color. This
21499 # uses a wrapper message rather than a simple float scalar so that it is
21500 # possible to distinguish between a default value and the value being unset.
21501 # If omitted, this color object is to be rendered as a solid color
21502 # (as if the alpha value had been explicitly given with a value of 1.0).
21503 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21504 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21505 },
21506 "bold": True or False, # True if the text is bold.
21507 "strikethrough": True or False, # True if the text has a strikethrough.
21508 "fontFamily": "A String", # The font family.
21509 "fontSize": 42, # The size of the font.
21510 "italic": True or False, # True if the text is italicized.
21511 "underline": True or False, # True if the text is underlined.
21512 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070021513 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
21514 "angle": 42, # The angle between the standard orientation and the desired orientation.
21515 # Measured in degrees. Valid values are between -90 and 90. Positive
21516 # angles are angled upwards, negative are angled downwards.
21517 #
21518 # Note: For LTR text direction positive angles are in the counterclockwise
21519 # direction, whereas for RTL they are in the clockwise direction
21520 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
21521 # characters is unchanged.
21522 # For example:
21523 #
21524 # | V |
21525 # | e |
21526 # | r |
21527 # | t |
21528 # | i |
21529 # | c |
21530 # | a |
21531 # | l |
21532 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021533 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
21534 "borders": { # The borders of the cell. # The borders of the cell.
21535 "top": { # A border along a cell. # The top border of the cell.
21536 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21537 # for simplicity of conversion to/from color representations in various
21538 # languages over compactness; for example, the fields of this representation
21539 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21540 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21541 # method in iOS; and, with just a little work, it can be easily formatted into
21542 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21543 #
21544 # Example (Java):
21545 #
21546 # import com.google.type.Color;
21547 #
21548 # // ...
21549 # public static java.awt.Color fromProto(Color protocolor) {
21550 # float alpha = protocolor.hasAlpha()
21551 # ? protocolor.getAlpha().getValue()
21552 # : 1.0;
21553 #
21554 # return new java.awt.Color(
21555 # protocolor.getRed(),
21556 # protocolor.getGreen(),
21557 # protocolor.getBlue(),
21558 # alpha);
21559 # }
21560 #
21561 # public static Color toProto(java.awt.Color color) {
21562 # float red = (float) color.getRed();
21563 # float green = (float) color.getGreen();
21564 # float blue = (float) color.getBlue();
21565 # float denominator = 255.0;
21566 # Color.Builder resultBuilder =
21567 # Color
21568 # .newBuilder()
21569 # .setRed(red / denominator)
21570 # .setGreen(green / denominator)
21571 # .setBlue(blue / denominator);
21572 # int alpha = color.getAlpha();
21573 # if (alpha != 255) {
21574 # result.setAlpha(
21575 # FloatValue
21576 # .newBuilder()
21577 # .setValue(((float) alpha) / denominator)
21578 # .build());
21579 # }
21580 # return resultBuilder.build();
21581 # }
21582 # // ...
21583 #
21584 # Example (iOS / Obj-C):
21585 #
21586 # // ...
21587 # static UIColor* fromProto(Color* protocolor) {
21588 # float red = [protocolor red];
21589 # float green = [protocolor green];
21590 # float blue = [protocolor blue];
21591 # FloatValue* alpha_wrapper = [protocolor alpha];
21592 # float alpha = 1.0;
21593 # if (alpha_wrapper != nil) {
21594 # alpha = [alpha_wrapper value];
21595 # }
21596 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21597 # }
21598 #
21599 # static Color* toProto(UIColor* color) {
21600 # CGFloat red, green, blue, alpha;
21601 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21602 # return nil;
21603 # }
21604 # Color* result = [Color alloc] init];
21605 # [result setRed:red];
21606 # [result setGreen:green];
21607 # [result setBlue:blue];
21608 # if (alpha <= 0.9999) {
21609 # [result setAlpha:floatWrapperWithValue(alpha)];
21610 # }
21611 # [result autorelease];
21612 # return result;
21613 # }
21614 # // ...
21615 #
21616 # Example (JavaScript):
21617 #
21618 # // ...
21619 #
21620 # var protoToCssColor = function(rgb_color) {
21621 # var redFrac = rgb_color.red || 0.0;
21622 # var greenFrac = rgb_color.green || 0.0;
21623 # var blueFrac = rgb_color.blue || 0.0;
21624 # var red = Math.floor(redFrac * 255);
21625 # var green = Math.floor(greenFrac * 255);
21626 # var blue = Math.floor(blueFrac * 255);
21627 #
21628 # if (!('alpha' in rgb_color)) {
21629 # return rgbToCssColor_(red, green, blue);
21630 # }
21631 #
21632 # var alphaFrac = rgb_color.alpha.value || 0.0;
21633 # var rgbParams = [red, green, blue].join(',');
21634 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21635 # };
21636 #
21637 # var rgbToCssColor_ = function(red, green, blue) {
21638 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21639 # var hexString = rgbNumber.toString(16);
21640 # var missingZeros = 6 - hexString.length;
21641 # var resultBuilder = ['#'];
21642 # for (var i = 0; i < missingZeros; i++) {
21643 # resultBuilder.push('0');
21644 # }
21645 # resultBuilder.push(hexString);
21646 # return resultBuilder.join('');
21647 # };
21648 #
21649 # // ...
21650 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21651 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21652 # the final pixel color is defined by the equation:
21653 #
21654 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21655 #
21656 # This means that a value of 1.0 corresponds to a solid color, whereas
21657 # a value of 0.0 corresponds to a completely transparent color. This
21658 # uses a wrapper message rather than a simple float scalar so that it is
21659 # possible to distinguish between a default value and the value being unset.
21660 # If omitted, this color object is to be rendered as a solid color
21661 # (as if the alpha value had been explicitly given with a value of 1.0).
21662 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21663 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21664 },
21665 "width": 42, # The width of the border, in pixels.
21666 # Deprecated; the width is determined by the "style" field.
21667 "style": "A String", # The style of the border.
21668 },
21669 "right": { # A border along a cell. # The right border of the cell.
21670 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21671 # for simplicity of conversion to/from color representations in various
21672 # languages over compactness; for example, the fields of this representation
21673 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21674 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21675 # method in iOS; and, with just a little work, it can be easily formatted into
21676 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21677 #
21678 # Example (Java):
21679 #
21680 # import com.google.type.Color;
21681 #
21682 # // ...
21683 # public static java.awt.Color fromProto(Color protocolor) {
21684 # float alpha = protocolor.hasAlpha()
21685 # ? protocolor.getAlpha().getValue()
21686 # : 1.0;
21687 #
21688 # return new java.awt.Color(
21689 # protocolor.getRed(),
21690 # protocolor.getGreen(),
21691 # protocolor.getBlue(),
21692 # alpha);
21693 # }
21694 #
21695 # public static Color toProto(java.awt.Color color) {
21696 # float red = (float) color.getRed();
21697 # float green = (float) color.getGreen();
21698 # float blue = (float) color.getBlue();
21699 # float denominator = 255.0;
21700 # Color.Builder resultBuilder =
21701 # Color
21702 # .newBuilder()
21703 # .setRed(red / denominator)
21704 # .setGreen(green / denominator)
21705 # .setBlue(blue / denominator);
21706 # int alpha = color.getAlpha();
21707 # if (alpha != 255) {
21708 # result.setAlpha(
21709 # FloatValue
21710 # .newBuilder()
21711 # .setValue(((float) alpha) / denominator)
21712 # .build());
21713 # }
21714 # return resultBuilder.build();
21715 # }
21716 # // ...
21717 #
21718 # Example (iOS / Obj-C):
21719 #
21720 # // ...
21721 # static UIColor* fromProto(Color* protocolor) {
21722 # float red = [protocolor red];
21723 # float green = [protocolor green];
21724 # float blue = [protocolor blue];
21725 # FloatValue* alpha_wrapper = [protocolor alpha];
21726 # float alpha = 1.0;
21727 # if (alpha_wrapper != nil) {
21728 # alpha = [alpha_wrapper value];
21729 # }
21730 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21731 # }
21732 #
21733 # static Color* toProto(UIColor* color) {
21734 # CGFloat red, green, blue, alpha;
21735 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21736 # return nil;
21737 # }
21738 # Color* result = [Color alloc] init];
21739 # [result setRed:red];
21740 # [result setGreen:green];
21741 # [result setBlue:blue];
21742 # if (alpha <= 0.9999) {
21743 # [result setAlpha:floatWrapperWithValue(alpha)];
21744 # }
21745 # [result autorelease];
21746 # return result;
21747 # }
21748 # // ...
21749 #
21750 # Example (JavaScript):
21751 #
21752 # // ...
21753 #
21754 # var protoToCssColor = function(rgb_color) {
21755 # var redFrac = rgb_color.red || 0.0;
21756 # var greenFrac = rgb_color.green || 0.0;
21757 # var blueFrac = rgb_color.blue || 0.0;
21758 # var red = Math.floor(redFrac * 255);
21759 # var green = Math.floor(greenFrac * 255);
21760 # var blue = Math.floor(blueFrac * 255);
21761 #
21762 # if (!('alpha' in rgb_color)) {
21763 # return rgbToCssColor_(red, green, blue);
21764 # }
21765 #
21766 # var alphaFrac = rgb_color.alpha.value || 0.0;
21767 # var rgbParams = [red, green, blue].join(',');
21768 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21769 # };
21770 #
21771 # var rgbToCssColor_ = function(red, green, blue) {
21772 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21773 # var hexString = rgbNumber.toString(16);
21774 # var missingZeros = 6 - hexString.length;
21775 # var resultBuilder = ['#'];
21776 # for (var i = 0; i < missingZeros; i++) {
21777 # resultBuilder.push('0');
21778 # }
21779 # resultBuilder.push(hexString);
21780 # return resultBuilder.join('');
21781 # };
21782 #
21783 # // ...
21784 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21785 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21786 # the final pixel color is defined by the equation:
21787 #
21788 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21789 #
21790 # This means that a value of 1.0 corresponds to a solid color, whereas
21791 # a value of 0.0 corresponds to a completely transparent color. This
21792 # uses a wrapper message rather than a simple float scalar so that it is
21793 # possible to distinguish between a default value and the value being unset.
21794 # If omitted, this color object is to be rendered as a solid color
21795 # (as if the alpha value had been explicitly given with a value of 1.0).
21796 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21797 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21798 },
21799 "width": 42, # The width of the border, in pixels.
21800 # Deprecated; the width is determined by the "style" field.
21801 "style": "A String", # The style of the border.
21802 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021803 "left": { # A border along a cell. # The left border of the cell.
21804 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21805 # for simplicity of conversion to/from color representations in various
21806 # languages over compactness; for example, the fields of this representation
21807 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21808 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21809 # method in iOS; and, with just a little work, it can be easily formatted into
21810 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21811 #
21812 # Example (Java):
21813 #
21814 # import com.google.type.Color;
21815 #
21816 # // ...
21817 # public static java.awt.Color fromProto(Color protocolor) {
21818 # float alpha = protocolor.hasAlpha()
21819 # ? protocolor.getAlpha().getValue()
21820 # : 1.0;
21821 #
21822 # return new java.awt.Color(
21823 # protocolor.getRed(),
21824 # protocolor.getGreen(),
21825 # protocolor.getBlue(),
21826 # alpha);
21827 # }
21828 #
21829 # public static Color toProto(java.awt.Color color) {
21830 # float red = (float) color.getRed();
21831 # float green = (float) color.getGreen();
21832 # float blue = (float) color.getBlue();
21833 # float denominator = 255.0;
21834 # Color.Builder resultBuilder =
21835 # Color
21836 # .newBuilder()
21837 # .setRed(red / denominator)
21838 # .setGreen(green / denominator)
21839 # .setBlue(blue / denominator);
21840 # int alpha = color.getAlpha();
21841 # if (alpha != 255) {
21842 # result.setAlpha(
21843 # FloatValue
21844 # .newBuilder()
21845 # .setValue(((float) alpha) / denominator)
21846 # .build());
21847 # }
21848 # return resultBuilder.build();
21849 # }
21850 # // ...
21851 #
21852 # Example (iOS / Obj-C):
21853 #
21854 # // ...
21855 # static UIColor* fromProto(Color* protocolor) {
21856 # float red = [protocolor red];
21857 # float green = [protocolor green];
21858 # float blue = [protocolor blue];
21859 # FloatValue* alpha_wrapper = [protocolor alpha];
21860 # float alpha = 1.0;
21861 # if (alpha_wrapper != nil) {
21862 # alpha = [alpha_wrapper value];
21863 # }
21864 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21865 # }
21866 #
21867 # static Color* toProto(UIColor* color) {
21868 # CGFloat red, green, blue, alpha;
21869 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21870 # return nil;
21871 # }
21872 # Color* result = [Color alloc] init];
21873 # [result setRed:red];
21874 # [result setGreen:green];
21875 # [result setBlue:blue];
21876 # if (alpha <= 0.9999) {
21877 # [result setAlpha:floatWrapperWithValue(alpha)];
21878 # }
21879 # [result autorelease];
21880 # return result;
21881 # }
21882 # // ...
21883 #
21884 # Example (JavaScript):
21885 #
21886 # // ...
21887 #
21888 # var protoToCssColor = function(rgb_color) {
21889 # var redFrac = rgb_color.red || 0.0;
21890 # var greenFrac = rgb_color.green || 0.0;
21891 # var blueFrac = rgb_color.blue || 0.0;
21892 # var red = Math.floor(redFrac * 255);
21893 # var green = Math.floor(greenFrac * 255);
21894 # var blue = Math.floor(blueFrac * 255);
21895 #
21896 # if (!('alpha' in rgb_color)) {
21897 # return rgbToCssColor_(red, green, blue);
21898 # }
21899 #
21900 # var alphaFrac = rgb_color.alpha.value || 0.0;
21901 # var rgbParams = [red, green, blue].join(',');
21902 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21903 # };
21904 #
21905 # var rgbToCssColor_ = function(red, green, blue) {
21906 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21907 # var hexString = rgbNumber.toString(16);
21908 # var missingZeros = 6 - hexString.length;
21909 # var resultBuilder = ['#'];
21910 # for (var i = 0; i < missingZeros; i++) {
21911 # resultBuilder.push('0');
21912 # }
21913 # resultBuilder.push(hexString);
21914 # return resultBuilder.join('');
21915 # };
21916 #
21917 # // ...
21918 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21919 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21920 # the final pixel color is defined by the equation:
21921 #
21922 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21923 #
21924 # This means that a value of 1.0 corresponds to a solid color, whereas
21925 # a value of 0.0 corresponds to a completely transparent color. This
21926 # uses a wrapper message rather than a simple float scalar so that it is
21927 # possible to distinguish between a default value and the value being unset.
21928 # If omitted, this color object is to be rendered as a solid color
21929 # (as if the alpha value had been explicitly given with a value of 1.0).
21930 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21931 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21932 },
21933 "width": 42, # The width of the border, in pixels.
21934 # Deprecated; the width is determined by the "style" field.
21935 "style": "A String", # The style of the border.
21936 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070021937 "bottom": { # A border along a cell. # The bottom border of the cell.
21938 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21939 # for simplicity of conversion to/from color representations in various
21940 # languages over compactness; for example, the fields of this representation
21941 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21942 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21943 # method in iOS; and, with just a little work, it can be easily formatted into
21944 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21945 #
21946 # Example (Java):
21947 #
21948 # import com.google.type.Color;
21949 #
21950 # // ...
21951 # public static java.awt.Color fromProto(Color protocolor) {
21952 # float alpha = protocolor.hasAlpha()
21953 # ? protocolor.getAlpha().getValue()
21954 # : 1.0;
21955 #
21956 # return new java.awt.Color(
21957 # protocolor.getRed(),
21958 # protocolor.getGreen(),
21959 # protocolor.getBlue(),
21960 # alpha);
21961 # }
21962 #
21963 # public static Color toProto(java.awt.Color color) {
21964 # float red = (float) color.getRed();
21965 # float green = (float) color.getGreen();
21966 # float blue = (float) color.getBlue();
21967 # float denominator = 255.0;
21968 # Color.Builder resultBuilder =
21969 # Color
21970 # .newBuilder()
21971 # .setRed(red / denominator)
21972 # .setGreen(green / denominator)
21973 # .setBlue(blue / denominator);
21974 # int alpha = color.getAlpha();
21975 # if (alpha != 255) {
21976 # result.setAlpha(
21977 # FloatValue
21978 # .newBuilder()
21979 # .setValue(((float) alpha) / denominator)
21980 # .build());
21981 # }
21982 # return resultBuilder.build();
21983 # }
21984 # // ...
21985 #
21986 # Example (iOS / Obj-C):
21987 #
21988 # // ...
21989 # static UIColor* fromProto(Color* protocolor) {
21990 # float red = [protocolor red];
21991 # float green = [protocolor green];
21992 # float blue = [protocolor blue];
21993 # FloatValue* alpha_wrapper = [protocolor alpha];
21994 # float alpha = 1.0;
21995 # if (alpha_wrapper != nil) {
21996 # alpha = [alpha_wrapper value];
21997 # }
21998 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21999 # }
22000 #
22001 # static Color* toProto(UIColor* color) {
22002 # CGFloat red, green, blue, alpha;
22003 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22004 # return nil;
22005 # }
22006 # Color* result = [Color alloc] init];
22007 # [result setRed:red];
22008 # [result setGreen:green];
22009 # [result setBlue:blue];
22010 # if (alpha <= 0.9999) {
22011 # [result setAlpha:floatWrapperWithValue(alpha)];
22012 # }
22013 # [result autorelease];
22014 # return result;
22015 # }
22016 # // ...
22017 #
22018 # Example (JavaScript):
22019 #
22020 # // ...
22021 #
22022 # var protoToCssColor = function(rgb_color) {
22023 # var redFrac = rgb_color.red || 0.0;
22024 # var greenFrac = rgb_color.green || 0.0;
22025 # var blueFrac = rgb_color.blue || 0.0;
22026 # var red = Math.floor(redFrac * 255);
22027 # var green = Math.floor(greenFrac * 255);
22028 # var blue = Math.floor(blueFrac * 255);
22029 #
22030 # if (!('alpha' in rgb_color)) {
22031 # return rgbToCssColor_(red, green, blue);
22032 # }
22033 #
22034 # var alphaFrac = rgb_color.alpha.value || 0.0;
22035 # var rgbParams = [red, green, blue].join(',');
22036 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22037 # };
22038 #
22039 # var rgbToCssColor_ = function(red, green, blue) {
22040 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22041 # var hexString = rgbNumber.toString(16);
22042 # var missingZeros = 6 - hexString.length;
22043 # var resultBuilder = ['#'];
22044 # for (var i = 0; i < missingZeros; i++) {
22045 # resultBuilder.push('0');
22046 # }
22047 # resultBuilder.push(hexString);
22048 # return resultBuilder.join('');
22049 # };
22050 #
22051 # // ...
22052 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22053 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22054 # the final pixel color is defined by the equation:
22055 #
22056 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22057 #
22058 # This means that a value of 1.0 corresponds to a solid color, whereas
22059 # a value of 0.0 corresponds to a completely transparent color. This
22060 # uses a wrapper message rather than a simple float scalar so that it is
22061 # possible to distinguish between a default value and the value being unset.
22062 # If omitted, this color object is to be rendered as a solid color
22063 # (as if the alpha value had been explicitly given with a value of 1.0).
22064 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22065 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22066 },
22067 "width": 42, # The width of the border, in pixels.
22068 # Deprecated; the width is determined by the "style" field.
22069 "style": "A String", # The style of the border.
22070 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022071 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070022072 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022073 },
22074 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
22075 #
22076 # When writing, the new data validation rule will overwrite any prior rule.
22077 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
22078 # If true, "List" conditions will show a dropdown.
22079 "strict": True or False, # True if invalid data should be rejected.
22080 "inputMessage": "A String", # A message to show the user when adding data to the cell.
22081 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
22082 # BooleanConditions are used by conditional formatting,
22083 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022084 "values": [ # The values of the condition. The number of supported values depends
22085 # on the condition type. Some support zero values,
22086 # others one or two values,
22087 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
22088 { # The value of the condition.
22089 "relativeDate": "A String", # A relative date (based on the current date).
22090 # Valid only if the type is
22091 # DATE_BEFORE,
22092 # DATE_AFTER,
22093 # DATE_ON_OR_BEFORE or
22094 # DATE_ON_OR_AFTER.
22095 #
22096 # Relative dates are not supported in data validation.
22097 # They are supported only in conditional formatting and
22098 # conditional filters.
22099 "userEnteredValue": "A String", # A value the condition is based on.
22100 # The value will be parsed as if the user typed into a cell.
22101 # Formulas are supported (and must begin with an `=`).
22102 },
22103 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022104 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022105 },
22106 },
22107 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
22108 # on user entered strings, not formulas, bools, or numbers.
22109 # Runs start at specific indexes in the text and continue until the next
22110 # run. Properties of a run will continue unless explicitly changed
22111 # in a subsequent run (and properties of the first run will continue
22112 # the properties of the cell unless explicitly changed).
22113 #
22114 # When writing, the new runs will overwrite any prior runs. When writing a
22115 # new user_entered_value, previous runs will be erased.
22116 { # A run of a text format. The format of this run continues until the start
22117 # index of the next run.
22118 # When updating, all fields must be set.
22119 "startIndex": 42, # The character index where this run starts.
22120 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
22121 # Absent values indicate that the field isn't specified.
22122 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
22123 # for simplicity of conversion to/from color representations in various
22124 # languages over compactness; for example, the fields of this representation
22125 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22126 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22127 # method in iOS; and, with just a little work, it can be easily formatted into
22128 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22129 #
22130 # Example (Java):
22131 #
22132 # import com.google.type.Color;
22133 #
22134 # // ...
22135 # public static java.awt.Color fromProto(Color protocolor) {
22136 # float alpha = protocolor.hasAlpha()
22137 # ? protocolor.getAlpha().getValue()
22138 # : 1.0;
22139 #
22140 # return new java.awt.Color(
22141 # protocolor.getRed(),
22142 # protocolor.getGreen(),
22143 # protocolor.getBlue(),
22144 # alpha);
22145 # }
22146 #
22147 # public static Color toProto(java.awt.Color color) {
22148 # float red = (float) color.getRed();
22149 # float green = (float) color.getGreen();
22150 # float blue = (float) color.getBlue();
22151 # float denominator = 255.0;
22152 # Color.Builder resultBuilder =
22153 # Color
22154 # .newBuilder()
22155 # .setRed(red / denominator)
22156 # .setGreen(green / denominator)
22157 # .setBlue(blue / denominator);
22158 # int alpha = color.getAlpha();
22159 # if (alpha != 255) {
22160 # result.setAlpha(
22161 # FloatValue
22162 # .newBuilder()
22163 # .setValue(((float) alpha) / denominator)
22164 # .build());
22165 # }
22166 # return resultBuilder.build();
22167 # }
22168 # // ...
22169 #
22170 # Example (iOS / Obj-C):
22171 #
22172 # // ...
22173 # static UIColor* fromProto(Color* protocolor) {
22174 # float red = [protocolor red];
22175 # float green = [protocolor green];
22176 # float blue = [protocolor blue];
22177 # FloatValue* alpha_wrapper = [protocolor alpha];
22178 # float alpha = 1.0;
22179 # if (alpha_wrapper != nil) {
22180 # alpha = [alpha_wrapper value];
22181 # }
22182 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22183 # }
22184 #
22185 # static Color* toProto(UIColor* color) {
22186 # CGFloat red, green, blue, alpha;
22187 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22188 # return nil;
22189 # }
22190 # Color* result = [Color alloc] init];
22191 # [result setRed:red];
22192 # [result setGreen:green];
22193 # [result setBlue:blue];
22194 # if (alpha <= 0.9999) {
22195 # [result setAlpha:floatWrapperWithValue(alpha)];
22196 # }
22197 # [result autorelease];
22198 # return result;
22199 # }
22200 # // ...
22201 #
22202 # Example (JavaScript):
22203 #
22204 # // ...
22205 #
22206 # var protoToCssColor = function(rgb_color) {
22207 # var redFrac = rgb_color.red || 0.0;
22208 # var greenFrac = rgb_color.green || 0.0;
22209 # var blueFrac = rgb_color.blue || 0.0;
22210 # var red = Math.floor(redFrac * 255);
22211 # var green = Math.floor(greenFrac * 255);
22212 # var blue = Math.floor(blueFrac * 255);
22213 #
22214 # if (!('alpha' in rgb_color)) {
22215 # return rgbToCssColor_(red, green, blue);
22216 # }
22217 #
22218 # var alphaFrac = rgb_color.alpha.value || 0.0;
22219 # var rgbParams = [red, green, blue].join(',');
22220 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22221 # };
22222 #
22223 # var rgbToCssColor_ = function(red, green, blue) {
22224 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22225 # var hexString = rgbNumber.toString(16);
22226 # var missingZeros = 6 - hexString.length;
22227 # var resultBuilder = ['#'];
22228 # for (var i = 0; i < missingZeros; i++) {
22229 # resultBuilder.push('0');
22230 # }
22231 # resultBuilder.push(hexString);
22232 # return resultBuilder.join('');
22233 # };
22234 #
22235 # // ...
22236 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22237 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22238 # the final pixel color is defined by the equation:
22239 #
22240 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22241 #
22242 # This means that a value of 1.0 corresponds to a solid color, whereas
22243 # a value of 0.0 corresponds to a completely transparent color. This
22244 # uses a wrapper message rather than a simple float scalar so that it is
22245 # possible to distinguish between a default value and the value being unset.
22246 # If omitted, this color object is to be rendered as a solid color
22247 # (as if the alpha value had been explicitly given with a value of 1.0).
22248 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22249 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22250 },
22251 "bold": True or False, # True if the text is bold.
22252 "strikethrough": True or False, # True if the text has a strikethrough.
22253 "fontFamily": "A String", # The font family.
22254 "fontSize": 42, # The size of the font.
22255 "italic": True or False, # True if the text is italicized.
22256 "underline": True or False, # True if the text is underlined.
22257 },
22258 },
22259 ],
22260 },
22261 ],
22262 },
22263 ],
22264 },
22265 ],
22266 "properties": { # Properties of a sheet. # The properties of the sheet.
22267 "sheetType": "A String", # The type of sheet. Defaults to GRID.
22268 # This field cannot be changed once set.
22269 "index": 42, # The index of the sheet within the spreadsheet.
22270 # When adding or updating sheet properties, if this field
22271 # is excluded then the sheet will be added or moved to the end
22272 # of the sheet list. When updating sheet indices or inserting
22273 # sheets, movement is considered in "before the move" indexes.
22274 # For example, if there were 3 sheets (S1, S2, S3) in order to
22275 # move S1 ahead of S2 the index would have to be set to 2. A sheet
22276 # index update request will be ignored if the requested index is
22277 # identical to the sheets current index or if the requested new
22278 # index is equal to the current sheet index + 1.
22279 "title": "A String", # The name of the sheet.
22280 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
22281 # (If the sheet is an object sheet, containing a chart or image, then
22282 # this field will be absent.)
22283 # When writing it is an error to set any grid properties on non-grid sheets.
22284 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070022285 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022286 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
22287 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070022288 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022289 },
22290 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
22291 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
22292 # for simplicity of conversion to/from color representations in various
22293 # languages over compactness; for example, the fields of this representation
22294 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22295 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22296 # method in iOS; and, with just a little work, it can be easily formatted into
22297 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22298 #
22299 # Example (Java):
22300 #
22301 # import com.google.type.Color;
22302 #
22303 # // ...
22304 # public static java.awt.Color fromProto(Color protocolor) {
22305 # float alpha = protocolor.hasAlpha()
22306 # ? protocolor.getAlpha().getValue()
22307 # : 1.0;
22308 #
22309 # return new java.awt.Color(
22310 # protocolor.getRed(),
22311 # protocolor.getGreen(),
22312 # protocolor.getBlue(),
22313 # alpha);
22314 # }
22315 #
22316 # public static Color toProto(java.awt.Color color) {
22317 # float red = (float) color.getRed();
22318 # float green = (float) color.getGreen();
22319 # float blue = (float) color.getBlue();
22320 # float denominator = 255.0;
22321 # Color.Builder resultBuilder =
22322 # Color
22323 # .newBuilder()
22324 # .setRed(red / denominator)
22325 # .setGreen(green / denominator)
22326 # .setBlue(blue / denominator);
22327 # int alpha = color.getAlpha();
22328 # if (alpha != 255) {
22329 # result.setAlpha(
22330 # FloatValue
22331 # .newBuilder()
22332 # .setValue(((float) alpha) / denominator)
22333 # .build());
22334 # }
22335 # return resultBuilder.build();
22336 # }
22337 # // ...
22338 #
22339 # Example (iOS / Obj-C):
22340 #
22341 # // ...
22342 # static UIColor* fromProto(Color* protocolor) {
22343 # float red = [protocolor red];
22344 # float green = [protocolor green];
22345 # float blue = [protocolor blue];
22346 # FloatValue* alpha_wrapper = [protocolor alpha];
22347 # float alpha = 1.0;
22348 # if (alpha_wrapper != nil) {
22349 # alpha = [alpha_wrapper value];
22350 # }
22351 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22352 # }
22353 #
22354 # static Color* toProto(UIColor* color) {
22355 # CGFloat red, green, blue, alpha;
22356 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22357 # return nil;
22358 # }
22359 # Color* result = [Color alloc] init];
22360 # [result setRed:red];
22361 # [result setGreen:green];
22362 # [result setBlue:blue];
22363 # if (alpha <= 0.9999) {
22364 # [result setAlpha:floatWrapperWithValue(alpha)];
22365 # }
22366 # [result autorelease];
22367 # return result;
22368 # }
22369 # // ...
22370 #
22371 # Example (JavaScript):
22372 #
22373 # // ...
22374 #
22375 # var protoToCssColor = function(rgb_color) {
22376 # var redFrac = rgb_color.red || 0.0;
22377 # var greenFrac = rgb_color.green || 0.0;
22378 # var blueFrac = rgb_color.blue || 0.0;
22379 # var red = Math.floor(redFrac * 255);
22380 # var green = Math.floor(greenFrac * 255);
22381 # var blue = Math.floor(blueFrac * 255);
22382 #
22383 # if (!('alpha' in rgb_color)) {
22384 # return rgbToCssColor_(red, green, blue);
22385 # }
22386 #
22387 # var alphaFrac = rgb_color.alpha.value || 0.0;
22388 # var rgbParams = [red, green, blue].join(',');
22389 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22390 # };
22391 #
22392 # var rgbToCssColor_ = function(red, green, blue) {
22393 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22394 # var hexString = rgbNumber.toString(16);
22395 # var missingZeros = 6 - hexString.length;
22396 # var resultBuilder = ['#'];
22397 # for (var i = 0; i < missingZeros; i++) {
22398 # resultBuilder.push('0');
22399 # }
22400 # resultBuilder.push(hexString);
22401 # return resultBuilder.join('');
22402 # };
22403 #
22404 # // ...
22405 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22406 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22407 # the final pixel color is defined by the equation:
22408 #
22409 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22410 #
22411 # This means that a value of 1.0 corresponds to a solid color, whereas
22412 # a value of 0.0 corresponds to a completely transparent color. This
22413 # uses a wrapper message rather than a simple float scalar so that it is
22414 # possible to distinguish between a default value and the value being unset.
22415 # If omitted, this color object is to be rendered as a solid color
22416 # (as if the alpha value had been explicitly given with a value of 1.0).
22417 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22418 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22419 },
22420 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
22421 "sheetId": 42, # The ID of the sheet. Must be non-negative.
22422 # This field cannot be changed once set.
22423 },
22424 },
22425 ],
22426 "spreadsheetUrl": "A String", # The url of the spreadsheet.
22427 # This field is read-only.
22428 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022429 "replies": [ # The reply of the updates. This maps 1:1 with the updates, although
22430 # replies to some requests may be empty.
22431 { # A single response from an update.
22432 "duplicateFilterView": { # The result of a filter view being duplicated. # A reply from duplicating a filter view.
22433 "filter": { # A filter view. # The newly created filter.
22434 "title": "A String", # The name of the filter view.
22435 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
22436 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022437 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022438 # may be set.
22439 "filterViewId": 42, # The ID of the filter view.
22440 "range": { # A range on a sheet. # The range this filter view covers.
22441 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022442 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022443 # may be set.
22444 # All indexes are zero-based.
22445 # Indexes are half open, e.g the start index is inclusive
22446 # and the end index is exclusive -- [start_index, end_index).
22447 # Missing indexes indicate the range is unbounded on that side.
22448 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022449 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022450 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022451 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022452 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022453 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022454 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022455 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022456 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022457 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022458 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022459 # `Sheet1!A:B == sheet_id: 0,
22460 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022461 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022462 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022463 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022464 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022465 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022466 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022467 #
22468 # The start index must always be less than or equal to the end index.
22469 # If the start index equals the end index, then the range is empty.
22470 # Empty ranges are typically not meaningful and are usually rendered in the
22471 # UI as `#REF!`.
22472 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022473 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022474 "sheetId": 42, # The sheet this range is on.
22475 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022476 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022477 },
22478 "sortSpecs": [ # The sort order per column. Later specifications are used when values
22479 # are equal in the earlier specifications.
22480 { # A sort order associated with a specific column or row.
22481 "sortOrder": "A String", # The order data should be sorted.
22482 "dimensionIndex": 42, # The dimension the sort should be applied to.
22483 },
22484 ],
22485 "criteria": { # The criteria for showing/hiding values per column.
22486 # The map's key is the column index, and the value is the criteria for
22487 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022488 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022489 "hiddenValues": [ # Values that should be hidden.
22490 "A String",
22491 ],
22492 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
22493 # (This does not override hiddenValues -- if a value is listed there,
22494 # it will still be hidden.)
22495 # BooleanConditions are used by conditional formatting,
22496 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022497 "values": [ # The values of the condition. The number of supported values depends
22498 # on the condition type. Some support zero values,
22499 # others one or two values,
22500 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
22501 { # The value of the condition.
22502 "relativeDate": "A String", # A relative date (based on the current date).
22503 # Valid only if the type is
22504 # DATE_BEFORE,
22505 # DATE_AFTER,
22506 # DATE_ON_OR_BEFORE or
22507 # DATE_ON_OR_AFTER.
22508 #
22509 # Relative dates are not supported in data validation.
22510 # They are supported only in conditional formatting and
22511 # conditional filters.
22512 "userEnteredValue": "A String", # A value the condition is based on.
22513 # The value will be parsed as if the user typed into a cell.
22514 # Formulas are supported (and must begin with an `=`).
22515 },
22516 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022517 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022518 },
22519 },
22520 },
22521 },
22522 },
22523 "duplicateSheet": { # The result of duplicating a sheet. # A reply from duplicating a sheet.
22524 "properties": { # Properties of a sheet. # The properties of the duplicate sheet.
22525 "sheetType": "A String", # The type of sheet. Defaults to GRID.
22526 # This field cannot be changed once set.
22527 "index": 42, # The index of the sheet within the spreadsheet.
22528 # When adding or updating sheet properties, if this field
22529 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022530 # of the sheet list. When updating sheet indices or inserting
22531 # sheets, movement is considered in "before the move" indexes.
22532 # For example, if there were 3 sheets (S1, S2, S3) in order to
22533 # move S1 ahead of S2 the index would have to be set to 2. A sheet
22534 # index update request will be ignored if the requested index is
22535 # identical to the sheets current index or if the requested new
22536 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022537 "title": "A String", # The name of the sheet.
22538 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
22539 # (If the sheet is an object sheet, containing a chart or image, then
22540 # this field will be absent.)
22541 # When writing it is an error to set any grid properties on non-grid sheets.
22542 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070022543 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022544 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
22545 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070022546 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022547 },
22548 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
22549 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
22550 # for simplicity of conversion to/from color representations in various
22551 # languages over compactness; for example, the fields of this representation
22552 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22553 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22554 # method in iOS; and, with just a little work, it can be easily formatted into
22555 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22556 #
22557 # Example (Java):
22558 #
22559 # import com.google.type.Color;
22560 #
22561 # // ...
22562 # public static java.awt.Color fromProto(Color protocolor) {
22563 # float alpha = protocolor.hasAlpha()
22564 # ? protocolor.getAlpha().getValue()
22565 # : 1.0;
22566 #
22567 # return new java.awt.Color(
22568 # protocolor.getRed(),
22569 # protocolor.getGreen(),
22570 # protocolor.getBlue(),
22571 # alpha);
22572 # }
22573 #
22574 # public static Color toProto(java.awt.Color color) {
22575 # float red = (float) color.getRed();
22576 # float green = (float) color.getGreen();
22577 # float blue = (float) color.getBlue();
22578 # float denominator = 255.0;
22579 # Color.Builder resultBuilder =
22580 # Color
22581 # .newBuilder()
22582 # .setRed(red / denominator)
22583 # .setGreen(green / denominator)
22584 # .setBlue(blue / denominator);
22585 # int alpha = color.getAlpha();
22586 # if (alpha != 255) {
22587 # result.setAlpha(
22588 # FloatValue
22589 # .newBuilder()
22590 # .setValue(((float) alpha) / denominator)
22591 # .build());
22592 # }
22593 # return resultBuilder.build();
22594 # }
22595 # // ...
22596 #
22597 # Example (iOS / Obj-C):
22598 #
22599 # // ...
22600 # static UIColor* fromProto(Color* protocolor) {
22601 # float red = [protocolor red];
22602 # float green = [protocolor green];
22603 # float blue = [protocolor blue];
22604 # FloatValue* alpha_wrapper = [protocolor alpha];
22605 # float alpha = 1.0;
22606 # if (alpha_wrapper != nil) {
22607 # alpha = [alpha_wrapper value];
22608 # }
22609 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22610 # }
22611 #
22612 # static Color* toProto(UIColor* color) {
22613 # CGFloat red, green, blue, alpha;
22614 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22615 # return nil;
22616 # }
22617 # Color* result = [Color alloc] init];
22618 # [result setRed:red];
22619 # [result setGreen:green];
22620 # [result setBlue:blue];
22621 # if (alpha <= 0.9999) {
22622 # [result setAlpha:floatWrapperWithValue(alpha)];
22623 # }
22624 # [result autorelease];
22625 # return result;
22626 # }
22627 # // ...
22628 #
22629 # Example (JavaScript):
22630 #
22631 # // ...
22632 #
22633 # var protoToCssColor = function(rgb_color) {
22634 # var redFrac = rgb_color.red || 0.0;
22635 # var greenFrac = rgb_color.green || 0.0;
22636 # var blueFrac = rgb_color.blue || 0.0;
22637 # var red = Math.floor(redFrac * 255);
22638 # var green = Math.floor(greenFrac * 255);
22639 # var blue = Math.floor(blueFrac * 255);
22640 #
22641 # if (!('alpha' in rgb_color)) {
22642 # return rgbToCssColor_(red, green, blue);
22643 # }
22644 #
22645 # var alphaFrac = rgb_color.alpha.value || 0.0;
22646 # var rgbParams = [red, green, blue].join(',');
22647 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22648 # };
22649 #
22650 # var rgbToCssColor_ = function(red, green, blue) {
22651 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22652 # var hexString = rgbNumber.toString(16);
22653 # var missingZeros = 6 - hexString.length;
22654 # var resultBuilder = ['#'];
22655 # for (var i = 0; i < missingZeros; i++) {
22656 # resultBuilder.push('0');
22657 # }
22658 # resultBuilder.push(hexString);
22659 # return resultBuilder.join('');
22660 # };
22661 #
22662 # // ...
22663 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22664 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22665 # the final pixel color is defined by the equation:
22666 #
22667 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22668 #
22669 # This means that a value of 1.0 corresponds to a solid color, whereas
22670 # a value of 0.0 corresponds to a completely transparent color. This
22671 # uses a wrapper message rather than a simple float scalar so that it is
22672 # possible to distinguish between a default value and the value being unset.
22673 # If omitted, this color object is to be rendered as a solid color
22674 # (as if the alpha value had been explicitly given with a value of 1.0).
22675 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22676 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22677 },
22678 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
22679 "sheetId": 42, # The ID of the sheet. Must be non-negative.
22680 # This field cannot be changed once set.
22681 },
22682 },
22683 "updateEmbeddedObjectPosition": { # The result of updating an embedded object's position. # A reply from updating an embedded object's position.
22684 "position": { # The position of an embedded object such as a chart. # The new position of the embedded object.
22685 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
22686 # is chosen for you. Used only when writing.
22687 "sheetId": 42, # The sheet this is on. Set only if the embedded object
22688 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022689 "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 -070022690 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
22691 # All indexes are zero-based.
22692 "rowIndex": 42, # The row index of the coordinate.
22693 "columnIndex": 42, # The column index of the coordinate.
22694 "sheetId": 42, # The sheet this coordinate is on.
22695 },
22696 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22697 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070022698 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022699 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
22700 # from the anchor cell.
22701 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
22702 },
22703 },
22704 },
22705 "addChart": { # The result of adding a chart to a spreadsheet. # A reply from adding a chart.
22706 "chart": { # A chart embedded in a sheet. # The newly added chart.
22707 "chartId": 42, # The ID of the chart.
22708 "position": { # The position of an embedded object such as a chart. # The position of the chart.
22709 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
22710 # is chosen for you. Used only when writing.
22711 "sheetId": 42, # The sheet this is on. Set only if the embedded object
22712 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022713 "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 -070022714 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
22715 # All indexes are zero-based.
22716 "rowIndex": 42, # The row index of the coordinate.
22717 "columnIndex": 42, # The column index of the coordinate.
22718 "sheetId": 42, # The sheet this coordinate is on.
22719 },
22720 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22721 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070022722 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022723 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
22724 # from the anchor cell.
22725 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
22726 },
22727 },
22728 "spec": { # The specifications of a chart. # The specification of the chart.
22729 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022730 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
22731 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
22732 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22733 "sources": [ # The ranges of data for a series or domain.
22734 # Exactly one dimension must have a length of 1,
22735 # and all sources in the list must have the same dimension
22736 # with length 1.
22737 # The domain (if it exists) & all series must have the same number
22738 # of source ranges. If using more than one source range, then the source
22739 # range at a given offset must be contiguous across the domain and series.
22740 #
22741 # For example, these are valid configurations:
22742 #
22743 # domain sources: A1:A5
22744 # series1 sources: B1:B5
22745 # series2 sources: D6:D10
22746 #
22747 # domain sources: A1:A5, C10:C12
22748 # series1 sources: B1:B5, D10:D12
22749 # series2 sources: C1:C5, E10:E12
22750 { # A range on a sheet.
22751 # All indexes are zero-based.
22752 # Indexes are half open, e.g the start index is inclusive
22753 # and the end index is exclusive -- [start_index, end_index).
22754 # Missing indexes indicate the range is unbounded on that side.
22755 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022756 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022758 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022759 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022760 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022761 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022762 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022763 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022764 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022765 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022766 # `Sheet1!A:B == sheet_id: 0,
22767 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022768 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022769 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022770 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022771 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022772 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022773 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022774 #
22775 # The start index must always be less than or equal to the end index.
22776 # If the start index equals the end index, then the range is empty.
22777 # Empty ranges are typically not meaningful and are usually rendered in the
22778 # UI as `#REF!`.
22779 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022780 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022781 "sheetId": 42, # The sheet this range is on.
22782 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022783 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022784 },
22785 ],
22786 },
22787 },
22788 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
22789 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22790 "sources": [ # The ranges of data for a series or domain.
22791 # Exactly one dimension must have a length of 1,
22792 # and all sources in the list must have the same dimension
22793 # with length 1.
22794 # The domain (if it exists) & all series must have the same number
22795 # of source ranges. If using more than one source range, then the source
22796 # range at a given offset must be contiguous across the domain and series.
22797 #
22798 # For example, these are valid configurations:
22799 #
22800 # domain sources: A1:A5
22801 # series1 sources: B1:B5
22802 # series2 sources: D6:D10
22803 #
22804 # domain sources: A1:A5, C10:C12
22805 # series1 sources: B1:B5, D10:D12
22806 # series2 sources: C1:C5, E10:E12
22807 { # A range on a sheet.
22808 # All indexes are zero-based.
22809 # Indexes are half open, e.g the start index is inclusive
22810 # and the end index is exclusive -- [start_index, end_index).
22811 # Missing indexes indicate the range is unbounded on that side.
22812 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022813 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022814 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022815 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022816 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022817 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022818 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022819 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022820 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022821 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022822 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022823 # `Sheet1!A:B == sheet_id: 0,
22824 # 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!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022827 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022828 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022829 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022830 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022831 #
22832 # The start index must always be less than or equal to the end index.
22833 # If the start index equals the end index, then the range is empty.
22834 # Empty ranges are typically not meaningful and are usually rendered in the
22835 # UI as `#REF!`.
22836 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022837 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022838 "sheetId": 42, # The sheet this range is on.
22839 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022840 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022841 },
22842 ],
22843 },
22844 },
22845 "threeDimensional": True or False, # True if the pie is three dimensional.
22846 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
22847 "pieHole": 3.14, # The size of the hole in the pie chart.
22848 },
22849 "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 -070022850 # See BasicChartType for the list of all
22851 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022852 # of charts this supports.
22853 "headerCount": 42, # The number of rows or columns in the data that are "headers".
22854 # If not set, Google Sheets will guess how many rows are headers based
22855 # on the data.
22856 #
22857 # (Note that BasicChartAxis.title may override the axis title
22858 # inferred from the header values.)
22859 "series": [ # The data this chart is visualizing.
22860 { # A single series of data in a chart.
22861 # For example, if charting stock prices over time, multiple series may exist,
22862 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
22863 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
22864 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22865 "sources": [ # The ranges of data for a series or domain.
22866 # Exactly one dimension must have a length of 1,
22867 # and all sources in the list must have the same dimension
22868 # with length 1.
22869 # The domain (if it exists) & all series must have the same number
22870 # of source ranges. If using more than one source range, then the source
22871 # range at a given offset must be contiguous across the domain and series.
22872 #
22873 # For example, these are valid configurations:
22874 #
22875 # domain sources: A1:A5
22876 # series1 sources: B1:B5
22877 # series2 sources: D6:D10
22878 #
22879 # domain sources: A1:A5, C10:C12
22880 # series1 sources: B1:B5, D10:D12
22881 # series2 sources: C1:C5, E10:E12
22882 { # A range on a sheet.
22883 # All indexes are zero-based.
22884 # Indexes are half open, e.g the start index is inclusive
22885 # and the end index is exclusive -- [start_index, end_index).
22886 # Missing indexes indicate the range is unbounded on that side.
22887 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022888 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022889 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022890 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022891 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022892 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022893 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022894 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022895 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022896 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022897 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022898 # `Sheet1!A:B == sheet_id: 0,
22899 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022900 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022901 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022902 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022903 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022904 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022905 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022906 #
22907 # The start index must always be less than or equal to the end index.
22908 # If the start index equals the end index, then the range is empty.
22909 # Empty ranges are typically not meaningful and are usually rendered in the
22910 # UI as `#REF!`.
22911 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022912 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022913 "sheetId": 42, # The sheet this range is on.
22914 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022915 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022916 },
22917 ],
22918 },
22919 },
22920 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
22921 # For example, if charting stocks over time, the "Volume" series
22922 # may want to be pinned to the right with the prices pinned to the left,
22923 # because the scale of trading volume is different than the scale of
22924 # prices.
22925 # It is an error to specify an axis that isn't a valid minor axis
22926 # for the chart's type.
22927 "type": "A String", # The type of this series. Valid only if the
22928 # chartType is
22929 # COMBO.
22930 # Different types will change the way the series is visualized.
22931 # Only LINE, AREA,
22932 # and COLUMN are supported.
22933 },
22934 ],
22935 "legendPosition": "A String", # The position of the chart legend.
22936 "domains": [ # The domain of data this is charting.
22937 # Only a single domain is currently supported.
22938 { # The domain of a chart.
22939 # For example, if charting stock prices over time, this would be the date.
22940 "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 -070022941 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022942 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
22943 "sources": [ # The ranges of data for a series or domain.
22944 # Exactly one dimension must have a length of 1,
22945 # and all sources in the list must have the same dimension
22946 # with length 1.
22947 # The domain (if it exists) & all series must have the same number
22948 # of source ranges. If using more than one source range, then the source
22949 # range at a given offset must be contiguous across the domain and series.
22950 #
22951 # For example, these are valid configurations:
22952 #
22953 # domain sources: A1:A5
22954 # series1 sources: B1:B5
22955 # series2 sources: D6:D10
22956 #
22957 # domain sources: A1:A5, C10:C12
22958 # series1 sources: B1:B5, D10:D12
22959 # series2 sources: C1:C5, E10:E12
22960 { # A range on a sheet.
22961 # All indexes are zero-based.
22962 # Indexes are half open, e.g the start index is inclusive
22963 # and the end index is exclusive -- [start_index, end_index).
22964 # Missing indexes indicate the range is unbounded on that side.
22965 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022966 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022967 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022968 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022969 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022970 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022971 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022972 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022973 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022974 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022975 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022976 # `Sheet1!A:B == sheet_id: 0,
22977 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022978 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022979 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022980 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022981 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022982 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022983 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022984 #
22985 # The start index must always be less than or equal to the end index.
22986 # If the start index equals the end index, then the range is empty.
22987 # Empty ranges are typically not meaningful and are usually rendered in the
22988 # UI as `#REF!`.
22989 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022990 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022991 "sheetId": 42, # The sheet this range is on.
22992 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070022993 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022994 },
22995 ],
22996 },
22997 },
22998 },
22999 ],
23000 "chartType": "A String", # The type of the chart.
23001 "axis": [ # The axis on the chart.
23002 { # An axis of the chart.
23003 # A chart may not have more than one axis per
23004 # axis position.
23005 "position": "A String", # The position of this axis.
23006 "format": { # The format of a run of text in a cell. # The format of the title.
23007 # Only valid if the axis is not associated with the domain.
23008 # Absent values indicate that the field isn't specified.
23009 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23010 # for simplicity of conversion to/from color representations in various
23011 # languages over compactness; for example, the fields of this representation
23012 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23013 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23014 # method in iOS; and, with just a little work, it can be easily formatted into
23015 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23016 #
23017 # Example (Java):
23018 #
23019 # import com.google.type.Color;
23020 #
23021 # // ...
23022 # public static java.awt.Color fromProto(Color protocolor) {
23023 # float alpha = protocolor.hasAlpha()
23024 # ? protocolor.getAlpha().getValue()
23025 # : 1.0;
23026 #
23027 # return new java.awt.Color(
23028 # protocolor.getRed(),
23029 # protocolor.getGreen(),
23030 # protocolor.getBlue(),
23031 # alpha);
23032 # }
23033 #
23034 # public static Color toProto(java.awt.Color color) {
23035 # float red = (float) color.getRed();
23036 # float green = (float) color.getGreen();
23037 # float blue = (float) color.getBlue();
23038 # float denominator = 255.0;
23039 # Color.Builder resultBuilder =
23040 # Color
23041 # .newBuilder()
23042 # .setRed(red / denominator)
23043 # .setGreen(green / denominator)
23044 # .setBlue(blue / denominator);
23045 # int alpha = color.getAlpha();
23046 # if (alpha != 255) {
23047 # result.setAlpha(
23048 # FloatValue
23049 # .newBuilder()
23050 # .setValue(((float) alpha) / denominator)
23051 # .build());
23052 # }
23053 # return resultBuilder.build();
23054 # }
23055 # // ...
23056 #
23057 # Example (iOS / Obj-C):
23058 #
23059 # // ...
23060 # static UIColor* fromProto(Color* protocolor) {
23061 # float red = [protocolor red];
23062 # float green = [protocolor green];
23063 # float blue = [protocolor blue];
23064 # FloatValue* alpha_wrapper = [protocolor alpha];
23065 # float alpha = 1.0;
23066 # if (alpha_wrapper != nil) {
23067 # alpha = [alpha_wrapper value];
23068 # }
23069 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23070 # }
23071 #
23072 # static Color* toProto(UIColor* color) {
23073 # CGFloat red, green, blue, alpha;
23074 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23075 # return nil;
23076 # }
23077 # Color* result = [Color alloc] init];
23078 # [result setRed:red];
23079 # [result setGreen:green];
23080 # [result setBlue:blue];
23081 # if (alpha <= 0.9999) {
23082 # [result setAlpha:floatWrapperWithValue(alpha)];
23083 # }
23084 # [result autorelease];
23085 # return result;
23086 # }
23087 # // ...
23088 #
23089 # Example (JavaScript):
23090 #
23091 # // ...
23092 #
23093 # var protoToCssColor = function(rgb_color) {
23094 # var redFrac = rgb_color.red || 0.0;
23095 # var greenFrac = rgb_color.green || 0.0;
23096 # var blueFrac = rgb_color.blue || 0.0;
23097 # var red = Math.floor(redFrac * 255);
23098 # var green = Math.floor(greenFrac * 255);
23099 # var blue = Math.floor(blueFrac * 255);
23100 #
23101 # if (!('alpha' in rgb_color)) {
23102 # return rgbToCssColor_(red, green, blue);
23103 # }
23104 #
23105 # var alphaFrac = rgb_color.alpha.value || 0.0;
23106 # var rgbParams = [red, green, blue].join(',');
23107 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23108 # };
23109 #
23110 # var rgbToCssColor_ = function(red, green, blue) {
23111 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23112 # var hexString = rgbNumber.toString(16);
23113 # var missingZeros = 6 - hexString.length;
23114 # var resultBuilder = ['#'];
23115 # for (var i = 0; i < missingZeros; i++) {
23116 # resultBuilder.push('0');
23117 # }
23118 # resultBuilder.push(hexString);
23119 # return resultBuilder.join('');
23120 # };
23121 #
23122 # // ...
23123 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23124 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23125 # the final pixel color is defined by the equation:
23126 #
23127 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23128 #
23129 # This means that a value of 1.0 corresponds to a solid color, whereas
23130 # a value of 0.0 corresponds to a completely transparent color. This
23131 # uses a wrapper message rather than a simple float scalar so that it is
23132 # possible to distinguish between a default value and the value being unset.
23133 # If omitted, this color object is to be rendered as a solid color
23134 # (as if the alpha value had been explicitly given with a value of 1.0).
23135 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23136 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23137 },
23138 "bold": True or False, # True if the text is bold.
23139 "strikethrough": True or False, # True if the text has a strikethrough.
23140 "fontFamily": "A String", # The font family.
23141 "fontSize": 42, # The size of the font.
23142 "italic": True or False, # True if the text is italicized.
23143 "underline": True or False, # True if the text is underlined.
23144 },
Thomas Coffee2f245372017-03-27 10:39:26 -070023145 "title": "A String", # The title of this axis. If set, this overrides any title inferred
23146 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023147 },
23148 ],
23149 },
23150 "title": "A String", # The title of the chart.
23151 },
23152 },
23153 },
23154 "updateConditionalFormatRule": { # The result of updating a conditional format rule. # A reply from updating a conditional format rule.
23155 "oldIndex": 42, # The old index of the rule. Not set if a rule was replaced
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023156 # (because it is the same as new_index).
Thomas Coffee2f245372017-03-27 10:39:26 -070023157 "newIndex": 42, # The index of the new rule.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023158 "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 -070023159 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023160 "ranges": [ # The ranges that will be formatted if the condition is true.
23161 # All the ranges must be on the same grid.
23162 { # A range on a sheet.
23163 # All indexes are zero-based.
23164 # Indexes are half open, e.g the start index is inclusive
23165 # and the end index is exclusive -- [start_index, end_index).
23166 # Missing indexes indicate the range is unbounded on that side.
23167 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023168 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023169 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023170 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023171 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023172 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023173 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023174 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023175 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023176 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023177 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023178 # `Sheet1!A:B == sheet_id: 0,
23179 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023180 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023181 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023182 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023183 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023184 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023185 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023186 #
23187 # The start index must always be less than or equal to the end index.
23188 # If the start index equals the end index, then the range is empty.
23189 # Empty ranges are typically not meaningful and are usually rendered in the
23190 # UI as `#REF!`.
23191 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070023192 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023193 "sheetId": 42, # The sheet this range is on.
23194 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070023195 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023196 },
23197 ],
23198 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
23199 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
23200 # the format will be applied.
23201 # BooleanConditions are used by conditional formatting,
23202 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023203 "values": [ # The values of the condition. The number of supported values depends
23204 # on the condition type. Some support zero values,
23205 # others one or two values,
23206 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
23207 { # The value of the condition.
23208 "relativeDate": "A String", # A relative date (based on the current date).
23209 # Valid only if the type is
23210 # DATE_BEFORE,
23211 # DATE_AFTER,
23212 # DATE_ON_OR_BEFORE or
23213 # DATE_ON_OR_AFTER.
23214 #
23215 # Relative dates are not supported in data validation.
23216 # They are supported only in conditional formatting and
23217 # conditional filters.
23218 "userEnteredValue": "A String", # A value the condition is based on.
23219 # The value will be parsed as if the user typed into a cell.
23220 # Formulas are supported (and must begin with an `=`).
23221 },
23222 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023223 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023224 },
23225 "format": { # The format of a cell. # The format to apply.
23226 # Conditional formatting can only apply a subset of formatting:
23227 # bold, italic,
23228 # strikethrough,
23229 # foreground color &
23230 # background color.
23231 "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 -070023232 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
23233 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023234 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070023235 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023236 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023237 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023238 },
23239 "textDirection": "A String", # The direction of the text in the cell.
23240 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
23241 # When updating padding, every field must be specified.
23242 "top": 42, # The top padding of the cell.
23243 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023244 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023245 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023246 },
Thomas Coffee2f245372017-03-27 10:39:26 -070023247 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023248 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
23249 # for simplicity of conversion to/from color representations in various
23250 # languages over compactness; for example, the fields of this representation
23251 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23252 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23253 # method in iOS; and, with just a little work, it can be easily formatted into
23254 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23255 #
23256 # Example (Java):
23257 #
23258 # import com.google.type.Color;
23259 #
23260 # // ...
23261 # public static java.awt.Color fromProto(Color protocolor) {
23262 # float alpha = protocolor.hasAlpha()
23263 # ? protocolor.getAlpha().getValue()
23264 # : 1.0;
23265 #
23266 # return new java.awt.Color(
23267 # protocolor.getRed(),
23268 # protocolor.getGreen(),
23269 # protocolor.getBlue(),
23270 # alpha);
23271 # }
23272 #
23273 # public static Color toProto(java.awt.Color color) {
23274 # float red = (float) color.getRed();
23275 # float green = (float) color.getGreen();
23276 # float blue = (float) color.getBlue();
23277 # float denominator = 255.0;
23278 # Color.Builder resultBuilder =
23279 # Color
23280 # .newBuilder()
23281 # .setRed(red / denominator)
23282 # .setGreen(green / denominator)
23283 # .setBlue(blue / denominator);
23284 # int alpha = color.getAlpha();
23285 # if (alpha != 255) {
23286 # result.setAlpha(
23287 # FloatValue
23288 # .newBuilder()
23289 # .setValue(((float) alpha) / denominator)
23290 # .build());
23291 # }
23292 # return resultBuilder.build();
23293 # }
23294 # // ...
23295 #
23296 # Example (iOS / Obj-C):
23297 #
23298 # // ...
23299 # static UIColor* fromProto(Color* protocolor) {
23300 # float red = [protocolor red];
23301 # float green = [protocolor green];
23302 # float blue = [protocolor blue];
23303 # FloatValue* alpha_wrapper = [protocolor alpha];
23304 # float alpha = 1.0;
23305 # if (alpha_wrapper != nil) {
23306 # alpha = [alpha_wrapper value];
23307 # }
23308 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23309 # }
23310 #
23311 # static Color* toProto(UIColor* color) {
23312 # CGFloat red, green, blue, alpha;
23313 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23314 # return nil;
23315 # }
23316 # Color* result = [Color alloc] init];
23317 # [result setRed:red];
23318 # [result setGreen:green];
23319 # [result setBlue:blue];
23320 # if (alpha <= 0.9999) {
23321 # [result setAlpha:floatWrapperWithValue(alpha)];
23322 # }
23323 # [result autorelease];
23324 # return result;
23325 # }
23326 # // ...
23327 #
23328 # Example (JavaScript):
23329 #
23330 # // ...
23331 #
23332 # var protoToCssColor = function(rgb_color) {
23333 # var redFrac = rgb_color.red || 0.0;
23334 # var greenFrac = rgb_color.green || 0.0;
23335 # var blueFrac = rgb_color.blue || 0.0;
23336 # var red = Math.floor(redFrac * 255);
23337 # var green = Math.floor(greenFrac * 255);
23338 # var blue = Math.floor(blueFrac * 255);
23339 #
23340 # if (!('alpha' in rgb_color)) {
23341 # return rgbToCssColor_(red, green, blue);
23342 # }
23343 #
23344 # var alphaFrac = rgb_color.alpha.value || 0.0;
23345 # var rgbParams = [red, green, blue].join(',');
23346 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23347 # };
23348 #
23349 # var rgbToCssColor_ = function(red, green, blue) {
23350 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23351 # var hexString = rgbNumber.toString(16);
23352 # var missingZeros = 6 - hexString.length;
23353 # var resultBuilder = ['#'];
23354 # for (var i = 0; i < missingZeros; i++) {
23355 # resultBuilder.push('0');
23356 # }
23357 # resultBuilder.push(hexString);
23358 # return resultBuilder.join('');
23359 # };
23360 #
23361 # // ...
23362 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23363 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23364 # the final pixel color is defined by the equation:
23365 #
23366 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23367 #
23368 # This means that a value of 1.0 corresponds to a solid color, whereas
23369 # a value of 0.0 corresponds to a completely transparent color. This
23370 # uses a wrapper message rather than a simple float scalar so that it is
23371 # possible to distinguish between a default value and the value being unset.
23372 # If omitted, this color object is to be rendered as a solid color
23373 # (as if the alpha value had been explicitly given with a value of 1.0).
23374 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23375 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23376 },
Thomas Coffee2f245372017-03-27 10:39:26 -070023377 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023378 "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).
23379 # Absent values indicate that the field isn't specified.
23380 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23381 # for simplicity of conversion to/from color representations in various
23382 # languages over compactness; for example, the fields of this representation
23383 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23384 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23385 # method in iOS; and, with just a little work, it can be easily formatted into
23386 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23387 #
23388 # Example (Java):
23389 #
23390 # import com.google.type.Color;
23391 #
23392 # // ...
23393 # public static java.awt.Color fromProto(Color protocolor) {
23394 # float alpha = protocolor.hasAlpha()
23395 # ? protocolor.getAlpha().getValue()
23396 # : 1.0;
23397 #
23398 # return new java.awt.Color(
23399 # protocolor.getRed(),
23400 # protocolor.getGreen(),
23401 # protocolor.getBlue(),
23402 # alpha);
23403 # }
23404 #
23405 # public static Color toProto(java.awt.Color color) {
23406 # float red = (float) color.getRed();
23407 # float green = (float) color.getGreen();
23408 # float blue = (float) color.getBlue();
23409 # float denominator = 255.0;
23410 # Color.Builder resultBuilder =
23411 # Color
23412 # .newBuilder()
23413 # .setRed(red / denominator)
23414 # .setGreen(green / denominator)
23415 # .setBlue(blue / denominator);
23416 # int alpha = color.getAlpha();
23417 # if (alpha != 255) {
23418 # result.setAlpha(
23419 # FloatValue
23420 # .newBuilder()
23421 # .setValue(((float) alpha) / denominator)
23422 # .build());
23423 # }
23424 # return resultBuilder.build();
23425 # }
23426 # // ...
23427 #
23428 # Example (iOS / Obj-C):
23429 #
23430 # // ...
23431 # static UIColor* fromProto(Color* protocolor) {
23432 # float red = [protocolor red];
23433 # float green = [protocolor green];
23434 # float blue = [protocolor blue];
23435 # FloatValue* alpha_wrapper = [protocolor alpha];
23436 # float alpha = 1.0;
23437 # if (alpha_wrapper != nil) {
23438 # alpha = [alpha_wrapper value];
23439 # }
23440 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23441 # }
23442 #
23443 # static Color* toProto(UIColor* color) {
23444 # CGFloat red, green, blue, alpha;
23445 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23446 # return nil;
23447 # }
23448 # Color* result = [Color alloc] init];
23449 # [result setRed:red];
23450 # [result setGreen:green];
23451 # [result setBlue:blue];
23452 # if (alpha <= 0.9999) {
23453 # [result setAlpha:floatWrapperWithValue(alpha)];
23454 # }
23455 # [result autorelease];
23456 # return result;
23457 # }
23458 # // ...
23459 #
23460 # Example (JavaScript):
23461 #
23462 # // ...
23463 #
23464 # var protoToCssColor = function(rgb_color) {
23465 # var redFrac = rgb_color.red || 0.0;
23466 # var greenFrac = rgb_color.green || 0.0;
23467 # var blueFrac = rgb_color.blue || 0.0;
23468 # var red = Math.floor(redFrac * 255);
23469 # var green = Math.floor(greenFrac * 255);
23470 # var blue = Math.floor(blueFrac * 255);
23471 #
23472 # if (!('alpha' in rgb_color)) {
23473 # return rgbToCssColor_(red, green, blue);
23474 # }
23475 #
23476 # var alphaFrac = rgb_color.alpha.value || 0.0;
23477 # var rgbParams = [red, green, blue].join(',');
23478 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23479 # };
23480 #
23481 # var rgbToCssColor_ = function(red, green, blue) {
23482 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23483 # var hexString = rgbNumber.toString(16);
23484 # var missingZeros = 6 - hexString.length;
23485 # var resultBuilder = ['#'];
23486 # for (var i = 0; i < missingZeros; i++) {
23487 # resultBuilder.push('0');
23488 # }
23489 # resultBuilder.push(hexString);
23490 # return resultBuilder.join('');
23491 # };
23492 #
23493 # // ...
23494 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23495 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23496 # the final pixel color is defined by the equation:
23497 #
23498 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23499 #
23500 # This means that a value of 1.0 corresponds to a solid color, whereas
23501 # a value of 0.0 corresponds to a completely transparent color. This
23502 # uses a wrapper message rather than a simple float scalar so that it is
23503 # possible to distinguish between a default value and the value being unset.
23504 # If omitted, this color object is to be rendered as a solid color
23505 # (as if the alpha value had been explicitly given with a value of 1.0).
23506 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23507 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23508 },
23509 "bold": True or False, # True if the text is bold.
23510 "strikethrough": True or False, # True if the text has a strikethrough.
23511 "fontFamily": "A String", # The font family.
23512 "fontSize": 42, # The size of the font.
23513 "italic": True or False, # True if the text is italicized.
23514 "underline": True or False, # True if the text is underlined.
23515 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070023516 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
23517 "angle": 42, # The angle between the standard orientation and the desired orientation.
23518 # Measured in degrees. Valid values are between -90 and 90. Positive
23519 # angles are angled upwards, negative are angled downwards.
23520 #
23521 # Note: For LTR text direction positive angles are in the counterclockwise
23522 # direction, whereas for RTL they are in the clockwise direction
23523 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
23524 # characters is unchanged.
23525 # For example:
23526 #
23527 # | V |
23528 # | e |
23529 # | r |
23530 # | t |
23531 # | i |
23532 # | c |
23533 # | a |
23534 # | l |
23535 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023536 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
23537 "borders": { # The borders of the cell. # The borders of the cell.
23538 "top": { # A border along a cell. # The top border of the cell.
23539 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23540 # for simplicity of conversion to/from color representations in various
23541 # languages over compactness; for example, the fields of this representation
23542 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23543 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23544 # method in iOS; and, with just a little work, it can be easily formatted into
23545 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23546 #
23547 # Example (Java):
23548 #
23549 # import com.google.type.Color;
23550 #
23551 # // ...
23552 # public static java.awt.Color fromProto(Color protocolor) {
23553 # float alpha = protocolor.hasAlpha()
23554 # ? protocolor.getAlpha().getValue()
23555 # : 1.0;
23556 #
23557 # return new java.awt.Color(
23558 # protocolor.getRed(),
23559 # protocolor.getGreen(),
23560 # protocolor.getBlue(),
23561 # alpha);
23562 # }
23563 #
23564 # public static Color toProto(java.awt.Color color) {
23565 # float red = (float) color.getRed();
23566 # float green = (float) color.getGreen();
23567 # float blue = (float) color.getBlue();
23568 # float denominator = 255.0;
23569 # Color.Builder resultBuilder =
23570 # Color
23571 # .newBuilder()
23572 # .setRed(red / denominator)
23573 # .setGreen(green / denominator)
23574 # .setBlue(blue / denominator);
23575 # int alpha = color.getAlpha();
23576 # if (alpha != 255) {
23577 # result.setAlpha(
23578 # FloatValue
23579 # .newBuilder()
23580 # .setValue(((float) alpha) / denominator)
23581 # .build());
23582 # }
23583 # return resultBuilder.build();
23584 # }
23585 # // ...
23586 #
23587 # Example (iOS / Obj-C):
23588 #
23589 # // ...
23590 # static UIColor* fromProto(Color* protocolor) {
23591 # float red = [protocolor red];
23592 # float green = [protocolor green];
23593 # float blue = [protocolor blue];
23594 # FloatValue* alpha_wrapper = [protocolor alpha];
23595 # float alpha = 1.0;
23596 # if (alpha_wrapper != nil) {
23597 # alpha = [alpha_wrapper value];
23598 # }
23599 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23600 # }
23601 #
23602 # static Color* toProto(UIColor* color) {
23603 # CGFloat red, green, blue, alpha;
23604 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23605 # return nil;
23606 # }
23607 # Color* result = [Color alloc] init];
23608 # [result setRed:red];
23609 # [result setGreen:green];
23610 # [result setBlue:blue];
23611 # if (alpha <= 0.9999) {
23612 # [result setAlpha:floatWrapperWithValue(alpha)];
23613 # }
23614 # [result autorelease];
23615 # return result;
23616 # }
23617 # // ...
23618 #
23619 # Example (JavaScript):
23620 #
23621 # // ...
23622 #
23623 # var protoToCssColor = function(rgb_color) {
23624 # var redFrac = rgb_color.red || 0.0;
23625 # var greenFrac = rgb_color.green || 0.0;
23626 # var blueFrac = rgb_color.blue || 0.0;
23627 # var red = Math.floor(redFrac * 255);
23628 # var green = Math.floor(greenFrac * 255);
23629 # var blue = Math.floor(blueFrac * 255);
23630 #
23631 # if (!('alpha' in rgb_color)) {
23632 # return rgbToCssColor_(red, green, blue);
23633 # }
23634 #
23635 # var alphaFrac = rgb_color.alpha.value || 0.0;
23636 # var rgbParams = [red, green, blue].join(',');
23637 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23638 # };
23639 #
23640 # var rgbToCssColor_ = function(red, green, blue) {
23641 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23642 # var hexString = rgbNumber.toString(16);
23643 # var missingZeros = 6 - hexString.length;
23644 # var resultBuilder = ['#'];
23645 # for (var i = 0; i < missingZeros; i++) {
23646 # resultBuilder.push('0');
23647 # }
23648 # resultBuilder.push(hexString);
23649 # return resultBuilder.join('');
23650 # };
23651 #
23652 # // ...
23653 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23654 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23655 # the final pixel color is defined by the equation:
23656 #
23657 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23658 #
23659 # This means that a value of 1.0 corresponds to a solid color, whereas
23660 # a value of 0.0 corresponds to a completely transparent color. This
23661 # uses a wrapper message rather than a simple float scalar so that it is
23662 # possible to distinguish between a default value and the value being unset.
23663 # If omitted, this color object is to be rendered as a solid color
23664 # (as if the alpha value had been explicitly given with a value of 1.0).
23665 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23666 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23667 },
23668 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023669 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023670 "style": "A String", # The style of the border.
23671 },
23672 "right": { # A border along a cell. # The right border of the cell.
23673 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23674 # for simplicity of conversion to/from color representations in various
23675 # languages over compactness; for example, the fields of this representation
23676 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23677 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23678 # method in iOS; and, with just a little work, it can be easily formatted into
23679 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23680 #
23681 # Example (Java):
23682 #
23683 # import com.google.type.Color;
23684 #
23685 # // ...
23686 # public static java.awt.Color fromProto(Color protocolor) {
23687 # float alpha = protocolor.hasAlpha()
23688 # ? protocolor.getAlpha().getValue()
23689 # : 1.0;
23690 #
23691 # return new java.awt.Color(
23692 # protocolor.getRed(),
23693 # protocolor.getGreen(),
23694 # protocolor.getBlue(),
23695 # alpha);
23696 # }
23697 #
23698 # public static Color toProto(java.awt.Color color) {
23699 # float red = (float) color.getRed();
23700 # float green = (float) color.getGreen();
23701 # float blue = (float) color.getBlue();
23702 # float denominator = 255.0;
23703 # Color.Builder resultBuilder =
23704 # Color
23705 # .newBuilder()
23706 # .setRed(red / denominator)
23707 # .setGreen(green / denominator)
23708 # .setBlue(blue / denominator);
23709 # int alpha = color.getAlpha();
23710 # if (alpha != 255) {
23711 # result.setAlpha(
23712 # FloatValue
23713 # .newBuilder()
23714 # .setValue(((float) alpha) / denominator)
23715 # .build());
23716 # }
23717 # return resultBuilder.build();
23718 # }
23719 # // ...
23720 #
23721 # Example (iOS / Obj-C):
23722 #
23723 # // ...
23724 # static UIColor* fromProto(Color* protocolor) {
23725 # float red = [protocolor red];
23726 # float green = [protocolor green];
23727 # float blue = [protocolor blue];
23728 # FloatValue* alpha_wrapper = [protocolor alpha];
23729 # float alpha = 1.0;
23730 # if (alpha_wrapper != nil) {
23731 # alpha = [alpha_wrapper value];
23732 # }
23733 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23734 # }
23735 #
23736 # static Color* toProto(UIColor* color) {
23737 # CGFloat red, green, blue, alpha;
23738 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23739 # return nil;
23740 # }
23741 # Color* result = [Color alloc] init];
23742 # [result setRed:red];
23743 # [result setGreen:green];
23744 # [result setBlue:blue];
23745 # if (alpha <= 0.9999) {
23746 # [result setAlpha:floatWrapperWithValue(alpha)];
23747 # }
23748 # [result autorelease];
23749 # return result;
23750 # }
23751 # // ...
23752 #
23753 # Example (JavaScript):
23754 #
23755 # // ...
23756 #
23757 # var protoToCssColor = function(rgb_color) {
23758 # var redFrac = rgb_color.red || 0.0;
23759 # var greenFrac = rgb_color.green || 0.0;
23760 # var blueFrac = rgb_color.blue || 0.0;
23761 # var red = Math.floor(redFrac * 255);
23762 # var green = Math.floor(greenFrac * 255);
23763 # var blue = Math.floor(blueFrac * 255);
23764 #
23765 # if (!('alpha' in rgb_color)) {
23766 # return rgbToCssColor_(red, green, blue);
23767 # }
23768 #
23769 # var alphaFrac = rgb_color.alpha.value || 0.0;
23770 # var rgbParams = [red, green, blue].join(',');
23771 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23772 # };
23773 #
23774 # var rgbToCssColor_ = function(red, green, blue) {
23775 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23776 # var hexString = rgbNumber.toString(16);
23777 # var missingZeros = 6 - hexString.length;
23778 # var resultBuilder = ['#'];
23779 # for (var i = 0; i < missingZeros; i++) {
23780 # resultBuilder.push('0');
23781 # }
23782 # resultBuilder.push(hexString);
23783 # return resultBuilder.join('');
23784 # };
23785 #
23786 # // ...
23787 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23788 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23789 # the final pixel color is defined by the equation:
23790 #
23791 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23792 #
23793 # This means that a value of 1.0 corresponds to a solid color, whereas
23794 # a value of 0.0 corresponds to a completely transparent color. This
23795 # uses a wrapper message rather than a simple float scalar so that it is
23796 # possible to distinguish between a default value and the value being unset.
23797 # If omitted, this color object is to be rendered as a solid color
23798 # (as if the alpha value had been explicitly given with a value of 1.0).
23799 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23800 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23801 },
23802 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023803 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023804 "style": "A String", # The style of the border.
23805 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023806 "left": { # A border along a cell. # The left border of the cell.
23807 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23808 # for simplicity of conversion to/from color representations in various
23809 # languages over compactness; for example, the fields of this representation
23810 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23811 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23812 # method in iOS; and, with just a little work, it can be easily formatted into
23813 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23814 #
23815 # Example (Java):
23816 #
23817 # import com.google.type.Color;
23818 #
23819 # // ...
23820 # public static java.awt.Color fromProto(Color protocolor) {
23821 # float alpha = protocolor.hasAlpha()
23822 # ? protocolor.getAlpha().getValue()
23823 # : 1.0;
23824 #
23825 # return new java.awt.Color(
23826 # protocolor.getRed(),
23827 # protocolor.getGreen(),
23828 # protocolor.getBlue(),
23829 # alpha);
23830 # }
23831 #
23832 # public static Color toProto(java.awt.Color color) {
23833 # float red = (float) color.getRed();
23834 # float green = (float) color.getGreen();
23835 # float blue = (float) color.getBlue();
23836 # float denominator = 255.0;
23837 # Color.Builder resultBuilder =
23838 # Color
23839 # .newBuilder()
23840 # .setRed(red / denominator)
23841 # .setGreen(green / denominator)
23842 # .setBlue(blue / denominator);
23843 # int alpha = color.getAlpha();
23844 # if (alpha != 255) {
23845 # result.setAlpha(
23846 # FloatValue
23847 # .newBuilder()
23848 # .setValue(((float) alpha) / denominator)
23849 # .build());
23850 # }
23851 # return resultBuilder.build();
23852 # }
23853 # // ...
23854 #
23855 # Example (iOS / Obj-C):
23856 #
23857 # // ...
23858 # static UIColor* fromProto(Color* protocolor) {
23859 # float red = [protocolor red];
23860 # float green = [protocolor green];
23861 # float blue = [protocolor blue];
23862 # FloatValue* alpha_wrapper = [protocolor alpha];
23863 # float alpha = 1.0;
23864 # if (alpha_wrapper != nil) {
23865 # alpha = [alpha_wrapper value];
23866 # }
23867 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23868 # }
23869 #
23870 # static Color* toProto(UIColor* color) {
23871 # CGFloat red, green, blue, alpha;
23872 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23873 # return nil;
23874 # }
23875 # Color* result = [Color alloc] init];
23876 # [result setRed:red];
23877 # [result setGreen:green];
23878 # [result setBlue:blue];
23879 # if (alpha <= 0.9999) {
23880 # [result setAlpha:floatWrapperWithValue(alpha)];
23881 # }
23882 # [result autorelease];
23883 # return result;
23884 # }
23885 # // ...
23886 #
23887 # Example (JavaScript):
23888 #
23889 # // ...
23890 #
23891 # var protoToCssColor = function(rgb_color) {
23892 # var redFrac = rgb_color.red || 0.0;
23893 # var greenFrac = rgb_color.green || 0.0;
23894 # var blueFrac = rgb_color.blue || 0.0;
23895 # var red = Math.floor(redFrac * 255);
23896 # var green = Math.floor(greenFrac * 255);
23897 # var blue = Math.floor(blueFrac * 255);
23898 #
23899 # if (!('alpha' in rgb_color)) {
23900 # return rgbToCssColor_(red, green, blue);
23901 # }
23902 #
23903 # var alphaFrac = rgb_color.alpha.value || 0.0;
23904 # var rgbParams = [red, green, blue].join(',');
23905 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23906 # };
23907 #
23908 # var rgbToCssColor_ = function(red, green, blue) {
23909 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23910 # var hexString = rgbNumber.toString(16);
23911 # var missingZeros = 6 - hexString.length;
23912 # var resultBuilder = ['#'];
23913 # for (var i = 0; i < missingZeros; i++) {
23914 # resultBuilder.push('0');
23915 # }
23916 # resultBuilder.push(hexString);
23917 # return resultBuilder.join('');
23918 # };
23919 #
23920 # // ...
23921 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23922 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23923 # the final pixel color is defined by the equation:
23924 #
23925 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23926 #
23927 # This means that a value of 1.0 corresponds to a solid color, whereas
23928 # a value of 0.0 corresponds to a completely transparent color. This
23929 # uses a wrapper message rather than a simple float scalar so that it is
23930 # possible to distinguish between a default value and the value being unset.
23931 # If omitted, this color object is to be rendered as a solid color
23932 # (as if the alpha value had been explicitly given with a value of 1.0).
23933 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23934 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23935 },
23936 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023937 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023938 "style": "A String", # The style of the border.
23939 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070023940 "bottom": { # A border along a cell. # The bottom border of the cell.
23941 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23942 # for simplicity of conversion to/from color representations in various
23943 # languages over compactness; for example, the fields of this representation
23944 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23945 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23946 # method in iOS; and, with just a little work, it can be easily formatted into
23947 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23948 #
23949 # Example (Java):
23950 #
23951 # import com.google.type.Color;
23952 #
23953 # // ...
23954 # public static java.awt.Color fromProto(Color protocolor) {
23955 # float alpha = protocolor.hasAlpha()
23956 # ? protocolor.getAlpha().getValue()
23957 # : 1.0;
23958 #
23959 # return new java.awt.Color(
23960 # protocolor.getRed(),
23961 # protocolor.getGreen(),
23962 # protocolor.getBlue(),
23963 # alpha);
23964 # }
23965 #
23966 # public static Color toProto(java.awt.Color color) {
23967 # float red = (float) color.getRed();
23968 # float green = (float) color.getGreen();
23969 # float blue = (float) color.getBlue();
23970 # float denominator = 255.0;
23971 # Color.Builder resultBuilder =
23972 # Color
23973 # .newBuilder()
23974 # .setRed(red / denominator)
23975 # .setGreen(green / denominator)
23976 # .setBlue(blue / denominator);
23977 # int alpha = color.getAlpha();
23978 # if (alpha != 255) {
23979 # result.setAlpha(
23980 # FloatValue
23981 # .newBuilder()
23982 # .setValue(((float) alpha) / denominator)
23983 # .build());
23984 # }
23985 # return resultBuilder.build();
23986 # }
23987 # // ...
23988 #
23989 # Example (iOS / Obj-C):
23990 #
23991 # // ...
23992 # static UIColor* fromProto(Color* protocolor) {
23993 # float red = [protocolor red];
23994 # float green = [protocolor green];
23995 # float blue = [protocolor blue];
23996 # FloatValue* alpha_wrapper = [protocolor alpha];
23997 # float alpha = 1.0;
23998 # if (alpha_wrapper != nil) {
23999 # alpha = [alpha_wrapper value];
24000 # }
24001 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24002 # }
24003 #
24004 # static Color* toProto(UIColor* color) {
24005 # CGFloat red, green, blue, alpha;
24006 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24007 # return nil;
24008 # }
24009 # Color* result = [Color alloc] init];
24010 # [result setRed:red];
24011 # [result setGreen:green];
24012 # [result setBlue:blue];
24013 # if (alpha <= 0.9999) {
24014 # [result setAlpha:floatWrapperWithValue(alpha)];
24015 # }
24016 # [result autorelease];
24017 # return result;
24018 # }
24019 # // ...
24020 #
24021 # Example (JavaScript):
24022 #
24023 # // ...
24024 #
24025 # var protoToCssColor = function(rgb_color) {
24026 # var redFrac = rgb_color.red || 0.0;
24027 # var greenFrac = rgb_color.green || 0.0;
24028 # var blueFrac = rgb_color.blue || 0.0;
24029 # var red = Math.floor(redFrac * 255);
24030 # var green = Math.floor(greenFrac * 255);
24031 # var blue = Math.floor(blueFrac * 255);
24032 #
24033 # if (!('alpha' in rgb_color)) {
24034 # return rgbToCssColor_(red, green, blue);
24035 # }
24036 #
24037 # var alphaFrac = rgb_color.alpha.value || 0.0;
24038 # var rgbParams = [red, green, blue].join(',');
24039 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24040 # };
24041 #
24042 # var rgbToCssColor_ = function(red, green, blue) {
24043 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24044 # var hexString = rgbNumber.toString(16);
24045 # var missingZeros = 6 - hexString.length;
24046 # var resultBuilder = ['#'];
24047 # for (var i = 0; i < missingZeros; i++) {
24048 # resultBuilder.push('0');
24049 # }
24050 # resultBuilder.push(hexString);
24051 # return resultBuilder.join('');
24052 # };
24053 #
24054 # // ...
24055 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24056 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24057 # the final pixel color is defined by the equation:
24058 #
24059 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24060 #
24061 # This means that a value of 1.0 corresponds to a solid color, whereas
24062 # a value of 0.0 corresponds to a completely transparent color. This
24063 # uses a wrapper message rather than a simple float scalar so that it is
24064 # possible to distinguish between a default value and the value being unset.
24065 # If omitted, this color object is to be rendered as a solid color
24066 # (as if the alpha value had been explicitly given with a value of 1.0).
24067 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24068 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24069 },
24070 "width": 42, # The width of the border, in pixels.
24071 # Deprecated; the width is determined by the "style" field.
24072 "style": "A String", # The style of the border.
24073 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024074 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070024075 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024076 },
24077 },
24078 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
24079 # the interpolation points listed. The format of a cell will vary
24080 # based on its contents as compared to the values of the interpolation
24081 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024082 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024083 # These pin the gradient color scale according to the color,
24084 # type and value chosen.
24085 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24086 # for simplicity of conversion to/from color representations in various
24087 # languages over compactness; for example, the fields of this representation
24088 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24089 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24090 # method in iOS; and, with just a little work, it can be easily formatted into
24091 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24092 #
24093 # Example (Java):
24094 #
24095 # import com.google.type.Color;
24096 #
24097 # // ...
24098 # public static java.awt.Color fromProto(Color protocolor) {
24099 # float alpha = protocolor.hasAlpha()
24100 # ? protocolor.getAlpha().getValue()
24101 # : 1.0;
24102 #
24103 # return new java.awt.Color(
24104 # protocolor.getRed(),
24105 # protocolor.getGreen(),
24106 # protocolor.getBlue(),
24107 # alpha);
24108 # }
24109 #
24110 # public static Color toProto(java.awt.Color color) {
24111 # float red = (float) color.getRed();
24112 # float green = (float) color.getGreen();
24113 # float blue = (float) color.getBlue();
24114 # float denominator = 255.0;
24115 # Color.Builder resultBuilder =
24116 # Color
24117 # .newBuilder()
24118 # .setRed(red / denominator)
24119 # .setGreen(green / denominator)
24120 # .setBlue(blue / denominator);
24121 # int alpha = color.getAlpha();
24122 # if (alpha != 255) {
24123 # result.setAlpha(
24124 # FloatValue
24125 # .newBuilder()
24126 # .setValue(((float) alpha) / denominator)
24127 # .build());
24128 # }
24129 # return resultBuilder.build();
24130 # }
24131 # // ...
24132 #
24133 # Example (iOS / Obj-C):
24134 #
24135 # // ...
24136 # static UIColor* fromProto(Color* protocolor) {
24137 # float red = [protocolor red];
24138 # float green = [protocolor green];
24139 # float blue = [protocolor blue];
24140 # FloatValue* alpha_wrapper = [protocolor alpha];
24141 # float alpha = 1.0;
24142 # if (alpha_wrapper != nil) {
24143 # alpha = [alpha_wrapper value];
24144 # }
24145 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24146 # }
24147 #
24148 # static Color* toProto(UIColor* color) {
24149 # CGFloat red, green, blue, alpha;
24150 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24151 # return nil;
24152 # }
24153 # Color* result = [Color alloc] init];
24154 # [result setRed:red];
24155 # [result setGreen:green];
24156 # [result setBlue:blue];
24157 # if (alpha <= 0.9999) {
24158 # [result setAlpha:floatWrapperWithValue(alpha)];
24159 # }
24160 # [result autorelease];
24161 # return result;
24162 # }
24163 # // ...
24164 #
24165 # Example (JavaScript):
24166 #
24167 # // ...
24168 #
24169 # var protoToCssColor = function(rgb_color) {
24170 # var redFrac = rgb_color.red || 0.0;
24171 # var greenFrac = rgb_color.green || 0.0;
24172 # var blueFrac = rgb_color.blue || 0.0;
24173 # var red = Math.floor(redFrac * 255);
24174 # var green = Math.floor(greenFrac * 255);
24175 # var blue = Math.floor(blueFrac * 255);
24176 #
24177 # if (!('alpha' in rgb_color)) {
24178 # return rgbToCssColor_(red, green, blue);
24179 # }
24180 #
24181 # var alphaFrac = rgb_color.alpha.value || 0.0;
24182 # var rgbParams = [red, green, blue].join(',');
24183 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24184 # };
24185 #
24186 # var rgbToCssColor_ = function(red, green, blue) {
24187 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24188 # var hexString = rgbNumber.toString(16);
24189 # var missingZeros = 6 - hexString.length;
24190 # var resultBuilder = ['#'];
24191 # for (var i = 0; i < missingZeros; i++) {
24192 # resultBuilder.push('0');
24193 # }
24194 # resultBuilder.push(hexString);
24195 # return resultBuilder.join('');
24196 # };
24197 #
24198 # // ...
24199 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24200 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24201 # the final pixel color is defined by the equation:
24202 #
24203 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24204 #
24205 # This means that a value of 1.0 corresponds to a solid color, whereas
24206 # a value of 0.0 corresponds to a completely transparent color. This
24207 # uses a wrapper message rather than a simple float scalar so that it is
24208 # possible to distinguish between a default value and the value being unset.
24209 # If omitted, this color object is to be rendered as a solid color
24210 # (as if the alpha value had been explicitly given with a value of 1.0).
24211 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24212 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24213 },
24214 "type": "A String", # How the value should be interpreted.
24215 "value": "A String", # The value this interpolation point uses. May be a formula.
24216 # Unused if type is MIN or
24217 # MAX.
24218 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024219 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024220 # These pin the gradient color scale according to the color,
24221 # type and value chosen.
24222 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24223 # for simplicity of conversion to/from color representations in various
24224 # languages over compactness; for example, the fields of this representation
24225 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24226 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24227 # method in iOS; and, with just a little work, it can be easily formatted into
24228 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24229 #
24230 # Example (Java):
24231 #
24232 # import com.google.type.Color;
24233 #
24234 # // ...
24235 # public static java.awt.Color fromProto(Color protocolor) {
24236 # float alpha = protocolor.hasAlpha()
24237 # ? protocolor.getAlpha().getValue()
24238 # : 1.0;
24239 #
24240 # return new java.awt.Color(
24241 # protocolor.getRed(),
24242 # protocolor.getGreen(),
24243 # protocolor.getBlue(),
24244 # alpha);
24245 # }
24246 #
24247 # public static Color toProto(java.awt.Color color) {
24248 # float red = (float) color.getRed();
24249 # float green = (float) color.getGreen();
24250 # float blue = (float) color.getBlue();
24251 # float denominator = 255.0;
24252 # Color.Builder resultBuilder =
24253 # Color
24254 # .newBuilder()
24255 # .setRed(red / denominator)
24256 # .setGreen(green / denominator)
24257 # .setBlue(blue / denominator);
24258 # int alpha = color.getAlpha();
24259 # if (alpha != 255) {
24260 # result.setAlpha(
24261 # FloatValue
24262 # .newBuilder()
24263 # .setValue(((float) alpha) / denominator)
24264 # .build());
24265 # }
24266 # return resultBuilder.build();
24267 # }
24268 # // ...
24269 #
24270 # Example (iOS / Obj-C):
24271 #
24272 # // ...
24273 # static UIColor* fromProto(Color* protocolor) {
24274 # float red = [protocolor red];
24275 # float green = [protocolor green];
24276 # float blue = [protocolor blue];
24277 # FloatValue* alpha_wrapper = [protocolor alpha];
24278 # float alpha = 1.0;
24279 # if (alpha_wrapper != nil) {
24280 # alpha = [alpha_wrapper value];
24281 # }
24282 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24283 # }
24284 #
24285 # static Color* toProto(UIColor* color) {
24286 # CGFloat red, green, blue, alpha;
24287 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24288 # return nil;
24289 # }
24290 # Color* result = [Color alloc] init];
24291 # [result setRed:red];
24292 # [result setGreen:green];
24293 # [result setBlue:blue];
24294 # if (alpha <= 0.9999) {
24295 # [result setAlpha:floatWrapperWithValue(alpha)];
24296 # }
24297 # [result autorelease];
24298 # return result;
24299 # }
24300 # // ...
24301 #
24302 # Example (JavaScript):
24303 #
24304 # // ...
24305 #
24306 # var protoToCssColor = function(rgb_color) {
24307 # var redFrac = rgb_color.red || 0.0;
24308 # var greenFrac = rgb_color.green || 0.0;
24309 # var blueFrac = rgb_color.blue || 0.0;
24310 # var red = Math.floor(redFrac * 255);
24311 # var green = Math.floor(greenFrac * 255);
24312 # var blue = Math.floor(blueFrac * 255);
24313 #
24314 # if (!('alpha' in rgb_color)) {
24315 # return rgbToCssColor_(red, green, blue);
24316 # }
24317 #
24318 # var alphaFrac = rgb_color.alpha.value || 0.0;
24319 # var rgbParams = [red, green, blue].join(',');
24320 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24321 # };
24322 #
24323 # var rgbToCssColor_ = function(red, green, blue) {
24324 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24325 # var hexString = rgbNumber.toString(16);
24326 # var missingZeros = 6 - hexString.length;
24327 # var resultBuilder = ['#'];
24328 # for (var i = 0; i < missingZeros; i++) {
24329 # resultBuilder.push('0');
24330 # }
24331 # resultBuilder.push(hexString);
24332 # return resultBuilder.join('');
24333 # };
24334 #
24335 # // ...
24336 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24337 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24338 # the final pixel color is defined by the equation:
24339 #
24340 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24341 #
24342 # This means that a value of 1.0 corresponds to a solid color, whereas
24343 # a value of 0.0 corresponds to a completely transparent color. This
24344 # uses a wrapper message rather than a simple float scalar so that it is
24345 # possible to distinguish between a default value and the value being unset.
24346 # If omitted, this color object is to be rendered as a solid color
24347 # (as if the alpha value had been explicitly given with a value of 1.0).
24348 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24349 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24350 },
24351 "type": "A String", # How the value should be interpreted.
24352 "value": "A String", # The value this interpolation point uses. May be a formula.
24353 # Unused if type is MIN or
24354 # MAX.
24355 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024356 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024357 # These pin the gradient color scale according to the color,
24358 # type and value chosen.
24359 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24360 # for simplicity of conversion to/from color representations in various
24361 # languages over compactness; for example, the fields of this representation
24362 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24363 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24364 # method in iOS; and, with just a little work, it can be easily formatted into
24365 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24366 #
24367 # Example (Java):
24368 #
24369 # import com.google.type.Color;
24370 #
24371 # // ...
24372 # public static java.awt.Color fromProto(Color protocolor) {
24373 # float alpha = protocolor.hasAlpha()
24374 # ? protocolor.getAlpha().getValue()
24375 # : 1.0;
24376 #
24377 # return new java.awt.Color(
24378 # protocolor.getRed(),
24379 # protocolor.getGreen(),
24380 # protocolor.getBlue(),
24381 # alpha);
24382 # }
24383 #
24384 # public static Color toProto(java.awt.Color color) {
24385 # float red = (float) color.getRed();
24386 # float green = (float) color.getGreen();
24387 # float blue = (float) color.getBlue();
24388 # float denominator = 255.0;
24389 # Color.Builder resultBuilder =
24390 # Color
24391 # .newBuilder()
24392 # .setRed(red / denominator)
24393 # .setGreen(green / denominator)
24394 # .setBlue(blue / denominator);
24395 # int alpha = color.getAlpha();
24396 # if (alpha != 255) {
24397 # result.setAlpha(
24398 # FloatValue
24399 # .newBuilder()
24400 # .setValue(((float) alpha) / denominator)
24401 # .build());
24402 # }
24403 # return resultBuilder.build();
24404 # }
24405 # // ...
24406 #
24407 # Example (iOS / Obj-C):
24408 #
24409 # // ...
24410 # static UIColor* fromProto(Color* protocolor) {
24411 # float red = [protocolor red];
24412 # float green = [protocolor green];
24413 # float blue = [protocolor blue];
24414 # FloatValue* alpha_wrapper = [protocolor alpha];
24415 # float alpha = 1.0;
24416 # if (alpha_wrapper != nil) {
24417 # alpha = [alpha_wrapper value];
24418 # }
24419 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24420 # }
24421 #
24422 # static Color* toProto(UIColor* color) {
24423 # CGFloat red, green, blue, alpha;
24424 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24425 # return nil;
24426 # }
24427 # Color* result = [Color alloc] init];
24428 # [result setRed:red];
24429 # [result setGreen:green];
24430 # [result setBlue:blue];
24431 # if (alpha <= 0.9999) {
24432 # [result setAlpha:floatWrapperWithValue(alpha)];
24433 # }
24434 # [result autorelease];
24435 # return result;
24436 # }
24437 # // ...
24438 #
24439 # Example (JavaScript):
24440 #
24441 # // ...
24442 #
24443 # var protoToCssColor = function(rgb_color) {
24444 # var redFrac = rgb_color.red || 0.0;
24445 # var greenFrac = rgb_color.green || 0.0;
24446 # var blueFrac = rgb_color.blue || 0.0;
24447 # var red = Math.floor(redFrac * 255);
24448 # var green = Math.floor(greenFrac * 255);
24449 # var blue = Math.floor(blueFrac * 255);
24450 #
24451 # if (!('alpha' in rgb_color)) {
24452 # return rgbToCssColor_(red, green, blue);
24453 # }
24454 #
24455 # var alphaFrac = rgb_color.alpha.value || 0.0;
24456 # var rgbParams = [red, green, blue].join(',');
24457 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24458 # };
24459 #
24460 # var rgbToCssColor_ = function(red, green, blue) {
24461 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24462 # var hexString = rgbNumber.toString(16);
24463 # var missingZeros = 6 - hexString.length;
24464 # var resultBuilder = ['#'];
24465 # for (var i = 0; i < missingZeros; i++) {
24466 # resultBuilder.push('0');
24467 # }
24468 # resultBuilder.push(hexString);
24469 # return resultBuilder.join('');
24470 # };
24471 #
24472 # // ...
24473 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24474 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24475 # the final pixel color is defined by the equation:
24476 #
24477 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24478 #
24479 # This means that a value of 1.0 corresponds to a solid color, whereas
24480 # a value of 0.0 corresponds to a completely transparent color. This
24481 # uses a wrapper message rather than a simple float scalar so that it is
24482 # possible to distinguish between a default value and the value being unset.
24483 # If omitted, this color object is to be rendered as a solid color
24484 # (as if the alpha value had been explicitly given with a value of 1.0).
24485 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24486 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24487 },
24488 "type": "A String", # How the value should be interpreted.
24489 "value": "A String", # The value this interpolation point uses. May be a formula.
24490 # Unused if type is MIN or
24491 # MAX.
24492 },
24493 },
24494 },
24495 "newRule": { # A rule describing a conditional format. # The new rule that replaced the old rule (if replacing),
24496 # or the rule that was moved (if moved)
24497 "ranges": [ # The ranges that will be formatted if the condition is true.
24498 # All the ranges must be on the same grid.
24499 { # A range on a sheet.
24500 # All indexes are zero-based.
24501 # Indexes are half open, e.g the start index is inclusive
24502 # and the end index is exclusive -- [start_index, end_index).
24503 # Missing indexes indicate the range is unbounded on that side.
24504 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024505 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024506 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024507 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024508 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024509 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024510 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024511 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024512 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024513 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024514 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024515 # `Sheet1!A:B == sheet_id: 0,
24516 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024517 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024518 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024519 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024520 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024521 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024522 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024523 #
24524 # The start index must always be less than or equal to the end index.
24525 # If the start index equals the end index, then the range is empty.
24526 # Empty ranges are typically not meaningful and are usually rendered in the
24527 # UI as `#REF!`.
24528 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070024529 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024530 "sheetId": 42, # The sheet this range is on.
24531 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070024532 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024533 },
24534 ],
24535 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
24536 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
24537 # the format will be applied.
24538 # BooleanConditions are used by conditional formatting,
24539 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024540 "values": [ # The values of the condition. The number of supported values depends
24541 # on the condition type. Some support zero values,
24542 # others one or two values,
24543 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
24544 { # The value of the condition.
24545 "relativeDate": "A String", # A relative date (based on the current date).
24546 # Valid only if the type is
24547 # DATE_BEFORE,
24548 # DATE_AFTER,
24549 # DATE_ON_OR_BEFORE or
24550 # DATE_ON_OR_AFTER.
24551 #
24552 # Relative dates are not supported in data validation.
24553 # They are supported only in conditional formatting and
24554 # conditional filters.
24555 "userEnteredValue": "A String", # A value the condition is based on.
24556 # The value will be parsed as if the user typed into a cell.
24557 # Formulas are supported (and must begin with an `=`).
24558 },
24559 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024560 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024561 },
24562 "format": { # The format of a cell. # The format to apply.
24563 # Conditional formatting can only apply a subset of formatting:
24564 # bold, italic,
24565 # strikethrough,
24566 # foreground color &
24567 # background color.
24568 "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 -070024569 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
24570 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024571 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070024572 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024573 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024574 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024575 },
24576 "textDirection": "A String", # The direction of the text in the cell.
24577 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
24578 # When updating padding, every field must be specified.
24579 "top": 42, # The top padding of the cell.
24580 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024581 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024582 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024583 },
Thomas Coffee2f245372017-03-27 10:39:26 -070024584 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024585 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
24586 # for simplicity of conversion to/from color representations in various
24587 # languages over compactness; for example, the fields of this representation
24588 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24589 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24590 # method in iOS; and, with just a little work, it can be easily formatted into
24591 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24592 #
24593 # Example (Java):
24594 #
24595 # import com.google.type.Color;
24596 #
24597 # // ...
24598 # public static java.awt.Color fromProto(Color protocolor) {
24599 # float alpha = protocolor.hasAlpha()
24600 # ? protocolor.getAlpha().getValue()
24601 # : 1.0;
24602 #
24603 # return new java.awt.Color(
24604 # protocolor.getRed(),
24605 # protocolor.getGreen(),
24606 # protocolor.getBlue(),
24607 # alpha);
24608 # }
24609 #
24610 # public static Color toProto(java.awt.Color color) {
24611 # float red = (float) color.getRed();
24612 # float green = (float) color.getGreen();
24613 # float blue = (float) color.getBlue();
24614 # float denominator = 255.0;
24615 # Color.Builder resultBuilder =
24616 # Color
24617 # .newBuilder()
24618 # .setRed(red / denominator)
24619 # .setGreen(green / denominator)
24620 # .setBlue(blue / denominator);
24621 # int alpha = color.getAlpha();
24622 # if (alpha != 255) {
24623 # result.setAlpha(
24624 # FloatValue
24625 # .newBuilder()
24626 # .setValue(((float) alpha) / denominator)
24627 # .build());
24628 # }
24629 # return resultBuilder.build();
24630 # }
24631 # // ...
24632 #
24633 # Example (iOS / Obj-C):
24634 #
24635 # // ...
24636 # static UIColor* fromProto(Color* protocolor) {
24637 # float red = [protocolor red];
24638 # float green = [protocolor green];
24639 # float blue = [protocolor blue];
24640 # FloatValue* alpha_wrapper = [protocolor alpha];
24641 # float alpha = 1.0;
24642 # if (alpha_wrapper != nil) {
24643 # alpha = [alpha_wrapper value];
24644 # }
24645 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24646 # }
24647 #
24648 # static Color* toProto(UIColor* color) {
24649 # CGFloat red, green, blue, alpha;
24650 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24651 # return nil;
24652 # }
24653 # Color* result = [Color alloc] init];
24654 # [result setRed:red];
24655 # [result setGreen:green];
24656 # [result setBlue:blue];
24657 # if (alpha <= 0.9999) {
24658 # [result setAlpha:floatWrapperWithValue(alpha)];
24659 # }
24660 # [result autorelease];
24661 # return result;
24662 # }
24663 # // ...
24664 #
24665 # Example (JavaScript):
24666 #
24667 # // ...
24668 #
24669 # var protoToCssColor = function(rgb_color) {
24670 # var redFrac = rgb_color.red || 0.0;
24671 # var greenFrac = rgb_color.green || 0.0;
24672 # var blueFrac = rgb_color.blue || 0.0;
24673 # var red = Math.floor(redFrac * 255);
24674 # var green = Math.floor(greenFrac * 255);
24675 # var blue = Math.floor(blueFrac * 255);
24676 #
24677 # if (!('alpha' in rgb_color)) {
24678 # return rgbToCssColor_(red, green, blue);
24679 # }
24680 #
24681 # var alphaFrac = rgb_color.alpha.value || 0.0;
24682 # var rgbParams = [red, green, blue].join(',');
24683 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24684 # };
24685 #
24686 # var rgbToCssColor_ = function(red, green, blue) {
24687 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24688 # var hexString = rgbNumber.toString(16);
24689 # var missingZeros = 6 - hexString.length;
24690 # var resultBuilder = ['#'];
24691 # for (var i = 0; i < missingZeros; i++) {
24692 # resultBuilder.push('0');
24693 # }
24694 # resultBuilder.push(hexString);
24695 # return resultBuilder.join('');
24696 # };
24697 #
24698 # // ...
24699 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24700 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24701 # the final pixel color is defined by the equation:
24702 #
24703 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24704 #
24705 # This means that a value of 1.0 corresponds to a solid color, whereas
24706 # a value of 0.0 corresponds to a completely transparent color. This
24707 # uses a wrapper message rather than a simple float scalar so that it is
24708 # possible to distinguish between a default value and the value being unset.
24709 # If omitted, this color object is to be rendered as a solid color
24710 # (as if the alpha value had been explicitly given with a value of 1.0).
24711 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24712 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24713 },
Thomas Coffee2f245372017-03-27 10:39:26 -070024714 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024715 "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).
24716 # Absent values indicate that the field isn't specified.
24717 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
24718 # for simplicity of conversion to/from color representations in various
24719 # languages over compactness; for example, the fields of this representation
24720 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24721 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24722 # method in iOS; and, with just a little work, it can be easily formatted into
24723 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24724 #
24725 # Example (Java):
24726 #
24727 # import com.google.type.Color;
24728 #
24729 # // ...
24730 # public static java.awt.Color fromProto(Color protocolor) {
24731 # float alpha = protocolor.hasAlpha()
24732 # ? protocolor.getAlpha().getValue()
24733 # : 1.0;
24734 #
24735 # return new java.awt.Color(
24736 # protocolor.getRed(),
24737 # protocolor.getGreen(),
24738 # protocolor.getBlue(),
24739 # alpha);
24740 # }
24741 #
24742 # public static Color toProto(java.awt.Color color) {
24743 # float red = (float) color.getRed();
24744 # float green = (float) color.getGreen();
24745 # float blue = (float) color.getBlue();
24746 # float denominator = 255.0;
24747 # Color.Builder resultBuilder =
24748 # Color
24749 # .newBuilder()
24750 # .setRed(red / denominator)
24751 # .setGreen(green / denominator)
24752 # .setBlue(blue / denominator);
24753 # int alpha = color.getAlpha();
24754 # if (alpha != 255) {
24755 # result.setAlpha(
24756 # FloatValue
24757 # .newBuilder()
24758 # .setValue(((float) alpha) / denominator)
24759 # .build());
24760 # }
24761 # return resultBuilder.build();
24762 # }
24763 # // ...
24764 #
24765 # Example (iOS / Obj-C):
24766 #
24767 # // ...
24768 # static UIColor* fromProto(Color* protocolor) {
24769 # float red = [protocolor red];
24770 # float green = [protocolor green];
24771 # float blue = [protocolor blue];
24772 # FloatValue* alpha_wrapper = [protocolor alpha];
24773 # float alpha = 1.0;
24774 # if (alpha_wrapper != nil) {
24775 # alpha = [alpha_wrapper value];
24776 # }
24777 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24778 # }
24779 #
24780 # static Color* toProto(UIColor* color) {
24781 # CGFloat red, green, blue, alpha;
24782 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24783 # return nil;
24784 # }
24785 # Color* result = [Color alloc] init];
24786 # [result setRed:red];
24787 # [result setGreen:green];
24788 # [result setBlue:blue];
24789 # if (alpha <= 0.9999) {
24790 # [result setAlpha:floatWrapperWithValue(alpha)];
24791 # }
24792 # [result autorelease];
24793 # return result;
24794 # }
24795 # // ...
24796 #
24797 # Example (JavaScript):
24798 #
24799 # // ...
24800 #
24801 # var protoToCssColor = function(rgb_color) {
24802 # var redFrac = rgb_color.red || 0.0;
24803 # var greenFrac = rgb_color.green || 0.0;
24804 # var blueFrac = rgb_color.blue || 0.0;
24805 # var red = Math.floor(redFrac * 255);
24806 # var green = Math.floor(greenFrac * 255);
24807 # var blue = Math.floor(blueFrac * 255);
24808 #
24809 # if (!('alpha' in rgb_color)) {
24810 # return rgbToCssColor_(red, green, blue);
24811 # }
24812 #
24813 # var alphaFrac = rgb_color.alpha.value || 0.0;
24814 # var rgbParams = [red, green, blue].join(',');
24815 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24816 # };
24817 #
24818 # var rgbToCssColor_ = function(red, green, blue) {
24819 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24820 # var hexString = rgbNumber.toString(16);
24821 # var missingZeros = 6 - hexString.length;
24822 # var resultBuilder = ['#'];
24823 # for (var i = 0; i < missingZeros; i++) {
24824 # resultBuilder.push('0');
24825 # }
24826 # resultBuilder.push(hexString);
24827 # return resultBuilder.join('');
24828 # };
24829 #
24830 # // ...
24831 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24832 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24833 # the final pixel color is defined by the equation:
24834 #
24835 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24836 #
24837 # This means that a value of 1.0 corresponds to a solid color, whereas
24838 # a value of 0.0 corresponds to a completely transparent color. This
24839 # uses a wrapper message rather than a simple float scalar so that it is
24840 # possible to distinguish between a default value and the value being unset.
24841 # If omitted, this color object is to be rendered as a solid color
24842 # (as if the alpha value had been explicitly given with a value of 1.0).
24843 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24844 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24845 },
24846 "bold": True or False, # True if the text is bold.
24847 "strikethrough": True or False, # True if the text has a strikethrough.
24848 "fontFamily": "A String", # The font family.
24849 "fontSize": 42, # The size of the font.
24850 "italic": True or False, # True if the text is italicized.
24851 "underline": True or False, # True if the text is underlined.
24852 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070024853 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
24854 "angle": 42, # The angle between the standard orientation and the desired orientation.
24855 # Measured in degrees. Valid values are between -90 and 90. Positive
24856 # angles are angled upwards, negative are angled downwards.
24857 #
24858 # Note: For LTR text direction positive angles are in the counterclockwise
24859 # direction, whereas for RTL they are in the clockwise direction
24860 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
24861 # characters is unchanged.
24862 # For example:
24863 #
24864 # | V |
24865 # | e |
24866 # | r |
24867 # | t |
24868 # | i |
24869 # | c |
24870 # | a |
24871 # | l |
24872 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024873 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24874 "borders": { # The borders of the cell. # The borders of the cell.
24875 "top": { # A border along a cell. # The top border of the cell.
24876 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24877 # for simplicity of conversion to/from color representations in various
24878 # languages over compactness; for example, the fields of this representation
24879 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24880 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24881 # method in iOS; and, with just a little work, it can be easily formatted into
24882 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24883 #
24884 # Example (Java):
24885 #
24886 # import com.google.type.Color;
24887 #
24888 # // ...
24889 # public static java.awt.Color fromProto(Color protocolor) {
24890 # float alpha = protocolor.hasAlpha()
24891 # ? protocolor.getAlpha().getValue()
24892 # : 1.0;
24893 #
24894 # return new java.awt.Color(
24895 # protocolor.getRed(),
24896 # protocolor.getGreen(),
24897 # protocolor.getBlue(),
24898 # alpha);
24899 # }
24900 #
24901 # public static Color toProto(java.awt.Color color) {
24902 # float red = (float) color.getRed();
24903 # float green = (float) color.getGreen();
24904 # float blue = (float) color.getBlue();
24905 # float denominator = 255.0;
24906 # Color.Builder resultBuilder =
24907 # Color
24908 # .newBuilder()
24909 # .setRed(red / denominator)
24910 # .setGreen(green / denominator)
24911 # .setBlue(blue / denominator);
24912 # int alpha = color.getAlpha();
24913 # if (alpha != 255) {
24914 # result.setAlpha(
24915 # FloatValue
24916 # .newBuilder()
24917 # .setValue(((float) alpha) / denominator)
24918 # .build());
24919 # }
24920 # return resultBuilder.build();
24921 # }
24922 # // ...
24923 #
24924 # Example (iOS / Obj-C):
24925 #
24926 # // ...
24927 # static UIColor* fromProto(Color* protocolor) {
24928 # float red = [protocolor red];
24929 # float green = [protocolor green];
24930 # float blue = [protocolor blue];
24931 # FloatValue* alpha_wrapper = [protocolor alpha];
24932 # float alpha = 1.0;
24933 # if (alpha_wrapper != nil) {
24934 # alpha = [alpha_wrapper value];
24935 # }
24936 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24937 # }
24938 #
24939 # static Color* toProto(UIColor* color) {
24940 # CGFloat red, green, blue, alpha;
24941 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24942 # return nil;
24943 # }
24944 # Color* result = [Color alloc] init];
24945 # [result setRed:red];
24946 # [result setGreen:green];
24947 # [result setBlue:blue];
24948 # if (alpha <= 0.9999) {
24949 # [result setAlpha:floatWrapperWithValue(alpha)];
24950 # }
24951 # [result autorelease];
24952 # return result;
24953 # }
24954 # // ...
24955 #
24956 # Example (JavaScript):
24957 #
24958 # // ...
24959 #
24960 # var protoToCssColor = function(rgb_color) {
24961 # var redFrac = rgb_color.red || 0.0;
24962 # var greenFrac = rgb_color.green || 0.0;
24963 # var blueFrac = rgb_color.blue || 0.0;
24964 # var red = Math.floor(redFrac * 255);
24965 # var green = Math.floor(greenFrac * 255);
24966 # var blue = Math.floor(blueFrac * 255);
24967 #
24968 # if (!('alpha' in rgb_color)) {
24969 # return rgbToCssColor_(red, green, blue);
24970 # }
24971 #
24972 # var alphaFrac = rgb_color.alpha.value || 0.0;
24973 # var rgbParams = [red, green, blue].join(',');
24974 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24975 # };
24976 #
24977 # var rgbToCssColor_ = function(red, green, blue) {
24978 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24979 # var hexString = rgbNumber.toString(16);
24980 # var missingZeros = 6 - hexString.length;
24981 # var resultBuilder = ['#'];
24982 # for (var i = 0; i < missingZeros; i++) {
24983 # resultBuilder.push('0');
24984 # }
24985 # resultBuilder.push(hexString);
24986 # return resultBuilder.join('');
24987 # };
24988 #
24989 # // ...
24990 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24991 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24992 # the final pixel color is defined by the equation:
24993 #
24994 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24995 #
24996 # This means that a value of 1.0 corresponds to a solid color, whereas
24997 # a value of 0.0 corresponds to a completely transparent color. This
24998 # uses a wrapper message rather than a simple float scalar so that it is
24999 # possible to distinguish between a default value and the value being unset.
25000 # If omitted, this color object is to be rendered as a solid color
25001 # (as if the alpha value had been explicitly given with a value of 1.0).
25002 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25003 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25004 },
25005 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025006 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025007 "style": "A String", # The style of the border.
25008 },
25009 "right": { # A border along a cell. # The right border of the cell.
25010 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25011 # for simplicity of conversion to/from color representations in various
25012 # languages over compactness; for example, the fields of this representation
25013 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25014 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25015 # method in iOS; and, with just a little work, it can be easily formatted into
25016 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25017 #
25018 # Example (Java):
25019 #
25020 # import com.google.type.Color;
25021 #
25022 # // ...
25023 # public static java.awt.Color fromProto(Color protocolor) {
25024 # float alpha = protocolor.hasAlpha()
25025 # ? protocolor.getAlpha().getValue()
25026 # : 1.0;
25027 #
25028 # return new java.awt.Color(
25029 # protocolor.getRed(),
25030 # protocolor.getGreen(),
25031 # protocolor.getBlue(),
25032 # alpha);
25033 # }
25034 #
25035 # public static Color toProto(java.awt.Color color) {
25036 # float red = (float) color.getRed();
25037 # float green = (float) color.getGreen();
25038 # float blue = (float) color.getBlue();
25039 # float denominator = 255.0;
25040 # Color.Builder resultBuilder =
25041 # Color
25042 # .newBuilder()
25043 # .setRed(red / denominator)
25044 # .setGreen(green / denominator)
25045 # .setBlue(blue / denominator);
25046 # int alpha = color.getAlpha();
25047 # if (alpha != 255) {
25048 # result.setAlpha(
25049 # FloatValue
25050 # .newBuilder()
25051 # .setValue(((float) alpha) / denominator)
25052 # .build());
25053 # }
25054 # return resultBuilder.build();
25055 # }
25056 # // ...
25057 #
25058 # Example (iOS / Obj-C):
25059 #
25060 # // ...
25061 # static UIColor* fromProto(Color* protocolor) {
25062 # float red = [protocolor red];
25063 # float green = [protocolor green];
25064 # float blue = [protocolor blue];
25065 # FloatValue* alpha_wrapper = [protocolor alpha];
25066 # float alpha = 1.0;
25067 # if (alpha_wrapper != nil) {
25068 # alpha = [alpha_wrapper value];
25069 # }
25070 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25071 # }
25072 #
25073 # static Color* toProto(UIColor* color) {
25074 # CGFloat red, green, blue, alpha;
25075 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25076 # return nil;
25077 # }
25078 # Color* result = [Color alloc] init];
25079 # [result setRed:red];
25080 # [result setGreen:green];
25081 # [result setBlue:blue];
25082 # if (alpha <= 0.9999) {
25083 # [result setAlpha:floatWrapperWithValue(alpha)];
25084 # }
25085 # [result autorelease];
25086 # return result;
25087 # }
25088 # // ...
25089 #
25090 # Example (JavaScript):
25091 #
25092 # // ...
25093 #
25094 # var protoToCssColor = function(rgb_color) {
25095 # var redFrac = rgb_color.red || 0.0;
25096 # var greenFrac = rgb_color.green || 0.0;
25097 # var blueFrac = rgb_color.blue || 0.0;
25098 # var red = Math.floor(redFrac * 255);
25099 # var green = Math.floor(greenFrac * 255);
25100 # var blue = Math.floor(blueFrac * 255);
25101 #
25102 # if (!('alpha' in rgb_color)) {
25103 # return rgbToCssColor_(red, green, blue);
25104 # }
25105 #
25106 # var alphaFrac = rgb_color.alpha.value || 0.0;
25107 # var rgbParams = [red, green, blue].join(',');
25108 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25109 # };
25110 #
25111 # var rgbToCssColor_ = function(red, green, blue) {
25112 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25113 # var hexString = rgbNumber.toString(16);
25114 # var missingZeros = 6 - hexString.length;
25115 # var resultBuilder = ['#'];
25116 # for (var i = 0; i < missingZeros; i++) {
25117 # resultBuilder.push('0');
25118 # }
25119 # resultBuilder.push(hexString);
25120 # return resultBuilder.join('');
25121 # };
25122 #
25123 # // ...
25124 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25125 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25126 # the final pixel color is defined by the equation:
25127 #
25128 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25129 #
25130 # This means that a value of 1.0 corresponds to a solid color, whereas
25131 # a value of 0.0 corresponds to a completely transparent color. This
25132 # uses a wrapper message rather than a simple float scalar so that it is
25133 # possible to distinguish between a default value and the value being unset.
25134 # If omitted, this color object is to be rendered as a solid color
25135 # (as if the alpha value had been explicitly given with a value of 1.0).
25136 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25137 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25138 },
25139 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025140 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025141 "style": "A String", # The style of the border.
25142 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025143 "left": { # A border along a cell. # The left border of the cell.
25144 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25145 # for simplicity of conversion to/from color representations in various
25146 # languages over compactness; for example, the fields of this representation
25147 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25148 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25149 # method in iOS; and, with just a little work, it can be easily formatted into
25150 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25151 #
25152 # Example (Java):
25153 #
25154 # import com.google.type.Color;
25155 #
25156 # // ...
25157 # public static java.awt.Color fromProto(Color protocolor) {
25158 # float alpha = protocolor.hasAlpha()
25159 # ? protocolor.getAlpha().getValue()
25160 # : 1.0;
25161 #
25162 # return new java.awt.Color(
25163 # protocolor.getRed(),
25164 # protocolor.getGreen(),
25165 # protocolor.getBlue(),
25166 # alpha);
25167 # }
25168 #
25169 # public static Color toProto(java.awt.Color color) {
25170 # float red = (float) color.getRed();
25171 # float green = (float) color.getGreen();
25172 # float blue = (float) color.getBlue();
25173 # float denominator = 255.0;
25174 # Color.Builder resultBuilder =
25175 # Color
25176 # .newBuilder()
25177 # .setRed(red / denominator)
25178 # .setGreen(green / denominator)
25179 # .setBlue(blue / denominator);
25180 # int alpha = color.getAlpha();
25181 # if (alpha != 255) {
25182 # result.setAlpha(
25183 # FloatValue
25184 # .newBuilder()
25185 # .setValue(((float) alpha) / denominator)
25186 # .build());
25187 # }
25188 # return resultBuilder.build();
25189 # }
25190 # // ...
25191 #
25192 # Example (iOS / Obj-C):
25193 #
25194 # // ...
25195 # static UIColor* fromProto(Color* protocolor) {
25196 # float red = [protocolor red];
25197 # float green = [protocolor green];
25198 # float blue = [protocolor blue];
25199 # FloatValue* alpha_wrapper = [protocolor alpha];
25200 # float alpha = 1.0;
25201 # if (alpha_wrapper != nil) {
25202 # alpha = [alpha_wrapper value];
25203 # }
25204 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25205 # }
25206 #
25207 # static Color* toProto(UIColor* color) {
25208 # CGFloat red, green, blue, alpha;
25209 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25210 # return nil;
25211 # }
25212 # Color* result = [Color alloc] init];
25213 # [result setRed:red];
25214 # [result setGreen:green];
25215 # [result setBlue:blue];
25216 # if (alpha <= 0.9999) {
25217 # [result setAlpha:floatWrapperWithValue(alpha)];
25218 # }
25219 # [result autorelease];
25220 # return result;
25221 # }
25222 # // ...
25223 #
25224 # Example (JavaScript):
25225 #
25226 # // ...
25227 #
25228 # var protoToCssColor = function(rgb_color) {
25229 # var redFrac = rgb_color.red || 0.0;
25230 # var greenFrac = rgb_color.green || 0.0;
25231 # var blueFrac = rgb_color.blue || 0.0;
25232 # var red = Math.floor(redFrac * 255);
25233 # var green = Math.floor(greenFrac * 255);
25234 # var blue = Math.floor(blueFrac * 255);
25235 #
25236 # if (!('alpha' in rgb_color)) {
25237 # return rgbToCssColor_(red, green, blue);
25238 # }
25239 #
25240 # var alphaFrac = rgb_color.alpha.value || 0.0;
25241 # var rgbParams = [red, green, blue].join(',');
25242 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25243 # };
25244 #
25245 # var rgbToCssColor_ = function(red, green, blue) {
25246 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25247 # var hexString = rgbNumber.toString(16);
25248 # var missingZeros = 6 - hexString.length;
25249 # var resultBuilder = ['#'];
25250 # for (var i = 0; i < missingZeros; i++) {
25251 # resultBuilder.push('0');
25252 # }
25253 # resultBuilder.push(hexString);
25254 # return resultBuilder.join('');
25255 # };
25256 #
25257 # // ...
25258 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25259 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25260 # the final pixel color is defined by the equation:
25261 #
25262 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25263 #
25264 # This means that a value of 1.0 corresponds to a solid color, whereas
25265 # a value of 0.0 corresponds to a completely transparent color. This
25266 # uses a wrapper message rather than a simple float scalar so that it is
25267 # possible to distinguish between a default value and the value being unset.
25268 # If omitted, this color object is to be rendered as a solid color
25269 # (as if the alpha value had been explicitly given with a value of 1.0).
25270 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25271 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25272 },
25273 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025274 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025275 "style": "A String", # The style of the border.
25276 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070025277 "bottom": { # A border along a cell. # The bottom border of the cell.
25278 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25279 # for simplicity of conversion to/from color representations in various
25280 # languages over compactness; for example, the fields of this representation
25281 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25282 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25283 # method in iOS; and, with just a little work, it can be easily formatted into
25284 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25285 #
25286 # Example (Java):
25287 #
25288 # import com.google.type.Color;
25289 #
25290 # // ...
25291 # public static java.awt.Color fromProto(Color protocolor) {
25292 # float alpha = protocolor.hasAlpha()
25293 # ? protocolor.getAlpha().getValue()
25294 # : 1.0;
25295 #
25296 # return new java.awt.Color(
25297 # protocolor.getRed(),
25298 # protocolor.getGreen(),
25299 # protocolor.getBlue(),
25300 # alpha);
25301 # }
25302 #
25303 # public static Color toProto(java.awt.Color color) {
25304 # float red = (float) color.getRed();
25305 # float green = (float) color.getGreen();
25306 # float blue = (float) color.getBlue();
25307 # float denominator = 255.0;
25308 # Color.Builder resultBuilder =
25309 # Color
25310 # .newBuilder()
25311 # .setRed(red / denominator)
25312 # .setGreen(green / denominator)
25313 # .setBlue(blue / denominator);
25314 # int alpha = color.getAlpha();
25315 # if (alpha != 255) {
25316 # result.setAlpha(
25317 # FloatValue
25318 # .newBuilder()
25319 # .setValue(((float) alpha) / denominator)
25320 # .build());
25321 # }
25322 # return resultBuilder.build();
25323 # }
25324 # // ...
25325 #
25326 # Example (iOS / Obj-C):
25327 #
25328 # // ...
25329 # static UIColor* fromProto(Color* protocolor) {
25330 # float red = [protocolor red];
25331 # float green = [protocolor green];
25332 # float blue = [protocolor blue];
25333 # FloatValue* alpha_wrapper = [protocolor alpha];
25334 # float alpha = 1.0;
25335 # if (alpha_wrapper != nil) {
25336 # alpha = [alpha_wrapper value];
25337 # }
25338 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25339 # }
25340 #
25341 # static Color* toProto(UIColor* color) {
25342 # CGFloat red, green, blue, alpha;
25343 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25344 # return nil;
25345 # }
25346 # Color* result = [Color alloc] init];
25347 # [result setRed:red];
25348 # [result setGreen:green];
25349 # [result setBlue:blue];
25350 # if (alpha <= 0.9999) {
25351 # [result setAlpha:floatWrapperWithValue(alpha)];
25352 # }
25353 # [result autorelease];
25354 # return result;
25355 # }
25356 # // ...
25357 #
25358 # Example (JavaScript):
25359 #
25360 # // ...
25361 #
25362 # var protoToCssColor = function(rgb_color) {
25363 # var redFrac = rgb_color.red || 0.0;
25364 # var greenFrac = rgb_color.green || 0.0;
25365 # var blueFrac = rgb_color.blue || 0.0;
25366 # var red = Math.floor(redFrac * 255);
25367 # var green = Math.floor(greenFrac * 255);
25368 # var blue = Math.floor(blueFrac * 255);
25369 #
25370 # if (!('alpha' in rgb_color)) {
25371 # return rgbToCssColor_(red, green, blue);
25372 # }
25373 #
25374 # var alphaFrac = rgb_color.alpha.value || 0.0;
25375 # var rgbParams = [red, green, blue].join(',');
25376 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25377 # };
25378 #
25379 # var rgbToCssColor_ = function(red, green, blue) {
25380 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25381 # var hexString = rgbNumber.toString(16);
25382 # var missingZeros = 6 - hexString.length;
25383 # var resultBuilder = ['#'];
25384 # for (var i = 0; i < missingZeros; i++) {
25385 # resultBuilder.push('0');
25386 # }
25387 # resultBuilder.push(hexString);
25388 # return resultBuilder.join('');
25389 # };
25390 #
25391 # // ...
25392 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25393 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25394 # the final pixel color is defined by the equation:
25395 #
25396 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25397 #
25398 # This means that a value of 1.0 corresponds to a solid color, whereas
25399 # a value of 0.0 corresponds to a completely transparent color. This
25400 # uses a wrapper message rather than a simple float scalar so that it is
25401 # possible to distinguish between a default value and the value being unset.
25402 # If omitted, this color object is to be rendered as a solid color
25403 # (as if the alpha value had been explicitly given with a value of 1.0).
25404 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25405 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25406 },
25407 "width": 42, # The width of the border, in pixels.
25408 # Deprecated; the width is determined by the "style" field.
25409 "style": "A String", # The style of the border.
25410 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025411 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070025412 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025413 },
25414 },
25415 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
25416 # the interpolation points listed. The format of a cell will vary
25417 # based on its contents as compared to the values of the interpolation
25418 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025419 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025420 # These pin the gradient color scale according to the color,
25421 # type and value chosen.
25422 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25423 # for simplicity of conversion to/from color representations in various
25424 # languages over compactness; for example, the fields of this representation
25425 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25426 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25427 # method in iOS; and, with just a little work, it can be easily formatted into
25428 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25429 #
25430 # Example (Java):
25431 #
25432 # import com.google.type.Color;
25433 #
25434 # // ...
25435 # public static java.awt.Color fromProto(Color protocolor) {
25436 # float alpha = protocolor.hasAlpha()
25437 # ? protocolor.getAlpha().getValue()
25438 # : 1.0;
25439 #
25440 # return new java.awt.Color(
25441 # protocolor.getRed(),
25442 # protocolor.getGreen(),
25443 # protocolor.getBlue(),
25444 # alpha);
25445 # }
25446 #
25447 # public static Color toProto(java.awt.Color color) {
25448 # float red = (float) color.getRed();
25449 # float green = (float) color.getGreen();
25450 # float blue = (float) color.getBlue();
25451 # float denominator = 255.0;
25452 # Color.Builder resultBuilder =
25453 # Color
25454 # .newBuilder()
25455 # .setRed(red / denominator)
25456 # .setGreen(green / denominator)
25457 # .setBlue(blue / denominator);
25458 # int alpha = color.getAlpha();
25459 # if (alpha != 255) {
25460 # result.setAlpha(
25461 # FloatValue
25462 # .newBuilder()
25463 # .setValue(((float) alpha) / denominator)
25464 # .build());
25465 # }
25466 # return resultBuilder.build();
25467 # }
25468 # // ...
25469 #
25470 # Example (iOS / Obj-C):
25471 #
25472 # // ...
25473 # static UIColor* fromProto(Color* protocolor) {
25474 # float red = [protocolor red];
25475 # float green = [protocolor green];
25476 # float blue = [protocolor blue];
25477 # FloatValue* alpha_wrapper = [protocolor alpha];
25478 # float alpha = 1.0;
25479 # if (alpha_wrapper != nil) {
25480 # alpha = [alpha_wrapper value];
25481 # }
25482 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25483 # }
25484 #
25485 # static Color* toProto(UIColor* color) {
25486 # CGFloat red, green, blue, alpha;
25487 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25488 # return nil;
25489 # }
25490 # Color* result = [Color alloc] init];
25491 # [result setRed:red];
25492 # [result setGreen:green];
25493 # [result setBlue:blue];
25494 # if (alpha <= 0.9999) {
25495 # [result setAlpha:floatWrapperWithValue(alpha)];
25496 # }
25497 # [result autorelease];
25498 # return result;
25499 # }
25500 # // ...
25501 #
25502 # Example (JavaScript):
25503 #
25504 # // ...
25505 #
25506 # var protoToCssColor = function(rgb_color) {
25507 # var redFrac = rgb_color.red || 0.0;
25508 # var greenFrac = rgb_color.green || 0.0;
25509 # var blueFrac = rgb_color.blue || 0.0;
25510 # var red = Math.floor(redFrac * 255);
25511 # var green = Math.floor(greenFrac * 255);
25512 # var blue = Math.floor(blueFrac * 255);
25513 #
25514 # if (!('alpha' in rgb_color)) {
25515 # return rgbToCssColor_(red, green, blue);
25516 # }
25517 #
25518 # var alphaFrac = rgb_color.alpha.value || 0.0;
25519 # var rgbParams = [red, green, blue].join(',');
25520 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25521 # };
25522 #
25523 # var rgbToCssColor_ = function(red, green, blue) {
25524 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25525 # var hexString = rgbNumber.toString(16);
25526 # var missingZeros = 6 - hexString.length;
25527 # var resultBuilder = ['#'];
25528 # for (var i = 0; i < missingZeros; i++) {
25529 # resultBuilder.push('0');
25530 # }
25531 # resultBuilder.push(hexString);
25532 # return resultBuilder.join('');
25533 # };
25534 #
25535 # // ...
25536 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25537 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25538 # the final pixel color is defined by the equation:
25539 #
25540 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25541 #
25542 # This means that a value of 1.0 corresponds to a solid color, whereas
25543 # a value of 0.0 corresponds to a completely transparent color. This
25544 # uses a wrapper message rather than a simple float scalar so that it is
25545 # possible to distinguish between a default value and the value being unset.
25546 # If omitted, this color object is to be rendered as a solid color
25547 # (as if the alpha value had been explicitly given with a value of 1.0).
25548 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25549 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25550 },
25551 "type": "A String", # How the value should be interpreted.
25552 "value": "A String", # The value this interpolation point uses. May be a formula.
25553 # Unused if type is MIN or
25554 # MAX.
25555 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025556 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025557 # These pin the gradient color scale according to the color,
25558 # type and value chosen.
25559 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25560 # for simplicity of conversion to/from color representations in various
25561 # languages over compactness; for example, the fields of this representation
25562 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25563 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25564 # method in iOS; and, with just a little work, it can be easily formatted into
25565 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25566 #
25567 # Example (Java):
25568 #
25569 # import com.google.type.Color;
25570 #
25571 # // ...
25572 # public static java.awt.Color fromProto(Color protocolor) {
25573 # float alpha = protocolor.hasAlpha()
25574 # ? protocolor.getAlpha().getValue()
25575 # : 1.0;
25576 #
25577 # return new java.awt.Color(
25578 # protocolor.getRed(),
25579 # protocolor.getGreen(),
25580 # protocolor.getBlue(),
25581 # alpha);
25582 # }
25583 #
25584 # public static Color toProto(java.awt.Color color) {
25585 # float red = (float) color.getRed();
25586 # float green = (float) color.getGreen();
25587 # float blue = (float) color.getBlue();
25588 # float denominator = 255.0;
25589 # Color.Builder resultBuilder =
25590 # Color
25591 # .newBuilder()
25592 # .setRed(red / denominator)
25593 # .setGreen(green / denominator)
25594 # .setBlue(blue / denominator);
25595 # int alpha = color.getAlpha();
25596 # if (alpha != 255) {
25597 # result.setAlpha(
25598 # FloatValue
25599 # .newBuilder()
25600 # .setValue(((float) alpha) / denominator)
25601 # .build());
25602 # }
25603 # return resultBuilder.build();
25604 # }
25605 # // ...
25606 #
25607 # Example (iOS / Obj-C):
25608 #
25609 # // ...
25610 # static UIColor* fromProto(Color* protocolor) {
25611 # float red = [protocolor red];
25612 # float green = [protocolor green];
25613 # float blue = [protocolor blue];
25614 # FloatValue* alpha_wrapper = [protocolor alpha];
25615 # float alpha = 1.0;
25616 # if (alpha_wrapper != nil) {
25617 # alpha = [alpha_wrapper value];
25618 # }
25619 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25620 # }
25621 #
25622 # static Color* toProto(UIColor* color) {
25623 # CGFloat red, green, blue, alpha;
25624 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25625 # return nil;
25626 # }
25627 # Color* result = [Color alloc] init];
25628 # [result setRed:red];
25629 # [result setGreen:green];
25630 # [result setBlue:blue];
25631 # if (alpha <= 0.9999) {
25632 # [result setAlpha:floatWrapperWithValue(alpha)];
25633 # }
25634 # [result autorelease];
25635 # return result;
25636 # }
25637 # // ...
25638 #
25639 # Example (JavaScript):
25640 #
25641 # // ...
25642 #
25643 # var protoToCssColor = function(rgb_color) {
25644 # var redFrac = rgb_color.red || 0.0;
25645 # var greenFrac = rgb_color.green || 0.0;
25646 # var blueFrac = rgb_color.blue || 0.0;
25647 # var red = Math.floor(redFrac * 255);
25648 # var green = Math.floor(greenFrac * 255);
25649 # var blue = Math.floor(blueFrac * 255);
25650 #
25651 # if (!('alpha' in rgb_color)) {
25652 # return rgbToCssColor_(red, green, blue);
25653 # }
25654 #
25655 # var alphaFrac = rgb_color.alpha.value || 0.0;
25656 # var rgbParams = [red, green, blue].join(',');
25657 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25658 # };
25659 #
25660 # var rgbToCssColor_ = function(red, green, blue) {
25661 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25662 # var hexString = rgbNumber.toString(16);
25663 # var missingZeros = 6 - hexString.length;
25664 # var resultBuilder = ['#'];
25665 # for (var i = 0; i < missingZeros; i++) {
25666 # resultBuilder.push('0');
25667 # }
25668 # resultBuilder.push(hexString);
25669 # return resultBuilder.join('');
25670 # };
25671 #
25672 # // ...
25673 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25674 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25675 # the final pixel color is defined by the equation:
25676 #
25677 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25678 #
25679 # This means that a value of 1.0 corresponds to a solid color, whereas
25680 # a value of 0.0 corresponds to a completely transparent color. This
25681 # uses a wrapper message rather than a simple float scalar so that it is
25682 # possible to distinguish between a default value and the value being unset.
25683 # If omitted, this color object is to be rendered as a solid color
25684 # (as if the alpha value had been explicitly given with a value of 1.0).
25685 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25686 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25687 },
25688 "type": "A String", # How the value should be interpreted.
25689 "value": "A String", # The value this interpolation point uses. May be a formula.
25690 # Unused if type is MIN or
25691 # MAX.
25692 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025693 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025694 # These pin the gradient color scale according to the color,
25695 # type and value chosen.
25696 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
25697 # for simplicity of conversion to/from color representations in various
25698 # languages over compactness; for example, the fields of this representation
25699 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25700 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25701 # method in iOS; and, with just a little work, it can be easily formatted into
25702 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25703 #
25704 # Example (Java):
25705 #
25706 # import com.google.type.Color;
25707 #
25708 # // ...
25709 # public static java.awt.Color fromProto(Color protocolor) {
25710 # float alpha = protocolor.hasAlpha()
25711 # ? protocolor.getAlpha().getValue()
25712 # : 1.0;
25713 #
25714 # return new java.awt.Color(
25715 # protocolor.getRed(),
25716 # protocolor.getGreen(),
25717 # protocolor.getBlue(),
25718 # alpha);
25719 # }
25720 #
25721 # public static Color toProto(java.awt.Color color) {
25722 # float red = (float) color.getRed();
25723 # float green = (float) color.getGreen();
25724 # float blue = (float) color.getBlue();
25725 # float denominator = 255.0;
25726 # Color.Builder resultBuilder =
25727 # Color
25728 # .newBuilder()
25729 # .setRed(red / denominator)
25730 # .setGreen(green / denominator)
25731 # .setBlue(blue / denominator);
25732 # int alpha = color.getAlpha();
25733 # if (alpha != 255) {
25734 # result.setAlpha(
25735 # FloatValue
25736 # .newBuilder()
25737 # .setValue(((float) alpha) / denominator)
25738 # .build());
25739 # }
25740 # return resultBuilder.build();
25741 # }
25742 # // ...
25743 #
25744 # Example (iOS / Obj-C):
25745 #
25746 # // ...
25747 # static UIColor* fromProto(Color* protocolor) {
25748 # float red = [protocolor red];
25749 # float green = [protocolor green];
25750 # float blue = [protocolor blue];
25751 # FloatValue* alpha_wrapper = [protocolor alpha];
25752 # float alpha = 1.0;
25753 # if (alpha_wrapper != nil) {
25754 # alpha = [alpha_wrapper value];
25755 # }
25756 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25757 # }
25758 #
25759 # static Color* toProto(UIColor* color) {
25760 # CGFloat red, green, blue, alpha;
25761 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25762 # return nil;
25763 # }
25764 # Color* result = [Color alloc] init];
25765 # [result setRed:red];
25766 # [result setGreen:green];
25767 # [result setBlue:blue];
25768 # if (alpha <= 0.9999) {
25769 # [result setAlpha:floatWrapperWithValue(alpha)];
25770 # }
25771 # [result autorelease];
25772 # return result;
25773 # }
25774 # // ...
25775 #
25776 # Example (JavaScript):
25777 #
25778 # // ...
25779 #
25780 # var protoToCssColor = function(rgb_color) {
25781 # var redFrac = rgb_color.red || 0.0;
25782 # var greenFrac = rgb_color.green || 0.0;
25783 # var blueFrac = rgb_color.blue || 0.0;
25784 # var red = Math.floor(redFrac * 255);
25785 # var green = Math.floor(greenFrac * 255);
25786 # var blue = Math.floor(blueFrac * 255);
25787 #
25788 # if (!('alpha' in rgb_color)) {
25789 # return rgbToCssColor_(red, green, blue);
25790 # }
25791 #
25792 # var alphaFrac = rgb_color.alpha.value || 0.0;
25793 # var rgbParams = [red, green, blue].join(',');
25794 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25795 # };
25796 #
25797 # var rgbToCssColor_ = function(red, green, blue) {
25798 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25799 # var hexString = rgbNumber.toString(16);
25800 # var missingZeros = 6 - hexString.length;
25801 # var resultBuilder = ['#'];
25802 # for (var i = 0; i < missingZeros; i++) {
25803 # resultBuilder.push('0');
25804 # }
25805 # resultBuilder.push(hexString);
25806 # return resultBuilder.join('');
25807 # };
25808 #
25809 # // ...
25810 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25811 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25812 # the final pixel color is defined by the equation:
25813 #
25814 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25815 #
25816 # This means that a value of 1.0 corresponds to a solid color, whereas
25817 # a value of 0.0 corresponds to a completely transparent color. This
25818 # uses a wrapper message rather than a simple float scalar so that it is
25819 # possible to distinguish between a default value and the value being unset.
25820 # If omitted, this color object is to be rendered as a solid color
25821 # (as if the alpha value had been explicitly given with a value of 1.0).
25822 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25823 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25824 },
25825 "type": "A String", # How the value should be interpreted.
25826 "value": "A String", # The value this interpolation point uses. May be a formula.
25827 # Unused if type is MIN or
25828 # MAX.
25829 },
25830 },
25831 },
25832 },
25833 "addSheet": { # The result of adding a sheet. # A reply from adding a sheet.
25834 "properties": { # Properties of a sheet. # The properties of the newly added sheet.
25835 "sheetType": "A String", # The type of sheet. Defaults to GRID.
25836 # This field cannot be changed once set.
25837 "index": 42, # The index of the sheet within the spreadsheet.
25838 # When adding or updating sheet properties, if this field
25839 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080025840 # of the sheet list. When updating sheet indices or inserting
25841 # sheets, movement is considered in "before the move" indexes.
25842 # For example, if there were 3 sheets (S1, S2, S3) in order to
25843 # move S1 ahead of S2 the index would have to be set to 2. A sheet
25844 # index update request will be ignored if the requested index is
25845 # identical to the sheets current index or if the requested new
25846 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025847 "title": "A String", # The name of the sheet.
25848 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
25849 # (If the sheet is an object sheet, containing a chart or image, then
25850 # this field will be absent.)
25851 # When writing it is an error to set any grid properties on non-grid sheets.
25852 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070025853 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025854 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
25855 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070025856 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025857 },
25858 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
25859 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
25860 # for simplicity of conversion to/from color representations in various
25861 # languages over compactness; for example, the fields of this representation
25862 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25863 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25864 # method in iOS; and, with just a little work, it can be easily formatted into
25865 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25866 #
25867 # Example (Java):
25868 #
25869 # import com.google.type.Color;
25870 #
25871 # // ...
25872 # public static java.awt.Color fromProto(Color protocolor) {
25873 # float alpha = protocolor.hasAlpha()
25874 # ? protocolor.getAlpha().getValue()
25875 # : 1.0;
25876 #
25877 # return new java.awt.Color(
25878 # protocolor.getRed(),
25879 # protocolor.getGreen(),
25880 # protocolor.getBlue(),
25881 # alpha);
25882 # }
25883 #
25884 # public static Color toProto(java.awt.Color color) {
25885 # float red = (float) color.getRed();
25886 # float green = (float) color.getGreen();
25887 # float blue = (float) color.getBlue();
25888 # float denominator = 255.0;
25889 # Color.Builder resultBuilder =
25890 # Color
25891 # .newBuilder()
25892 # .setRed(red / denominator)
25893 # .setGreen(green / denominator)
25894 # .setBlue(blue / denominator);
25895 # int alpha = color.getAlpha();
25896 # if (alpha != 255) {
25897 # result.setAlpha(
25898 # FloatValue
25899 # .newBuilder()
25900 # .setValue(((float) alpha) / denominator)
25901 # .build());
25902 # }
25903 # return resultBuilder.build();
25904 # }
25905 # // ...
25906 #
25907 # Example (iOS / Obj-C):
25908 #
25909 # // ...
25910 # static UIColor* fromProto(Color* protocolor) {
25911 # float red = [protocolor red];
25912 # float green = [protocolor green];
25913 # float blue = [protocolor blue];
25914 # FloatValue* alpha_wrapper = [protocolor alpha];
25915 # float alpha = 1.0;
25916 # if (alpha_wrapper != nil) {
25917 # alpha = [alpha_wrapper value];
25918 # }
25919 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25920 # }
25921 #
25922 # static Color* toProto(UIColor* color) {
25923 # CGFloat red, green, blue, alpha;
25924 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25925 # return nil;
25926 # }
25927 # Color* result = [Color alloc] init];
25928 # [result setRed:red];
25929 # [result setGreen:green];
25930 # [result setBlue:blue];
25931 # if (alpha <= 0.9999) {
25932 # [result setAlpha:floatWrapperWithValue(alpha)];
25933 # }
25934 # [result autorelease];
25935 # return result;
25936 # }
25937 # // ...
25938 #
25939 # Example (JavaScript):
25940 #
25941 # // ...
25942 #
25943 # var protoToCssColor = function(rgb_color) {
25944 # var redFrac = rgb_color.red || 0.0;
25945 # var greenFrac = rgb_color.green || 0.0;
25946 # var blueFrac = rgb_color.blue || 0.0;
25947 # var red = Math.floor(redFrac * 255);
25948 # var green = Math.floor(greenFrac * 255);
25949 # var blue = Math.floor(blueFrac * 255);
25950 #
25951 # if (!('alpha' in rgb_color)) {
25952 # return rgbToCssColor_(red, green, blue);
25953 # }
25954 #
25955 # var alphaFrac = rgb_color.alpha.value || 0.0;
25956 # var rgbParams = [red, green, blue].join(',');
25957 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25958 # };
25959 #
25960 # var rgbToCssColor_ = function(red, green, blue) {
25961 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25962 # var hexString = rgbNumber.toString(16);
25963 # var missingZeros = 6 - hexString.length;
25964 # var resultBuilder = ['#'];
25965 # for (var i = 0; i < missingZeros; i++) {
25966 # resultBuilder.push('0');
25967 # }
25968 # resultBuilder.push(hexString);
25969 # return resultBuilder.join('');
25970 # };
25971 #
25972 # // ...
25973 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25974 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25975 # the final pixel color is defined by the equation:
25976 #
25977 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25978 #
25979 # This means that a value of 1.0 corresponds to a solid color, whereas
25980 # a value of 0.0 corresponds to a completely transparent color. This
25981 # uses a wrapper message rather than a simple float scalar so that it is
25982 # possible to distinguish between a default value and the value being unset.
25983 # If omitted, this color object is to be rendered as a solid color
25984 # (as if the alpha value had been explicitly given with a value of 1.0).
25985 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25986 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25987 },
25988 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
25989 "sheetId": 42, # The ID of the sheet. Must be non-negative.
25990 # This field cannot be changed once set.
25991 },
25992 },
25993 "findReplace": { # The result of the find/replace. # A reply from doing a find/replace.
25994 "occurrencesChanged": 42, # The number of occurrences (possibly multiple within a cell) changed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070025995 # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would
25996 # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025997 "sheetsChanged": 42, # The number of sheets changed.
25998 "rowsChanged": 42, # The number of rows changed.
25999 "valuesChanged": 42, # The number of non-formula cells changed.
26000 "formulasChanged": 42, # The number of formula cells changed.
26001 },
26002 "addNamedRange": { # The result of adding a named range. # A reply from adding a named range.
26003 "namedRange": { # A named range. # The named range to add.
26004 "namedRangeId": "A String", # The ID of the named range.
26005 "range": { # A range on a sheet. # The range this represents.
26006 # All indexes are zero-based.
26007 # Indexes are half open, e.g the start index is inclusive
26008 # and the end index is exclusive -- [start_index, end_index).
26009 # Missing indexes indicate the range is unbounded on that side.
26010 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026011 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026012 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026013 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026014 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026015 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026017 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026018 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026019 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026020 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026021 # `Sheet1!A:B == sheet_id: 0,
26022 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026023 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026024 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026025 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026026 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026027 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026028 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026029 #
26030 # The start index must always be less than or equal to the end index.
26031 # If the start index equals the end index, then the range is empty.
26032 # Empty ranges are typically not meaningful and are usually rendered in the
26033 # UI as `#REF!`.
26034 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026035 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026036 "sheetId": 42, # The sheet this range is on.
26037 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026038 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026039 },
26040 "name": "A String", # The name of the named range.
26041 },
26042 },
26043 "addProtectedRange": { # The result of adding a new protected range. # A reply from adding a protected range.
26044 "protectedRange": { # A protected range. # The newly added protected range.
26045 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
26046 # Unprotected ranges are only supported on protected sheets.
26047 { # A range on a sheet.
26048 # All indexes are zero-based.
26049 # Indexes are half open, e.g the start index is inclusive
26050 # and the end index is exclusive -- [start_index, end_index).
26051 # Missing indexes indicate the range is unbounded on that side.
26052 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026053 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026054 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026055 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026056 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026057 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026058 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026059 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026060 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026061 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026062 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026063 # `Sheet1!A:B == sheet_id: 0,
26064 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026065 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026066 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026067 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026068 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026069 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026070 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026071 #
26072 # The start index must always be less than or equal to the end index.
26073 # If the start index equals the end index, then the range is empty.
26074 # Empty ranges are typically not meaningful and are usually rendered in the
26075 # UI as `#REF!`.
26076 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026077 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026078 "sheetId": 42, # The sheet this range is on.
26079 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026080 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026081 },
26082 ],
26083 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
26084 # protected area.
26085 # This field is read-only.
26086 "description": "A String", # The description of this protected range.
26087 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
26088 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026089 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026090 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026091 "range": { # A range on a sheet. # The range that is being protected.
26092 # The range may be fully unbounded, in which case this is considered
26093 # a protected sheet.
26094 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026095 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026096 # may be set.
26097 # All indexes are zero-based.
26098 # Indexes are half open, e.g the start index is inclusive
26099 # and the end index is exclusive -- [start_index, end_index).
26100 # Missing indexes indicate the range is unbounded on that side.
26101 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026102 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026103 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026104 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026105 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026106 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026107 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026108 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026109 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026110 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026111 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026112 # `Sheet1!A:B == sheet_id: 0,
26113 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026114 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026115 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026116 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026117 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026118 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026119 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026120 #
26121 # The start index must always be less than or equal to the end index.
26122 # If the start index equals the end index, then the range is empty.
26123 # Empty ranges are typically not meaningful and are usually rendered in the
26124 # UI as `#REF!`.
26125 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026126 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026127 "sheetId": 42, # The sheet this range is on.
26128 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026129 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026130 },
Thomas Coffee2f245372017-03-27 10:39:26 -070026131 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
26132 # This field is only visible to users with edit access to the protected
26133 # range and the document.
26134 # Editors are not supported with warning_only protection.
26135 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
26136 # range. Domain protection is only supported on documents within a domain.
26137 "users": [ # The email addresses of users with edit access to the protected range.
26138 "A String",
26139 ],
26140 "groups": [ # The email addresses of groups with edit access to the protected range.
26141 "A String",
26142 ],
26143 },
26144 "protectedRangeId": 42, # The ID of the protected range.
26145 # This field is read-only.
26146 "warningOnly": True or False, # True if this protected range will show a warning when editing.
26147 # Warning-based protection means that every user can edit data in the
26148 # protected range, except editing will prompt a warning asking the user
26149 # to confirm the edit.
26150 #
26151 # When writing: if this field is true, then editors is ignored.
26152 # Additionally, if this field is changed from true to false and the
26153 # `editors` field is not set (nor included in the field mask), then
26154 # the editors will be set to all the editors in the document.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026155 },
26156 },
26157 "deleteConditionalFormatRule": { # The result of deleting a conditional format rule. # A reply from deleting a conditional format rule.
26158 "rule": { # A rule describing a conditional format. # The rule that was deleted.
26159 "ranges": [ # The ranges that will be formatted if the condition is true.
26160 # All the ranges must be on the same grid.
26161 { # A range on a sheet.
26162 # All indexes are zero-based.
26163 # Indexes are half open, e.g the start index is inclusive
26164 # and the end index is exclusive -- [start_index, end_index).
26165 # Missing indexes indicate the range is unbounded on that side.
26166 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026167 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026168 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026169 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026170 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026171 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026172 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026173 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026174 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026175 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026176 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026177 # `Sheet1!A:B == sheet_id: 0,
26178 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026179 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026180 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026181 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026182 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026184 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026185 #
26186 # The start index must always be less than or equal to the end index.
26187 # If the start index equals the end index, then the range is empty.
26188 # Empty ranges are typically not meaningful and are usually rendered in the
26189 # UI as `#REF!`.
26190 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026191 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026192 "sheetId": 42, # The sheet this range is on.
26193 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070026194 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026195 },
26196 ],
26197 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
26198 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
26199 # the format will be applied.
26200 # BooleanConditions are used by conditional formatting,
26201 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026202 "values": [ # The values of the condition. The number of supported values depends
26203 # on the condition type. Some support zero values,
26204 # others one or two values,
26205 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
26206 { # The value of the condition.
26207 "relativeDate": "A String", # A relative date (based on the current date).
26208 # Valid only if the type is
26209 # DATE_BEFORE,
26210 # DATE_AFTER,
26211 # DATE_ON_OR_BEFORE or
26212 # DATE_ON_OR_AFTER.
26213 #
26214 # Relative dates are not supported in data validation.
26215 # They are supported only in conditional formatting and
26216 # conditional filters.
26217 "userEnteredValue": "A String", # A value the condition is based on.
26218 # The value will be parsed as if the user typed into a cell.
26219 # Formulas are supported (and must begin with an `=`).
26220 },
26221 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026222 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026223 },
26224 "format": { # The format of a cell. # The format to apply.
26225 # Conditional formatting can only apply a subset of formatting:
26226 # bold, italic,
26227 # strikethrough,
26228 # foreground color &
26229 # background color.
26230 "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 -070026231 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
26232 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026233 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070026234 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026235 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026236 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026237 },
26238 "textDirection": "A String", # The direction of the text in the cell.
26239 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
26240 # When updating padding, every field must be specified.
26241 "top": 42, # The top padding of the cell.
26242 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026243 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026244 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026245 },
Thomas Coffee2f245372017-03-27 10:39:26 -070026246 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026247 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
26248 # for simplicity of conversion to/from color representations in various
26249 # languages over compactness; for example, the fields of this representation
26250 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26251 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26252 # method in iOS; and, with just a little work, it can be easily formatted into
26253 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26254 #
26255 # Example (Java):
26256 #
26257 # import com.google.type.Color;
26258 #
26259 # // ...
26260 # public static java.awt.Color fromProto(Color protocolor) {
26261 # float alpha = protocolor.hasAlpha()
26262 # ? protocolor.getAlpha().getValue()
26263 # : 1.0;
26264 #
26265 # return new java.awt.Color(
26266 # protocolor.getRed(),
26267 # protocolor.getGreen(),
26268 # protocolor.getBlue(),
26269 # alpha);
26270 # }
26271 #
26272 # public static Color toProto(java.awt.Color color) {
26273 # float red = (float) color.getRed();
26274 # float green = (float) color.getGreen();
26275 # float blue = (float) color.getBlue();
26276 # float denominator = 255.0;
26277 # Color.Builder resultBuilder =
26278 # Color
26279 # .newBuilder()
26280 # .setRed(red / denominator)
26281 # .setGreen(green / denominator)
26282 # .setBlue(blue / denominator);
26283 # int alpha = color.getAlpha();
26284 # if (alpha != 255) {
26285 # result.setAlpha(
26286 # FloatValue
26287 # .newBuilder()
26288 # .setValue(((float) alpha) / denominator)
26289 # .build());
26290 # }
26291 # return resultBuilder.build();
26292 # }
26293 # // ...
26294 #
26295 # Example (iOS / Obj-C):
26296 #
26297 # // ...
26298 # static UIColor* fromProto(Color* protocolor) {
26299 # float red = [protocolor red];
26300 # float green = [protocolor green];
26301 # float blue = [protocolor blue];
26302 # FloatValue* alpha_wrapper = [protocolor alpha];
26303 # float alpha = 1.0;
26304 # if (alpha_wrapper != nil) {
26305 # alpha = [alpha_wrapper value];
26306 # }
26307 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26308 # }
26309 #
26310 # static Color* toProto(UIColor* color) {
26311 # CGFloat red, green, blue, alpha;
26312 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26313 # return nil;
26314 # }
26315 # Color* result = [Color alloc] init];
26316 # [result setRed:red];
26317 # [result setGreen:green];
26318 # [result setBlue:blue];
26319 # if (alpha <= 0.9999) {
26320 # [result setAlpha:floatWrapperWithValue(alpha)];
26321 # }
26322 # [result autorelease];
26323 # return result;
26324 # }
26325 # // ...
26326 #
26327 # Example (JavaScript):
26328 #
26329 # // ...
26330 #
26331 # var protoToCssColor = function(rgb_color) {
26332 # var redFrac = rgb_color.red || 0.0;
26333 # var greenFrac = rgb_color.green || 0.0;
26334 # var blueFrac = rgb_color.blue || 0.0;
26335 # var red = Math.floor(redFrac * 255);
26336 # var green = Math.floor(greenFrac * 255);
26337 # var blue = Math.floor(blueFrac * 255);
26338 #
26339 # if (!('alpha' in rgb_color)) {
26340 # return rgbToCssColor_(red, green, blue);
26341 # }
26342 #
26343 # var alphaFrac = rgb_color.alpha.value || 0.0;
26344 # var rgbParams = [red, green, blue].join(',');
26345 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26346 # };
26347 #
26348 # var rgbToCssColor_ = function(red, green, blue) {
26349 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26350 # var hexString = rgbNumber.toString(16);
26351 # var missingZeros = 6 - hexString.length;
26352 # var resultBuilder = ['#'];
26353 # for (var i = 0; i < missingZeros; i++) {
26354 # resultBuilder.push('0');
26355 # }
26356 # resultBuilder.push(hexString);
26357 # return resultBuilder.join('');
26358 # };
26359 #
26360 # // ...
26361 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26362 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26363 # the final pixel color is defined by the equation:
26364 #
26365 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26366 #
26367 # This means that a value of 1.0 corresponds to a solid color, whereas
26368 # a value of 0.0 corresponds to a completely transparent color. This
26369 # uses a wrapper message rather than a simple float scalar so that it is
26370 # possible to distinguish between a default value and the value being unset.
26371 # If omitted, this color object is to be rendered as a solid color
26372 # (as if the alpha value had been explicitly given with a value of 1.0).
26373 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26374 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26375 },
Thomas Coffee2f245372017-03-27 10:39:26 -070026376 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026377 "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).
26378 # Absent values indicate that the field isn't specified.
26379 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
26380 # for simplicity of conversion to/from color representations in various
26381 # languages over compactness; for example, the fields of this representation
26382 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26383 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26384 # method in iOS; and, with just a little work, it can be easily formatted into
26385 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26386 #
26387 # Example (Java):
26388 #
26389 # import com.google.type.Color;
26390 #
26391 # // ...
26392 # public static java.awt.Color fromProto(Color protocolor) {
26393 # float alpha = protocolor.hasAlpha()
26394 # ? protocolor.getAlpha().getValue()
26395 # : 1.0;
26396 #
26397 # return new java.awt.Color(
26398 # protocolor.getRed(),
26399 # protocolor.getGreen(),
26400 # protocolor.getBlue(),
26401 # alpha);
26402 # }
26403 #
26404 # public static Color toProto(java.awt.Color color) {
26405 # float red = (float) color.getRed();
26406 # float green = (float) color.getGreen();
26407 # float blue = (float) color.getBlue();
26408 # float denominator = 255.0;
26409 # Color.Builder resultBuilder =
26410 # Color
26411 # .newBuilder()
26412 # .setRed(red / denominator)
26413 # .setGreen(green / denominator)
26414 # .setBlue(blue / denominator);
26415 # int alpha = color.getAlpha();
26416 # if (alpha != 255) {
26417 # result.setAlpha(
26418 # FloatValue
26419 # .newBuilder()
26420 # .setValue(((float) alpha) / denominator)
26421 # .build());
26422 # }
26423 # return resultBuilder.build();
26424 # }
26425 # // ...
26426 #
26427 # Example (iOS / Obj-C):
26428 #
26429 # // ...
26430 # static UIColor* fromProto(Color* protocolor) {
26431 # float red = [protocolor red];
26432 # float green = [protocolor green];
26433 # float blue = [protocolor blue];
26434 # FloatValue* alpha_wrapper = [protocolor alpha];
26435 # float alpha = 1.0;
26436 # if (alpha_wrapper != nil) {
26437 # alpha = [alpha_wrapper value];
26438 # }
26439 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26440 # }
26441 #
26442 # static Color* toProto(UIColor* color) {
26443 # CGFloat red, green, blue, alpha;
26444 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26445 # return nil;
26446 # }
26447 # Color* result = [Color alloc] init];
26448 # [result setRed:red];
26449 # [result setGreen:green];
26450 # [result setBlue:blue];
26451 # if (alpha <= 0.9999) {
26452 # [result setAlpha:floatWrapperWithValue(alpha)];
26453 # }
26454 # [result autorelease];
26455 # return result;
26456 # }
26457 # // ...
26458 #
26459 # Example (JavaScript):
26460 #
26461 # // ...
26462 #
26463 # var protoToCssColor = function(rgb_color) {
26464 # var redFrac = rgb_color.red || 0.0;
26465 # var greenFrac = rgb_color.green || 0.0;
26466 # var blueFrac = rgb_color.blue || 0.0;
26467 # var red = Math.floor(redFrac * 255);
26468 # var green = Math.floor(greenFrac * 255);
26469 # var blue = Math.floor(blueFrac * 255);
26470 #
26471 # if (!('alpha' in rgb_color)) {
26472 # return rgbToCssColor_(red, green, blue);
26473 # }
26474 #
26475 # var alphaFrac = rgb_color.alpha.value || 0.0;
26476 # var rgbParams = [red, green, blue].join(',');
26477 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26478 # };
26479 #
26480 # var rgbToCssColor_ = function(red, green, blue) {
26481 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26482 # var hexString = rgbNumber.toString(16);
26483 # var missingZeros = 6 - hexString.length;
26484 # var resultBuilder = ['#'];
26485 # for (var i = 0; i < missingZeros; i++) {
26486 # resultBuilder.push('0');
26487 # }
26488 # resultBuilder.push(hexString);
26489 # return resultBuilder.join('');
26490 # };
26491 #
26492 # // ...
26493 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26494 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26495 # the final pixel color is defined by the equation:
26496 #
26497 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26498 #
26499 # This means that a value of 1.0 corresponds to a solid color, whereas
26500 # a value of 0.0 corresponds to a completely transparent color. This
26501 # uses a wrapper message rather than a simple float scalar so that it is
26502 # possible to distinguish between a default value and the value being unset.
26503 # If omitted, this color object is to be rendered as a solid color
26504 # (as if the alpha value had been explicitly given with a value of 1.0).
26505 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26506 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26507 },
26508 "bold": True or False, # True if the text is bold.
26509 "strikethrough": True or False, # True if the text has a strikethrough.
26510 "fontFamily": "A String", # The font family.
26511 "fontSize": 42, # The size of the font.
26512 "italic": True or False, # True if the text is italicized.
26513 "underline": True or False, # True if the text is underlined.
26514 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070026515 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
26516 "angle": 42, # The angle between the standard orientation and the desired orientation.
26517 # Measured in degrees. Valid values are between -90 and 90. Positive
26518 # angles are angled upwards, negative are angled downwards.
26519 #
26520 # Note: For LTR text direction positive angles are in the counterclockwise
26521 # direction, whereas for RTL they are in the clockwise direction
26522 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
26523 # characters is unchanged.
26524 # For example:
26525 #
26526 # | V |
26527 # | e |
26528 # | r |
26529 # | t |
26530 # | i |
26531 # | c |
26532 # | a |
26533 # | l |
26534 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026535 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
26536 "borders": { # The borders of the cell. # The borders of the cell.
26537 "top": { # A border along a cell. # The top border of the cell.
26538 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26539 # for simplicity of conversion to/from color representations in various
26540 # languages over compactness; for example, the fields of this representation
26541 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26542 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26543 # method in iOS; and, with just a little work, it can be easily formatted into
26544 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26545 #
26546 # Example (Java):
26547 #
26548 # import com.google.type.Color;
26549 #
26550 # // ...
26551 # public static java.awt.Color fromProto(Color protocolor) {
26552 # float alpha = protocolor.hasAlpha()
26553 # ? protocolor.getAlpha().getValue()
26554 # : 1.0;
26555 #
26556 # return new java.awt.Color(
26557 # protocolor.getRed(),
26558 # protocolor.getGreen(),
26559 # protocolor.getBlue(),
26560 # alpha);
26561 # }
26562 #
26563 # public static Color toProto(java.awt.Color color) {
26564 # float red = (float) color.getRed();
26565 # float green = (float) color.getGreen();
26566 # float blue = (float) color.getBlue();
26567 # float denominator = 255.0;
26568 # Color.Builder resultBuilder =
26569 # Color
26570 # .newBuilder()
26571 # .setRed(red / denominator)
26572 # .setGreen(green / denominator)
26573 # .setBlue(blue / denominator);
26574 # int alpha = color.getAlpha();
26575 # if (alpha != 255) {
26576 # result.setAlpha(
26577 # FloatValue
26578 # .newBuilder()
26579 # .setValue(((float) alpha) / denominator)
26580 # .build());
26581 # }
26582 # return resultBuilder.build();
26583 # }
26584 # // ...
26585 #
26586 # Example (iOS / Obj-C):
26587 #
26588 # // ...
26589 # static UIColor* fromProto(Color* protocolor) {
26590 # float red = [protocolor red];
26591 # float green = [protocolor green];
26592 # float blue = [protocolor blue];
26593 # FloatValue* alpha_wrapper = [protocolor alpha];
26594 # float alpha = 1.0;
26595 # if (alpha_wrapper != nil) {
26596 # alpha = [alpha_wrapper value];
26597 # }
26598 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26599 # }
26600 #
26601 # static Color* toProto(UIColor* color) {
26602 # CGFloat red, green, blue, alpha;
26603 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26604 # return nil;
26605 # }
26606 # Color* result = [Color alloc] init];
26607 # [result setRed:red];
26608 # [result setGreen:green];
26609 # [result setBlue:blue];
26610 # if (alpha <= 0.9999) {
26611 # [result setAlpha:floatWrapperWithValue(alpha)];
26612 # }
26613 # [result autorelease];
26614 # return result;
26615 # }
26616 # // ...
26617 #
26618 # Example (JavaScript):
26619 #
26620 # // ...
26621 #
26622 # var protoToCssColor = function(rgb_color) {
26623 # var redFrac = rgb_color.red || 0.0;
26624 # var greenFrac = rgb_color.green || 0.0;
26625 # var blueFrac = rgb_color.blue || 0.0;
26626 # var red = Math.floor(redFrac * 255);
26627 # var green = Math.floor(greenFrac * 255);
26628 # var blue = Math.floor(blueFrac * 255);
26629 #
26630 # if (!('alpha' in rgb_color)) {
26631 # return rgbToCssColor_(red, green, blue);
26632 # }
26633 #
26634 # var alphaFrac = rgb_color.alpha.value || 0.0;
26635 # var rgbParams = [red, green, blue].join(',');
26636 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26637 # };
26638 #
26639 # var rgbToCssColor_ = function(red, green, blue) {
26640 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26641 # var hexString = rgbNumber.toString(16);
26642 # var missingZeros = 6 - hexString.length;
26643 # var resultBuilder = ['#'];
26644 # for (var i = 0; i < missingZeros; i++) {
26645 # resultBuilder.push('0');
26646 # }
26647 # resultBuilder.push(hexString);
26648 # return resultBuilder.join('');
26649 # };
26650 #
26651 # // ...
26652 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26653 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26654 # the final pixel color is defined by the equation:
26655 #
26656 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26657 #
26658 # This means that a value of 1.0 corresponds to a solid color, whereas
26659 # a value of 0.0 corresponds to a completely transparent color. This
26660 # uses a wrapper message rather than a simple float scalar so that it is
26661 # possible to distinguish between a default value and the value being unset.
26662 # If omitted, this color object is to be rendered as a solid color
26663 # (as if the alpha value had been explicitly given with a value of 1.0).
26664 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26665 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26666 },
26667 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026668 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026669 "style": "A String", # The style of the border.
26670 },
26671 "right": { # A border along a cell. # The right border of the cell.
26672 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26673 # for simplicity of conversion to/from color representations in various
26674 # languages over compactness; for example, the fields of this representation
26675 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26676 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26677 # method in iOS; and, with just a little work, it can be easily formatted into
26678 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26679 #
26680 # Example (Java):
26681 #
26682 # import com.google.type.Color;
26683 #
26684 # // ...
26685 # public static java.awt.Color fromProto(Color protocolor) {
26686 # float alpha = protocolor.hasAlpha()
26687 # ? protocolor.getAlpha().getValue()
26688 # : 1.0;
26689 #
26690 # return new java.awt.Color(
26691 # protocolor.getRed(),
26692 # protocolor.getGreen(),
26693 # protocolor.getBlue(),
26694 # alpha);
26695 # }
26696 #
26697 # public static Color toProto(java.awt.Color color) {
26698 # float red = (float) color.getRed();
26699 # float green = (float) color.getGreen();
26700 # float blue = (float) color.getBlue();
26701 # float denominator = 255.0;
26702 # Color.Builder resultBuilder =
26703 # Color
26704 # .newBuilder()
26705 # .setRed(red / denominator)
26706 # .setGreen(green / denominator)
26707 # .setBlue(blue / denominator);
26708 # int alpha = color.getAlpha();
26709 # if (alpha != 255) {
26710 # result.setAlpha(
26711 # FloatValue
26712 # .newBuilder()
26713 # .setValue(((float) alpha) / denominator)
26714 # .build());
26715 # }
26716 # return resultBuilder.build();
26717 # }
26718 # // ...
26719 #
26720 # Example (iOS / Obj-C):
26721 #
26722 # // ...
26723 # static UIColor* fromProto(Color* protocolor) {
26724 # float red = [protocolor red];
26725 # float green = [protocolor green];
26726 # float blue = [protocolor blue];
26727 # FloatValue* alpha_wrapper = [protocolor alpha];
26728 # float alpha = 1.0;
26729 # if (alpha_wrapper != nil) {
26730 # alpha = [alpha_wrapper value];
26731 # }
26732 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26733 # }
26734 #
26735 # static Color* toProto(UIColor* color) {
26736 # CGFloat red, green, blue, alpha;
26737 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26738 # return nil;
26739 # }
26740 # Color* result = [Color alloc] init];
26741 # [result setRed:red];
26742 # [result setGreen:green];
26743 # [result setBlue:blue];
26744 # if (alpha <= 0.9999) {
26745 # [result setAlpha:floatWrapperWithValue(alpha)];
26746 # }
26747 # [result autorelease];
26748 # return result;
26749 # }
26750 # // ...
26751 #
26752 # Example (JavaScript):
26753 #
26754 # // ...
26755 #
26756 # var protoToCssColor = function(rgb_color) {
26757 # var redFrac = rgb_color.red || 0.0;
26758 # var greenFrac = rgb_color.green || 0.0;
26759 # var blueFrac = rgb_color.blue || 0.0;
26760 # var red = Math.floor(redFrac * 255);
26761 # var green = Math.floor(greenFrac * 255);
26762 # var blue = Math.floor(blueFrac * 255);
26763 #
26764 # if (!('alpha' in rgb_color)) {
26765 # return rgbToCssColor_(red, green, blue);
26766 # }
26767 #
26768 # var alphaFrac = rgb_color.alpha.value || 0.0;
26769 # var rgbParams = [red, green, blue].join(',');
26770 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26771 # };
26772 #
26773 # var rgbToCssColor_ = function(red, green, blue) {
26774 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26775 # var hexString = rgbNumber.toString(16);
26776 # var missingZeros = 6 - hexString.length;
26777 # var resultBuilder = ['#'];
26778 # for (var i = 0; i < missingZeros; i++) {
26779 # resultBuilder.push('0');
26780 # }
26781 # resultBuilder.push(hexString);
26782 # return resultBuilder.join('');
26783 # };
26784 #
26785 # // ...
26786 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26787 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26788 # the final pixel color is defined by the equation:
26789 #
26790 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26791 #
26792 # This means that a value of 1.0 corresponds to a solid color, whereas
26793 # a value of 0.0 corresponds to a completely transparent color. This
26794 # uses a wrapper message rather than a simple float scalar so that it is
26795 # possible to distinguish between a default value and the value being unset.
26796 # If omitted, this color object is to be rendered as a solid color
26797 # (as if the alpha value had been explicitly given with a value of 1.0).
26798 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26799 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26800 },
26801 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026802 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026803 "style": "A String", # The style of the border.
26804 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026805 "left": { # A border along a cell. # The left border of the cell.
26806 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26807 # for simplicity of conversion to/from color representations in various
26808 # languages over compactness; for example, the fields of this representation
26809 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26810 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26811 # method in iOS; and, with just a little work, it can be easily formatted into
26812 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26813 #
26814 # Example (Java):
26815 #
26816 # import com.google.type.Color;
26817 #
26818 # // ...
26819 # public static java.awt.Color fromProto(Color protocolor) {
26820 # float alpha = protocolor.hasAlpha()
26821 # ? protocolor.getAlpha().getValue()
26822 # : 1.0;
26823 #
26824 # return new java.awt.Color(
26825 # protocolor.getRed(),
26826 # protocolor.getGreen(),
26827 # protocolor.getBlue(),
26828 # alpha);
26829 # }
26830 #
26831 # public static Color toProto(java.awt.Color color) {
26832 # float red = (float) color.getRed();
26833 # float green = (float) color.getGreen();
26834 # float blue = (float) color.getBlue();
26835 # float denominator = 255.0;
26836 # Color.Builder resultBuilder =
26837 # Color
26838 # .newBuilder()
26839 # .setRed(red / denominator)
26840 # .setGreen(green / denominator)
26841 # .setBlue(blue / denominator);
26842 # int alpha = color.getAlpha();
26843 # if (alpha != 255) {
26844 # result.setAlpha(
26845 # FloatValue
26846 # .newBuilder()
26847 # .setValue(((float) alpha) / denominator)
26848 # .build());
26849 # }
26850 # return resultBuilder.build();
26851 # }
26852 # // ...
26853 #
26854 # Example (iOS / Obj-C):
26855 #
26856 # // ...
26857 # static UIColor* fromProto(Color* protocolor) {
26858 # float red = [protocolor red];
26859 # float green = [protocolor green];
26860 # float blue = [protocolor blue];
26861 # FloatValue* alpha_wrapper = [protocolor alpha];
26862 # float alpha = 1.0;
26863 # if (alpha_wrapper != nil) {
26864 # alpha = [alpha_wrapper value];
26865 # }
26866 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26867 # }
26868 #
26869 # static Color* toProto(UIColor* color) {
26870 # CGFloat red, green, blue, alpha;
26871 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26872 # return nil;
26873 # }
26874 # Color* result = [Color alloc] init];
26875 # [result setRed:red];
26876 # [result setGreen:green];
26877 # [result setBlue:blue];
26878 # if (alpha <= 0.9999) {
26879 # [result setAlpha:floatWrapperWithValue(alpha)];
26880 # }
26881 # [result autorelease];
26882 # return result;
26883 # }
26884 # // ...
26885 #
26886 # Example (JavaScript):
26887 #
26888 # // ...
26889 #
26890 # var protoToCssColor = function(rgb_color) {
26891 # var redFrac = rgb_color.red || 0.0;
26892 # var greenFrac = rgb_color.green || 0.0;
26893 # var blueFrac = rgb_color.blue || 0.0;
26894 # var red = Math.floor(redFrac * 255);
26895 # var green = Math.floor(greenFrac * 255);
26896 # var blue = Math.floor(blueFrac * 255);
26897 #
26898 # if (!('alpha' in rgb_color)) {
26899 # return rgbToCssColor_(red, green, blue);
26900 # }
26901 #
26902 # var alphaFrac = rgb_color.alpha.value || 0.0;
26903 # var rgbParams = [red, green, blue].join(',');
26904 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26905 # };
26906 #
26907 # var rgbToCssColor_ = function(red, green, blue) {
26908 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26909 # var hexString = rgbNumber.toString(16);
26910 # var missingZeros = 6 - hexString.length;
26911 # var resultBuilder = ['#'];
26912 # for (var i = 0; i < missingZeros; i++) {
26913 # resultBuilder.push('0');
26914 # }
26915 # resultBuilder.push(hexString);
26916 # return resultBuilder.join('');
26917 # };
26918 #
26919 # // ...
26920 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26921 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26922 # the final pixel color is defined by the equation:
26923 #
26924 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26925 #
26926 # This means that a value of 1.0 corresponds to a solid color, whereas
26927 # a value of 0.0 corresponds to a completely transparent color. This
26928 # uses a wrapper message rather than a simple float scalar so that it is
26929 # possible to distinguish between a default value and the value being unset.
26930 # If omitted, this color object is to be rendered as a solid color
26931 # (as if the alpha value had been explicitly given with a value of 1.0).
26932 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26933 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26934 },
26935 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026936 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026937 "style": "A String", # The style of the border.
26938 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070026939 "bottom": { # A border along a cell. # The bottom border of the cell.
26940 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26941 # for simplicity of conversion to/from color representations in various
26942 # languages over compactness; for example, the fields of this representation
26943 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26944 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26945 # method in iOS; and, with just a little work, it can be easily formatted into
26946 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26947 #
26948 # Example (Java):
26949 #
26950 # import com.google.type.Color;
26951 #
26952 # // ...
26953 # public static java.awt.Color fromProto(Color protocolor) {
26954 # float alpha = protocolor.hasAlpha()
26955 # ? protocolor.getAlpha().getValue()
26956 # : 1.0;
26957 #
26958 # return new java.awt.Color(
26959 # protocolor.getRed(),
26960 # protocolor.getGreen(),
26961 # protocolor.getBlue(),
26962 # alpha);
26963 # }
26964 #
26965 # public static Color toProto(java.awt.Color color) {
26966 # float red = (float) color.getRed();
26967 # float green = (float) color.getGreen();
26968 # float blue = (float) color.getBlue();
26969 # float denominator = 255.0;
26970 # Color.Builder resultBuilder =
26971 # Color
26972 # .newBuilder()
26973 # .setRed(red / denominator)
26974 # .setGreen(green / denominator)
26975 # .setBlue(blue / denominator);
26976 # int alpha = color.getAlpha();
26977 # if (alpha != 255) {
26978 # result.setAlpha(
26979 # FloatValue
26980 # .newBuilder()
26981 # .setValue(((float) alpha) / denominator)
26982 # .build());
26983 # }
26984 # return resultBuilder.build();
26985 # }
26986 # // ...
26987 #
26988 # Example (iOS / Obj-C):
26989 #
26990 # // ...
26991 # static UIColor* fromProto(Color* protocolor) {
26992 # float red = [protocolor red];
26993 # float green = [protocolor green];
26994 # float blue = [protocolor blue];
26995 # FloatValue* alpha_wrapper = [protocolor alpha];
26996 # float alpha = 1.0;
26997 # if (alpha_wrapper != nil) {
26998 # alpha = [alpha_wrapper value];
26999 # }
27000 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27001 # }
27002 #
27003 # static Color* toProto(UIColor* color) {
27004 # CGFloat red, green, blue, alpha;
27005 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27006 # return nil;
27007 # }
27008 # Color* result = [Color alloc] init];
27009 # [result setRed:red];
27010 # [result setGreen:green];
27011 # [result setBlue:blue];
27012 # if (alpha <= 0.9999) {
27013 # [result setAlpha:floatWrapperWithValue(alpha)];
27014 # }
27015 # [result autorelease];
27016 # return result;
27017 # }
27018 # // ...
27019 #
27020 # Example (JavaScript):
27021 #
27022 # // ...
27023 #
27024 # var protoToCssColor = function(rgb_color) {
27025 # var redFrac = rgb_color.red || 0.0;
27026 # var greenFrac = rgb_color.green || 0.0;
27027 # var blueFrac = rgb_color.blue || 0.0;
27028 # var red = Math.floor(redFrac * 255);
27029 # var green = Math.floor(greenFrac * 255);
27030 # var blue = Math.floor(blueFrac * 255);
27031 #
27032 # if (!('alpha' in rgb_color)) {
27033 # return rgbToCssColor_(red, green, blue);
27034 # }
27035 #
27036 # var alphaFrac = rgb_color.alpha.value || 0.0;
27037 # var rgbParams = [red, green, blue].join(',');
27038 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27039 # };
27040 #
27041 # var rgbToCssColor_ = function(red, green, blue) {
27042 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27043 # var hexString = rgbNumber.toString(16);
27044 # var missingZeros = 6 - hexString.length;
27045 # var resultBuilder = ['#'];
27046 # for (var i = 0; i < missingZeros; i++) {
27047 # resultBuilder.push('0');
27048 # }
27049 # resultBuilder.push(hexString);
27050 # return resultBuilder.join('');
27051 # };
27052 #
27053 # // ...
27054 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27055 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27056 # the final pixel color is defined by the equation:
27057 #
27058 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27059 #
27060 # This means that a value of 1.0 corresponds to a solid color, whereas
27061 # a value of 0.0 corresponds to a completely transparent color. This
27062 # uses a wrapper message rather than a simple float scalar so that it is
27063 # possible to distinguish between a default value and the value being unset.
27064 # If omitted, this color object is to be rendered as a solid color
27065 # (as if the alpha value had been explicitly given with a value of 1.0).
27066 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27067 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27068 },
27069 "width": 42, # The width of the border, in pixels.
27070 # Deprecated; the width is determined by the "style" field.
27071 "style": "A String", # The style of the border.
27072 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027073 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070027074 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027075 },
27076 },
27077 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
27078 # the interpolation points listed. The format of a cell will vary
27079 # based on its contents as compared to the values of the interpolation
27080 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027081 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027082 # These pin the gradient color scale according to the color,
27083 # type and value chosen.
27084 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
27085 # for simplicity of conversion to/from color representations in various
27086 # languages over compactness; for example, the fields of this representation
27087 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27088 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27089 # method in iOS; and, with just a little work, it can be easily formatted into
27090 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27091 #
27092 # Example (Java):
27093 #
27094 # import com.google.type.Color;
27095 #
27096 # // ...
27097 # public static java.awt.Color fromProto(Color protocolor) {
27098 # float alpha = protocolor.hasAlpha()
27099 # ? protocolor.getAlpha().getValue()
27100 # : 1.0;
27101 #
27102 # return new java.awt.Color(
27103 # protocolor.getRed(),
27104 # protocolor.getGreen(),
27105 # protocolor.getBlue(),
27106 # alpha);
27107 # }
27108 #
27109 # public static Color toProto(java.awt.Color color) {
27110 # float red = (float) color.getRed();
27111 # float green = (float) color.getGreen();
27112 # float blue = (float) color.getBlue();
27113 # float denominator = 255.0;
27114 # Color.Builder resultBuilder =
27115 # Color
27116 # .newBuilder()
27117 # .setRed(red / denominator)
27118 # .setGreen(green / denominator)
27119 # .setBlue(blue / denominator);
27120 # int alpha = color.getAlpha();
27121 # if (alpha != 255) {
27122 # result.setAlpha(
27123 # FloatValue
27124 # .newBuilder()
27125 # .setValue(((float) alpha) / denominator)
27126 # .build());
27127 # }
27128 # return resultBuilder.build();
27129 # }
27130 # // ...
27131 #
27132 # Example (iOS / Obj-C):
27133 #
27134 # // ...
27135 # static UIColor* fromProto(Color* protocolor) {
27136 # float red = [protocolor red];
27137 # float green = [protocolor green];
27138 # float blue = [protocolor blue];
27139 # FloatValue* alpha_wrapper = [protocolor alpha];
27140 # float alpha = 1.0;
27141 # if (alpha_wrapper != nil) {
27142 # alpha = [alpha_wrapper value];
27143 # }
27144 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27145 # }
27146 #
27147 # static Color* toProto(UIColor* color) {
27148 # CGFloat red, green, blue, alpha;
27149 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27150 # return nil;
27151 # }
27152 # Color* result = [Color alloc] init];
27153 # [result setRed:red];
27154 # [result setGreen:green];
27155 # [result setBlue:blue];
27156 # if (alpha <= 0.9999) {
27157 # [result setAlpha:floatWrapperWithValue(alpha)];
27158 # }
27159 # [result autorelease];
27160 # return result;
27161 # }
27162 # // ...
27163 #
27164 # Example (JavaScript):
27165 #
27166 # // ...
27167 #
27168 # var protoToCssColor = function(rgb_color) {
27169 # var redFrac = rgb_color.red || 0.0;
27170 # var greenFrac = rgb_color.green || 0.0;
27171 # var blueFrac = rgb_color.blue || 0.0;
27172 # var red = Math.floor(redFrac * 255);
27173 # var green = Math.floor(greenFrac * 255);
27174 # var blue = Math.floor(blueFrac * 255);
27175 #
27176 # if (!('alpha' in rgb_color)) {
27177 # return rgbToCssColor_(red, green, blue);
27178 # }
27179 #
27180 # var alphaFrac = rgb_color.alpha.value || 0.0;
27181 # var rgbParams = [red, green, blue].join(',');
27182 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27183 # };
27184 #
27185 # var rgbToCssColor_ = function(red, green, blue) {
27186 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27187 # var hexString = rgbNumber.toString(16);
27188 # var missingZeros = 6 - hexString.length;
27189 # var resultBuilder = ['#'];
27190 # for (var i = 0; i < missingZeros; i++) {
27191 # resultBuilder.push('0');
27192 # }
27193 # resultBuilder.push(hexString);
27194 # return resultBuilder.join('');
27195 # };
27196 #
27197 # // ...
27198 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27199 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27200 # the final pixel color is defined by the equation:
27201 #
27202 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27203 #
27204 # This means that a value of 1.0 corresponds to a solid color, whereas
27205 # a value of 0.0 corresponds to a completely transparent color. This
27206 # uses a wrapper message rather than a simple float scalar so that it is
27207 # possible to distinguish between a default value and the value being unset.
27208 # If omitted, this color object is to be rendered as a solid color
27209 # (as if the alpha value had been explicitly given with a value of 1.0).
27210 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27211 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27212 },
27213 "type": "A String", # How the value should be interpreted.
27214 "value": "A String", # The value this interpolation point uses. May be a formula.
27215 # Unused if type is MIN or
27216 # MAX.
27217 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027218 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027219 # These pin the gradient color scale according to the color,
27220 # type and value chosen.
27221 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
27222 # for simplicity of conversion to/from color representations in various
27223 # languages over compactness; for example, the fields of this representation
27224 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27225 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27226 # method in iOS; and, with just a little work, it can be easily formatted into
27227 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27228 #
27229 # Example (Java):
27230 #
27231 # import com.google.type.Color;
27232 #
27233 # // ...
27234 # public static java.awt.Color fromProto(Color protocolor) {
27235 # float alpha = protocolor.hasAlpha()
27236 # ? protocolor.getAlpha().getValue()
27237 # : 1.0;
27238 #
27239 # return new java.awt.Color(
27240 # protocolor.getRed(),
27241 # protocolor.getGreen(),
27242 # protocolor.getBlue(),
27243 # alpha);
27244 # }
27245 #
27246 # public static Color toProto(java.awt.Color color) {
27247 # float red = (float) color.getRed();
27248 # float green = (float) color.getGreen();
27249 # float blue = (float) color.getBlue();
27250 # float denominator = 255.0;
27251 # Color.Builder resultBuilder =
27252 # Color
27253 # .newBuilder()
27254 # .setRed(red / denominator)
27255 # .setGreen(green / denominator)
27256 # .setBlue(blue / denominator);
27257 # int alpha = color.getAlpha();
27258 # if (alpha != 255) {
27259 # result.setAlpha(
27260 # FloatValue
27261 # .newBuilder()
27262 # .setValue(((float) alpha) / denominator)
27263 # .build());
27264 # }
27265 # return resultBuilder.build();
27266 # }
27267 # // ...
27268 #
27269 # Example (iOS / Obj-C):
27270 #
27271 # // ...
27272 # static UIColor* fromProto(Color* protocolor) {
27273 # float red = [protocolor red];
27274 # float green = [protocolor green];
27275 # float blue = [protocolor blue];
27276 # FloatValue* alpha_wrapper = [protocolor alpha];
27277 # float alpha = 1.0;
27278 # if (alpha_wrapper != nil) {
27279 # alpha = [alpha_wrapper value];
27280 # }
27281 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27282 # }
27283 #
27284 # static Color* toProto(UIColor* color) {
27285 # CGFloat red, green, blue, alpha;
27286 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27287 # return nil;
27288 # }
27289 # Color* result = [Color alloc] init];
27290 # [result setRed:red];
27291 # [result setGreen:green];
27292 # [result setBlue:blue];
27293 # if (alpha <= 0.9999) {
27294 # [result setAlpha:floatWrapperWithValue(alpha)];
27295 # }
27296 # [result autorelease];
27297 # return result;
27298 # }
27299 # // ...
27300 #
27301 # Example (JavaScript):
27302 #
27303 # // ...
27304 #
27305 # var protoToCssColor = function(rgb_color) {
27306 # var redFrac = rgb_color.red || 0.0;
27307 # var greenFrac = rgb_color.green || 0.0;
27308 # var blueFrac = rgb_color.blue || 0.0;
27309 # var red = Math.floor(redFrac * 255);
27310 # var green = Math.floor(greenFrac * 255);
27311 # var blue = Math.floor(blueFrac * 255);
27312 #
27313 # if (!('alpha' in rgb_color)) {
27314 # return rgbToCssColor_(red, green, blue);
27315 # }
27316 #
27317 # var alphaFrac = rgb_color.alpha.value || 0.0;
27318 # var rgbParams = [red, green, blue].join(',');
27319 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27320 # };
27321 #
27322 # var rgbToCssColor_ = function(red, green, blue) {
27323 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27324 # var hexString = rgbNumber.toString(16);
27325 # var missingZeros = 6 - hexString.length;
27326 # var resultBuilder = ['#'];
27327 # for (var i = 0; i < missingZeros; i++) {
27328 # resultBuilder.push('0');
27329 # }
27330 # resultBuilder.push(hexString);
27331 # return resultBuilder.join('');
27332 # };
27333 #
27334 # // ...
27335 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27336 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27337 # the final pixel color is defined by the equation:
27338 #
27339 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27340 #
27341 # This means that a value of 1.0 corresponds to a solid color, whereas
27342 # a value of 0.0 corresponds to a completely transparent color. This
27343 # uses a wrapper message rather than a simple float scalar so that it is
27344 # possible to distinguish between a default value and the value being unset.
27345 # If omitted, this color object is to be rendered as a solid color
27346 # (as if the alpha value had been explicitly given with a value of 1.0).
27347 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27348 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27349 },
27350 "type": "A String", # How the value should be interpreted.
27351 "value": "A String", # The value this interpolation point uses. May be a formula.
27352 # Unused if type is MIN or
27353 # MAX.
27354 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070027355 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027356 # These pin the gradient color scale according to the color,
27357 # type and value chosen.
27358 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
27359 # for simplicity of conversion to/from color representations in various
27360 # languages over compactness; for example, the fields of this representation
27361 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27362 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27363 # method in iOS; and, with just a little work, it can be easily formatted into
27364 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27365 #
27366 # Example (Java):
27367 #
27368 # import com.google.type.Color;
27369 #
27370 # // ...
27371 # public static java.awt.Color fromProto(Color protocolor) {
27372 # float alpha = protocolor.hasAlpha()
27373 # ? protocolor.getAlpha().getValue()
27374 # : 1.0;
27375 #
27376 # return new java.awt.Color(
27377 # protocolor.getRed(),
27378 # protocolor.getGreen(),
27379 # protocolor.getBlue(),
27380 # alpha);
27381 # }
27382 #
27383 # public static Color toProto(java.awt.Color color) {
27384 # float red = (float) color.getRed();
27385 # float green = (float) color.getGreen();
27386 # float blue = (float) color.getBlue();
27387 # float denominator = 255.0;
27388 # Color.Builder resultBuilder =
27389 # Color
27390 # .newBuilder()
27391 # .setRed(red / denominator)
27392 # .setGreen(green / denominator)
27393 # .setBlue(blue / denominator);
27394 # int alpha = color.getAlpha();
27395 # if (alpha != 255) {
27396 # result.setAlpha(
27397 # FloatValue
27398 # .newBuilder()
27399 # .setValue(((float) alpha) / denominator)
27400 # .build());
27401 # }
27402 # return resultBuilder.build();
27403 # }
27404 # // ...
27405 #
27406 # Example (iOS / Obj-C):
27407 #
27408 # // ...
27409 # static UIColor* fromProto(Color* protocolor) {
27410 # float red = [protocolor red];
27411 # float green = [protocolor green];
27412 # float blue = [protocolor blue];
27413 # FloatValue* alpha_wrapper = [protocolor alpha];
27414 # float alpha = 1.0;
27415 # if (alpha_wrapper != nil) {
27416 # alpha = [alpha_wrapper value];
27417 # }
27418 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27419 # }
27420 #
27421 # static Color* toProto(UIColor* color) {
27422 # CGFloat red, green, blue, alpha;
27423 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27424 # return nil;
27425 # }
27426 # Color* result = [Color alloc] init];
27427 # [result setRed:red];
27428 # [result setGreen:green];
27429 # [result setBlue:blue];
27430 # if (alpha <= 0.9999) {
27431 # [result setAlpha:floatWrapperWithValue(alpha)];
27432 # }
27433 # [result autorelease];
27434 # return result;
27435 # }
27436 # // ...
27437 #
27438 # Example (JavaScript):
27439 #
27440 # // ...
27441 #
27442 # var protoToCssColor = function(rgb_color) {
27443 # var redFrac = rgb_color.red || 0.0;
27444 # var greenFrac = rgb_color.green || 0.0;
27445 # var blueFrac = rgb_color.blue || 0.0;
27446 # var red = Math.floor(redFrac * 255);
27447 # var green = Math.floor(greenFrac * 255);
27448 # var blue = Math.floor(blueFrac * 255);
27449 #
27450 # if (!('alpha' in rgb_color)) {
27451 # return rgbToCssColor_(red, green, blue);
27452 # }
27453 #
27454 # var alphaFrac = rgb_color.alpha.value || 0.0;
27455 # var rgbParams = [red, green, blue].join(',');
27456 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27457 # };
27458 #
27459 # var rgbToCssColor_ = function(red, green, blue) {
27460 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27461 # var hexString = rgbNumber.toString(16);
27462 # var missingZeros = 6 - hexString.length;
27463 # var resultBuilder = ['#'];
27464 # for (var i = 0; i < missingZeros; i++) {
27465 # resultBuilder.push('0');
27466 # }
27467 # resultBuilder.push(hexString);
27468 # return resultBuilder.join('');
27469 # };
27470 #
27471 # // ...
27472 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27473 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27474 # the final pixel color is defined by the equation:
27475 #
27476 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27477 #
27478 # This means that a value of 1.0 corresponds to a solid color, whereas
27479 # a value of 0.0 corresponds to a completely transparent color. This
27480 # uses a wrapper message rather than a simple float scalar so that it is
27481 # possible to distinguish between a default value and the value being unset.
27482 # If omitted, this color object is to be rendered as a solid color
27483 # (as if the alpha value had been explicitly given with a value of 1.0).
27484 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27485 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27486 },
27487 "type": "A String", # How the value should be interpreted.
27488 "value": "A String", # The value this interpolation point uses. May be a formula.
27489 # Unused if type is MIN or
27490 # MAX.
27491 },
27492 },
27493 },
27494 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080027495 "addBanding": { # The result of adding a banded range. # A reply from adding a banded range.
27496 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range that was added.
27497 "range": { # A range on a sheet. # The range over which these properties are applied.
27498 # All indexes are zero-based.
27499 # Indexes are half open, e.g the start index is inclusive
27500 # and the end index is exclusive -- [start_index, end_index).
27501 # Missing indexes indicate the range is unbounded on that side.
27502 #
27503 # For example, if `"Sheet1"` is sheet ID 0, then:
27504 #
27505 # `Sheet1!A1:A1 == sheet_id: 0,
27506 # start_row_index: 0, end_row_index: 1,
27507 # start_column_index: 0, end_column_index: 1`
27508 #
27509 # `Sheet1!A3:B4 == sheet_id: 0,
27510 # start_row_index: 2, end_row_index: 4,
27511 # start_column_index: 0, end_column_index: 2`
27512 #
27513 # `Sheet1!A:B == sheet_id: 0,
27514 # start_column_index: 0, end_column_index: 2`
27515 #
27516 # `Sheet1!A5:B == sheet_id: 0,
27517 # start_row_index: 4,
27518 # start_column_index: 0, end_column_index: 2`
27519 #
27520 # `Sheet1 == sheet_id:0`
27521 #
27522 # The start index must always be less than or equal to the end index.
27523 # If the start index equals the end index, then the range is empty.
27524 # Empty ranges are typically not meaningful and are usually rendered in the
27525 # UI as `#REF!`.
27526 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070027527 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080027528 "sheetId": 42, # The sheet this range is on.
27529 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070027530 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080027531 },
27532 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
27533 # by-column basis throughout all the columns in the range. At least one of
27534 # row_properties or column_properties must be specified.
27535 # BandedRange.row_properties and BandedRange.column_properties are
27536 # set, the fill colors are applied to cells according to the following rules:
27537 #
27538 # * header_color and footer_color take priority over band colors.
27539 # * first_band_color takes priority over second_band_color.
27540 # * row_properties takes priority over column_properties.
27541 #
27542 # For example, the first row color takes priority over the first column
27543 # color, but the first column color takes priority over the second row color.
27544 # Similarly, the row header takes priority over the column header in the
27545 # top left cell, but the column header takes priority over the first row
27546 # color if the row header is not set.
27547 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
27548 # for simplicity of conversion to/from color representations in various
27549 # languages over compactness; for example, the fields of this representation
27550 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27551 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27552 # method in iOS; and, with just a little work, it can be easily formatted into
27553 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27554 #
27555 # Example (Java):
27556 #
27557 # import com.google.type.Color;
27558 #
27559 # // ...
27560 # public static java.awt.Color fromProto(Color protocolor) {
27561 # float alpha = protocolor.hasAlpha()
27562 # ? protocolor.getAlpha().getValue()
27563 # : 1.0;
27564 #
27565 # return new java.awt.Color(
27566 # protocolor.getRed(),
27567 # protocolor.getGreen(),
27568 # protocolor.getBlue(),
27569 # alpha);
27570 # }
27571 #
27572 # public static Color toProto(java.awt.Color color) {
27573 # float red = (float) color.getRed();
27574 # float green = (float) color.getGreen();
27575 # float blue = (float) color.getBlue();
27576 # float denominator = 255.0;
27577 # Color.Builder resultBuilder =
27578 # Color
27579 # .newBuilder()
27580 # .setRed(red / denominator)
27581 # .setGreen(green / denominator)
27582 # .setBlue(blue / denominator);
27583 # int alpha = color.getAlpha();
27584 # if (alpha != 255) {
27585 # result.setAlpha(
27586 # FloatValue
27587 # .newBuilder()
27588 # .setValue(((float) alpha) / denominator)
27589 # .build());
27590 # }
27591 # return resultBuilder.build();
27592 # }
27593 # // ...
27594 #
27595 # Example (iOS / Obj-C):
27596 #
27597 # // ...
27598 # static UIColor* fromProto(Color* protocolor) {
27599 # float red = [protocolor red];
27600 # float green = [protocolor green];
27601 # float blue = [protocolor blue];
27602 # FloatValue* alpha_wrapper = [protocolor alpha];
27603 # float alpha = 1.0;
27604 # if (alpha_wrapper != nil) {
27605 # alpha = [alpha_wrapper value];
27606 # }
27607 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27608 # }
27609 #
27610 # static Color* toProto(UIColor* color) {
27611 # CGFloat red, green, blue, alpha;
27612 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27613 # return nil;
27614 # }
27615 # Color* result = [Color alloc] init];
27616 # [result setRed:red];
27617 # [result setGreen:green];
27618 # [result setBlue:blue];
27619 # if (alpha <= 0.9999) {
27620 # [result setAlpha:floatWrapperWithValue(alpha)];
27621 # }
27622 # [result autorelease];
27623 # return result;
27624 # }
27625 # // ...
27626 #
27627 # Example (JavaScript):
27628 #
27629 # // ...
27630 #
27631 # var protoToCssColor = function(rgb_color) {
27632 # var redFrac = rgb_color.red || 0.0;
27633 # var greenFrac = rgb_color.green || 0.0;
27634 # var blueFrac = rgb_color.blue || 0.0;
27635 # var red = Math.floor(redFrac * 255);
27636 # var green = Math.floor(greenFrac * 255);
27637 # var blue = Math.floor(blueFrac * 255);
27638 #
27639 # if (!('alpha' in rgb_color)) {
27640 # return rgbToCssColor_(red, green, blue);
27641 # }
27642 #
27643 # var alphaFrac = rgb_color.alpha.value || 0.0;
27644 # var rgbParams = [red, green, blue].join(',');
27645 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27646 # };
27647 #
27648 # var rgbToCssColor_ = function(red, green, blue) {
27649 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27650 # var hexString = rgbNumber.toString(16);
27651 # var missingZeros = 6 - hexString.length;
27652 # var resultBuilder = ['#'];
27653 # for (var i = 0; i < missingZeros; i++) {
27654 # resultBuilder.push('0');
27655 # }
27656 # resultBuilder.push(hexString);
27657 # return resultBuilder.join('');
27658 # };
27659 #
27660 # // ...
27661 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27662 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27663 # the final pixel color is defined by the equation:
27664 #
27665 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27666 #
27667 # This means that a value of 1.0 corresponds to a solid color, whereas
27668 # a value of 0.0 corresponds to a completely transparent color. This
27669 # uses a wrapper message rather than a simple float scalar so that it is
27670 # possible to distinguish between a default value and the value being unset.
27671 # If omitted, this color object is to be rendered as a solid color
27672 # (as if the alpha value had been explicitly given with a value of 1.0).
27673 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27674 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27675 },
27676 "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
27677 # row or column will be filled with this color and the colors will
27678 # alternate between first_band_color and second_band_color starting
27679 # from the second row or column. Otherwise, the first row or column will be
27680 # filled with first_band_color and the colors will proceed to alternate
27681 # as they normally would.
27682 # for simplicity of conversion to/from color representations in various
27683 # languages over compactness; for example, the fields of this representation
27684 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27685 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27686 # method in iOS; and, with just a little work, it can be easily formatted into
27687 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27688 #
27689 # Example (Java):
27690 #
27691 # import com.google.type.Color;
27692 #
27693 # // ...
27694 # public static java.awt.Color fromProto(Color protocolor) {
27695 # float alpha = protocolor.hasAlpha()
27696 # ? protocolor.getAlpha().getValue()
27697 # : 1.0;
27698 #
27699 # return new java.awt.Color(
27700 # protocolor.getRed(),
27701 # protocolor.getGreen(),
27702 # protocolor.getBlue(),
27703 # alpha);
27704 # }
27705 #
27706 # public static Color toProto(java.awt.Color color) {
27707 # float red = (float) color.getRed();
27708 # float green = (float) color.getGreen();
27709 # float blue = (float) color.getBlue();
27710 # float denominator = 255.0;
27711 # Color.Builder resultBuilder =
27712 # Color
27713 # .newBuilder()
27714 # .setRed(red / denominator)
27715 # .setGreen(green / denominator)
27716 # .setBlue(blue / denominator);
27717 # int alpha = color.getAlpha();
27718 # if (alpha != 255) {
27719 # result.setAlpha(
27720 # FloatValue
27721 # .newBuilder()
27722 # .setValue(((float) alpha) / denominator)
27723 # .build());
27724 # }
27725 # return resultBuilder.build();
27726 # }
27727 # // ...
27728 #
27729 # Example (iOS / Obj-C):
27730 #
27731 # // ...
27732 # static UIColor* fromProto(Color* protocolor) {
27733 # float red = [protocolor red];
27734 # float green = [protocolor green];
27735 # float blue = [protocolor blue];
27736 # FloatValue* alpha_wrapper = [protocolor alpha];
27737 # float alpha = 1.0;
27738 # if (alpha_wrapper != nil) {
27739 # alpha = [alpha_wrapper value];
27740 # }
27741 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27742 # }
27743 #
27744 # static Color* toProto(UIColor* color) {
27745 # CGFloat red, green, blue, alpha;
27746 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27747 # return nil;
27748 # }
27749 # Color* result = [Color alloc] init];
27750 # [result setRed:red];
27751 # [result setGreen:green];
27752 # [result setBlue:blue];
27753 # if (alpha <= 0.9999) {
27754 # [result setAlpha:floatWrapperWithValue(alpha)];
27755 # }
27756 # [result autorelease];
27757 # return result;
27758 # }
27759 # // ...
27760 #
27761 # Example (JavaScript):
27762 #
27763 # // ...
27764 #
27765 # var protoToCssColor = function(rgb_color) {
27766 # var redFrac = rgb_color.red || 0.0;
27767 # var greenFrac = rgb_color.green || 0.0;
27768 # var blueFrac = rgb_color.blue || 0.0;
27769 # var red = Math.floor(redFrac * 255);
27770 # var green = Math.floor(greenFrac * 255);
27771 # var blue = Math.floor(blueFrac * 255);
27772 #
27773 # if (!('alpha' in rgb_color)) {
27774 # return rgbToCssColor_(red, green, blue);
27775 # }
27776 #
27777 # var alphaFrac = rgb_color.alpha.value || 0.0;
27778 # var rgbParams = [red, green, blue].join(',');
27779 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27780 # };
27781 #
27782 # var rgbToCssColor_ = function(red, green, blue) {
27783 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27784 # var hexString = rgbNumber.toString(16);
27785 # var missingZeros = 6 - hexString.length;
27786 # var resultBuilder = ['#'];
27787 # for (var i = 0; i < missingZeros; i++) {
27788 # resultBuilder.push('0');
27789 # }
27790 # resultBuilder.push(hexString);
27791 # return resultBuilder.join('');
27792 # };
27793 #
27794 # // ...
27795 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27796 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27797 # the final pixel color is defined by the equation:
27798 #
27799 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27800 #
27801 # This means that a value of 1.0 corresponds to a solid color, whereas
27802 # a value of 0.0 corresponds to a completely transparent color. This
27803 # uses a wrapper message rather than a simple float scalar so that it is
27804 # possible to distinguish between a default value and the value being unset.
27805 # If omitted, this color object is to be rendered as a solid color
27806 # (as if the alpha value had been explicitly given with a value of 1.0).
27807 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27808 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27809 },
27810 "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
27811 # row or column will be filled with either first_band_color or
27812 # second_band_color, depending on the color of the previous row or
27813 # column.
27814 # for simplicity of conversion to/from color representations in various
27815 # languages over compactness; for example, the fields of this representation
27816 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27817 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27818 # method in iOS; and, with just a little work, it can be easily formatted into
27819 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27820 #
27821 # Example (Java):
27822 #
27823 # import com.google.type.Color;
27824 #
27825 # // ...
27826 # public static java.awt.Color fromProto(Color protocolor) {
27827 # float alpha = protocolor.hasAlpha()
27828 # ? protocolor.getAlpha().getValue()
27829 # : 1.0;
27830 #
27831 # return new java.awt.Color(
27832 # protocolor.getRed(),
27833 # protocolor.getGreen(),
27834 # protocolor.getBlue(),
27835 # alpha);
27836 # }
27837 #
27838 # public static Color toProto(java.awt.Color color) {
27839 # float red = (float) color.getRed();
27840 # float green = (float) color.getGreen();
27841 # float blue = (float) color.getBlue();
27842 # float denominator = 255.0;
27843 # Color.Builder resultBuilder =
27844 # Color
27845 # .newBuilder()
27846 # .setRed(red / denominator)
27847 # .setGreen(green / denominator)
27848 # .setBlue(blue / denominator);
27849 # int alpha = color.getAlpha();
27850 # if (alpha != 255) {
27851 # result.setAlpha(
27852 # FloatValue
27853 # .newBuilder()
27854 # .setValue(((float) alpha) / denominator)
27855 # .build());
27856 # }
27857 # return resultBuilder.build();
27858 # }
27859 # // ...
27860 #
27861 # Example (iOS / Obj-C):
27862 #
27863 # // ...
27864 # static UIColor* fromProto(Color* protocolor) {
27865 # float red = [protocolor red];
27866 # float green = [protocolor green];
27867 # float blue = [protocolor blue];
27868 # FloatValue* alpha_wrapper = [protocolor alpha];
27869 # float alpha = 1.0;
27870 # if (alpha_wrapper != nil) {
27871 # alpha = [alpha_wrapper value];
27872 # }
27873 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
27874 # }
27875 #
27876 # static Color* toProto(UIColor* color) {
27877 # CGFloat red, green, blue, alpha;
27878 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
27879 # return nil;
27880 # }
27881 # Color* result = [Color alloc] init];
27882 # [result setRed:red];
27883 # [result setGreen:green];
27884 # [result setBlue:blue];
27885 # if (alpha <= 0.9999) {
27886 # [result setAlpha:floatWrapperWithValue(alpha)];
27887 # }
27888 # [result autorelease];
27889 # return result;
27890 # }
27891 # // ...
27892 #
27893 # Example (JavaScript):
27894 #
27895 # // ...
27896 #
27897 # var protoToCssColor = function(rgb_color) {
27898 # var redFrac = rgb_color.red || 0.0;
27899 # var greenFrac = rgb_color.green || 0.0;
27900 # var blueFrac = rgb_color.blue || 0.0;
27901 # var red = Math.floor(redFrac * 255);
27902 # var green = Math.floor(greenFrac * 255);
27903 # var blue = Math.floor(blueFrac * 255);
27904 #
27905 # if (!('alpha' in rgb_color)) {
27906 # return rgbToCssColor_(red, green, blue);
27907 # }
27908 #
27909 # var alphaFrac = rgb_color.alpha.value || 0.0;
27910 # var rgbParams = [red, green, blue].join(',');
27911 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27912 # };
27913 #
27914 # var rgbToCssColor_ = function(red, green, blue) {
27915 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27916 # var hexString = rgbNumber.toString(16);
27917 # var missingZeros = 6 - hexString.length;
27918 # var resultBuilder = ['#'];
27919 # for (var i = 0; i < missingZeros; i++) {
27920 # resultBuilder.push('0');
27921 # }
27922 # resultBuilder.push(hexString);
27923 # return resultBuilder.join('');
27924 # };
27925 #
27926 # // ...
27927 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27928 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27929 # the final pixel color is defined by the equation:
27930 #
27931 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27932 #
27933 # This means that a value of 1.0 corresponds to a solid color, whereas
27934 # a value of 0.0 corresponds to a completely transparent color. This
27935 # uses a wrapper message rather than a simple float scalar so that it is
27936 # possible to distinguish between a default value and the value being unset.
27937 # If omitted, this color object is to be rendered as a solid color
27938 # (as if the alpha value had been explicitly given with a value of 1.0).
27939 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27940 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27941 },
27942 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
27943 # for simplicity of conversion to/from color representations in various
27944 # languages over compactness; for example, the fields of this representation
27945 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
27946 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
27947 # method in iOS; and, with just a little work, it can be easily formatted into
27948 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
27949 #
27950 # Example (Java):
27951 #
27952 # import com.google.type.Color;
27953 #
27954 # // ...
27955 # public static java.awt.Color fromProto(Color protocolor) {
27956 # float alpha = protocolor.hasAlpha()
27957 # ? protocolor.getAlpha().getValue()
27958 # : 1.0;
27959 #
27960 # return new java.awt.Color(
27961 # protocolor.getRed(),
27962 # protocolor.getGreen(),
27963 # protocolor.getBlue(),
27964 # alpha);
27965 # }
27966 #
27967 # public static Color toProto(java.awt.Color color) {
27968 # float red = (float) color.getRed();
27969 # float green = (float) color.getGreen();
27970 # float blue = (float) color.getBlue();
27971 # float denominator = 255.0;
27972 # Color.Builder resultBuilder =
27973 # Color
27974 # .newBuilder()
27975 # .setRed(red / denominator)
27976 # .setGreen(green / denominator)
27977 # .setBlue(blue / denominator);
27978 # int alpha = color.getAlpha();
27979 # if (alpha != 255) {
27980 # result.setAlpha(
27981 # FloatValue
27982 # .newBuilder()
27983 # .setValue(((float) alpha) / denominator)
27984 # .build());
27985 # }
27986 # return resultBuilder.build();
27987 # }
27988 # // ...
27989 #
27990 # Example (iOS / Obj-C):
27991 #
27992 # // ...
27993 # static UIColor* fromProto(Color* protocolor) {
27994 # float red = [protocolor red];
27995 # float green = [protocolor green];
27996 # float blue = [protocolor blue];
27997 # FloatValue* alpha_wrapper = [protocolor alpha];
27998 # float alpha = 1.0;
27999 # if (alpha_wrapper != nil) {
28000 # alpha = [alpha_wrapper value];
28001 # }
28002 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28003 # }
28004 #
28005 # static Color* toProto(UIColor* color) {
28006 # CGFloat red, green, blue, alpha;
28007 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28008 # return nil;
28009 # }
28010 # Color* result = [Color alloc] init];
28011 # [result setRed:red];
28012 # [result setGreen:green];
28013 # [result setBlue:blue];
28014 # if (alpha <= 0.9999) {
28015 # [result setAlpha:floatWrapperWithValue(alpha)];
28016 # }
28017 # [result autorelease];
28018 # return result;
28019 # }
28020 # // ...
28021 #
28022 # Example (JavaScript):
28023 #
28024 # // ...
28025 #
28026 # var protoToCssColor = function(rgb_color) {
28027 # var redFrac = rgb_color.red || 0.0;
28028 # var greenFrac = rgb_color.green || 0.0;
28029 # var blueFrac = rgb_color.blue || 0.0;
28030 # var red = Math.floor(redFrac * 255);
28031 # var green = Math.floor(greenFrac * 255);
28032 # var blue = Math.floor(blueFrac * 255);
28033 #
28034 # if (!('alpha' in rgb_color)) {
28035 # return rgbToCssColor_(red, green, blue);
28036 # }
28037 #
28038 # var alphaFrac = rgb_color.alpha.value || 0.0;
28039 # var rgbParams = [red, green, blue].join(',');
28040 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28041 # };
28042 #
28043 # var rgbToCssColor_ = function(red, green, blue) {
28044 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28045 # var hexString = rgbNumber.toString(16);
28046 # var missingZeros = 6 - hexString.length;
28047 # var resultBuilder = ['#'];
28048 # for (var i = 0; i < missingZeros; i++) {
28049 # resultBuilder.push('0');
28050 # }
28051 # resultBuilder.push(hexString);
28052 # return resultBuilder.join('');
28053 # };
28054 #
28055 # // ...
28056 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28057 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28058 # the final pixel color is defined by the equation:
28059 #
28060 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28061 #
28062 # This means that a value of 1.0 corresponds to a solid color, whereas
28063 # a value of 0.0 corresponds to a completely transparent color. This
28064 # uses a wrapper message rather than a simple float scalar so that it is
28065 # possible to distinguish between a default value and the value being unset.
28066 # If omitted, this color object is to be rendered as a solid color
28067 # (as if the alpha value had been explicitly given with a value of 1.0).
28068 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28069 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28070 },
28071 },
28072 "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
28073 # basis throughout all the rows in the range. At least one of
28074 # row_properties or column_properties must be specified.
28075 # BandedRange.row_properties and BandedRange.column_properties are
28076 # set, the fill colors are applied to cells according to the following rules:
28077 #
28078 # * header_color and footer_color take priority over band colors.
28079 # * first_band_color takes priority over second_band_color.
28080 # * row_properties takes priority over column_properties.
28081 #
28082 # For example, the first row color takes priority over the first column
28083 # color, but the first column color takes priority over the second row color.
28084 # Similarly, the row header takes priority over the column header in the
28085 # top left cell, but the column header takes priority over the first row
28086 # color if the row header is not set.
28087 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
28088 # for simplicity of conversion to/from color representations in various
28089 # languages over compactness; for example, the fields of this representation
28090 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28091 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28092 # method in iOS; and, with just a little work, it can be easily formatted into
28093 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28094 #
28095 # Example (Java):
28096 #
28097 # import com.google.type.Color;
28098 #
28099 # // ...
28100 # public static java.awt.Color fromProto(Color protocolor) {
28101 # float alpha = protocolor.hasAlpha()
28102 # ? protocolor.getAlpha().getValue()
28103 # : 1.0;
28104 #
28105 # return new java.awt.Color(
28106 # protocolor.getRed(),
28107 # protocolor.getGreen(),
28108 # protocolor.getBlue(),
28109 # alpha);
28110 # }
28111 #
28112 # public static Color toProto(java.awt.Color color) {
28113 # float red = (float) color.getRed();
28114 # float green = (float) color.getGreen();
28115 # float blue = (float) color.getBlue();
28116 # float denominator = 255.0;
28117 # Color.Builder resultBuilder =
28118 # Color
28119 # .newBuilder()
28120 # .setRed(red / denominator)
28121 # .setGreen(green / denominator)
28122 # .setBlue(blue / denominator);
28123 # int alpha = color.getAlpha();
28124 # if (alpha != 255) {
28125 # result.setAlpha(
28126 # FloatValue
28127 # .newBuilder()
28128 # .setValue(((float) alpha) / denominator)
28129 # .build());
28130 # }
28131 # return resultBuilder.build();
28132 # }
28133 # // ...
28134 #
28135 # Example (iOS / Obj-C):
28136 #
28137 # // ...
28138 # static UIColor* fromProto(Color* protocolor) {
28139 # float red = [protocolor red];
28140 # float green = [protocolor green];
28141 # float blue = [protocolor blue];
28142 # FloatValue* alpha_wrapper = [protocolor alpha];
28143 # float alpha = 1.0;
28144 # if (alpha_wrapper != nil) {
28145 # alpha = [alpha_wrapper value];
28146 # }
28147 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28148 # }
28149 #
28150 # static Color* toProto(UIColor* color) {
28151 # CGFloat red, green, blue, alpha;
28152 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28153 # return nil;
28154 # }
28155 # Color* result = [Color alloc] init];
28156 # [result setRed:red];
28157 # [result setGreen:green];
28158 # [result setBlue:blue];
28159 # if (alpha <= 0.9999) {
28160 # [result setAlpha:floatWrapperWithValue(alpha)];
28161 # }
28162 # [result autorelease];
28163 # return result;
28164 # }
28165 # // ...
28166 #
28167 # Example (JavaScript):
28168 #
28169 # // ...
28170 #
28171 # var protoToCssColor = function(rgb_color) {
28172 # var redFrac = rgb_color.red || 0.0;
28173 # var greenFrac = rgb_color.green || 0.0;
28174 # var blueFrac = rgb_color.blue || 0.0;
28175 # var red = Math.floor(redFrac * 255);
28176 # var green = Math.floor(greenFrac * 255);
28177 # var blue = Math.floor(blueFrac * 255);
28178 #
28179 # if (!('alpha' in rgb_color)) {
28180 # return rgbToCssColor_(red, green, blue);
28181 # }
28182 #
28183 # var alphaFrac = rgb_color.alpha.value || 0.0;
28184 # var rgbParams = [red, green, blue].join(',');
28185 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28186 # };
28187 #
28188 # var rgbToCssColor_ = function(red, green, blue) {
28189 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28190 # var hexString = rgbNumber.toString(16);
28191 # var missingZeros = 6 - hexString.length;
28192 # var resultBuilder = ['#'];
28193 # for (var i = 0; i < missingZeros; i++) {
28194 # resultBuilder.push('0');
28195 # }
28196 # resultBuilder.push(hexString);
28197 # return resultBuilder.join('');
28198 # };
28199 #
28200 # // ...
28201 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28202 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28203 # the final pixel color is defined by the equation:
28204 #
28205 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28206 #
28207 # This means that a value of 1.0 corresponds to a solid color, whereas
28208 # a value of 0.0 corresponds to a completely transparent color. This
28209 # uses a wrapper message rather than a simple float scalar so that it is
28210 # possible to distinguish between a default value and the value being unset.
28211 # If omitted, this color object is to be rendered as a solid color
28212 # (as if the alpha value had been explicitly given with a value of 1.0).
28213 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28214 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28215 },
28216 "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
28217 # row or column will be filled with this color and the colors will
28218 # alternate between first_band_color and second_band_color starting
28219 # from the second row or column. Otherwise, the first row or column will be
28220 # filled with first_band_color and the colors will proceed to alternate
28221 # as they normally would.
28222 # for simplicity of conversion to/from color representations in various
28223 # languages over compactness; for example, the fields of this representation
28224 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28225 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28226 # method in iOS; and, with just a little work, it can be easily formatted into
28227 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28228 #
28229 # Example (Java):
28230 #
28231 # import com.google.type.Color;
28232 #
28233 # // ...
28234 # public static java.awt.Color fromProto(Color protocolor) {
28235 # float alpha = protocolor.hasAlpha()
28236 # ? protocolor.getAlpha().getValue()
28237 # : 1.0;
28238 #
28239 # return new java.awt.Color(
28240 # protocolor.getRed(),
28241 # protocolor.getGreen(),
28242 # protocolor.getBlue(),
28243 # alpha);
28244 # }
28245 #
28246 # public static Color toProto(java.awt.Color color) {
28247 # float red = (float) color.getRed();
28248 # float green = (float) color.getGreen();
28249 # float blue = (float) color.getBlue();
28250 # float denominator = 255.0;
28251 # Color.Builder resultBuilder =
28252 # Color
28253 # .newBuilder()
28254 # .setRed(red / denominator)
28255 # .setGreen(green / denominator)
28256 # .setBlue(blue / denominator);
28257 # int alpha = color.getAlpha();
28258 # if (alpha != 255) {
28259 # result.setAlpha(
28260 # FloatValue
28261 # .newBuilder()
28262 # .setValue(((float) alpha) / denominator)
28263 # .build());
28264 # }
28265 # return resultBuilder.build();
28266 # }
28267 # // ...
28268 #
28269 # Example (iOS / Obj-C):
28270 #
28271 # // ...
28272 # static UIColor* fromProto(Color* protocolor) {
28273 # float red = [protocolor red];
28274 # float green = [protocolor green];
28275 # float blue = [protocolor blue];
28276 # FloatValue* alpha_wrapper = [protocolor alpha];
28277 # float alpha = 1.0;
28278 # if (alpha_wrapper != nil) {
28279 # alpha = [alpha_wrapper value];
28280 # }
28281 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28282 # }
28283 #
28284 # static Color* toProto(UIColor* color) {
28285 # CGFloat red, green, blue, alpha;
28286 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28287 # return nil;
28288 # }
28289 # Color* result = [Color alloc] init];
28290 # [result setRed:red];
28291 # [result setGreen:green];
28292 # [result setBlue:blue];
28293 # if (alpha <= 0.9999) {
28294 # [result setAlpha:floatWrapperWithValue(alpha)];
28295 # }
28296 # [result autorelease];
28297 # return result;
28298 # }
28299 # // ...
28300 #
28301 # Example (JavaScript):
28302 #
28303 # // ...
28304 #
28305 # var protoToCssColor = function(rgb_color) {
28306 # var redFrac = rgb_color.red || 0.0;
28307 # var greenFrac = rgb_color.green || 0.0;
28308 # var blueFrac = rgb_color.blue || 0.0;
28309 # var red = Math.floor(redFrac * 255);
28310 # var green = Math.floor(greenFrac * 255);
28311 # var blue = Math.floor(blueFrac * 255);
28312 #
28313 # if (!('alpha' in rgb_color)) {
28314 # return rgbToCssColor_(red, green, blue);
28315 # }
28316 #
28317 # var alphaFrac = rgb_color.alpha.value || 0.0;
28318 # var rgbParams = [red, green, blue].join(',');
28319 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28320 # };
28321 #
28322 # var rgbToCssColor_ = function(red, green, blue) {
28323 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28324 # var hexString = rgbNumber.toString(16);
28325 # var missingZeros = 6 - hexString.length;
28326 # var resultBuilder = ['#'];
28327 # for (var i = 0; i < missingZeros; i++) {
28328 # resultBuilder.push('0');
28329 # }
28330 # resultBuilder.push(hexString);
28331 # return resultBuilder.join('');
28332 # };
28333 #
28334 # // ...
28335 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28336 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28337 # the final pixel color is defined by the equation:
28338 #
28339 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28340 #
28341 # This means that a value of 1.0 corresponds to a solid color, whereas
28342 # a value of 0.0 corresponds to a completely transparent color. This
28343 # uses a wrapper message rather than a simple float scalar so that it is
28344 # possible to distinguish between a default value and the value being unset.
28345 # If omitted, this color object is to be rendered as a solid color
28346 # (as if the alpha value had been explicitly given with a value of 1.0).
28347 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28348 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28349 },
28350 "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
28351 # row or column will be filled with either first_band_color or
28352 # second_band_color, depending on the color of the previous row or
28353 # column.
28354 # for simplicity of conversion to/from color representations in various
28355 # languages over compactness; for example, the fields of this representation
28356 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28357 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28358 # method in iOS; and, with just a little work, it can be easily formatted into
28359 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28360 #
28361 # Example (Java):
28362 #
28363 # import com.google.type.Color;
28364 #
28365 # // ...
28366 # public static java.awt.Color fromProto(Color protocolor) {
28367 # float alpha = protocolor.hasAlpha()
28368 # ? protocolor.getAlpha().getValue()
28369 # : 1.0;
28370 #
28371 # return new java.awt.Color(
28372 # protocolor.getRed(),
28373 # protocolor.getGreen(),
28374 # protocolor.getBlue(),
28375 # alpha);
28376 # }
28377 #
28378 # public static Color toProto(java.awt.Color color) {
28379 # float red = (float) color.getRed();
28380 # float green = (float) color.getGreen();
28381 # float blue = (float) color.getBlue();
28382 # float denominator = 255.0;
28383 # Color.Builder resultBuilder =
28384 # Color
28385 # .newBuilder()
28386 # .setRed(red / denominator)
28387 # .setGreen(green / denominator)
28388 # .setBlue(blue / denominator);
28389 # int alpha = color.getAlpha();
28390 # if (alpha != 255) {
28391 # result.setAlpha(
28392 # FloatValue
28393 # .newBuilder()
28394 # .setValue(((float) alpha) / denominator)
28395 # .build());
28396 # }
28397 # return resultBuilder.build();
28398 # }
28399 # // ...
28400 #
28401 # Example (iOS / Obj-C):
28402 #
28403 # // ...
28404 # static UIColor* fromProto(Color* protocolor) {
28405 # float red = [protocolor red];
28406 # float green = [protocolor green];
28407 # float blue = [protocolor blue];
28408 # FloatValue* alpha_wrapper = [protocolor alpha];
28409 # float alpha = 1.0;
28410 # if (alpha_wrapper != nil) {
28411 # alpha = [alpha_wrapper value];
28412 # }
28413 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28414 # }
28415 #
28416 # static Color* toProto(UIColor* color) {
28417 # CGFloat red, green, blue, alpha;
28418 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28419 # return nil;
28420 # }
28421 # Color* result = [Color alloc] init];
28422 # [result setRed:red];
28423 # [result setGreen:green];
28424 # [result setBlue:blue];
28425 # if (alpha <= 0.9999) {
28426 # [result setAlpha:floatWrapperWithValue(alpha)];
28427 # }
28428 # [result autorelease];
28429 # return result;
28430 # }
28431 # // ...
28432 #
28433 # Example (JavaScript):
28434 #
28435 # // ...
28436 #
28437 # var protoToCssColor = function(rgb_color) {
28438 # var redFrac = rgb_color.red || 0.0;
28439 # var greenFrac = rgb_color.green || 0.0;
28440 # var blueFrac = rgb_color.blue || 0.0;
28441 # var red = Math.floor(redFrac * 255);
28442 # var green = Math.floor(greenFrac * 255);
28443 # var blue = Math.floor(blueFrac * 255);
28444 #
28445 # if (!('alpha' in rgb_color)) {
28446 # return rgbToCssColor_(red, green, blue);
28447 # }
28448 #
28449 # var alphaFrac = rgb_color.alpha.value || 0.0;
28450 # var rgbParams = [red, green, blue].join(',');
28451 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28452 # };
28453 #
28454 # var rgbToCssColor_ = function(red, green, blue) {
28455 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28456 # var hexString = rgbNumber.toString(16);
28457 # var missingZeros = 6 - hexString.length;
28458 # var resultBuilder = ['#'];
28459 # for (var i = 0; i < missingZeros; i++) {
28460 # resultBuilder.push('0');
28461 # }
28462 # resultBuilder.push(hexString);
28463 # return resultBuilder.join('');
28464 # };
28465 #
28466 # // ...
28467 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28468 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28469 # the final pixel color is defined by the equation:
28470 #
28471 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28472 #
28473 # This means that a value of 1.0 corresponds to a solid color, whereas
28474 # a value of 0.0 corresponds to a completely transparent color. This
28475 # uses a wrapper message rather than a simple float scalar so that it is
28476 # possible to distinguish between a default value and the value being unset.
28477 # If omitted, this color object is to be rendered as a solid color
28478 # (as if the alpha value had been explicitly given with a value of 1.0).
28479 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28480 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28481 },
28482 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
28483 # for simplicity of conversion to/from color representations in various
28484 # languages over compactness; for example, the fields of this representation
28485 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28486 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28487 # method in iOS; and, with just a little work, it can be easily formatted into
28488 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28489 #
28490 # Example (Java):
28491 #
28492 # import com.google.type.Color;
28493 #
28494 # // ...
28495 # public static java.awt.Color fromProto(Color protocolor) {
28496 # float alpha = protocolor.hasAlpha()
28497 # ? protocolor.getAlpha().getValue()
28498 # : 1.0;
28499 #
28500 # return new java.awt.Color(
28501 # protocolor.getRed(),
28502 # protocolor.getGreen(),
28503 # protocolor.getBlue(),
28504 # alpha);
28505 # }
28506 #
28507 # public static Color toProto(java.awt.Color color) {
28508 # float red = (float) color.getRed();
28509 # float green = (float) color.getGreen();
28510 # float blue = (float) color.getBlue();
28511 # float denominator = 255.0;
28512 # Color.Builder resultBuilder =
28513 # Color
28514 # .newBuilder()
28515 # .setRed(red / denominator)
28516 # .setGreen(green / denominator)
28517 # .setBlue(blue / denominator);
28518 # int alpha = color.getAlpha();
28519 # if (alpha != 255) {
28520 # result.setAlpha(
28521 # FloatValue
28522 # .newBuilder()
28523 # .setValue(((float) alpha) / denominator)
28524 # .build());
28525 # }
28526 # return resultBuilder.build();
28527 # }
28528 # // ...
28529 #
28530 # Example (iOS / Obj-C):
28531 #
28532 # // ...
28533 # static UIColor* fromProto(Color* protocolor) {
28534 # float red = [protocolor red];
28535 # float green = [protocolor green];
28536 # float blue = [protocolor blue];
28537 # FloatValue* alpha_wrapper = [protocolor alpha];
28538 # float alpha = 1.0;
28539 # if (alpha_wrapper != nil) {
28540 # alpha = [alpha_wrapper value];
28541 # }
28542 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28543 # }
28544 #
28545 # static Color* toProto(UIColor* color) {
28546 # CGFloat red, green, blue, alpha;
28547 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28548 # return nil;
28549 # }
28550 # Color* result = [Color alloc] init];
28551 # [result setRed:red];
28552 # [result setGreen:green];
28553 # [result setBlue:blue];
28554 # if (alpha <= 0.9999) {
28555 # [result setAlpha:floatWrapperWithValue(alpha)];
28556 # }
28557 # [result autorelease];
28558 # return result;
28559 # }
28560 # // ...
28561 #
28562 # Example (JavaScript):
28563 #
28564 # // ...
28565 #
28566 # var protoToCssColor = function(rgb_color) {
28567 # var redFrac = rgb_color.red || 0.0;
28568 # var greenFrac = rgb_color.green || 0.0;
28569 # var blueFrac = rgb_color.blue || 0.0;
28570 # var red = Math.floor(redFrac * 255);
28571 # var green = Math.floor(greenFrac * 255);
28572 # var blue = Math.floor(blueFrac * 255);
28573 #
28574 # if (!('alpha' in rgb_color)) {
28575 # return rgbToCssColor_(red, green, blue);
28576 # }
28577 #
28578 # var alphaFrac = rgb_color.alpha.value || 0.0;
28579 # var rgbParams = [red, green, blue].join(',');
28580 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28581 # };
28582 #
28583 # var rgbToCssColor_ = function(red, green, blue) {
28584 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28585 # var hexString = rgbNumber.toString(16);
28586 # var missingZeros = 6 - hexString.length;
28587 # var resultBuilder = ['#'];
28588 # for (var i = 0; i < missingZeros; i++) {
28589 # resultBuilder.push('0');
28590 # }
28591 # resultBuilder.push(hexString);
28592 # return resultBuilder.join('');
28593 # };
28594 #
28595 # // ...
28596 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28597 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28598 # the final pixel color is defined by the equation:
28599 #
28600 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28601 #
28602 # This means that a value of 1.0 corresponds to a solid color, whereas
28603 # a value of 0.0 corresponds to a completely transparent color. This
28604 # uses a wrapper message rather than a simple float scalar so that it is
28605 # possible to distinguish between a default value and the value being unset.
28606 # If omitted, this color object is to be rendered as a solid color
28607 # (as if the alpha value had been explicitly given with a value of 1.0).
28608 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28609 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28610 },
28611 },
28612 "bandedRangeId": 42, # The id of the banded range.
28613 },
28614 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028615 "addFilterView": { # The result of adding a filter view. # A reply from adding a filter view.
28616 "filter": { # A filter view. # The newly added filter view.
28617 "title": "A String", # The name of the filter view.
28618 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
28619 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028620 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028621 # may be set.
28622 "filterViewId": 42, # The ID of the filter view.
28623 "range": { # A range on a sheet. # The range this filter view covers.
28624 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028625 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028626 # may be set.
28627 # All indexes are zero-based.
28628 # Indexes are half open, e.g the start index is inclusive
28629 # and the end index is exclusive -- [start_index, end_index).
28630 # Missing indexes indicate the range is unbounded on that side.
28631 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028632 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028633 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028634 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028635 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028636 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028637 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028638 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028639 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028640 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028641 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028642 # `Sheet1!A:B == sheet_id: 0,
28643 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028644 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028645 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028646 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028647 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028648 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028649 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028650 #
28651 # The start index must always be less than or equal to the end index.
28652 # If the start index equals the end index, then the range is empty.
28653 # Empty ranges are typically not meaningful and are usually rendered in the
28654 # UI as `#REF!`.
28655 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070028656 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028657 "sheetId": 42, # The sheet this range is on.
28658 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070028659 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028660 },
28661 "sortSpecs": [ # The sort order per column. Later specifications are used when values
28662 # are equal in the earlier specifications.
28663 { # A sort order associated with a specific column or row.
28664 "sortOrder": "A String", # The order data should be sorted.
28665 "dimensionIndex": 42, # The dimension the sort should be applied to.
28666 },
28667 ],
28668 "criteria": { # The criteria for showing/hiding values per column.
28669 # The map's key is the column index, and the value is the criteria for
28670 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070028671 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028672 "hiddenValues": [ # Values that should be hidden.
28673 "A String",
28674 ],
28675 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
28676 # (This does not override hiddenValues -- if a value is listed there,
28677 # it will still be hidden.)
28678 # BooleanConditions are used by conditional formatting,
28679 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028680 "values": [ # The values of the condition. The number of supported values depends
28681 # on the condition type. Some support zero values,
28682 # others one or two values,
28683 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
28684 { # The value of the condition.
28685 "relativeDate": "A String", # A relative date (based on the current date).
28686 # Valid only if the type is
28687 # DATE_BEFORE,
28688 # DATE_AFTER,
28689 # DATE_ON_OR_BEFORE or
28690 # DATE_ON_OR_AFTER.
28691 #
28692 # Relative dates are not supported in data validation.
28693 # They are supported only in conditional formatting and
28694 # conditional filters.
28695 "userEnteredValue": "A String", # A value the condition is based on.
28696 # The value will be parsed as if the user typed into a cell.
28697 # Formulas are supported (and must begin with an `=`).
28698 },
28699 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028700 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070028701 },
28702 },
28703 },
28704 },
28705 },
28706 },
28707 ],
28708 }</pre>
28709</div>
28710
28711<div class="method">
28712 <code class="details" id="create">create(body, x__xgafv=None)</code>
28713 <pre>Creates a spreadsheet, returning the newly created spreadsheet.
28714
28715Args:
28716 body: object, The request body. (required)
28717 The object takes the form of:
28718
28719{ # Resource that represents a spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028720 "spreadsheetId": "A String", # The ID of the spreadsheet.
28721 # This field is read-only.
28722 "namedRanges": [ # The named ranges defined in a spreadsheet.
28723 { # A named range.
28724 "namedRangeId": "A String", # The ID of the named range.
28725 "range": { # A range on a sheet. # The range this represents.
28726 # All indexes are zero-based.
28727 # Indexes are half open, e.g the start index is inclusive
28728 # and the end index is exclusive -- [start_index, end_index).
28729 # Missing indexes indicate the range is unbounded on that side.
28730 #
28731 # For example, if `"Sheet1"` is sheet ID 0, then:
28732 #
28733 # `Sheet1!A1:A1 == sheet_id: 0,
28734 # start_row_index: 0, end_row_index: 1,
28735 # start_column_index: 0, end_column_index: 1`
28736 #
28737 # `Sheet1!A3:B4 == sheet_id: 0,
28738 # start_row_index: 2, end_row_index: 4,
28739 # start_column_index: 0, end_column_index: 2`
28740 #
28741 # `Sheet1!A:B == sheet_id: 0,
28742 # start_column_index: 0, end_column_index: 2`
28743 #
28744 # `Sheet1!A5:B == sheet_id: 0,
28745 # start_row_index: 4,
28746 # start_column_index: 0, end_column_index: 2`
28747 #
28748 # `Sheet1 == sheet_id:0`
28749 #
28750 # The start index must always be less than or equal to the end index.
28751 # If the start index equals the end index, then the range is empty.
28752 # Empty ranges are typically not meaningful and are usually rendered in the
28753 # UI as `#REF!`.
28754 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070028755 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028756 "sheetId": 42, # The sheet this range is on.
28757 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070028758 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028759 },
28760 "name": "A String", # The name of the named range.
28761 },
28762 ],
28763 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028764 "title": "A String", # The title of the spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028765 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
28766 #
28767 # * an ISO 639-1 language code such as `en`
28768 #
28769 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
28770 #
28771 # * a combination of the ISO language code and country code, such as `en_US`
28772 #
28773 # Note: when updating this field, not all locales/languages are supported.
Thomas Coffee2f245372017-03-27 10:39:26 -070028774 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028775 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
28776 # CellData.effectiveFormat will not be set if the
28777 # cell's format is equal to this default format.
28778 # This field is read-only.
28779 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
28780 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
28781 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028782 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028783 # information about the supported patterns.
28784 "type": "A String", # The type of the number format.
28785 # When writing, this field must be set.
28786 },
28787 "textDirection": "A String", # The direction of the text in the cell.
28788 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
28789 # When updating padding, every field must be specified.
28790 "top": 42, # The top padding of the cell.
28791 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028792 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028793 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028794 },
Thomas Coffee2f245372017-03-27 10:39:26 -070028795 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028796 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
28797 # for simplicity of conversion to/from color representations in various
28798 # languages over compactness; for example, the fields of this representation
28799 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28800 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28801 # method in iOS; and, with just a little work, it can be easily formatted into
28802 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28803 #
28804 # Example (Java):
28805 #
28806 # import com.google.type.Color;
28807 #
28808 # // ...
28809 # public static java.awt.Color fromProto(Color protocolor) {
28810 # float alpha = protocolor.hasAlpha()
28811 # ? protocolor.getAlpha().getValue()
28812 # : 1.0;
28813 #
28814 # return new java.awt.Color(
28815 # protocolor.getRed(),
28816 # protocolor.getGreen(),
28817 # protocolor.getBlue(),
28818 # alpha);
28819 # }
28820 #
28821 # public static Color toProto(java.awt.Color color) {
28822 # float red = (float) color.getRed();
28823 # float green = (float) color.getGreen();
28824 # float blue = (float) color.getBlue();
28825 # float denominator = 255.0;
28826 # Color.Builder resultBuilder =
28827 # Color
28828 # .newBuilder()
28829 # .setRed(red / denominator)
28830 # .setGreen(green / denominator)
28831 # .setBlue(blue / denominator);
28832 # int alpha = color.getAlpha();
28833 # if (alpha != 255) {
28834 # result.setAlpha(
28835 # FloatValue
28836 # .newBuilder()
28837 # .setValue(((float) alpha) / denominator)
28838 # .build());
28839 # }
28840 # return resultBuilder.build();
28841 # }
28842 # // ...
28843 #
28844 # Example (iOS / Obj-C):
28845 #
28846 # // ...
28847 # static UIColor* fromProto(Color* protocolor) {
28848 # float red = [protocolor red];
28849 # float green = [protocolor green];
28850 # float blue = [protocolor blue];
28851 # FloatValue* alpha_wrapper = [protocolor alpha];
28852 # float alpha = 1.0;
28853 # if (alpha_wrapper != nil) {
28854 # alpha = [alpha_wrapper value];
28855 # }
28856 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28857 # }
28858 #
28859 # static Color* toProto(UIColor* color) {
28860 # CGFloat red, green, blue, alpha;
28861 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28862 # return nil;
28863 # }
28864 # Color* result = [Color alloc] init];
28865 # [result setRed:red];
28866 # [result setGreen:green];
28867 # [result setBlue:blue];
28868 # if (alpha <= 0.9999) {
28869 # [result setAlpha:floatWrapperWithValue(alpha)];
28870 # }
28871 # [result autorelease];
28872 # return result;
28873 # }
28874 # // ...
28875 #
28876 # Example (JavaScript):
28877 #
28878 # // ...
28879 #
28880 # var protoToCssColor = function(rgb_color) {
28881 # var redFrac = rgb_color.red || 0.0;
28882 # var greenFrac = rgb_color.green || 0.0;
28883 # var blueFrac = rgb_color.blue || 0.0;
28884 # var red = Math.floor(redFrac * 255);
28885 # var green = Math.floor(greenFrac * 255);
28886 # var blue = Math.floor(blueFrac * 255);
28887 #
28888 # if (!('alpha' in rgb_color)) {
28889 # return rgbToCssColor_(red, green, blue);
28890 # }
28891 #
28892 # var alphaFrac = rgb_color.alpha.value || 0.0;
28893 # var rgbParams = [red, green, blue].join(',');
28894 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28895 # };
28896 #
28897 # var rgbToCssColor_ = function(red, green, blue) {
28898 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28899 # var hexString = rgbNumber.toString(16);
28900 # var missingZeros = 6 - hexString.length;
28901 # var resultBuilder = ['#'];
28902 # for (var i = 0; i < missingZeros; i++) {
28903 # resultBuilder.push('0');
28904 # }
28905 # resultBuilder.push(hexString);
28906 # return resultBuilder.join('');
28907 # };
28908 #
28909 # // ...
28910 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28911 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28912 # the final pixel color is defined by the equation:
28913 #
28914 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28915 #
28916 # This means that a value of 1.0 corresponds to a solid color, whereas
28917 # a value of 0.0 corresponds to a completely transparent color. This
28918 # uses a wrapper message rather than a simple float scalar so that it is
28919 # possible to distinguish between a default value and the value being unset.
28920 # If omitted, this color object is to be rendered as a solid color
28921 # (as if the alpha value had been explicitly given with a value of 1.0).
28922 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28923 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28924 },
Thomas Coffee2f245372017-03-27 10:39:26 -070028925 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028926 "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).
28927 # Absent values indicate that the field isn't specified.
28928 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28929 # for simplicity of conversion to/from color representations in various
28930 # languages over compactness; for example, the fields of this representation
28931 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28932 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28933 # method in iOS; and, with just a little work, it can be easily formatted into
28934 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28935 #
28936 # Example (Java):
28937 #
28938 # import com.google.type.Color;
28939 #
28940 # // ...
28941 # public static java.awt.Color fromProto(Color protocolor) {
28942 # float alpha = protocolor.hasAlpha()
28943 # ? protocolor.getAlpha().getValue()
28944 # : 1.0;
28945 #
28946 # return new java.awt.Color(
28947 # protocolor.getRed(),
28948 # protocolor.getGreen(),
28949 # protocolor.getBlue(),
28950 # alpha);
28951 # }
28952 #
28953 # public static Color toProto(java.awt.Color color) {
28954 # float red = (float) color.getRed();
28955 # float green = (float) color.getGreen();
28956 # float blue = (float) color.getBlue();
28957 # float denominator = 255.0;
28958 # Color.Builder resultBuilder =
28959 # Color
28960 # .newBuilder()
28961 # .setRed(red / denominator)
28962 # .setGreen(green / denominator)
28963 # .setBlue(blue / denominator);
28964 # int alpha = color.getAlpha();
28965 # if (alpha != 255) {
28966 # result.setAlpha(
28967 # FloatValue
28968 # .newBuilder()
28969 # .setValue(((float) alpha) / denominator)
28970 # .build());
28971 # }
28972 # return resultBuilder.build();
28973 # }
28974 # // ...
28975 #
28976 # Example (iOS / Obj-C):
28977 #
28978 # // ...
28979 # static UIColor* fromProto(Color* protocolor) {
28980 # float red = [protocolor red];
28981 # float green = [protocolor green];
28982 # float blue = [protocolor blue];
28983 # FloatValue* alpha_wrapper = [protocolor alpha];
28984 # float alpha = 1.0;
28985 # if (alpha_wrapper != nil) {
28986 # alpha = [alpha_wrapper value];
28987 # }
28988 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28989 # }
28990 #
28991 # static Color* toProto(UIColor* color) {
28992 # CGFloat red, green, blue, alpha;
28993 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28994 # return nil;
28995 # }
28996 # Color* result = [Color alloc] init];
28997 # [result setRed:red];
28998 # [result setGreen:green];
28999 # [result setBlue:blue];
29000 # if (alpha <= 0.9999) {
29001 # [result setAlpha:floatWrapperWithValue(alpha)];
29002 # }
29003 # [result autorelease];
29004 # return result;
29005 # }
29006 # // ...
29007 #
29008 # Example (JavaScript):
29009 #
29010 # // ...
29011 #
29012 # var protoToCssColor = function(rgb_color) {
29013 # var redFrac = rgb_color.red || 0.0;
29014 # var greenFrac = rgb_color.green || 0.0;
29015 # var blueFrac = rgb_color.blue || 0.0;
29016 # var red = Math.floor(redFrac * 255);
29017 # var green = Math.floor(greenFrac * 255);
29018 # var blue = Math.floor(blueFrac * 255);
29019 #
29020 # if (!('alpha' in rgb_color)) {
29021 # return rgbToCssColor_(red, green, blue);
29022 # }
29023 #
29024 # var alphaFrac = rgb_color.alpha.value || 0.0;
29025 # var rgbParams = [red, green, blue].join(',');
29026 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29027 # };
29028 #
29029 # var rgbToCssColor_ = function(red, green, blue) {
29030 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29031 # var hexString = rgbNumber.toString(16);
29032 # var missingZeros = 6 - hexString.length;
29033 # var resultBuilder = ['#'];
29034 # for (var i = 0; i < missingZeros; i++) {
29035 # resultBuilder.push('0');
29036 # }
29037 # resultBuilder.push(hexString);
29038 # return resultBuilder.join('');
29039 # };
29040 #
29041 # // ...
29042 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29043 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29044 # the final pixel color is defined by the equation:
29045 #
29046 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29047 #
29048 # This means that a value of 1.0 corresponds to a solid color, whereas
29049 # a value of 0.0 corresponds to a completely transparent color. This
29050 # uses a wrapper message rather than a simple float scalar so that it is
29051 # possible to distinguish between a default value and the value being unset.
29052 # If omitted, this color object is to be rendered as a solid color
29053 # (as if the alpha value had been explicitly given with a value of 1.0).
29054 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29055 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29056 },
29057 "bold": True or False, # True if the text is bold.
29058 "strikethrough": True or False, # True if the text has a strikethrough.
29059 "fontFamily": "A String", # The font family.
29060 "fontSize": 42, # The size of the font.
29061 "italic": True or False, # True if the text is italicized.
29062 "underline": True or False, # True if the text is underlined.
29063 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029064 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
29065 "angle": 42, # The angle between the standard orientation and the desired orientation.
29066 # Measured in degrees. Valid values are between -90 and 90. Positive
29067 # angles are angled upwards, negative are angled downwards.
29068 #
29069 # Note: For LTR text direction positive angles are in the counterclockwise
29070 # direction, whereas for RTL they are in the clockwise direction
29071 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
29072 # characters is unchanged.
29073 # For example:
29074 #
29075 # | V |
29076 # | e |
29077 # | r |
29078 # | t |
29079 # | i |
29080 # | c |
29081 # | a |
29082 # | l |
29083 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029084 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29085 "borders": { # The borders of the cell. # The borders of the cell.
29086 "top": { # A border along a cell. # The top border of the cell.
29087 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29088 # for simplicity of conversion to/from color representations in various
29089 # languages over compactness; for example, the fields of this representation
29090 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29091 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29092 # method in iOS; and, with just a little work, it can be easily formatted into
29093 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29094 #
29095 # Example (Java):
29096 #
29097 # import com.google.type.Color;
29098 #
29099 # // ...
29100 # public static java.awt.Color fromProto(Color protocolor) {
29101 # float alpha = protocolor.hasAlpha()
29102 # ? protocolor.getAlpha().getValue()
29103 # : 1.0;
29104 #
29105 # return new java.awt.Color(
29106 # protocolor.getRed(),
29107 # protocolor.getGreen(),
29108 # protocolor.getBlue(),
29109 # alpha);
29110 # }
29111 #
29112 # public static Color toProto(java.awt.Color color) {
29113 # float red = (float) color.getRed();
29114 # float green = (float) color.getGreen();
29115 # float blue = (float) color.getBlue();
29116 # float denominator = 255.0;
29117 # Color.Builder resultBuilder =
29118 # Color
29119 # .newBuilder()
29120 # .setRed(red / denominator)
29121 # .setGreen(green / denominator)
29122 # .setBlue(blue / denominator);
29123 # int alpha = color.getAlpha();
29124 # if (alpha != 255) {
29125 # result.setAlpha(
29126 # FloatValue
29127 # .newBuilder()
29128 # .setValue(((float) alpha) / denominator)
29129 # .build());
29130 # }
29131 # return resultBuilder.build();
29132 # }
29133 # // ...
29134 #
29135 # Example (iOS / Obj-C):
29136 #
29137 # // ...
29138 # static UIColor* fromProto(Color* protocolor) {
29139 # float red = [protocolor red];
29140 # float green = [protocolor green];
29141 # float blue = [protocolor blue];
29142 # FloatValue* alpha_wrapper = [protocolor alpha];
29143 # float alpha = 1.0;
29144 # if (alpha_wrapper != nil) {
29145 # alpha = [alpha_wrapper value];
29146 # }
29147 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29148 # }
29149 #
29150 # static Color* toProto(UIColor* color) {
29151 # CGFloat red, green, blue, alpha;
29152 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29153 # return nil;
29154 # }
29155 # Color* result = [Color alloc] init];
29156 # [result setRed:red];
29157 # [result setGreen:green];
29158 # [result setBlue:blue];
29159 # if (alpha <= 0.9999) {
29160 # [result setAlpha:floatWrapperWithValue(alpha)];
29161 # }
29162 # [result autorelease];
29163 # return result;
29164 # }
29165 # // ...
29166 #
29167 # Example (JavaScript):
29168 #
29169 # // ...
29170 #
29171 # var protoToCssColor = function(rgb_color) {
29172 # var redFrac = rgb_color.red || 0.0;
29173 # var greenFrac = rgb_color.green || 0.0;
29174 # var blueFrac = rgb_color.blue || 0.0;
29175 # var red = Math.floor(redFrac * 255);
29176 # var green = Math.floor(greenFrac * 255);
29177 # var blue = Math.floor(blueFrac * 255);
29178 #
29179 # if (!('alpha' in rgb_color)) {
29180 # return rgbToCssColor_(red, green, blue);
29181 # }
29182 #
29183 # var alphaFrac = rgb_color.alpha.value || 0.0;
29184 # var rgbParams = [red, green, blue].join(',');
29185 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29186 # };
29187 #
29188 # var rgbToCssColor_ = function(red, green, blue) {
29189 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29190 # var hexString = rgbNumber.toString(16);
29191 # var missingZeros = 6 - hexString.length;
29192 # var resultBuilder = ['#'];
29193 # for (var i = 0; i < missingZeros; i++) {
29194 # resultBuilder.push('0');
29195 # }
29196 # resultBuilder.push(hexString);
29197 # return resultBuilder.join('');
29198 # };
29199 #
29200 # // ...
29201 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29202 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29203 # the final pixel color is defined by the equation:
29204 #
29205 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29206 #
29207 # This means that a value of 1.0 corresponds to a solid color, whereas
29208 # a value of 0.0 corresponds to a completely transparent color. This
29209 # uses a wrapper message rather than a simple float scalar so that it is
29210 # possible to distinguish between a default value and the value being unset.
29211 # If omitted, this color object is to be rendered as a solid color
29212 # (as if the alpha value had been explicitly given with a value of 1.0).
29213 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29214 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29215 },
29216 "width": 42, # The width of the border, in pixels.
29217 # Deprecated; the width is determined by the "style" field.
29218 "style": "A String", # The style of the border.
29219 },
29220 "right": { # A border along a cell. # The right border of the cell.
29221 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29222 # for simplicity of conversion to/from color representations in various
29223 # languages over compactness; for example, the fields of this representation
29224 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29225 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29226 # method in iOS; and, with just a little work, it can be easily formatted into
29227 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29228 #
29229 # Example (Java):
29230 #
29231 # import com.google.type.Color;
29232 #
29233 # // ...
29234 # public static java.awt.Color fromProto(Color protocolor) {
29235 # float alpha = protocolor.hasAlpha()
29236 # ? protocolor.getAlpha().getValue()
29237 # : 1.0;
29238 #
29239 # return new java.awt.Color(
29240 # protocolor.getRed(),
29241 # protocolor.getGreen(),
29242 # protocolor.getBlue(),
29243 # alpha);
29244 # }
29245 #
29246 # public static Color toProto(java.awt.Color color) {
29247 # float red = (float) color.getRed();
29248 # float green = (float) color.getGreen();
29249 # float blue = (float) color.getBlue();
29250 # float denominator = 255.0;
29251 # Color.Builder resultBuilder =
29252 # Color
29253 # .newBuilder()
29254 # .setRed(red / denominator)
29255 # .setGreen(green / denominator)
29256 # .setBlue(blue / denominator);
29257 # int alpha = color.getAlpha();
29258 # if (alpha != 255) {
29259 # result.setAlpha(
29260 # FloatValue
29261 # .newBuilder()
29262 # .setValue(((float) alpha) / denominator)
29263 # .build());
29264 # }
29265 # return resultBuilder.build();
29266 # }
29267 # // ...
29268 #
29269 # Example (iOS / Obj-C):
29270 #
29271 # // ...
29272 # static UIColor* fromProto(Color* protocolor) {
29273 # float red = [protocolor red];
29274 # float green = [protocolor green];
29275 # float blue = [protocolor blue];
29276 # FloatValue* alpha_wrapper = [protocolor alpha];
29277 # float alpha = 1.0;
29278 # if (alpha_wrapper != nil) {
29279 # alpha = [alpha_wrapper value];
29280 # }
29281 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29282 # }
29283 #
29284 # static Color* toProto(UIColor* color) {
29285 # CGFloat red, green, blue, alpha;
29286 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29287 # return nil;
29288 # }
29289 # Color* result = [Color alloc] init];
29290 # [result setRed:red];
29291 # [result setGreen:green];
29292 # [result setBlue:blue];
29293 # if (alpha <= 0.9999) {
29294 # [result setAlpha:floatWrapperWithValue(alpha)];
29295 # }
29296 # [result autorelease];
29297 # return result;
29298 # }
29299 # // ...
29300 #
29301 # Example (JavaScript):
29302 #
29303 # // ...
29304 #
29305 # var protoToCssColor = function(rgb_color) {
29306 # var redFrac = rgb_color.red || 0.0;
29307 # var greenFrac = rgb_color.green || 0.0;
29308 # var blueFrac = rgb_color.blue || 0.0;
29309 # var red = Math.floor(redFrac * 255);
29310 # var green = Math.floor(greenFrac * 255);
29311 # var blue = Math.floor(blueFrac * 255);
29312 #
29313 # if (!('alpha' in rgb_color)) {
29314 # return rgbToCssColor_(red, green, blue);
29315 # }
29316 #
29317 # var alphaFrac = rgb_color.alpha.value || 0.0;
29318 # var rgbParams = [red, green, blue].join(',');
29319 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29320 # };
29321 #
29322 # var rgbToCssColor_ = function(red, green, blue) {
29323 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29324 # var hexString = rgbNumber.toString(16);
29325 # var missingZeros = 6 - hexString.length;
29326 # var resultBuilder = ['#'];
29327 # for (var i = 0; i < missingZeros; i++) {
29328 # resultBuilder.push('0');
29329 # }
29330 # resultBuilder.push(hexString);
29331 # return resultBuilder.join('');
29332 # };
29333 #
29334 # // ...
29335 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29336 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29337 # the final pixel color is defined by the equation:
29338 #
29339 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29340 #
29341 # This means that a value of 1.0 corresponds to a solid color, whereas
29342 # a value of 0.0 corresponds to a completely transparent color. This
29343 # uses a wrapper message rather than a simple float scalar so that it is
29344 # possible to distinguish between a default value and the value being unset.
29345 # If omitted, this color object is to be rendered as a solid color
29346 # (as if the alpha value had been explicitly given with a value of 1.0).
29347 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29348 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29349 },
29350 "width": 42, # The width of the border, in pixels.
29351 # Deprecated; the width is determined by the "style" field.
29352 "style": "A String", # The style of the border.
29353 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029354 "left": { # A border along a cell. # The left border of the cell.
29355 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29356 # for simplicity of conversion to/from color representations in various
29357 # languages over compactness; for example, the fields of this representation
29358 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29359 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29360 # method in iOS; and, with just a little work, it can be easily formatted into
29361 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29362 #
29363 # Example (Java):
29364 #
29365 # import com.google.type.Color;
29366 #
29367 # // ...
29368 # public static java.awt.Color fromProto(Color protocolor) {
29369 # float alpha = protocolor.hasAlpha()
29370 # ? protocolor.getAlpha().getValue()
29371 # : 1.0;
29372 #
29373 # return new java.awt.Color(
29374 # protocolor.getRed(),
29375 # protocolor.getGreen(),
29376 # protocolor.getBlue(),
29377 # alpha);
29378 # }
29379 #
29380 # public static Color toProto(java.awt.Color color) {
29381 # float red = (float) color.getRed();
29382 # float green = (float) color.getGreen();
29383 # float blue = (float) color.getBlue();
29384 # float denominator = 255.0;
29385 # Color.Builder resultBuilder =
29386 # Color
29387 # .newBuilder()
29388 # .setRed(red / denominator)
29389 # .setGreen(green / denominator)
29390 # .setBlue(blue / denominator);
29391 # int alpha = color.getAlpha();
29392 # if (alpha != 255) {
29393 # result.setAlpha(
29394 # FloatValue
29395 # .newBuilder()
29396 # .setValue(((float) alpha) / denominator)
29397 # .build());
29398 # }
29399 # return resultBuilder.build();
29400 # }
29401 # // ...
29402 #
29403 # Example (iOS / Obj-C):
29404 #
29405 # // ...
29406 # static UIColor* fromProto(Color* protocolor) {
29407 # float red = [protocolor red];
29408 # float green = [protocolor green];
29409 # float blue = [protocolor blue];
29410 # FloatValue* alpha_wrapper = [protocolor alpha];
29411 # float alpha = 1.0;
29412 # if (alpha_wrapper != nil) {
29413 # alpha = [alpha_wrapper value];
29414 # }
29415 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29416 # }
29417 #
29418 # static Color* toProto(UIColor* color) {
29419 # CGFloat red, green, blue, alpha;
29420 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29421 # return nil;
29422 # }
29423 # Color* result = [Color alloc] init];
29424 # [result setRed:red];
29425 # [result setGreen:green];
29426 # [result setBlue:blue];
29427 # if (alpha <= 0.9999) {
29428 # [result setAlpha:floatWrapperWithValue(alpha)];
29429 # }
29430 # [result autorelease];
29431 # return result;
29432 # }
29433 # // ...
29434 #
29435 # Example (JavaScript):
29436 #
29437 # // ...
29438 #
29439 # var protoToCssColor = function(rgb_color) {
29440 # var redFrac = rgb_color.red || 0.0;
29441 # var greenFrac = rgb_color.green || 0.0;
29442 # var blueFrac = rgb_color.blue || 0.0;
29443 # var red = Math.floor(redFrac * 255);
29444 # var green = Math.floor(greenFrac * 255);
29445 # var blue = Math.floor(blueFrac * 255);
29446 #
29447 # if (!('alpha' in rgb_color)) {
29448 # return rgbToCssColor_(red, green, blue);
29449 # }
29450 #
29451 # var alphaFrac = rgb_color.alpha.value || 0.0;
29452 # var rgbParams = [red, green, blue].join(',');
29453 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29454 # };
29455 #
29456 # var rgbToCssColor_ = function(red, green, blue) {
29457 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29458 # var hexString = rgbNumber.toString(16);
29459 # var missingZeros = 6 - hexString.length;
29460 # var resultBuilder = ['#'];
29461 # for (var i = 0; i < missingZeros; i++) {
29462 # resultBuilder.push('0');
29463 # }
29464 # resultBuilder.push(hexString);
29465 # return resultBuilder.join('');
29466 # };
29467 #
29468 # // ...
29469 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29470 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29471 # the final pixel color is defined by the equation:
29472 #
29473 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29474 #
29475 # This means that a value of 1.0 corresponds to a solid color, whereas
29476 # a value of 0.0 corresponds to a completely transparent color. This
29477 # uses a wrapper message rather than a simple float scalar so that it is
29478 # possible to distinguish between a default value and the value being unset.
29479 # If omitted, this color object is to be rendered as a solid color
29480 # (as if the alpha value had been explicitly given with a value of 1.0).
29481 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29482 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29483 },
29484 "width": 42, # The width of the border, in pixels.
29485 # Deprecated; the width is determined by the "style" field.
29486 "style": "A String", # The style of the border.
29487 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029488 "bottom": { # A border along a cell. # The bottom border of the cell.
29489 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29490 # for simplicity of conversion to/from color representations in various
29491 # languages over compactness; for example, the fields of this representation
29492 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29493 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29494 # method in iOS; and, with just a little work, it can be easily formatted into
29495 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29496 #
29497 # Example (Java):
29498 #
29499 # import com.google.type.Color;
29500 #
29501 # // ...
29502 # public static java.awt.Color fromProto(Color protocolor) {
29503 # float alpha = protocolor.hasAlpha()
29504 # ? protocolor.getAlpha().getValue()
29505 # : 1.0;
29506 #
29507 # return new java.awt.Color(
29508 # protocolor.getRed(),
29509 # protocolor.getGreen(),
29510 # protocolor.getBlue(),
29511 # alpha);
29512 # }
29513 #
29514 # public static Color toProto(java.awt.Color color) {
29515 # float red = (float) color.getRed();
29516 # float green = (float) color.getGreen();
29517 # float blue = (float) color.getBlue();
29518 # float denominator = 255.0;
29519 # Color.Builder resultBuilder =
29520 # Color
29521 # .newBuilder()
29522 # .setRed(red / denominator)
29523 # .setGreen(green / denominator)
29524 # .setBlue(blue / denominator);
29525 # int alpha = color.getAlpha();
29526 # if (alpha != 255) {
29527 # result.setAlpha(
29528 # FloatValue
29529 # .newBuilder()
29530 # .setValue(((float) alpha) / denominator)
29531 # .build());
29532 # }
29533 # return resultBuilder.build();
29534 # }
29535 # // ...
29536 #
29537 # Example (iOS / Obj-C):
29538 #
29539 # // ...
29540 # static UIColor* fromProto(Color* protocolor) {
29541 # float red = [protocolor red];
29542 # float green = [protocolor green];
29543 # float blue = [protocolor blue];
29544 # FloatValue* alpha_wrapper = [protocolor alpha];
29545 # float alpha = 1.0;
29546 # if (alpha_wrapper != nil) {
29547 # alpha = [alpha_wrapper value];
29548 # }
29549 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29550 # }
29551 #
29552 # static Color* toProto(UIColor* color) {
29553 # CGFloat red, green, blue, alpha;
29554 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29555 # return nil;
29556 # }
29557 # Color* result = [Color alloc] init];
29558 # [result setRed:red];
29559 # [result setGreen:green];
29560 # [result setBlue:blue];
29561 # if (alpha <= 0.9999) {
29562 # [result setAlpha:floatWrapperWithValue(alpha)];
29563 # }
29564 # [result autorelease];
29565 # return result;
29566 # }
29567 # // ...
29568 #
29569 # Example (JavaScript):
29570 #
29571 # // ...
29572 #
29573 # var protoToCssColor = function(rgb_color) {
29574 # var redFrac = rgb_color.red || 0.0;
29575 # var greenFrac = rgb_color.green || 0.0;
29576 # var blueFrac = rgb_color.blue || 0.0;
29577 # var red = Math.floor(redFrac * 255);
29578 # var green = Math.floor(greenFrac * 255);
29579 # var blue = Math.floor(blueFrac * 255);
29580 #
29581 # if (!('alpha' in rgb_color)) {
29582 # return rgbToCssColor_(red, green, blue);
29583 # }
29584 #
29585 # var alphaFrac = rgb_color.alpha.value || 0.0;
29586 # var rgbParams = [red, green, blue].join(',');
29587 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29588 # };
29589 #
29590 # var rgbToCssColor_ = function(red, green, blue) {
29591 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29592 # var hexString = rgbNumber.toString(16);
29593 # var missingZeros = 6 - hexString.length;
29594 # var resultBuilder = ['#'];
29595 # for (var i = 0; i < missingZeros; i++) {
29596 # resultBuilder.push('0');
29597 # }
29598 # resultBuilder.push(hexString);
29599 # return resultBuilder.join('');
29600 # };
29601 #
29602 # // ...
29603 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29604 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29605 # the final pixel color is defined by the equation:
29606 #
29607 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29608 #
29609 # This means that a value of 1.0 corresponds to a solid color, whereas
29610 # a value of 0.0 corresponds to a completely transparent color. This
29611 # uses a wrapper message rather than a simple float scalar so that it is
29612 # possible to distinguish between a default value and the value being unset.
29613 # If omitted, this color object is to be rendered as a solid color
29614 # (as if the alpha value had been explicitly given with a value of 1.0).
29615 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29616 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29617 },
29618 "width": 42, # The width of the border, in pixels.
29619 # Deprecated; the width is determined by the "style" field.
29620 "style": "A String", # The style of the border.
29621 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029622 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029623 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029624 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029625 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
29626 # calculation. Absence of this field means that circular references will
29627 # result in calculation errors.
29628 # calculation.
29629 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
29630 # less than this threshold value, the calculation rounds stop.
29631 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
29632 # rounds to perform.
29633 },
29634 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
29635 # `America/New_York`. If the time zone isn't recognized, this may
29636 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029637 },
29638 "sheets": [ # The sheets that are part of a spreadsheet.
29639 { # A sheet in a spreadsheet.
29640 "conditionalFormats": [ # The conditional format rules in this sheet.
29641 { # A rule describing a conditional format.
29642 "ranges": [ # The ranges that will be formatted if the condition is true.
29643 # All the ranges must be on the same grid.
29644 { # A range on a sheet.
29645 # All indexes are zero-based.
29646 # Indexes are half open, e.g the start index is inclusive
29647 # and the end index is exclusive -- [start_index, end_index).
29648 # Missing indexes indicate the range is unbounded on that side.
29649 #
29650 # For example, if `"Sheet1"` is sheet ID 0, then:
29651 #
29652 # `Sheet1!A1:A1 == sheet_id: 0,
29653 # start_row_index: 0, end_row_index: 1,
29654 # start_column_index: 0, end_column_index: 1`
29655 #
29656 # `Sheet1!A3:B4 == sheet_id: 0,
29657 # start_row_index: 2, end_row_index: 4,
29658 # start_column_index: 0, end_column_index: 2`
29659 #
29660 # `Sheet1!A:B == sheet_id: 0,
29661 # start_column_index: 0, end_column_index: 2`
29662 #
29663 # `Sheet1!A5:B == sheet_id: 0,
29664 # start_row_index: 4,
29665 # start_column_index: 0, end_column_index: 2`
29666 #
29667 # `Sheet1 == sheet_id:0`
29668 #
29669 # The start index must always be less than or equal to the end index.
29670 # If the start index equals the end index, then the range is empty.
29671 # Empty ranges are typically not meaningful and are usually rendered in the
29672 # UI as `#REF!`.
29673 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070029674 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029675 "sheetId": 42, # The sheet this range is on.
29676 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070029677 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029678 },
29679 ],
29680 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
29681 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
29682 # the format will be applied.
29683 # BooleanConditions are used by conditional formatting,
29684 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029685 "values": [ # The values of the condition. The number of supported values depends
29686 # on the condition type. Some support zero values,
29687 # others one or two values,
29688 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
29689 { # The value of the condition.
29690 "relativeDate": "A String", # A relative date (based on the current date).
29691 # Valid only if the type is
29692 # DATE_BEFORE,
29693 # DATE_AFTER,
29694 # DATE_ON_OR_BEFORE or
29695 # DATE_ON_OR_AFTER.
29696 #
29697 # Relative dates are not supported in data validation.
29698 # They are supported only in conditional formatting and
29699 # conditional filters.
29700 "userEnteredValue": "A String", # A value the condition is based on.
29701 # The value will be parsed as if the user typed into a cell.
29702 # Formulas are supported (and must begin with an `=`).
29703 },
29704 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029705 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029706 },
29707 "format": { # The format of a cell. # The format to apply.
29708 # Conditional formatting can only apply a subset of formatting:
29709 # bold, italic,
29710 # strikethrough,
29711 # foreground color &
29712 # background color.
29713 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
29714 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
29715 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029716 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029717 # information about the supported patterns.
29718 "type": "A String", # The type of the number format.
29719 # When writing, this field must be set.
29720 },
29721 "textDirection": "A String", # The direction of the text in the cell.
29722 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
29723 # When updating padding, every field must be specified.
29724 "top": 42, # The top padding of the cell.
29725 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029726 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029727 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029728 },
Thomas Coffee2f245372017-03-27 10:39:26 -070029729 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029730 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
29731 # for simplicity of conversion to/from color representations in various
29732 # languages over compactness; for example, the fields of this representation
29733 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29734 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29735 # method in iOS; and, with just a little work, it can be easily formatted into
29736 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29737 #
29738 # Example (Java):
29739 #
29740 # import com.google.type.Color;
29741 #
29742 # // ...
29743 # public static java.awt.Color fromProto(Color protocolor) {
29744 # float alpha = protocolor.hasAlpha()
29745 # ? protocolor.getAlpha().getValue()
29746 # : 1.0;
29747 #
29748 # return new java.awt.Color(
29749 # protocolor.getRed(),
29750 # protocolor.getGreen(),
29751 # protocolor.getBlue(),
29752 # alpha);
29753 # }
29754 #
29755 # public static Color toProto(java.awt.Color color) {
29756 # float red = (float) color.getRed();
29757 # float green = (float) color.getGreen();
29758 # float blue = (float) color.getBlue();
29759 # float denominator = 255.0;
29760 # Color.Builder resultBuilder =
29761 # Color
29762 # .newBuilder()
29763 # .setRed(red / denominator)
29764 # .setGreen(green / denominator)
29765 # .setBlue(blue / denominator);
29766 # int alpha = color.getAlpha();
29767 # if (alpha != 255) {
29768 # result.setAlpha(
29769 # FloatValue
29770 # .newBuilder()
29771 # .setValue(((float) alpha) / denominator)
29772 # .build());
29773 # }
29774 # return resultBuilder.build();
29775 # }
29776 # // ...
29777 #
29778 # Example (iOS / Obj-C):
29779 #
29780 # // ...
29781 # static UIColor* fromProto(Color* protocolor) {
29782 # float red = [protocolor red];
29783 # float green = [protocolor green];
29784 # float blue = [protocolor blue];
29785 # FloatValue* alpha_wrapper = [protocolor alpha];
29786 # float alpha = 1.0;
29787 # if (alpha_wrapper != nil) {
29788 # alpha = [alpha_wrapper value];
29789 # }
29790 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29791 # }
29792 #
29793 # static Color* toProto(UIColor* color) {
29794 # CGFloat red, green, blue, alpha;
29795 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29796 # return nil;
29797 # }
29798 # Color* result = [Color alloc] init];
29799 # [result setRed:red];
29800 # [result setGreen:green];
29801 # [result setBlue:blue];
29802 # if (alpha <= 0.9999) {
29803 # [result setAlpha:floatWrapperWithValue(alpha)];
29804 # }
29805 # [result autorelease];
29806 # return result;
29807 # }
29808 # // ...
29809 #
29810 # Example (JavaScript):
29811 #
29812 # // ...
29813 #
29814 # var protoToCssColor = function(rgb_color) {
29815 # var redFrac = rgb_color.red || 0.0;
29816 # var greenFrac = rgb_color.green || 0.0;
29817 # var blueFrac = rgb_color.blue || 0.0;
29818 # var red = Math.floor(redFrac * 255);
29819 # var green = Math.floor(greenFrac * 255);
29820 # var blue = Math.floor(blueFrac * 255);
29821 #
29822 # if (!('alpha' in rgb_color)) {
29823 # return rgbToCssColor_(red, green, blue);
29824 # }
29825 #
29826 # var alphaFrac = rgb_color.alpha.value || 0.0;
29827 # var rgbParams = [red, green, blue].join(',');
29828 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29829 # };
29830 #
29831 # var rgbToCssColor_ = function(red, green, blue) {
29832 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29833 # var hexString = rgbNumber.toString(16);
29834 # var missingZeros = 6 - hexString.length;
29835 # var resultBuilder = ['#'];
29836 # for (var i = 0; i < missingZeros; i++) {
29837 # resultBuilder.push('0');
29838 # }
29839 # resultBuilder.push(hexString);
29840 # return resultBuilder.join('');
29841 # };
29842 #
29843 # // ...
29844 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29845 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29846 # the final pixel color is defined by the equation:
29847 #
29848 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29849 #
29850 # This means that a value of 1.0 corresponds to a solid color, whereas
29851 # a value of 0.0 corresponds to a completely transparent color. This
29852 # uses a wrapper message rather than a simple float scalar so that it is
29853 # possible to distinguish between a default value and the value being unset.
29854 # If omitted, this color object is to be rendered as a solid color
29855 # (as if the alpha value had been explicitly given with a value of 1.0).
29856 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29857 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29858 },
Thomas Coffee2f245372017-03-27 10:39:26 -070029859 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029860 "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).
29861 # Absent values indicate that the field isn't specified.
29862 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
29863 # for simplicity of conversion to/from color representations in various
29864 # languages over compactness; for example, the fields of this representation
29865 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29866 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29867 # method in iOS; and, with just a little work, it can be easily formatted into
29868 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29869 #
29870 # Example (Java):
29871 #
29872 # import com.google.type.Color;
29873 #
29874 # // ...
29875 # public static java.awt.Color fromProto(Color protocolor) {
29876 # float alpha = protocolor.hasAlpha()
29877 # ? protocolor.getAlpha().getValue()
29878 # : 1.0;
29879 #
29880 # return new java.awt.Color(
29881 # protocolor.getRed(),
29882 # protocolor.getGreen(),
29883 # protocolor.getBlue(),
29884 # alpha);
29885 # }
29886 #
29887 # public static Color toProto(java.awt.Color color) {
29888 # float red = (float) color.getRed();
29889 # float green = (float) color.getGreen();
29890 # float blue = (float) color.getBlue();
29891 # float denominator = 255.0;
29892 # Color.Builder resultBuilder =
29893 # Color
29894 # .newBuilder()
29895 # .setRed(red / denominator)
29896 # .setGreen(green / denominator)
29897 # .setBlue(blue / denominator);
29898 # int alpha = color.getAlpha();
29899 # if (alpha != 255) {
29900 # result.setAlpha(
29901 # FloatValue
29902 # .newBuilder()
29903 # .setValue(((float) alpha) / denominator)
29904 # .build());
29905 # }
29906 # return resultBuilder.build();
29907 # }
29908 # // ...
29909 #
29910 # Example (iOS / Obj-C):
29911 #
29912 # // ...
29913 # static UIColor* fromProto(Color* protocolor) {
29914 # float red = [protocolor red];
29915 # float green = [protocolor green];
29916 # float blue = [protocolor blue];
29917 # FloatValue* alpha_wrapper = [protocolor alpha];
29918 # float alpha = 1.0;
29919 # if (alpha_wrapper != nil) {
29920 # alpha = [alpha_wrapper value];
29921 # }
29922 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29923 # }
29924 #
29925 # static Color* toProto(UIColor* color) {
29926 # CGFloat red, green, blue, alpha;
29927 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29928 # return nil;
29929 # }
29930 # Color* result = [Color alloc] init];
29931 # [result setRed:red];
29932 # [result setGreen:green];
29933 # [result setBlue:blue];
29934 # if (alpha <= 0.9999) {
29935 # [result setAlpha:floatWrapperWithValue(alpha)];
29936 # }
29937 # [result autorelease];
29938 # return result;
29939 # }
29940 # // ...
29941 #
29942 # Example (JavaScript):
29943 #
29944 # // ...
29945 #
29946 # var protoToCssColor = function(rgb_color) {
29947 # var redFrac = rgb_color.red || 0.0;
29948 # var greenFrac = rgb_color.green || 0.0;
29949 # var blueFrac = rgb_color.blue || 0.0;
29950 # var red = Math.floor(redFrac * 255);
29951 # var green = Math.floor(greenFrac * 255);
29952 # var blue = Math.floor(blueFrac * 255);
29953 #
29954 # if (!('alpha' in rgb_color)) {
29955 # return rgbToCssColor_(red, green, blue);
29956 # }
29957 #
29958 # var alphaFrac = rgb_color.alpha.value || 0.0;
29959 # var rgbParams = [red, green, blue].join(',');
29960 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29961 # };
29962 #
29963 # var rgbToCssColor_ = function(red, green, blue) {
29964 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29965 # var hexString = rgbNumber.toString(16);
29966 # var missingZeros = 6 - hexString.length;
29967 # var resultBuilder = ['#'];
29968 # for (var i = 0; i < missingZeros; i++) {
29969 # resultBuilder.push('0');
29970 # }
29971 # resultBuilder.push(hexString);
29972 # return resultBuilder.join('');
29973 # };
29974 #
29975 # // ...
29976 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29977 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29978 # the final pixel color is defined by the equation:
29979 #
29980 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29981 #
29982 # This means that a value of 1.0 corresponds to a solid color, whereas
29983 # a value of 0.0 corresponds to a completely transparent color. This
29984 # uses a wrapper message rather than a simple float scalar so that it is
29985 # possible to distinguish between a default value and the value being unset.
29986 # If omitted, this color object is to be rendered as a solid color
29987 # (as if the alpha value had been explicitly given with a value of 1.0).
29988 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29989 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29990 },
29991 "bold": True or False, # True if the text is bold.
29992 "strikethrough": True or False, # True if the text has a strikethrough.
29993 "fontFamily": "A String", # The font family.
29994 "fontSize": 42, # The size of the font.
29995 "italic": True or False, # True if the text is italicized.
29996 "underline": True or False, # True if the text is underlined.
29997 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029998 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
29999 "angle": 42, # The angle between the standard orientation and the desired orientation.
30000 # Measured in degrees. Valid values are between -90 and 90. Positive
30001 # angles are angled upwards, negative are angled downwards.
30002 #
30003 # Note: For LTR text direction positive angles are in the counterclockwise
30004 # direction, whereas for RTL they are in the clockwise direction
30005 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
30006 # characters is unchanged.
30007 # For example:
30008 #
30009 # | V |
30010 # | e |
30011 # | r |
30012 # | t |
30013 # | i |
30014 # | c |
30015 # | a |
30016 # | l |
30017 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080030018 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
30019 "borders": { # The borders of the cell. # The borders of the cell.
30020 "top": { # A border along a cell. # The top border of the cell.
30021 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30022 # for simplicity of conversion to/from color representations in various
30023 # languages over compactness; for example, the fields of this representation
30024 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30025 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30026 # method in iOS; and, with just a little work, it can be easily formatted into
30027 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30028 #
30029 # Example (Java):
30030 #
30031 # import com.google.type.Color;
30032 #
30033 # // ...
30034 # public static java.awt.Color fromProto(Color protocolor) {
30035 # float alpha = protocolor.hasAlpha()
30036 # ? protocolor.getAlpha().getValue()
30037 # : 1.0;
30038 #
30039 # return new java.awt.Color(
30040 # protocolor.getRed(),
30041 # protocolor.getGreen(),
30042 # protocolor.getBlue(),
30043 # alpha);
30044 # }
30045 #
30046 # public static Color toProto(java.awt.Color color) {
30047 # float red = (float) color.getRed();
30048 # float green = (float) color.getGreen();
30049 # float blue = (float) color.getBlue();
30050 # float denominator = 255.0;
30051 # Color.Builder resultBuilder =
30052 # Color
30053 # .newBuilder()
30054 # .setRed(red / denominator)
30055 # .setGreen(green / denominator)
30056 # .setBlue(blue / denominator);
30057 # int alpha = color.getAlpha();
30058 # if (alpha != 255) {
30059 # result.setAlpha(
30060 # FloatValue
30061 # .newBuilder()
30062 # .setValue(((float) alpha) / denominator)
30063 # .build());
30064 # }
30065 # return resultBuilder.build();
30066 # }
30067 # // ...
30068 #
30069 # Example (iOS / Obj-C):
30070 #
30071 # // ...
30072 # static UIColor* fromProto(Color* protocolor) {
30073 # float red = [protocolor red];
30074 # float green = [protocolor green];
30075 # float blue = [protocolor blue];
30076 # FloatValue* alpha_wrapper = [protocolor alpha];
30077 # float alpha = 1.0;
30078 # if (alpha_wrapper != nil) {
30079 # alpha = [alpha_wrapper value];
30080 # }
30081 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30082 # }
30083 #
30084 # static Color* toProto(UIColor* color) {
30085 # CGFloat red, green, blue, alpha;
30086 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30087 # return nil;
30088 # }
30089 # Color* result = [Color alloc] init];
30090 # [result setRed:red];
30091 # [result setGreen:green];
30092 # [result setBlue:blue];
30093 # if (alpha <= 0.9999) {
30094 # [result setAlpha:floatWrapperWithValue(alpha)];
30095 # }
30096 # [result autorelease];
30097 # return result;
30098 # }
30099 # // ...
30100 #
30101 # Example (JavaScript):
30102 #
30103 # // ...
30104 #
30105 # var protoToCssColor = function(rgb_color) {
30106 # var redFrac = rgb_color.red || 0.0;
30107 # var greenFrac = rgb_color.green || 0.0;
30108 # var blueFrac = rgb_color.blue || 0.0;
30109 # var red = Math.floor(redFrac * 255);
30110 # var green = Math.floor(greenFrac * 255);
30111 # var blue = Math.floor(blueFrac * 255);
30112 #
30113 # if (!('alpha' in rgb_color)) {
30114 # return rgbToCssColor_(red, green, blue);
30115 # }
30116 #
30117 # var alphaFrac = rgb_color.alpha.value || 0.0;
30118 # var rgbParams = [red, green, blue].join(',');
30119 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30120 # };
30121 #
30122 # var rgbToCssColor_ = function(red, green, blue) {
30123 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30124 # var hexString = rgbNumber.toString(16);
30125 # var missingZeros = 6 - hexString.length;
30126 # var resultBuilder = ['#'];
30127 # for (var i = 0; i < missingZeros; i++) {
30128 # resultBuilder.push('0');
30129 # }
30130 # resultBuilder.push(hexString);
30131 # return resultBuilder.join('');
30132 # };
30133 #
30134 # // ...
30135 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30136 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30137 # the final pixel color is defined by the equation:
30138 #
30139 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30140 #
30141 # This means that a value of 1.0 corresponds to a solid color, whereas
30142 # a value of 0.0 corresponds to a completely transparent color. This
30143 # uses a wrapper message rather than a simple float scalar so that it is
30144 # possible to distinguish between a default value and the value being unset.
30145 # If omitted, this color object is to be rendered as a solid color
30146 # (as if the alpha value had been explicitly given with a value of 1.0).
30147 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30148 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30149 },
30150 "width": 42, # The width of the border, in pixels.
30151 # Deprecated; the width is determined by the "style" field.
30152 "style": "A String", # The style of the border.
30153 },
30154 "right": { # A border along a cell. # The right border of the cell.
30155 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30156 # for simplicity of conversion to/from color representations in various
30157 # languages over compactness; for example, the fields of this representation
30158 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30159 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30160 # method in iOS; and, with just a little work, it can be easily formatted into
30161 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30162 #
30163 # Example (Java):
30164 #
30165 # import com.google.type.Color;
30166 #
30167 # // ...
30168 # public static java.awt.Color fromProto(Color protocolor) {
30169 # float alpha = protocolor.hasAlpha()
30170 # ? protocolor.getAlpha().getValue()
30171 # : 1.0;
30172 #
30173 # return new java.awt.Color(
30174 # protocolor.getRed(),
30175 # protocolor.getGreen(),
30176 # protocolor.getBlue(),
30177 # alpha);
30178 # }
30179 #
30180 # public static Color toProto(java.awt.Color color) {
30181 # float red = (float) color.getRed();
30182 # float green = (float) color.getGreen();
30183 # float blue = (float) color.getBlue();
30184 # float denominator = 255.0;
30185 # Color.Builder resultBuilder =
30186 # Color
30187 # .newBuilder()
30188 # .setRed(red / denominator)
30189 # .setGreen(green / denominator)
30190 # .setBlue(blue / denominator);
30191 # int alpha = color.getAlpha();
30192 # if (alpha != 255) {
30193 # result.setAlpha(
30194 # FloatValue
30195 # .newBuilder()
30196 # .setValue(((float) alpha) / denominator)
30197 # .build());
30198 # }
30199 # return resultBuilder.build();
30200 # }
30201 # // ...
30202 #
30203 # Example (iOS / Obj-C):
30204 #
30205 # // ...
30206 # static UIColor* fromProto(Color* protocolor) {
30207 # float red = [protocolor red];
30208 # float green = [protocolor green];
30209 # float blue = [protocolor blue];
30210 # FloatValue* alpha_wrapper = [protocolor alpha];
30211 # float alpha = 1.0;
30212 # if (alpha_wrapper != nil) {
30213 # alpha = [alpha_wrapper value];
30214 # }
30215 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30216 # }
30217 #
30218 # static Color* toProto(UIColor* color) {
30219 # CGFloat red, green, blue, alpha;
30220 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30221 # return nil;
30222 # }
30223 # Color* result = [Color alloc] init];
30224 # [result setRed:red];
30225 # [result setGreen:green];
30226 # [result setBlue:blue];
30227 # if (alpha <= 0.9999) {
30228 # [result setAlpha:floatWrapperWithValue(alpha)];
30229 # }
30230 # [result autorelease];
30231 # return result;
30232 # }
30233 # // ...
30234 #
30235 # Example (JavaScript):
30236 #
30237 # // ...
30238 #
30239 # var protoToCssColor = function(rgb_color) {
30240 # var redFrac = rgb_color.red || 0.0;
30241 # var greenFrac = rgb_color.green || 0.0;
30242 # var blueFrac = rgb_color.blue || 0.0;
30243 # var red = Math.floor(redFrac * 255);
30244 # var green = Math.floor(greenFrac * 255);
30245 # var blue = Math.floor(blueFrac * 255);
30246 #
30247 # if (!('alpha' in rgb_color)) {
30248 # return rgbToCssColor_(red, green, blue);
30249 # }
30250 #
30251 # var alphaFrac = rgb_color.alpha.value || 0.0;
30252 # var rgbParams = [red, green, blue].join(',');
30253 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30254 # };
30255 #
30256 # var rgbToCssColor_ = function(red, green, blue) {
30257 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30258 # var hexString = rgbNumber.toString(16);
30259 # var missingZeros = 6 - hexString.length;
30260 # var resultBuilder = ['#'];
30261 # for (var i = 0; i < missingZeros; i++) {
30262 # resultBuilder.push('0');
30263 # }
30264 # resultBuilder.push(hexString);
30265 # return resultBuilder.join('');
30266 # };
30267 #
30268 # // ...
30269 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30270 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30271 # the final pixel color is defined by the equation:
30272 #
30273 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30274 #
30275 # This means that a value of 1.0 corresponds to a solid color, whereas
30276 # a value of 0.0 corresponds to a completely transparent color. This
30277 # uses a wrapper message rather than a simple float scalar so that it is
30278 # possible to distinguish between a default value and the value being unset.
30279 # If omitted, this color object is to be rendered as a solid color
30280 # (as if the alpha value had been explicitly given with a value of 1.0).
30281 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30282 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30283 },
30284 "width": 42, # The width of the border, in pixels.
30285 # Deprecated; the width is determined by the "style" field.
30286 "style": "A String", # The style of the border.
30287 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080030288 "left": { # A border along a cell. # The left border of the cell.
30289 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30290 # for simplicity of conversion to/from color representations in various
30291 # languages over compactness; for example, the fields of this representation
30292 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30293 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30294 # method in iOS; and, with just a little work, it can be easily formatted into
30295 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30296 #
30297 # Example (Java):
30298 #
30299 # import com.google.type.Color;
30300 #
30301 # // ...
30302 # public static java.awt.Color fromProto(Color protocolor) {
30303 # float alpha = protocolor.hasAlpha()
30304 # ? protocolor.getAlpha().getValue()
30305 # : 1.0;
30306 #
30307 # return new java.awt.Color(
30308 # protocolor.getRed(),
30309 # protocolor.getGreen(),
30310 # protocolor.getBlue(),
30311 # alpha);
30312 # }
30313 #
30314 # public static Color toProto(java.awt.Color color) {
30315 # float red = (float) color.getRed();
30316 # float green = (float) color.getGreen();
30317 # float blue = (float) color.getBlue();
30318 # float denominator = 255.0;
30319 # Color.Builder resultBuilder =
30320 # Color
30321 # .newBuilder()
30322 # .setRed(red / denominator)
30323 # .setGreen(green / denominator)
30324 # .setBlue(blue / denominator);
30325 # int alpha = color.getAlpha();
30326 # if (alpha != 255) {
30327 # result.setAlpha(
30328 # FloatValue
30329 # .newBuilder()
30330 # .setValue(((float) alpha) / denominator)
30331 # .build());
30332 # }
30333 # return resultBuilder.build();
30334 # }
30335 # // ...
30336 #
30337 # Example (iOS / Obj-C):
30338 #
30339 # // ...
30340 # static UIColor* fromProto(Color* protocolor) {
30341 # float red = [protocolor red];
30342 # float green = [protocolor green];
30343 # float blue = [protocolor blue];
30344 # FloatValue* alpha_wrapper = [protocolor alpha];
30345 # float alpha = 1.0;
30346 # if (alpha_wrapper != nil) {
30347 # alpha = [alpha_wrapper value];
30348 # }
30349 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30350 # }
30351 #
30352 # static Color* toProto(UIColor* color) {
30353 # CGFloat red, green, blue, alpha;
30354 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30355 # return nil;
30356 # }
30357 # Color* result = [Color alloc] init];
30358 # [result setRed:red];
30359 # [result setGreen:green];
30360 # [result setBlue:blue];
30361 # if (alpha <= 0.9999) {
30362 # [result setAlpha:floatWrapperWithValue(alpha)];
30363 # }
30364 # [result autorelease];
30365 # return result;
30366 # }
30367 # // ...
30368 #
30369 # Example (JavaScript):
30370 #
30371 # // ...
30372 #
30373 # var protoToCssColor = function(rgb_color) {
30374 # var redFrac = rgb_color.red || 0.0;
30375 # var greenFrac = rgb_color.green || 0.0;
30376 # var blueFrac = rgb_color.blue || 0.0;
30377 # var red = Math.floor(redFrac * 255);
30378 # var green = Math.floor(greenFrac * 255);
30379 # var blue = Math.floor(blueFrac * 255);
30380 #
30381 # if (!('alpha' in rgb_color)) {
30382 # return rgbToCssColor_(red, green, blue);
30383 # }
30384 #
30385 # var alphaFrac = rgb_color.alpha.value || 0.0;
30386 # var rgbParams = [red, green, blue].join(',');
30387 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30388 # };
30389 #
30390 # var rgbToCssColor_ = function(red, green, blue) {
30391 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30392 # var hexString = rgbNumber.toString(16);
30393 # var missingZeros = 6 - hexString.length;
30394 # var resultBuilder = ['#'];
30395 # for (var i = 0; i < missingZeros; i++) {
30396 # resultBuilder.push('0');
30397 # }
30398 # resultBuilder.push(hexString);
30399 # return resultBuilder.join('');
30400 # };
30401 #
30402 # // ...
30403 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30404 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30405 # the final pixel color is defined by the equation:
30406 #
30407 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30408 #
30409 # This means that a value of 1.0 corresponds to a solid color, whereas
30410 # a value of 0.0 corresponds to a completely transparent color. This
30411 # uses a wrapper message rather than a simple float scalar so that it is
30412 # possible to distinguish between a default value and the value being unset.
30413 # If omitted, this color object is to be rendered as a solid color
30414 # (as if the alpha value had been explicitly given with a value of 1.0).
30415 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30416 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30417 },
30418 "width": 42, # The width of the border, in pixels.
30419 # Deprecated; the width is determined by the "style" field.
30420 "style": "A String", # The style of the border.
30421 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070030422 "bottom": { # A border along a cell. # The bottom border of the cell.
30423 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30424 # for simplicity of conversion to/from color representations in various
30425 # languages over compactness; for example, the fields of this representation
30426 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30427 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30428 # method in iOS; and, with just a little work, it can be easily formatted into
30429 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30430 #
30431 # Example (Java):
30432 #
30433 # import com.google.type.Color;
30434 #
30435 # // ...
30436 # public static java.awt.Color fromProto(Color protocolor) {
30437 # float alpha = protocolor.hasAlpha()
30438 # ? protocolor.getAlpha().getValue()
30439 # : 1.0;
30440 #
30441 # return new java.awt.Color(
30442 # protocolor.getRed(),
30443 # protocolor.getGreen(),
30444 # protocolor.getBlue(),
30445 # alpha);
30446 # }
30447 #
30448 # public static Color toProto(java.awt.Color color) {
30449 # float red = (float) color.getRed();
30450 # float green = (float) color.getGreen();
30451 # float blue = (float) color.getBlue();
30452 # float denominator = 255.0;
30453 # Color.Builder resultBuilder =
30454 # Color
30455 # .newBuilder()
30456 # .setRed(red / denominator)
30457 # .setGreen(green / denominator)
30458 # .setBlue(blue / denominator);
30459 # int alpha = color.getAlpha();
30460 # if (alpha != 255) {
30461 # result.setAlpha(
30462 # FloatValue
30463 # .newBuilder()
30464 # .setValue(((float) alpha) / denominator)
30465 # .build());
30466 # }
30467 # return resultBuilder.build();
30468 # }
30469 # // ...
30470 #
30471 # Example (iOS / Obj-C):
30472 #
30473 # // ...
30474 # static UIColor* fromProto(Color* protocolor) {
30475 # float red = [protocolor red];
30476 # float green = [protocolor green];
30477 # float blue = [protocolor blue];
30478 # FloatValue* alpha_wrapper = [protocolor alpha];
30479 # float alpha = 1.0;
30480 # if (alpha_wrapper != nil) {
30481 # alpha = [alpha_wrapper value];
30482 # }
30483 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30484 # }
30485 #
30486 # static Color* toProto(UIColor* color) {
30487 # CGFloat red, green, blue, alpha;
30488 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30489 # return nil;
30490 # }
30491 # Color* result = [Color alloc] init];
30492 # [result setRed:red];
30493 # [result setGreen:green];
30494 # [result setBlue:blue];
30495 # if (alpha <= 0.9999) {
30496 # [result setAlpha:floatWrapperWithValue(alpha)];
30497 # }
30498 # [result autorelease];
30499 # return result;
30500 # }
30501 # // ...
30502 #
30503 # Example (JavaScript):
30504 #
30505 # // ...
30506 #
30507 # var protoToCssColor = function(rgb_color) {
30508 # var redFrac = rgb_color.red || 0.0;
30509 # var greenFrac = rgb_color.green || 0.0;
30510 # var blueFrac = rgb_color.blue || 0.0;
30511 # var red = Math.floor(redFrac * 255);
30512 # var green = Math.floor(greenFrac * 255);
30513 # var blue = Math.floor(blueFrac * 255);
30514 #
30515 # if (!('alpha' in rgb_color)) {
30516 # return rgbToCssColor_(red, green, blue);
30517 # }
30518 #
30519 # var alphaFrac = rgb_color.alpha.value || 0.0;
30520 # var rgbParams = [red, green, blue].join(',');
30521 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30522 # };
30523 #
30524 # var rgbToCssColor_ = function(red, green, blue) {
30525 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30526 # var hexString = rgbNumber.toString(16);
30527 # var missingZeros = 6 - hexString.length;
30528 # var resultBuilder = ['#'];
30529 # for (var i = 0; i < missingZeros; i++) {
30530 # resultBuilder.push('0');
30531 # }
30532 # resultBuilder.push(hexString);
30533 # return resultBuilder.join('');
30534 # };
30535 #
30536 # // ...
30537 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30538 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30539 # the final pixel color is defined by the equation:
30540 #
30541 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30542 #
30543 # This means that a value of 1.0 corresponds to a solid color, whereas
30544 # a value of 0.0 corresponds to a completely transparent color. This
30545 # uses a wrapper message rather than a simple float scalar so that it is
30546 # possible to distinguish between a default value and the value being unset.
30547 # If omitted, this color object is to be rendered as a solid color
30548 # (as if the alpha value had been explicitly given with a value of 1.0).
30549 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30550 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30551 },
30552 "width": 42, # The width of the border, in pixels.
30553 # Deprecated; the width is determined by the "style" field.
30554 "style": "A String", # The style of the border.
30555 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080030556 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070030557 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080030558 },
30559 },
30560 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
30561 # the interpolation points listed. The format of a cell will vary
30562 # based on its contents as compared to the values of the interpolation
30563 # points.
30564 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
30565 # These pin the gradient color scale according to the color,
30566 # type and value chosen.
30567 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30568 # for simplicity of conversion to/from color representations in various
30569 # languages over compactness; for example, the fields of this representation
30570 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30571 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30572 # method in iOS; and, with just a little work, it can be easily formatted into
30573 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30574 #
30575 # Example (Java):
30576 #
30577 # import com.google.type.Color;
30578 #
30579 # // ...
30580 # public static java.awt.Color fromProto(Color protocolor) {
30581 # float alpha = protocolor.hasAlpha()
30582 # ? protocolor.getAlpha().getValue()
30583 # : 1.0;
30584 #
30585 # return new java.awt.Color(
30586 # protocolor.getRed(),
30587 # protocolor.getGreen(),
30588 # protocolor.getBlue(),
30589 # alpha);
30590 # }
30591 #
30592 # public static Color toProto(java.awt.Color color) {
30593 # float red = (float) color.getRed();
30594 # float green = (float) color.getGreen();
30595 # float blue = (float) color.getBlue();
30596 # float denominator = 255.0;
30597 # Color.Builder resultBuilder =
30598 # Color
30599 # .newBuilder()
30600 # .setRed(red / denominator)
30601 # .setGreen(green / denominator)
30602 # .setBlue(blue / denominator);
30603 # int alpha = color.getAlpha();
30604 # if (alpha != 255) {
30605 # result.setAlpha(
30606 # FloatValue
30607 # .newBuilder()
30608 # .setValue(((float) alpha) / denominator)
30609 # .build());
30610 # }
30611 # return resultBuilder.build();
30612 # }
30613 # // ...
30614 #
30615 # Example (iOS / Obj-C):
30616 #
30617 # // ...
30618 # static UIColor* fromProto(Color* protocolor) {
30619 # float red = [protocolor red];
30620 # float green = [protocolor green];
30621 # float blue = [protocolor blue];
30622 # FloatValue* alpha_wrapper = [protocolor alpha];
30623 # float alpha = 1.0;
30624 # if (alpha_wrapper != nil) {
30625 # alpha = [alpha_wrapper value];
30626 # }
30627 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30628 # }
30629 #
30630 # static Color* toProto(UIColor* color) {
30631 # CGFloat red, green, blue, alpha;
30632 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30633 # return nil;
30634 # }
30635 # Color* result = [Color alloc] init];
30636 # [result setRed:red];
30637 # [result setGreen:green];
30638 # [result setBlue:blue];
30639 # if (alpha <= 0.9999) {
30640 # [result setAlpha:floatWrapperWithValue(alpha)];
30641 # }
30642 # [result autorelease];
30643 # return result;
30644 # }
30645 # // ...
30646 #
30647 # Example (JavaScript):
30648 #
30649 # // ...
30650 #
30651 # var protoToCssColor = function(rgb_color) {
30652 # var redFrac = rgb_color.red || 0.0;
30653 # var greenFrac = rgb_color.green || 0.0;
30654 # var blueFrac = rgb_color.blue || 0.0;
30655 # var red = Math.floor(redFrac * 255);
30656 # var green = Math.floor(greenFrac * 255);
30657 # var blue = Math.floor(blueFrac * 255);
30658 #
30659 # if (!('alpha' in rgb_color)) {
30660 # return rgbToCssColor_(red, green, blue);
30661 # }
30662 #
30663 # var alphaFrac = rgb_color.alpha.value || 0.0;
30664 # var rgbParams = [red, green, blue].join(',');
30665 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30666 # };
30667 #
30668 # var rgbToCssColor_ = function(red, green, blue) {
30669 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30670 # var hexString = rgbNumber.toString(16);
30671 # var missingZeros = 6 - hexString.length;
30672 # var resultBuilder = ['#'];
30673 # for (var i = 0; i < missingZeros; i++) {
30674 # resultBuilder.push('0');
30675 # }
30676 # resultBuilder.push(hexString);
30677 # return resultBuilder.join('');
30678 # };
30679 #
30680 # // ...
30681 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30682 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30683 # the final pixel color is defined by the equation:
30684 #
30685 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30686 #
30687 # This means that a value of 1.0 corresponds to a solid color, whereas
30688 # a value of 0.0 corresponds to a completely transparent color. This
30689 # uses a wrapper message rather than a simple float scalar so that it is
30690 # possible to distinguish between a default value and the value being unset.
30691 # If omitted, this color object is to be rendered as a solid color
30692 # (as if the alpha value had been explicitly given with a value of 1.0).
30693 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30694 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30695 },
30696 "type": "A String", # How the value should be interpreted.
30697 "value": "A String", # The value this interpolation point uses. May be a formula.
30698 # Unused if type is MIN or
30699 # MAX.
30700 },
30701 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
30702 # These pin the gradient color scale according to the color,
30703 # type and value chosen.
30704 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30705 # for simplicity of conversion to/from color representations in various
30706 # languages over compactness; for example, the fields of this representation
30707 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30708 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30709 # method in iOS; and, with just a little work, it can be easily formatted into
30710 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30711 #
30712 # Example (Java):
30713 #
30714 # import com.google.type.Color;
30715 #
30716 # // ...
30717 # public static java.awt.Color fromProto(Color protocolor) {
30718 # float alpha = protocolor.hasAlpha()
30719 # ? protocolor.getAlpha().getValue()
30720 # : 1.0;
30721 #
30722 # return new java.awt.Color(
30723 # protocolor.getRed(),
30724 # protocolor.getGreen(),
30725 # protocolor.getBlue(),
30726 # alpha);
30727 # }
30728 #
30729 # public static Color toProto(java.awt.Color color) {
30730 # float red = (float) color.getRed();
30731 # float green = (float) color.getGreen();
30732 # float blue = (float) color.getBlue();
30733 # float denominator = 255.0;
30734 # Color.Builder resultBuilder =
30735 # Color
30736 # .newBuilder()
30737 # .setRed(red / denominator)
30738 # .setGreen(green / denominator)
30739 # .setBlue(blue / denominator);
30740 # int alpha = color.getAlpha();
30741 # if (alpha != 255) {
30742 # result.setAlpha(
30743 # FloatValue
30744 # .newBuilder()
30745 # .setValue(((float) alpha) / denominator)
30746 # .build());
30747 # }
30748 # return resultBuilder.build();
30749 # }
30750 # // ...
30751 #
30752 # Example (iOS / Obj-C):
30753 #
30754 # // ...
30755 # static UIColor* fromProto(Color* protocolor) {
30756 # float red = [protocolor red];
30757 # float green = [protocolor green];
30758 # float blue = [protocolor blue];
30759 # FloatValue* alpha_wrapper = [protocolor alpha];
30760 # float alpha = 1.0;
30761 # if (alpha_wrapper != nil) {
30762 # alpha = [alpha_wrapper value];
30763 # }
30764 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30765 # }
30766 #
30767 # static Color* toProto(UIColor* color) {
30768 # CGFloat red, green, blue, alpha;
30769 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30770 # return nil;
30771 # }
30772 # Color* result = [Color alloc] init];
30773 # [result setRed:red];
30774 # [result setGreen:green];
30775 # [result setBlue:blue];
30776 # if (alpha <= 0.9999) {
30777 # [result setAlpha:floatWrapperWithValue(alpha)];
30778 # }
30779 # [result autorelease];
30780 # return result;
30781 # }
30782 # // ...
30783 #
30784 # Example (JavaScript):
30785 #
30786 # // ...
30787 #
30788 # var protoToCssColor = function(rgb_color) {
30789 # var redFrac = rgb_color.red || 0.0;
30790 # var greenFrac = rgb_color.green || 0.0;
30791 # var blueFrac = rgb_color.blue || 0.0;
30792 # var red = Math.floor(redFrac * 255);
30793 # var green = Math.floor(greenFrac * 255);
30794 # var blue = Math.floor(blueFrac * 255);
30795 #
30796 # if (!('alpha' in rgb_color)) {
30797 # return rgbToCssColor_(red, green, blue);
30798 # }
30799 #
30800 # var alphaFrac = rgb_color.alpha.value || 0.0;
30801 # var rgbParams = [red, green, blue].join(',');
30802 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30803 # };
30804 #
30805 # var rgbToCssColor_ = function(red, green, blue) {
30806 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30807 # var hexString = rgbNumber.toString(16);
30808 # var missingZeros = 6 - hexString.length;
30809 # var resultBuilder = ['#'];
30810 # for (var i = 0; i < missingZeros; i++) {
30811 # resultBuilder.push('0');
30812 # }
30813 # resultBuilder.push(hexString);
30814 # return resultBuilder.join('');
30815 # };
30816 #
30817 # // ...
30818 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30819 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30820 # the final pixel color is defined by the equation:
30821 #
30822 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30823 #
30824 # This means that a value of 1.0 corresponds to a solid color, whereas
30825 # a value of 0.0 corresponds to a completely transparent color. This
30826 # uses a wrapper message rather than a simple float scalar so that it is
30827 # possible to distinguish between a default value and the value being unset.
30828 # If omitted, this color object is to be rendered as a solid color
30829 # (as if the alpha value had been explicitly given with a value of 1.0).
30830 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30831 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30832 },
30833 "type": "A String", # How the value should be interpreted.
30834 "value": "A String", # The value this interpolation point uses. May be a formula.
30835 # Unused if type is MIN or
30836 # MAX.
30837 },
30838 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
30839 # These pin the gradient color scale according to the color,
30840 # type and value chosen.
30841 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
30842 # for simplicity of conversion to/from color representations in various
30843 # languages over compactness; for example, the fields of this representation
30844 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30845 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30846 # method in iOS; and, with just a little work, it can be easily formatted into
30847 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30848 #
30849 # Example (Java):
30850 #
30851 # import com.google.type.Color;
30852 #
30853 # // ...
30854 # public static java.awt.Color fromProto(Color protocolor) {
30855 # float alpha = protocolor.hasAlpha()
30856 # ? protocolor.getAlpha().getValue()
30857 # : 1.0;
30858 #
30859 # return new java.awt.Color(
30860 # protocolor.getRed(),
30861 # protocolor.getGreen(),
30862 # protocolor.getBlue(),
30863 # alpha);
30864 # }
30865 #
30866 # public static Color toProto(java.awt.Color color) {
30867 # float red = (float) color.getRed();
30868 # float green = (float) color.getGreen();
30869 # float blue = (float) color.getBlue();
30870 # float denominator = 255.0;
30871 # Color.Builder resultBuilder =
30872 # Color
30873 # .newBuilder()
30874 # .setRed(red / denominator)
30875 # .setGreen(green / denominator)
30876 # .setBlue(blue / denominator);
30877 # int alpha = color.getAlpha();
30878 # if (alpha != 255) {
30879 # result.setAlpha(
30880 # FloatValue
30881 # .newBuilder()
30882 # .setValue(((float) alpha) / denominator)
30883 # .build());
30884 # }
30885 # return resultBuilder.build();
30886 # }
30887 # // ...
30888 #
30889 # Example (iOS / Obj-C):
30890 #
30891 # // ...
30892 # static UIColor* fromProto(Color* protocolor) {
30893 # float red = [protocolor red];
30894 # float green = [protocolor green];
30895 # float blue = [protocolor blue];
30896 # FloatValue* alpha_wrapper = [protocolor alpha];
30897 # float alpha = 1.0;
30898 # if (alpha_wrapper != nil) {
30899 # alpha = [alpha_wrapper value];
30900 # }
30901 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30902 # }
30903 #
30904 # static Color* toProto(UIColor* color) {
30905 # CGFloat red, green, blue, alpha;
30906 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30907 # return nil;
30908 # }
30909 # Color* result = [Color alloc] init];
30910 # [result setRed:red];
30911 # [result setGreen:green];
30912 # [result setBlue:blue];
30913 # if (alpha <= 0.9999) {
30914 # [result setAlpha:floatWrapperWithValue(alpha)];
30915 # }
30916 # [result autorelease];
30917 # return result;
30918 # }
30919 # // ...
30920 #
30921 # Example (JavaScript):
30922 #
30923 # // ...
30924 #
30925 # var protoToCssColor = function(rgb_color) {
30926 # var redFrac = rgb_color.red || 0.0;
30927 # var greenFrac = rgb_color.green || 0.0;
30928 # var blueFrac = rgb_color.blue || 0.0;
30929 # var red = Math.floor(redFrac * 255);
30930 # var green = Math.floor(greenFrac * 255);
30931 # var blue = Math.floor(blueFrac * 255);
30932 #
30933 # if (!('alpha' in rgb_color)) {
30934 # return rgbToCssColor_(red, green, blue);
30935 # }
30936 #
30937 # var alphaFrac = rgb_color.alpha.value || 0.0;
30938 # var rgbParams = [red, green, blue].join(',');
30939 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30940 # };
30941 #
30942 # var rgbToCssColor_ = function(red, green, blue) {
30943 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30944 # var hexString = rgbNumber.toString(16);
30945 # var missingZeros = 6 - hexString.length;
30946 # var resultBuilder = ['#'];
30947 # for (var i = 0; i < missingZeros; i++) {
30948 # resultBuilder.push('0');
30949 # }
30950 # resultBuilder.push(hexString);
30951 # return resultBuilder.join('');
30952 # };
30953 #
30954 # // ...
30955 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30956 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30957 # the final pixel color is defined by the equation:
30958 #
30959 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30960 #
30961 # This means that a value of 1.0 corresponds to a solid color, whereas
30962 # a value of 0.0 corresponds to a completely transparent color. This
30963 # uses a wrapper message rather than a simple float scalar so that it is
30964 # possible to distinguish between a default value and the value being unset.
30965 # If omitted, this color object is to be rendered as a solid color
30966 # (as if the alpha value had been explicitly given with a value of 1.0).
30967 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30968 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30969 },
30970 "type": "A String", # How the value should be interpreted.
30971 "value": "A String", # The value this interpolation point uses. May be a formula.
30972 # Unused if type is MIN or
30973 # MAX.
30974 },
30975 },
30976 },
30977 ],
30978 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
30979 { # A banded (alternating colors) range in a sheet.
30980 "range": { # A range on a sheet. # The range over which these properties are applied.
30981 # All indexes are zero-based.
30982 # Indexes are half open, e.g the start index is inclusive
30983 # and the end index is exclusive -- [start_index, end_index).
30984 # Missing indexes indicate the range is unbounded on that side.
30985 #
30986 # For example, if `"Sheet1"` is sheet ID 0, then:
30987 #
30988 # `Sheet1!A1:A1 == sheet_id: 0,
30989 # start_row_index: 0, end_row_index: 1,
30990 # start_column_index: 0, end_column_index: 1`
30991 #
30992 # `Sheet1!A3:B4 == sheet_id: 0,
30993 # start_row_index: 2, end_row_index: 4,
30994 # start_column_index: 0, end_column_index: 2`
30995 #
30996 # `Sheet1!A:B == sheet_id: 0,
30997 # start_column_index: 0, end_column_index: 2`
30998 #
30999 # `Sheet1!A5:B == sheet_id: 0,
31000 # start_row_index: 4,
31001 # start_column_index: 0, end_column_index: 2`
31002 #
31003 # `Sheet1 == sheet_id:0`
31004 #
31005 # The start index must always be less than or equal to the end index.
31006 # If the start index equals the end index, then the range is empty.
31007 # Empty ranges are typically not meaningful and are usually rendered in the
31008 # UI as `#REF!`.
31009 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070031010 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080031011 "sheetId": 42, # The sheet this range is on.
31012 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070031013 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080031014 },
31015 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
31016 # by-column basis throughout all the columns in the range. At least one of
31017 # row_properties or column_properties must be specified.
31018 # BandedRange.row_properties and BandedRange.column_properties are
31019 # set, the fill colors are applied to cells according to the following rules:
31020 #
31021 # * header_color and footer_color take priority over band colors.
31022 # * first_band_color takes priority over second_band_color.
31023 # * row_properties takes priority over column_properties.
31024 #
31025 # For example, the first row color takes priority over the first column
31026 # color, but the first column color takes priority over the second row color.
31027 # Similarly, the row header takes priority over the column header in the
31028 # top left cell, but the column header takes priority over the first row
31029 # color if the row header is not set.
31030 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
31031 # for simplicity of conversion to/from color representations in various
31032 # languages over compactness; for example, the fields of this representation
31033 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31034 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31035 # method in iOS; and, with just a little work, it can be easily formatted into
31036 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31037 #
31038 # Example (Java):
31039 #
31040 # import com.google.type.Color;
31041 #
31042 # // ...
31043 # public static java.awt.Color fromProto(Color protocolor) {
31044 # float alpha = protocolor.hasAlpha()
31045 # ? protocolor.getAlpha().getValue()
31046 # : 1.0;
31047 #
31048 # return new java.awt.Color(
31049 # protocolor.getRed(),
31050 # protocolor.getGreen(),
31051 # protocolor.getBlue(),
31052 # alpha);
31053 # }
31054 #
31055 # public static Color toProto(java.awt.Color color) {
31056 # float red = (float) color.getRed();
31057 # float green = (float) color.getGreen();
31058 # float blue = (float) color.getBlue();
31059 # float denominator = 255.0;
31060 # Color.Builder resultBuilder =
31061 # Color
31062 # .newBuilder()
31063 # .setRed(red / denominator)
31064 # .setGreen(green / denominator)
31065 # .setBlue(blue / denominator);
31066 # int alpha = color.getAlpha();
31067 # if (alpha != 255) {
31068 # result.setAlpha(
31069 # FloatValue
31070 # .newBuilder()
31071 # .setValue(((float) alpha) / denominator)
31072 # .build());
31073 # }
31074 # return resultBuilder.build();
31075 # }
31076 # // ...
31077 #
31078 # Example (iOS / Obj-C):
31079 #
31080 # // ...
31081 # static UIColor* fromProto(Color* protocolor) {
31082 # float red = [protocolor red];
31083 # float green = [protocolor green];
31084 # float blue = [protocolor blue];
31085 # FloatValue* alpha_wrapper = [protocolor alpha];
31086 # float alpha = 1.0;
31087 # if (alpha_wrapper != nil) {
31088 # alpha = [alpha_wrapper value];
31089 # }
31090 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31091 # }
31092 #
31093 # static Color* toProto(UIColor* color) {
31094 # CGFloat red, green, blue, alpha;
31095 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31096 # return nil;
31097 # }
31098 # Color* result = [Color alloc] init];
31099 # [result setRed:red];
31100 # [result setGreen:green];
31101 # [result setBlue:blue];
31102 # if (alpha <= 0.9999) {
31103 # [result setAlpha:floatWrapperWithValue(alpha)];
31104 # }
31105 # [result autorelease];
31106 # return result;
31107 # }
31108 # // ...
31109 #
31110 # Example (JavaScript):
31111 #
31112 # // ...
31113 #
31114 # var protoToCssColor = function(rgb_color) {
31115 # var redFrac = rgb_color.red || 0.0;
31116 # var greenFrac = rgb_color.green || 0.0;
31117 # var blueFrac = rgb_color.blue || 0.0;
31118 # var red = Math.floor(redFrac * 255);
31119 # var green = Math.floor(greenFrac * 255);
31120 # var blue = Math.floor(blueFrac * 255);
31121 #
31122 # if (!('alpha' in rgb_color)) {
31123 # return rgbToCssColor_(red, green, blue);
31124 # }
31125 #
31126 # var alphaFrac = rgb_color.alpha.value || 0.0;
31127 # var rgbParams = [red, green, blue].join(',');
31128 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31129 # };
31130 #
31131 # var rgbToCssColor_ = function(red, green, blue) {
31132 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31133 # var hexString = rgbNumber.toString(16);
31134 # var missingZeros = 6 - hexString.length;
31135 # var resultBuilder = ['#'];
31136 # for (var i = 0; i < missingZeros; i++) {
31137 # resultBuilder.push('0');
31138 # }
31139 # resultBuilder.push(hexString);
31140 # return resultBuilder.join('');
31141 # };
31142 #
31143 # // ...
31144 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31145 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31146 # the final pixel color is defined by the equation:
31147 #
31148 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31149 #
31150 # This means that a value of 1.0 corresponds to a solid color, whereas
31151 # a value of 0.0 corresponds to a completely transparent color. This
31152 # uses a wrapper message rather than a simple float scalar so that it is
31153 # possible to distinguish between a default value and the value being unset.
31154 # If omitted, this color object is to be rendered as a solid color
31155 # (as if the alpha value had been explicitly given with a value of 1.0).
31156 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31157 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31158 },
31159 "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
31160 # row or column will be filled with this color and the colors will
31161 # alternate between first_band_color and second_band_color starting
31162 # from the second row or column. Otherwise, the first row or column will be
31163 # filled with first_band_color and the colors will proceed to alternate
31164 # as they normally would.
31165 # for simplicity of conversion to/from color representations in various
31166 # languages over compactness; for example, the fields of this representation
31167 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31168 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31169 # method in iOS; and, with just a little work, it can be easily formatted into
31170 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31171 #
31172 # Example (Java):
31173 #
31174 # import com.google.type.Color;
31175 #
31176 # // ...
31177 # public static java.awt.Color fromProto(Color protocolor) {
31178 # float alpha = protocolor.hasAlpha()
31179 # ? protocolor.getAlpha().getValue()
31180 # : 1.0;
31181 #
31182 # return new java.awt.Color(
31183 # protocolor.getRed(),
31184 # protocolor.getGreen(),
31185 # protocolor.getBlue(),
31186 # alpha);
31187 # }
31188 #
31189 # public static Color toProto(java.awt.Color color) {
31190 # float red = (float) color.getRed();
31191 # float green = (float) color.getGreen();
31192 # float blue = (float) color.getBlue();
31193 # float denominator = 255.0;
31194 # Color.Builder resultBuilder =
31195 # Color
31196 # .newBuilder()
31197 # .setRed(red / denominator)
31198 # .setGreen(green / denominator)
31199 # .setBlue(blue / denominator);
31200 # int alpha = color.getAlpha();
31201 # if (alpha != 255) {
31202 # result.setAlpha(
31203 # FloatValue
31204 # .newBuilder()
31205 # .setValue(((float) alpha) / denominator)
31206 # .build());
31207 # }
31208 # return resultBuilder.build();
31209 # }
31210 # // ...
31211 #
31212 # Example (iOS / Obj-C):
31213 #
31214 # // ...
31215 # static UIColor* fromProto(Color* protocolor) {
31216 # float red = [protocolor red];
31217 # float green = [protocolor green];
31218 # float blue = [protocolor blue];
31219 # FloatValue* alpha_wrapper = [protocolor alpha];
31220 # float alpha = 1.0;
31221 # if (alpha_wrapper != nil) {
31222 # alpha = [alpha_wrapper value];
31223 # }
31224 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31225 # }
31226 #
31227 # static Color* toProto(UIColor* color) {
31228 # CGFloat red, green, blue, alpha;
31229 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31230 # return nil;
31231 # }
31232 # Color* result = [Color alloc] init];
31233 # [result setRed:red];
31234 # [result setGreen:green];
31235 # [result setBlue:blue];
31236 # if (alpha <= 0.9999) {
31237 # [result setAlpha:floatWrapperWithValue(alpha)];
31238 # }
31239 # [result autorelease];
31240 # return result;
31241 # }
31242 # // ...
31243 #
31244 # Example (JavaScript):
31245 #
31246 # // ...
31247 #
31248 # var protoToCssColor = function(rgb_color) {
31249 # var redFrac = rgb_color.red || 0.0;
31250 # var greenFrac = rgb_color.green || 0.0;
31251 # var blueFrac = rgb_color.blue || 0.0;
31252 # var red = Math.floor(redFrac * 255);
31253 # var green = Math.floor(greenFrac * 255);
31254 # var blue = Math.floor(blueFrac * 255);
31255 #
31256 # if (!('alpha' in rgb_color)) {
31257 # return rgbToCssColor_(red, green, blue);
31258 # }
31259 #
31260 # var alphaFrac = rgb_color.alpha.value || 0.0;
31261 # var rgbParams = [red, green, blue].join(',');
31262 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31263 # };
31264 #
31265 # var rgbToCssColor_ = function(red, green, blue) {
31266 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31267 # var hexString = rgbNumber.toString(16);
31268 # var missingZeros = 6 - hexString.length;
31269 # var resultBuilder = ['#'];
31270 # for (var i = 0; i < missingZeros; i++) {
31271 # resultBuilder.push('0');
31272 # }
31273 # resultBuilder.push(hexString);
31274 # return resultBuilder.join('');
31275 # };
31276 #
31277 # // ...
31278 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31279 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31280 # the final pixel color is defined by the equation:
31281 #
31282 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31283 #
31284 # This means that a value of 1.0 corresponds to a solid color, whereas
31285 # a value of 0.0 corresponds to a completely transparent color. This
31286 # uses a wrapper message rather than a simple float scalar so that it is
31287 # possible to distinguish between a default value and the value being unset.
31288 # If omitted, this color object is to be rendered as a solid color
31289 # (as if the alpha value had been explicitly given with a value of 1.0).
31290 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31291 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31292 },
31293 "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
31294 # row or column will be filled with either first_band_color or
31295 # second_band_color, depending on the color of the previous row or
31296 # column.
31297 # for simplicity of conversion to/from color representations in various
31298 # languages over compactness; for example, the fields of this representation
31299 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31300 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31301 # method in iOS; and, with just a little work, it can be easily formatted into
31302 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31303 #
31304 # Example (Java):
31305 #
31306 # import com.google.type.Color;
31307 #
31308 # // ...
31309 # public static java.awt.Color fromProto(Color protocolor) {
31310 # float alpha = protocolor.hasAlpha()
31311 # ? protocolor.getAlpha().getValue()
31312 # : 1.0;
31313 #
31314 # return new java.awt.Color(
31315 # protocolor.getRed(),
31316 # protocolor.getGreen(),
31317 # protocolor.getBlue(),
31318 # alpha);
31319 # }
31320 #
31321 # public static Color toProto(java.awt.Color color) {
31322 # float red = (float) color.getRed();
31323 # float green = (float) color.getGreen();
31324 # float blue = (float) color.getBlue();
31325 # float denominator = 255.0;
31326 # Color.Builder resultBuilder =
31327 # Color
31328 # .newBuilder()
31329 # .setRed(red / denominator)
31330 # .setGreen(green / denominator)
31331 # .setBlue(blue / denominator);
31332 # int alpha = color.getAlpha();
31333 # if (alpha != 255) {
31334 # result.setAlpha(
31335 # FloatValue
31336 # .newBuilder()
31337 # .setValue(((float) alpha) / denominator)
31338 # .build());
31339 # }
31340 # return resultBuilder.build();
31341 # }
31342 # // ...
31343 #
31344 # Example (iOS / Obj-C):
31345 #
31346 # // ...
31347 # static UIColor* fromProto(Color* protocolor) {
31348 # float red = [protocolor red];
31349 # float green = [protocolor green];
31350 # float blue = [protocolor blue];
31351 # FloatValue* alpha_wrapper = [protocolor alpha];
31352 # float alpha = 1.0;
31353 # if (alpha_wrapper != nil) {
31354 # alpha = [alpha_wrapper value];
31355 # }
31356 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31357 # }
31358 #
31359 # static Color* toProto(UIColor* color) {
31360 # CGFloat red, green, blue, alpha;
31361 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31362 # return nil;
31363 # }
31364 # Color* result = [Color alloc] init];
31365 # [result setRed:red];
31366 # [result setGreen:green];
31367 # [result setBlue:blue];
31368 # if (alpha <= 0.9999) {
31369 # [result setAlpha:floatWrapperWithValue(alpha)];
31370 # }
31371 # [result autorelease];
31372 # return result;
31373 # }
31374 # // ...
31375 #
31376 # Example (JavaScript):
31377 #
31378 # // ...
31379 #
31380 # var protoToCssColor = function(rgb_color) {
31381 # var redFrac = rgb_color.red || 0.0;
31382 # var greenFrac = rgb_color.green || 0.0;
31383 # var blueFrac = rgb_color.blue || 0.0;
31384 # var red = Math.floor(redFrac * 255);
31385 # var green = Math.floor(greenFrac * 255);
31386 # var blue = Math.floor(blueFrac * 255);
31387 #
31388 # if (!('alpha' in rgb_color)) {
31389 # return rgbToCssColor_(red, green, blue);
31390 # }
31391 #
31392 # var alphaFrac = rgb_color.alpha.value || 0.0;
31393 # var rgbParams = [red, green, blue].join(',');
31394 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31395 # };
31396 #
31397 # var rgbToCssColor_ = function(red, green, blue) {
31398 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31399 # var hexString = rgbNumber.toString(16);
31400 # var missingZeros = 6 - hexString.length;
31401 # var resultBuilder = ['#'];
31402 # for (var i = 0; i < missingZeros; i++) {
31403 # resultBuilder.push('0');
31404 # }
31405 # resultBuilder.push(hexString);
31406 # return resultBuilder.join('');
31407 # };
31408 #
31409 # // ...
31410 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31411 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31412 # the final pixel color is defined by the equation:
31413 #
31414 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31415 #
31416 # This means that a value of 1.0 corresponds to a solid color, whereas
31417 # a value of 0.0 corresponds to a completely transparent color. This
31418 # uses a wrapper message rather than a simple float scalar so that it is
31419 # possible to distinguish between a default value and the value being unset.
31420 # If omitted, this color object is to be rendered as a solid color
31421 # (as if the alpha value had been explicitly given with a value of 1.0).
31422 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31423 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31424 },
31425 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
31426 # for simplicity of conversion to/from color representations in various
31427 # languages over compactness; for example, the fields of this representation
31428 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31429 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31430 # method in iOS; and, with just a little work, it can be easily formatted into
31431 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31432 #
31433 # Example (Java):
31434 #
31435 # import com.google.type.Color;
31436 #
31437 # // ...
31438 # public static java.awt.Color fromProto(Color protocolor) {
31439 # float alpha = protocolor.hasAlpha()
31440 # ? protocolor.getAlpha().getValue()
31441 # : 1.0;
31442 #
31443 # return new java.awt.Color(
31444 # protocolor.getRed(),
31445 # protocolor.getGreen(),
31446 # protocolor.getBlue(),
31447 # alpha);
31448 # }
31449 #
31450 # public static Color toProto(java.awt.Color color) {
31451 # float red = (float) color.getRed();
31452 # float green = (float) color.getGreen();
31453 # float blue = (float) color.getBlue();
31454 # float denominator = 255.0;
31455 # Color.Builder resultBuilder =
31456 # Color
31457 # .newBuilder()
31458 # .setRed(red / denominator)
31459 # .setGreen(green / denominator)
31460 # .setBlue(blue / denominator);
31461 # int alpha = color.getAlpha();
31462 # if (alpha != 255) {
31463 # result.setAlpha(
31464 # FloatValue
31465 # .newBuilder()
31466 # .setValue(((float) alpha) / denominator)
31467 # .build());
31468 # }
31469 # return resultBuilder.build();
31470 # }
31471 # // ...
31472 #
31473 # Example (iOS / Obj-C):
31474 #
31475 # // ...
31476 # static UIColor* fromProto(Color* protocolor) {
31477 # float red = [protocolor red];
31478 # float green = [protocolor green];
31479 # float blue = [protocolor blue];
31480 # FloatValue* alpha_wrapper = [protocolor alpha];
31481 # float alpha = 1.0;
31482 # if (alpha_wrapper != nil) {
31483 # alpha = [alpha_wrapper value];
31484 # }
31485 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31486 # }
31487 #
31488 # static Color* toProto(UIColor* color) {
31489 # CGFloat red, green, blue, alpha;
31490 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31491 # return nil;
31492 # }
31493 # Color* result = [Color alloc] init];
31494 # [result setRed:red];
31495 # [result setGreen:green];
31496 # [result setBlue:blue];
31497 # if (alpha <= 0.9999) {
31498 # [result setAlpha:floatWrapperWithValue(alpha)];
31499 # }
31500 # [result autorelease];
31501 # return result;
31502 # }
31503 # // ...
31504 #
31505 # Example (JavaScript):
31506 #
31507 # // ...
31508 #
31509 # var protoToCssColor = function(rgb_color) {
31510 # var redFrac = rgb_color.red || 0.0;
31511 # var greenFrac = rgb_color.green || 0.0;
31512 # var blueFrac = rgb_color.blue || 0.0;
31513 # var red = Math.floor(redFrac * 255);
31514 # var green = Math.floor(greenFrac * 255);
31515 # var blue = Math.floor(blueFrac * 255);
31516 #
31517 # if (!('alpha' in rgb_color)) {
31518 # return rgbToCssColor_(red, green, blue);
31519 # }
31520 #
31521 # var alphaFrac = rgb_color.alpha.value || 0.0;
31522 # var rgbParams = [red, green, blue].join(',');
31523 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31524 # };
31525 #
31526 # var rgbToCssColor_ = function(red, green, blue) {
31527 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31528 # var hexString = rgbNumber.toString(16);
31529 # var missingZeros = 6 - hexString.length;
31530 # var resultBuilder = ['#'];
31531 # for (var i = 0; i < missingZeros; i++) {
31532 # resultBuilder.push('0');
31533 # }
31534 # resultBuilder.push(hexString);
31535 # return resultBuilder.join('');
31536 # };
31537 #
31538 # // ...
31539 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31540 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31541 # the final pixel color is defined by the equation:
31542 #
31543 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31544 #
31545 # This means that a value of 1.0 corresponds to a solid color, whereas
31546 # a value of 0.0 corresponds to a completely transparent color. This
31547 # uses a wrapper message rather than a simple float scalar so that it is
31548 # possible to distinguish between a default value and the value being unset.
31549 # If omitted, this color object is to be rendered as a solid color
31550 # (as if the alpha value had been explicitly given with a value of 1.0).
31551 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31552 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31553 },
31554 },
31555 "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
31556 # basis throughout all the rows in the range. At least one of
31557 # row_properties or column_properties must be specified.
31558 # BandedRange.row_properties and BandedRange.column_properties are
31559 # set, the fill colors are applied to cells according to the following rules:
31560 #
31561 # * header_color and footer_color take priority over band colors.
31562 # * first_band_color takes priority over second_band_color.
31563 # * row_properties takes priority over column_properties.
31564 #
31565 # For example, the first row color takes priority over the first column
31566 # color, but the first column color takes priority over the second row color.
31567 # Similarly, the row header takes priority over the column header in the
31568 # top left cell, but the column header takes priority over the first row
31569 # color if the row header is not set.
31570 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
31571 # for simplicity of conversion to/from color representations in various
31572 # languages over compactness; for example, the fields of this representation
31573 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31574 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31575 # method in iOS; and, with just a little work, it can be easily formatted into
31576 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31577 #
31578 # Example (Java):
31579 #
31580 # import com.google.type.Color;
31581 #
31582 # // ...
31583 # public static java.awt.Color fromProto(Color protocolor) {
31584 # float alpha = protocolor.hasAlpha()
31585 # ? protocolor.getAlpha().getValue()
31586 # : 1.0;
31587 #
31588 # return new java.awt.Color(
31589 # protocolor.getRed(),
31590 # protocolor.getGreen(),
31591 # protocolor.getBlue(),
31592 # alpha);
31593 # }
31594 #
31595 # public static Color toProto(java.awt.Color color) {
31596 # float red = (float) color.getRed();
31597 # float green = (float) color.getGreen();
31598 # float blue = (float) color.getBlue();
31599 # float denominator = 255.0;
31600 # Color.Builder resultBuilder =
31601 # Color
31602 # .newBuilder()
31603 # .setRed(red / denominator)
31604 # .setGreen(green / denominator)
31605 # .setBlue(blue / denominator);
31606 # int alpha = color.getAlpha();
31607 # if (alpha != 255) {
31608 # result.setAlpha(
31609 # FloatValue
31610 # .newBuilder()
31611 # .setValue(((float) alpha) / denominator)
31612 # .build());
31613 # }
31614 # return resultBuilder.build();
31615 # }
31616 # // ...
31617 #
31618 # Example (iOS / Obj-C):
31619 #
31620 # // ...
31621 # static UIColor* fromProto(Color* protocolor) {
31622 # float red = [protocolor red];
31623 # float green = [protocolor green];
31624 # float blue = [protocolor blue];
31625 # FloatValue* alpha_wrapper = [protocolor alpha];
31626 # float alpha = 1.0;
31627 # if (alpha_wrapper != nil) {
31628 # alpha = [alpha_wrapper value];
31629 # }
31630 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31631 # }
31632 #
31633 # static Color* toProto(UIColor* color) {
31634 # CGFloat red, green, blue, alpha;
31635 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31636 # return nil;
31637 # }
31638 # Color* result = [Color alloc] init];
31639 # [result setRed:red];
31640 # [result setGreen:green];
31641 # [result setBlue:blue];
31642 # if (alpha <= 0.9999) {
31643 # [result setAlpha:floatWrapperWithValue(alpha)];
31644 # }
31645 # [result autorelease];
31646 # return result;
31647 # }
31648 # // ...
31649 #
31650 # Example (JavaScript):
31651 #
31652 # // ...
31653 #
31654 # var protoToCssColor = function(rgb_color) {
31655 # var redFrac = rgb_color.red || 0.0;
31656 # var greenFrac = rgb_color.green || 0.0;
31657 # var blueFrac = rgb_color.blue || 0.0;
31658 # var red = Math.floor(redFrac * 255);
31659 # var green = Math.floor(greenFrac * 255);
31660 # var blue = Math.floor(blueFrac * 255);
31661 #
31662 # if (!('alpha' in rgb_color)) {
31663 # return rgbToCssColor_(red, green, blue);
31664 # }
31665 #
31666 # var alphaFrac = rgb_color.alpha.value || 0.0;
31667 # var rgbParams = [red, green, blue].join(',');
31668 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31669 # };
31670 #
31671 # var rgbToCssColor_ = function(red, green, blue) {
31672 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31673 # var hexString = rgbNumber.toString(16);
31674 # var missingZeros = 6 - hexString.length;
31675 # var resultBuilder = ['#'];
31676 # for (var i = 0; i < missingZeros; i++) {
31677 # resultBuilder.push('0');
31678 # }
31679 # resultBuilder.push(hexString);
31680 # return resultBuilder.join('');
31681 # };
31682 #
31683 # // ...
31684 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31685 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31686 # the final pixel color is defined by the equation:
31687 #
31688 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31689 #
31690 # This means that a value of 1.0 corresponds to a solid color, whereas
31691 # a value of 0.0 corresponds to a completely transparent color. This
31692 # uses a wrapper message rather than a simple float scalar so that it is
31693 # possible to distinguish between a default value and the value being unset.
31694 # If omitted, this color object is to be rendered as a solid color
31695 # (as if the alpha value had been explicitly given with a value of 1.0).
31696 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31697 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31698 },
31699 "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
31700 # row or column will be filled with this color and the colors will
31701 # alternate between first_band_color and second_band_color starting
31702 # from the second row or column. Otherwise, the first row or column will be
31703 # filled with first_band_color and the colors will proceed to alternate
31704 # as they normally would.
31705 # for simplicity of conversion to/from color representations in various
31706 # languages over compactness; for example, the fields of this representation
31707 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31708 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31709 # method in iOS; and, with just a little work, it can be easily formatted into
31710 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31711 #
31712 # Example (Java):
31713 #
31714 # import com.google.type.Color;
31715 #
31716 # // ...
31717 # public static java.awt.Color fromProto(Color protocolor) {
31718 # float alpha = protocolor.hasAlpha()
31719 # ? protocolor.getAlpha().getValue()
31720 # : 1.0;
31721 #
31722 # return new java.awt.Color(
31723 # protocolor.getRed(),
31724 # protocolor.getGreen(),
31725 # protocolor.getBlue(),
31726 # alpha);
31727 # }
31728 #
31729 # public static Color toProto(java.awt.Color color) {
31730 # float red = (float) color.getRed();
31731 # float green = (float) color.getGreen();
31732 # float blue = (float) color.getBlue();
31733 # float denominator = 255.0;
31734 # Color.Builder resultBuilder =
31735 # Color
31736 # .newBuilder()
31737 # .setRed(red / denominator)
31738 # .setGreen(green / denominator)
31739 # .setBlue(blue / denominator);
31740 # int alpha = color.getAlpha();
31741 # if (alpha != 255) {
31742 # result.setAlpha(
31743 # FloatValue
31744 # .newBuilder()
31745 # .setValue(((float) alpha) / denominator)
31746 # .build());
31747 # }
31748 # return resultBuilder.build();
31749 # }
31750 # // ...
31751 #
31752 # Example (iOS / Obj-C):
31753 #
31754 # // ...
31755 # static UIColor* fromProto(Color* protocolor) {
31756 # float red = [protocolor red];
31757 # float green = [protocolor green];
31758 # float blue = [protocolor blue];
31759 # FloatValue* alpha_wrapper = [protocolor alpha];
31760 # float alpha = 1.0;
31761 # if (alpha_wrapper != nil) {
31762 # alpha = [alpha_wrapper value];
31763 # }
31764 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31765 # }
31766 #
31767 # static Color* toProto(UIColor* color) {
31768 # CGFloat red, green, blue, alpha;
31769 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31770 # return nil;
31771 # }
31772 # Color* result = [Color alloc] init];
31773 # [result setRed:red];
31774 # [result setGreen:green];
31775 # [result setBlue:blue];
31776 # if (alpha <= 0.9999) {
31777 # [result setAlpha:floatWrapperWithValue(alpha)];
31778 # }
31779 # [result autorelease];
31780 # return result;
31781 # }
31782 # // ...
31783 #
31784 # Example (JavaScript):
31785 #
31786 # // ...
31787 #
31788 # var protoToCssColor = function(rgb_color) {
31789 # var redFrac = rgb_color.red || 0.0;
31790 # var greenFrac = rgb_color.green || 0.0;
31791 # var blueFrac = rgb_color.blue || 0.0;
31792 # var red = Math.floor(redFrac * 255);
31793 # var green = Math.floor(greenFrac * 255);
31794 # var blue = Math.floor(blueFrac * 255);
31795 #
31796 # if (!('alpha' in rgb_color)) {
31797 # return rgbToCssColor_(red, green, blue);
31798 # }
31799 #
31800 # var alphaFrac = rgb_color.alpha.value || 0.0;
31801 # var rgbParams = [red, green, blue].join(',');
31802 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31803 # };
31804 #
31805 # var rgbToCssColor_ = function(red, green, blue) {
31806 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31807 # var hexString = rgbNumber.toString(16);
31808 # var missingZeros = 6 - hexString.length;
31809 # var resultBuilder = ['#'];
31810 # for (var i = 0; i < missingZeros; i++) {
31811 # resultBuilder.push('0');
31812 # }
31813 # resultBuilder.push(hexString);
31814 # return resultBuilder.join('');
31815 # };
31816 #
31817 # // ...
31818 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31819 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31820 # the final pixel color is defined by the equation:
31821 #
31822 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31823 #
31824 # This means that a value of 1.0 corresponds to a solid color, whereas
31825 # a value of 0.0 corresponds to a completely transparent color. This
31826 # uses a wrapper message rather than a simple float scalar so that it is
31827 # possible to distinguish between a default value and the value being unset.
31828 # If omitted, this color object is to be rendered as a solid color
31829 # (as if the alpha value had been explicitly given with a value of 1.0).
31830 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31831 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31832 },
31833 "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
31834 # row or column will be filled with either first_band_color or
31835 # second_band_color, depending on the color of the previous row or
31836 # column.
31837 # for simplicity of conversion to/from color representations in various
31838 # languages over compactness; for example, the fields of this representation
31839 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31840 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31841 # method in iOS; and, with just a little work, it can be easily formatted into
31842 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31843 #
31844 # Example (Java):
31845 #
31846 # import com.google.type.Color;
31847 #
31848 # // ...
31849 # public static java.awt.Color fromProto(Color protocolor) {
31850 # float alpha = protocolor.hasAlpha()
31851 # ? protocolor.getAlpha().getValue()
31852 # : 1.0;
31853 #
31854 # return new java.awt.Color(
31855 # protocolor.getRed(),
31856 # protocolor.getGreen(),
31857 # protocolor.getBlue(),
31858 # alpha);
31859 # }
31860 #
31861 # public static Color toProto(java.awt.Color color) {
31862 # float red = (float) color.getRed();
31863 # float green = (float) color.getGreen();
31864 # float blue = (float) color.getBlue();
31865 # float denominator = 255.0;
31866 # Color.Builder resultBuilder =
31867 # Color
31868 # .newBuilder()
31869 # .setRed(red / denominator)
31870 # .setGreen(green / denominator)
31871 # .setBlue(blue / denominator);
31872 # int alpha = color.getAlpha();
31873 # if (alpha != 255) {
31874 # result.setAlpha(
31875 # FloatValue
31876 # .newBuilder()
31877 # .setValue(((float) alpha) / denominator)
31878 # .build());
31879 # }
31880 # return resultBuilder.build();
31881 # }
31882 # // ...
31883 #
31884 # Example (iOS / Obj-C):
31885 #
31886 # // ...
31887 # static UIColor* fromProto(Color* protocolor) {
31888 # float red = [protocolor red];
31889 # float green = [protocolor green];
31890 # float blue = [protocolor blue];
31891 # FloatValue* alpha_wrapper = [protocolor alpha];
31892 # float alpha = 1.0;
31893 # if (alpha_wrapper != nil) {
31894 # alpha = [alpha_wrapper value];
31895 # }
31896 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
31897 # }
31898 #
31899 # static Color* toProto(UIColor* color) {
31900 # CGFloat red, green, blue, alpha;
31901 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
31902 # return nil;
31903 # }
31904 # Color* result = [Color alloc] init];
31905 # [result setRed:red];
31906 # [result setGreen:green];
31907 # [result setBlue:blue];
31908 # if (alpha <= 0.9999) {
31909 # [result setAlpha:floatWrapperWithValue(alpha)];
31910 # }
31911 # [result autorelease];
31912 # return result;
31913 # }
31914 # // ...
31915 #
31916 # Example (JavaScript):
31917 #
31918 # // ...
31919 #
31920 # var protoToCssColor = function(rgb_color) {
31921 # var redFrac = rgb_color.red || 0.0;
31922 # var greenFrac = rgb_color.green || 0.0;
31923 # var blueFrac = rgb_color.blue || 0.0;
31924 # var red = Math.floor(redFrac * 255);
31925 # var green = Math.floor(greenFrac * 255);
31926 # var blue = Math.floor(blueFrac * 255);
31927 #
31928 # if (!('alpha' in rgb_color)) {
31929 # return rgbToCssColor_(red, green, blue);
31930 # }
31931 #
31932 # var alphaFrac = rgb_color.alpha.value || 0.0;
31933 # var rgbParams = [red, green, blue].join(',');
31934 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
31935 # };
31936 #
31937 # var rgbToCssColor_ = function(red, green, blue) {
31938 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
31939 # var hexString = rgbNumber.toString(16);
31940 # var missingZeros = 6 - hexString.length;
31941 # var resultBuilder = ['#'];
31942 # for (var i = 0; i < missingZeros; i++) {
31943 # resultBuilder.push('0');
31944 # }
31945 # resultBuilder.push(hexString);
31946 # return resultBuilder.join('');
31947 # };
31948 #
31949 # // ...
31950 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
31951 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
31952 # the final pixel color is defined by the equation:
31953 #
31954 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
31955 #
31956 # This means that a value of 1.0 corresponds to a solid color, whereas
31957 # a value of 0.0 corresponds to a completely transparent color. This
31958 # uses a wrapper message rather than a simple float scalar so that it is
31959 # possible to distinguish between a default value and the value being unset.
31960 # If omitted, this color object is to be rendered as a solid color
31961 # (as if the alpha value had been explicitly given with a value of 1.0).
31962 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
31963 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
31964 },
31965 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
31966 # for simplicity of conversion to/from color representations in various
31967 # languages over compactness; for example, the fields of this representation
31968 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
31969 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
31970 # method in iOS; and, with just a little work, it can be easily formatted into
31971 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
31972 #
31973 # Example (Java):
31974 #
31975 # import com.google.type.Color;
31976 #
31977 # // ...
31978 # public static java.awt.Color fromProto(Color protocolor) {
31979 # float alpha = protocolor.hasAlpha()
31980 # ? protocolor.getAlpha().getValue()
31981 # : 1.0;
31982 #
31983 # return new java.awt.Color(
31984 # protocolor.getRed(),
31985 # protocolor.getGreen(),
31986 # protocolor.getBlue(),
31987 # alpha);
31988 # }
31989 #
31990 # public static Color toProto(java.awt.Color color) {
31991 # float red = (float) color.getRed();
31992 # float green = (float) color.getGreen();
31993 # float blue = (float) color.getBlue();
31994 # float denominator = 255.0;
31995 # Color.Builder resultBuilder =
31996 # Color
31997 # .newBuilder()
31998 # .setRed(red / denominator)
31999 # .setGreen(green / denominator)
32000 # .setBlue(blue / denominator);
32001 # int alpha = color.getAlpha();
32002 # if (alpha != 255) {
32003 # result.setAlpha(
32004 # FloatValue
32005 # .newBuilder()
32006 # .setValue(((float) alpha) / denominator)
32007 # .build());
32008 # }
32009 # return resultBuilder.build();
32010 # }
32011 # // ...
32012 #
32013 # Example (iOS / Obj-C):
32014 #
32015 # // ...
32016 # static UIColor* fromProto(Color* protocolor) {
32017 # float red = [protocolor red];
32018 # float green = [protocolor green];
32019 # float blue = [protocolor blue];
32020 # FloatValue* alpha_wrapper = [protocolor alpha];
32021 # float alpha = 1.0;
32022 # if (alpha_wrapper != nil) {
32023 # alpha = [alpha_wrapper value];
32024 # }
32025 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32026 # }
32027 #
32028 # static Color* toProto(UIColor* color) {
32029 # CGFloat red, green, blue, alpha;
32030 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32031 # return nil;
32032 # }
32033 # Color* result = [Color alloc] init];
32034 # [result setRed:red];
32035 # [result setGreen:green];
32036 # [result setBlue:blue];
32037 # if (alpha <= 0.9999) {
32038 # [result setAlpha:floatWrapperWithValue(alpha)];
32039 # }
32040 # [result autorelease];
32041 # return result;
32042 # }
32043 # // ...
32044 #
32045 # Example (JavaScript):
32046 #
32047 # // ...
32048 #
32049 # var protoToCssColor = function(rgb_color) {
32050 # var redFrac = rgb_color.red || 0.0;
32051 # var greenFrac = rgb_color.green || 0.0;
32052 # var blueFrac = rgb_color.blue || 0.0;
32053 # var red = Math.floor(redFrac * 255);
32054 # var green = Math.floor(greenFrac * 255);
32055 # var blue = Math.floor(blueFrac * 255);
32056 #
32057 # if (!('alpha' in rgb_color)) {
32058 # return rgbToCssColor_(red, green, blue);
32059 # }
32060 #
32061 # var alphaFrac = rgb_color.alpha.value || 0.0;
32062 # var rgbParams = [red, green, blue].join(',');
32063 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32064 # };
32065 #
32066 # var rgbToCssColor_ = function(red, green, blue) {
32067 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32068 # var hexString = rgbNumber.toString(16);
32069 # var missingZeros = 6 - hexString.length;
32070 # var resultBuilder = ['#'];
32071 # for (var i = 0; i < missingZeros; i++) {
32072 # resultBuilder.push('0');
32073 # }
32074 # resultBuilder.push(hexString);
32075 # return resultBuilder.join('');
32076 # };
32077 #
32078 # // ...
32079 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32080 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32081 # the final pixel color is defined by the equation:
32082 #
32083 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32084 #
32085 # This means that a value of 1.0 corresponds to a solid color, whereas
32086 # a value of 0.0 corresponds to a completely transparent color. This
32087 # uses a wrapper message rather than a simple float scalar so that it is
32088 # possible to distinguish between a default value and the value being unset.
32089 # If omitted, this color object is to be rendered as a solid color
32090 # (as if the alpha value had been explicitly given with a value of 1.0).
32091 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32092 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32093 },
32094 },
32095 "bandedRangeId": 42, # The id of the banded range.
32096 },
32097 ],
32098 "merges": [ # The ranges that are merged together.
32099 { # A range on a sheet.
32100 # All indexes are zero-based.
32101 # Indexes are half open, e.g the start index is inclusive
32102 # and the end index is exclusive -- [start_index, end_index).
32103 # Missing indexes indicate the range is unbounded on that side.
32104 #
32105 # For example, if `"Sheet1"` is sheet ID 0, then:
32106 #
32107 # `Sheet1!A1:A1 == sheet_id: 0,
32108 # start_row_index: 0, end_row_index: 1,
32109 # start_column_index: 0, end_column_index: 1`
32110 #
32111 # `Sheet1!A3:B4 == sheet_id: 0,
32112 # start_row_index: 2, end_row_index: 4,
32113 # start_column_index: 0, end_column_index: 2`
32114 #
32115 # `Sheet1!A:B == sheet_id: 0,
32116 # start_column_index: 0, end_column_index: 2`
32117 #
32118 # `Sheet1!A5:B == sheet_id: 0,
32119 # start_row_index: 4,
32120 # start_column_index: 0, end_column_index: 2`
32121 #
32122 # `Sheet1 == sheet_id:0`
32123 #
32124 # The start index must always be less than or equal to the end index.
32125 # If the start index equals the end index, then the range is empty.
32126 # Empty ranges are typically not meaningful and are usually rendered in the
32127 # UI as `#REF!`.
32128 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032129 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032130 "sheetId": 42, # The sheet this range is on.
32131 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032132 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032133 },
32134 ],
32135 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
32136 "range": { # A range on a sheet. # The range the filter covers.
32137 # All indexes are zero-based.
32138 # Indexes are half open, e.g the start index is inclusive
32139 # and the end index is exclusive -- [start_index, end_index).
32140 # Missing indexes indicate the range is unbounded on that side.
32141 #
32142 # For example, if `"Sheet1"` is sheet ID 0, then:
32143 #
32144 # `Sheet1!A1:A1 == sheet_id: 0,
32145 # start_row_index: 0, end_row_index: 1,
32146 # start_column_index: 0, end_column_index: 1`
32147 #
32148 # `Sheet1!A3:B4 == sheet_id: 0,
32149 # start_row_index: 2, end_row_index: 4,
32150 # start_column_index: 0, end_column_index: 2`
32151 #
32152 # `Sheet1!A:B == sheet_id: 0,
32153 # start_column_index: 0, end_column_index: 2`
32154 #
32155 # `Sheet1!A5:B == sheet_id: 0,
32156 # start_row_index: 4,
32157 # start_column_index: 0, end_column_index: 2`
32158 #
32159 # `Sheet1 == sheet_id:0`
32160 #
32161 # The start index must always be less than or equal to the end index.
32162 # If the start index equals the end index, then the range is empty.
32163 # Empty ranges are typically not meaningful and are usually rendered in the
32164 # UI as `#REF!`.
32165 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032166 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032167 "sheetId": 42, # The sheet this range is on.
32168 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032169 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032170 },
32171 "sortSpecs": [ # The sort order per column. Later specifications are used when values
32172 # are equal in the earlier specifications.
32173 { # A sort order associated with a specific column or row.
32174 "sortOrder": "A String", # The order data should be sorted.
32175 "dimensionIndex": 42, # The dimension the sort should be applied to.
32176 },
32177 ],
32178 "criteria": { # The criteria for showing/hiding values per column.
32179 # The map's key is the column index, and the value is the criteria for
32180 # that column.
32181 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
32182 "hiddenValues": [ # Values that should be hidden.
32183 "A String",
32184 ],
32185 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
32186 # (This does not override hiddenValues -- if a value is listed there,
32187 # it will still be hidden.)
32188 # BooleanConditions are used by conditional formatting,
32189 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032190 "values": [ # The values of the condition. The number of supported values depends
32191 # on the condition type. Some support zero values,
32192 # others one or two values,
32193 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
32194 { # The value of the condition.
32195 "relativeDate": "A String", # A relative date (based on the current date).
32196 # Valid only if the type is
32197 # DATE_BEFORE,
32198 # DATE_AFTER,
32199 # DATE_ON_OR_BEFORE or
32200 # DATE_ON_OR_AFTER.
32201 #
32202 # Relative dates are not supported in data validation.
32203 # They are supported only in conditional formatting and
32204 # conditional filters.
32205 "userEnteredValue": "A String", # A value the condition is based on.
32206 # The value will be parsed as if the user typed into a cell.
32207 # Formulas are supported (and must begin with an `=`).
32208 },
32209 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032210 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032211 },
32212 },
32213 },
32214 },
32215 "charts": [ # The specifications of every chart on this sheet.
32216 { # A chart embedded in a sheet.
32217 "chartId": 42, # The ID of the chart.
32218 "position": { # The position of an embedded object such as a chart. # The position of the chart.
32219 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
32220 # is chosen for you. Used only when writing.
32221 "sheetId": 42, # The sheet this is on. Set only if the embedded object
32222 # is on its own sheet. Must be non-negative.
32223 "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.
32224 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
32225 # All indexes are zero-based.
32226 "rowIndex": 42, # The row index of the coordinate.
32227 "columnIndex": 42, # The column index of the coordinate.
32228 "sheetId": 42, # The sheet this coordinate is on.
32229 },
32230 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
32231 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070032232 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032233 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
32234 # from the anchor cell.
32235 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
32236 },
32237 },
32238 "spec": { # The specifications of a chart. # The specification of the chart.
32239 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
32240 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
32241 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
32242 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
32243 "sources": [ # The ranges of data for a series or domain.
32244 # Exactly one dimension must have a length of 1,
32245 # and all sources in the list must have the same dimension
32246 # with length 1.
32247 # The domain (if it exists) & all series must have the same number
32248 # of source ranges. If using more than one source range, then the source
32249 # range at a given offset must be contiguous across the domain and series.
32250 #
32251 # For example, these are valid configurations:
32252 #
32253 # domain sources: A1:A5
32254 # series1 sources: B1:B5
32255 # series2 sources: D6:D10
32256 #
32257 # domain sources: A1:A5, C10:C12
32258 # series1 sources: B1:B5, D10:D12
32259 # series2 sources: C1:C5, E10:E12
32260 { # A range on a sheet.
32261 # All indexes are zero-based.
32262 # Indexes are half open, e.g the start index is inclusive
32263 # and the end index is exclusive -- [start_index, end_index).
32264 # Missing indexes indicate the range is unbounded on that side.
32265 #
32266 # For example, if `"Sheet1"` is sheet ID 0, then:
32267 #
32268 # `Sheet1!A1:A1 == sheet_id: 0,
32269 # start_row_index: 0, end_row_index: 1,
32270 # start_column_index: 0, end_column_index: 1`
32271 #
32272 # `Sheet1!A3:B4 == sheet_id: 0,
32273 # start_row_index: 2, end_row_index: 4,
32274 # start_column_index: 0, end_column_index: 2`
32275 #
32276 # `Sheet1!A:B == sheet_id: 0,
32277 # start_column_index: 0, end_column_index: 2`
32278 #
32279 # `Sheet1!A5:B == sheet_id: 0,
32280 # start_row_index: 4,
32281 # start_column_index: 0, end_column_index: 2`
32282 #
32283 # `Sheet1 == sheet_id:0`
32284 #
32285 # The start index must always be less than or equal to the end index.
32286 # If the start index equals the end index, then the range is empty.
32287 # Empty ranges are typically not meaningful and are usually rendered in the
32288 # UI as `#REF!`.
32289 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032290 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032291 "sheetId": 42, # The sheet this range is on.
32292 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032293 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032294 },
32295 ],
32296 },
32297 },
32298 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
32299 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
32300 "sources": [ # The ranges of data for a series or domain.
32301 # Exactly one dimension must have a length of 1,
32302 # and all sources in the list must have the same dimension
32303 # with length 1.
32304 # The domain (if it exists) & all series must have the same number
32305 # of source ranges. If using more than one source range, then the source
32306 # range at a given offset must be contiguous across the domain and series.
32307 #
32308 # For example, these are valid configurations:
32309 #
32310 # domain sources: A1:A5
32311 # series1 sources: B1:B5
32312 # series2 sources: D6:D10
32313 #
32314 # domain sources: A1:A5, C10:C12
32315 # series1 sources: B1:B5, D10:D12
32316 # series2 sources: C1:C5, E10:E12
32317 { # A range on a sheet.
32318 # All indexes are zero-based.
32319 # Indexes are half open, e.g the start index is inclusive
32320 # and the end index is exclusive -- [start_index, end_index).
32321 # Missing indexes indicate the range is unbounded on that side.
32322 #
32323 # For example, if `"Sheet1"` is sheet ID 0, then:
32324 #
32325 # `Sheet1!A1:A1 == sheet_id: 0,
32326 # start_row_index: 0, end_row_index: 1,
32327 # start_column_index: 0, end_column_index: 1`
32328 #
32329 # `Sheet1!A3:B4 == sheet_id: 0,
32330 # start_row_index: 2, end_row_index: 4,
32331 # start_column_index: 0, end_column_index: 2`
32332 #
32333 # `Sheet1!A:B == sheet_id: 0,
32334 # start_column_index: 0, end_column_index: 2`
32335 #
32336 # `Sheet1!A5:B == sheet_id: 0,
32337 # start_row_index: 4,
32338 # start_column_index: 0, end_column_index: 2`
32339 #
32340 # `Sheet1 == sheet_id:0`
32341 #
32342 # The start index must always be less than or equal to the end index.
32343 # If the start index equals the end index, then the range is empty.
32344 # Empty ranges are typically not meaningful and are usually rendered in the
32345 # UI as `#REF!`.
32346 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032347 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032348 "sheetId": 42, # The sheet this range is on.
32349 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032350 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032351 },
32352 ],
32353 },
32354 },
32355 "threeDimensional": True or False, # True if the pie is three dimensional.
32356 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
32357 "pieHole": 3.14, # The size of the hole in the pie chart.
32358 },
32359 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
32360 # See BasicChartType for the list of all
32361 # charts this supports.
32362 # of charts this supports.
32363 "headerCount": 42, # The number of rows or columns in the data that are "headers".
32364 # If not set, Google Sheets will guess how many rows are headers based
32365 # on the data.
32366 #
32367 # (Note that BasicChartAxis.title may override the axis title
32368 # inferred from the header values.)
32369 "series": [ # The data this chart is visualizing.
32370 { # A single series of data in a chart.
32371 # For example, if charting stock prices over time, multiple series may exist,
32372 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
32373 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
32374 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
32375 "sources": [ # The ranges of data for a series or domain.
32376 # Exactly one dimension must have a length of 1,
32377 # and all sources in the list must have the same dimension
32378 # with length 1.
32379 # The domain (if it exists) & all series must have the same number
32380 # of source ranges. If using more than one source range, then the source
32381 # range at a given offset must be contiguous across the domain and series.
32382 #
32383 # For example, these are valid configurations:
32384 #
32385 # domain sources: A1:A5
32386 # series1 sources: B1:B5
32387 # series2 sources: D6:D10
32388 #
32389 # domain sources: A1:A5, C10:C12
32390 # series1 sources: B1:B5, D10:D12
32391 # series2 sources: C1:C5, E10:E12
32392 { # A range on a sheet.
32393 # All indexes are zero-based.
32394 # Indexes are half open, e.g the start index is inclusive
32395 # and the end index is exclusive -- [start_index, end_index).
32396 # Missing indexes indicate the range is unbounded on that side.
32397 #
32398 # For example, if `"Sheet1"` is sheet ID 0, then:
32399 #
32400 # `Sheet1!A1:A1 == sheet_id: 0,
32401 # start_row_index: 0, end_row_index: 1,
32402 # start_column_index: 0, end_column_index: 1`
32403 #
32404 # `Sheet1!A3:B4 == sheet_id: 0,
32405 # start_row_index: 2, end_row_index: 4,
32406 # start_column_index: 0, end_column_index: 2`
32407 #
32408 # `Sheet1!A:B == sheet_id: 0,
32409 # start_column_index: 0, end_column_index: 2`
32410 #
32411 # `Sheet1!A5:B == sheet_id: 0,
32412 # start_row_index: 4,
32413 # start_column_index: 0, end_column_index: 2`
32414 #
32415 # `Sheet1 == sheet_id:0`
32416 #
32417 # The start index must always be less than or equal to the end index.
32418 # If the start index equals the end index, then the range is empty.
32419 # Empty ranges are typically not meaningful and are usually rendered in the
32420 # UI as `#REF!`.
32421 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032422 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032423 "sheetId": 42, # The sheet this range is on.
32424 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032425 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032426 },
32427 ],
32428 },
32429 },
32430 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
32431 # For example, if charting stocks over time, the "Volume" series
32432 # may want to be pinned to the right with the prices pinned to the left,
32433 # because the scale of trading volume is different than the scale of
32434 # prices.
32435 # It is an error to specify an axis that isn't a valid minor axis
32436 # for the chart's type.
32437 "type": "A String", # The type of this series. Valid only if the
32438 # chartType is
32439 # COMBO.
32440 # Different types will change the way the series is visualized.
32441 # Only LINE, AREA,
32442 # and COLUMN are supported.
32443 },
32444 ],
32445 "legendPosition": "A String", # The position of the chart legend.
32446 "domains": [ # The domain of data this is charting.
32447 # Only a single domain is currently supported.
32448 { # The domain of a chart.
32449 # For example, if charting stock prices over time, this would be the date.
32450 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
32451 # this is the data representing the dates.
32452 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
32453 "sources": [ # The ranges of data for a series or domain.
32454 # Exactly one dimension must have a length of 1,
32455 # and all sources in the list must have the same dimension
32456 # with length 1.
32457 # The domain (if it exists) & all series must have the same number
32458 # of source ranges. If using more than one source range, then the source
32459 # range at a given offset must be contiguous across the domain and series.
32460 #
32461 # For example, these are valid configurations:
32462 #
32463 # domain sources: A1:A5
32464 # series1 sources: B1:B5
32465 # series2 sources: D6:D10
32466 #
32467 # domain sources: A1:A5, C10:C12
32468 # series1 sources: B1:B5, D10:D12
32469 # series2 sources: C1:C5, E10:E12
32470 { # A range on a sheet.
32471 # All indexes are zero-based.
32472 # Indexes are half open, e.g the start index is inclusive
32473 # and the end index is exclusive -- [start_index, end_index).
32474 # Missing indexes indicate the range is unbounded on that side.
32475 #
32476 # For example, if `"Sheet1"` is sheet ID 0, then:
32477 #
32478 # `Sheet1!A1:A1 == sheet_id: 0,
32479 # start_row_index: 0, end_row_index: 1,
32480 # start_column_index: 0, end_column_index: 1`
32481 #
32482 # `Sheet1!A3:B4 == sheet_id: 0,
32483 # start_row_index: 2, end_row_index: 4,
32484 # start_column_index: 0, end_column_index: 2`
32485 #
32486 # `Sheet1!A:B == sheet_id: 0,
32487 # start_column_index: 0, end_column_index: 2`
32488 #
32489 # `Sheet1!A5:B == sheet_id: 0,
32490 # start_row_index: 4,
32491 # start_column_index: 0, end_column_index: 2`
32492 #
32493 # `Sheet1 == sheet_id:0`
32494 #
32495 # The start index must always be less than or equal to the end index.
32496 # If the start index equals the end index, then the range is empty.
32497 # Empty ranges are typically not meaningful and are usually rendered in the
32498 # UI as `#REF!`.
32499 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032500 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032501 "sheetId": 42, # The sheet this range is on.
32502 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032503 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032504 },
32505 ],
32506 },
32507 },
32508 },
32509 ],
32510 "chartType": "A String", # The type of the chart.
32511 "axis": [ # The axis on the chart.
32512 { # An axis of the chart.
32513 # A chart may not have more than one axis per
32514 # axis position.
32515 "position": "A String", # The position of this axis.
32516 "format": { # The format of a run of text in a cell. # The format of the title.
32517 # Only valid if the axis is not associated with the domain.
32518 # Absent values indicate that the field isn't specified.
32519 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32520 # for simplicity of conversion to/from color representations in various
32521 # languages over compactness; for example, the fields of this representation
32522 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32523 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32524 # method in iOS; and, with just a little work, it can be easily formatted into
32525 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32526 #
32527 # Example (Java):
32528 #
32529 # import com.google.type.Color;
32530 #
32531 # // ...
32532 # public static java.awt.Color fromProto(Color protocolor) {
32533 # float alpha = protocolor.hasAlpha()
32534 # ? protocolor.getAlpha().getValue()
32535 # : 1.0;
32536 #
32537 # return new java.awt.Color(
32538 # protocolor.getRed(),
32539 # protocolor.getGreen(),
32540 # protocolor.getBlue(),
32541 # alpha);
32542 # }
32543 #
32544 # public static Color toProto(java.awt.Color color) {
32545 # float red = (float) color.getRed();
32546 # float green = (float) color.getGreen();
32547 # float blue = (float) color.getBlue();
32548 # float denominator = 255.0;
32549 # Color.Builder resultBuilder =
32550 # Color
32551 # .newBuilder()
32552 # .setRed(red / denominator)
32553 # .setGreen(green / denominator)
32554 # .setBlue(blue / denominator);
32555 # int alpha = color.getAlpha();
32556 # if (alpha != 255) {
32557 # result.setAlpha(
32558 # FloatValue
32559 # .newBuilder()
32560 # .setValue(((float) alpha) / denominator)
32561 # .build());
32562 # }
32563 # return resultBuilder.build();
32564 # }
32565 # // ...
32566 #
32567 # Example (iOS / Obj-C):
32568 #
32569 # // ...
32570 # static UIColor* fromProto(Color* protocolor) {
32571 # float red = [protocolor red];
32572 # float green = [protocolor green];
32573 # float blue = [protocolor blue];
32574 # FloatValue* alpha_wrapper = [protocolor alpha];
32575 # float alpha = 1.0;
32576 # if (alpha_wrapper != nil) {
32577 # alpha = [alpha_wrapper value];
32578 # }
32579 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32580 # }
32581 #
32582 # static Color* toProto(UIColor* color) {
32583 # CGFloat red, green, blue, alpha;
32584 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32585 # return nil;
32586 # }
32587 # Color* result = [Color alloc] init];
32588 # [result setRed:red];
32589 # [result setGreen:green];
32590 # [result setBlue:blue];
32591 # if (alpha <= 0.9999) {
32592 # [result setAlpha:floatWrapperWithValue(alpha)];
32593 # }
32594 # [result autorelease];
32595 # return result;
32596 # }
32597 # // ...
32598 #
32599 # Example (JavaScript):
32600 #
32601 # // ...
32602 #
32603 # var protoToCssColor = function(rgb_color) {
32604 # var redFrac = rgb_color.red || 0.0;
32605 # var greenFrac = rgb_color.green || 0.0;
32606 # var blueFrac = rgb_color.blue || 0.0;
32607 # var red = Math.floor(redFrac * 255);
32608 # var green = Math.floor(greenFrac * 255);
32609 # var blue = Math.floor(blueFrac * 255);
32610 #
32611 # if (!('alpha' in rgb_color)) {
32612 # return rgbToCssColor_(red, green, blue);
32613 # }
32614 #
32615 # var alphaFrac = rgb_color.alpha.value || 0.0;
32616 # var rgbParams = [red, green, blue].join(',');
32617 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32618 # };
32619 #
32620 # var rgbToCssColor_ = function(red, green, blue) {
32621 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32622 # var hexString = rgbNumber.toString(16);
32623 # var missingZeros = 6 - hexString.length;
32624 # var resultBuilder = ['#'];
32625 # for (var i = 0; i < missingZeros; i++) {
32626 # resultBuilder.push('0');
32627 # }
32628 # resultBuilder.push(hexString);
32629 # return resultBuilder.join('');
32630 # };
32631 #
32632 # // ...
32633 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32634 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32635 # the final pixel color is defined by the equation:
32636 #
32637 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32638 #
32639 # This means that a value of 1.0 corresponds to a solid color, whereas
32640 # a value of 0.0 corresponds to a completely transparent color. This
32641 # uses a wrapper message rather than a simple float scalar so that it is
32642 # possible to distinguish between a default value and the value being unset.
32643 # If omitted, this color object is to be rendered as a solid color
32644 # (as if the alpha value had been explicitly given with a value of 1.0).
32645 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32646 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32647 },
32648 "bold": True or False, # True if the text is bold.
32649 "strikethrough": True or False, # True if the text has a strikethrough.
32650 "fontFamily": "A String", # The font family.
32651 "fontSize": 42, # The size of the font.
32652 "italic": True or False, # True if the text is italicized.
32653 "underline": True or False, # True if the text is underlined.
32654 },
Thomas Coffee2f245372017-03-27 10:39:26 -070032655 "title": "A String", # The title of this axis. If set, this overrides any title inferred
32656 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032657 },
32658 ],
32659 },
32660 "title": "A String", # The title of the chart.
32661 },
32662 },
32663 ],
32664 "filterViews": [ # The filter views in this sheet.
32665 { # A filter view.
32666 "title": "A String", # The name of the filter view.
32667 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
32668 #
32669 # When writing, only one of range or named_range_id
32670 # may be set.
32671 "filterViewId": 42, # The ID of the filter view.
32672 "range": { # A range on a sheet. # The range this filter view covers.
32673 #
32674 # When writing, only one of range or named_range_id
32675 # may be set.
32676 # All indexes are zero-based.
32677 # Indexes are half open, e.g the start index is inclusive
32678 # and the end index is exclusive -- [start_index, end_index).
32679 # Missing indexes indicate the range is unbounded on that side.
32680 #
32681 # For example, if `"Sheet1"` is sheet ID 0, then:
32682 #
32683 # `Sheet1!A1:A1 == sheet_id: 0,
32684 # start_row_index: 0, end_row_index: 1,
32685 # start_column_index: 0, end_column_index: 1`
32686 #
32687 # `Sheet1!A3:B4 == sheet_id: 0,
32688 # start_row_index: 2, end_row_index: 4,
32689 # start_column_index: 0, end_column_index: 2`
32690 #
32691 # `Sheet1!A:B == sheet_id: 0,
32692 # start_column_index: 0, end_column_index: 2`
32693 #
32694 # `Sheet1!A5:B == sheet_id: 0,
32695 # start_row_index: 4,
32696 # start_column_index: 0, end_column_index: 2`
32697 #
32698 # `Sheet1 == sheet_id:0`
32699 #
32700 # The start index must always be less than or equal to the end index.
32701 # If the start index equals the end index, then the range is empty.
32702 # Empty ranges are typically not meaningful and are usually rendered in the
32703 # UI as `#REF!`.
32704 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032705 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032706 "sheetId": 42, # The sheet this range is on.
32707 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032708 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032709 },
32710 "sortSpecs": [ # The sort order per column. Later specifications are used when values
32711 # are equal in the earlier specifications.
32712 { # A sort order associated with a specific column or row.
32713 "sortOrder": "A String", # The order data should be sorted.
32714 "dimensionIndex": 42, # The dimension the sort should be applied to.
32715 },
32716 ],
32717 "criteria": { # The criteria for showing/hiding values per column.
32718 # The map's key is the column index, and the value is the criteria for
32719 # that column.
32720 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
32721 "hiddenValues": [ # Values that should be hidden.
32722 "A String",
32723 ],
32724 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
32725 # (This does not override hiddenValues -- if a value is listed there,
32726 # it will still be hidden.)
32727 # BooleanConditions are used by conditional formatting,
32728 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032729 "values": [ # The values of the condition. The number of supported values depends
32730 # on the condition type. Some support zero values,
32731 # others one or two values,
32732 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
32733 { # The value of the condition.
32734 "relativeDate": "A String", # A relative date (based on the current date).
32735 # Valid only if the type is
32736 # DATE_BEFORE,
32737 # DATE_AFTER,
32738 # DATE_ON_OR_BEFORE or
32739 # DATE_ON_OR_AFTER.
32740 #
32741 # Relative dates are not supported in data validation.
32742 # They are supported only in conditional formatting and
32743 # conditional filters.
32744 "userEnteredValue": "A String", # A value the condition is based on.
32745 # The value will be parsed as if the user typed into a cell.
32746 # Formulas are supported (and must begin with an `=`).
32747 },
32748 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032749 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032750 },
32751 },
32752 },
32753 },
32754 ],
32755 "protectedRanges": [ # The protected ranges in this sheet.
32756 { # A protected range.
32757 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
32758 # Unprotected ranges are only supported on protected sheets.
32759 { # A range on a sheet.
32760 # All indexes are zero-based.
32761 # Indexes are half open, e.g the start index is inclusive
32762 # and the end index is exclusive -- [start_index, end_index).
32763 # Missing indexes indicate the range is unbounded on that side.
32764 #
32765 # For example, if `"Sheet1"` is sheet ID 0, then:
32766 #
32767 # `Sheet1!A1:A1 == sheet_id: 0,
32768 # start_row_index: 0, end_row_index: 1,
32769 # start_column_index: 0, end_column_index: 1`
32770 #
32771 # `Sheet1!A3:B4 == sheet_id: 0,
32772 # start_row_index: 2, end_row_index: 4,
32773 # start_column_index: 0, end_column_index: 2`
32774 #
32775 # `Sheet1!A:B == sheet_id: 0,
32776 # start_column_index: 0, end_column_index: 2`
32777 #
32778 # `Sheet1!A5:B == sheet_id: 0,
32779 # start_row_index: 4,
32780 # start_column_index: 0, end_column_index: 2`
32781 #
32782 # `Sheet1 == sheet_id:0`
32783 #
32784 # The start index must always be less than or equal to the end index.
32785 # If the start index equals the end index, then the range is empty.
32786 # Empty ranges are typically not meaningful and are usually rendered in the
32787 # UI as `#REF!`.
32788 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032789 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032790 "sheetId": 42, # The sheet this range is on.
32791 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032792 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032793 },
32794 ],
32795 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
32796 # protected area.
32797 # This field is read-only.
32798 "description": "A String", # The description of this protected range.
32799 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
32800 #
32801 # When writing, only one of range or named_range_id
32802 # may be set.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032803 "range": { # A range on a sheet. # The range that is being protected.
32804 # The range may be fully unbounded, in which case this is considered
32805 # a protected sheet.
32806 #
32807 # When writing, only one of range or named_range_id
32808 # may be set.
32809 # All indexes are zero-based.
32810 # Indexes are half open, e.g the start index is inclusive
32811 # and the end index is exclusive -- [start_index, end_index).
32812 # Missing indexes indicate the range is unbounded on that side.
32813 #
32814 # For example, if `"Sheet1"` is sheet ID 0, then:
32815 #
32816 # `Sheet1!A1:A1 == sheet_id: 0,
32817 # start_row_index: 0, end_row_index: 1,
32818 # start_column_index: 0, end_column_index: 1`
32819 #
32820 # `Sheet1!A3:B4 == sheet_id: 0,
32821 # start_row_index: 2, end_row_index: 4,
32822 # start_column_index: 0, end_column_index: 2`
32823 #
32824 # `Sheet1!A:B == sheet_id: 0,
32825 # start_column_index: 0, end_column_index: 2`
32826 #
32827 # `Sheet1!A5:B == sheet_id: 0,
32828 # start_row_index: 4,
32829 # start_column_index: 0, end_column_index: 2`
32830 #
32831 # `Sheet1 == sheet_id:0`
32832 #
32833 # The start index must always be less than or equal to the end index.
32834 # If the start index equals the end index, then the range is empty.
32835 # Empty ranges are typically not meaningful and are usually rendered in the
32836 # UI as `#REF!`.
32837 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032838 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032839 "sheetId": 42, # The sheet this range is on.
32840 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070032841 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032842 },
Thomas Coffee2f245372017-03-27 10:39:26 -070032843 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
32844 # This field is only visible to users with edit access to the protected
32845 # range and the document.
32846 # Editors are not supported with warning_only protection.
32847 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
32848 # range. Domain protection is only supported on documents within a domain.
32849 "users": [ # The email addresses of users with edit access to the protected range.
32850 "A String",
32851 ],
32852 "groups": [ # The email addresses of groups with edit access to the protected range.
32853 "A String",
32854 ],
32855 },
32856 "protectedRangeId": 42, # The ID of the protected range.
32857 # This field is read-only.
32858 "warningOnly": True or False, # True if this protected range will show a warning when editing.
32859 # Warning-based protection means that every user can edit data in the
32860 # protected range, except editing will prompt a warning asking the user
32861 # to confirm the edit.
32862 #
32863 # When writing: if this field is true, then editors is ignored.
32864 # Additionally, if this field is changed from true to false and the
32865 # `editors` field is not set (nor included in the field mask), then
32866 # the editors will be set to all the editors in the document.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032867 },
32868 ],
32869 "data": [ # Data in the grid, if this is a grid sheet.
32870 # The number of GridData objects returned is dependent on the number of
32871 # ranges requested on this sheet. For example, if this is representing
32872 # `Sheet1`, and the spreadsheet was requested with ranges
32873 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
32874 # startRow/startColumn of `0`,
32875 # while the second one will have `startRow 14` (zero-based row 15),
32876 # and `startColumn 3` (zero-based column D).
32877 { # Data in the grid, as well as metadata about the dimensions.
Thomas Coffee2f245372017-03-27 10:39:26 -070032878 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
32879 # in start_row.
32880 { # Properties about a dimension.
32881 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32882 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32883 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32884 # This field is read-only.
32885 },
32886 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -070032887 "startColumn": 42, # The first column this GridData refers to, zero-based.
32888 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
32889 # in start_column.
32890 { # Properties about a dimension.
32891 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32892 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32893 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32894 # This field is read-only.
32895 },
32896 ],
Thomas Coffee2f245372017-03-27 10:39:26 -070032897 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032898 "rowData": [ # The data in the grid, one entry per row,
32899 # starting with the row in startRow.
32900 # The values in RowData will correspond to columns starting
32901 # at start_column.
32902 { # Data about each cell in a row.
32903 "values": [ # The values in the row, one per column.
32904 { # Data about a specific cell.
32905 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
32906 # is computed dynamically based on its data, grouping, filters, values,
32907 # etc. Only the top-left cell of the pivot table contains the pivot table
32908 # definition. The other cells will contain the calculated values of the
32909 # results of the pivot in their effective_value fields.
32910 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
32911 # or vertically (as rows).
32912 "rows": [ # Each row grouping in the pivot table.
32913 { # A single grouping (either row or column) in a pivot table.
32914 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32915 "valueMetadata": [ # Metadata about values in the grouping.
32916 { # Metadata about a value in a pivot grouping.
32917 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32918 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32919 # (Note that formulaValue is not valid,
32920 # because the values will be calculated.)
32921 "numberValue": 3.14, # Represents a double value.
32922 # Note: Dates, Times and DateTimes are represented as doubles in
32923 # "serial number" format.
32924 "boolValue": True or False, # Represents a boolean value.
32925 "formulaValue": "A String", # Represents a formula.
32926 "stringValue": "A String", # Represents a string value.
32927 # Leading single quotes are not included. For example, if the user typed
32928 # `'123` into the UI, this would be represented as a `stringValue` of
32929 # `"123"`.
32930 "errorValue": { # An error in a cell. # Represents an error.
32931 # This field is read-only.
32932 "message": "A String", # A message with more information about the error
32933 # (in the spreadsheet's locale).
32934 "type": "A String", # The type of error.
32935 },
32936 },
32937 },
32938 ],
32939 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32940 # If not specified, sorting is alphabetical by this group's values.
32941 "buckets": [ # Determines the bucket from which values are chosen to sort.
32942 #
32943 # For example, in a pivot table with one row group & two column groups,
32944 # the row group can list up to two values. The first value corresponds
32945 # to a value within the first column group, and the second value
32946 # corresponds to a value in the second column group. If no values
32947 # are listed, this would indicate that the row should be sorted according
32948 # to the "Grand Total" over the column groups. If a single value is listed,
32949 # this would correspond to using the "Total" of that bucket.
32950 { # The kinds of value that a cell in a spreadsheet can have.
32951 "numberValue": 3.14, # Represents a double value.
32952 # Note: Dates, Times and DateTimes are represented as doubles in
32953 # "serial number" format.
32954 "boolValue": True or False, # Represents a boolean value.
32955 "formulaValue": "A String", # Represents a formula.
32956 "stringValue": "A String", # Represents a string value.
32957 # Leading single quotes are not included. For example, if the user typed
32958 # `'123` into the UI, this would be represented as a `stringValue` of
32959 # `"123"`.
32960 "errorValue": { # An error in a cell. # Represents an error.
32961 # This field is read-only.
32962 "message": "A String", # A message with more information about the error
32963 # (in the spreadsheet's locale).
32964 "type": "A String", # The type of error.
32965 },
32966 },
32967 ],
32968 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
32969 # grouping should be sorted by.
32970 },
32971 "sortOrder": "A String", # The order the values in this group should be sorted.
32972 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32973 #
32974 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
32975 # means this group refers to column `C`, whereas the offset `1` would refer
32976 # to column `D`.
32977 },
32978 ],
32979 "source": { # A range on a sheet. # The range the pivot table is reading data from.
32980 # All indexes are zero-based.
32981 # Indexes are half open, e.g the start index is inclusive
32982 # and the end index is exclusive -- [start_index, end_index).
32983 # Missing indexes indicate the range is unbounded on that side.
32984 #
32985 # For example, if `"Sheet1"` is sheet ID 0, then:
32986 #
32987 # `Sheet1!A1:A1 == sheet_id: 0,
32988 # start_row_index: 0, end_row_index: 1,
32989 # start_column_index: 0, end_column_index: 1`
32990 #
32991 # `Sheet1!A3:B4 == sheet_id: 0,
32992 # start_row_index: 2, end_row_index: 4,
32993 # start_column_index: 0, end_column_index: 2`
32994 #
32995 # `Sheet1!A:B == sheet_id: 0,
32996 # start_column_index: 0, end_column_index: 2`
32997 #
32998 # `Sheet1!A5:B == sheet_id: 0,
32999 # start_row_index: 4,
33000 # start_column_index: 0, end_column_index: 2`
33001 #
33002 # `Sheet1 == sheet_id:0`
33003 #
33004 # The start index must always be less than or equal to the end index.
33005 # If the start index equals the end index, then the range is empty.
33006 # Empty ranges are typically not meaningful and are usually rendered in the
33007 # UI as `#REF!`.
33008 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070033009 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033010 "sheetId": 42, # The sheet this range is on.
33011 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070033012 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033013 },
33014 "values": [ # A list of values to include in the pivot table.
33015 { # The definition of how a value in a pivot table should be calculated.
33016 "formula": "A String", # A custom formula to calculate the value. The formula must start
33017 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -070033018 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
33019 #
33020 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
33021 # means this value refers to column `C`, whereas the offset `1` would
33022 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033023 "summarizeFunction": "A String", # A function to summarize the value.
33024 # If formula is set, the only supported values are
33025 # SUM and
33026 # CUSTOM.
33027 # If sourceColumnOffset is set, then `CUSTOM`
33028 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033029 "name": "A String", # A name to use for the value. This is only used if formula was set.
33030 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033031 },
33032 ],
33033 "criteria": { # An optional mapping of filters per source column offset.
33034 #
33035 # The filters will be applied before aggregating data into the pivot table.
33036 # The map's key is the column offset of the source range that you want to
33037 # filter, and the value is the criteria for that column.
33038 #
33039 # For example, if the source was `C10:E15`, a key of `0` will have the filter
33040 # for column `C`, whereas the key `1` is for column `D`.
33041 "a_key": { # Criteria for showing/hiding rows in a pivot table.
33042 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
33043 "A String",
33044 ],
33045 },
33046 },
33047 "columns": [ # Each column grouping in the pivot table.
33048 { # A single grouping (either row or column) in a pivot table.
33049 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
33050 "valueMetadata": [ # Metadata about values in the grouping.
33051 { # Metadata about a value in a pivot grouping.
33052 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
33053 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
33054 # (Note that formulaValue is not valid,
33055 # because the values will be calculated.)
33056 "numberValue": 3.14, # Represents a double value.
33057 # Note: Dates, Times and DateTimes are represented as doubles in
33058 # "serial number" format.
33059 "boolValue": True or False, # Represents a boolean value.
33060 "formulaValue": "A String", # Represents a formula.
33061 "stringValue": "A String", # Represents a string value.
33062 # Leading single quotes are not included. For example, if the user typed
33063 # `'123` into the UI, this would be represented as a `stringValue` of
33064 # `"123"`.
33065 "errorValue": { # An error in a cell. # Represents an error.
33066 # This field is read-only.
33067 "message": "A String", # A message with more information about the error
33068 # (in the spreadsheet's locale).
33069 "type": "A String", # The type of error.
33070 },
33071 },
33072 },
33073 ],
33074 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
33075 # If not specified, sorting is alphabetical by this group's values.
33076 "buckets": [ # Determines the bucket from which values are chosen to sort.
33077 #
33078 # For example, in a pivot table with one row group & two column groups,
33079 # the row group can list up to two values. The first value corresponds
33080 # to a value within the first column group, and the second value
33081 # corresponds to a value in the second column group. If no values
33082 # are listed, this would indicate that the row should be sorted according
33083 # to the "Grand Total" over the column groups. If a single value is listed,
33084 # this would correspond to using the "Total" of that bucket.
33085 { # The kinds of value that a cell in a spreadsheet can have.
33086 "numberValue": 3.14, # Represents a double value.
33087 # Note: Dates, Times and DateTimes are represented as doubles in
33088 # "serial number" format.
33089 "boolValue": True or False, # Represents a boolean value.
33090 "formulaValue": "A String", # Represents a formula.
33091 "stringValue": "A String", # Represents a string value.
33092 # Leading single quotes are not included. For example, if the user typed
33093 # `'123` into the UI, this would be represented as a `stringValue` of
33094 # `"123"`.
33095 "errorValue": { # An error in a cell. # Represents an error.
33096 # This field is read-only.
33097 "message": "A String", # A message with more information about the error
33098 # (in the spreadsheet's locale).
33099 "type": "A String", # The type of error.
33100 },
33101 },
33102 ],
33103 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
33104 # grouping should be sorted by.
33105 },
33106 "sortOrder": "A String", # The order the values in this group should be sorted.
33107 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
33108 #
33109 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
33110 # means this group refers to column `C`, whereas the offset `1` would refer
33111 # to column `D`.
33112 },
33113 ],
33114 },
33115 "hyperlink": "A String", # A hyperlink this cell points to, if any.
33116 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
33117 "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
33118 # the calculated value. For cells with literals, this will be
33119 # the same as the user_entered_value.
33120 # This field is read-only.
33121 "numberValue": 3.14, # Represents a double value.
33122 # Note: Dates, Times and DateTimes are represented as doubles in
33123 # "serial number" format.
33124 "boolValue": True or False, # Represents a boolean value.
33125 "formulaValue": "A String", # Represents a formula.
33126 "stringValue": "A String", # Represents a string value.
33127 # Leading single quotes are not included. For example, if the user typed
33128 # `'123` into the UI, this would be represented as a `stringValue` of
33129 # `"123"`.
33130 "errorValue": { # An error in a cell. # Represents an error.
33131 # This field is read-only.
33132 "message": "A String", # A message with more information about the error
33133 # (in the spreadsheet's locale).
33134 "type": "A String", # The type of error.
33135 },
33136 },
33137 "formattedValue": "A String", # The formatted value of the cell.
33138 # This is the value as it's shown to the user.
33139 # This field is read-only.
33140 "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()`
33141 # Note: Dates, Times and DateTimes are represented as doubles in
33142 # serial number format.
33143 "numberValue": 3.14, # Represents a double value.
33144 # Note: Dates, Times and DateTimes are represented as doubles in
33145 # "serial number" format.
33146 "boolValue": True or False, # Represents a boolean value.
33147 "formulaValue": "A String", # Represents a formula.
33148 "stringValue": "A String", # Represents a string value.
33149 # Leading single quotes are not included. For example, if the user typed
33150 # `'123` into the UI, this would be represented as a `stringValue` of
33151 # `"123"`.
33152 "errorValue": { # An error in a cell. # Represents an error.
33153 # This field is read-only.
33154 "message": "A String", # A message with more information about the error
33155 # (in the spreadsheet's locale).
33156 "type": "A String", # The type of error.
33157 },
33158 },
33159 "note": "A String", # Any note on the cell.
33160 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
33161 # This includes the results of applying any conditional formatting and,
33162 # if the cell contains a formula, the computed number format.
33163 # If the effective format is the default format, effective format will
33164 # not be written.
33165 # This field is read-only.
33166 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
33167 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
33168 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033169 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033170 # information about the supported patterns.
33171 "type": "A String", # The type of the number format.
33172 # When writing, this field must be set.
33173 },
33174 "textDirection": "A String", # The direction of the text in the cell.
33175 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
33176 # When updating padding, every field must be specified.
33177 "top": 42, # The top padding of the cell.
33178 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033179 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033180 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033181 },
Thomas Coffee2f245372017-03-27 10:39:26 -070033182 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033183 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
33184 # for simplicity of conversion to/from color representations in various
33185 # languages over compactness; for example, the fields of this representation
33186 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33187 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33188 # method in iOS; and, with just a little work, it can be easily formatted into
33189 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33190 #
33191 # Example (Java):
33192 #
33193 # import com.google.type.Color;
33194 #
33195 # // ...
33196 # public static java.awt.Color fromProto(Color protocolor) {
33197 # float alpha = protocolor.hasAlpha()
33198 # ? protocolor.getAlpha().getValue()
33199 # : 1.0;
33200 #
33201 # return new java.awt.Color(
33202 # protocolor.getRed(),
33203 # protocolor.getGreen(),
33204 # protocolor.getBlue(),
33205 # alpha);
33206 # }
33207 #
33208 # public static Color toProto(java.awt.Color color) {
33209 # float red = (float) color.getRed();
33210 # float green = (float) color.getGreen();
33211 # float blue = (float) color.getBlue();
33212 # float denominator = 255.0;
33213 # Color.Builder resultBuilder =
33214 # Color
33215 # .newBuilder()
33216 # .setRed(red / denominator)
33217 # .setGreen(green / denominator)
33218 # .setBlue(blue / denominator);
33219 # int alpha = color.getAlpha();
33220 # if (alpha != 255) {
33221 # result.setAlpha(
33222 # FloatValue
33223 # .newBuilder()
33224 # .setValue(((float) alpha) / denominator)
33225 # .build());
33226 # }
33227 # return resultBuilder.build();
33228 # }
33229 # // ...
33230 #
33231 # Example (iOS / Obj-C):
33232 #
33233 # // ...
33234 # static UIColor* fromProto(Color* protocolor) {
33235 # float red = [protocolor red];
33236 # float green = [protocolor green];
33237 # float blue = [protocolor blue];
33238 # FloatValue* alpha_wrapper = [protocolor alpha];
33239 # float alpha = 1.0;
33240 # if (alpha_wrapper != nil) {
33241 # alpha = [alpha_wrapper value];
33242 # }
33243 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33244 # }
33245 #
33246 # static Color* toProto(UIColor* color) {
33247 # CGFloat red, green, blue, alpha;
33248 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33249 # return nil;
33250 # }
33251 # Color* result = [Color alloc] init];
33252 # [result setRed:red];
33253 # [result setGreen:green];
33254 # [result setBlue:blue];
33255 # if (alpha <= 0.9999) {
33256 # [result setAlpha:floatWrapperWithValue(alpha)];
33257 # }
33258 # [result autorelease];
33259 # return result;
33260 # }
33261 # // ...
33262 #
33263 # Example (JavaScript):
33264 #
33265 # // ...
33266 #
33267 # var protoToCssColor = function(rgb_color) {
33268 # var redFrac = rgb_color.red || 0.0;
33269 # var greenFrac = rgb_color.green || 0.0;
33270 # var blueFrac = rgb_color.blue || 0.0;
33271 # var red = Math.floor(redFrac * 255);
33272 # var green = Math.floor(greenFrac * 255);
33273 # var blue = Math.floor(blueFrac * 255);
33274 #
33275 # if (!('alpha' in rgb_color)) {
33276 # return rgbToCssColor_(red, green, blue);
33277 # }
33278 #
33279 # var alphaFrac = rgb_color.alpha.value || 0.0;
33280 # var rgbParams = [red, green, blue].join(',');
33281 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33282 # };
33283 #
33284 # var rgbToCssColor_ = function(red, green, blue) {
33285 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33286 # var hexString = rgbNumber.toString(16);
33287 # var missingZeros = 6 - hexString.length;
33288 # var resultBuilder = ['#'];
33289 # for (var i = 0; i < missingZeros; i++) {
33290 # resultBuilder.push('0');
33291 # }
33292 # resultBuilder.push(hexString);
33293 # return resultBuilder.join('');
33294 # };
33295 #
33296 # // ...
33297 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33298 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33299 # the final pixel color is defined by the equation:
33300 #
33301 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33302 #
33303 # This means that a value of 1.0 corresponds to a solid color, whereas
33304 # a value of 0.0 corresponds to a completely transparent color. This
33305 # uses a wrapper message rather than a simple float scalar so that it is
33306 # possible to distinguish between a default value and the value being unset.
33307 # If omitted, this color object is to be rendered as a solid color
33308 # (as if the alpha value had been explicitly given with a value of 1.0).
33309 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33310 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33311 },
Thomas Coffee2f245372017-03-27 10:39:26 -070033312 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033313 "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).
33314 # Absent values indicate that the field isn't specified.
33315 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
33316 # for simplicity of conversion to/from color representations in various
33317 # languages over compactness; for example, the fields of this representation
33318 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33319 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33320 # method in iOS; and, with just a little work, it can be easily formatted into
33321 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33322 #
33323 # Example (Java):
33324 #
33325 # import com.google.type.Color;
33326 #
33327 # // ...
33328 # public static java.awt.Color fromProto(Color protocolor) {
33329 # float alpha = protocolor.hasAlpha()
33330 # ? protocolor.getAlpha().getValue()
33331 # : 1.0;
33332 #
33333 # return new java.awt.Color(
33334 # protocolor.getRed(),
33335 # protocolor.getGreen(),
33336 # protocolor.getBlue(),
33337 # alpha);
33338 # }
33339 #
33340 # public static Color toProto(java.awt.Color color) {
33341 # float red = (float) color.getRed();
33342 # float green = (float) color.getGreen();
33343 # float blue = (float) color.getBlue();
33344 # float denominator = 255.0;
33345 # Color.Builder resultBuilder =
33346 # Color
33347 # .newBuilder()
33348 # .setRed(red / denominator)
33349 # .setGreen(green / denominator)
33350 # .setBlue(blue / denominator);
33351 # int alpha = color.getAlpha();
33352 # if (alpha != 255) {
33353 # result.setAlpha(
33354 # FloatValue
33355 # .newBuilder()
33356 # .setValue(((float) alpha) / denominator)
33357 # .build());
33358 # }
33359 # return resultBuilder.build();
33360 # }
33361 # // ...
33362 #
33363 # Example (iOS / Obj-C):
33364 #
33365 # // ...
33366 # static UIColor* fromProto(Color* protocolor) {
33367 # float red = [protocolor red];
33368 # float green = [protocolor green];
33369 # float blue = [protocolor blue];
33370 # FloatValue* alpha_wrapper = [protocolor alpha];
33371 # float alpha = 1.0;
33372 # if (alpha_wrapper != nil) {
33373 # alpha = [alpha_wrapper value];
33374 # }
33375 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33376 # }
33377 #
33378 # static Color* toProto(UIColor* color) {
33379 # CGFloat red, green, blue, alpha;
33380 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33381 # return nil;
33382 # }
33383 # Color* result = [Color alloc] init];
33384 # [result setRed:red];
33385 # [result setGreen:green];
33386 # [result setBlue:blue];
33387 # if (alpha <= 0.9999) {
33388 # [result setAlpha:floatWrapperWithValue(alpha)];
33389 # }
33390 # [result autorelease];
33391 # return result;
33392 # }
33393 # // ...
33394 #
33395 # Example (JavaScript):
33396 #
33397 # // ...
33398 #
33399 # var protoToCssColor = function(rgb_color) {
33400 # var redFrac = rgb_color.red || 0.0;
33401 # var greenFrac = rgb_color.green || 0.0;
33402 # var blueFrac = rgb_color.blue || 0.0;
33403 # var red = Math.floor(redFrac * 255);
33404 # var green = Math.floor(greenFrac * 255);
33405 # var blue = Math.floor(blueFrac * 255);
33406 #
33407 # if (!('alpha' in rgb_color)) {
33408 # return rgbToCssColor_(red, green, blue);
33409 # }
33410 #
33411 # var alphaFrac = rgb_color.alpha.value || 0.0;
33412 # var rgbParams = [red, green, blue].join(',');
33413 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33414 # };
33415 #
33416 # var rgbToCssColor_ = function(red, green, blue) {
33417 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33418 # var hexString = rgbNumber.toString(16);
33419 # var missingZeros = 6 - hexString.length;
33420 # var resultBuilder = ['#'];
33421 # for (var i = 0; i < missingZeros; i++) {
33422 # resultBuilder.push('0');
33423 # }
33424 # resultBuilder.push(hexString);
33425 # return resultBuilder.join('');
33426 # };
33427 #
33428 # // ...
33429 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33430 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33431 # the final pixel color is defined by the equation:
33432 #
33433 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33434 #
33435 # This means that a value of 1.0 corresponds to a solid color, whereas
33436 # a value of 0.0 corresponds to a completely transparent color. This
33437 # uses a wrapper message rather than a simple float scalar so that it is
33438 # possible to distinguish between a default value and the value being unset.
33439 # If omitted, this color object is to be rendered as a solid color
33440 # (as if the alpha value had been explicitly given with a value of 1.0).
33441 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33442 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33443 },
33444 "bold": True or False, # True if the text is bold.
33445 "strikethrough": True or False, # True if the text has a strikethrough.
33446 "fontFamily": "A String", # The font family.
33447 "fontSize": 42, # The size of the font.
33448 "italic": True or False, # True if the text is italicized.
33449 "underline": True or False, # True if the text is underlined.
33450 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070033451 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
33452 "angle": 42, # The angle between the standard orientation and the desired orientation.
33453 # Measured in degrees. Valid values are between -90 and 90. Positive
33454 # angles are angled upwards, negative are angled downwards.
33455 #
33456 # Note: For LTR text direction positive angles are in the counterclockwise
33457 # direction, whereas for RTL they are in the clockwise direction
33458 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
33459 # characters is unchanged.
33460 # For example:
33461 #
33462 # | V |
33463 # | e |
33464 # | r |
33465 # | t |
33466 # | i |
33467 # | c |
33468 # | a |
33469 # | l |
33470 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033471 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
33472 "borders": { # The borders of the cell. # The borders of the cell.
33473 "top": { # A border along a cell. # The top border of the cell.
33474 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33475 # for simplicity of conversion to/from color representations in various
33476 # languages over compactness; for example, the fields of this representation
33477 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33478 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33479 # method in iOS; and, with just a little work, it can be easily formatted into
33480 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33481 #
33482 # Example (Java):
33483 #
33484 # import com.google.type.Color;
33485 #
33486 # // ...
33487 # public static java.awt.Color fromProto(Color protocolor) {
33488 # float alpha = protocolor.hasAlpha()
33489 # ? protocolor.getAlpha().getValue()
33490 # : 1.0;
33491 #
33492 # return new java.awt.Color(
33493 # protocolor.getRed(),
33494 # protocolor.getGreen(),
33495 # protocolor.getBlue(),
33496 # alpha);
33497 # }
33498 #
33499 # public static Color toProto(java.awt.Color color) {
33500 # float red = (float) color.getRed();
33501 # float green = (float) color.getGreen();
33502 # float blue = (float) color.getBlue();
33503 # float denominator = 255.0;
33504 # Color.Builder resultBuilder =
33505 # Color
33506 # .newBuilder()
33507 # .setRed(red / denominator)
33508 # .setGreen(green / denominator)
33509 # .setBlue(blue / denominator);
33510 # int alpha = color.getAlpha();
33511 # if (alpha != 255) {
33512 # result.setAlpha(
33513 # FloatValue
33514 # .newBuilder()
33515 # .setValue(((float) alpha) / denominator)
33516 # .build());
33517 # }
33518 # return resultBuilder.build();
33519 # }
33520 # // ...
33521 #
33522 # Example (iOS / Obj-C):
33523 #
33524 # // ...
33525 # static UIColor* fromProto(Color* protocolor) {
33526 # float red = [protocolor red];
33527 # float green = [protocolor green];
33528 # float blue = [protocolor blue];
33529 # FloatValue* alpha_wrapper = [protocolor alpha];
33530 # float alpha = 1.0;
33531 # if (alpha_wrapper != nil) {
33532 # alpha = [alpha_wrapper value];
33533 # }
33534 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33535 # }
33536 #
33537 # static Color* toProto(UIColor* color) {
33538 # CGFloat red, green, blue, alpha;
33539 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33540 # return nil;
33541 # }
33542 # Color* result = [Color alloc] init];
33543 # [result setRed:red];
33544 # [result setGreen:green];
33545 # [result setBlue:blue];
33546 # if (alpha <= 0.9999) {
33547 # [result setAlpha:floatWrapperWithValue(alpha)];
33548 # }
33549 # [result autorelease];
33550 # return result;
33551 # }
33552 # // ...
33553 #
33554 # Example (JavaScript):
33555 #
33556 # // ...
33557 #
33558 # var protoToCssColor = function(rgb_color) {
33559 # var redFrac = rgb_color.red || 0.0;
33560 # var greenFrac = rgb_color.green || 0.0;
33561 # var blueFrac = rgb_color.blue || 0.0;
33562 # var red = Math.floor(redFrac * 255);
33563 # var green = Math.floor(greenFrac * 255);
33564 # var blue = Math.floor(blueFrac * 255);
33565 #
33566 # if (!('alpha' in rgb_color)) {
33567 # return rgbToCssColor_(red, green, blue);
33568 # }
33569 #
33570 # var alphaFrac = rgb_color.alpha.value || 0.0;
33571 # var rgbParams = [red, green, blue].join(',');
33572 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33573 # };
33574 #
33575 # var rgbToCssColor_ = function(red, green, blue) {
33576 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33577 # var hexString = rgbNumber.toString(16);
33578 # var missingZeros = 6 - hexString.length;
33579 # var resultBuilder = ['#'];
33580 # for (var i = 0; i < missingZeros; i++) {
33581 # resultBuilder.push('0');
33582 # }
33583 # resultBuilder.push(hexString);
33584 # return resultBuilder.join('');
33585 # };
33586 #
33587 # // ...
33588 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33589 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33590 # the final pixel color is defined by the equation:
33591 #
33592 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33593 #
33594 # This means that a value of 1.0 corresponds to a solid color, whereas
33595 # a value of 0.0 corresponds to a completely transparent color. This
33596 # uses a wrapper message rather than a simple float scalar so that it is
33597 # possible to distinguish between a default value and the value being unset.
33598 # If omitted, this color object is to be rendered as a solid color
33599 # (as if the alpha value had been explicitly given with a value of 1.0).
33600 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33601 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33602 },
33603 "width": 42, # The width of the border, in pixels.
33604 # Deprecated; the width is determined by the "style" field.
33605 "style": "A String", # The style of the border.
33606 },
33607 "right": { # A border along a cell. # The right border of the cell.
33608 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33609 # for simplicity of conversion to/from color representations in various
33610 # languages over compactness; for example, the fields of this representation
33611 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33612 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33613 # method in iOS; and, with just a little work, it can be easily formatted into
33614 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33615 #
33616 # Example (Java):
33617 #
33618 # import com.google.type.Color;
33619 #
33620 # // ...
33621 # public static java.awt.Color fromProto(Color protocolor) {
33622 # float alpha = protocolor.hasAlpha()
33623 # ? protocolor.getAlpha().getValue()
33624 # : 1.0;
33625 #
33626 # return new java.awt.Color(
33627 # protocolor.getRed(),
33628 # protocolor.getGreen(),
33629 # protocolor.getBlue(),
33630 # alpha);
33631 # }
33632 #
33633 # public static Color toProto(java.awt.Color color) {
33634 # float red = (float) color.getRed();
33635 # float green = (float) color.getGreen();
33636 # float blue = (float) color.getBlue();
33637 # float denominator = 255.0;
33638 # Color.Builder resultBuilder =
33639 # Color
33640 # .newBuilder()
33641 # .setRed(red / denominator)
33642 # .setGreen(green / denominator)
33643 # .setBlue(blue / denominator);
33644 # int alpha = color.getAlpha();
33645 # if (alpha != 255) {
33646 # result.setAlpha(
33647 # FloatValue
33648 # .newBuilder()
33649 # .setValue(((float) alpha) / denominator)
33650 # .build());
33651 # }
33652 # return resultBuilder.build();
33653 # }
33654 # // ...
33655 #
33656 # Example (iOS / Obj-C):
33657 #
33658 # // ...
33659 # static UIColor* fromProto(Color* protocolor) {
33660 # float red = [protocolor red];
33661 # float green = [protocolor green];
33662 # float blue = [protocolor blue];
33663 # FloatValue* alpha_wrapper = [protocolor alpha];
33664 # float alpha = 1.0;
33665 # if (alpha_wrapper != nil) {
33666 # alpha = [alpha_wrapper value];
33667 # }
33668 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33669 # }
33670 #
33671 # static Color* toProto(UIColor* color) {
33672 # CGFloat red, green, blue, alpha;
33673 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33674 # return nil;
33675 # }
33676 # Color* result = [Color alloc] init];
33677 # [result setRed:red];
33678 # [result setGreen:green];
33679 # [result setBlue:blue];
33680 # if (alpha <= 0.9999) {
33681 # [result setAlpha:floatWrapperWithValue(alpha)];
33682 # }
33683 # [result autorelease];
33684 # return result;
33685 # }
33686 # // ...
33687 #
33688 # Example (JavaScript):
33689 #
33690 # // ...
33691 #
33692 # var protoToCssColor = function(rgb_color) {
33693 # var redFrac = rgb_color.red || 0.0;
33694 # var greenFrac = rgb_color.green || 0.0;
33695 # var blueFrac = rgb_color.blue || 0.0;
33696 # var red = Math.floor(redFrac * 255);
33697 # var green = Math.floor(greenFrac * 255);
33698 # var blue = Math.floor(blueFrac * 255);
33699 #
33700 # if (!('alpha' in rgb_color)) {
33701 # return rgbToCssColor_(red, green, blue);
33702 # }
33703 #
33704 # var alphaFrac = rgb_color.alpha.value || 0.0;
33705 # var rgbParams = [red, green, blue].join(',');
33706 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33707 # };
33708 #
33709 # var rgbToCssColor_ = function(red, green, blue) {
33710 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33711 # var hexString = rgbNumber.toString(16);
33712 # var missingZeros = 6 - hexString.length;
33713 # var resultBuilder = ['#'];
33714 # for (var i = 0; i < missingZeros; i++) {
33715 # resultBuilder.push('0');
33716 # }
33717 # resultBuilder.push(hexString);
33718 # return resultBuilder.join('');
33719 # };
33720 #
33721 # // ...
33722 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33723 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33724 # the final pixel color is defined by the equation:
33725 #
33726 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33727 #
33728 # This means that a value of 1.0 corresponds to a solid color, whereas
33729 # a value of 0.0 corresponds to a completely transparent color. This
33730 # uses a wrapper message rather than a simple float scalar so that it is
33731 # possible to distinguish between a default value and the value being unset.
33732 # If omitted, this color object is to be rendered as a solid color
33733 # (as if the alpha value had been explicitly given with a value of 1.0).
33734 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33735 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33736 },
33737 "width": 42, # The width of the border, in pixels.
33738 # Deprecated; the width is determined by the "style" field.
33739 "style": "A String", # The style of the border.
33740 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033741 "left": { # A border along a cell. # The left border of the cell.
33742 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33743 # for simplicity of conversion to/from color representations in various
33744 # languages over compactness; for example, the fields of this representation
33745 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33746 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33747 # method in iOS; and, with just a little work, it can be easily formatted into
33748 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33749 #
33750 # Example (Java):
33751 #
33752 # import com.google.type.Color;
33753 #
33754 # // ...
33755 # public static java.awt.Color fromProto(Color protocolor) {
33756 # float alpha = protocolor.hasAlpha()
33757 # ? protocolor.getAlpha().getValue()
33758 # : 1.0;
33759 #
33760 # return new java.awt.Color(
33761 # protocolor.getRed(),
33762 # protocolor.getGreen(),
33763 # protocolor.getBlue(),
33764 # alpha);
33765 # }
33766 #
33767 # public static Color toProto(java.awt.Color color) {
33768 # float red = (float) color.getRed();
33769 # float green = (float) color.getGreen();
33770 # float blue = (float) color.getBlue();
33771 # float denominator = 255.0;
33772 # Color.Builder resultBuilder =
33773 # Color
33774 # .newBuilder()
33775 # .setRed(red / denominator)
33776 # .setGreen(green / denominator)
33777 # .setBlue(blue / denominator);
33778 # int alpha = color.getAlpha();
33779 # if (alpha != 255) {
33780 # result.setAlpha(
33781 # FloatValue
33782 # .newBuilder()
33783 # .setValue(((float) alpha) / denominator)
33784 # .build());
33785 # }
33786 # return resultBuilder.build();
33787 # }
33788 # // ...
33789 #
33790 # Example (iOS / Obj-C):
33791 #
33792 # // ...
33793 # static UIColor* fromProto(Color* protocolor) {
33794 # float red = [protocolor red];
33795 # float green = [protocolor green];
33796 # float blue = [protocolor blue];
33797 # FloatValue* alpha_wrapper = [protocolor alpha];
33798 # float alpha = 1.0;
33799 # if (alpha_wrapper != nil) {
33800 # alpha = [alpha_wrapper value];
33801 # }
33802 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33803 # }
33804 #
33805 # static Color* toProto(UIColor* color) {
33806 # CGFloat red, green, blue, alpha;
33807 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33808 # return nil;
33809 # }
33810 # Color* result = [Color alloc] init];
33811 # [result setRed:red];
33812 # [result setGreen:green];
33813 # [result setBlue:blue];
33814 # if (alpha <= 0.9999) {
33815 # [result setAlpha:floatWrapperWithValue(alpha)];
33816 # }
33817 # [result autorelease];
33818 # return result;
33819 # }
33820 # // ...
33821 #
33822 # Example (JavaScript):
33823 #
33824 # // ...
33825 #
33826 # var protoToCssColor = function(rgb_color) {
33827 # var redFrac = rgb_color.red || 0.0;
33828 # var greenFrac = rgb_color.green || 0.0;
33829 # var blueFrac = rgb_color.blue || 0.0;
33830 # var red = Math.floor(redFrac * 255);
33831 # var green = Math.floor(greenFrac * 255);
33832 # var blue = Math.floor(blueFrac * 255);
33833 #
33834 # if (!('alpha' in rgb_color)) {
33835 # return rgbToCssColor_(red, green, blue);
33836 # }
33837 #
33838 # var alphaFrac = rgb_color.alpha.value || 0.0;
33839 # var rgbParams = [red, green, blue].join(',');
33840 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33841 # };
33842 #
33843 # var rgbToCssColor_ = function(red, green, blue) {
33844 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33845 # var hexString = rgbNumber.toString(16);
33846 # var missingZeros = 6 - hexString.length;
33847 # var resultBuilder = ['#'];
33848 # for (var i = 0; i < missingZeros; i++) {
33849 # resultBuilder.push('0');
33850 # }
33851 # resultBuilder.push(hexString);
33852 # return resultBuilder.join('');
33853 # };
33854 #
33855 # // ...
33856 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33857 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33858 # the final pixel color is defined by the equation:
33859 #
33860 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33861 #
33862 # This means that a value of 1.0 corresponds to a solid color, whereas
33863 # a value of 0.0 corresponds to a completely transparent color. This
33864 # uses a wrapper message rather than a simple float scalar so that it is
33865 # possible to distinguish between a default value and the value being unset.
33866 # If omitted, this color object is to be rendered as a solid color
33867 # (as if the alpha value had been explicitly given with a value of 1.0).
33868 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33869 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33870 },
33871 "width": 42, # The width of the border, in pixels.
33872 # Deprecated; the width is determined by the "style" field.
33873 "style": "A String", # The style of the border.
33874 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070033875 "bottom": { # A border along a cell. # The bottom border of the cell.
33876 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33877 # for simplicity of conversion to/from color representations in various
33878 # languages over compactness; for example, the fields of this representation
33879 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33880 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33881 # method in iOS; and, with just a little work, it can be easily formatted into
33882 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33883 #
33884 # Example (Java):
33885 #
33886 # import com.google.type.Color;
33887 #
33888 # // ...
33889 # public static java.awt.Color fromProto(Color protocolor) {
33890 # float alpha = protocolor.hasAlpha()
33891 # ? protocolor.getAlpha().getValue()
33892 # : 1.0;
33893 #
33894 # return new java.awt.Color(
33895 # protocolor.getRed(),
33896 # protocolor.getGreen(),
33897 # protocolor.getBlue(),
33898 # alpha);
33899 # }
33900 #
33901 # public static Color toProto(java.awt.Color color) {
33902 # float red = (float) color.getRed();
33903 # float green = (float) color.getGreen();
33904 # float blue = (float) color.getBlue();
33905 # float denominator = 255.0;
33906 # Color.Builder resultBuilder =
33907 # Color
33908 # .newBuilder()
33909 # .setRed(red / denominator)
33910 # .setGreen(green / denominator)
33911 # .setBlue(blue / denominator);
33912 # int alpha = color.getAlpha();
33913 # if (alpha != 255) {
33914 # result.setAlpha(
33915 # FloatValue
33916 # .newBuilder()
33917 # .setValue(((float) alpha) / denominator)
33918 # .build());
33919 # }
33920 # return resultBuilder.build();
33921 # }
33922 # // ...
33923 #
33924 # Example (iOS / Obj-C):
33925 #
33926 # // ...
33927 # static UIColor* fromProto(Color* protocolor) {
33928 # float red = [protocolor red];
33929 # float green = [protocolor green];
33930 # float blue = [protocolor blue];
33931 # FloatValue* alpha_wrapper = [protocolor alpha];
33932 # float alpha = 1.0;
33933 # if (alpha_wrapper != nil) {
33934 # alpha = [alpha_wrapper value];
33935 # }
33936 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33937 # }
33938 #
33939 # static Color* toProto(UIColor* color) {
33940 # CGFloat red, green, blue, alpha;
33941 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33942 # return nil;
33943 # }
33944 # Color* result = [Color alloc] init];
33945 # [result setRed:red];
33946 # [result setGreen:green];
33947 # [result setBlue:blue];
33948 # if (alpha <= 0.9999) {
33949 # [result setAlpha:floatWrapperWithValue(alpha)];
33950 # }
33951 # [result autorelease];
33952 # return result;
33953 # }
33954 # // ...
33955 #
33956 # Example (JavaScript):
33957 #
33958 # // ...
33959 #
33960 # var protoToCssColor = function(rgb_color) {
33961 # var redFrac = rgb_color.red || 0.0;
33962 # var greenFrac = rgb_color.green || 0.0;
33963 # var blueFrac = rgb_color.blue || 0.0;
33964 # var red = Math.floor(redFrac * 255);
33965 # var green = Math.floor(greenFrac * 255);
33966 # var blue = Math.floor(blueFrac * 255);
33967 #
33968 # if (!('alpha' in rgb_color)) {
33969 # return rgbToCssColor_(red, green, blue);
33970 # }
33971 #
33972 # var alphaFrac = rgb_color.alpha.value || 0.0;
33973 # var rgbParams = [red, green, blue].join(',');
33974 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33975 # };
33976 #
33977 # var rgbToCssColor_ = function(red, green, blue) {
33978 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33979 # var hexString = rgbNumber.toString(16);
33980 # var missingZeros = 6 - hexString.length;
33981 # var resultBuilder = ['#'];
33982 # for (var i = 0; i < missingZeros; i++) {
33983 # resultBuilder.push('0');
33984 # }
33985 # resultBuilder.push(hexString);
33986 # return resultBuilder.join('');
33987 # };
33988 #
33989 # // ...
33990 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33991 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33992 # the final pixel color is defined by the equation:
33993 #
33994 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33995 #
33996 # This means that a value of 1.0 corresponds to a solid color, whereas
33997 # a value of 0.0 corresponds to a completely transparent color. This
33998 # uses a wrapper message rather than a simple float scalar so that it is
33999 # possible to distinguish between a default value and the value being unset.
34000 # If omitted, this color object is to be rendered as a solid color
34001 # (as if the alpha value had been explicitly given with a value of 1.0).
34002 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34003 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34004 },
34005 "width": 42, # The width of the border, in pixels.
34006 # Deprecated; the width is determined by the "style" field.
34007 "style": "A String", # The style of the border.
34008 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034009 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070034010 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034011 },
34012 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
34013 #
34014 # When writing, the new format will be merged with the existing format.
34015 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
34016 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
34017 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034018 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034019 # information about the supported patterns.
34020 "type": "A String", # The type of the number format.
34021 # When writing, this field must be set.
34022 },
34023 "textDirection": "A String", # The direction of the text in the cell.
34024 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
34025 # When updating padding, every field must be specified.
34026 "top": 42, # The top padding of the cell.
34027 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034028 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034029 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034030 },
Thomas Coffee2f245372017-03-27 10:39:26 -070034031 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034032 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
34033 # for simplicity of conversion to/from color representations in various
34034 # languages over compactness; for example, the fields of this representation
34035 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34036 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34037 # method in iOS; and, with just a little work, it can be easily formatted into
34038 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34039 #
34040 # Example (Java):
34041 #
34042 # import com.google.type.Color;
34043 #
34044 # // ...
34045 # public static java.awt.Color fromProto(Color protocolor) {
34046 # float alpha = protocolor.hasAlpha()
34047 # ? protocolor.getAlpha().getValue()
34048 # : 1.0;
34049 #
34050 # return new java.awt.Color(
34051 # protocolor.getRed(),
34052 # protocolor.getGreen(),
34053 # protocolor.getBlue(),
34054 # alpha);
34055 # }
34056 #
34057 # public static Color toProto(java.awt.Color color) {
34058 # float red = (float) color.getRed();
34059 # float green = (float) color.getGreen();
34060 # float blue = (float) color.getBlue();
34061 # float denominator = 255.0;
34062 # Color.Builder resultBuilder =
34063 # Color
34064 # .newBuilder()
34065 # .setRed(red / denominator)
34066 # .setGreen(green / denominator)
34067 # .setBlue(blue / denominator);
34068 # int alpha = color.getAlpha();
34069 # if (alpha != 255) {
34070 # result.setAlpha(
34071 # FloatValue
34072 # .newBuilder()
34073 # .setValue(((float) alpha) / denominator)
34074 # .build());
34075 # }
34076 # return resultBuilder.build();
34077 # }
34078 # // ...
34079 #
34080 # Example (iOS / Obj-C):
34081 #
34082 # // ...
34083 # static UIColor* fromProto(Color* protocolor) {
34084 # float red = [protocolor red];
34085 # float green = [protocolor green];
34086 # float blue = [protocolor blue];
34087 # FloatValue* alpha_wrapper = [protocolor alpha];
34088 # float alpha = 1.0;
34089 # if (alpha_wrapper != nil) {
34090 # alpha = [alpha_wrapper value];
34091 # }
34092 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34093 # }
34094 #
34095 # static Color* toProto(UIColor* color) {
34096 # CGFloat red, green, blue, alpha;
34097 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34098 # return nil;
34099 # }
34100 # Color* result = [Color alloc] init];
34101 # [result setRed:red];
34102 # [result setGreen:green];
34103 # [result setBlue:blue];
34104 # if (alpha <= 0.9999) {
34105 # [result setAlpha:floatWrapperWithValue(alpha)];
34106 # }
34107 # [result autorelease];
34108 # return result;
34109 # }
34110 # // ...
34111 #
34112 # Example (JavaScript):
34113 #
34114 # // ...
34115 #
34116 # var protoToCssColor = function(rgb_color) {
34117 # var redFrac = rgb_color.red || 0.0;
34118 # var greenFrac = rgb_color.green || 0.0;
34119 # var blueFrac = rgb_color.blue || 0.0;
34120 # var red = Math.floor(redFrac * 255);
34121 # var green = Math.floor(greenFrac * 255);
34122 # var blue = Math.floor(blueFrac * 255);
34123 #
34124 # if (!('alpha' in rgb_color)) {
34125 # return rgbToCssColor_(red, green, blue);
34126 # }
34127 #
34128 # var alphaFrac = rgb_color.alpha.value || 0.0;
34129 # var rgbParams = [red, green, blue].join(',');
34130 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34131 # };
34132 #
34133 # var rgbToCssColor_ = function(red, green, blue) {
34134 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34135 # var hexString = rgbNumber.toString(16);
34136 # var missingZeros = 6 - hexString.length;
34137 # var resultBuilder = ['#'];
34138 # for (var i = 0; i < missingZeros; i++) {
34139 # resultBuilder.push('0');
34140 # }
34141 # resultBuilder.push(hexString);
34142 # return resultBuilder.join('');
34143 # };
34144 #
34145 # // ...
34146 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34147 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34148 # the final pixel color is defined by the equation:
34149 #
34150 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34151 #
34152 # This means that a value of 1.0 corresponds to a solid color, whereas
34153 # a value of 0.0 corresponds to a completely transparent color. This
34154 # uses a wrapper message rather than a simple float scalar so that it is
34155 # possible to distinguish between a default value and the value being unset.
34156 # If omitted, this color object is to be rendered as a solid color
34157 # (as if the alpha value had been explicitly given with a value of 1.0).
34158 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34159 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34160 },
Thomas Coffee2f245372017-03-27 10:39:26 -070034161 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034162 "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).
34163 # Absent values indicate that the field isn't specified.
34164 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34165 # for simplicity of conversion to/from color representations in various
34166 # languages over compactness; for example, the fields of this representation
34167 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34168 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34169 # method in iOS; and, with just a little work, it can be easily formatted into
34170 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34171 #
34172 # Example (Java):
34173 #
34174 # import com.google.type.Color;
34175 #
34176 # // ...
34177 # public static java.awt.Color fromProto(Color protocolor) {
34178 # float alpha = protocolor.hasAlpha()
34179 # ? protocolor.getAlpha().getValue()
34180 # : 1.0;
34181 #
34182 # return new java.awt.Color(
34183 # protocolor.getRed(),
34184 # protocolor.getGreen(),
34185 # protocolor.getBlue(),
34186 # alpha);
34187 # }
34188 #
34189 # public static Color toProto(java.awt.Color color) {
34190 # float red = (float) color.getRed();
34191 # float green = (float) color.getGreen();
34192 # float blue = (float) color.getBlue();
34193 # float denominator = 255.0;
34194 # Color.Builder resultBuilder =
34195 # Color
34196 # .newBuilder()
34197 # .setRed(red / denominator)
34198 # .setGreen(green / denominator)
34199 # .setBlue(blue / denominator);
34200 # int alpha = color.getAlpha();
34201 # if (alpha != 255) {
34202 # result.setAlpha(
34203 # FloatValue
34204 # .newBuilder()
34205 # .setValue(((float) alpha) / denominator)
34206 # .build());
34207 # }
34208 # return resultBuilder.build();
34209 # }
34210 # // ...
34211 #
34212 # Example (iOS / Obj-C):
34213 #
34214 # // ...
34215 # static UIColor* fromProto(Color* protocolor) {
34216 # float red = [protocolor red];
34217 # float green = [protocolor green];
34218 # float blue = [protocolor blue];
34219 # FloatValue* alpha_wrapper = [protocolor alpha];
34220 # float alpha = 1.0;
34221 # if (alpha_wrapper != nil) {
34222 # alpha = [alpha_wrapper value];
34223 # }
34224 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34225 # }
34226 #
34227 # static Color* toProto(UIColor* color) {
34228 # CGFloat red, green, blue, alpha;
34229 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34230 # return nil;
34231 # }
34232 # Color* result = [Color alloc] init];
34233 # [result setRed:red];
34234 # [result setGreen:green];
34235 # [result setBlue:blue];
34236 # if (alpha <= 0.9999) {
34237 # [result setAlpha:floatWrapperWithValue(alpha)];
34238 # }
34239 # [result autorelease];
34240 # return result;
34241 # }
34242 # // ...
34243 #
34244 # Example (JavaScript):
34245 #
34246 # // ...
34247 #
34248 # var protoToCssColor = function(rgb_color) {
34249 # var redFrac = rgb_color.red || 0.0;
34250 # var greenFrac = rgb_color.green || 0.0;
34251 # var blueFrac = rgb_color.blue || 0.0;
34252 # var red = Math.floor(redFrac * 255);
34253 # var green = Math.floor(greenFrac * 255);
34254 # var blue = Math.floor(blueFrac * 255);
34255 #
34256 # if (!('alpha' in rgb_color)) {
34257 # return rgbToCssColor_(red, green, blue);
34258 # }
34259 #
34260 # var alphaFrac = rgb_color.alpha.value || 0.0;
34261 # var rgbParams = [red, green, blue].join(',');
34262 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34263 # };
34264 #
34265 # var rgbToCssColor_ = function(red, green, blue) {
34266 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34267 # var hexString = rgbNumber.toString(16);
34268 # var missingZeros = 6 - hexString.length;
34269 # var resultBuilder = ['#'];
34270 # for (var i = 0; i < missingZeros; i++) {
34271 # resultBuilder.push('0');
34272 # }
34273 # resultBuilder.push(hexString);
34274 # return resultBuilder.join('');
34275 # };
34276 #
34277 # // ...
34278 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34279 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34280 # the final pixel color is defined by the equation:
34281 #
34282 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34283 #
34284 # This means that a value of 1.0 corresponds to a solid color, whereas
34285 # a value of 0.0 corresponds to a completely transparent color. This
34286 # uses a wrapper message rather than a simple float scalar so that it is
34287 # possible to distinguish between a default value and the value being unset.
34288 # If omitted, this color object is to be rendered as a solid color
34289 # (as if the alpha value had been explicitly given with a value of 1.0).
34290 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34291 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34292 },
34293 "bold": True or False, # True if the text is bold.
34294 "strikethrough": True or False, # True if the text has a strikethrough.
34295 "fontFamily": "A String", # The font family.
34296 "fontSize": 42, # The size of the font.
34297 "italic": True or False, # True if the text is italicized.
34298 "underline": True or False, # True if the text is underlined.
34299 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070034300 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
34301 "angle": 42, # The angle between the standard orientation and the desired orientation.
34302 # Measured in degrees. Valid values are between -90 and 90. Positive
34303 # angles are angled upwards, negative are angled downwards.
34304 #
34305 # Note: For LTR text direction positive angles are in the counterclockwise
34306 # direction, whereas for RTL they are in the clockwise direction
34307 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
34308 # characters is unchanged.
34309 # For example:
34310 #
34311 # | V |
34312 # | e |
34313 # | r |
34314 # | t |
34315 # | i |
34316 # | c |
34317 # | a |
34318 # | l |
34319 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034320 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
34321 "borders": { # The borders of the cell. # The borders of the cell.
34322 "top": { # A border along a cell. # The top border of the cell.
34323 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34324 # for simplicity of conversion to/from color representations in various
34325 # languages over compactness; for example, the fields of this representation
34326 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34327 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34328 # method in iOS; and, with just a little work, it can be easily formatted into
34329 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34330 #
34331 # Example (Java):
34332 #
34333 # import com.google.type.Color;
34334 #
34335 # // ...
34336 # public static java.awt.Color fromProto(Color protocolor) {
34337 # float alpha = protocolor.hasAlpha()
34338 # ? protocolor.getAlpha().getValue()
34339 # : 1.0;
34340 #
34341 # return new java.awt.Color(
34342 # protocolor.getRed(),
34343 # protocolor.getGreen(),
34344 # protocolor.getBlue(),
34345 # alpha);
34346 # }
34347 #
34348 # public static Color toProto(java.awt.Color color) {
34349 # float red = (float) color.getRed();
34350 # float green = (float) color.getGreen();
34351 # float blue = (float) color.getBlue();
34352 # float denominator = 255.0;
34353 # Color.Builder resultBuilder =
34354 # Color
34355 # .newBuilder()
34356 # .setRed(red / denominator)
34357 # .setGreen(green / denominator)
34358 # .setBlue(blue / denominator);
34359 # int alpha = color.getAlpha();
34360 # if (alpha != 255) {
34361 # result.setAlpha(
34362 # FloatValue
34363 # .newBuilder()
34364 # .setValue(((float) alpha) / denominator)
34365 # .build());
34366 # }
34367 # return resultBuilder.build();
34368 # }
34369 # // ...
34370 #
34371 # Example (iOS / Obj-C):
34372 #
34373 # // ...
34374 # static UIColor* fromProto(Color* protocolor) {
34375 # float red = [protocolor red];
34376 # float green = [protocolor green];
34377 # float blue = [protocolor blue];
34378 # FloatValue* alpha_wrapper = [protocolor alpha];
34379 # float alpha = 1.0;
34380 # if (alpha_wrapper != nil) {
34381 # alpha = [alpha_wrapper value];
34382 # }
34383 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34384 # }
34385 #
34386 # static Color* toProto(UIColor* color) {
34387 # CGFloat red, green, blue, alpha;
34388 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34389 # return nil;
34390 # }
34391 # Color* result = [Color alloc] init];
34392 # [result setRed:red];
34393 # [result setGreen:green];
34394 # [result setBlue:blue];
34395 # if (alpha <= 0.9999) {
34396 # [result setAlpha:floatWrapperWithValue(alpha)];
34397 # }
34398 # [result autorelease];
34399 # return result;
34400 # }
34401 # // ...
34402 #
34403 # Example (JavaScript):
34404 #
34405 # // ...
34406 #
34407 # var protoToCssColor = function(rgb_color) {
34408 # var redFrac = rgb_color.red || 0.0;
34409 # var greenFrac = rgb_color.green || 0.0;
34410 # var blueFrac = rgb_color.blue || 0.0;
34411 # var red = Math.floor(redFrac * 255);
34412 # var green = Math.floor(greenFrac * 255);
34413 # var blue = Math.floor(blueFrac * 255);
34414 #
34415 # if (!('alpha' in rgb_color)) {
34416 # return rgbToCssColor_(red, green, blue);
34417 # }
34418 #
34419 # var alphaFrac = rgb_color.alpha.value || 0.0;
34420 # var rgbParams = [red, green, blue].join(',');
34421 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34422 # };
34423 #
34424 # var rgbToCssColor_ = function(red, green, blue) {
34425 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34426 # var hexString = rgbNumber.toString(16);
34427 # var missingZeros = 6 - hexString.length;
34428 # var resultBuilder = ['#'];
34429 # for (var i = 0; i < missingZeros; i++) {
34430 # resultBuilder.push('0');
34431 # }
34432 # resultBuilder.push(hexString);
34433 # return resultBuilder.join('');
34434 # };
34435 #
34436 # // ...
34437 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34438 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34439 # the final pixel color is defined by the equation:
34440 #
34441 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34442 #
34443 # This means that a value of 1.0 corresponds to a solid color, whereas
34444 # a value of 0.0 corresponds to a completely transparent color. This
34445 # uses a wrapper message rather than a simple float scalar so that it is
34446 # possible to distinguish between a default value and the value being unset.
34447 # If omitted, this color object is to be rendered as a solid color
34448 # (as if the alpha value had been explicitly given with a value of 1.0).
34449 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34450 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34451 },
34452 "width": 42, # The width of the border, in pixels.
34453 # Deprecated; the width is determined by the "style" field.
34454 "style": "A String", # The style of the border.
34455 },
34456 "right": { # A border along a cell. # The right border of the cell.
34457 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34458 # for simplicity of conversion to/from color representations in various
34459 # languages over compactness; for example, the fields of this representation
34460 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34461 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34462 # method in iOS; and, with just a little work, it can be easily formatted into
34463 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34464 #
34465 # Example (Java):
34466 #
34467 # import com.google.type.Color;
34468 #
34469 # // ...
34470 # public static java.awt.Color fromProto(Color protocolor) {
34471 # float alpha = protocolor.hasAlpha()
34472 # ? protocolor.getAlpha().getValue()
34473 # : 1.0;
34474 #
34475 # return new java.awt.Color(
34476 # protocolor.getRed(),
34477 # protocolor.getGreen(),
34478 # protocolor.getBlue(),
34479 # alpha);
34480 # }
34481 #
34482 # public static Color toProto(java.awt.Color color) {
34483 # float red = (float) color.getRed();
34484 # float green = (float) color.getGreen();
34485 # float blue = (float) color.getBlue();
34486 # float denominator = 255.0;
34487 # Color.Builder resultBuilder =
34488 # Color
34489 # .newBuilder()
34490 # .setRed(red / denominator)
34491 # .setGreen(green / denominator)
34492 # .setBlue(blue / denominator);
34493 # int alpha = color.getAlpha();
34494 # if (alpha != 255) {
34495 # result.setAlpha(
34496 # FloatValue
34497 # .newBuilder()
34498 # .setValue(((float) alpha) / denominator)
34499 # .build());
34500 # }
34501 # return resultBuilder.build();
34502 # }
34503 # // ...
34504 #
34505 # Example (iOS / Obj-C):
34506 #
34507 # // ...
34508 # static UIColor* fromProto(Color* protocolor) {
34509 # float red = [protocolor red];
34510 # float green = [protocolor green];
34511 # float blue = [protocolor blue];
34512 # FloatValue* alpha_wrapper = [protocolor alpha];
34513 # float alpha = 1.0;
34514 # if (alpha_wrapper != nil) {
34515 # alpha = [alpha_wrapper value];
34516 # }
34517 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34518 # }
34519 #
34520 # static Color* toProto(UIColor* color) {
34521 # CGFloat red, green, blue, alpha;
34522 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34523 # return nil;
34524 # }
34525 # Color* result = [Color alloc] init];
34526 # [result setRed:red];
34527 # [result setGreen:green];
34528 # [result setBlue:blue];
34529 # if (alpha <= 0.9999) {
34530 # [result setAlpha:floatWrapperWithValue(alpha)];
34531 # }
34532 # [result autorelease];
34533 # return result;
34534 # }
34535 # // ...
34536 #
34537 # Example (JavaScript):
34538 #
34539 # // ...
34540 #
34541 # var protoToCssColor = function(rgb_color) {
34542 # var redFrac = rgb_color.red || 0.0;
34543 # var greenFrac = rgb_color.green || 0.0;
34544 # var blueFrac = rgb_color.blue || 0.0;
34545 # var red = Math.floor(redFrac * 255);
34546 # var green = Math.floor(greenFrac * 255);
34547 # var blue = Math.floor(blueFrac * 255);
34548 #
34549 # if (!('alpha' in rgb_color)) {
34550 # return rgbToCssColor_(red, green, blue);
34551 # }
34552 #
34553 # var alphaFrac = rgb_color.alpha.value || 0.0;
34554 # var rgbParams = [red, green, blue].join(',');
34555 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34556 # };
34557 #
34558 # var rgbToCssColor_ = function(red, green, blue) {
34559 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34560 # var hexString = rgbNumber.toString(16);
34561 # var missingZeros = 6 - hexString.length;
34562 # var resultBuilder = ['#'];
34563 # for (var i = 0; i < missingZeros; i++) {
34564 # resultBuilder.push('0');
34565 # }
34566 # resultBuilder.push(hexString);
34567 # return resultBuilder.join('');
34568 # };
34569 #
34570 # // ...
34571 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34572 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34573 # the final pixel color is defined by the equation:
34574 #
34575 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34576 #
34577 # This means that a value of 1.0 corresponds to a solid color, whereas
34578 # a value of 0.0 corresponds to a completely transparent color. This
34579 # uses a wrapper message rather than a simple float scalar so that it is
34580 # possible to distinguish between a default value and the value being unset.
34581 # If omitted, this color object is to be rendered as a solid color
34582 # (as if the alpha value had been explicitly given with a value of 1.0).
34583 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34584 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34585 },
34586 "width": 42, # The width of the border, in pixels.
34587 # Deprecated; the width is determined by the "style" field.
34588 "style": "A String", # The style of the border.
34589 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034590 "left": { # A border along a cell. # The left border of the cell.
34591 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34592 # for simplicity of conversion to/from color representations in various
34593 # languages over compactness; for example, the fields of this representation
34594 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34595 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34596 # method in iOS; and, with just a little work, it can be easily formatted into
34597 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34598 #
34599 # Example (Java):
34600 #
34601 # import com.google.type.Color;
34602 #
34603 # // ...
34604 # public static java.awt.Color fromProto(Color protocolor) {
34605 # float alpha = protocolor.hasAlpha()
34606 # ? protocolor.getAlpha().getValue()
34607 # : 1.0;
34608 #
34609 # return new java.awt.Color(
34610 # protocolor.getRed(),
34611 # protocolor.getGreen(),
34612 # protocolor.getBlue(),
34613 # alpha);
34614 # }
34615 #
34616 # public static Color toProto(java.awt.Color color) {
34617 # float red = (float) color.getRed();
34618 # float green = (float) color.getGreen();
34619 # float blue = (float) color.getBlue();
34620 # float denominator = 255.0;
34621 # Color.Builder resultBuilder =
34622 # Color
34623 # .newBuilder()
34624 # .setRed(red / denominator)
34625 # .setGreen(green / denominator)
34626 # .setBlue(blue / denominator);
34627 # int alpha = color.getAlpha();
34628 # if (alpha != 255) {
34629 # result.setAlpha(
34630 # FloatValue
34631 # .newBuilder()
34632 # .setValue(((float) alpha) / denominator)
34633 # .build());
34634 # }
34635 # return resultBuilder.build();
34636 # }
34637 # // ...
34638 #
34639 # Example (iOS / Obj-C):
34640 #
34641 # // ...
34642 # static UIColor* fromProto(Color* protocolor) {
34643 # float red = [protocolor red];
34644 # float green = [protocolor green];
34645 # float blue = [protocolor blue];
34646 # FloatValue* alpha_wrapper = [protocolor alpha];
34647 # float alpha = 1.0;
34648 # if (alpha_wrapper != nil) {
34649 # alpha = [alpha_wrapper value];
34650 # }
34651 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34652 # }
34653 #
34654 # static Color* toProto(UIColor* color) {
34655 # CGFloat red, green, blue, alpha;
34656 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34657 # return nil;
34658 # }
34659 # Color* result = [Color alloc] init];
34660 # [result setRed:red];
34661 # [result setGreen:green];
34662 # [result setBlue:blue];
34663 # if (alpha <= 0.9999) {
34664 # [result setAlpha:floatWrapperWithValue(alpha)];
34665 # }
34666 # [result autorelease];
34667 # return result;
34668 # }
34669 # // ...
34670 #
34671 # Example (JavaScript):
34672 #
34673 # // ...
34674 #
34675 # var protoToCssColor = function(rgb_color) {
34676 # var redFrac = rgb_color.red || 0.0;
34677 # var greenFrac = rgb_color.green || 0.0;
34678 # var blueFrac = rgb_color.blue || 0.0;
34679 # var red = Math.floor(redFrac * 255);
34680 # var green = Math.floor(greenFrac * 255);
34681 # var blue = Math.floor(blueFrac * 255);
34682 #
34683 # if (!('alpha' in rgb_color)) {
34684 # return rgbToCssColor_(red, green, blue);
34685 # }
34686 #
34687 # var alphaFrac = rgb_color.alpha.value || 0.0;
34688 # var rgbParams = [red, green, blue].join(',');
34689 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34690 # };
34691 #
34692 # var rgbToCssColor_ = function(red, green, blue) {
34693 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34694 # var hexString = rgbNumber.toString(16);
34695 # var missingZeros = 6 - hexString.length;
34696 # var resultBuilder = ['#'];
34697 # for (var i = 0; i < missingZeros; i++) {
34698 # resultBuilder.push('0');
34699 # }
34700 # resultBuilder.push(hexString);
34701 # return resultBuilder.join('');
34702 # };
34703 #
34704 # // ...
34705 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34706 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34707 # the final pixel color is defined by the equation:
34708 #
34709 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34710 #
34711 # This means that a value of 1.0 corresponds to a solid color, whereas
34712 # a value of 0.0 corresponds to a completely transparent color. This
34713 # uses a wrapper message rather than a simple float scalar so that it is
34714 # possible to distinguish between a default value and the value being unset.
34715 # If omitted, this color object is to be rendered as a solid color
34716 # (as if the alpha value had been explicitly given with a value of 1.0).
34717 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34718 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34719 },
34720 "width": 42, # The width of the border, in pixels.
34721 # Deprecated; the width is determined by the "style" field.
34722 "style": "A String", # The style of the border.
34723 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070034724 "bottom": { # A border along a cell. # The bottom border of the cell.
34725 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34726 # for simplicity of conversion to/from color representations in various
34727 # languages over compactness; for example, the fields of this representation
34728 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34729 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34730 # method in iOS; and, with just a little work, it can be easily formatted into
34731 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34732 #
34733 # Example (Java):
34734 #
34735 # import com.google.type.Color;
34736 #
34737 # // ...
34738 # public static java.awt.Color fromProto(Color protocolor) {
34739 # float alpha = protocolor.hasAlpha()
34740 # ? protocolor.getAlpha().getValue()
34741 # : 1.0;
34742 #
34743 # return new java.awt.Color(
34744 # protocolor.getRed(),
34745 # protocolor.getGreen(),
34746 # protocolor.getBlue(),
34747 # alpha);
34748 # }
34749 #
34750 # public static Color toProto(java.awt.Color color) {
34751 # float red = (float) color.getRed();
34752 # float green = (float) color.getGreen();
34753 # float blue = (float) color.getBlue();
34754 # float denominator = 255.0;
34755 # Color.Builder resultBuilder =
34756 # Color
34757 # .newBuilder()
34758 # .setRed(red / denominator)
34759 # .setGreen(green / denominator)
34760 # .setBlue(blue / denominator);
34761 # int alpha = color.getAlpha();
34762 # if (alpha != 255) {
34763 # result.setAlpha(
34764 # FloatValue
34765 # .newBuilder()
34766 # .setValue(((float) alpha) / denominator)
34767 # .build());
34768 # }
34769 # return resultBuilder.build();
34770 # }
34771 # // ...
34772 #
34773 # Example (iOS / Obj-C):
34774 #
34775 # // ...
34776 # static UIColor* fromProto(Color* protocolor) {
34777 # float red = [protocolor red];
34778 # float green = [protocolor green];
34779 # float blue = [protocolor blue];
34780 # FloatValue* alpha_wrapper = [protocolor alpha];
34781 # float alpha = 1.0;
34782 # if (alpha_wrapper != nil) {
34783 # alpha = [alpha_wrapper value];
34784 # }
34785 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34786 # }
34787 #
34788 # static Color* toProto(UIColor* color) {
34789 # CGFloat red, green, blue, alpha;
34790 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34791 # return nil;
34792 # }
34793 # Color* result = [Color alloc] init];
34794 # [result setRed:red];
34795 # [result setGreen:green];
34796 # [result setBlue:blue];
34797 # if (alpha <= 0.9999) {
34798 # [result setAlpha:floatWrapperWithValue(alpha)];
34799 # }
34800 # [result autorelease];
34801 # return result;
34802 # }
34803 # // ...
34804 #
34805 # Example (JavaScript):
34806 #
34807 # // ...
34808 #
34809 # var protoToCssColor = function(rgb_color) {
34810 # var redFrac = rgb_color.red || 0.0;
34811 # var greenFrac = rgb_color.green || 0.0;
34812 # var blueFrac = rgb_color.blue || 0.0;
34813 # var red = Math.floor(redFrac * 255);
34814 # var green = Math.floor(greenFrac * 255);
34815 # var blue = Math.floor(blueFrac * 255);
34816 #
34817 # if (!('alpha' in rgb_color)) {
34818 # return rgbToCssColor_(red, green, blue);
34819 # }
34820 #
34821 # var alphaFrac = rgb_color.alpha.value || 0.0;
34822 # var rgbParams = [red, green, blue].join(',');
34823 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34824 # };
34825 #
34826 # var rgbToCssColor_ = function(red, green, blue) {
34827 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34828 # var hexString = rgbNumber.toString(16);
34829 # var missingZeros = 6 - hexString.length;
34830 # var resultBuilder = ['#'];
34831 # for (var i = 0; i < missingZeros; i++) {
34832 # resultBuilder.push('0');
34833 # }
34834 # resultBuilder.push(hexString);
34835 # return resultBuilder.join('');
34836 # };
34837 #
34838 # // ...
34839 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34840 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34841 # the final pixel color is defined by the equation:
34842 #
34843 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34844 #
34845 # This means that a value of 1.0 corresponds to a solid color, whereas
34846 # a value of 0.0 corresponds to a completely transparent color. This
34847 # uses a wrapper message rather than a simple float scalar so that it is
34848 # possible to distinguish between a default value and the value being unset.
34849 # If omitted, this color object is to be rendered as a solid color
34850 # (as if the alpha value had been explicitly given with a value of 1.0).
34851 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34852 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34853 },
34854 "width": 42, # The width of the border, in pixels.
34855 # Deprecated; the width is determined by the "style" field.
34856 "style": "A String", # The style of the border.
34857 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034858 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070034859 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034860 },
34861 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
34862 #
34863 # When writing, the new data validation rule will overwrite any prior rule.
34864 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
34865 # If true, "List" conditions will show a dropdown.
34866 "strict": True or False, # True if invalid data should be rejected.
34867 "inputMessage": "A String", # A message to show the user when adding data to the cell.
34868 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
34869 # BooleanConditions are used by conditional formatting,
34870 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034871 "values": [ # The values of the condition. The number of supported values depends
34872 # on the condition type. Some support zero values,
34873 # others one or two values,
34874 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
34875 { # The value of the condition.
34876 "relativeDate": "A String", # A relative date (based on the current date).
34877 # Valid only if the type is
34878 # DATE_BEFORE,
34879 # DATE_AFTER,
34880 # DATE_ON_OR_BEFORE or
34881 # DATE_ON_OR_AFTER.
34882 #
34883 # Relative dates are not supported in data validation.
34884 # They are supported only in conditional formatting and
34885 # conditional filters.
34886 "userEnteredValue": "A String", # A value the condition is based on.
34887 # The value will be parsed as if the user typed into a cell.
34888 # Formulas are supported (and must begin with an `=`).
34889 },
34890 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034891 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034892 },
34893 },
34894 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
34895 # on user entered strings, not formulas, bools, or numbers.
34896 # Runs start at specific indexes in the text and continue until the next
34897 # run. Properties of a run will continue unless explicitly changed
34898 # in a subsequent run (and properties of the first run will continue
34899 # the properties of the cell unless explicitly changed).
34900 #
34901 # When writing, the new runs will overwrite any prior runs. When writing a
34902 # new user_entered_value, previous runs will be erased.
34903 { # A run of a text format. The format of this run continues until the start
34904 # index of the next run.
34905 # When updating, all fields must be set.
34906 "startIndex": 42, # The character index where this run starts.
34907 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
34908 # Absent values indicate that the field isn't specified.
34909 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34910 # for simplicity of conversion to/from color representations in various
34911 # languages over compactness; for example, the fields of this representation
34912 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34913 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34914 # method in iOS; and, with just a little work, it can be easily formatted into
34915 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34916 #
34917 # Example (Java):
34918 #
34919 # import com.google.type.Color;
34920 #
34921 # // ...
34922 # public static java.awt.Color fromProto(Color protocolor) {
34923 # float alpha = protocolor.hasAlpha()
34924 # ? protocolor.getAlpha().getValue()
34925 # : 1.0;
34926 #
34927 # return new java.awt.Color(
34928 # protocolor.getRed(),
34929 # protocolor.getGreen(),
34930 # protocolor.getBlue(),
34931 # alpha);
34932 # }
34933 #
34934 # public static Color toProto(java.awt.Color color) {
34935 # float red = (float) color.getRed();
34936 # float green = (float) color.getGreen();
34937 # float blue = (float) color.getBlue();
34938 # float denominator = 255.0;
34939 # Color.Builder resultBuilder =
34940 # Color
34941 # .newBuilder()
34942 # .setRed(red / denominator)
34943 # .setGreen(green / denominator)
34944 # .setBlue(blue / denominator);
34945 # int alpha = color.getAlpha();
34946 # if (alpha != 255) {
34947 # result.setAlpha(
34948 # FloatValue
34949 # .newBuilder()
34950 # .setValue(((float) alpha) / denominator)
34951 # .build());
34952 # }
34953 # return resultBuilder.build();
34954 # }
34955 # // ...
34956 #
34957 # Example (iOS / Obj-C):
34958 #
34959 # // ...
34960 # static UIColor* fromProto(Color* protocolor) {
34961 # float red = [protocolor red];
34962 # float green = [protocolor green];
34963 # float blue = [protocolor blue];
34964 # FloatValue* alpha_wrapper = [protocolor alpha];
34965 # float alpha = 1.0;
34966 # if (alpha_wrapper != nil) {
34967 # alpha = [alpha_wrapper value];
34968 # }
34969 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34970 # }
34971 #
34972 # static Color* toProto(UIColor* color) {
34973 # CGFloat red, green, blue, alpha;
34974 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34975 # return nil;
34976 # }
34977 # Color* result = [Color alloc] init];
34978 # [result setRed:red];
34979 # [result setGreen:green];
34980 # [result setBlue:blue];
34981 # if (alpha <= 0.9999) {
34982 # [result setAlpha:floatWrapperWithValue(alpha)];
34983 # }
34984 # [result autorelease];
34985 # return result;
34986 # }
34987 # // ...
34988 #
34989 # Example (JavaScript):
34990 #
34991 # // ...
34992 #
34993 # var protoToCssColor = function(rgb_color) {
34994 # var redFrac = rgb_color.red || 0.0;
34995 # var greenFrac = rgb_color.green || 0.0;
34996 # var blueFrac = rgb_color.blue || 0.0;
34997 # var red = Math.floor(redFrac * 255);
34998 # var green = Math.floor(greenFrac * 255);
34999 # var blue = Math.floor(blueFrac * 255);
35000 #
35001 # if (!('alpha' in rgb_color)) {
35002 # return rgbToCssColor_(red, green, blue);
35003 # }
35004 #
35005 # var alphaFrac = rgb_color.alpha.value || 0.0;
35006 # var rgbParams = [red, green, blue].join(',');
35007 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35008 # };
35009 #
35010 # var rgbToCssColor_ = function(red, green, blue) {
35011 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35012 # var hexString = rgbNumber.toString(16);
35013 # var missingZeros = 6 - hexString.length;
35014 # var resultBuilder = ['#'];
35015 # for (var i = 0; i < missingZeros; i++) {
35016 # resultBuilder.push('0');
35017 # }
35018 # resultBuilder.push(hexString);
35019 # return resultBuilder.join('');
35020 # };
35021 #
35022 # // ...
35023 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35024 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35025 # the final pixel color is defined by the equation:
35026 #
35027 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35028 #
35029 # This means that a value of 1.0 corresponds to a solid color, whereas
35030 # a value of 0.0 corresponds to a completely transparent color. This
35031 # uses a wrapper message rather than a simple float scalar so that it is
35032 # possible to distinguish between a default value and the value being unset.
35033 # If omitted, this color object is to be rendered as a solid color
35034 # (as if the alpha value had been explicitly given with a value of 1.0).
35035 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35036 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35037 },
35038 "bold": True or False, # True if the text is bold.
35039 "strikethrough": True or False, # True if the text has a strikethrough.
35040 "fontFamily": "A String", # The font family.
35041 "fontSize": 42, # The size of the font.
35042 "italic": True or False, # True if the text is italicized.
35043 "underline": True or False, # True if the text is underlined.
35044 },
35045 },
35046 ],
35047 },
35048 ],
35049 },
35050 ],
35051 },
35052 ],
35053 "properties": { # Properties of a sheet. # The properties of the sheet.
35054 "sheetType": "A String", # The type of sheet. Defaults to GRID.
35055 # This field cannot be changed once set.
35056 "index": 42, # The index of the sheet within the spreadsheet.
35057 # When adding or updating sheet properties, if this field
35058 # is excluded then the sheet will be added or moved to the end
35059 # of the sheet list. When updating sheet indices or inserting
35060 # sheets, movement is considered in "before the move" indexes.
35061 # For example, if there were 3 sheets (S1, S2, S3) in order to
35062 # move S1 ahead of S2 the index would have to be set to 2. A sheet
35063 # index update request will be ignored if the requested index is
35064 # identical to the sheets current index or if the requested new
35065 # index is equal to the current sheet index + 1.
35066 "title": "A String", # The name of the sheet.
35067 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
35068 # (If the sheet is an object sheet, containing a chart or image, then
35069 # this field will be absent.)
35070 # When writing it is an error to set any grid properties on non-grid sheets.
35071 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070035072 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080035073 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
35074 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070035075 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080035076 },
35077 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
35078 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
35079 # for simplicity of conversion to/from color representations in various
35080 # languages over compactness; for example, the fields of this representation
35081 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35082 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35083 # method in iOS; and, with just a little work, it can be easily formatted into
35084 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35085 #
35086 # Example (Java):
35087 #
35088 # import com.google.type.Color;
35089 #
35090 # // ...
35091 # public static java.awt.Color fromProto(Color protocolor) {
35092 # float alpha = protocolor.hasAlpha()
35093 # ? protocolor.getAlpha().getValue()
35094 # : 1.0;
35095 #
35096 # return new java.awt.Color(
35097 # protocolor.getRed(),
35098 # protocolor.getGreen(),
35099 # protocolor.getBlue(),
35100 # alpha);
35101 # }
35102 #
35103 # public static Color toProto(java.awt.Color color) {
35104 # float red = (float) color.getRed();
35105 # float green = (float) color.getGreen();
35106 # float blue = (float) color.getBlue();
35107 # float denominator = 255.0;
35108 # Color.Builder resultBuilder =
35109 # Color
35110 # .newBuilder()
35111 # .setRed(red / denominator)
35112 # .setGreen(green / denominator)
35113 # .setBlue(blue / denominator);
35114 # int alpha = color.getAlpha();
35115 # if (alpha != 255) {
35116 # result.setAlpha(
35117 # FloatValue
35118 # .newBuilder()
35119 # .setValue(((float) alpha) / denominator)
35120 # .build());
35121 # }
35122 # return resultBuilder.build();
35123 # }
35124 # // ...
35125 #
35126 # Example (iOS / Obj-C):
35127 #
35128 # // ...
35129 # static UIColor* fromProto(Color* protocolor) {
35130 # float red = [protocolor red];
35131 # float green = [protocolor green];
35132 # float blue = [protocolor blue];
35133 # FloatValue* alpha_wrapper = [protocolor alpha];
35134 # float alpha = 1.0;
35135 # if (alpha_wrapper != nil) {
35136 # alpha = [alpha_wrapper value];
35137 # }
35138 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35139 # }
35140 #
35141 # static Color* toProto(UIColor* color) {
35142 # CGFloat red, green, blue, alpha;
35143 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35144 # return nil;
35145 # }
35146 # Color* result = [Color alloc] init];
35147 # [result setRed:red];
35148 # [result setGreen:green];
35149 # [result setBlue:blue];
35150 # if (alpha <= 0.9999) {
35151 # [result setAlpha:floatWrapperWithValue(alpha)];
35152 # }
35153 # [result autorelease];
35154 # return result;
35155 # }
35156 # // ...
35157 #
35158 # Example (JavaScript):
35159 #
35160 # // ...
35161 #
35162 # var protoToCssColor = function(rgb_color) {
35163 # var redFrac = rgb_color.red || 0.0;
35164 # var greenFrac = rgb_color.green || 0.0;
35165 # var blueFrac = rgb_color.blue || 0.0;
35166 # var red = Math.floor(redFrac * 255);
35167 # var green = Math.floor(greenFrac * 255);
35168 # var blue = Math.floor(blueFrac * 255);
35169 #
35170 # if (!('alpha' in rgb_color)) {
35171 # return rgbToCssColor_(red, green, blue);
35172 # }
35173 #
35174 # var alphaFrac = rgb_color.alpha.value || 0.0;
35175 # var rgbParams = [red, green, blue].join(',');
35176 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35177 # };
35178 #
35179 # var rgbToCssColor_ = function(red, green, blue) {
35180 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35181 # var hexString = rgbNumber.toString(16);
35182 # var missingZeros = 6 - hexString.length;
35183 # var resultBuilder = ['#'];
35184 # for (var i = 0; i < missingZeros; i++) {
35185 # resultBuilder.push('0');
35186 # }
35187 # resultBuilder.push(hexString);
35188 # return resultBuilder.join('');
35189 # };
35190 #
35191 # // ...
35192 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35193 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35194 # the final pixel color is defined by the equation:
35195 #
35196 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35197 #
35198 # This means that a value of 1.0 corresponds to a solid color, whereas
35199 # a value of 0.0 corresponds to a completely transparent color. This
35200 # uses a wrapper message rather than a simple float scalar so that it is
35201 # possible to distinguish between a default value and the value being unset.
35202 # If omitted, this color object is to be rendered as a solid color
35203 # (as if the alpha value had been explicitly given with a value of 1.0).
35204 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35205 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35206 },
35207 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
35208 "sheetId": 42, # The ID of the sheet. Must be non-negative.
35209 # This field cannot be changed once set.
35210 },
35211 },
35212 ],
35213 "spreadsheetUrl": "A String", # The url of the spreadsheet.
35214 # This field is read-only.
35215}
35216
35217 x__xgafv: string, V1 error format.
35218 Allowed values
35219 1 - v1 error format
35220 2 - v2 error format
35221
35222Returns:
35223 An object of the form:
35224
35225 { # Resource that represents a spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035226 "spreadsheetId": "A String", # The ID of the spreadsheet.
35227 # This field is read-only.
35228 "namedRanges": [ # The named ranges defined in a spreadsheet.
35229 { # A named range.
35230 "namedRangeId": "A String", # The ID of the named range.
35231 "range": { # A range on a sheet. # The range this represents.
35232 # All indexes are zero-based.
35233 # Indexes are half open, e.g the start index is inclusive
35234 # and the end index is exclusive -- [start_index, end_index).
35235 # Missing indexes indicate the range is unbounded on that side.
35236 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035237 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035238 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035239 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035240 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035241 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035242 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035243 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035244 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035245 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035246 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035247 # `Sheet1!A:B == sheet_id: 0,
35248 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035249 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035250 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035251 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035252 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035253 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035254 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035255 #
35256 # The start index must always be less than or equal to the end index.
35257 # If the start index equals the end index, then the range is empty.
35258 # Empty ranges are typically not meaningful and are usually rendered in the
35259 # UI as `#REF!`.
35260 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070035261 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035262 "sheetId": 42, # The sheet this range is on.
35263 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070035264 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035265 },
35266 "name": "A String", # The name of the named range.
35267 },
35268 ],
35269 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035270 "title": "A String", # The title of the spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035271 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035272 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035273 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035274 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035275 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035276 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035277 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035278 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035279 # Note: when updating this field, not all locales/languages are supported.
Thomas Coffee2f245372017-03-27 10:39:26 -070035280 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035281 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035282 # CellData.effectiveFormat will not be set if the
35283 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035284 # This field is read-only.
35285 "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 -070035286 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
35287 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035288 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070035289 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035290 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035291 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035292 },
35293 "textDirection": "A String", # The direction of the text in the cell.
35294 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
35295 # When updating padding, every field must be specified.
35296 "top": 42, # The top padding of the cell.
35297 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035298 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035299 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035300 },
Thomas Coffee2f245372017-03-27 10:39:26 -070035301 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035302 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
35303 # for simplicity of conversion to/from color representations in various
35304 # languages over compactness; for example, the fields of this representation
35305 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35306 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35307 # method in iOS; and, with just a little work, it can be easily formatted into
35308 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35309 #
35310 # Example (Java):
35311 #
35312 # import com.google.type.Color;
35313 #
35314 # // ...
35315 # public static java.awt.Color fromProto(Color protocolor) {
35316 # float alpha = protocolor.hasAlpha()
35317 # ? protocolor.getAlpha().getValue()
35318 # : 1.0;
35319 #
35320 # return new java.awt.Color(
35321 # protocolor.getRed(),
35322 # protocolor.getGreen(),
35323 # protocolor.getBlue(),
35324 # alpha);
35325 # }
35326 #
35327 # public static Color toProto(java.awt.Color color) {
35328 # float red = (float) color.getRed();
35329 # float green = (float) color.getGreen();
35330 # float blue = (float) color.getBlue();
35331 # float denominator = 255.0;
35332 # Color.Builder resultBuilder =
35333 # Color
35334 # .newBuilder()
35335 # .setRed(red / denominator)
35336 # .setGreen(green / denominator)
35337 # .setBlue(blue / denominator);
35338 # int alpha = color.getAlpha();
35339 # if (alpha != 255) {
35340 # result.setAlpha(
35341 # FloatValue
35342 # .newBuilder()
35343 # .setValue(((float) alpha) / denominator)
35344 # .build());
35345 # }
35346 # return resultBuilder.build();
35347 # }
35348 # // ...
35349 #
35350 # Example (iOS / Obj-C):
35351 #
35352 # // ...
35353 # static UIColor* fromProto(Color* protocolor) {
35354 # float red = [protocolor red];
35355 # float green = [protocolor green];
35356 # float blue = [protocolor blue];
35357 # FloatValue* alpha_wrapper = [protocolor alpha];
35358 # float alpha = 1.0;
35359 # if (alpha_wrapper != nil) {
35360 # alpha = [alpha_wrapper value];
35361 # }
35362 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35363 # }
35364 #
35365 # static Color* toProto(UIColor* color) {
35366 # CGFloat red, green, blue, alpha;
35367 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35368 # return nil;
35369 # }
35370 # Color* result = [Color alloc] init];
35371 # [result setRed:red];
35372 # [result setGreen:green];
35373 # [result setBlue:blue];
35374 # if (alpha <= 0.9999) {
35375 # [result setAlpha:floatWrapperWithValue(alpha)];
35376 # }
35377 # [result autorelease];
35378 # return result;
35379 # }
35380 # // ...
35381 #
35382 # Example (JavaScript):
35383 #
35384 # // ...
35385 #
35386 # var protoToCssColor = function(rgb_color) {
35387 # var redFrac = rgb_color.red || 0.0;
35388 # var greenFrac = rgb_color.green || 0.0;
35389 # var blueFrac = rgb_color.blue || 0.0;
35390 # var red = Math.floor(redFrac * 255);
35391 # var green = Math.floor(greenFrac * 255);
35392 # var blue = Math.floor(blueFrac * 255);
35393 #
35394 # if (!('alpha' in rgb_color)) {
35395 # return rgbToCssColor_(red, green, blue);
35396 # }
35397 #
35398 # var alphaFrac = rgb_color.alpha.value || 0.0;
35399 # var rgbParams = [red, green, blue].join(',');
35400 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35401 # };
35402 #
35403 # var rgbToCssColor_ = function(red, green, blue) {
35404 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35405 # var hexString = rgbNumber.toString(16);
35406 # var missingZeros = 6 - hexString.length;
35407 # var resultBuilder = ['#'];
35408 # for (var i = 0; i < missingZeros; i++) {
35409 # resultBuilder.push('0');
35410 # }
35411 # resultBuilder.push(hexString);
35412 # return resultBuilder.join('');
35413 # };
35414 #
35415 # // ...
35416 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35417 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35418 # the final pixel color is defined by the equation:
35419 #
35420 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35421 #
35422 # This means that a value of 1.0 corresponds to a solid color, whereas
35423 # a value of 0.0 corresponds to a completely transparent color. This
35424 # uses a wrapper message rather than a simple float scalar so that it is
35425 # possible to distinguish between a default value and the value being unset.
35426 # If omitted, this color object is to be rendered as a solid color
35427 # (as if the alpha value had been explicitly given with a value of 1.0).
35428 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35429 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35430 },
Thomas Coffee2f245372017-03-27 10:39:26 -070035431 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035432 "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).
35433 # Absent values indicate that the field isn't specified.
35434 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
35435 # for simplicity of conversion to/from color representations in various
35436 # languages over compactness; for example, the fields of this representation
35437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35439 # method in iOS; and, with just a little work, it can be easily formatted into
35440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35441 #
35442 # Example (Java):
35443 #
35444 # import com.google.type.Color;
35445 #
35446 # // ...
35447 # public static java.awt.Color fromProto(Color protocolor) {
35448 # float alpha = protocolor.hasAlpha()
35449 # ? protocolor.getAlpha().getValue()
35450 # : 1.0;
35451 #
35452 # return new java.awt.Color(
35453 # protocolor.getRed(),
35454 # protocolor.getGreen(),
35455 # protocolor.getBlue(),
35456 # alpha);
35457 # }
35458 #
35459 # public static Color toProto(java.awt.Color color) {
35460 # float red = (float) color.getRed();
35461 # float green = (float) color.getGreen();
35462 # float blue = (float) color.getBlue();
35463 # float denominator = 255.0;
35464 # Color.Builder resultBuilder =
35465 # Color
35466 # .newBuilder()
35467 # .setRed(red / denominator)
35468 # .setGreen(green / denominator)
35469 # .setBlue(blue / denominator);
35470 # int alpha = color.getAlpha();
35471 # if (alpha != 255) {
35472 # result.setAlpha(
35473 # FloatValue
35474 # .newBuilder()
35475 # .setValue(((float) alpha) / denominator)
35476 # .build());
35477 # }
35478 # return resultBuilder.build();
35479 # }
35480 # // ...
35481 #
35482 # Example (iOS / Obj-C):
35483 #
35484 # // ...
35485 # static UIColor* fromProto(Color* protocolor) {
35486 # float red = [protocolor red];
35487 # float green = [protocolor green];
35488 # float blue = [protocolor blue];
35489 # FloatValue* alpha_wrapper = [protocolor alpha];
35490 # float alpha = 1.0;
35491 # if (alpha_wrapper != nil) {
35492 # alpha = [alpha_wrapper value];
35493 # }
35494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35495 # }
35496 #
35497 # static Color* toProto(UIColor* color) {
35498 # CGFloat red, green, blue, alpha;
35499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35500 # return nil;
35501 # }
35502 # Color* result = [Color alloc] init];
35503 # [result setRed:red];
35504 # [result setGreen:green];
35505 # [result setBlue:blue];
35506 # if (alpha <= 0.9999) {
35507 # [result setAlpha:floatWrapperWithValue(alpha)];
35508 # }
35509 # [result autorelease];
35510 # return result;
35511 # }
35512 # // ...
35513 #
35514 # Example (JavaScript):
35515 #
35516 # // ...
35517 #
35518 # var protoToCssColor = function(rgb_color) {
35519 # var redFrac = rgb_color.red || 0.0;
35520 # var greenFrac = rgb_color.green || 0.0;
35521 # var blueFrac = rgb_color.blue || 0.0;
35522 # var red = Math.floor(redFrac * 255);
35523 # var green = Math.floor(greenFrac * 255);
35524 # var blue = Math.floor(blueFrac * 255);
35525 #
35526 # if (!('alpha' in rgb_color)) {
35527 # return rgbToCssColor_(red, green, blue);
35528 # }
35529 #
35530 # var alphaFrac = rgb_color.alpha.value || 0.0;
35531 # var rgbParams = [red, green, blue].join(',');
35532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35533 # };
35534 #
35535 # var rgbToCssColor_ = function(red, green, blue) {
35536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35537 # var hexString = rgbNumber.toString(16);
35538 # var missingZeros = 6 - hexString.length;
35539 # var resultBuilder = ['#'];
35540 # for (var i = 0; i < missingZeros; i++) {
35541 # resultBuilder.push('0');
35542 # }
35543 # resultBuilder.push(hexString);
35544 # return resultBuilder.join('');
35545 # };
35546 #
35547 # // ...
35548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35550 # the final pixel color is defined by the equation:
35551 #
35552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35553 #
35554 # This means that a value of 1.0 corresponds to a solid color, whereas
35555 # a value of 0.0 corresponds to a completely transparent color. This
35556 # uses a wrapper message rather than a simple float scalar so that it is
35557 # possible to distinguish between a default value and the value being unset.
35558 # If omitted, this color object is to be rendered as a solid color
35559 # (as if the alpha value had been explicitly given with a value of 1.0).
35560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35562 },
35563 "bold": True or False, # True if the text is bold.
35564 "strikethrough": True or False, # True if the text has a strikethrough.
35565 "fontFamily": "A String", # The font family.
35566 "fontSize": 42, # The size of the font.
35567 "italic": True or False, # True if the text is italicized.
35568 "underline": True or False, # True if the text is underlined.
35569 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070035570 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
35571 "angle": 42, # The angle between the standard orientation and the desired orientation.
35572 # Measured in degrees. Valid values are between -90 and 90. Positive
35573 # angles are angled upwards, negative are angled downwards.
35574 #
35575 # Note: For LTR text direction positive angles are in the counterclockwise
35576 # direction, whereas for RTL they are in the clockwise direction
35577 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
35578 # characters is unchanged.
35579 # For example:
35580 #
35581 # | V |
35582 # | e |
35583 # | r |
35584 # | t |
35585 # | i |
35586 # | c |
35587 # | a |
35588 # | l |
35589 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035590 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
35591 "borders": { # The borders of the cell. # The borders of the cell.
35592 "top": { # A border along a cell. # The top border of the cell.
35593 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35594 # for simplicity of conversion to/from color representations in various
35595 # languages over compactness; for example, the fields of this representation
35596 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35597 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35598 # method in iOS; and, with just a little work, it can be easily formatted into
35599 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35600 #
35601 # Example (Java):
35602 #
35603 # import com.google.type.Color;
35604 #
35605 # // ...
35606 # public static java.awt.Color fromProto(Color protocolor) {
35607 # float alpha = protocolor.hasAlpha()
35608 # ? protocolor.getAlpha().getValue()
35609 # : 1.0;
35610 #
35611 # return new java.awt.Color(
35612 # protocolor.getRed(),
35613 # protocolor.getGreen(),
35614 # protocolor.getBlue(),
35615 # alpha);
35616 # }
35617 #
35618 # public static Color toProto(java.awt.Color color) {
35619 # float red = (float) color.getRed();
35620 # float green = (float) color.getGreen();
35621 # float blue = (float) color.getBlue();
35622 # float denominator = 255.0;
35623 # Color.Builder resultBuilder =
35624 # Color
35625 # .newBuilder()
35626 # .setRed(red / denominator)
35627 # .setGreen(green / denominator)
35628 # .setBlue(blue / denominator);
35629 # int alpha = color.getAlpha();
35630 # if (alpha != 255) {
35631 # result.setAlpha(
35632 # FloatValue
35633 # .newBuilder()
35634 # .setValue(((float) alpha) / denominator)
35635 # .build());
35636 # }
35637 # return resultBuilder.build();
35638 # }
35639 # // ...
35640 #
35641 # Example (iOS / Obj-C):
35642 #
35643 # // ...
35644 # static UIColor* fromProto(Color* protocolor) {
35645 # float red = [protocolor red];
35646 # float green = [protocolor green];
35647 # float blue = [protocolor blue];
35648 # FloatValue* alpha_wrapper = [protocolor alpha];
35649 # float alpha = 1.0;
35650 # if (alpha_wrapper != nil) {
35651 # alpha = [alpha_wrapper value];
35652 # }
35653 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35654 # }
35655 #
35656 # static Color* toProto(UIColor* color) {
35657 # CGFloat red, green, blue, alpha;
35658 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35659 # return nil;
35660 # }
35661 # Color* result = [Color alloc] init];
35662 # [result setRed:red];
35663 # [result setGreen:green];
35664 # [result setBlue:blue];
35665 # if (alpha <= 0.9999) {
35666 # [result setAlpha:floatWrapperWithValue(alpha)];
35667 # }
35668 # [result autorelease];
35669 # return result;
35670 # }
35671 # // ...
35672 #
35673 # Example (JavaScript):
35674 #
35675 # // ...
35676 #
35677 # var protoToCssColor = function(rgb_color) {
35678 # var redFrac = rgb_color.red || 0.0;
35679 # var greenFrac = rgb_color.green || 0.0;
35680 # var blueFrac = rgb_color.blue || 0.0;
35681 # var red = Math.floor(redFrac * 255);
35682 # var green = Math.floor(greenFrac * 255);
35683 # var blue = Math.floor(blueFrac * 255);
35684 #
35685 # if (!('alpha' in rgb_color)) {
35686 # return rgbToCssColor_(red, green, blue);
35687 # }
35688 #
35689 # var alphaFrac = rgb_color.alpha.value || 0.0;
35690 # var rgbParams = [red, green, blue].join(',');
35691 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35692 # };
35693 #
35694 # var rgbToCssColor_ = function(red, green, blue) {
35695 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35696 # var hexString = rgbNumber.toString(16);
35697 # var missingZeros = 6 - hexString.length;
35698 # var resultBuilder = ['#'];
35699 # for (var i = 0; i < missingZeros; i++) {
35700 # resultBuilder.push('0');
35701 # }
35702 # resultBuilder.push(hexString);
35703 # return resultBuilder.join('');
35704 # };
35705 #
35706 # // ...
35707 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35708 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35709 # the final pixel color is defined by the equation:
35710 #
35711 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35712 #
35713 # This means that a value of 1.0 corresponds to a solid color, whereas
35714 # a value of 0.0 corresponds to a completely transparent color. This
35715 # uses a wrapper message rather than a simple float scalar so that it is
35716 # possible to distinguish between a default value and the value being unset.
35717 # If omitted, this color object is to be rendered as a solid color
35718 # (as if the alpha value had been explicitly given with a value of 1.0).
35719 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35720 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35721 },
35722 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035723 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035724 "style": "A String", # The style of the border.
35725 },
35726 "right": { # A border along a cell. # The right border of the cell.
35727 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35728 # for simplicity of conversion to/from color representations in various
35729 # languages over compactness; for example, the fields of this representation
35730 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35731 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35732 # method in iOS; and, with just a little work, it can be easily formatted into
35733 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35734 #
35735 # Example (Java):
35736 #
35737 # import com.google.type.Color;
35738 #
35739 # // ...
35740 # public static java.awt.Color fromProto(Color protocolor) {
35741 # float alpha = protocolor.hasAlpha()
35742 # ? protocolor.getAlpha().getValue()
35743 # : 1.0;
35744 #
35745 # return new java.awt.Color(
35746 # protocolor.getRed(),
35747 # protocolor.getGreen(),
35748 # protocolor.getBlue(),
35749 # alpha);
35750 # }
35751 #
35752 # public static Color toProto(java.awt.Color color) {
35753 # float red = (float) color.getRed();
35754 # float green = (float) color.getGreen();
35755 # float blue = (float) color.getBlue();
35756 # float denominator = 255.0;
35757 # Color.Builder resultBuilder =
35758 # Color
35759 # .newBuilder()
35760 # .setRed(red / denominator)
35761 # .setGreen(green / denominator)
35762 # .setBlue(blue / denominator);
35763 # int alpha = color.getAlpha();
35764 # if (alpha != 255) {
35765 # result.setAlpha(
35766 # FloatValue
35767 # .newBuilder()
35768 # .setValue(((float) alpha) / denominator)
35769 # .build());
35770 # }
35771 # return resultBuilder.build();
35772 # }
35773 # // ...
35774 #
35775 # Example (iOS / Obj-C):
35776 #
35777 # // ...
35778 # static UIColor* fromProto(Color* protocolor) {
35779 # float red = [protocolor red];
35780 # float green = [protocolor green];
35781 # float blue = [protocolor blue];
35782 # FloatValue* alpha_wrapper = [protocolor alpha];
35783 # float alpha = 1.0;
35784 # if (alpha_wrapper != nil) {
35785 # alpha = [alpha_wrapper value];
35786 # }
35787 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35788 # }
35789 #
35790 # static Color* toProto(UIColor* color) {
35791 # CGFloat red, green, blue, alpha;
35792 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35793 # return nil;
35794 # }
35795 # Color* result = [Color alloc] init];
35796 # [result setRed:red];
35797 # [result setGreen:green];
35798 # [result setBlue:blue];
35799 # if (alpha <= 0.9999) {
35800 # [result setAlpha:floatWrapperWithValue(alpha)];
35801 # }
35802 # [result autorelease];
35803 # return result;
35804 # }
35805 # // ...
35806 #
35807 # Example (JavaScript):
35808 #
35809 # // ...
35810 #
35811 # var protoToCssColor = function(rgb_color) {
35812 # var redFrac = rgb_color.red || 0.0;
35813 # var greenFrac = rgb_color.green || 0.0;
35814 # var blueFrac = rgb_color.blue || 0.0;
35815 # var red = Math.floor(redFrac * 255);
35816 # var green = Math.floor(greenFrac * 255);
35817 # var blue = Math.floor(blueFrac * 255);
35818 #
35819 # if (!('alpha' in rgb_color)) {
35820 # return rgbToCssColor_(red, green, blue);
35821 # }
35822 #
35823 # var alphaFrac = rgb_color.alpha.value || 0.0;
35824 # var rgbParams = [red, green, blue].join(',');
35825 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35826 # };
35827 #
35828 # var rgbToCssColor_ = function(red, green, blue) {
35829 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35830 # var hexString = rgbNumber.toString(16);
35831 # var missingZeros = 6 - hexString.length;
35832 # var resultBuilder = ['#'];
35833 # for (var i = 0; i < missingZeros; i++) {
35834 # resultBuilder.push('0');
35835 # }
35836 # resultBuilder.push(hexString);
35837 # return resultBuilder.join('');
35838 # };
35839 #
35840 # // ...
35841 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35842 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35843 # the final pixel color is defined by the equation:
35844 #
35845 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35846 #
35847 # This means that a value of 1.0 corresponds to a solid color, whereas
35848 # a value of 0.0 corresponds to a completely transparent color. This
35849 # uses a wrapper message rather than a simple float scalar so that it is
35850 # possible to distinguish between a default value and the value being unset.
35851 # If omitted, this color object is to be rendered as a solid color
35852 # (as if the alpha value had been explicitly given with a value of 1.0).
35853 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35854 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35855 },
35856 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035857 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035858 "style": "A String", # The style of the border.
35859 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035860 "left": { # A border along a cell. # The left border of the cell.
35861 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35862 # for simplicity of conversion to/from color representations in various
35863 # languages over compactness; for example, the fields of this representation
35864 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35865 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35866 # method in iOS; and, with just a little work, it can be easily formatted into
35867 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35868 #
35869 # Example (Java):
35870 #
35871 # import com.google.type.Color;
35872 #
35873 # // ...
35874 # public static java.awt.Color fromProto(Color protocolor) {
35875 # float alpha = protocolor.hasAlpha()
35876 # ? protocolor.getAlpha().getValue()
35877 # : 1.0;
35878 #
35879 # return new java.awt.Color(
35880 # protocolor.getRed(),
35881 # protocolor.getGreen(),
35882 # protocolor.getBlue(),
35883 # alpha);
35884 # }
35885 #
35886 # public static Color toProto(java.awt.Color color) {
35887 # float red = (float) color.getRed();
35888 # float green = (float) color.getGreen();
35889 # float blue = (float) color.getBlue();
35890 # float denominator = 255.0;
35891 # Color.Builder resultBuilder =
35892 # Color
35893 # .newBuilder()
35894 # .setRed(red / denominator)
35895 # .setGreen(green / denominator)
35896 # .setBlue(blue / denominator);
35897 # int alpha = color.getAlpha();
35898 # if (alpha != 255) {
35899 # result.setAlpha(
35900 # FloatValue
35901 # .newBuilder()
35902 # .setValue(((float) alpha) / denominator)
35903 # .build());
35904 # }
35905 # return resultBuilder.build();
35906 # }
35907 # // ...
35908 #
35909 # Example (iOS / Obj-C):
35910 #
35911 # // ...
35912 # static UIColor* fromProto(Color* protocolor) {
35913 # float red = [protocolor red];
35914 # float green = [protocolor green];
35915 # float blue = [protocolor blue];
35916 # FloatValue* alpha_wrapper = [protocolor alpha];
35917 # float alpha = 1.0;
35918 # if (alpha_wrapper != nil) {
35919 # alpha = [alpha_wrapper value];
35920 # }
35921 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35922 # }
35923 #
35924 # static Color* toProto(UIColor* color) {
35925 # CGFloat red, green, blue, alpha;
35926 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35927 # return nil;
35928 # }
35929 # Color* result = [Color alloc] init];
35930 # [result setRed:red];
35931 # [result setGreen:green];
35932 # [result setBlue:blue];
35933 # if (alpha <= 0.9999) {
35934 # [result setAlpha:floatWrapperWithValue(alpha)];
35935 # }
35936 # [result autorelease];
35937 # return result;
35938 # }
35939 # // ...
35940 #
35941 # Example (JavaScript):
35942 #
35943 # // ...
35944 #
35945 # var protoToCssColor = function(rgb_color) {
35946 # var redFrac = rgb_color.red || 0.0;
35947 # var greenFrac = rgb_color.green || 0.0;
35948 # var blueFrac = rgb_color.blue || 0.0;
35949 # var red = Math.floor(redFrac * 255);
35950 # var green = Math.floor(greenFrac * 255);
35951 # var blue = Math.floor(blueFrac * 255);
35952 #
35953 # if (!('alpha' in rgb_color)) {
35954 # return rgbToCssColor_(red, green, blue);
35955 # }
35956 #
35957 # var alphaFrac = rgb_color.alpha.value || 0.0;
35958 # var rgbParams = [red, green, blue].join(',');
35959 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35960 # };
35961 #
35962 # var rgbToCssColor_ = function(red, green, blue) {
35963 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35964 # var hexString = rgbNumber.toString(16);
35965 # var missingZeros = 6 - hexString.length;
35966 # var resultBuilder = ['#'];
35967 # for (var i = 0; i < missingZeros; i++) {
35968 # resultBuilder.push('0');
35969 # }
35970 # resultBuilder.push(hexString);
35971 # return resultBuilder.join('');
35972 # };
35973 #
35974 # // ...
35975 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35976 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35977 # the final pixel color is defined by the equation:
35978 #
35979 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35980 #
35981 # This means that a value of 1.0 corresponds to a solid color, whereas
35982 # a value of 0.0 corresponds to a completely transparent color. This
35983 # uses a wrapper message rather than a simple float scalar so that it is
35984 # possible to distinguish between a default value and the value being unset.
35985 # If omitted, this color object is to be rendered as a solid color
35986 # (as if the alpha value had been explicitly given with a value of 1.0).
35987 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35988 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35989 },
35990 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035991 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035992 "style": "A String", # The style of the border.
35993 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070035994 "bottom": { # A border along a cell. # The bottom border of the cell.
35995 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35996 # for simplicity of conversion to/from color representations in various
35997 # languages over compactness; for example, the fields of this representation
35998 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35999 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36000 # method in iOS; and, with just a little work, it can be easily formatted into
36001 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36002 #
36003 # Example (Java):
36004 #
36005 # import com.google.type.Color;
36006 #
36007 # // ...
36008 # public static java.awt.Color fromProto(Color protocolor) {
36009 # float alpha = protocolor.hasAlpha()
36010 # ? protocolor.getAlpha().getValue()
36011 # : 1.0;
36012 #
36013 # return new java.awt.Color(
36014 # protocolor.getRed(),
36015 # protocolor.getGreen(),
36016 # protocolor.getBlue(),
36017 # alpha);
36018 # }
36019 #
36020 # public static Color toProto(java.awt.Color color) {
36021 # float red = (float) color.getRed();
36022 # float green = (float) color.getGreen();
36023 # float blue = (float) color.getBlue();
36024 # float denominator = 255.0;
36025 # Color.Builder resultBuilder =
36026 # Color
36027 # .newBuilder()
36028 # .setRed(red / denominator)
36029 # .setGreen(green / denominator)
36030 # .setBlue(blue / denominator);
36031 # int alpha = color.getAlpha();
36032 # if (alpha != 255) {
36033 # result.setAlpha(
36034 # FloatValue
36035 # .newBuilder()
36036 # .setValue(((float) alpha) / denominator)
36037 # .build());
36038 # }
36039 # return resultBuilder.build();
36040 # }
36041 # // ...
36042 #
36043 # Example (iOS / Obj-C):
36044 #
36045 # // ...
36046 # static UIColor* fromProto(Color* protocolor) {
36047 # float red = [protocolor red];
36048 # float green = [protocolor green];
36049 # float blue = [protocolor blue];
36050 # FloatValue* alpha_wrapper = [protocolor alpha];
36051 # float alpha = 1.0;
36052 # if (alpha_wrapper != nil) {
36053 # alpha = [alpha_wrapper value];
36054 # }
36055 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36056 # }
36057 #
36058 # static Color* toProto(UIColor* color) {
36059 # CGFloat red, green, blue, alpha;
36060 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36061 # return nil;
36062 # }
36063 # Color* result = [Color alloc] init];
36064 # [result setRed:red];
36065 # [result setGreen:green];
36066 # [result setBlue:blue];
36067 # if (alpha <= 0.9999) {
36068 # [result setAlpha:floatWrapperWithValue(alpha)];
36069 # }
36070 # [result autorelease];
36071 # return result;
36072 # }
36073 # // ...
36074 #
36075 # Example (JavaScript):
36076 #
36077 # // ...
36078 #
36079 # var protoToCssColor = function(rgb_color) {
36080 # var redFrac = rgb_color.red || 0.0;
36081 # var greenFrac = rgb_color.green || 0.0;
36082 # var blueFrac = rgb_color.blue || 0.0;
36083 # var red = Math.floor(redFrac * 255);
36084 # var green = Math.floor(greenFrac * 255);
36085 # var blue = Math.floor(blueFrac * 255);
36086 #
36087 # if (!('alpha' in rgb_color)) {
36088 # return rgbToCssColor_(red, green, blue);
36089 # }
36090 #
36091 # var alphaFrac = rgb_color.alpha.value || 0.0;
36092 # var rgbParams = [red, green, blue].join(',');
36093 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36094 # };
36095 #
36096 # var rgbToCssColor_ = function(red, green, blue) {
36097 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36098 # var hexString = rgbNumber.toString(16);
36099 # var missingZeros = 6 - hexString.length;
36100 # var resultBuilder = ['#'];
36101 # for (var i = 0; i < missingZeros; i++) {
36102 # resultBuilder.push('0');
36103 # }
36104 # resultBuilder.push(hexString);
36105 # return resultBuilder.join('');
36106 # };
36107 #
36108 # // ...
36109 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36110 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36111 # the final pixel color is defined by the equation:
36112 #
36113 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36114 #
36115 # This means that a value of 1.0 corresponds to a solid color, whereas
36116 # a value of 0.0 corresponds to a completely transparent color. This
36117 # uses a wrapper message rather than a simple float scalar so that it is
36118 # possible to distinguish between a default value and the value being unset.
36119 # If omitted, this color object is to be rendered as a solid color
36120 # (as if the alpha value had been explicitly given with a value of 1.0).
36121 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36122 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36123 },
36124 "width": 42, # The width of the border, in pixels.
36125 # Deprecated; the width is determined by the "style" field.
36126 "style": "A String", # The style of the border.
36127 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036128 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070036129 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036130 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036131 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
36132 # calculation. Absence of this field means that circular references will
36133 # result in calculation errors.
36134 # calculation.
36135 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
36136 # less than this threshold value, the calculation rounds stop.
36137 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
36138 # rounds to perform.
36139 },
36140 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
36141 # `America/New_York`. If the time zone isn't recognized, this may
36142 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036143 },
36144 "sheets": [ # The sheets that are part of a spreadsheet.
36145 { # A sheet in a spreadsheet.
36146 "conditionalFormats": [ # The conditional format rules in this sheet.
36147 { # A rule describing a conditional format.
36148 "ranges": [ # The ranges that will be formatted if the condition is true.
36149 # All the ranges must be on the same grid.
36150 { # A range on a sheet.
36151 # All indexes are zero-based.
36152 # Indexes are half open, e.g the start index is inclusive
36153 # and the end index is exclusive -- [start_index, end_index).
36154 # Missing indexes indicate the range is unbounded on that side.
36155 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036156 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036158 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036159 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036160 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036161 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036162 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036163 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036164 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036165 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036166 # `Sheet1!A:B == sheet_id: 0,
36167 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036168 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036169 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036170 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036171 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036172 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036173 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036174 #
36175 # The start index must always be less than or equal to the end index.
36176 # If the start index equals the end index, then the range is empty.
36177 # Empty ranges are typically not meaningful and are usually rendered in the
36178 # UI as `#REF!`.
36179 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070036180 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036181 "sheetId": 42, # The sheet this range is on.
36182 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070036183 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036184 },
36185 ],
36186 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
36187 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
36188 # the format will be applied.
36189 # BooleanConditions are used by conditional formatting,
36190 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036191 "values": [ # The values of the condition. The number of supported values depends
36192 # on the condition type. Some support zero values,
36193 # others one or two values,
36194 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
36195 { # The value of the condition.
36196 "relativeDate": "A String", # A relative date (based on the current date).
36197 # Valid only if the type is
36198 # DATE_BEFORE,
36199 # DATE_AFTER,
36200 # DATE_ON_OR_BEFORE or
36201 # DATE_ON_OR_AFTER.
36202 #
36203 # Relative dates are not supported in data validation.
36204 # They are supported only in conditional formatting and
36205 # conditional filters.
36206 "userEnteredValue": "A String", # A value the condition is based on.
36207 # The value will be parsed as if the user typed into a cell.
36208 # Formulas are supported (and must begin with an `=`).
36209 },
36210 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036211 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036212 },
36213 "format": { # The format of a cell. # The format to apply.
36214 # Conditional formatting can only apply a subset of formatting:
36215 # bold, italic,
36216 # strikethrough,
36217 # foreground color &
36218 # background color.
36219 "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 -070036220 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
36221 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036222 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070036223 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036224 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036225 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036226 },
36227 "textDirection": "A String", # The direction of the text in the cell.
36228 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
36229 # When updating padding, every field must be specified.
36230 "top": 42, # The top padding of the cell.
36231 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036232 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036233 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036234 },
Thomas Coffee2f245372017-03-27 10:39:26 -070036235 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036236 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
36237 # for simplicity of conversion to/from color representations in various
36238 # languages over compactness; for example, the fields of this representation
36239 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36240 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36241 # method in iOS; and, with just a little work, it can be easily formatted into
36242 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36243 #
36244 # Example (Java):
36245 #
36246 # import com.google.type.Color;
36247 #
36248 # // ...
36249 # public static java.awt.Color fromProto(Color protocolor) {
36250 # float alpha = protocolor.hasAlpha()
36251 # ? protocolor.getAlpha().getValue()
36252 # : 1.0;
36253 #
36254 # return new java.awt.Color(
36255 # protocolor.getRed(),
36256 # protocolor.getGreen(),
36257 # protocolor.getBlue(),
36258 # alpha);
36259 # }
36260 #
36261 # public static Color toProto(java.awt.Color color) {
36262 # float red = (float) color.getRed();
36263 # float green = (float) color.getGreen();
36264 # float blue = (float) color.getBlue();
36265 # float denominator = 255.0;
36266 # Color.Builder resultBuilder =
36267 # Color
36268 # .newBuilder()
36269 # .setRed(red / denominator)
36270 # .setGreen(green / denominator)
36271 # .setBlue(blue / denominator);
36272 # int alpha = color.getAlpha();
36273 # if (alpha != 255) {
36274 # result.setAlpha(
36275 # FloatValue
36276 # .newBuilder()
36277 # .setValue(((float) alpha) / denominator)
36278 # .build());
36279 # }
36280 # return resultBuilder.build();
36281 # }
36282 # // ...
36283 #
36284 # Example (iOS / Obj-C):
36285 #
36286 # // ...
36287 # static UIColor* fromProto(Color* protocolor) {
36288 # float red = [protocolor red];
36289 # float green = [protocolor green];
36290 # float blue = [protocolor blue];
36291 # FloatValue* alpha_wrapper = [protocolor alpha];
36292 # float alpha = 1.0;
36293 # if (alpha_wrapper != nil) {
36294 # alpha = [alpha_wrapper value];
36295 # }
36296 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36297 # }
36298 #
36299 # static Color* toProto(UIColor* color) {
36300 # CGFloat red, green, blue, alpha;
36301 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36302 # return nil;
36303 # }
36304 # Color* result = [Color alloc] init];
36305 # [result setRed:red];
36306 # [result setGreen:green];
36307 # [result setBlue:blue];
36308 # if (alpha <= 0.9999) {
36309 # [result setAlpha:floatWrapperWithValue(alpha)];
36310 # }
36311 # [result autorelease];
36312 # return result;
36313 # }
36314 # // ...
36315 #
36316 # Example (JavaScript):
36317 #
36318 # // ...
36319 #
36320 # var protoToCssColor = function(rgb_color) {
36321 # var redFrac = rgb_color.red || 0.0;
36322 # var greenFrac = rgb_color.green || 0.0;
36323 # var blueFrac = rgb_color.blue || 0.0;
36324 # var red = Math.floor(redFrac * 255);
36325 # var green = Math.floor(greenFrac * 255);
36326 # var blue = Math.floor(blueFrac * 255);
36327 #
36328 # if (!('alpha' in rgb_color)) {
36329 # return rgbToCssColor_(red, green, blue);
36330 # }
36331 #
36332 # var alphaFrac = rgb_color.alpha.value || 0.0;
36333 # var rgbParams = [red, green, blue].join(',');
36334 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36335 # };
36336 #
36337 # var rgbToCssColor_ = function(red, green, blue) {
36338 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36339 # var hexString = rgbNumber.toString(16);
36340 # var missingZeros = 6 - hexString.length;
36341 # var resultBuilder = ['#'];
36342 # for (var i = 0; i < missingZeros; i++) {
36343 # resultBuilder.push('0');
36344 # }
36345 # resultBuilder.push(hexString);
36346 # return resultBuilder.join('');
36347 # };
36348 #
36349 # // ...
36350 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36351 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36352 # the final pixel color is defined by the equation:
36353 #
36354 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36355 #
36356 # This means that a value of 1.0 corresponds to a solid color, whereas
36357 # a value of 0.0 corresponds to a completely transparent color. This
36358 # uses a wrapper message rather than a simple float scalar so that it is
36359 # possible to distinguish between a default value and the value being unset.
36360 # If omitted, this color object is to be rendered as a solid color
36361 # (as if the alpha value had been explicitly given with a value of 1.0).
36362 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36363 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36364 },
Thomas Coffee2f245372017-03-27 10:39:26 -070036365 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036366 "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).
36367 # Absent values indicate that the field isn't specified.
36368 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
36369 # for simplicity of conversion to/from color representations in various
36370 # languages over compactness; for example, the fields of this representation
36371 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36372 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36373 # method in iOS; and, with just a little work, it can be easily formatted into
36374 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36375 #
36376 # Example (Java):
36377 #
36378 # import com.google.type.Color;
36379 #
36380 # // ...
36381 # public static java.awt.Color fromProto(Color protocolor) {
36382 # float alpha = protocolor.hasAlpha()
36383 # ? protocolor.getAlpha().getValue()
36384 # : 1.0;
36385 #
36386 # return new java.awt.Color(
36387 # protocolor.getRed(),
36388 # protocolor.getGreen(),
36389 # protocolor.getBlue(),
36390 # alpha);
36391 # }
36392 #
36393 # public static Color toProto(java.awt.Color color) {
36394 # float red = (float) color.getRed();
36395 # float green = (float) color.getGreen();
36396 # float blue = (float) color.getBlue();
36397 # float denominator = 255.0;
36398 # Color.Builder resultBuilder =
36399 # Color
36400 # .newBuilder()
36401 # .setRed(red / denominator)
36402 # .setGreen(green / denominator)
36403 # .setBlue(blue / denominator);
36404 # int alpha = color.getAlpha();
36405 # if (alpha != 255) {
36406 # result.setAlpha(
36407 # FloatValue
36408 # .newBuilder()
36409 # .setValue(((float) alpha) / denominator)
36410 # .build());
36411 # }
36412 # return resultBuilder.build();
36413 # }
36414 # // ...
36415 #
36416 # Example (iOS / Obj-C):
36417 #
36418 # // ...
36419 # static UIColor* fromProto(Color* protocolor) {
36420 # float red = [protocolor red];
36421 # float green = [protocolor green];
36422 # float blue = [protocolor blue];
36423 # FloatValue* alpha_wrapper = [protocolor alpha];
36424 # float alpha = 1.0;
36425 # if (alpha_wrapper != nil) {
36426 # alpha = [alpha_wrapper value];
36427 # }
36428 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36429 # }
36430 #
36431 # static Color* toProto(UIColor* color) {
36432 # CGFloat red, green, blue, alpha;
36433 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36434 # return nil;
36435 # }
36436 # Color* result = [Color alloc] init];
36437 # [result setRed:red];
36438 # [result setGreen:green];
36439 # [result setBlue:blue];
36440 # if (alpha <= 0.9999) {
36441 # [result setAlpha:floatWrapperWithValue(alpha)];
36442 # }
36443 # [result autorelease];
36444 # return result;
36445 # }
36446 # // ...
36447 #
36448 # Example (JavaScript):
36449 #
36450 # // ...
36451 #
36452 # var protoToCssColor = function(rgb_color) {
36453 # var redFrac = rgb_color.red || 0.0;
36454 # var greenFrac = rgb_color.green || 0.0;
36455 # var blueFrac = rgb_color.blue || 0.0;
36456 # var red = Math.floor(redFrac * 255);
36457 # var green = Math.floor(greenFrac * 255);
36458 # var blue = Math.floor(blueFrac * 255);
36459 #
36460 # if (!('alpha' in rgb_color)) {
36461 # return rgbToCssColor_(red, green, blue);
36462 # }
36463 #
36464 # var alphaFrac = rgb_color.alpha.value || 0.0;
36465 # var rgbParams = [red, green, blue].join(',');
36466 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36467 # };
36468 #
36469 # var rgbToCssColor_ = function(red, green, blue) {
36470 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36471 # var hexString = rgbNumber.toString(16);
36472 # var missingZeros = 6 - hexString.length;
36473 # var resultBuilder = ['#'];
36474 # for (var i = 0; i < missingZeros; i++) {
36475 # resultBuilder.push('0');
36476 # }
36477 # resultBuilder.push(hexString);
36478 # return resultBuilder.join('');
36479 # };
36480 #
36481 # // ...
36482 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36483 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36484 # the final pixel color is defined by the equation:
36485 #
36486 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36487 #
36488 # This means that a value of 1.0 corresponds to a solid color, whereas
36489 # a value of 0.0 corresponds to a completely transparent color. This
36490 # uses a wrapper message rather than a simple float scalar so that it is
36491 # possible to distinguish between a default value and the value being unset.
36492 # If omitted, this color object is to be rendered as a solid color
36493 # (as if the alpha value had been explicitly given with a value of 1.0).
36494 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36495 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36496 },
36497 "bold": True or False, # True if the text is bold.
36498 "strikethrough": True or False, # True if the text has a strikethrough.
36499 "fontFamily": "A String", # The font family.
36500 "fontSize": 42, # The size of the font.
36501 "italic": True or False, # True if the text is italicized.
36502 "underline": True or False, # True if the text is underlined.
36503 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070036504 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
36505 "angle": 42, # The angle between the standard orientation and the desired orientation.
36506 # Measured in degrees. Valid values are between -90 and 90. Positive
36507 # angles are angled upwards, negative are angled downwards.
36508 #
36509 # Note: For LTR text direction positive angles are in the counterclockwise
36510 # direction, whereas for RTL they are in the clockwise direction
36511 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
36512 # characters is unchanged.
36513 # For example:
36514 #
36515 # | V |
36516 # | e |
36517 # | r |
36518 # | t |
36519 # | i |
36520 # | c |
36521 # | a |
36522 # | l |
36523 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036524 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
36525 "borders": { # The borders of the cell. # The borders of the cell.
36526 "top": { # A border along a cell. # The top border of the cell.
36527 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36528 # for simplicity of conversion to/from color representations in various
36529 # languages over compactness; for example, the fields of this representation
36530 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36531 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36532 # method in iOS; and, with just a little work, it can be easily formatted into
36533 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36534 #
36535 # Example (Java):
36536 #
36537 # import com.google.type.Color;
36538 #
36539 # // ...
36540 # public static java.awt.Color fromProto(Color protocolor) {
36541 # float alpha = protocolor.hasAlpha()
36542 # ? protocolor.getAlpha().getValue()
36543 # : 1.0;
36544 #
36545 # return new java.awt.Color(
36546 # protocolor.getRed(),
36547 # protocolor.getGreen(),
36548 # protocolor.getBlue(),
36549 # alpha);
36550 # }
36551 #
36552 # public static Color toProto(java.awt.Color color) {
36553 # float red = (float) color.getRed();
36554 # float green = (float) color.getGreen();
36555 # float blue = (float) color.getBlue();
36556 # float denominator = 255.0;
36557 # Color.Builder resultBuilder =
36558 # Color
36559 # .newBuilder()
36560 # .setRed(red / denominator)
36561 # .setGreen(green / denominator)
36562 # .setBlue(blue / denominator);
36563 # int alpha = color.getAlpha();
36564 # if (alpha != 255) {
36565 # result.setAlpha(
36566 # FloatValue
36567 # .newBuilder()
36568 # .setValue(((float) alpha) / denominator)
36569 # .build());
36570 # }
36571 # return resultBuilder.build();
36572 # }
36573 # // ...
36574 #
36575 # Example (iOS / Obj-C):
36576 #
36577 # // ...
36578 # static UIColor* fromProto(Color* protocolor) {
36579 # float red = [protocolor red];
36580 # float green = [protocolor green];
36581 # float blue = [protocolor blue];
36582 # FloatValue* alpha_wrapper = [protocolor alpha];
36583 # float alpha = 1.0;
36584 # if (alpha_wrapper != nil) {
36585 # alpha = [alpha_wrapper value];
36586 # }
36587 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36588 # }
36589 #
36590 # static Color* toProto(UIColor* color) {
36591 # CGFloat red, green, blue, alpha;
36592 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36593 # return nil;
36594 # }
36595 # Color* result = [Color alloc] init];
36596 # [result setRed:red];
36597 # [result setGreen:green];
36598 # [result setBlue:blue];
36599 # if (alpha <= 0.9999) {
36600 # [result setAlpha:floatWrapperWithValue(alpha)];
36601 # }
36602 # [result autorelease];
36603 # return result;
36604 # }
36605 # // ...
36606 #
36607 # Example (JavaScript):
36608 #
36609 # // ...
36610 #
36611 # var protoToCssColor = function(rgb_color) {
36612 # var redFrac = rgb_color.red || 0.0;
36613 # var greenFrac = rgb_color.green || 0.0;
36614 # var blueFrac = rgb_color.blue || 0.0;
36615 # var red = Math.floor(redFrac * 255);
36616 # var green = Math.floor(greenFrac * 255);
36617 # var blue = Math.floor(blueFrac * 255);
36618 #
36619 # if (!('alpha' in rgb_color)) {
36620 # return rgbToCssColor_(red, green, blue);
36621 # }
36622 #
36623 # var alphaFrac = rgb_color.alpha.value || 0.0;
36624 # var rgbParams = [red, green, blue].join(',');
36625 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36626 # };
36627 #
36628 # var rgbToCssColor_ = function(red, green, blue) {
36629 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36630 # var hexString = rgbNumber.toString(16);
36631 # var missingZeros = 6 - hexString.length;
36632 # var resultBuilder = ['#'];
36633 # for (var i = 0; i < missingZeros; i++) {
36634 # resultBuilder.push('0');
36635 # }
36636 # resultBuilder.push(hexString);
36637 # return resultBuilder.join('');
36638 # };
36639 #
36640 # // ...
36641 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36642 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36643 # the final pixel color is defined by the equation:
36644 #
36645 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36646 #
36647 # This means that a value of 1.0 corresponds to a solid color, whereas
36648 # a value of 0.0 corresponds to a completely transparent color. This
36649 # uses a wrapper message rather than a simple float scalar so that it is
36650 # possible to distinguish between a default value and the value being unset.
36651 # If omitted, this color object is to be rendered as a solid color
36652 # (as if the alpha value had been explicitly given with a value of 1.0).
36653 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36654 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36655 },
36656 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036657 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036658 "style": "A String", # The style of the border.
36659 },
36660 "right": { # A border along a cell. # The right border of the cell.
36661 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36662 # for simplicity of conversion to/from color representations in various
36663 # languages over compactness; for example, the fields of this representation
36664 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36665 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36666 # method in iOS; and, with just a little work, it can be easily formatted into
36667 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36668 #
36669 # Example (Java):
36670 #
36671 # import com.google.type.Color;
36672 #
36673 # // ...
36674 # public static java.awt.Color fromProto(Color protocolor) {
36675 # float alpha = protocolor.hasAlpha()
36676 # ? protocolor.getAlpha().getValue()
36677 # : 1.0;
36678 #
36679 # return new java.awt.Color(
36680 # protocolor.getRed(),
36681 # protocolor.getGreen(),
36682 # protocolor.getBlue(),
36683 # alpha);
36684 # }
36685 #
36686 # public static Color toProto(java.awt.Color color) {
36687 # float red = (float) color.getRed();
36688 # float green = (float) color.getGreen();
36689 # float blue = (float) color.getBlue();
36690 # float denominator = 255.0;
36691 # Color.Builder resultBuilder =
36692 # Color
36693 # .newBuilder()
36694 # .setRed(red / denominator)
36695 # .setGreen(green / denominator)
36696 # .setBlue(blue / denominator);
36697 # int alpha = color.getAlpha();
36698 # if (alpha != 255) {
36699 # result.setAlpha(
36700 # FloatValue
36701 # .newBuilder()
36702 # .setValue(((float) alpha) / denominator)
36703 # .build());
36704 # }
36705 # return resultBuilder.build();
36706 # }
36707 # // ...
36708 #
36709 # Example (iOS / Obj-C):
36710 #
36711 # // ...
36712 # static UIColor* fromProto(Color* protocolor) {
36713 # float red = [protocolor red];
36714 # float green = [protocolor green];
36715 # float blue = [protocolor blue];
36716 # FloatValue* alpha_wrapper = [protocolor alpha];
36717 # float alpha = 1.0;
36718 # if (alpha_wrapper != nil) {
36719 # alpha = [alpha_wrapper value];
36720 # }
36721 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36722 # }
36723 #
36724 # static Color* toProto(UIColor* color) {
36725 # CGFloat red, green, blue, alpha;
36726 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36727 # return nil;
36728 # }
36729 # Color* result = [Color alloc] init];
36730 # [result setRed:red];
36731 # [result setGreen:green];
36732 # [result setBlue:blue];
36733 # if (alpha <= 0.9999) {
36734 # [result setAlpha:floatWrapperWithValue(alpha)];
36735 # }
36736 # [result autorelease];
36737 # return result;
36738 # }
36739 # // ...
36740 #
36741 # Example (JavaScript):
36742 #
36743 # // ...
36744 #
36745 # var protoToCssColor = function(rgb_color) {
36746 # var redFrac = rgb_color.red || 0.0;
36747 # var greenFrac = rgb_color.green || 0.0;
36748 # var blueFrac = rgb_color.blue || 0.0;
36749 # var red = Math.floor(redFrac * 255);
36750 # var green = Math.floor(greenFrac * 255);
36751 # var blue = Math.floor(blueFrac * 255);
36752 #
36753 # if (!('alpha' in rgb_color)) {
36754 # return rgbToCssColor_(red, green, blue);
36755 # }
36756 #
36757 # var alphaFrac = rgb_color.alpha.value || 0.0;
36758 # var rgbParams = [red, green, blue].join(',');
36759 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36760 # };
36761 #
36762 # var rgbToCssColor_ = function(red, green, blue) {
36763 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36764 # var hexString = rgbNumber.toString(16);
36765 # var missingZeros = 6 - hexString.length;
36766 # var resultBuilder = ['#'];
36767 # for (var i = 0; i < missingZeros; i++) {
36768 # resultBuilder.push('0');
36769 # }
36770 # resultBuilder.push(hexString);
36771 # return resultBuilder.join('');
36772 # };
36773 #
36774 # // ...
36775 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36776 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36777 # the final pixel color is defined by the equation:
36778 #
36779 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36780 #
36781 # This means that a value of 1.0 corresponds to a solid color, whereas
36782 # a value of 0.0 corresponds to a completely transparent color. This
36783 # uses a wrapper message rather than a simple float scalar so that it is
36784 # possible to distinguish between a default value and the value being unset.
36785 # If omitted, this color object is to be rendered as a solid color
36786 # (as if the alpha value had been explicitly given with a value of 1.0).
36787 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36788 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36789 },
36790 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036791 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036792 "style": "A String", # The style of the border.
36793 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036794 "left": { # A border along a cell. # The left border of the cell.
36795 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36796 # for simplicity of conversion to/from color representations in various
36797 # languages over compactness; for example, the fields of this representation
36798 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36799 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36800 # method in iOS; and, with just a little work, it can be easily formatted into
36801 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36802 #
36803 # Example (Java):
36804 #
36805 # import com.google.type.Color;
36806 #
36807 # // ...
36808 # public static java.awt.Color fromProto(Color protocolor) {
36809 # float alpha = protocolor.hasAlpha()
36810 # ? protocolor.getAlpha().getValue()
36811 # : 1.0;
36812 #
36813 # return new java.awt.Color(
36814 # protocolor.getRed(),
36815 # protocolor.getGreen(),
36816 # protocolor.getBlue(),
36817 # alpha);
36818 # }
36819 #
36820 # public static Color toProto(java.awt.Color color) {
36821 # float red = (float) color.getRed();
36822 # float green = (float) color.getGreen();
36823 # float blue = (float) color.getBlue();
36824 # float denominator = 255.0;
36825 # Color.Builder resultBuilder =
36826 # Color
36827 # .newBuilder()
36828 # .setRed(red / denominator)
36829 # .setGreen(green / denominator)
36830 # .setBlue(blue / denominator);
36831 # int alpha = color.getAlpha();
36832 # if (alpha != 255) {
36833 # result.setAlpha(
36834 # FloatValue
36835 # .newBuilder()
36836 # .setValue(((float) alpha) / denominator)
36837 # .build());
36838 # }
36839 # return resultBuilder.build();
36840 # }
36841 # // ...
36842 #
36843 # Example (iOS / Obj-C):
36844 #
36845 # // ...
36846 # static UIColor* fromProto(Color* protocolor) {
36847 # float red = [protocolor red];
36848 # float green = [protocolor green];
36849 # float blue = [protocolor blue];
36850 # FloatValue* alpha_wrapper = [protocolor alpha];
36851 # float alpha = 1.0;
36852 # if (alpha_wrapper != nil) {
36853 # alpha = [alpha_wrapper value];
36854 # }
36855 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36856 # }
36857 #
36858 # static Color* toProto(UIColor* color) {
36859 # CGFloat red, green, blue, alpha;
36860 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36861 # return nil;
36862 # }
36863 # Color* result = [Color alloc] init];
36864 # [result setRed:red];
36865 # [result setGreen:green];
36866 # [result setBlue:blue];
36867 # if (alpha <= 0.9999) {
36868 # [result setAlpha:floatWrapperWithValue(alpha)];
36869 # }
36870 # [result autorelease];
36871 # return result;
36872 # }
36873 # // ...
36874 #
36875 # Example (JavaScript):
36876 #
36877 # // ...
36878 #
36879 # var protoToCssColor = function(rgb_color) {
36880 # var redFrac = rgb_color.red || 0.0;
36881 # var greenFrac = rgb_color.green || 0.0;
36882 # var blueFrac = rgb_color.blue || 0.0;
36883 # var red = Math.floor(redFrac * 255);
36884 # var green = Math.floor(greenFrac * 255);
36885 # var blue = Math.floor(blueFrac * 255);
36886 #
36887 # if (!('alpha' in rgb_color)) {
36888 # return rgbToCssColor_(red, green, blue);
36889 # }
36890 #
36891 # var alphaFrac = rgb_color.alpha.value || 0.0;
36892 # var rgbParams = [red, green, blue].join(',');
36893 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36894 # };
36895 #
36896 # var rgbToCssColor_ = function(red, green, blue) {
36897 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36898 # var hexString = rgbNumber.toString(16);
36899 # var missingZeros = 6 - hexString.length;
36900 # var resultBuilder = ['#'];
36901 # for (var i = 0; i < missingZeros; i++) {
36902 # resultBuilder.push('0');
36903 # }
36904 # resultBuilder.push(hexString);
36905 # return resultBuilder.join('');
36906 # };
36907 #
36908 # // ...
36909 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36910 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36911 # the final pixel color is defined by the equation:
36912 #
36913 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36914 #
36915 # This means that a value of 1.0 corresponds to a solid color, whereas
36916 # a value of 0.0 corresponds to a completely transparent color. This
36917 # uses a wrapper message rather than a simple float scalar so that it is
36918 # possible to distinguish between a default value and the value being unset.
36919 # If omitted, this color object is to be rendered as a solid color
36920 # (as if the alpha value had been explicitly given with a value of 1.0).
36921 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36922 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36923 },
36924 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036925 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036926 "style": "A String", # The style of the border.
36927 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070036928 "bottom": { # A border along a cell. # The bottom border of the cell.
36929 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36930 # for simplicity of conversion to/from color representations in various
36931 # languages over compactness; for example, the fields of this representation
36932 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36933 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36934 # method in iOS; and, with just a little work, it can be easily formatted into
36935 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36936 #
36937 # Example (Java):
36938 #
36939 # import com.google.type.Color;
36940 #
36941 # // ...
36942 # public static java.awt.Color fromProto(Color protocolor) {
36943 # float alpha = protocolor.hasAlpha()
36944 # ? protocolor.getAlpha().getValue()
36945 # : 1.0;
36946 #
36947 # return new java.awt.Color(
36948 # protocolor.getRed(),
36949 # protocolor.getGreen(),
36950 # protocolor.getBlue(),
36951 # alpha);
36952 # }
36953 #
36954 # public static Color toProto(java.awt.Color color) {
36955 # float red = (float) color.getRed();
36956 # float green = (float) color.getGreen();
36957 # float blue = (float) color.getBlue();
36958 # float denominator = 255.0;
36959 # Color.Builder resultBuilder =
36960 # Color
36961 # .newBuilder()
36962 # .setRed(red / denominator)
36963 # .setGreen(green / denominator)
36964 # .setBlue(blue / denominator);
36965 # int alpha = color.getAlpha();
36966 # if (alpha != 255) {
36967 # result.setAlpha(
36968 # FloatValue
36969 # .newBuilder()
36970 # .setValue(((float) alpha) / denominator)
36971 # .build());
36972 # }
36973 # return resultBuilder.build();
36974 # }
36975 # // ...
36976 #
36977 # Example (iOS / Obj-C):
36978 #
36979 # // ...
36980 # static UIColor* fromProto(Color* protocolor) {
36981 # float red = [protocolor red];
36982 # float green = [protocolor green];
36983 # float blue = [protocolor blue];
36984 # FloatValue* alpha_wrapper = [protocolor alpha];
36985 # float alpha = 1.0;
36986 # if (alpha_wrapper != nil) {
36987 # alpha = [alpha_wrapper value];
36988 # }
36989 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36990 # }
36991 #
36992 # static Color* toProto(UIColor* color) {
36993 # CGFloat red, green, blue, alpha;
36994 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36995 # return nil;
36996 # }
36997 # Color* result = [Color alloc] init];
36998 # [result setRed:red];
36999 # [result setGreen:green];
37000 # [result setBlue:blue];
37001 # if (alpha <= 0.9999) {
37002 # [result setAlpha:floatWrapperWithValue(alpha)];
37003 # }
37004 # [result autorelease];
37005 # return result;
37006 # }
37007 # // ...
37008 #
37009 # Example (JavaScript):
37010 #
37011 # // ...
37012 #
37013 # var protoToCssColor = function(rgb_color) {
37014 # var redFrac = rgb_color.red || 0.0;
37015 # var greenFrac = rgb_color.green || 0.0;
37016 # var blueFrac = rgb_color.blue || 0.0;
37017 # var red = Math.floor(redFrac * 255);
37018 # var green = Math.floor(greenFrac * 255);
37019 # var blue = Math.floor(blueFrac * 255);
37020 #
37021 # if (!('alpha' in rgb_color)) {
37022 # return rgbToCssColor_(red, green, blue);
37023 # }
37024 #
37025 # var alphaFrac = rgb_color.alpha.value || 0.0;
37026 # var rgbParams = [red, green, blue].join(',');
37027 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37028 # };
37029 #
37030 # var rgbToCssColor_ = function(red, green, blue) {
37031 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37032 # var hexString = rgbNumber.toString(16);
37033 # var missingZeros = 6 - hexString.length;
37034 # var resultBuilder = ['#'];
37035 # for (var i = 0; i < missingZeros; i++) {
37036 # resultBuilder.push('0');
37037 # }
37038 # resultBuilder.push(hexString);
37039 # return resultBuilder.join('');
37040 # };
37041 #
37042 # // ...
37043 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37044 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37045 # the final pixel color is defined by the equation:
37046 #
37047 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37048 #
37049 # This means that a value of 1.0 corresponds to a solid color, whereas
37050 # a value of 0.0 corresponds to a completely transparent color. This
37051 # uses a wrapper message rather than a simple float scalar so that it is
37052 # possible to distinguish between a default value and the value being unset.
37053 # If omitted, this color object is to be rendered as a solid color
37054 # (as if the alpha value had been explicitly given with a value of 1.0).
37055 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37056 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37057 },
37058 "width": 42, # The width of the border, in pixels.
37059 # Deprecated; the width is determined by the "style" field.
37060 "style": "A String", # The style of the border.
37061 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037062 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070037063 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037064 },
37065 },
37066 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
37067 # the interpolation points listed. The format of a cell will vary
37068 # based on its contents as compared to the values of the interpolation
37069 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070037070 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037071 # These pin the gradient color scale according to the color,
37072 # type and value chosen.
37073 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
37074 # for simplicity of conversion to/from color representations in various
37075 # languages over compactness; for example, the fields of this representation
37076 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37077 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37078 # method in iOS; and, with just a little work, it can be easily formatted into
37079 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37080 #
37081 # Example (Java):
37082 #
37083 # import com.google.type.Color;
37084 #
37085 # // ...
37086 # public static java.awt.Color fromProto(Color protocolor) {
37087 # float alpha = protocolor.hasAlpha()
37088 # ? protocolor.getAlpha().getValue()
37089 # : 1.0;
37090 #
37091 # return new java.awt.Color(
37092 # protocolor.getRed(),
37093 # protocolor.getGreen(),
37094 # protocolor.getBlue(),
37095 # alpha);
37096 # }
37097 #
37098 # public static Color toProto(java.awt.Color color) {
37099 # float red = (float) color.getRed();
37100 # float green = (float) color.getGreen();
37101 # float blue = (float) color.getBlue();
37102 # float denominator = 255.0;
37103 # Color.Builder resultBuilder =
37104 # Color
37105 # .newBuilder()
37106 # .setRed(red / denominator)
37107 # .setGreen(green / denominator)
37108 # .setBlue(blue / denominator);
37109 # int alpha = color.getAlpha();
37110 # if (alpha != 255) {
37111 # result.setAlpha(
37112 # FloatValue
37113 # .newBuilder()
37114 # .setValue(((float) alpha) / denominator)
37115 # .build());
37116 # }
37117 # return resultBuilder.build();
37118 # }
37119 # // ...
37120 #
37121 # Example (iOS / Obj-C):
37122 #
37123 # // ...
37124 # static UIColor* fromProto(Color* protocolor) {
37125 # float red = [protocolor red];
37126 # float green = [protocolor green];
37127 # float blue = [protocolor blue];
37128 # FloatValue* alpha_wrapper = [protocolor alpha];
37129 # float alpha = 1.0;
37130 # if (alpha_wrapper != nil) {
37131 # alpha = [alpha_wrapper value];
37132 # }
37133 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37134 # }
37135 #
37136 # static Color* toProto(UIColor* color) {
37137 # CGFloat red, green, blue, alpha;
37138 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37139 # return nil;
37140 # }
37141 # Color* result = [Color alloc] init];
37142 # [result setRed:red];
37143 # [result setGreen:green];
37144 # [result setBlue:blue];
37145 # if (alpha <= 0.9999) {
37146 # [result setAlpha:floatWrapperWithValue(alpha)];
37147 # }
37148 # [result autorelease];
37149 # return result;
37150 # }
37151 # // ...
37152 #
37153 # Example (JavaScript):
37154 #
37155 # // ...
37156 #
37157 # var protoToCssColor = function(rgb_color) {
37158 # var redFrac = rgb_color.red || 0.0;
37159 # var greenFrac = rgb_color.green || 0.0;
37160 # var blueFrac = rgb_color.blue || 0.0;
37161 # var red = Math.floor(redFrac * 255);
37162 # var green = Math.floor(greenFrac * 255);
37163 # var blue = Math.floor(blueFrac * 255);
37164 #
37165 # if (!('alpha' in rgb_color)) {
37166 # return rgbToCssColor_(red, green, blue);
37167 # }
37168 #
37169 # var alphaFrac = rgb_color.alpha.value || 0.0;
37170 # var rgbParams = [red, green, blue].join(',');
37171 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37172 # };
37173 #
37174 # var rgbToCssColor_ = function(red, green, blue) {
37175 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37176 # var hexString = rgbNumber.toString(16);
37177 # var missingZeros = 6 - hexString.length;
37178 # var resultBuilder = ['#'];
37179 # for (var i = 0; i < missingZeros; i++) {
37180 # resultBuilder.push('0');
37181 # }
37182 # resultBuilder.push(hexString);
37183 # return resultBuilder.join('');
37184 # };
37185 #
37186 # // ...
37187 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37188 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37189 # the final pixel color is defined by the equation:
37190 #
37191 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37192 #
37193 # This means that a value of 1.0 corresponds to a solid color, whereas
37194 # a value of 0.0 corresponds to a completely transparent color. This
37195 # uses a wrapper message rather than a simple float scalar so that it is
37196 # possible to distinguish between a default value and the value being unset.
37197 # If omitted, this color object is to be rendered as a solid color
37198 # (as if the alpha value had been explicitly given with a value of 1.0).
37199 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37200 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37201 },
37202 "type": "A String", # How the value should be interpreted.
37203 "value": "A String", # The value this interpolation point uses. May be a formula.
37204 # Unused if type is MIN or
37205 # MAX.
37206 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070037207 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037208 # These pin the gradient color scale according to the color,
37209 # type and value chosen.
37210 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
37211 # for simplicity of conversion to/from color representations in various
37212 # languages over compactness; for example, the fields of this representation
37213 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37214 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37215 # method in iOS; and, with just a little work, it can be easily formatted into
37216 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37217 #
37218 # Example (Java):
37219 #
37220 # import com.google.type.Color;
37221 #
37222 # // ...
37223 # public static java.awt.Color fromProto(Color protocolor) {
37224 # float alpha = protocolor.hasAlpha()
37225 # ? protocolor.getAlpha().getValue()
37226 # : 1.0;
37227 #
37228 # return new java.awt.Color(
37229 # protocolor.getRed(),
37230 # protocolor.getGreen(),
37231 # protocolor.getBlue(),
37232 # alpha);
37233 # }
37234 #
37235 # public static Color toProto(java.awt.Color color) {
37236 # float red = (float) color.getRed();
37237 # float green = (float) color.getGreen();
37238 # float blue = (float) color.getBlue();
37239 # float denominator = 255.0;
37240 # Color.Builder resultBuilder =
37241 # Color
37242 # .newBuilder()
37243 # .setRed(red / denominator)
37244 # .setGreen(green / denominator)
37245 # .setBlue(blue / denominator);
37246 # int alpha = color.getAlpha();
37247 # if (alpha != 255) {
37248 # result.setAlpha(
37249 # FloatValue
37250 # .newBuilder()
37251 # .setValue(((float) alpha) / denominator)
37252 # .build());
37253 # }
37254 # return resultBuilder.build();
37255 # }
37256 # // ...
37257 #
37258 # Example (iOS / Obj-C):
37259 #
37260 # // ...
37261 # static UIColor* fromProto(Color* protocolor) {
37262 # float red = [protocolor red];
37263 # float green = [protocolor green];
37264 # float blue = [protocolor blue];
37265 # FloatValue* alpha_wrapper = [protocolor alpha];
37266 # float alpha = 1.0;
37267 # if (alpha_wrapper != nil) {
37268 # alpha = [alpha_wrapper value];
37269 # }
37270 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37271 # }
37272 #
37273 # static Color* toProto(UIColor* color) {
37274 # CGFloat red, green, blue, alpha;
37275 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37276 # return nil;
37277 # }
37278 # Color* result = [Color alloc] init];
37279 # [result setRed:red];
37280 # [result setGreen:green];
37281 # [result setBlue:blue];
37282 # if (alpha <= 0.9999) {
37283 # [result setAlpha:floatWrapperWithValue(alpha)];
37284 # }
37285 # [result autorelease];
37286 # return result;
37287 # }
37288 # // ...
37289 #
37290 # Example (JavaScript):
37291 #
37292 # // ...
37293 #
37294 # var protoToCssColor = function(rgb_color) {
37295 # var redFrac = rgb_color.red || 0.0;
37296 # var greenFrac = rgb_color.green || 0.0;
37297 # var blueFrac = rgb_color.blue || 0.0;
37298 # var red = Math.floor(redFrac * 255);
37299 # var green = Math.floor(greenFrac * 255);
37300 # var blue = Math.floor(blueFrac * 255);
37301 #
37302 # if (!('alpha' in rgb_color)) {
37303 # return rgbToCssColor_(red, green, blue);
37304 # }
37305 #
37306 # var alphaFrac = rgb_color.alpha.value || 0.0;
37307 # var rgbParams = [red, green, blue].join(',');
37308 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37309 # };
37310 #
37311 # var rgbToCssColor_ = function(red, green, blue) {
37312 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37313 # var hexString = rgbNumber.toString(16);
37314 # var missingZeros = 6 - hexString.length;
37315 # var resultBuilder = ['#'];
37316 # for (var i = 0; i < missingZeros; i++) {
37317 # resultBuilder.push('0');
37318 # }
37319 # resultBuilder.push(hexString);
37320 # return resultBuilder.join('');
37321 # };
37322 #
37323 # // ...
37324 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37325 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37326 # the final pixel color is defined by the equation:
37327 #
37328 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37329 #
37330 # This means that a value of 1.0 corresponds to a solid color, whereas
37331 # a value of 0.0 corresponds to a completely transparent color. This
37332 # uses a wrapper message rather than a simple float scalar so that it is
37333 # possible to distinguish between a default value and the value being unset.
37334 # If omitted, this color object is to be rendered as a solid color
37335 # (as if the alpha value had been explicitly given with a value of 1.0).
37336 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37337 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37338 },
37339 "type": "A String", # How the value should be interpreted.
37340 "value": "A String", # The value this interpolation point uses. May be a formula.
37341 # Unused if type is MIN or
37342 # MAX.
37343 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070037344 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037345 # These pin the gradient color scale according to the color,
37346 # type and value chosen.
37347 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
37348 # for simplicity of conversion to/from color representations in various
37349 # languages over compactness; for example, the fields of this representation
37350 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37351 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37352 # method in iOS; and, with just a little work, it can be easily formatted into
37353 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37354 #
37355 # Example (Java):
37356 #
37357 # import com.google.type.Color;
37358 #
37359 # // ...
37360 # public static java.awt.Color fromProto(Color protocolor) {
37361 # float alpha = protocolor.hasAlpha()
37362 # ? protocolor.getAlpha().getValue()
37363 # : 1.0;
37364 #
37365 # return new java.awt.Color(
37366 # protocolor.getRed(),
37367 # protocolor.getGreen(),
37368 # protocolor.getBlue(),
37369 # alpha);
37370 # }
37371 #
37372 # public static Color toProto(java.awt.Color color) {
37373 # float red = (float) color.getRed();
37374 # float green = (float) color.getGreen();
37375 # float blue = (float) color.getBlue();
37376 # float denominator = 255.0;
37377 # Color.Builder resultBuilder =
37378 # Color
37379 # .newBuilder()
37380 # .setRed(red / denominator)
37381 # .setGreen(green / denominator)
37382 # .setBlue(blue / denominator);
37383 # int alpha = color.getAlpha();
37384 # if (alpha != 255) {
37385 # result.setAlpha(
37386 # FloatValue
37387 # .newBuilder()
37388 # .setValue(((float) alpha) / denominator)
37389 # .build());
37390 # }
37391 # return resultBuilder.build();
37392 # }
37393 # // ...
37394 #
37395 # Example (iOS / Obj-C):
37396 #
37397 # // ...
37398 # static UIColor* fromProto(Color* protocolor) {
37399 # float red = [protocolor red];
37400 # float green = [protocolor green];
37401 # float blue = [protocolor blue];
37402 # FloatValue* alpha_wrapper = [protocolor alpha];
37403 # float alpha = 1.0;
37404 # if (alpha_wrapper != nil) {
37405 # alpha = [alpha_wrapper value];
37406 # }
37407 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37408 # }
37409 #
37410 # static Color* toProto(UIColor* color) {
37411 # CGFloat red, green, blue, alpha;
37412 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37413 # return nil;
37414 # }
37415 # Color* result = [Color alloc] init];
37416 # [result setRed:red];
37417 # [result setGreen:green];
37418 # [result setBlue:blue];
37419 # if (alpha <= 0.9999) {
37420 # [result setAlpha:floatWrapperWithValue(alpha)];
37421 # }
37422 # [result autorelease];
37423 # return result;
37424 # }
37425 # // ...
37426 #
37427 # Example (JavaScript):
37428 #
37429 # // ...
37430 #
37431 # var protoToCssColor = function(rgb_color) {
37432 # var redFrac = rgb_color.red || 0.0;
37433 # var greenFrac = rgb_color.green || 0.0;
37434 # var blueFrac = rgb_color.blue || 0.0;
37435 # var red = Math.floor(redFrac * 255);
37436 # var green = Math.floor(greenFrac * 255);
37437 # var blue = Math.floor(blueFrac * 255);
37438 #
37439 # if (!('alpha' in rgb_color)) {
37440 # return rgbToCssColor_(red, green, blue);
37441 # }
37442 #
37443 # var alphaFrac = rgb_color.alpha.value || 0.0;
37444 # var rgbParams = [red, green, blue].join(',');
37445 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37446 # };
37447 #
37448 # var rgbToCssColor_ = function(red, green, blue) {
37449 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37450 # var hexString = rgbNumber.toString(16);
37451 # var missingZeros = 6 - hexString.length;
37452 # var resultBuilder = ['#'];
37453 # for (var i = 0; i < missingZeros; i++) {
37454 # resultBuilder.push('0');
37455 # }
37456 # resultBuilder.push(hexString);
37457 # return resultBuilder.join('');
37458 # };
37459 #
37460 # // ...
37461 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37462 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37463 # the final pixel color is defined by the equation:
37464 #
37465 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37466 #
37467 # This means that a value of 1.0 corresponds to a solid color, whereas
37468 # a value of 0.0 corresponds to a completely transparent color. This
37469 # uses a wrapper message rather than a simple float scalar so that it is
37470 # possible to distinguish between a default value and the value being unset.
37471 # If omitted, this color object is to be rendered as a solid color
37472 # (as if the alpha value had been explicitly given with a value of 1.0).
37473 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37474 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37475 },
37476 "type": "A String", # How the value should be interpreted.
37477 "value": "A String", # The value this interpolation point uses. May be a formula.
37478 # Unused if type is MIN or
37479 # MAX.
37480 },
37481 },
37482 },
37483 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080037484 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
37485 { # A banded (alternating colors) range in a sheet.
37486 "range": { # A range on a sheet. # The range over which these properties are applied.
37487 # All indexes are zero-based.
37488 # Indexes are half open, e.g the start index is inclusive
37489 # and the end index is exclusive -- [start_index, end_index).
37490 # Missing indexes indicate the range is unbounded on that side.
37491 #
37492 # For example, if `"Sheet1"` is sheet ID 0, then:
37493 #
37494 # `Sheet1!A1:A1 == sheet_id: 0,
37495 # start_row_index: 0, end_row_index: 1,
37496 # start_column_index: 0, end_column_index: 1`
37497 #
37498 # `Sheet1!A3:B4 == sheet_id: 0,
37499 # start_row_index: 2, end_row_index: 4,
37500 # start_column_index: 0, end_column_index: 2`
37501 #
37502 # `Sheet1!A:B == sheet_id: 0,
37503 # start_column_index: 0, end_column_index: 2`
37504 #
37505 # `Sheet1!A5:B == sheet_id: 0,
37506 # start_row_index: 4,
37507 # start_column_index: 0, end_column_index: 2`
37508 #
37509 # `Sheet1 == sheet_id:0`
37510 #
37511 # The start index must always be less than or equal to the end index.
37512 # If the start index equals the end index, then the range is empty.
37513 # Empty ranges are typically not meaningful and are usually rendered in the
37514 # UI as `#REF!`.
37515 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070037516 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080037517 "sheetId": 42, # The sheet this range is on.
37518 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070037519 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080037520 },
37521 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
37522 # by-column basis throughout all the columns in the range. At least one of
37523 # row_properties or column_properties must be specified.
37524 # BandedRange.row_properties and BandedRange.column_properties are
37525 # set, the fill colors are applied to cells according to the following rules:
37526 #
37527 # * header_color and footer_color take priority over band colors.
37528 # * first_band_color takes priority over second_band_color.
37529 # * row_properties takes priority over column_properties.
37530 #
37531 # For example, the first row color takes priority over the first column
37532 # color, but the first column color takes priority over the second row color.
37533 # Similarly, the row header takes priority over the column header in the
37534 # top left cell, but the column header takes priority over the first row
37535 # color if the row header is not set.
37536 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
37537 # for simplicity of conversion to/from color representations in various
37538 # languages over compactness; for example, the fields of this representation
37539 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37540 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37541 # method in iOS; and, with just a little work, it can be easily formatted into
37542 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37543 #
37544 # Example (Java):
37545 #
37546 # import com.google.type.Color;
37547 #
37548 # // ...
37549 # public static java.awt.Color fromProto(Color protocolor) {
37550 # float alpha = protocolor.hasAlpha()
37551 # ? protocolor.getAlpha().getValue()
37552 # : 1.0;
37553 #
37554 # return new java.awt.Color(
37555 # protocolor.getRed(),
37556 # protocolor.getGreen(),
37557 # protocolor.getBlue(),
37558 # alpha);
37559 # }
37560 #
37561 # public static Color toProto(java.awt.Color color) {
37562 # float red = (float) color.getRed();
37563 # float green = (float) color.getGreen();
37564 # float blue = (float) color.getBlue();
37565 # float denominator = 255.0;
37566 # Color.Builder resultBuilder =
37567 # Color
37568 # .newBuilder()
37569 # .setRed(red / denominator)
37570 # .setGreen(green / denominator)
37571 # .setBlue(blue / denominator);
37572 # int alpha = color.getAlpha();
37573 # if (alpha != 255) {
37574 # result.setAlpha(
37575 # FloatValue
37576 # .newBuilder()
37577 # .setValue(((float) alpha) / denominator)
37578 # .build());
37579 # }
37580 # return resultBuilder.build();
37581 # }
37582 # // ...
37583 #
37584 # Example (iOS / Obj-C):
37585 #
37586 # // ...
37587 # static UIColor* fromProto(Color* protocolor) {
37588 # float red = [protocolor red];
37589 # float green = [protocolor green];
37590 # float blue = [protocolor blue];
37591 # FloatValue* alpha_wrapper = [protocolor alpha];
37592 # float alpha = 1.0;
37593 # if (alpha_wrapper != nil) {
37594 # alpha = [alpha_wrapper value];
37595 # }
37596 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37597 # }
37598 #
37599 # static Color* toProto(UIColor* color) {
37600 # CGFloat red, green, blue, alpha;
37601 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37602 # return nil;
37603 # }
37604 # Color* result = [Color alloc] init];
37605 # [result setRed:red];
37606 # [result setGreen:green];
37607 # [result setBlue:blue];
37608 # if (alpha <= 0.9999) {
37609 # [result setAlpha:floatWrapperWithValue(alpha)];
37610 # }
37611 # [result autorelease];
37612 # return result;
37613 # }
37614 # // ...
37615 #
37616 # Example (JavaScript):
37617 #
37618 # // ...
37619 #
37620 # var protoToCssColor = function(rgb_color) {
37621 # var redFrac = rgb_color.red || 0.0;
37622 # var greenFrac = rgb_color.green || 0.0;
37623 # var blueFrac = rgb_color.blue || 0.0;
37624 # var red = Math.floor(redFrac * 255);
37625 # var green = Math.floor(greenFrac * 255);
37626 # var blue = Math.floor(blueFrac * 255);
37627 #
37628 # if (!('alpha' in rgb_color)) {
37629 # return rgbToCssColor_(red, green, blue);
37630 # }
37631 #
37632 # var alphaFrac = rgb_color.alpha.value || 0.0;
37633 # var rgbParams = [red, green, blue].join(',');
37634 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37635 # };
37636 #
37637 # var rgbToCssColor_ = function(red, green, blue) {
37638 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37639 # var hexString = rgbNumber.toString(16);
37640 # var missingZeros = 6 - hexString.length;
37641 # var resultBuilder = ['#'];
37642 # for (var i = 0; i < missingZeros; i++) {
37643 # resultBuilder.push('0');
37644 # }
37645 # resultBuilder.push(hexString);
37646 # return resultBuilder.join('');
37647 # };
37648 #
37649 # // ...
37650 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37651 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37652 # the final pixel color is defined by the equation:
37653 #
37654 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37655 #
37656 # This means that a value of 1.0 corresponds to a solid color, whereas
37657 # a value of 0.0 corresponds to a completely transparent color. This
37658 # uses a wrapper message rather than a simple float scalar so that it is
37659 # possible to distinguish between a default value and the value being unset.
37660 # If omitted, this color object is to be rendered as a solid color
37661 # (as if the alpha value had been explicitly given with a value of 1.0).
37662 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37663 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37664 },
37665 "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
37666 # row or column will be filled with this color and the colors will
37667 # alternate between first_band_color and second_band_color starting
37668 # from the second row or column. Otherwise, the first row or column will be
37669 # filled with first_band_color and the colors will proceed to alternate
37670 # as they normally would.
37671 # for simplicity of conversion to/from color representations in various
37672 # languages over compactness; for example, the fields of this representation
37673 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37674 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37675 # method in iOS; and, with just a little work, it can be easily formatted into
37676 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37677 #
37678 # Example (Java):
37679 #
37680 # import com.google.type.Color;
37681 #
37682 # // ...
37683 # public static java.awt.Color fromProto(Color protocolor) {
37684 # float alpha = protocolor.hasAlpha()
37685 # ? protocolor.getAlpha().getValue()
37686 # : 1.0;
37687 #
37688 # return new java.awt.Color(
37689 # protocolor.getRed(),
37690 # protocolor.getGreen(),
37691 # protocolor.getBlue(),
37692 # alpha);
37693 # }
37694 #
37695 # public static Color toProto(java.awt.Color color) {
37696 # float red = (float) color.getRed();
37697 # float green = (float) color.getGreen();
37698 # float blue = (float) color.getBlue();
37699 # float denominator = 255.0;
37700 # Color.Builder resultBuilder =
37701 # Color
37702 # .newBuilder()
37703 # .setRed(red / denominator)
37704 # .setGreen(green / denominator)
37705 # .setBlue(blue / denominator);
37706 # int alpha = color.getAlpha();
37707 # if (alpha != 255) {
37708 # result.setAlpha(
37709 # FloatValue
37710 # .newBuilder()
37711 # .setValue(((float) alpha) / denominator)
37712 # .build());
37713 # }
37714 # return resultBuilder.build();
37715 # }
37716 # // ...
37717 #
37718 # Example (iOS / Obj-C):
37719 #
37720 # // ...
37721 # static UIColor* fromProto(Color* protocolor) {
37722 # float red = [protocolor red];
37723 # float green = [protocolor green];
37724 # float blue = [protocolor blue];
37725 # FloatValue* alpha_wrapper = [protocolor alpha];
37726 # float alpha = 1.0;
37727 # if (alpha_wrapper != nil) {
37728 # alpha = [alpha_wrapper value];
37729 # }
37730 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37731 # }
37732 #
37733 # static Color* toProto(UIColor* color) {
37734 # CGFloat red, green, blue, alpha;
37735 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37736 # return nil;
37737 # }
37738 # Color* result = [Color alloc] init];
37739 # [result setRed:red];
37740 # [result setGreen:green];
37741 # [result setBlue:blue];
37742 # if (alpha <= 0.9999) {
37743 # [result setAlpha:floatWrapperWithValue(alpha)];
37744 # }
37745 # [result autorelease];
37746 # return result;
37747 # }
37748 # // ...
37749 #
37750 # Example (JavaScript):
37751 #
37752 # // ...
37753 #
37754 # var protoToCssColor = function(rgb_color) {
37755 # var redFrac = rgb_color.red || 0.0;
37756 # var greenFrac = rgb_color.green || 0.0;
37757 # var blueFrac = rgb_color.blue || 0.0;
37758 # var red = Math.floor(redFrac * 255);
37759 # var green = Math.floor(greenFrac * 255);
37760 # var blue = Math.floor(blueFrac * 255);
37761 #
37762 # if (!('alpha' in rgb_color)) {
37763 # return rgbToCssColor_(red, green, blue);
37764 # }
37765 #
37766 # var alphaFrac = rgb_color.alpha.value || 0.0;
37767 # var rgbParams = [red, green, blue].join(',');
37768 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37769 # };
37770 #
37771 # var rgbToCssColor_ = function(red, green, blue) {
37772 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37773 # var hexString = rgbNumber.toString(16);
37774 # var missingZeros = 6 - hexString.length;
37775 # var resultBuilder = ['#'];
37776 # for (var i = 0; i < missingZeros; i++) {
37777 # resultBuilder.push('0');
37778 # }
37779 # resultBuilder.push(hexString);
37780 # return resultBuilder.join('');
37781 # };
37782 #
37783 # // ...
37784 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37785 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37786 # the final pixel color is defined by the equation:
37787 #
37788 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37789 #
37790 # This means that a value of 1.0 corresponds to a solid color, whereas
37791 # a value of 0.0 corresponds to a completely transparent color. This
37792 # uses a wrapper message rather than a simple float scalar so that it is
37793 # possible to distinguish between a default value and the value being unset.
37794 # If omitted, this color object is to be rendered as a solid color
37795 # (as if the alpha value had been explicitly given with a value of 1.0).
37796 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37797 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37798 },
37799 "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
37800 # row or column will be filled with either first_band_color or
37801 # second_band_color, depending on the color of the previous row or
37802 # column.
37803 # for simplicity of conversion to/from color representations in various
37804 # languages over compactness; for example, the fields of this representation
37805 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37806 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37807 # method in iOS; and, with just a little work, it can be easily formatted into
37808 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37809 #
37810 # Example (Java):
37811 #
37812 # import com.google.type.Color;
37813 #
37814 # // ...
37815 # public static java.awt.Color fromProto(Color protocolor) {
37816 # float alpha = protocolor.hasAlpha()
37817 # ? protocolor.getAlpha().getValue()
37818 # : 1.0;
37819 #
37820 # return new java.awt.Color(
37821 # protocolor.getRed(),
37822 # protocolor.getGreen(),
37823 # protocolor.getBlue(),
37824 # alpha);
37825 # }
37826 #
37827 # public static Color toProto(java.awt.Color color) {
37828 # float red = (float) color.getRed();
37829 # float green = (float) color.getGreen();
37830 # float blue = (float) color.getBlue();
37831 # float denominator = 255.0;
37832 # Color.Builder resultBuilder =
37833 # Color
37834 # .newBuilder()
37835 # .setRed(red / denominator)
37836 # .setGreen(green / denominator)
37837 # .setBlue(blue / denominator);
37838 # int alpha = color.getAlpha();
37839 # if (alpha != 255) {
37840 # result.setAlpha(
37841 # FloatValue
37842 # .newBuilder()
37843 # .setValue(((float) alpha) / denominator)
37844 # .build());
37845 # }
37846 # return resultBuilder.build();
37847 # }
37848 # // ...
37849 #
37850 # Example (iOS / Obj-C):
37851 #
37852 # // ...
37853 # static UIColor* fromProto(Color* protocolor) {
37854 # float red = [protocolor red];
37855 # float green = [protocolor green];
37856 # float blue = [protocolor blue];
37857 # FloatValue* alpha_wrapper = [protocolor alpha];
37858 # float alpha = 1.0;
37859 # if (alpha_wrapper != nil) {
37860 # alpha = [alpha_wrapper value];
37861 # }
37862 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37863 # }
37864 #
37865 # static Color* toProto(UIColor* color) {
37866 # CGFloat red, green, blue, alpha;
37867 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37868 # return nil;
37869 # }
37870 # Color* result = [Color alloc] init];
37871 # [result setRed:red];
37872 # [result setGreen:green];
37873 # [result setBlue:blue];
37874 # if (alpha <= 0.9999) {
37875 # [result setAlpha:floatWrapperWithValue(alpha)];
37876 # }
37877 # [result autorelease];
37878 # return result;
37879 # }
37880 # // ...
37881 #
37882 # Example (JavaScript):
37883 #
37884 # // ...
37885 #
37886 # var protoToCssColor = function(rgb_color) {
37887 # var redFrac = rgb_color.red || 0.0;
37888 # var greenFrac = rgb_color.green || 0.0;
37889 # var blueFrac = rgb_color.blue || 0.0;
37890 # var red = Math.floor(redFrac * 255);
37891 # var green = Math.floor(greenFrac * 255);
37892 # var blue = Math.floor(blueFrac * 255);
37893 #
37894 # if (!('alpha' in rgb_color)) {
37895 # return rgbToCssColor_(red, green, blue);
37896 # }
37897 #
37898 # var alphaFrac = rgb_color.alpha.value || 0.0;
37899 # var rgbParams = [red, green, blue].join(',');
37900 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37901 # };
37902 #
37903 # var rgbToCssColor_ = function(red, green, blue) {
37904 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37905 # var hexString = rgbNumber.toString(16);
37906 # var missingZeros = 6 - hexString.length;
37907 # var resultBuilder = ['#'];
37908 # for (var i = 0; i < missingZeros; i++) {
37909 # resultBuilder.push('0');
37910 # }
37911 # resultBuilder.push(hexString);
37912 # return resultBuilder.join('');
37913 # };
37914 #
37915 # // ...
37916 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37917 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37918 # the final pixel color is defined by the equation:
37919 #
37920 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37921 #
37922 # This means that a value of 1.0 corresponds to a solid color, whereas
37923 # a value of 0.0 corresponds to a completely transparent color. This
37924 # uses a wrapper message rather than a simple float scalar so that it is
37925 # possible to distinguish between a default value and the value being unset.
37926 # If omitted, this color object is to be rendered as a solid color
37927 # (as if the alpha value had been explicitly given with a value of 1.0).
37928 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37929 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37930 },
37931 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
37932 # for simplicity of conversion to/from color representations in various
37933 # languages over compactness; for example, the fields of this representation
37934 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
37935 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
37936 # method in iOS; and, with just a little work, it can be easily formatted into
37937 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
37938 #
37939 # Example (Java):
37940 #
37941 # import com.google.type.Color;
37942 #
37943 # // ...
37944 # public static java.awt.Color fromProto(Color protocolor) {
37945 # float alpha = protocolor.hasAlpha()
37946 # ? protocolor.getAlpha().getValue()
37947 # : 1.0;
37948 #
37949 # return new java.awt.Color(
37950 # protocolor.getRed(),
37951 # protocolor.getGreen(),
37952 # protocolor.getBlue(),
37953 # alpha);
37954 # }
37955 #
37956 # public static Color toProto(java.awt.Color color) {
37957 # float red = (float) color.getRed();
37958 # float green = (float) color.getGreen();
37959 # float blue = (float) color.getBlue();
37960 # float denominator = 255.0;
37961 # Color.Builder resultBuilder =
37962 # Color
37963 # .newBuilder()
37964 # .setRed(red / denominator)
37965 # .setGreen(green / denominator)
37966 # .setBlue(blue / denominator);
37967 # int alpha = color.getAlpha();
37968 # if (alpha != 255) {
37969 # result.setAlpha(
37970 # FloatValue
37971 # .newBuilder()
37972 # .setValue(((float) alpha) / denominator)
37973 # .build());
37974 # }
37975 # return resultBuilder.build();
37976 # }
37977 # // ...
37978 #
37979 # Example (iOS / Obj-C):
37980 #
37981 # // ...
37982 # static UIColor* fromProto(Color* protocolor) {
37983 # float red = [protocolor red];
37984 # float green = [protocolor green];
37985 # float blue = [protocolor blue];
37986 # FloatValue* alpha_wrapper = [protocolor alpha];
37987 # float alpha = 1.0;
37988 # if (alpha_wrapper != nil) {
37989 # alpha = [alpha_wrapper value];
37990 # }
37991 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
37992 # }
37993 #
37994 # static Color* toProto(UIColor* color) {
37995 # CGFloat red, green, blue, alpha;
37996 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
37997 # return nil;
37998 # }
37999 # Color* result = [Color alloc] init];
38000 # [result setRed:red];
38001 # [result setGreen:green];
38002 # [result setBlue:blue];
38003 # if (alpha <= 0.9999) {
38004 # [result setAlpha:floatWrapperWithValue(alpha)];
38005 # }
38006 # [result autorelease];
38007 # return result;
38008 # }
38009 # // ...
38010 #
38011 # Example (JavaScript):
38012 #
38013 # // ...
38014 #
38015 # var protoToCssColor = function(rgb_color) {
38016 # var redFrac = rgb_color.red || 0.0;
38017 # var greenFrac = rgb_color.green || 0.0;
38018 # var blueFrac = rgb_color.blue || 0.0;
38019 # var red = Math.floor(redFrac * 255);
38020 # var green = Math.floor(greenFrac * 255);
38021 # var blue = Math.floor(blueFrac * 255);
38022 #
38023 # if (!('alpha' in rgb_color)) {
38024 # return rgbToCssColor_(red, green, blue);
38025 # }
38026 #
38027 # var alphaFrac = rgb_color.alpha.value || 0.0;
38028 # var rgbParams = [red, green, blue].join(',');
38029 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38030 # };
38031 #
38032 # var rgbToCssColor_ = function(red, green, blue) {
38033 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38034 # var hexString = rgbNumber.toString(16);
38035 # var missingZeros = 6 - hexString.length;
38036 # var resultBuilder = ['#'];
38037 # for (var i = 0; i < missingZeros; i++) {
38038 # resultBuilder.push('0');
38039 # }
38040 # resultBuilder.push(hexString);
38041 # return resultBuilder.join('');
38042 # };
38043 #
38044 # // ...
38045 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38046 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38047 # the final pixel color is defined by the equation:
38048 #
38049 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38050 #
38051 # This means that a value of 1.0 corresponds to a solid color, whereas
38052 # a value of 0.0 corresponds to a completely transparent color. This
38053 # uses a wrapper message rather than a simple float scalar so that it is
38054 # possible to distinguish between a default value and the value being unset.
38055 # If omitted, this color object is to be rendered as a solid color
38056 # (as if the alpha value had been explicitly given with a value of 1.0).
38057 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38058 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38059 },
38060 },
38061 "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
38062 # basis throughout all the rows in the range. At least one of
38063 # row_properties or column_properties must be specified.
38064 # BandedRange.row_properties and BandedRange.column_properties are
38065 # set, the fill colors are applied to cells according to the following rules:
38066 #
38067 # * header_color and footer_color take priority over band colors.
38068 # * first_band_color takes priority over second_band_color.
38069 # * row_properties takes priority over column_properties.
38070 #
38071 # For example, the first row color takes priority over the first column
38072 # color, but the first column color takes priority over the second row color.
38073 # Similarly, the row header takes priority over the column header in the
38074 # top left cell, but the column header takes priority over the first row
38075 # color if the row header is not set.
38076 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
38077 # for simplicity of conversion to/from color representations in various
38078 # languages over compactness; for example, the fields of this representation
38079 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
38080 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
38081 # method in iOS; and, with just a little work, it can be easily formatted into
38082 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
38083 #
38084 # Example (Java):
38085 #
38086 # import com.google.type.Color;
38087 #
38088 # // ...
38089 # public static java.awt.Color fromProto(Color protocolor) {
38090 # float alpha = protocolor.hasAlpha()
38091 # ? protocolor.getAlpha().getValue()
38092 # : 1.0;
38093 #
38094 # return new java.awt.Color(
38095 # protocolor.getRed(),
38096 # protocolor.getGreen(),
38097 # protocolor.getBlue(),
38098 # alpha);
38099 # }
38100 #
38101 # public static Color toProto(java.awt.Color color) {
38102 # float red = (float) color.getRed();
38103 # float green = (float) color.getGreen();
38104 # float blue = (float) color.getBlue();
38105 # float denominator = 255.0;
38106 # Color.Builder resultBuilder =
38107 # Color
38108 # .newBuilder()
38109 # .setRed(red / denominator)
38110 # .setGreen(green / denominator)
38111 # .setBlue(blue / denominator);
38112 # int alpha = color.getAlpha();
38113 # if (alpha != 255) {
38114 # result.setAlpha(
38115 # FloatValue
38116 # .newBuilder()
38117 # .setValue(((float) alpha) / denominator)
38118 # .build());
38119 # }
38120 # return resultBuilder.build();
38121 # }
38122 # // ...
38123 #
38124 # Example (iOS / Obj-C):
38125 #
38126 # // ...
38127 # static UIColor* fromProto(Color* protocolor) {
38128 # float red = [protocolor red];
38129 # float green = [protocolor green];
38130 # float blue = [protocolor blue];
38131 # FloatValue* alpha_wrapper = [protocolor alpha];
38132 # float alpha = 1.0;
38133 # if (alpha_wrapper != nil) {
38134 # alpha = [alpha_wrapper value];
38135 # }
38136 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
38137 # }
38138 #
38139 # static Color* toProto(UIColor* color) {
38140 # CGFloat red, green, blue, alpha;
38141 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
38142 # return nil;
38143 # }
38144 # Color* result = [Color alloc] init];
38145 # [result setRed:red];
38146 # [result setGreen:green];
38147 # [result setBlue:blue];
38148 # if (alpha <= 0.9999) {
38149 # [result setAlpha:floatWrapperWithValue(alpha)];
38150 # }
38151 # [result autorelease];
38152 # return result;
38153 # }
38154 # // ...
38155 #
38156 # Example (JavaScript):
38157 #
38158 # // ...
38159 #
38160 # var protoToCssColor = function(rgb_color) {
38161 # var redFrac = rgb_color.red || 0.0;
38162 # var greenFrac = rgb_color.green || 0.0;
38163 # var blueFrac = rgb_color.blue || 0.0;
38164 # var red = Math.floor(redFrac * 255);
38165 # var green = Math.floor(greenFrac * 255);
38166 # var blue = Math.floor(blueFrac * 255);
38167 #
38168 # if (!('alpha' in rgb_color)) {
38169 # return rgbToCssColor_(red, green, blue);
38170 # }
38171 #
38172 # var alphaFrac = rgb_color.alpha.value || 0.0;
38173 # var rgbParams = [red, green, blue].join(',');
38174 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38175 # };
38176 #
38177 # var rgbToCssColor_ = function(red, green, blue) {
38178 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38179 # var hexString = rgbNumber.toString(16);
38180 # var missingZeros = 6 - hexString.length;
38181 # var resultBuilder = ['#'];
38182 # for (var i = 0; i < missingZeros; i++) {
38183 # resultBuilder.push('0');
38184 # }
38185 # resultBuilder.push(hexString);
38186 # return resultBuilder.join('');
38187 # };
38188 #
38189 # // ...
38190 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38191 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38192 # the final pixel color is defined by the equation:
38193 #
38194 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38195 #
38196 # This means that a value of 1.0 corresponds to a solid color, whereas
38197 # a value of 0.0 corresponds to a completely transparent color. This
38198 # uses a wrapper message rather than a simple float scalar so that it is
38199 # possible to distinguish between a default value and the value being unset.
38200 # If omitted, this color object is to be rendered as a solid color
38201 # (as if the alpha value had been explicitly given with a value of 1.0).
38202 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38203 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38204 },
38205 "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
38206 # row or column will be filled with this color and the colors will
38207 # alternate between first_band_color and second_band_color starting
38208 # from the second row or column. Otherwise, the first row or column will be
38209 # filled with first_band_color and the colors will proceed to alternate
38210 # as they normally would.
38211 # for simplicity of conversion to/from color representations in various
38212 # languages over compactness; for example, the fields of this representation
38213 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
38214 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
38215 # method in iOS; and, with just a little work, it can be easily formatted into
38216 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
38217 #
38218 # Example (Java):
38219 #
38220 # import com.google.type.Color;
38221 #
38222 # // ...
38223 # public static java.awt.Color fromProto(Color protocolor) {
38224 # float alpha = protocolor.hasAlpha()
38225 # ? protocolor.getAlpha().getValue()
38226 # : 1.0;
38227 #
38228 # return new java.awt.Color(
38229 # protocolor.getRed(),
38230 # protocolor.getGreen(),
38231 # protocolor.getBlue(),
38232 # alpha);
38233 # }
38234 #
38235 # public static Color toProto(java.awt.Color color) {
38236 # float red = (float) color.getRed();
38237 # float green = (float) color.getGreen();
38238 # float blue = (float) color.getBlue();
38239 # float denominator = 255.0;
38240 # Color.Builder resultBuilder =
38241 # Color
38242 # .newBuilder()
38243 # .setRed(red / denominator)
38244 # .setGreen(green / denominator)
38245 # .setBlue(blue / denominator);
38246 # int alpha = color.getAlpha();
38247 # if (alpha != 255) {
38248 # result.setAlpha(
38249 # FloatValue
38250 # .newBuilder()
38251 # .setValue(((float) alpha) / denominator)
38252 # .build());
38253 # }
38254 # return resultBuilder.build();
38255 # }
38256 # // ...
38257 #
38258 # Example (iOS / Obj-C):
38259 #
38260 # // ...
38261 # static UIColor* fromProto(Color* protocolor) {
38262 # float red = [protocolor red];
38263 # float green = [protocolor green];
38264 # float blue = [protocolor blue];
38265 # FloatValue* alpha_wrapper = [protocolor alpha];
38266 # float alpha = 1.0;
38267 # if (alpha_wrapper != nil) {
38268 # alpha = [alpha_wrapper value];
38269 # }
38270 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
38271 # }
38272 #
38273 # static Color* toProto(UIColor* color) {
38274 # CGFloat red, green, blue, alpha;
38275 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
38276 # return nil;
38277 # }
38278 # Color* result = [Color alloc] init];
38279 # [result setRed:red];
38280 # [result setGreen:green];
38281 # [result setBlue:blue];
38282 # if (alpha <= 0.9999) {
38283 # [result setAlpha:floatWrapperWithValue(alpha)];
38284 # }
38285 # [result autorelease];
38286 # return result;
38287 # }
38288 # // ...
38289 #
38290 # Example (JavaScript):
38291 #
38292 # // ...
38293 #
38294 # var protoToCssColor = function(rgb_color) {
38295 # var redFrac = rgb_color.red || 0.0;
38296 # var greenFrac = rgb_color.green || 0.0;
38297 # var blueFrac = rgb_color.blue || 0.0;
38298 # var red = Math.floor(redFrac * 255);
38299 # var green = Math.floor(greenFrac * 255);
38300 # var blue = Math.floor(blueFrac * 255);
38301 #
38302 # if (!('alpha' in rgb_color)) {
38303 # return rgbToCssColor_(red, green, blue);
38304 # }
38305 #
38306 # var alphaFrac = rgb_color.alpha.value || 0.0;
38307 # var rgbParams = [red, green, blue].join(',');
38308 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38309 # };
38310 #
38311 # var rgbToCssColor_ = function(red, green, blue) {
38312 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38313 # var hexString = rgbNumber.toString(16);
38314 # var missingZeros = 6 - hexString.length;
38315 # var resultBuilder = ['#'];
38316 # for (var i = 0; i < missingZeros; i++) {
38317 # resultBuilder.push('0');
38318 # }
38319 # resultBuilder.push(hexString);
38320 # return resultBuilder.join('');
38321 # };
38322 #
38323 # // ...
38324 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38325 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38326 # the final pixel color is defined by the equation:
38327 #
38328 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38329 #
38330 # This means that a value of 1.0 corresponds to a solid color, whereas
38331 # a value of 0.0 corresponds to a completely transparent color. This
38332 # uses a wrapper message rather than a simple float scalar so that it is
38333 # possible to distinguish between a default value and the value being unset.
38334 # If omitted, this color object is to be rendered as a solid color
38335 # (as if the alpha value had been explicitly given with a value of 1.0).
38336 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38337 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38338 },
38339 "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
38340 # row or column will be filled with either first_band_color or
38341 # second_band_color, depending on the color of the previous row or
38342 # column.
38343 # for simplicity of conversion to/from color representations in various
38344 # languages over compactness; for example, the fields of this representation
38345 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
38346 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
38347 # method in iOS; and, with just a little work, it can be easily formatted into
38348 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
38349 #
38350 # Example (Java):
38351 #
38352 # import com.google.type.Color;
38353 #
38354 # // ...
38355 # public static java.awt.Color fromProto(Color protocolor) {
38356 # float alpha = protocolor.hasAlpha()
38357 # ? protocolor.getAlpha().getValue()
38358 # : 1.0;
38359 #
38360 # return new java.awt.Color(
38361 # protocolor.getRed(),
38362 # protocolor.getGreen(),
38363 # protocolor.getBlue(),
38364 # alpha);
38365 # }
38366 #
38367 # public static Color toProto(java.awt.Color color) {
38368 # float red = (float) color.getRed();
38369 # float green = (float) color.getGreen();
38370 # float blue = (float) color.getBlue();
38371 # float denominator = 255.0;
38372 # Color.Builder resultBuilder =
38373 # Color
38374 # .newBuilder()
38375 # .setRed(red / denominator)
38376 # .setGreen(green / denominator)
38377 # .setBlue(blue / denominator);
38378 # int alpha = color.getAlpha();
38379 # if (alpha != 255) {
38380 # result.setAlpha(
38381 # FloatValue
38382 # .newBuilder()
38383 # .setValue(((float) alpha) / denominator)
38384 # .build());
38385 # }
38386 # return resultBuilder.build();
38387 # }
38388 # // ...
38389 #
38390 # Example (iOS / Obj-C):
38391 #
38392 # // ...
38393 # static UIColor* fromProto(Color* protocolor) {
38394 # float red = [protocolor red];
38395 # float green = [protocolor green];
38396 # float blue = [protocolor blue];
38397 # FloatValue* alpha_wrapper = [protocolor alpha];
38398 # float alpha = 1.0;
38399 # if (alpha_wrapper != nil) {
38400 # alpha = [alpha_wrapper value];
38401 # }
38402 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
38403 # }
38404 #
38405 # static Color* toProto(UIColor* color) {
38406 # CGFloat red, green, blue, alpha;
38407 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
38408 # return nil;
38409 # }
38410 # Color* result = [Color alloc] init];
38411 # [result setRed:red];
38412 # [result setGreen:green];
38413 # [result setBlue:blue];
38414 # if (alpha <= 0.9999) {
38415 # [result setAlpha:floatWrapperWithValue(alpha)];
38416 # }
38417 # [result autorelease];
38418 # return result;
38419 # }
38420 # // ...
38421 #
38422 # Example (JavaScript):
38423 #
38424 # // ...
38425 #
38426 # var protoToCssColor = function(rgb_color) {
38427 # var redFrac = rgb_color.red || 0.0;
38428 # var greenFrac = rgb_color.green || 0.0;
38429 # var blueFrac = rgb_color.blue || 0.0;
38430 # var red = Math.floor(redFrac * 255);
38431 # var green = Math.floor(greenFrac * 255);
38432 # var blue = Math.floor(blueFrac * 255);
38433 #
38434 # if (!('alpha' in rgb_color)) {
38435 # return rgbToCssColor_(red, green, blue);
38436 # }
38437 #
38438 # var alphaFrac = rgb_color.alpha.value || 0.0;
38439 # var rgbParams = [red, green, blue].join(',');
38440 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38441 # };
38442 #
38443 # var rgbToCssColor_ = function(red, green, blue) {
38444 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38445 # var hexString = rgbNumber.toString(16);
38446 # var missingZeros = 6 - hexString.length;
38447 # var resultBuilder = ['#'];
38448 # for (var i = 0; i < missingZeros; i++) {
38449 # resultBuilder.push('0');
38450 # }
38451 # resultBuilder.push(hexString);
38452 # return resultBuilder.join('');
38453 # };
38454 #
38455 # // ...
38456 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38457 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38458 # the final pixel color is defined by the equation:
38459 #
38460 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38461 #
38462 # This means that a value of 1.0 corresponds to a solid color, whereas
38463 # a value of 0.0 corresponds to a completely transparent color. This
38464 # uses a wrapper message rather than a simple float scalar so that it is
38465 # possible to distinguish between a default value and the value being unset.
38466 # If omitted, this color object is to be rendered as a solid color
38467 # (as if the alpha value had been explicitly given with a value of 1.0).
38468 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38469 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38470 },
38471 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
38472 # for simplicity of conversion to/from color representations in various
38473 # languages over compactness; for example, the fields of this representation
38474 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
38475 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
38476 # method in iOS; and, with just a little work, it can be easily formatted into
38477 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
38478 #
38479 # Example (Java):
38480 #
38481 # import com.google.type.Color;
38482 #
38483 # // ...
38484 # public static java.awt.Color fromProto(Color protocolor) {
38485 # float alpha = protocolor.hasAlpha()
38486 # ? protocolor.getAlpha().getValue()
38487 # : 1.0;
38488 #
38489 # return new java.awt.Color(
38490 # protocolor.getRed(),
38491 # protocolor.getGreen(),
38492 # protocolor.getBlue(),
38493 # alpha);
38494 # }
38495 #
38496 # public static Color toProto(java.awt.Color color) {
38497 # float red = (float) color.getRed();
38498 # float green = (float) color.getGreen();
38499 # float blue = (float) color.getBlue();
38500 # float denominator = 255.0;
38501 # Color.Builder resultBuilder =
38502 # Color
38503 # .newBuilder()
38504 # .setRed(red / denominator)
38505 # .setGreen(green / denominator)
38506 # .setBlue(blue / denominator);
38507 # int alpha = color.getAlpha();
38508 # if (alpha != 255) {
38509 # result.setAlpha(
38510 # FloatValue
38511 # .newBuilder()
38512 # .setValue(((float) alpha) / denominator)
38513 # .build());
38514 # }
38515 # return resultBuilder.build();
38516 # }
38517 # // ...
38518 #
38519 # Example (iOS / Obj-C):
38520 #
38521 # // ...
38522 # static UIColor* fromProto(Color* protocolor) {
38523 # float red = [protocolor red];
38524 # float green = [protocolor green];
38525 # float blue = [protocolor blue];
38526 # FloatValue* alpha_wrapper = [protocolor alpha];
38527 # float alpha = 1.0;
38528 # if (alpha_wrapper != nil) {
38529 # alpha = [alpha_wrapper value];
38530 # }
38531 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
38532 # }
38533 #
38534 # static Color* toProto(UIColor* color) {
38535 # CGFloat red, green, blue, alpha;
38536 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
38537 # return nil;
38538 # }
38539 # Color* result = [Color alloc] init];
38540 # [result setRed:red];
38541 # [result setGreen:green];
38542 # [result setBlue:blue];
38543 # if (alpha <= 0.9999) {
38544 # [result setAlpha:floatWrapperWithValue(alpha)];
38545 # }
38546 # [result autorelease];
38547 # return result;
38548 # }
38549 # // ...
38550 #
38551 # Example (JavaScript):
38552 #
38553 # // ...
38554 #
38555 # var protoToCssColor = function(rgb_color) {
38556 # var redFrac = rgb_color.red || 0.0;
38557 # var greenFrac = rgb_color.green || 0.0;
38558 # var blueFrac = rgb_color.blue || 0.0;
38559 # var red = Math.floor(redFrac * 255);
38560 # var green = Math.floor(greenFrac * 255);
38561 # var blue = Math.floor(blueFrac * 255);
38562 #
38563 # if (!('alpha' in rgb_color)) {
38564 # return rgbToCssColor_(red, green, blue);
38565 # }
38566 #
38567 # var alphaFrac = rgb_color.alpha.value || 0.0;
38568 # var rgbParams = [red, green, blue].join(',');
38569 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
38570 # };
38571 #
38572 # var rgbToCssColor_ = function(red, green, blue) {
38573 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
38574 # var hexString = rgbNumber.toString(16);
38575 # var missingZeros = 6 - hexString.length;
38576 # var resultBuilder = ['#'];
38577 # for (var i = 0; i < missingZeros; i++) {
38578 # resultBuilder.push('0');
38579 # }
38580 # resultBuilder.push(hexString);
38581 # return resultBuilder.join('');
38582 # };
38583 #
38584 # // ...
38585 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
38586 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
38587 # the final pixel color is defined by the equation:
38588 #
38589 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
38590 #
38591 # This means that a value of 1.0 corresponds to a solid color, whereas
38592 # a value of 0.0 corresponds to a completely transparent color. This
38593 # uses a wrapper message rather than a simple float scalar so that it is
38594 # possible to distinguish between a default value and the value being unset.
38595 # If omitted, this color object is to be rendered as a solid color
38596 # (as if the alpha value had been explicitly given with a value of 1.0).
38597 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
38598 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
38599 },
38600 },
38601 "bandedRangeId": 42, # The id of the banded range.
38602 },
38603 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038604 "merges": [ # The ranges that are merged together.
38605 { # A range on a sheet.
38606 # All indexes are zero-based.
38607 # Indexes are half open, e.g the start index is inclusive
38608 # and the end index is exclusive -- [start_index, end_index).
38609 # Missing indexes indicate the range is unbounded on that side.
38610 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038611 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038612 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038613 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038614 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038615 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038616 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038617 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038618 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038619 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038620 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038621 # `Sheet1!A:B == sheet_id: 0,
38622 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038623 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038624 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038625 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038626 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038627 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038628 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038629 #
38630 # The start index must always be less than or equal to the end index.
38631 # If the start index equals the end index, then the range is empty.
38632 # Empty ranges are typically not meaningful and are usually rendered in the
38633 # UI as `#REF!`.
38634 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038635 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038636 "sheetId": 42, # The sheet this range is on.
38637 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038638 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038639 },
38640 ],
38641 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
38642 "range": { # A range on a sheet. # The range the filter covers.
38643 # All indexes are zero-based.
38644 # Indexes are half open, e.g the start index is inclusive
38645 # and the end index is exclusive -- [start_index, end_index).
38646 # Missing indexes indicate the range is unbounded on that side.
38647 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038648 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038649 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038650 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038651 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038652 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038653 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038654 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038655 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038656 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038657 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038658 # `Sheet1!A:B == sheet_id: 0,
38659 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038660 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038661 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038662 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038663 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038664 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038665 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038666 #
38667 # The start index must always be less than or equal to the end index.
38668 # If the start index equals the end index, then the range is empty.
38669 # Empty ranges are typically not meaningful and are usually rendered in the
38670 # UI as `#REF!`.
38671 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038672 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038673 "sheetId": 42, # The sheet this range is on.
38674 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038675 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038676 },
38677 "sortSpecs": [ # The sort order per column. Later specifications are used when values
38678 # are equal in the earlier specifications.
38679 { # A sort order associated with a specific column or row.
38680 "sortOrder": "A String", # The order data should be sorted.
38681 "dimensionIndex": 42, # The dimension the sort should be applied to.
38682 },
38683 ],
38684 "criteria": { # The criteria for showing/hiding values per column.
38685 # The map's key is the column index, and the value is the criteria for
38686 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038687 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038688 "hiddenValues": [ # Values that should be hidden.
38689 "A String",
38690 ],
38691 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
38692 # (This does not override hiddenValues -- if a value is listed there,
38693 # it will still be hidden.)
38694 # BooleanConditions are used by conditional formatting,
38695 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038696 "values": [ # The values of the condition. The number of supported values depends
38697 # on the condition type. Some support zero values,
38698 # others one or two values,
38699 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
38700 { # The value of the condition.
38701 "relativeDate": "A String", # A relative date (based on the current date).
38702 # Valid only if the type is
38703 # DATE_BEFORE,
38704 # DATE_AFTER,
38705 # DATE_ON_OR_BEFORE or
38706 # DATE_ON_OR_AFTER.
38707 #
38708 # Relative dates are not supported in data validation.
38709 # They are supported only in conditional formatting and
38710 # conditional filters.
38711 "userEnteredValue": "A String", # A value the condition is based on.
38712 # The value will be parsed as if the user typed into a cell.
38713 # Formulas are supported (and must begin with an `=`).
38714 },
38715 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038716 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038717 },
38718 },
38719 },
38720 },
38721 "charts": [ # The specifications of every chart on this sheet.
38722 { # A chart embedded in a sheet.
38723 "chartId": 42, # The ID of the chart.
38724 "position": { # The position of an embedded object such as a chart. # The position of the chart.
38725 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
38726 # is chosen for you. Used only when writing.
38727 "sheetId": 42, # The sheet this is on. Set only if the embedded object
38728 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038729 "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 -070038730 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
38731 # All indexes are zero-based.
38732 "rowIndex": 42, # The row index of the coordinate.
38733 "columnIndex": 42, # The column index of the coordinate.
38734 "sheetId": 42, # The sheet this coordinate is on.
38735 },
38736 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
38737 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070038738 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038739 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
38740 # from the anchor cell.
38741 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
38742 },
38743 },
38744 "spec": { # The specifications of a chart. # The specification of the chart.
38745 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038746 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
38747 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
38748 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38749 "sources": [ # The ranges of data for a series or domain.
38750 # Exactly one dimension must have a length of 1,
38751 # and all sources in the list must have the same dimension
38752 # with length 1.
38753 # The domain (if it exists) & all series must have the same number
38754 # of source ranges. If using more than one source range, then the source
38755 # range at a given offset must be contiguous across the domain and series.
38756 #
38757 # For example, these are valid configurations:
38758 #
38759 # domain sources: A1:A5
38760 # series1 sources: B1:B5
38761 # series2 sources: D6:D10
38762 #
38763 # domain sources: A1:A5, C10:C12
38764 # series1 sources: B1:B5, D10:D12
38765 # series2 sources: C1:C5, E10:E12
38766 { # A range on a sheet.
38767 # All indexes are zero-based.
38768 # Indexes are half open, e.g the start index is inclusive
38769 # and the end index is exclusive -- [start_index, end_index).
38770 # Missing indexes indicate the range is unbounded on that side.
38771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038772 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038773 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038774 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038775 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038776 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038777 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038778 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038779 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038780 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038781 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038782 # `Sheet1!A:B == sheet_id: 0,
38783 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038784 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038785 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038786 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038787 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038788 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038789 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038790 #
38791 # The start index must always be less than or equal to the end index.
38792 # If the start index equals the end index, then the range is empty.
38793 # Empty ranges are typically not meaningful and are usually rendered in the
38794 # UI as `#REF!`.
38795 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038796 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038797 "sheetId": 42, # The sheet this range is on.
38798 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038799 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038800 },
38801 ],
38802 },
38803 },
38804 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
38805 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38806 "sources": [ # The ranges of data for a series or domain.
38807 # Exactly one dimension must have a length of 1,
38808 # and all sources in the list must have the same dimension
38809 # with length 1.
38810 # The domain (if it exists) & all series must have the same number
38811 # of source ranges. If using more than one source range, then the source
38812 # range at a given offset must be contiguous across the domain and series.
38813 #
38814 # For example, these are valid configurations:
38815 #
38816 # domain sources: A1:A5
38817 # series1 sources: B1:B5
38818 # series2 sources: D6:D10
38819 #
38820 # domain sources: A1:A5, C10:C12
38821 # series1 sources: B1:B5, D10:D12
38822 # series2 sources: C1:C5, E10:E12
38823 { # A range on a sheet.
38824 # All indexes are zero-based.
38825 # Indexes are half open, e.g the start index is inclusive
38826 # and the end index is exclusive -- [start_index, end_index).
38827 # Missing indexes indicate the range is unbounded on that side.
38828 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038829 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038830 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038831 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038832 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038833 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038834 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038835 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038836 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038837 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038838 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038839 # `Sheet1!A:B == sheet_id: 0,
38840 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038841 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038842 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038843 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038844 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038845 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038846 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038847 #
38848 # The start index must always be less than or equal to the end index.
38849 # If the start index equals the end index, then the range is empty.
38850 # Empty ranges are typically not meaningful and are usually rendered in the
38851 # UI as `#REF!`.
38852 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038853 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038854 "sheetId": 42, # The sheet this range is on.
38855 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038856 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038857 },
38858 ],
38859 },
38860 },
38861 "threeDimensional": True or False, # True if the pie is three dimensional.
38862 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
38863 "pieHole": 3.14, # The size of the hole in the pie chart.
38864 },
38865 "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 -070038866 # See BasicChartType for the list of all
38867 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038868 # of charts this supports.
38869 "headerCount": 42, # The number of rows or columns in the data that are "headers".
38870 # If not set, Google Sheets will guess how many rows are headers based
38871 # on the data.
38872 #
38873 # (Note that BasicChartAxis.title may override the axis title
38874 # inferred from the header values.)
38875 "series": [ # The data this chart is visualizing.
38876 { # A single series of data in a chart.
38877 # For example, if charting stock prices over time, multiple series may exist,
38878 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
38879 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
38880 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38881 "sources": [ # The ranges of data for a series or domain.
38882 # Exactly one dimension must have a length of 1,
38883 # and all sources in the list must have the same dimension
38884 # with length 1.
38885 # The domain (if it exists) & all series must have the same number
38886 # of source ranges. If using more than one source range, then the source
38887 # range at a given offset must be contiguous across the domain and series.
38888 #
38889 # For example, these are valid configurations:
38890 #
38891 # domain sources: A1:A5
38892 # series1 sources: B1:B5
38893 # series2 sources: D6:D10
38894 #
38895 # domain sources: A1:A5, C10:C12
38896 # series1 sources: B1:B5, D10:D12
38897 # series2 sources: C1:C5, E10:E12
38898 { # A range on a sheet.
38899 # All indexes are zero-based.
38900 # Indexes are half open, e.g the start index is inclusive
38901 # and the end index is exclusive -- [start_index, end_index).
38902 # Missing indexes indicate the range is unbounded on that side.
38903 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038904 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038905 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038906 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038907 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038908 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038909 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038910 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038911 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038912 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038913 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038914 # `Sheet1!A:B == sheet_id: 0,
38915 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038916 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038917 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038918 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038919 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038920 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038921 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038922 #
38923 # The start index must always be less than or equal to the end index.
38924 # If the start index equals the end index, then the range is empty.
38925 # Empty ranges are typically not meaningful and are usually rendered in the
38926 # UI as `#REF!`.
38927 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038928 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038929 "sheetId": 42, # The sheet this range is on.
38930 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070038931 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038932 },
38933 ],
38934 },
38935 },
38936 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
38937 # For example, if charting stocks over time, the "Volume" series
38938 # may want to be pinned to the right with the prices pinned to the left,
38939 # because the scale of trading volume is different than the scale of
38940 # prices.
38941 # It is an error to specify an axis that isn't a valid minor axis
38942 # for the chart's type.
38943 "type": "A String", # The type of this series. Valid only if the
38944 # chartType is
38945 # COMBO.
38946 # Different types will change the way the series is visualized.
38947 # Only LINE, AREA,
38948 # and COLUMN are supported.
38949 },
38950 ],
38951 "legendPosition": "A String", # The position of the chart legend.
38952 "domains": [ # The domain of data this is charting.
38953 # Only a single domain is currently supported.
38954 { # The domain of a chart.
38955 # For example, if charting stock prices over time, this would be the date.
38956 "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 -070038957 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038958 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
38959 "sources": [ # The ranges of data for a series or domain.
38960 # Exactly one dimension must have a length of 1,
38961 # and all sources in the list must have the same dimension
38962 # with length 1.
38963 # The domain (if it exists) & all series must have the same number
38964 # of source ranges. If using more than one source range, then the source
38965 # range at a given offset must be contiguous across the domain and series.
38966 #
38967 # For example, these are valid configurations:
38968 #
38969 # domain sources: A1:A5
38970 # series1 sources: B1:B5
38971 # series2 sources: D6:D10
38972 #
38973 # domain sources: A1:A5, C10:C12
38974 # series1 sources: B1:B5, D10:D12
38975 # series2 sources: C1:C5, E10:E12
38976 { # A range on a sheet.
38977 # All indexes are zero-based.
38978 # Indexes are half open, e.g the start index is inclusive
38979 # and the end index is exclusive -- [start_index, end_index).
38980 # Missing indexes indicate the range is unbounded on that side.
38981 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038982 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038983 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038984 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038985 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038986 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038987 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038988 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038989 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038990 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038991 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038992 # `Sheet1!A:B == sheet_id: 0,
38993 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038995 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038996 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038997 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070038999 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039000 #
39001 # The start index must always be less than or equal to the end index.
39002 # If the start index equals the end index, then the range is empty.
39003 # Empty ranges are typically not meaningful and are usually rendered in the
39004 # UI as `#REF!`.
39005 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039006 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039007 "sheetId": 42, # The sheet this range is on.
39008 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039009 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039010 },
39011 ],
39012 },
39013 },
39014 },
39015 ],
39016 "chartType": "A String", # The type of the chart.
39017 "axis": [ # The axis on the chart.
39018 { # An axis of the chart.
39019 # A chart may not have more than one axis per
39020 # axis position.
39021 "position": "A String", # The position of this axis.
39022 "format": { # The format of a run of text in a cell. # The format of the title.
39023 # Only valid if the axis is not associated with the domain.
39024 # Absent values indicate that the field isn't specified.
39025 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39026 # for simplicity of conversion to/from color representations in various
39027 # languages over compactness; for example, the fields of this representation
39028 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39029 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39030 # method in iOS; and, with just a little work, it can be easily formatted into
39031 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39032 #
39033 # Example (Java):
39034 #
39035 # import com.google.type.Color;
39036 #
39037 # // ...
39038 # public static java.awt.Color fromProto(Color protocolor) {
39039 # float alpha = protocolor.hasAlpha()
39040 # ? protocolor.getAlpha().getValue()
39041 # : 1.0;
39042 #
39043 # return new java.awt.Color(
39044 # protocolor.getRed(),
39045 # protocolor.getGreen(),
39046 # protocolor.getBlue(),
39047 # alpha);
39048 # }
39049 #
39050 # public static Color toProto(java.awt.Color color) {
39051 # float red = (float) color.getRed();
39052 # float green = (float) color.getGreen();
39053 # float blue = (float) color.getBlue();
39054 # float denominator = 255.0;
39055 # Color.Builder resultBuilder =
39056 # Color
39057 # .newBuilder()
39058 # .setRed(red / denominator)
39059 # .setGreen(green / denominator)
39060 # .setBlue(blue / denominator);
39061 # int alpha = color.getAlpha();
39062 # if (alpha != 255) {
39063 # result.setAlpha(
39064 # FloatValue
39065 # .newBuilder()
39066 # .setValue(((float) alpha) / denominator)
39067 # .build());
39068 # }
39069 # return resultBuilder.build();
39070 # }
39071 # // ...
39072 #
39073 # Example (iOS / Obj-C):
39074 #
39075 # // ...
39076 # static UIColor* fromProto(Color* protocolor) {
39077 # float red = [protocolor red];
39078 # float green = [protocolor green];
39079 # float blue = [protocolor blue];
39080 # FloatValue* alpha_wrapper = [protocolor alpha];
39081 # float alpha = 1.0;
39082 # if (alpha_wrapper != nil) {
39083 # alpha = [alpha_wrapper value];
39084 # }
39085 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39086 # }
39087 #
39088 # static Color* toProto(UIColor* color) {
39089 # CGFloat red, green, blue, alpha;
39090 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39091 # return nil;
39092 # }
39093 # Color* result = [Color alloc] init];
39094 # [result setRed:red];
39095 # [result setGreen:green];
39096 # [result setBlue:blue];
39097 # if (alpha <= 0.9999) {
39098 # [result setAlpha:floatWrapperWithValue(alpha)];
39099 # }
39100 # [result autorelease];
39101 # return result;
39102 # }
39103 # // ...
39104 #
39105 # Example (JavaScript):
39106 #
39107 # // ...
39108 #
39109 # var protoToCssColor = function(rgb_color) {
39110 # var redFrac = rgb_color.red || 0.0;
39111 # var greenFrac = rgb_color.green || 0.0;
39112 # var blueFrac = rgb_color.blue || 0.0;
39113 # var red = Math.floor(redFrac * 255);
39114 # var green = Math.floor(greenFrac * 255);
39115 # var blue = Math.floor(blueFrac * 255);
39116 #
39117 # if (!('alpha' in rgb_color)) {
39118 # return rgbToCssColor_(red, green, blue);
39119 # }
39120 #
39121 # var alphaFrac = rgb_color.alpha.value || 0.0;
39122 # var rgbParams = [red, green, blue].join(',');
39123 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39124 # };
39125 #
39126 # var rgbToCssColor_ = function(red, green, blue) {
39127 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39128 # var hexString = rgbNumber.toString(16);
39129 # var missingZeros = 6 - hexString.length;
39130 # var resultBuilder = ['#'];
39131 # for (var i = 0; i < missingZeros; i++) {
39132 # resultBuilder.push('0');
39133 # }
39134 # resultBuilder.push(hexString);
39135 # return resultBuilder.join('');
39136 # };
39137 #
39138 # // ...
39139 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39140 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39141 # the final pixel color is defined by the equation:
39142 #
39143 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39144 #
39145 # This means that a value of 1.0 corresponds to a solid color, whereas
39146 # a value of 0.0 corresponds to a completely transparent color. This
39147 # uses a wrapper message rather than a simple float scalar so that it is
39148 # possible to distinguish between a default value and the value being unset.
39149 # If omitted, this color object is to be rendered as a solid color
39150 # (as if the alpha value had been explicitly given with a value of 1.0).
39151 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39152 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39153 },
39154 "bold": True or False, # True if the text is bold.
39155 "strikethrough": True or False, # True if the text has a strikethrough.
39156 "fontFamily": "A String", # The font family.
39157 "fontSize": 42, # The size of the font.
39158 "italic": True or False, # True if the text is italicized.
39159 "underline": True or False, # True if the text is underlined.
39160 },
Thomas Coffee2f245372017-03-27 10:39:26 -070039161 "title": "A String", # The title of this axis. If set, this overrides any title inferred
39162 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039163 },
39164 ],
39165 },
39166 "title": "A String", # The title of the chart.
39167 },
39168 },
39169 ],
39170 "filterViews": [ # The filter views in this sheet.
39171 { # A filter view.
39172 "title": "A String", # The name of the filter view.
39173 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
39174 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039175 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039176 # may be set.
39177 "filterViewId": 42, # The ID of the filter view.
39178 "range": { # A range on a sheet. # The range this filter view covers.
39179 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039180 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039181 # may be set.
39182 # All indexes are zero-based.
39183 # Indexes are half open, e.g the start index is inclusive
39184 # and the end index is exclusive -- [start_index, end_index).
39185 # Missing indexes indicate the range is unbounded on that side.
39186 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039187 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039188 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039189 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039190 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039191 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039192 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039193 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039194 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039195 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039196 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039197 # `Sheet1!A:B == sheet_id: 0,
39198 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039199 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039200 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039201 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039202 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039203 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039204 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039205 #
39206 # The start index must always be less than or equal to the end index.
39207 # If the start index equals the end index, then the range is empty.
39208 # Empty ranges are typically not meaningful and are usually rendered in the
39209 # UI as `#REF!`.
39210 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039211 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039212 "sheetId": 42, # The sheet this range is on.
39213 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039214 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039215 },
39216 "sortSpecs": [ # The sort order per column. Later specifications are used when values
39217 # are equal in the earlier specifications.
39218 { # A sort order associated with a specific column or row.
39219 "sortOrder": "A String", # The order data should be sorted.
39220 "dimensionIndex": 42, # The dimension the sort should be applied to.
39221 },
39222 ],
39223 "criteria": { # The criteria for showing/hiding values per column.
39224 # The map's key is the column index, and the value is the criteria for
39225 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039226 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039227 "hiddenValues": [ # Values that should be hidden.
39228 "A String",
39229 ],
39230 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
39231 # (This does not override hiddenValues -- if a value is listed there,
39232 # it will still be hidden.)
39233 # BooleanConditions are used by conditional formatting,
39234 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039235 "values": [ # The values of the condition. The number of supported values depends
39236 # on the condition type. Some support zero values,
39237 # others one or two values,
39238 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
39239 { # The value of the condition.
39240 "relativeDate": "A String", # A relative date (based on the current date).
39241 # Valid only if the type is
39242 # DATE_BEFORE,
39243 # DATE_AFTER,
39244 # DATE_ON_OR_BEFORE or
39245 # DATE_ON_OR_AFTER.
39246 #
39247 # Relative dates are not supported in data validation.
39248 # They are supported only in conditional formatting and
39249 # conditional filters.
39250 "userEnteredValue": "A String", # A value the condition is based on.
39251 # The value will be parsed as if the user typed into a cell.
39252 # Formulas are supported (and must begin with an `=`).
39253 },
39254 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039255 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039256 },
39257 },
39258 },
39259 },
39260 ],
39261 "protectedRanges": [ # The protected ranges in this sheet.
39262 { # A protected range.
39263 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
39264 # Unprotected ranges are only supported on protected sheets.
39265 { # A range on a sheet.
39266 # All indexes are zero-based.
39267 # Indexes are half open, e.g the start index is inclusive
39268 # and the end index is exclusive -- [start_index, end_index).
39269 # Missing indexes indicate the range is unbounded on that side.
39270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039271 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039272 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039273 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039274 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039275 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039276 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039277 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039278 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039279 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039280 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039281 # `Sheet1!A:B == sheet_id: 0,
39282 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039283 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039284 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039285 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039286 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039287 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039288 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039289 #
39290 # The start index must always be less than or equal to the end index.
39291 # If the start index equals the end index, then the range is empty.
39292 # Empty ranges are typically not meaningful and are usually rendered in the
39293 # UI as `#REF!`.
39294 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039295 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039296 "sheetId": 42, # The sheet this range is on.
39297 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039298 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039299 },
39300 ],
39301 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
39302 # protected area.
39303 # This field is read-only.
39304 "description": "A String", # The description of this protected range.
39305 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
39306 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039307 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039308 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039309 "range": { # A range on a sheet. # The range that is being protected.
39310 # The range may be fully unbounded, in which case this is considered
39311 # a protected sheet.
39312 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039313 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039314 # may be set.
39315 # All indexes are zero-based.
39316 # Indexes are half open, e.g the start index is inclusive
39317 # and the end index is exclusive -- [start_index, end_index).
39318 # Missing indexes indicate the range is unbounded on that side.
39319 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039320 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039321 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039322 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039323 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039324 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039325 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039326 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039327 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039328 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039329 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039330 # `Sheet1!A:B == sheet_id: 0,
39331 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039332 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039333 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039334 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039335 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039336 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039337 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039338 #
39339 # The start index must always be less than or equal to the end index.
39340 # If the start index equals the end index, then the range is empty.
39341 # Empty ranges are typically not meaningful and are usually rendered in the
39342 # UI as `#REF!`.
39343 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039344 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039345 "sheetId": 42, # The sheet this range is on.
39346 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039347 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039348 },
Thomas Coffee2f245372017-03-27 10:39:26 -070039349 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
39350 # This field is only visible to users with edit access to the protected
39351 # range and the document.
39352 # Editors are not supported with warning_only protection.
39353 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
39354 # range. Domain protection is only supported on documents within a domain.
39355 "users": [ # The email addresses of users with edit access to the protected range.
39356 "A String",
39357 ],
39358 "groups": [ # The email addresses of groups with edit access to the protected range.
39359 "A String",
39360 ],
39361 },
39362 "protectedRangeId": 42, # The ID of the protected range.
39363 # This field is read-only.
39364 "warningOnly": True or False, # True if this protected range will show a warning when editing.
39365 # Warning-based protection means that every user can edit data in the
39366 # protected range, except editing will prompt a warning asking the user
39367 # to confirm the edit.
39368 #
39369 # When writing: if this field is true, then editors is ignored.
39370 # Additionally, if this field is changed from true to false and the
39371 # `editors` field is not set (nor included in the field mask), then
39372 # the editors will be set to all the editors in the document.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039373 },
39374 ],
39375 "data": [ # Data in the grid, if this is a grid sheet.
39376 # The number of GridData objects returned is dependent on the number of
39377 # ranges requested on this sheet. For example, if this is representing
39378 # `Sheet1`, and the spreadsheet was requested with ranges
39379 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
39380 # startRow/startColumn of `0`,
39381 # while the second one will have `startRow 14` (zero-based row 15),
39382 # and `startColumn 3` (zero-based column D).
39383 { # Data in the grid, as well as metadata about the dimensions.
Thomas Coffee2f245372017-03-27 10:39:26 -070039384 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
39385 # in start_row.
39386 { # Properties about a dimension.
39387 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
39388 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
39389 "hiddenByFilter": True or False, # True if this dimension is being filtered.
39390 # This field is read-only.
39391 },
39392 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -070039393 "startColumn": 42, # The first column this GridData refers to, zero-based.
39394 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
39395 # in start_column.
39396 { # Properties about a dimension.
39397 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
39398 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
39399 "hiddenByFilter": True or False, # True if this dimension is being filtered.
39400 # This field is read-only.
39401 },
39402 ],
Thomas Coffee2f245372017-03-27 10:39:26 -070039403 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039404 "rowData": [ # The data in the grid, one entry per row,
39405 # starting with the row in startRow.
39406 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039407 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039408 { # Data about each cell in a row.
39409 "values": [ # The values in the row, one per column.
39410 { # Data about a specific cell.
39411 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
39412 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039413 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039414 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039415 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039416 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
39417 # or vertically (as rows).
39418 "rows": [ # Each row grouping in the pivot table.
39419 { # A single grouping (either row or column) in a pivot table.
39420 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
39421 "valueMetadata": [ # Metadata about values in the grouping.
39422 { # Metadata about a value in a pivot grouping.
39423 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
39424 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
39425 # (Note that formulaValue is not valid,
39426 # because the values will be calculated.)
39427 "numberValue": 3.14, # Represents a double value.
39428 # Note: Dates, Times and DateTimes are represented as doubles in
39429 # "serial number" format.
39430 "boolValue": True or False, # Represents a boolean value.
39431 "formulaValue": "A String", # Represents a formula.
39432 "stringValue": "A String", # Represents a string value.
39433 # Leading single quotes are not included. For example, if the user typed
39434 # `'123` into the UI, this would be represented as a `stringValue` of
39435 # `"123"`.
39436 "errorValue": { # An error in a cell. # Represents an error.
39437 # This field is read-only.
39438 "message": "A String", # A message with more information about the error
39439 # (in the spreadsheet's locale).
39440 "type": "A String", # The type of error.
39441 },
39442 },
39443 },
39444 ],
39445 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
39446 # If not specified, sorting is alphabetical by this group's values.
39447 "buckets": [ # Determines the bucket from which values are chosen to sort.
39448 #
39449 # For example, in a pivot table with one row group & two column groups,
39450 # the row group can list up to two values. The first value corresponds
39451 # to a value within the first column group, and the second value
39452 # corresponds to a value in the second column group. If no values
39453 # are listed, this would indicate that the row should be sorted according
39454 # to the "Grand Total" over the column groups. If a single value is listed,
39455 # this would correspond to using the "Total" of that bucket.
39456 { # The kinds of value that a cell in a spreadsheet can have.
39457 "numberValue": 3.14, # Represents a double value.
39458 # Note: Dates, Times and DateTimes are represented as doubles in
39459 # "serial number" format.
39460 "boolValue": True or False, # Represents a boolean value.
39461 "formulaValue": "A String", # Represents a formula.
39462 "stringValue": "A String", # Represents a string value.
39463 # Leading single quotes are not included. For example, if the user typed
39464 # `'123` into the UI, this would be represented as a `stringValue` of
39465 # `"123"`.
39466 "errorValue": { # An error in a cell. # Represents an error.
39467 # This field is read-only.
39468 "message": "A String", # A message with more information about the error
39469 # (in the spreadsheet's locale).
39470 "type": "A String", # The type of error.
39471 },
39472 },
39473 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039474 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039475 # grouping should be sorted by.
39476 },
39477 "sortOrder": "A String", # The order the values in this group should be sorted.
39478 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
39479 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039480 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039481 # means this group refers to column `C`, whereas the offset `1` would refer
39482 # to column `D`.
39483 },
39484 ],
39485 "source": { # A range on a sheet. # The range the pivot table is reading data from.
39486 # All indexes are zero-based.
39487 # Indexes are half open, e.g the start index is inclusive
39488 # and the end index is exclusive -- [start_index, end_index).
39489 # Missing indexes indicate the range is unbounded on that side.
39490 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039491 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039492 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039493 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039494 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039495 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039496 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039497 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039498 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039499 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039500 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039501 # `Sheet1!A:B == sheet_id: 0,
39502 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039503 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039504 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039505 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039506 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039507 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039508 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039509 #
39510 # The start index must always be less than or equal to the end index.
39511 # If the start index equals the end index, then the range is empty.
39512 # Empty ranges are typically not meaningful and are usually rendered in the
39513 # UI as `#REF!`.
39514 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039515 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039516 "sheetId": 42, # The sheet this range is on.
39517 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070039518 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039519 },
39520 "values": [ # A list of values to include in the pivot table.
39521 { # The definition of how a value in a pivot table should be calculated.
39522 "formula": "A String", # A custom formula to calculate the value. The formula must start
39523 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -070039524 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
39525 #
39526 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
39527 # means this value refers to column `C`, whereas the offset `1` would
39528 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039529 "summarizeFunction": "A String", # A function to summarize the value.
39530 # If formula is set, the only supported values are
39531 # SUM and
39532 # CUSTOM.
39533 # If sourceColumnOffset is set, then `CUSTOM`
39534 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039535 "name": "A String", # A name to use for the value. This is only used if formula was set.
39536 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039537 },
39538 ],
39539 "criteria": { # An optional mapping of filters per source column offset.
39540 #
39541 # The filters will be applied before aggregating data into the pivot table.
39542 # The map's key is the column offset of the source range that you want to
39543 # filter, and the value is the criteria for that column.
39544 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039545 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039546 # for column `C`, whereas the key `1` is for column `D`.
39547 "a_key": { # Criteria for showing/hiding rows in a pivot table.
39548 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
39549 "A String",
39550 ],
39551 },
39552 },
39553 "columns": [ # Each column grouping in the pivot table.
39554 { # A single grouping (either row or column) in a pivot table.
39555 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
39556 "valueMetadata": [ # Metadata about values in the grouping.
39557 { # Metadata about a value in a pivot grouping.
39558 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
39559 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
39560 # (Note that formulaValue is not valid,
39561 # because the values will be calculated.)
39562 "numberValue": 3.14, # Represents a double value.
39563 # Note: Dates, Times and DateTimes are represented as doubles in
39564 # "serial number" format.
39565 "boolValue": True or False, # Represents a boolean value.
39566 "formulaValue": "A String", # Represents a formula.
39567 "stringValue": "A String", # Represents a string value.
39568 # Leading single quotes are not included. For example, if the user typed
39569 # `'123` into the UI, this would be represented as a `stringValue` of
39570 # `"123"`.
39571 "errorValue": { # An error in a cell. # Represents an error.
39572 # This field is read-only.
39573 "message": "A String", # A message with more information about the error
39574 # (in the spreadsheet's locale).
39575 "type": "A String", # The type of error.
39576 },
39577 },
39578 },
39579 ],
39580 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
39581 # If not specified, sorting is alphabetical by this group's values.
39582 "buckets": [ # Determines the bucket from which values are chosen to sort.
39583 #
39584 # For example, in a pivot table with one row group & two column groups,
39585 # the row group can list up to two values. The first value corresponds
39586 # to a value within the first column group, and the second value
39587 # corresponds to a value in the second column group. If no values
39588 # are listed, this would indicate that the row should be sorted according
39589 # to the "Grand Total" over the column groups. If a single value is listed,
39590 # this would correspond to using the "Total" of that bucket.
39591 { # The kinds of value that a cell in a spreadsheet can have.
39592 "numberValue": 3.14, # Represents a double value.
39593 # Note: Dates, Times and DateTimes are represented as doubles in
39594 # "serial number" format.
39595 "boolValue": True or False, # Represents a boolean value.
39596 "formulaValue": "A String", # Represents a formula.
39597 "stringValue": "A String", # Represents a string value.
39598 # Leading single quotes are not included. For example, if the user typed
39599 # `'123` into the UI, this would be represented as a `stringValue` of
39600 # `"123"`.
39601 "errorValue": { # An error in a cell. # Represents an error.
39602 # This field is read-only.
39603 "message": "A String", # A message with more information about the error
39604 # (in the spreadsheet's locale).
39605 "type": "A String", # The type of error.
39606 },
39607 },
39608 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039609 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039610 # grouping should be sorted by.
39611 },
39612 "sortOrder": "A String", # The order the values in this group should be sorted.
39613 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
39614 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039615 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039616 # means this group refers to column `C`, whereas the offset `1` would refer
39617 # to column `D`.
39618 },
39619 ],
39620 },
39621 "hyperlink": "A String", # A hyperlink this cell points to, if any.
39622 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
39623 "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
39624 # the calculated value. For cells with literals, this will be
39625 # the same as the user_entered_value.
39626 # This field is read-only.
39627 "numberValue": 3.14, # Represents a double value.
39628 # Note: Dates, Times and DateTimes are represented as doubles in
39629 # "serial number" format.
39630 "boolValue": True or False, # Represents a boolean value.
39631 "formulaValue": "A String", # Represents a formula.
39632 "stringValue": "A String", # Represents a string value.
39633 # Leading single quotes are not included. For example, if the user typed
39634 # `'123` into the UI, this would be represented as a `stringValue` of
39635 # `"123"`.
39636 "errorValue": { # An error in a cell. # Represents an error.
39637 # This field is read-only.
39638 "message": "A String", # A message with more information about the error
39639 # (in the spreadsheet's locale).
39640 "type": "A String", # The type of error.
39641 },
39642 },
39643 "formattedValue": "A String", # The formatted value of the cell.
39644 # This is the value as it's shown to the user.
39645 # This field is read-only.
39646 "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()`
39647 # Note: Dates, Times and DateTimes are represented as doubles in
39648 # serial number format.
39649 "numberValue": 3.14, # Represents a double value.
39650 # Note: Dates, Times and DateTimes are represented as doubles in
39651 # "serial number" format.
39652 "boolValue": True or False, # Represents a boolean value.
39653 "formulaValue": "A String", # Represents a formula.
39654 "stringValue": "A String", # Represents a string value.
39655 # Leading single quotes are not included. For example, if the user typed
39656 # `'123` into the UI, this would be represented as a `stringValue` of
39657 # `"123"`.
39658 "errorValue": { # An error in a cell. # Represents an error.
39659 # This field is read-only.
39660 "message": "A String", # A message with more information about the error
39661 # (in the spreadsheet's locale).
39662 "type": "A String", # The type of error.
39663 },
39664 },
39665 "note": "A String", # Any note on the cell.
39666 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
39667 # This includes the results of applying any conditional formatting and,
39668 # if the cell contains a formula, the computed number format.
39669 # If the effective format is the default format, effective format will
39670 # not be written.
39671 # This field is read-only.
39672 "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 -070039673 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
39674 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039675 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070039676 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039677 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039678 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039679 },
39680 "textDirection": "A String", # The direction of the text in the cell.
39681 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
39682 # When updating padding, every field must be specified.
39683 "top": 42, # The top padding of the cell.
39684 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039685 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039686 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039687 },
Thomas Coffee2f245372017-03-27 10:39:26 -070039688 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039689 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
39690 # for simplicity of conversion to/from color representations in various
39691 # languages over compactness; for example, the fields of this representation
39692 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39693 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39694 # method in iOS; and, with just a little work, it can be easily formatted into
39695 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39696 #
39697 # Example (Java):
39698 #
39699 # import com.google.type.Color;
39700 #
39701 # // ...
39702 # public static java.awt.Color fromProto(Color protocolor) {
39703 # float alpha = protocolor.hasAlpha()
39704 # ? protocolor.getAlpha().getValue()
39705 # : 1.0;
39706 #
39707 # return new java.awt.Color(
39708 # protocolor.getRed(),
39709 # protocolor.getGreen(),
39710 # protocolor.getBlue(),
39711 # alpha);
39712 # }
39713 #
39714 # public static Color toProto(java.awt.Color color) {
39715 # float red = (float) color.getRed();
39716 # float green = (float) color.getGreen();
39717 # float blue = (float) color.getBlue();
39718 # float denominator = 255.0;
39719 # Color.Builder resultBuilder =
39720 # Color
39721 # .newBuilder()
39722 # .setRed(red / denominator)
39723 # .setGreen(green / denominator)
39724 # .setBlue(blue / denominator);
39725 # int alpha = color.getAlpha();
39726 # if (alpha != 255) {
39727 # result.setAlpha(
39728 # FloatValue
39729 # .newBuilder()
39730 # .setValue(((float) alpha) / denominator)
39731 # .build());
39732 # }
39733 # return resultBuilder.build();
39734 # }
39735 # // ...
39736 #
39737 # Example (iOS / Obj-C):
39738 #
39739 # // ...
39740 # static UIColor* fromProto(Color* protocolor) {
39741 # float red = [protocolor red];
39742 # float green = [protocolor green];
39743 # float blue = [protocolor blue];
39744 # FloatValue* alpha_wrapper = [protocolor alpha];
39745 # float alpha = 1.0;
39746 # if (alpha_wrapper != nil) {
39747 # alpha = [alpha_wrapper value];
39748 # }
39749 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39750 # }
39751 #
39752 # static Color* toProto(UIColor* color) {
39753 # CGFloat red, green, blue, alpha;
39754 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39755 # return nil;
39756 # }
39757 # Color* result = [Color alloc] init];
39758 # [result setRed:red];
39759 # [result setGreen:green];
39760 # [result setBlue:blue];
39761 # if (alpha <= 0.9999) {
39762 # [result setAlpha:floatWrapperWithValue(alpha)];
39763 # }
39764 # [result autorelease];
39765 # return result;
39766 # }
39767 # // ...
39768 #
39769 # Example (JavaScript):
39770 #
39771 # // ...
39772 #
39773 # var protoToCssColor = function(rgb_color) {
39774 # var redFrac = rgb_color.red || 0.0;
39775 # var greenFrac = rgb_color.green || 0.0;
39776 # var blueFrac = rgb_color.blue || 0.0;
39777 # var red = Math.floor(redFrac * 255);
39778 # var green = Math.floor(greenFrac * 255);
39779 # var blue = Math.floor(blueFrac * 255);
39780 #
39781 # if (!('alpha' in rgb_color)) {
39782 # return rgbToCssColor_(red, green, blue);
39783 # }
39784 #
39785 # var alphaFrac = rgb_color.alpha.value || 0.0;
39786 # var rgbParams = [red, green, blue].join(',');
39787 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39788 # };
39789 #
39790 # var rgbToCssColor_ = function(red, green, blue) {
39791 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39792 # var hexString = rgbNumber.toString(16);
39793 # var missingZeros = 6 - hexString.length;
39794 # var resultBuilder = ['#'];
39795 # for (var i = 0; i < missingZeros; i++) {
39796 # resultBuilder.push('0');
39797 # }
39798 # resultBuilder.push(hexString);
39799 # return resultBuilder.join('');
39800 # };
39801 #
39802 # // ...
39803 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39804 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39805 # the final pixel color is defined by the equation:
39806 #
39807 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39808 #
39809 # This means that a value of 1.0 corresponds to a solid color, whereas
39810 # a value of 0.0 corresponds to a completely transparent color. This
39811 # uses a wrapper message rather than a simple float scalar so that it is
39812 # possible to distinguish between a default value and the value being unset.
39813 # If omitted, this color object is to be rendered as a solid color
39814 # (as if the alpha value had been explicitly given with a value of 1.0).
39815 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39816 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39817 },
Thomas Coffee2f245372017-03-27 10:39:26 -070039818 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039819 "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).
39820 # Absent values indicate that the field isn't specified.
39821 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39822 # for simplicity of conversion to/from color representations in various
39823 # languages over compactness; for example, the fields of this representation
39824 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39825 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39826 # method in iOS; and, with just a little work, it can be easily formatted into
39827 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39828 #
39829 # Example (Java):
39830 #
39831 # import com.google.type.Color;
39832 #
39833 # // ...
39834 # public static java.awt.Color fromProto(Color protocolor) {
39835 # float alpha = protocolor.hasAlpha()
39836 # ? protocolor.getAlpha().getValue()
39837 # : 1.0;
39838 #
39839 # return new java.awt.Color(
39840 # protocolor.getRed(),
39841 # protocolor.getGreen(),
39842 # protocolor.getBlue(),
39843 # alpha);
39844 # }
39845 #
39846 # public static Color toProto(java.awt.Color color) {
39847 # float red = (float) color.getRed();
39848 # float green = (float) color.getGreen();
39849 # float blue = (float) color.getBlue();
39850 # float denominator = 255.0;
39851 # Color.Builder resultBuilder =
39852 # Color
39853 # .newBuilder()
39854 # .setRed(red / denominator)
39855 # .setGreen(green / denominator)
39856 # .setBlue(blue / denominator);
39857 # int alpha = color.getAlpha();
39858 # if (alpha != 255) {
39859 # result.setAlpha(
39860 # FloatValue
39861 # .newBuilder()
39862 # .setValue(((float) alpha) / denominator)
39863 # .build());
39864 # }
39865 # return resultBuilder.build();
39866 # }
39867 # // ...
39868 #
39869 # Example (iOS / Obj-C):
39870 #
39871 # // ...
39872 # static UIColor* fromProto(Color* protocolor) {
39873 # float red = [protocolor red];
39874 # float green = [protocolor green];
39875 # float blue = [protocolor blue];
39876 # FloatValue* alpha_wrapper = [protocolor alpha];
39877 # float alpha = 1.0;
39878 # if (alpha_wrapper != nil) {
39879 # alpha = [alpha_wrapper value];
39880 # }
39881 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39882 # }
39883 #
39884 # static Color* toProto(UIColor* color) {
39885 # CGFloat red, green, blue, alpha;
39886 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39887 # return nil;
39888 # }
39889 # Color* result = [Color alloc] init];
39890 # [result setRed:red];
39891 # [result setGreen:green];
39892 # [result setBlue:blue];
39893 # if (alpha <= 0.9999) {
39894 # [result setAlpha:floatWrapperWithValue(alpha)];
39895 # }
39896 # [result autorelease];
39897 # return result;
39898 # }
39899 # // ...
39900 #
39901 # Example (JavaScript):
39902 #
39903 # // ...
39904 #
39905 # var protoToCssColor = function(rgb_color) {
39906 # var redFrac = rgb_color.red || 0.0;
39907 # var greenFrac = rgb_color.green || 0.0;
39908 # var blueFrac = rgb_color.blue || 0.0;
39909 # var red = Math.floor(redFrac * 255);
39910 # var green = Math.floor(greenFrac * 255);
39911 # var blue = Math.floor(blueFrac * 255);
39912 #
39913 # if (!('alpha' in rgb_color)) {
39914 # return rgbToCssColor_(red, green, blue);
39915 # }
39916 #
39917 # var alphaFrac = rgb_color.alpha.value || 0.0;
39918 # var rgbParams = [red, green, blue].join(',');
39919 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39920 # };
39921 #
39922 # var rgbToCssColor_ = function(red, green, blue) {
39923 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39924 # var hexString = rgbNumber.toString(16);
39925 # var missingZeros = 6 - hexString.length;
39926 # var resultBuilder = ['#'];
39927 # for (var i = 0; i < missingZeros; i++) {
39928 # resultBuilder.push('0');
39929 # }
39930 # resultBuilder.push(hexString);
39931 # return resultBuilder.join('');
39932 # };
39933 #
39934 # // ...
39935 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39936 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39937 # the final pixel color is defined by the equation:
39938 #
39939 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39940 #
39941 # This means that a value of 1.0 corresponds to a solid color, whereas
39942 # a value of 0.0 corresponds to a completely transparent color. This
39943 # uses a wrapper message rather than a simple float scalar so that it is
39944 # possible to distinguish between a default value and the value being unset.
39945 # If omitted, this color object is to be rendered as a solid color
39946 # (as if the alpha value had been explicitly given with a value of 1.0).
39947 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39948 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39949 },
39950 "bold": True or False, # True if the text is bold.
39951 "strikethrough": True or False, # True if the text has a strikethrough.
39952 "fontFamily": "A String", # The font family.
39953 "fontSize": 42, # The size of the font.
39954 "italic": True or False, # True if the text is italicized.
39955 "underline": True or False, # True if the text is underlined.
39956 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070039957 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
39958 "angle": 42, # The angle between the standard orientation and the desired orientation.
39959 # Measured in degrees. Valid values are between -90 and 90. Positive
39960 # angles are angled upwards, negative are angled downwards.
39961 #
39962 # Note: For LTR text direction positive angles are in the counterclockwise
39963 # direction, whereas for RTL they are in the clockwise direction
39964 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
39965 # characters is unchanged.
39966 # For example:
39967 #
39968 # | V |
39969 # | e |
39970 # | r |
39971 # | t |
39972 # | i |
39973 # | c |
39974 # | a |
39975 # | l |
39976 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039977 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
39978 "borders": { # The borders of the cell. # The borders of the cell.
39979 "top": { # A border along a cell. # The top border of the cell.
39980 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39981 # for simplicity of conversion to/from color representations in various
39982 # languages over compactness; for example, the fields of this representation
39983 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39984 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39985 # method in iOS; and, with just a little work, it can be easily formatted into
39986 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39987 #
39988 # Example (Java):
39989 #
39990 # import com.google.type.Color;
39991 #
39992 # // ...
39993 # public static java.awt.Color fromProto(Color protocolor) {
39994 # float alpha = protocolor.hasAlpha()
39995 # ? protocolor.getAlpha().getValue()
39996 # : 1.0;
39997 #
39998 # return new java.awt.Color(
39999 # protocolor.getRed(),
40000 # protocolor.getGreen(),
40001 # protocolor.getBlue(),
40002 # alpha);
40003 # }
40004 #
40005 # public static Color toProto(java.awt.Color color) {
40006 # float red = (float) color.getRed();
40007 # float green = (float) color.getGreen();
40008 # float blue = (float) color.getBlue();
40009 # float denominator = 255.0;
40010 # Color.Builder resultBuilder =
40011 # Color
40012 # .newBuilder()
40013 # .setRed(red / denominator)
40014 # .setGreen(green / denominator)
40015 # .setBlue(blue / denominator);
40016 # int alpha = color.getAlpha();
40017 # if (alpha != 255) {
40018 # result.setAlpha(
40019 # FloatValue
40020 # .newBuilder()
40021 # .setValue(((float) alpha) / denominator)
40022 # .build());
40023 # }
40024 # return resultBuilder.build();
40025 # }
40026 # // ...
40027 #
40028 # Example (iOS / Obj-C):
40029 #
40030 # // ...
40031 # static UIColor* fromProto(Color* protocolor) {
40032 # float red = [protocolor red];
40033 # float green = [protocolor green];
40034 # float blue = [protocolor blue];
40035 # FloatValue* alpha_wrapper = [protocolor alpha];
40036 # float alpha = 1.0;
40037 # if (alpha_wrapper != nil) {
40038 # alpha = [alpha_wrapper value];
40039 # }
40040 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40041 # }
40042 #
40043 # static Color* toProto(UIColor* color) {
40044 # CGFloat red, green, blue, alpha;
40045 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40046 # return nil;
40047 # }
40048 # Color* result = [Color alloc] init];
40049 # [result setRed:red];
40050 # [result setGreen:green];
40051 # [result setBlue:blue];
40052 # if (alpha <= 0.9999) {
40053 # [result setAlpha:floatWrapperWithValue(alpha)];
40054 # }
40055 # [result autorelease];
40056 # return result;
40057 # }
40058 # // ...
40059 #
40060 # Example (JavaScript):
40061 #
40062 # // ...
40063 #
40064 # var protoToCssColor = function(rgb_color) {
40065 # var redFrac = rgb_color.red || 0.0;
40066 # var greenFrac = rgb_color.green || 0.0;
40067 # var blueFrac = rgb_color.blue || 0.0;
40068 # var red = Math.floor(redFrac * 255);
40069 # var green = Math.floor(greenFrac * 255);
40070 # var blue = Math.floor(blueFrac * 255);
40071 #
40072 # if (!('alpha' in rgb_color)) {
40073 # return rgbToCssColor_(red, green, blue);
40074 # }
40075 #
40076 # var alphaFrac = rgb_color.alpha.value || 0.0;
40077 # var rgbParams = [red, green, blue].join(',');
40078 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40079 # };
40080 #
40081 # var rgbToCssColor_ = function(red, green, blue) {
40082 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40083 # var hexString = rgbNumber.toString(16);
40084 # var missingZeros = 6 - hexString.length;
40085 # var resultBuilder = ['#'];
40086 # for (var i = 0; i < missingZeros; i++) {
40087 # resultBuilder.push('0');
40088 # }
40089 # resultBuilder.push(hexString);
40090 # return resultBuilder.join('');
40091 # };
40092 #
40093 # // ...
40094 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40095 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40096 # the final pixel color is defined by the equation:
40097 #
40098 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40099 #
40100 # This means that a value of 1.0 corresponds to a solid color, whereas
40101 # a value of 0.0 corresponds to a completely transparent color. This
40102 # uses a wrapper message rather than a simple float scalar so that it is
40103 # possible to distinguish between a default value and the value being unset.
40104 # If omitted, this color object is to be rendered as a solid color
40105 # (as if the alpha value had been explicitly given with a value of 1.0).
40106 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40107 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40108 },
40109 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040110 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040111 "style": "A String", # The style of the border.
40112 },
40113 "right": { # A border along a cell. # The right border of the cell.
40114 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40115 # for simplicity of conversion to/from color representations in various
40116 # languages over compactness; for example, the fields of this representation
40117 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40118 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40119 # method in iOS; and, with just a little work, it can be easily formatted into
40120 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40121 #
40122 # Example (Java):
40123 #
40124 # import com.google.type.Color;
40125 #
40126 # // ...
40127 # public static java.awt.Color fromProto(Color protocolor) {
40128 # float alpha = protocolor.hasAlpha()
40129 # ? protocolor.getAlpha().getValue()
40130 # : 1.0;
40131 #
40132 # return new java.awt.Color(
40133 # protocolor.getRed(),
40134 # protocolor.getGreen(),
40135 # protocolor.getBlue(),
40136 # alpha);
40137 # }
40138 #
40139 # public static Color toProto(java.awt.Color color) {
40140 # float red = (float) color.getRed();
40141 # float green = (float) color.getGreen();
40142 # float blue = (float) color.getBlue();
40143 # float denominator = 255.0;
40144 # Color.Builder resultBuilder =
40145 # Color
40146 # .newBuilder()
40147 # .setRed(red / denominator)
40148 # .setGreen(green / denominator)
40149 # .setBlue(blue / denominator);
40150 # int alpha = color.getAlpha();
40151 # if (alpha != 255) {
40152 # result.setAlpha(
40153 # FloatValue
40154 # .newBuilder()
40155 # .setValue(((float) alpha) / denominator)
40156 # .build());
40157 # }
40158 # return resultBuilder.build();
40159 # }
40160 # // ...
40161 #
40162 # Example (iOS / Obj-C):
40163 #
40164 # // ...
40165 # static UIColor* fromProto(Color* protocolor) {
40166 # float red = [protocolor red];
40167 # float green = [protocolor green];
40168 # float blue = [protocolor blue];
40169 # FloatValue* alpha_wrapper = [protocolor alpha];
40170 # float alpha = 1.0;
40171 # if (alpha_wrapper != nil) {
40172 # alpha = [alpha_wrapper value];
40173 # }
40174 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40175 # }
40176 #
40177 # static Color* toProto(UIColor* color) {
40178 # CGFloat red, green, blue, alpha;
40179 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40180 # return nil;
40181 # }
40182 # Color* result = [Color alloc] init];
40183 # [result setRed:red];
40184 # [result setGreen:green];
40185 # [result setBlue:blue];
40186 # if (alpha <= 0.9999) {
40187 # [result setAlpha:floatWrapperWithValue(alpha)];
40188 # }
40189 # [result autorelease];
40190 # return result;
40191 # }
40192 # // ...
40193 #
40194 # Example (JavaScript):
40195 #
40196 # // ...
40197 #
40198 # var protoToCssColor = function(rgb_color) {
40199 # var redFrac = rgb_color.red || 0.0;
40200 # var greenFrac = rgb_color.green || 0.0;
40201 # var blueFrac = rgb_color.blue || 0.0;
40202 # var red = Math.floor(redFrac * 255);
40203 # var green = Math.floor(greenFrac * 255);
40204 # var blue = Math.floor(blueFrac * 255);
40205 #
40206 # if (!('alpha' in rgb_color)) {
40207 # return rgbToCssColor_(red, green, blue);
40208 # }
40209 #
40210 # var alphaFrac = rgb_color.alpha.value || 0.0;
40211 # var rgbParams = [red, green, blue].join(',');
40212 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40213 # };
40214 #
40215 # var rgbToCssColor_ = function(red, green, blue) {
40216 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40217 # var hexString = rgbNumber.toString(16);
40218 # var missingZeros = 6 - hexString.length;
40219 # var resultBuilder = ['#'];
40220 # for (var i = 0; i < missingZeros; i++) {
40221 # resultBuilder.push('0');
40222 # }
40223 # resultBuilder.push(hexString);
40224 # return resultBuilder.join('');
40225 # };
40226 #
40227 # // ...
40228 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40229 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40230 # the final pixel color is defined by the equation:
40231 #
40232 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40233 #
40234 # This means that a value of 1.0 corresponds to a solid color, whereas
40235 # a value of 0.0 corresponds to a completely transparent color. This
40236 # uses a wrapper message rather than a simple float scalar so that it is
40237 # possible to distinguish between a default value and the value being unset.
40238 # If omitted, this color object is to be rendered as a solid color
40239 # (as if the alpha value had been explicitly given with a value of 1.0).
40240 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40241 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40242 },
40243 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040244 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040245 "style": "A String", # The style of the border.
40246 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040247 "left": { # A border along a cell. # The left border of the cell.
40248 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40249 # for simplicity of conversion to/from color representations in various
40250 # languages over compactness; for example, the fields of this representation
40251 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40252 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40253 # method in iOS; and, with just a little work, it can be easily formatted into
40254 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40255 #
40256 # Example (Java):
40257 #
40258 # import com.google.type.Color;
40259 #
40260 # // ...
40261 # public static java.awt.Color fromProto(Color protocolor) {
40262 # float alpha = protocolor.hasAlpha()
40263 # ? protocolor.getAlpha().getValue()
40264 # : 1.0;
40265 #
40266 # return new java.awt.Color(
40267 # protocolor.getRed(),
40268 # protocolor.getGreen(),
40269 # protocolor.getBlue(),
40270 # alpha);
40271 # }
40272 #
40273 # public static Color toProto(java.awt.Color color) {
40274 # float red = (float) color.getRed();
40275 # float green = (float) color.getGreen();
40276 # float blue = (float) color.getBlue();
40277 # float denominator = 255.0;
40278 # Color.Builder resultBuilder =
40279 # Color
40280 # .newBuilder()
40281 # .setRed(red / denominator)
40282 # .setGreen(green / denominator)
40283 # .setBlue(blue / denominator);
40284 # int alpha = color.getAlpha();
40285 # if (alpha != 255) {
40286 # result.setAlpha(
40287 # FloatValue
40288 # .newBuilder()
40289 # .setValue(((float) alpha) / denominator)
40290 # .build());
40291 # }
40292 # return resultBuilder.build();
40293 # }
40294 # // ...
40295 #
40296 # Example (iOS / Obj-C):
40297 #
40298 # // ...
40299 # static UIColor* fromProto(Color* protocolor) {
40300 # float red = [protocolor red];
40301 # float green = [protocolor green];
40302 # float blue = [protocolor blue];
40303 # FloatValue* alpha_wrapper = [protocolor alpha];
40304 # float alpha = 1.0;
40305 # if (alpha_wrapper != nil) {
40306 # alpha = [alpha_wrapper value];
40307 # }
40308 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40309 # }
40310 #
40311 # static Color* toProto(UIColor* color) {
40312 # CGFloat red, green, blue, alpha;
40313 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40314 # return nil;
40315 # }
40316 # Color* result = [Color alloc] init];
40317 # [result setRed:red];
40318 # [result setGreen:green];
40319 # [result setBlue:blue];
40320 # if (alpha <= 0.9999) {
40321 # [result setAlpha:floatWrapperWithValue(alpha)];
40322 # }
40323 # [result autorelease];
40324 # return result;
40325 # }
40326 # // ...
40327 #
40328 # Example (JavaScript):
40329 #
40330 # // ...
40331 #
40332 # var protoToCssColor = function(rgb_color) {
40333 # var redFrac = rgb_color.red || 0.0;
40334 # var greenFrac = rgb_color.green || 0.0;
40335 # var blueFrac = rgb_color.blue || 0.0;
40336 # var red = Math.floor(redFrac * 255);
40337 # var green = Math.floor(greenFrac * 255);
40338 # var blue = Math.floor(blueFrac * 255);
40339 #
40340 # if (!('alpha' in rgb_color)) {
40341 # return rgbToCssColor_(red, green, blue);
40342 # }
40343 #
40344 # var alphaFrac = rgb_color.alpha.value || 0.0;
40345 # var rgbParams = [red, green, blue].join(',');
40346 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40347 # };
40348 #
40349 # var rgbToCssColor_ = function(red, green, blue) {
40350 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40351 # var hexString = rgbNumber.toString(16);
40352 # var missingZeros = 6 - hexString.length;
40353 # var resultBuilder = ['#'];
40354 # for (var i = 0; i < missingZeros; i++) {
40355 # resultBuilder.push('0');
40356 # }
40357 # resultBuilder.push(hexString);
40358 # return resultBuilder.join('');
40359 # };
40360 #
40361 # // ...
40362 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40363 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40364 # the final pixel color is defined by the equation:
40365 #
40366 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40367 #
40368 # This means that a value of 1.0 corresponds to a solid color, whereas
40369 # a value of 0.0 corresponds to a completely transparent color. This
40370 # uses a wrapper message rather than a simple float scalar so that it is
40371 # possible to distinguish between a default value and the value being unset.
40372 # If omitted, this color object is to be rendered as a solid color
40373 # (as if the alpha value had been explicitly given with a value of 1.0).
40374 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40375 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40376 },
40377 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040378 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040379 "style": "A String", # The style of the border.
40380 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070040381 "bottom": { # A border along a cell. # The bottom border of the cell.
40382 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40383 # for simplicity of conversion to/from color representations in various
40384 # languages over compactness; for example, the fields of this representation
40385 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40386 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40387 # method in iOS; and, with just a little work, it can be easily formatted into
40388 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40389 #
40390 # Example (Java):
40391 #
40392 # import com.google.type.Color;
40393 #
40394 # // ...
40395 # public static java.awt.Color fromProto(Color protocolor) {
40396 # float alpha = protocolor.hasAlpha()
40397 # ? protocolor.getAlpha().getValue()
40398 # : 1.0;
40399 #
40400 # return new java.awt.Color(
40401 # protocolor.getRed(),
40402 # protocolor.getGreen(),
40403 # protocolor.getBlue(),
40404 # alpha);
40405 # }
40406 #
40407 # public static Color toProto(java.awt.Color color) {
40408 # float red = (float) color.getRed();
40409 # float green = (float) color.getGreen();
40410 # float blue = (float) color.getBlue();
40411 # float denominator = 255.0;
40412 # Color.Builder resultBuilder =
40413 # Color
40414 # .newBuilder()
40415 # .setRed(red / denominator)
40416 # .setGreen(green / denominator)
40417 # .setBlue(blue / denominator);
40418 # int alpha = color.getAlpha();
40419 # if (alpha != 255) {
40420 # result.setAlpha(
40421 # FloatValue
40422 # .newBuilder()
40423 # .setValue(((float) alpha) / denominator)
40424 # .build());
40425 # }
40426 # return resultBuilder.build();
40427 # }
40428 # // ...
40429 #
40430 # Example (iOS / Obj-C):
40431 #
40432 # // ...
40433 # static UIColor* fromProto(Color* protocolor) {
40434 # float red = [protocolor red];
40435 # float green = [protocolor green];
40436 # float blue = [protocolor blue];
40437 # FloatValue* alpha_wrapper = [protocolor alpha];
40438 # float alpha = 1.0;
40439 # if (alpha_wrapper != nil) {
40440 # alpha = [alpha_wrapper value];
40441 # }
40442 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40443 # }
40444 #
40445 # static Color* toProto(UIColor* color) {
40446 # CGFloat red, green, blue, alpha;
40447 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40448 # return nil;
40449 # }
40450 # Color* result = [Color alloc] init];
40451 # [result setRed:red];
40452 # [result setGreen:green];
40453 # [result setBlue:blue];
40454 # if (alpha <= 0.9999) {
40455 # [result setAlpha:floatWrapperWithValue(alpha)];
40456 # }
40457 # [result autorelease];
40458 # return result;
40459 # }
40460 # // ...
40461 #
40462 # Example (JavaScript):
40463 #
40464 # // ...
40465 #
40466 # var protoToCssColor = function(rgb_color) {
40467 # var redFrac = rgb_color.red || 0.0;
40468 # var greenFrac = rgb_color.green || 0.0;
40469 # var blueFrac = rgb_color.blue || 0.0;
40470 # var red = Math.floor(redFrac * 255);
40471 # var green = Math.floor(greenFrac * 255);
40472 # var blue = Math.floor(blueFrac * 255);
40473 #
40474 # if (!('alpha' in rgb_color)) {
40475 # return rgbToCssColor_(red, green, blue);
40476 # }
40477 #
40478 # var alphaFrac = rgb_color.alpha.value || 0.0;
40479 # var rgbParams = [red, green, blue].join(',');
40480 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40481 # };
40482 #
40483 # var rgbToCssColor_ = function(red, green, blue) {
40484 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40485 # var hexString = rgbNumber.toString(16);
40486 # var missingZeros = 6 - hexString.length;
40487 # var resultBuilder = ['#'];
40488 # for (var i = 0; i < missingZeros; i++) {
40489 # resultBuilder.push('0');
40490 # }
40491 # resultBuilder.push(hexString);
40492 # return resultBuilder.join('');
40493 # };
40494 #
40495 # // ...
40496 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40497 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40498 # the final pixel color is defined by the equation:
40499 #
40500 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40501 #
40502 # This means that a value of 1.0 corresponds to a solid color, whereas
40503 # a value of 0.0 corresponds to a completely transparent color. This
40504 # uses a wrapper message rather than a simple float scalar so that it is
40505 # possible to distinguish between a default value and the value being unset.
40506 # If omitted, this color object is to be rendered as a solid color
40507 # (as if the alpha value had been explicitly given with a value of 1.0).
40508 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40509 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40510 },
40511 "width": 42, # The width of the border, in pixels.
40512 # Deprecated; the width is determined by the "style" field.
40513 "style": "A String", # The style of the border.
40514 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040515 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070040516 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040517 },
40518 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
40519 #
40520 # When writing, the new format will be merged with the existing format.
40521 "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 -070040522 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
40523 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040524 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070040525 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040526 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040527 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040528 },
40529 "textDirection": "A String", # The direction of the text in the cell.
40530 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
40531 # When updating padding, every field must be specified.
40532 "top": 42, # The top padding of the cell.
40533 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040534 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040535 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040536 },
Thomas Coffee2f245372017-03-27 10:39:26 -070040537 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040538 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
40539 # for simplicity of conversion to/from color representations in various
40540 # languages over compactness; for example, the fields of this representation
40541 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40542 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40543 # method in iOS; and, with just a little work, it can be easily formatted into
40544 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40545 #
40546 # Example (Java):
40547 #
40548 # import com.google.type.Color;
40549 #
40550 # // ...
40551 # public static java.awt.Color fromProto(Color protocolor) {
40552 # float alpha = protocolor.hasAlpha()
40553 # ? protocolor.getAlpha().getValue()
40554 # : 1.0;
40555 #
40556 # return new java.awt.Color(
40557 # protocolor.getRed(),
40558 # protocolor.getGreen(),
40559 # protocolor.getBlue(),
40560 # alpha);
40561 # }
40562 #
40563 # public static Color toProto(java.awt.Color color) {
40564 # float red = (float) color.getRed();
40565 # float green = (float) color.getGreen();
40566 # float blue = (float) color.getBlue();
40567 # float denominator = 255.0;
40568 # Color.Builder resultBuilder =
40569 # Color
40570 # .newBuilder()
40571 # .setRed(red / denominator)
40572 # .setGreen(green / denominator)
40573 # .setBlue(blue / denominator);
40574 # int alpha = color.getAlpha();
40575 # if (alpha != 255) {
40576 # result.setAlpha(
40577 # FloatValue
40578 # .newBuilder()
40579 # .setValue(((float) alpha) / denominator)
40580 # .build());
40581 # }
40582 # return resultBuilder.build();
40583 # }
40584 # // ...
40585 #
40586 # Example (iOS / Obj-C):
40587 #
40588 # // ...
40589 # static UIColor* fromProto(Color* protocolor) {
40590 # float red = [protocolor red];
40591 # float green = [protocolor green];
40592 # float blue = [protocolor blue];
40593 # FloatValue* alpha_wrapper = [protocolor alpha];
40594 # float alpha = 1.0;
40595 # if (alpha_wrapper != nil) {
40596 # alpha = [alpha_wrapper value];
40597 # }
40598 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40599 # }
40600 #
40601 # static Color* toProto(UIColor* color) {
40602 # CGFloat red, green, blue, alpha;
40603 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40604 # return nil;
40605 # }
40606 # Color* result = [Color alloc] init];
40607 # [result setRed:red];
40608 # [result setGreen:green];
40609 # [result setBlue:blue];
40610 # if (alpha <= 0.9999) {
40611 # [result setAlpha:floatWrapperWithValue(alpha)];
40612 # }
40613 # [result autorelease];
40614 # return result;
40615 # }
40616 # // ...
40617 #
40618 # Example (JavaScript):
40619 #
40620 # // ...
40621 #
40622 # var protoToCssColor = function(rgb_color) {
40623 # var redFrac = rgb_color.red || 0.0;
40624 # var greenFrac = rgb_color.green || 0.0;
40625 # var blueFrac = rgb_color.blue || 0.0;
40626 # var red = Math.floor(redFrac * 255);
40627 # var green = Math.floor(greenFrac * 255);
40628 # var blue = Math.floor(blueFrac * 255);
40629 #
40630 # if (!('alpha' in rgb_color)) {
40631 # return rgbToCssColor_(red, green, blue);
40632 # }
40633 #
40634 # var alphaFrac = rgb_color.alpha.value || 0.0;
40635 # var rgbParams = [red, green, blue].join(',');
40636 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40637 # };
40638 #
40639 # var rgbToCssColor_ = function(red, green, blue) {
40640 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40641 # var hexString = rgbNumber.toString(16);
40642 # var missingZeros = 6 - hexString.length;
40643 # var resultBuilder = ['#'];
40644 # for (var i = 0; i < missingZeros; i++) {
40645 # resultBuilder.push('0');
40646 # }
40647 # resultBuilder.push(hexString);
40648 # return resultBuilder.join('');
40649 # };
40650 #
40651 # // ...
40652 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40653 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40654 # the final pixel color is defined by the equation:
40655 #
40656 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40657 #
40658 # This means that a value of 1.0 corresponds to a solid color, whereas
40659 # a value of 0.0 corresponds to a completely transparent color. This
40660 # uses a wrapper message rather than a simple float scalar so that it is
40661 # possible to distinguish between a default value and the value being unset.
40662 # If omitted, this color object is to be rendered as a solid color
40663 # (as if the alpha value had been explicitly given with a value of 1.0).
40664 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40665 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40666 },
Thomas Coffee2f245372017-03-27 10:39:26 -070040667 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040668 "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).
40669 # Absent values indicate that the field isn't specified.
40670 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
40671 # for simplicity of conversion to/from color representations in various
40672 # languages over compactness; for example, the fields of this representation
40673 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40674 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40675 # method in iOS; and, with just a little work, it can be easily formatted into
40676 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40677 #
40678 # Example (Java):
40679 #
40680 # import com.google.type.Color;
40681 #
40682 # // ...
40683 # public static java.awt.Color fromProto(Color protocolor) {
40684 # float alpha = protocolor.hasAlpha()
40685 # ? protocolor.getAlpha().getValue()
40686 # : 1.0;
40687 #
40688 # return new java.awt.Color(
40689 # protocolor.getRed(),
40690 # protocolor.getGreen(),
40691 # protocolor.getBlue(),
40692 # alpha);
40693 # }
40694 #
40695 # public static Color toProto(java.awt.Color color) {
40696 # float red = (float) color.getRed();
40697 # float green = (float) color.getGreen();
40698 # float blue = (float) color.getBlue();
40699 # float denominator = 255.0;
40700 # Color.Builder resultBuilder =
40701 # Color
40702 # .newBuilder()
40703 # .setRed(red / denominator)
40704 # .setGreen(green / denominator)
40705 # .setBlue(blue / denominator);
40706 # int alpha = color.getAlpha();
40707 # if (alpha != 255) {
40708 # result.setAlpha(
40709 # FloatValue
40710 # .newBuilder()
40711 # .setValue(((float) alpha) / denominator)
40712 # .build());
40713 # }
40714 # return resultBuilder.build();
40715 # }
40716 # // ...
40717 #
40718 # Example (iOS / Obj-C):
40719 #
40720 # // ...
40721 # static UIColor* fromProto(Color* protocolor) {
40722 # float red = [protocolor red];
40723 # float green = [protocolor green];
40724 # float blue = [protocolor blue];
40725 # FloatValue* alpha_wrapper = [protocolor alpha];
40726 # float alpha = 1.0;
40727 # if (alpha_wrapper != nil) {
40728 # alpha = [alpha_wrapper value];
40729 # }
40730 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40731 # }
40732 #
40733 # static Color* toProto(UIColor* color) {
40734 # CGFloat red, green, blue, alpha;
40735 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40736 # return nil;
40737 # }
40738 # Color* result = [Color alloc] init];
40739 # [result setRed:red];
40740 # [result setGreen:green];
40741 # [result setBlue:blue];
40742 # if (alpha <= 0.9999) {
40743 # [result setAlpha:floatWrapperWithValue(alpha)];
40744 # }
40745 # [result autorelease];
40746 # return result;
40747 # }
40748 # // ...
40749 #
40750 # Example (JavaScript):
40751 #
40752 # // ...
40753 #
40754 # var protoToCssColor = function(rgb_color) {
40755 # var redFrac = rgb_color.red || 0.0;
40756 # var greenFrac = rgb_color.green || 0.0;
40757 # var blueFrac = rgb_color.blue || 0.0;
40758 # var red = Math.floor(redFrac * 255);
40759 # var green = Math.floor(greenFrac * 255);
40760 # var blue = Math.floor(blueFrac * 255);
40761 #
40762 # if (!('alpha' in rgb_color)) {
40763 # return rgbToCssColor_(red, green, blue);
40764 # }
40765 #
40766 # var alphaFrac = rgb_color.alpha.value || 0.0;
40767 # var rgbParams = [red, green, blue].join(',');
40768 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40769 # };
40770 #
40771 # var rgbToCssColor_ = function(red, green, blue) {
40772 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40773 # var hexString = rgbNumber.toString(16);
40774 # var missingZeros = 6 - hexString.length;
40775 # var resultBuilder = ['#'];
40776 # for (var i = 0; i < missingZeros; i++) {
40777 # resultBuilder.push('0');
40778 # }
40779 # resultBuilder.push(hexString);
40780 # return resultBuilder.join('');
40781 # };
40782 #
40783 # // ...
40784 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40785 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40786 # the final pixel color is defined by the equation:
40787 #
40788 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40789 #
40790 # This means that a value of 1.0 corresponds to a solid color, whereas
40791 # a value of 0.0 corresponds to a completely transparent color. This
40792 # uses a wrapper message rather than a simple float scalar so that it is
40793 # possible to distinguish between a default value and the value being unset.
40794 # If omitted, this color object is to be rendered as a solid color
40795 # (as if the alpha value had been explicitly given with a value of 1.0).
40796 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40797 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40798 },
40799 "bold": True or False, # True if the text is bold.
40800 "strikethrough": True or False, # True if the text has a strikethrough.
40801 "fontFamily": "A String", # The font family.
40802 "fontSize": 42, # The size of the font.
40803 "italic": True or False, # True if the text is italicized.
40804 "underline": True or False, # True if the text is underlined.
40805 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070040806 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
40807 "angle": 42, # The angle between the standard orientation and the desired orientation.
40808 # Measured in degrees. Valid values are between -90 and 90. Positive
40809 # angles are angled upwards, negative are angled downwards.
40810 #
40811 # Note: For LTR text direction positive angles are in the counterclockwise
40812 # direction, whereas for RTL they are in the clockwise direction
40813 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
40814 # characters is unchanged.
40815 # For example:
40816 #
40817 # | V |
40818 # | e |
40819 # | r |
40820 # | t |
40821 # | i |
40822 # | c |
40823 # | a |
40824 # | l |
40825 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040826 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
40827 "borders": { # The borders of the cell. # The borders of the cell.
40828 "top": { # A border along a cell. # The top border of the cell.
40829 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40830 # for simplicity of conversion to/from color representations in various
40831 # languages over compactness; for example, the fields of this representation
40832 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40833 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40834 # method in iOS; and, with just a little work, it can be easily formatted into
40835 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40836 #
40837 # Example (Java):
40838 #
40839 # import com.google.type.Color;
40840 #
40841 # // ...
40842 # public static java.awt.Color fromProto(Color protocolor) {
40843 # float alpha = protocolor.hasAlpha()
40844 # ? protocolor.getAlpha().getValue()
40845 # : 1.0;
40846 #
40847 # return new java.awt.Color(
40848 # protocolor.getRed(),
40849 # protocolor.getGreen(),
40850 # protocolor.getBlue(),
40851 # alpha);
40852 # }
40853 #
40854 # public static Color toProto(java.awt.Color color) {
40855 # float red = (float) color.getRed();
40856 # float green = (float) color.getGreen();
40857 # float blue = (float) color.getBlue();
40858 # float denominator = 255.0;
40859 # Color.Builder resultBuilder =
40860 # Color
40861 # .newBuilder()
40862 # .setRed(red / denominator)
40863 # .setGreen(green / denominator)
40864 # .setBlue(blue / denominator);
40865 # int alpha = color.getAlpha();
40866 # if (alpha != 255) {
40867 # result.setAlpha(
40868 # FloatValue
40869 # .newBuilder()
40870 # .setValue(((float) alpha) / denominator)
40871 # .build());
40872 # }
40873 # return resultBuilder.build();
40874 # }
40875 # // ...
40876 #
40877 # Example (iOS / Obj-C):
40878 #
40879 # // ...
40880 # static UIColor* fromProto(Color* protocolor) {
40881 # float red = [protocolor red];
40882 # float green = [protocolor green];
40883 # float blue = [protocolor blue];
40884 # FloatValue* alpha_wrapper = [protocolor alpha];
40885 # float alpha = 1.0;
40886 # if (alpha_wrapper != nil) {
40887 # alpha = [alpha_wrapper value];
40888 # }
40889 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40890 # }
40891 #
40892 # static Color* toProto(UIColor* color) {
40893 # CGFloat red, green, blue, alpha;
40894 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40895 # return nil;
40896 # }
40897 # Color* result = [Color alloc] init];
40898 # [result setRed:red];
40899 # [result setGreen:green];
40900 # [result setBlue:blue];
40901 # if (alpha <= 0.9999) {
40902 # [result setAlpha:floatWrapperWithValue(alpha)];
40903 # }
40904 # [result autorelease];
40905 # return result;
40906 # }
40907 # // ...
40908 #
40909 # Example (JavaScript):
40910 #
40911 # // ...
40912 #
40913 # var protoToCssColor = function(rgb_color) {
40914 # var redFrac = rgb_color.red || 0.0;
40915 # var greenFrac = rgb_color.green || 0.0;
40916 # var blueFrac = rgb_color.blue || 0.0;
40917 # var red = Math.floor(redFrac * 255);
40918 # var green = Math.floor(greenFrac * 255);
40919 # var blue = Math.floor(blueFrac * 255);
40920 #
40921 # if (!('alpha' in rgb_color)) {
40922 # return rgbToCssColor_(red, green, blue);
40923 # }
40924 #
40925 # var alphaFrac = rgb_color.alpha.value || 0.0;
40926 # var rgbParams = [red, green, blue].join(',');
40927 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40928 # };
40929 #
40930 # var rgbToCssColor_ = function(red, green, blue) {
40931 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40932 # var hexString = rgbNumber.toString(16);
40933 # var missingZeros = 6 - hexString.length;
40934 # var resultBuilder = ['#'];
40935 # for (var i = 0; i < missingZeros; i++) {
40936 # resultBuilder.push('0');
40937 # }
40938 # resultBuilder.push(hexString);
40939 # return resultBuilder.join('');
40940 # };
40941 #
40942 # // ...
40943 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40944 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40945 # the final pixel color is defined by the equation:
40946 #
40947 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40948 #
40949 # This means that a value of 1.0 corresponds to a solid color, whereas
40950 # a value of 0.0 corresponds to a completely transparent color. This
40951 # uses a wrapper message rather than a simple float scalar so that it is
40952 # possible to distinguish between a default value and the value being unset.
40953 # If omitted, this color object is to be rendered as a solid color
40954 # (as if the alpha value had been explicitly given with a value of 1.0).
40955 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40956 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40957 },
40958 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040959 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040960 "style": "A String", # The style of the border.
40961 },
40962 "right": { # A border along a cell. # The right border of the cell.
40963 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40964 # for simplicity of conversion to/from color representations in various
40965 # languages over compactness; for example, the fields of this representation
40966 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40967 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40968 # method in iOS; and, with just a little work, it can be easily formatted into
40969 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40970 #
40971 # Example (Java):
40972 #
40973 # import com.google.type.Color;
40974 #
40975 # // ...
40976 # public static java.awt.Color fromProto(Color protocolor) {
40977 # float alpha = protocolor.hasAlpha()
40978 # ? protocolor.getAlpha().getValue()
40979 # : 1.0;
40980 #
40981 # return new java.awt.Color(
40982 # protocolor.getRed(),
40983 # protocolor.getGreen(),
40984 # protocolor.getBlue(),
40985 # alpha);
40986 # }
40987 #
40988 # public static Color toProto(java.awt.Color color) {
40989 # float red = (float) color.getRed();
40990 # float green = (float) color.getGreen();
40991 # float blue = (float) color.getBlue();
40992 # float denominator = 255.0;
40993 # Color.Builder resultBuilder =
40994 # Color
40995 # .newBuilder()
40996 # .setRed(red / denominator)
40997 # .setGreen(green / denominator)
40998 # .setBlue(blue / denominator);
40999 # int alpha = color.getAlpha();
41000 # if (alpha != 255) {
41001 # result.setAlpha(
41002 # FloatValue
41003 # .newBuilder()
41004 # .setValue(((float) alpha) / denominator)
41005 # .build());
41006 # }
41007 # return resultBuilder.build();
41008 # }
41009 # // ...
41010 #
41011 # Example (iOS / Obj-C):
41012 #
41013 # // ...
41014 # static UIColor* fromProto(Color* protocolor) {
41015 # float red = [protocolor red];
41016 # float green = [protocolor green];
41017 # float blue = [protocolor blue];
41018 # FloatValue* alpha_wrapper = [protocolor alpha];
41019 # float alpha = 1.0;
41020 # if (alpha_wrapper != nil) {
41021 # alpha = [alpha_wrapper value];
41022 # }
41023 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41024 # }
41025 #
41026 # static Color* toProto(UIColor* color) {
41027 # CGFloat red, green, blue, alpha;
41028 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41029 # return nil;
41030 # }
41031 # Color* result = [Color alloc] init];
41032 # [result setRed:red];
41033 # [result setGreen:green];
41034 # [result setBlue:blue];
41035 # if (alpha <= 0.9999) {
41036 # [result setAlpha:floatWrapperWithValue(alpha)];
41037 # }
41038 # [result autorelease];
41039 # return result;
41040 # }
41041 # // ...
41042 #
41043 # Example (JavaScript):
41044 #
41045 # // ...
41046 #
41047 # var protoToCssColor = function(rgb_color) {
41048 # var redFrac = rgb_color.red || 0.0;
41049 # var greenFrac = rgb_color.green || 0.0;
41050 # var blueFrac = rgb_color.blue || 0.0;
41051 # var red = Math.floor(redFrac * 255);
41052 # var green = Math.floor(greenFrac * 255);
41053 # var blue = Math.floor(blueFrac * 255);
41054 #
41055 # if (!('alpha' in rgb_color)) {
41056 # return rgbToCssColor_(red, green, blue);
41057 # }
41058 #
41059 # var alphaFrac = rgb_color.alpha.value || 0.0;
41060 # var rgbParams = [red, green, blue].join(',');
41061 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41062 # };
41063 #
41064 # var rgbToCssColor_ = function(red, green, blue) {
41065 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41066 # var hexString = rgbNumber.toString(16);
41067 # var missingZeros = 6 - hexString.length;
41068 # var resultBuilder = ['#'];
41069 # for (var i = 0; i < missingZeros; i++) {
41070 # resultBuilder.push('0');
41071 # }
41072 # resultBuilder.push(hexString);
41073 # return resultBuilder.join('');
41074 # };
41075 #
41076 # // ...
41077 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41078 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41079 # the final pixel color is defined by the equation:
41080 #
41081 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41082 #
41083 # This means that a value of 1.0 corresponds to a solid color, whereas
41084 # a value of 0.0 corresponds to a completely transparent color. This
41085 # uses a wrapper message rather than a simple float scalar so that it is
41086 # possible to distinguish between a default value and the value being unset.
41087 # If omitted, this color object is to be rendered as a solid color
41088 # (as if the alpha value had been explicitly given with a value of 1.0).
41089 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41090 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41091 },
41092 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070041093 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041094 "style": "A String", # The style of the border.
41095 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041096 "left": { # A border along a cell. # The left border of the cell.
41097 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41098 # for simplicity of conversion to/from color representations in various
41099 # languages over compactness; for example, the fields of this representation
41100 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41101 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41102 # method in iOS; and, with just a little work, it can be easily formatted into
41103 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41104 #
41105 # Example (Java):
41106 #
41107 # import com.google.type.Color;
41108 #
41109 # // ...
41110 # public static java.awt.Color fromProto(Color protocolor) {
41111 # float alpha = protocolor.hasAlpha()
41112 # ? protocolor.getAlpha().getValue()
41113 # : 1.0;
41114 #
41115 # return new java.awt.Color(
41116 # protocolor.getRed(),
41117 # protocolor.getGreen(),
41118 # protocolor.getBlue(),
41119 # alpha);
41120 # }
41121 #
41122 # public static Color toProto(java.awt.Color color) {
41123 # float red = (float) color.getRed();
41124 # float green = (float) color.getGreen();
41125 # float blue = (float) color.getBlue();
41126 # float denominator = 255.0;
41127 # Color.Builder resultBuilder =
41128 # Color
41129 # .newBuilder()
41130 # .setRed(red / denominator)
41131 # .setGreen(green / denominator)
41132 # .setBlue(blue / denominator);
41133 # int alpha = color.getAlpha();
41134 # if (alpha != 255) {
41135 # result.setAlpha(
41136 # FloatValue
41137 # .newBuilder()
41138 # .setValue(((float) alpha) / denominator)
41139 # .build());
41140 # }
41141 # return resultBuilder.build();
41142 # }
41143 # // ...
41144 #
41145 # Example (iOS / Obj-C):
41146 #
41147 # // ...
41148 # static UIColor* fromProto(Color* protocolor) {
41149 # float red = [protocolor red];
41150 # float green = [protocolor green];
41151 # float blue = [protocolor blue];
41152 # FloatValue* alpha_wrapper = [protocolor alpha];
41153 # float alpha = 1.0;
41154 # if (alpha_wrapper != nil) {
41155 # alpha = [alpha_wrapper value];
41156 # }
41157 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41158 # }
41159 #
41160 # static Color* toProto(UIColor* color) {
41161 # CGFloat red, green, blue, alpha;
41162 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41163 # return nil;
41164 # }
41165 # Color* result = [Color alloc] init];
41166 # [result setRed:red];
41167 # [result setGreen:green];
41168 # [result setBlue:blue];
41169 # if (alpha <= 0.9999) {
41170 # [result setAlpha:floatWrapperWithValue(alpha)];
41171 # }
41172 # [result autorelease];
41173 # return result;
41174 # }
41175 # // ...
41176 #
41177 # Example (JavaScript):
41178 #
41179 # // ...
41180 #
41181 # var protoToCssColor = function(rgb_color) {
41182 # var redFrac = rgb_color.red || 0.0;
41183 # var greenFrac = rgb_color.green || 0.0;
41184 # var blueFrac = rgb_color.blue || 0.0;
41185 # var red = Math.floor(redFrac * 255);
41186 # var green = Math.floor(greenFrac * 255);
41187 # var blue = Math.floor(blueFrac * 255);
41188 #
41189 # if (!('alpha' in rgb_color)) {
41190 # return rgbToCssColor_(red, green, blue);
41191 # }
41192 #
41193 # var alphaFrac = rgb_color.alpha.value || 0.0;
41194 # var rgbParams = [red, green, blue].join(',');
41195 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41196 # };
41197 #
41198 # var rgbToCssColor_ = function(red, green, blue) {
41199 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41200 # var hexString = rgbNumber.toString(16);
41201 # var missingZeros = 6 - hexString.length;
41202 # var resultBuilder = ['#'];
41203 # for (var i = 0; i < missingZeros; i++) {
41204 # resultBuilder.push('0');
41205 # }
41206 # resultBuilder.push(hexString);
41207 # return resultBuilder.join('');
41208 # };
41209 #
41210 # // ...
41211 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41212 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41213 # the final pixel color is defined by the equation:
41214 #
41215 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41216 #
41217 # This means that a value of 1.0 corresponds to a solid color, whereas
41218 # a value of 0.0 corresponds to a completely transparent color. This
41219 # uses a wrapper message rather than a simple float scalar so that it is
41220 # possible to distinguish between a default value and the value being unset.
41221 # If omitted, this color object is to be rendered as a solid color
41222 # (as if the alpha value had been explicitly given with a value of 1.0).
41223 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41224 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41225 },
41226 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070041227 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041228 "style": "A String", # The style of the border.
41229 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070041230 "bottom": { # A border along a cell. # The bottom border of the cell.
41231 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41232 # for simplicity of conversion to/from color representations in various
41233 # languages over compactness; for example, the fields of this representation
41234 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41235 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41236 # method in iOS; and, with just a little work, it can be easily formatted into
41237 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41238 #
41239 # Example (Java):
41240 #
41241 # import com.google.type.Color;
41242 #
41243 # // ...
41244 # public static java.awt.Color fromProto(Color protocolor) {
41245 # float alpha = protocolor.hasAlpha()
41246 # ? protocolor.getAlpha().getValue()
41247 # : 1.0;
41248 #
41249 # return new java.awt.Color(
41250 # protocolor.getRed(),
41251 # protocolor.getGreen(),
41252 # protocolor.getBlue(),
41253 # alpha);
41254 # }
41255 #
41256 # public static Color toProto(java.awt.Color color) {
41257 # float red = (float) color.getRed();
41258 # float green = (float) color.getGreen();
41259 # float blue = (float) color.getBlue();
41260 # float denominator = 255.0;
41261 # Color.Builder resultBuilder =
41262 # Color
41263 # .newBuilder()
41264 # .setRed(red / denominator)
41265 # .setGreen(green / denominator)
41266 # .setBlue(blue / denominator);
41267 # int alpha = color.getAlpha();
41268 # if (alpha != 255) {
41269 # result.setAlpha(
41270 # FloatValue
41271 # .newBuilder()
41272 # .setValue(((float) alpha) / denominator)
41273 # .build());
41274 # }
41275 # return resultBuilder.build();
41276 # }
41277 # // ...
41278 #
41279 # Example (iOS / Obj-C):
41280 #
41281 # // ...
41282 # static UIColor* fromProto(Color* protocolor) {
41283 # float red = [protocolor red];
41284 # float green = [protocolor green];
41285 # float blue = [protocolor blue];
41286 # FloatValue* alpha_wrapper = [protocolor alpha];
41287 # float alpha = 1.0;
41288 # if (alpha_wrapper != nil) {
41289 # alpha = [alpha_wrapper value];
41290 # }
41291 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41292 # }
41293 #
41294 # static Color* toProto(UIColor* color) {
41295 # CGFloat red, green, blue, alpha;
41296 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41297 # return nil;
41298 # }
41299 # Color* result = [Color alloc] init];
41300 # [result setRed:red];
41301 # [result setGreen:green];
41302 # [result setBlue:blue];
41303 # if (alpha <= 0.9999) {
41304 # [result setAlpha:floatWrapperWithValue(alpha)];
41305 # }
41306 # [result autorelease];
41307 # return result;
41308 # }
41309 # // ...
41310 #
41311 # Example (JavaScript):
41312 #
41313 # // ...
41314 #
41315 # var protoToCssColor = function(rgb_color) {
41316 # var redFrac = rgb_color.red || 0.0;
41317 # var greenFrac = rgb_color.green || 0.0;
41318 # var blueFrac = rgb_color.blue || 0.0;
41319 # var red = Math.floor(redFrac * 255);
41320 # var green = Math.floor(greenFrac * 255);
41321 # var blue = Math.floor(blueFrac * 255);
41322 #
41323 # if (!('alpha' in rgb_color)) {
41324 # return rgbToCssColor_(red, green, blue);
41325 # }
41326 #
41327 # var alphaFrac = rgb_color.alpha.value || 0.0;
41328 # var rgbParams = [red, green, blue].join(',');
41329 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41330 # };
41331 #
41332 # var rgbToCssColor_ = function(red, green, blue) {
41333 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41334 # var hexString = rgbNumber.toString(16);
41335 # var missingZeros = 6 - hexString.length;
41336 # var resultBuilder = ['#'];
41337 # for (var i = 0; i < missingZeros; i++) {
41338 # resultBuilder.push('0');
41339 # }
41340 # resultBuilder.push(hexString);
41341 # return resultBuilder.join('');
41342 # };
41343 #
41344 # // ...
41345 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41346 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41347 # the final pixel color is defined by the equation:
41348 #
41349 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41350 #
41351 # This means that a value of 1.0 corresponds to a solid color, whereas
41352 # a value of 0.0 corresponds to a completely transparent color. This
41353 # uses a wrapper message rather than a simple float scalar so that it is
41354 # possible to distinguish between a default value and the value being unset.
41355 # If omitted, this color object is to be rendered as a solid color
41356 # (as if the alpha value had been explicitly given with a value of 1.0).
41357 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41358 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41359 },
41360 "width": 42, # The width of the border, in pixels.
41361 # Deprecated; the width is determined by the "style" field.
41362 "style": "A String", # The style of the border.
41363 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041364 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070041365 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041366 },
41367 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
41368 #
41369 # When writing, the new data validation rule will overwrite any prior rule.
41370 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
41371 # If true, "List" conditions will show a dropdown.
41372 "strict": True or False, # True if invalid data should be rejected.
41373 "inputMessage": "A String", # A message to show the user when adding data to the cell.
41374 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
41375 # BooleanConditions are used by conditional formatting,
41376 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041377 "values": [ # The values of the condition. The number of supported values depends
41378 # on the condition type. Some support zero values,
41379 # others one or two values,
41380 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
41381 { # The value of the condition.
41382 "relativeDate": "A String", # A relative date (based on the current date).
41383 # Valid only if the type is
41384 # DATE_BEFORE,
41385 # DATE_AFTER,
41386 # DATE_ON_OR_BEFORE or
41387 # DATE_ON_OR_AFTER.
41388 #
41389 # Relative dates are not supported in data validation.
41390 # They are supported only in conditional formatting and
41391 # conditional filters.
41392 "userEnteredValue": "A String", # A value the condition is based on.
41393 # The value will be parsed as if the user typed into a cell.
41394 # Formulas are supported (and must begin with an `=`).
41395 },
41396 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041397 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041398 },
41399 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041400 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
41401 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041402 # Runs start at specific indexes in the text and continue until the next
41403 # run. Properties of a run will continue unless explicitly changed
41404 # in a subsequent run (and properties of the first run will continue
41405 # the properties of the cell unless explicitly changed).
41406 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041407 # When writing, the new runs will overwrite any prior runs. When writing a
41408 # new user_entered_value, previous runs will be erased.
41409 { # A run of a text format. The format of this run continues until the start
41410 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041411 # When updating, all fields must be set.
41412 "startIndex": 42, # The character index where this run starts.
41413 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
41414 # Absent values indicate that the field isn't specified.
41415 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
41416 # for simplicity of conversion to/from color representations in various
41417 # languages over compactness; for example, the fields of this representation
41418 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41419 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41420 # method in iOS; and, with just a little work, it can be easily formatted into
41421 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41422 #
41423 # Example (Java):
41424 #
41425 # import com.google.type.Color;
41426 #
41427 # // ...
41428 # public static java.awt.Color fromProto(Color protocolor) {
41429 # float alpha = protocolor.hasAlpha()
41430 # ? protocolor.getAlpha().getValue()
41431 # : 1.0;
41432 #
41433 # return new java.awt.Color(
41434 # protocolor.getRed(),
41435 # protocolor.getGreen(),
41436 # protocolor.getBlue(),
41437 # alpha);
41438 # }
41439 #
41440 # public static Color toProto(java.awt.Color color) {
41441 # float red = (float) color.getRed();
41442 # float green = (float) color.getGreen();
41443 # float blue = (float) color.getBlue();
41444 # float denominator = 255.0;
41445 # Color.Builder resultBuilder =
41446 # Color
41447 # .newBuilder()
41448 # .setRed(red / denominator)
41449 # .setGreen(green / denominator)
41450 # .setBlue(blue / denominator);
41451 # int alpha = color.getAlpha();
41452 # if (alpha != 255) {
41453 # result.setAlpha(
41454 # FloatValue
41455 # .newBuilder()
41456 # .setValue(((float) alpha) / denominator)
41457 # .build());
41458 # }
41459 # return resultBuilder.build();
41460 # }
41461 # // ...
41462 #
41463 # Example (iOS / Obj-C):
41464 #
41465 # // ...
41466 # static UIColor* fromProto(Color* protocolor) {
41467 # float red = [protocolor red];
41468 # float green = [protocolor green];
41469 # float blue = [protocolor blue];
41470 # FloatValue* alpha_wrapper = [protocolor alpha];
41471 # float alpha = 1.0;
41472 # if (alpha_wrapper != nil) {
41473 # alpha = [alpha_wrapper value];
41474 # }
41475 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41476 # }
41477 #
41478 # static Color* toProto(UIColor* color) {
41479 # CGFloat red, green, blue, alpha;
41480 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41481 # return nil;
41482 # }
41483 # Color* result = [Color alloc] init];
41484 # [result setRed:red];
41485 # [result setGreen:green];
41486 # [result setBlue:blue];
41487 # if (alpha <= 0.9999) {
41488 # [result setAlpha:floatWrapperWithValue(alpha)];
41489 # }
41490 # [result autorelease];
41491 # return result;
41492 # }
41493 # // ...
41494 #
41495 # Example (JavaScript):
41496 #
41497 # // ...
41498 #
41499 # var protoToCssColor = function(rgb_color) {
41500 # var redFrac = rgb_color.red || 0.0;
41501 # var greenFrac = rgb_color.green || 0.0;
41502 # var blueFrac = rgb_color.blue || 0.0;
41503 # var red = Math.floor(redFrac * 255);
41504 # var green = Math.floor(greenFrac * 255);
41505 # var blue = Math.floor(blueFrac * 255);
41506 #
41507 # if (!('alpha' in rgb_color)) {
41508 # return rgbToCssColor_(red, green, blue);
41509 # }
41510 #
41511 # var alphaFrac = rgb_color.alpha.value || 0.0;
41512 # var rgbParams = [red, green, blue].join(',');
41513 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41514 # };
41515 #
41516 # var rgbToCssColor_ = function(red, green, blue) {
41517 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41518 # var hexString = rgbNumber.toString(16);
41519 # var missingZeros = 6 - hexString.length;
41520 # var resultBuilder = ['#'];
41521 # for (var i = 0; i < missingZeros; i++) {
41522 # resultBuilder.push('0');
41523 # }
41524 # resultBuilder.push(hexString);
41525 # return resultBuilder.join('');
41526 # };
41527 #
41528 # // ...
41529 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41530 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41531 # the final pixel color is defined by the equation:
41532 #
41533 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41534 #
41535 # This means that a value of 1.0 corresponds to a solid color, whereas
41536 # a value of 0.0 corresponds to a completely transparent color. This
41537 # uses a wrapper message rather than a simple float scalar so that it is
41538 # possible to distinguish between a default value and the value being unset.
41539 # If omitted, this color object is to be rendered as a solid color
41540 # (as if the alpha value had been explicitly given with a value of 1.0).
41541 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41542 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41543 },
41544 "bold": True or False, # True if the text is bold.
41545 "strikethrough": True or False, # True if the text has a strikethrough.
41546 "fontFamily": "A String", # The font family.
41547 "fontSize": 42, # The size of the font.
41548 "italic": True or False, # True if the text is italicized.
41549 "underline": True or False, # True if the text is underlined.
41550 },
41551 },
41552 ],
41553 },
41554 ],
41555 },
41556 ],
41557 },
41558 ],
41559 "properties": { # Properties of a sheet. # The properties of the sheet.
41560 "sheetType": "A String", # The type of sheet. Defaults to GRID.
41561 # This field cannot be changed once set.
41562 "index": 42, # The index of the sheet within the spreadsheet.
41563 # When adding or updating sheet properties, if this field
41564 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041565 # of the sheet list. When updating sheet indices or inserting
41566 # sheets, movement is considered in "before the move" indexes.
41567 # For example, if there were 3 sheets (S1, S2, S3) in order to
41568 # move S1 ahead of S2 the index would have to be set to 2. A sheet
41569 # index update request will be ignored if the requested index is
41570 # identical to the sheets current index or if the requested new
41571 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041572 "title": "A String", # The name of the sheet.
41573 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
41574 # (If the sheet is an object sheet, containing a chart or image, then
41575 # this field will be absent.)
41576 # When writing it is an error to set any grid properties on non-grid sheets.
41577 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070041578 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041579 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
41580 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070041581 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041582 },
41583 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
41584 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
41585 # for simplicity of conversion to/from color representations in various
41586 # languages over compactness; for example, the fields of this representation
41587 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41588 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41589 # method in iOS; and, with just a little work, it can be easily formatted into
41590 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41591 #
41592 # Example (Java):
41593 #
41594 # import com.google.type.Color;
41595 #
41596 # // ...
41597 # public static java.awt.Color fromProto(Color protocolor) {
41598 # float alpha = protocolor.hasAlpha()
41599 # ? protocolor.getAlpha().getValue()
41600 # : 1.0;
41601 #
41602 # return new java.awt.Color(
41603 # protocolor.getRed(),
41604 # protocolor.getGreen(),
41605 # protocolor.getBlue(),
41606 # alpha);
41607 # }
41608 #
41609 # public static Color toProto(java.awt.Color color) {
41610 # float red = (float) color.getRed();
41611 # float green = (float) color.getGreen();
41612 # float blue = (float) color.getBlue();
41613 # float denominator = 255.0;
41614 # Color.Builder resultBuilder =
41615 # Color
41616 # .newBuilder()
41617 # .setRed(red / denominator)
41618 # .setGreen(green / denominator)
41619 # .setBlue(blue / denominator);
41620 # int alpha = color.getAlpha();
41621 # if (alpha != 255) {
41622 # result.setAlpha(
41623 # FloatValue
41624 # .newBuilder()
41625 # .setValue(((float) alpha) / denominator)
41626 # .build());
41627 # }
41628 # return resultBuilder.build();
41629 # }
41630 # // ...
41631 #
41632 # Example (iOS / Obj-C):
41633 #
41634 # // ...
41635 # static UIColor* fromProto(Color* protocolor) {
41636 # float red = [protocolor red];
41637 # float green = [protocolor green];
41638 # float blue = [protocolor blue];
41639 # FloatValue* alpha_wrapper = [protocolor alpha];
41640 # float alpha = 1.0;
41641 # if (alpha_wrapper != nil) {
41642 # alpha = [alpha_wrapper value];
41643 # }
41644 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41645 # }
41646 #
41647 # static Color* toProto(UIColor* color) {
41648 # CGFloat red, green, blue, alpha;
41649 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41650 # return nil;
41651 # }
41652 # Color* result = [Color alloc] init];
41653 # [result setRed:red];
41654 # [result setGreen:green];
41655 # [result setBlue:blue];
41656 # if (alpha <= 0.9999) {
41657 # [result setAlpha:floatWrapperWithValue(alpha)];
41658 # }
41659 # [result autorelease];
41660 # return result;
41661 # }
41662 # // ...
41663 #
41664 # Example (JavaScript):
41665 #
41666 # // ...
41667 #
41668 # var protoToCssColor = function(rgb_color) {
41669 # var redFrac = rgb_color.red || 0.0;
41670 # var greenFrac = rgb_color.green || 0.0;
41671 # var blueFrac = rgb_color.blue || 0.0;
41672 # var red = Math.floor(redFrac * 255);
41673 # var green = Math.floor(greenFrac * 255);
41674 # var blue = Math.floor(blueFrac * 255);
41675 #
41676 # if (!('alpha' in rgb_color)) {
41677 # return rgbToCssColor_(red, green, blue);
41678 # }
41679 #
41680 # var alphaFrac = rgb_color.alpha.value || 0.0;
41681 # var rgbParams = [red, green, blue].join(',');
41682 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41683 # };
41684 #
41685 # var rgbToCssColor_ = function(red, green, blue) {
41686 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41687 # var hexString = rgbNumber.toString(16);
41688 # var missingZeros = 6 - hexString.length;
41689 # var resultBuilder = ['#'];
41690 # for (var i = 0; i < missingZeros; i++) {
41691 # resultBuilder.push('0');
41692 # }
41693 # resultBuilder.push(hexString);
41694 # return resultBuilder.join('');
41695 # };
41696 #
41697 # // ...
41698 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41699 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41700 # the final pixel color is defined by the equation:
41701 #
41702 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41703 #
41704 # This means that a value of 1.0 corresponds to a solid color, whereas
41705 # a value of 0.0 corresponds to a completely transparent color. This
41706 # uses a wrapper message rather than a simple float scalar so that it is
41707 # possible to distinguish between a default value and the value being unset.
41708 # If omitted, this color object is to be rendered as a solid color
41709 # (as if the alpha value had been explicitly given with a value of 1.0).
41710 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41711 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41712 },
41713 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
41714 "sheetId": 42, # The ID of the sheet. Must be non-negative.
41715 # This field cannot be changed once set.
41716 },
41717 },
41718 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041719 "spreadsheetUrl": "A String", # The url of the spreadsheet.
41720 # This field is read-only.
41721 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041722</div>
41723
41724<div class="method">
41725 <code class="details" id="get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041726 <pre>Returns the spreadsheet at the given ID.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041727The caller must specify the spreadsheet ID.
41728
41729By default, data within grids will not be returned.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041730You can include grid data one of two ways:
41731
41732* Specify a field mask listing your desired fields using the `fields` URL
41733parameter in HTTP
41734
41735* Set the includeGridData
41736URL parameter to true. If a field mask is set, the `includeGridData`
41737parameter is ignored
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041738
41739For large spreadsheets, it is recommended to retrieve only the specific
41740fields of the spreadsheet that you want.
41741
41742To retrieve only subsets of the spreadsheet, use the
41743ranges URL parameter.
41744Multiple ranges can be specified. Limiting the range will
41745return only the portions of the spreadsheet that intersect the requested
41746ranges. Ranges are specified using A1 notation.
41747
41748Args:
41749 spreadsheetId: string, The spreadsheet to request. (required)
41750 ranges: string, The ranges to retrieve from the spreadsheet. (repeated)
41751 x__xgafv: string, V1 error format.
41752 Allowed values
41753 1 - v1 error format
41754 2 - v2 error format
41755 includeGridData: boolean, True if grid data should be returned.
41756This parameter is ignored if a field mask was set in the request.
41757
41758Returns:
41759 An object of the form:
41760
41761 { # Resource that represents a spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041762 "spreadsheetId": "A String", # The ID of the spreadsheet.
41763 # This field is read-only.
41764 "namedRanges": [ # The named ranges defined in a spreadsheet.
41765 { # A named range.
41766 "namedRangeId": "A String", # The ID of the named range.
41767 "range": { # A range on a sheet. # The range this represents.
41768 # All indexes are zero-based.
41769 # Indexes are half open, e.g the start index is inclusive
41770 # and the end index is exclusive -- [start_index, end_index).
41771 # Missing indexes indicate the range is unbounded on that side.
41772 #
41773 # For example, if `"Sheet1"` is sheet ID 0, then:
41774 #
41775 # `Sheet1!A1:A1 == sheet_id: 0,
41776 # start_row_index: 0, end_row_index: 1,
41777 # start_column_index: 0, end_column_index: 1`
41778 #
41779 # `Sheet1!A3:B4 == sheet_id: 0,
41780 # start_row_index: 2, end_row_index: 4,
41781 # start_column_index: 0, end_column_index: 2`
41782 #
41783 # `Sheet1!A:B == sheet_id: 0,
41784 # start_column_index: 0, end_column_index: 2`
41785 #
41786 # `Sheet1!A5:B == sheet_id: 0,
41787 # start_row_index: 4,
41788 # start_column_index: 0, end_column_index: 2`
41789 #
41790 # `Sheet1 == sheet_id:0`
41791 #
41792 # The start index must always be less than or equal to the end index.
41793 # If the start index equals the end index, then the range is empty.
41794 # Empty ranges are typically not meaningful and are usually rendered in the
41795 # UI as `#REF!`.
41796 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070041797 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041798 "sheetId": 42, # The sheet this range is on.
41799 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070041800 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041801 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041802 "name": "A String", # The name of the named range.
41803 },
41804 ],
41805 "properties": { # Properties of a spreadsheet. # Overall properties of a spreadsheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041806 "title": "A String", # The title of the spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041807 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
41808 #
41809 # * an ISO 639-1 language code such as `en`
41810 #
41811 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
41812 #
41813 # * a combination of the ISO language code and country code, such as `en_US`
41814 #
41815 # Note: when updating this field, not all locales/languages are supported.
Thomas Coffee2f245372017-03-27 10:39:26 -070041816 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041817 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
41818 # CellData.effectiveFormat will not be set if the
41819 # cell's format is equal to this default format.
41820 # This field is read-only.
41821 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
41822 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
41823 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041824 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041825 # information about the supported patterns.
41826 "type": "A String", # The type of the number format.
41827 # When writing, this field must be set.
41828 },
41829 "textDirection": "A String", # The direction of the text in the cell.
41830 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
41831 # When updating padding, every field must be specified.
41832 "top": 42, # The top padding of the cell.
41833 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041834 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041835 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041836 },
Thomas Coffee2f245372017-03-27 10:39:26 -070041837 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041838 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
41839 # for simplicity of conversion to/from color representations in various
41840 # languages over compactness; for example, the fields of this representation
41841 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41842 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41843 # method in iOS; and, with just a little work, it can be easily formatted into
41844 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041845 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041846 # Example (Java):
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041847 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041848 # import com.google.type.Color;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041849 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041850 # // ...
41851 # public static java.awt.Color fromProto(Color protocolor) {
41852 # float alpha = protocolor.hasAlpha()
41853 # ? protocolor.getAlpha().getValue()
41854 # : 1.0;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041855 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041856 # return new java.awt.Color(
41857 # protocolor.getRed(),
41858 # protocolor.getGreen(),
41859 # protocolor.getBlue(),
41860 # alpha);
41861 # }
41862 #
41863 # public static Color toProto(java.awt.Color color) {
41864 # float red = (float) color.getRed();
41865 # float green = (float) color.getGreen();
41866 # float blue = (float) color.getBlue();
41867 # float denominator = 255.0;
41868 # Color.Builder resultBuilder =
41869 # Color
41870 # .newBuilder()
41871 # .setRed(red / denominator)
41872 # .setGreen(green / denominator)
41873 # .setBlue(blue / denominator);
41874 # int alpha = color.getAlpha();
41875 # if (alpha != 255) {
41876 # result.setAlpha(
41877 # FloatValue
41878 # .newBuilder()
41879 # .setValue(((float) alpha) / denominator)
41880 # .build());
41881 # }
41882 # return resultBuilder.build();
41883 # }
41884 # // ...
41885 #
41886 # Example (iOS / Obj-C):
41887 #
41888 # // ...
41889 # static UIColor* fromProto(Color* protocolor) {
41890 # float red = [protocolor red];
41891 # float green = [protocolor green];
41892 # float blue = [protocolor blue];
41893 # FloatValue* alpha_wrapper = [protocolor alpha];
41894 # float alpha = 1.0;
41895 # if (alpha_wrapper != nil) {
41896 # alpha = [alpha_wrapper value];
41897 # }
41898 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41899 # }
41900 #
41901 # static Color* toProto(UIColor* color) {
41902 # CGFloat red, green, blue, alpha;
41903 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41904 # return nil;
41905 # }
41906 # Color* result = [Color alloc] init];
41907 # [result setRed:red];
41908 # [result setGreen:green];
41909 # [result setBlue:blue];
41910 # if (alpha <= 0.9999) {
41911 # [result setAlpha:floatWrapperWithValue(alpha)];
41912 # }
41913 # [result autorelease];
41914 # return result;
41915 # }
41916 # // ...
41917 #
41918 # Example (JavaScript):
41919 #
41920 # // ...
41921 #
41922 # var protoToCssColor = function(rgb_color) {
41923 # var redFrac = rgb_color.red || 0.0;
41924 # var greenFrac = rgb_color.green || 0.0;
41925 # var blueFrac = rgb_color.blue || 0.0;
41926 # var red = Math.floor(redFrac * 255);
41927 # var green = Math.floor(greenFrac * 255);
41928 # var blue = Math.floor(blueFrac * 255);
41929 #
41930 # if (!('alpha' in rgb_color)) {
41931 # return rgbToCssColor_(red, green, blue);
41932 # }
41933 #
41934 # var alphaFrac = rgb_color.alpha.value || 0.0;
41935 # var rgbParams = [red, green, blue].join(',');
41936 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41937 # };
41938 #
41939 # var rgbToCssColor_ = function(red, green, blue) {
41940 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41941 # var hexString = rgbNumber.toString(16);
41942 # var missingZeros = 6 - hexString.length;
41943 # var resultBuilder = ['#'];
41944 # for (var i = 0; i < missingZeros; i++) {
41945 # resultBuilder.push('0');
41946 # }
41947 # resultBuilder.push(hexString);
41948 # return resultBuilder.join('');
41949 # };
41950 #
41951 # // ...
41952 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41953 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41954 # the final pixel color is defined by the equation:
41955 #
41956 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41957 #
41958 # This means that a value of 1.0 corresponds to a solid color, whereas
41959 # a value of 0.0 corresponds to a completely transparent color. This
41960 # uses a wrapper message rather than a simple float scalar so that it is
41961 # possible to distinguish between a default value and the value being unset.
41962 # If omitted, this color object is to be rendered as a solid color
41963 # (as if the alpha value had been explicitly given with a value of 1.0).
41964 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41965 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41966 },
Thomas Coffee2f245372017-03-27 10:39:26 -070041967 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041968 "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).
41969 # Absent values indicate that the field isn't specified.
41970 "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 -070041971 # for simplicity of conversion to/from color representations in various
41972 # languages over compactness; for example, the fields of this representation
41973 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41974 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41975 # method in iOS; and, with just a little work, it can be easily formatted into
41976 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41977 #
41978 # Example (Java):
41979 #
41980 # import com.google.type.Color;
41981 #
41982 # // ...
41983 # public static java.awt.Color fromProto(Color protocolor) {
41984 # float alpha = protocolor.hasAlpha()
41985 # ? protocolor.getAlpha().getValue()
41986 # : 1.0;
41987 #
41988 # return new java.awt.Color(
41989 # protocolor.getRed(),
41990 # protocolor.getGreen(),
41991 # protocolor.getBlue(),
41992 # alpha);
41993 # }
41994 #
41995 # public static Color toProto(java.awt.Color color) {
41996 # float red = (float) color.getRed();
41997 # float green = (float) color.getGreen();
41998 # float blue = (float) color.getBlue();
41999 # float denominator = 255.0;
42000 # Color.Builder resultBuilder =
42001 # Color
42002 # .newBuilder()
42003 # .setRed(red / denominator)
42004 # .setGreen(green / denominator)
42005 # .setBlue(blue / denominator);
42006 # int alpha = color.getAlpha();
42007 # if (alpha != 255) {
42008 # result.setAlpha(
42009 # FloatValue
42010 # .newBuilder()
42011 # .setValue(((float) alpha) / denominator)
42012 # .build());
42013 # }
42014 # return resultBuilder.build();
42015 # }
42016 # // ...
42017 #
42018 # Example (iOS / Obj-C):
42019 #
42020 # // ...
42021 # static UIColor* fromProto(Color* protocolor) {
42022 # float red = [protocolor red];
42023 # float green = [protocolor green];
42024 # float blue = [protocolor blue];
42025 # FloatValue* alpha_wrapper = [protocolor alpha];
42026 # float alpha = 1.0;
42027 # if (alpha_wrapper != nil) {
42028 # alpha = [alpha_wrapper value];
42029 # }
42030 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42031 # }
42032 #
42033 # static Color* toProto(UIColor* color) {
42034 # CGFloat red, green, blue, alpha;
42035 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42036 # return nil;
42037 # }
42038 # Color* result = [Color alloc] init];
42039 # [result setRed:red];
42040 # [result setGreen:green];
42041 # [result setBlue:blue];
42042 # if (alpha <= 0.9999) {
42043 # [result setAlpha:floatWrapperWithValue(alpha)];
42044 # }
42045 # [result autorelease];
42046 # return result;
42047 # }
42048 # // ...
42049 #
42050 # Example (JavaScript):
42051 #
42052 # // ...
42053 #
42054 # var protoToCssColor = function(rgb_color) {
42055 # var redFrac = rgb_color.red || 0.0;
42056 # var greenFrac = rgb_color.green || 0.0;
42057 # var blueFrac = rgb_color.blue || 0.0;
42058 # var red = Math.floor(redFrac * 255);
42059 # var green = Math.floor(greenFrac * 255);
42060 # var blue = Math.floor(blueFrac * 255);
42061 #
42062 # if (!('alpha' in rgb_color)) {
42063 # return rgbToCssColor_(red, green, blue);
42064 # }
42065 #
42066 # var alphaFrac = rgb_color.alpha.value || 0.0;
42067 # var rgbParams = [red, green, blue].join(',');
42068 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42069 # };
42070 #
42071 # var rgbToCssColor_ = function(red, green, blue) {
42072 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42073 # var hexString = rgbNumber.toString(16);
42074 # var missingZeros = 6 - hexString.length;
42075 # var resultBuilder = ['#'];
42076 # for (var i = 0; i < missingZeros; i++) {
42077 # resultBuilder.push('0');
42078 # }
42079 # resultBuilder.push(hexString);
42080 # return resultBuilder.join('');
42081 # };
42082 #
42083 # // ...
42084 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42085 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42086 # the final pixel color is defined by the equation:
42087 #
42088 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42089 #
42090 # This means that a value of 1.0 corresponds to a solid color, whereas
42091 # a value of 0.0 corresponds to a completely transparent color. This
42092 # uses a wrapper message rather than a simple float scalar so that it is
42093 # possible to distinguish between a default value and the value being unset.
42094 # If omitted, this color object is to be rendered as a solid color
42095 # (as if the alpha value had been explicitly given with a value of 1.0).
42096 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42097 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42098 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042099 "bold": True or False, # True if the text is bold.
42100 "strikethrough": True or False, # True if the text has a strikethrough.
42101 "fontFamily": "A String", # The font family.
42102 "fontSize": 42, # The size of the font.
42103 "italic": True or False, # True if the text is italicized.
42104 "underline": True or False, # True if the text is underlined.
42105 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042106 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
42107 "angle": 42, # The angle between the standard orientation and the desired orientation.
42108 # Measured in degrees. Valid values are between -90 and 90. Positive
42109 # angles are angled upwards, negative are angled downwards.
42110 #
42111 # Note: For LTR text direction positive angles are in the counterclockwise
42112 # direction, whereas for RTL they are in the clockwise direction
42113 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
42114 # characters is unchanged.
42115 # For example:
42116 #
42117 # | V |
42118 # | e |
42119 # | r |
42120 # | t |
42121 # | i |
42122 # | c |
42123 # | a |
42124 # | l |
42125 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042126 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
42127 "borders": { # The borders of the cell. # The borders of the cell.
42128 "top": { # A border along a cell. # The top border of the cell.
42129 "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 -070042130 # for simplicity of conversion to/from color representations in various
42131 # languages over compactness; for example, the fields of this representation
42132 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42133 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42134 # method in iOS; and, with just a little work, it can be easily formatted into
42135 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42136 #
42137 # Example (Java):
42138 #
42139 # import com.google.type.Color;
42140 #
42141 # // ...
42142 # public static java.awt.Color fromProto(Color protocolor) {
42143 # float alpha = protocolor.hasAlpha()
42144 # ? protocolor.getAlpha().getValue()
42145 # : 1.0;
42146 #
42147 # return new java.awt.Color(
42148 # protocolor.getRed(),
42149 # protocolor.getGreen(),
42150 # protocolor.getBlue(),
42151 # alpha);
42152 # }
42153 #
42154 # public static Color toProto(java.awt.Color color) {
42155 # float red = (float) color.getRed();
42156 # float green = (float) color.getGreen();
42157 # float blue = (float) color.getBlue();
42158 # float denominator = 255.0;
42159 # Color.Builder resultBuilder =
42160 # Color
42161 # .newBuilder()
42162 # .setRed(red / denominator)
42163 # .setGreen(green / denominator)
42164 # .setBlue(blue / denominator);
42165 # int alpha = color.getAlpha();
42166 # if (alpha != 255) {
42167 # result.setAlpha(
42168 # FloatValue
42169 # .newBuilder()
42170 # .setValue(((float) alpha) / denominator)
42171 # .build());
42172 # }
42173 # return resultBuilder.build();
42174 # }
42175 # // ...
42176 #
42177 # Example (iOS / Obj-C):
42178 #
42179 # // ...
42180 # static UIColor* fromProto(Color* protocolor) {
42181 # float red = [protocolor red];
42182 # float green = [protocolor green];
42183 # float blue = [protocolor blue];
42184 # FloatValue* alpha_wrapper = [protocolor alpha];
42185 # float alpha = 1.0;
42186 # if (alpha_wrapper != nil) {
42187 # alpha = [alpha_wrapper value];
42188 # }
42189 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42190 # }
42191 #
42192 # static Color* toProto(UIColor* color) {
42193 # CGFloat red, green, blue, alpha;
42194 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42195 # return nil;
42196 # }
42197 # Color* result = [Color alloc] init];
42198 # [result setRed:red];
42199 # [result setGreen:green];
42200 # [result setBlue:blue];
42201 # if (alpha <= 0.9999) {
42202 # [result setAlpha:floatWrapperWithValue(alpha)];
42203 # }
42204 # [result autorelease];
42205 # return result;
42206 # }
42207 # // ...
42208 #
42209 # Example (JavaScript):
42210 #
42211 # // ...
42212 #
42213 # var protoToCssColor = function(rgb_color) {
42214 # var redFrac = rgb_color.red || 0.0;
42215 # var greenFrac = rgb_color.green || 0.0;
42216 # var blueFrac = rgb_color.blue || 0.0;
42217 # var red = Math.floor(redFrac * 255);
42218 # var green = Math.floor(greenFrac * 255);
42219 # var blue = Math.floor(blueFrac * 255);
42220 #
42221 # if (!('alpha' in rgb_color)) {
42222 # return rgbToCssColor_(red, green, blue);
42223 # }
42224 #
42225 # var alphaFrac = rgb_color.alpha.value || 0.0;
42226 # var rgbParams = [red, green, blue].join(',');
42227 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42228 # };
42229 #
42230 # var rgbToCssColor_ = function(red, green, blue) {
42231 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42232 # var hexString = rgbNumber.toString(16);
42233 # var missingZeros = 6 - hexString.length;
42234 # var resultBuilder = ['#'];
42235 # for (var i = 0; i < missingZeros; i++) {
42236 # resultBuilder.push('0');
42237 # }
42238 # resultBuilder.push(hexString);
42239 # return resultBuilder.join('');
42240 # };
42241 #
42242 # // ...
42243 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42244 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42245 # the final pixel color is defined by the equation:
42246 #
42247 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42248 #
42249 # This means that a value of 1.0 corresponds to a solid color, whereas
42250 # a value of 0.0 corresponds to a completely transparent color. This
42251 # uses a wrapper message rather than a simple float scalar so that it is
42252 # possible to distinguish between a default value and the value being unset.
42253 # If omitted, this color object is to be rendered as a solid color
42254 # (as if the alpha value had been explicitly given with a value of 1.0).
42255 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42256 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42257 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042258 "width": 42, # The width of the border, in pixels.
42259 # Deprecated; the width is determined by the "style" field.
42260 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042261 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042262 "right": { # A border along a cell. # The right border of the cell.
42263 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42264 # for simplicity of conversion to/from color representations in various
42265 # languages over compactness; for example, the fields of this representation
42266 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42267 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42268 # method in iOS; and, with just a little work, it can be easily formatted into
42269 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42270 #
42271 # Example (Java):
42272 #
42273 # import com.google.type.Color;
42274 #
42275 # // ...
42276 # public static java.awt.Color fromProto(Color protocolor) {
42277 # float alpha = protocolor.hasAlpha()
42278 # ? protocolor.getAlpha().getValue()
42279 # : 1.0;
42280 #
42281 # return new java.awt.Color(
42282 # protocolor.getRed(),
42283 # protocolor.getGreen(),
42284 # protocolor.getBlue(),
42285 # alpha);
42286 # }
42287 #
42288 # public static Color toProto(java.awt.Color color) {
42289 # float red = (float) color.getRed();
42290 # float green = (float) color.getGreen();
42291 # float blue = (float) color.getBlue();
42292 # float denominator = 255.0;
42293 # Color.Builder resultBuilder =
42294 # Color
42295 # .newBuilder()
42296 # .setRed(red / denominator)
42297 # .setGreen(green / denominator)
42298 # .setBlue(blue / denominator);
42299 # int alpha = color.getAlpha();
42300 # if (alpha != 255) {
42301 # result.setAlpha(
42302 # FloatValue
42303 # .newBuilder()
42304 # .setValue(((float) alpha) / denominator)
42305 # .build());
42306 # }
42307 # return resultBuilder.build();
42308 # }
42309 # // ...
42310 #
42311 # Example (iOS / Obj-C):
42312 #
42313 # // ...
42314 # static UIColor* fromProto(Color* protocolor) {
42315 # float red = [protocolor red];
42316 # float green = [protocolor green];
42317 # float blue = [protocolor blue];
42318 # FloatValue* alpha_wrapper = [protocolor alpha];
42319 # float alpha = 1.0;
42320 # if (alpha_wrapper != nil) {
42321 # alpha = [alpha_wrapper value];
42322 # }
42323 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42324 # }
42325 #
42326 # static Color* toProto(UIColor* color) {
42327 # CGFloat red, green, blue, alpha;
42328 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42329 # return nil;
42330 # }
42331 # Color* result = [Color alloc] init];
42332 # [result setRed:red];
42333 # [result setGreen:green];
42334 # [result setBlue:blue];
42335 # if (alpha <= 0.9999) {
42336 # [result setAlpha:floatWrapperWithValue(alpha)];
42337 # }
42338 # [result autorelease];
42339 # return result;
42340 # }
42341 # // ...
42342 #
42343 # Example (JavaScript):
42344 #
42345 # // ...
42346 #
42347 # var protoToCssColor = function(rgb_color) {
42348 # var redFrac = rgb_color.red || 0.0;
42349 # var greenFrac = rgb_color.green || 0.0;
42350 # var blueFrac = rgb_color.blue || 0.0;
42351 # var red = Math.floor(redFrac * 255);
42352 # var green = Math.floor(greenFrac * 255);
42353 # var blue = Math.floor(blueFrac * 255);
42354 #
42355 # if (!('alpha' in rgb_color)) {
42356 # return rgbToCssColor_(red, green, blue);
42357 # }
42358 #
42359 # var alphaFrac = rgb_color.alpha.value || 0.0;
42360 # var rgbParams = [red, green, blue].join(',');
42361 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42362 # };
42363 #
42364 # var rgbToCssColor_ = function(red, green, blue) {
42365 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42366 # var hexString = rgbNumber.toString(16);
42367 # var missingZeros = 6 - hexString.length;
42368 # var resultBuilder = ['#'];
42369 # for (var i = 0; i < missingZeros; i++) {
42370 # resultBuilder.push('0');
42371 # }
42372 # resultBuilder.push(hexString);
42373 # return resultBuilder.join('');
42374 # };
42375 #
42376 # // ...
42377 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42378 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42379 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042380 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042381 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042382 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042383 # This means that a value of 1.0 corresponds to a solid color, whereas
42384 # a value of 0.0 corresponds to a completely transparent color. This
42385 # uses a wrapper message rather than a simple float scalar so that it is
42386 # possible to distinguish between a default value and the value being unset.
42387 # If omitted, this color object is to be rendered as a solid color
42388 # (as if the alpha value had been explicitly given with a value of 1.0).
42389 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42390 "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 -070042391 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042392 "width": 42, # The width of the border, in pixels.
42393 # Deprecated; the width is determined by the "style" field.
42394 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042395 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042396 "left": { # A border along a cell. # The left border of the cell.
42397 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42398 # for simplicity of conversion to/from color representations in various
42399 # languages over compactness; for example, the fields of this representation
42400 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42401 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42402 # method in iOS; and, with just a little work, it can be easily formatted into
42403 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42404 #
42405 # Example (Java):
42406 #
42407 # import com.google.type.Color;
42408 #
42409 # // ...
42410 # public static java.awt.Color fromProto(Color protocolor) {
42411 # float alpha = protocolor.hasAlpha()
42412 # ? protocolor.getAlpha().getValue()
42413 # : 1.0;
42414 #
42415 # return new java.awt.Color(
42416 # protocolor.getRed(),
42417 # protocolor.getGreen(),
42418 # protocolor.getBlue(),
42419 # alpha);
42420 # }
42421 #
42422 # public static Color toProto(java.awt.Color color) {
42423 # float red = (float) color.getRed();
42424 # float green = (float) color.getGreen();
42425 # float blue = (float) color.getBlue();
42426 # float denominator = 255.0;
42427 # Color.Builder resultBuilder =
42428 # Color
42429 # .newBuilder()
42430 # .setRed(red / denominator)
42431 # .setGreen(green / denominator)
42432 # .setBlue(blue / denominator);
42433 # int alpha = color.getAlpha();
42434 # if (alpha != 255) {
42435 # result.setAlpha(
42436 # FloatValue
42437 # .newBuilder()
42438 # .setValue(((float) alpha) / denominator)
42439 # .build());
42440 # }
42441 # return resultBuilder.build();
42442 # }
42443 # // ...
42444 #
42445 # Example (iOS / Obj-C):
42446 #
42447 # // ...
42448 # static UIColor* fromProto(Color* protocolor) {
42449 # float red = [protocolor red];
42450 # float green = [protocolor green];
42451 # float blue = [protocolor blue];
42452 # FloatValue* alpha_wrapper = [protocolor alpha];
42453 # float alpha = 1.0;
42454 # if (alpha_wrapper != nil) {
42455 # alpha = [alpha_wrapper value];
42456 # }
42457 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42458 # }
42459 #
42460 # static Color* toProto(UIColor* color) {
42461 # CGFloat red, green, blue, alpha;
42462 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42463 # return nil;
42464 # }
42465 # Color* result = [Color alloc] init];
42466 # [result setRed:red];
42467 # [result setGreen:green];
42468 # [result setBlue:blue];
42469 # if (alpha <= 0.9999) {
42470 # [result setAlpha:floatWrapperWithValue(alpha)];
42471 # }
42472 # [result autorelease];
42473 # return result;
42474 # }
42475 # // ...
42476 #
42477 # Example (JavaScript):
42478 #
42479 # // ...
42480 #
42481 # var protoToCssColor = function(rgb_color) {
42482 # var redFrac = rgb_color.red || 0.0;
42483 # var greenFrac = rgb_color.green || 0.0;
42484 # var blueFrac = rgb_color.blue || 0.0;
42485 # var red = Math.floor(redFrac * 255);
42486 # var green = Math.floor(greenFrac * 255);
42487 # var blue = Math.floor(blueFrac * 255);
42488 #
42489 # if (!('alpha' in rgb_color)) {
42490 # return rgbToCssColor_(red, green, blue);
42491 # }
42492 #
42493 # var alphaFrac = rgb_color.alpha.value || 0.0;
42494 # var rgbParams = [red, green, blue].join(',');
42495 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42496 # };
42497 #
42498 # var rgbToCssColor_ = function(red, green, blue) {
42499 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42500 # var hexString = rgbNumber.toString(16);
42501 # var missingZeros = 6 - hexString.length;
42502 # var resultBuilder = ['#'];
42503 # for (var i = 0; i < missingZeros; i++) {
42504 # resultBuilder.push('0');
42505 # }
42506 # resultBuilder.push(hexString);
42507 # return resultBuilder.join('');
42508 # };
42509 #
42510 # // ...
42511 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42512 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42513 # the final pixel color is defined by the equation:
42514 #
42515 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42516 #
42517 # This means that a value of 1.0 corresponds to a solid color, whereas
42518 # a value of 0.0 corresponds to a completely transparent color. This
42519 # uses a wrapper message rather than a simple float scalar so that it is
42520 # possible to distinguish between a default value and the value being unset.
42521 # If omitted, this color object is to be rendered as a solid color
42522 # (as if the alpha value had been explicitly given with a value of 1.0).
42523 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42524 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42525 },
42526 "width": 42, # The width of the border, in pixels.
42527 # Deprecated; the width is determined by the "style" field.
42528 "style": "A String", # The style of the border.
42529 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042530 "bottom": { # A border along a cell. # The bottom border of the cell.
42531 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42532 # for simplicity of conversion to/from color representations in various
42533 # languages over compactness; for example, the fields of this representation
42534 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42535 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42536 # method in iOS; and, with just a little work, it can be easily formatted into
42537 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42538 #
42539 # Example (Java):
42540 #
42541 # import com.google.type.Color;
42542 #
42543 # // ...
42544 # public static java.awt.Color fromProto(Color protocolor) {
42545 # float alpha = protocolor.hasAlpha()
42546 # ? protocolor.getAlpha().getValue()
42547 # : 1.0;
42548 #
42549 # return new java.awt.Color(
42550 # protocolor.getRed(),
42551 # protocolor.getGreen(),
42552 # protocolor.getBlue(),
42553 # alpha);
42554 # }
42555 #
42556 # public static Color toProto(java.awt.Color color) {
42557 # float red = (float) color.getRed();
42558 # float green = (float) color.getGreen();
42559 # float blue = (float) color.getBlue();
42560 # float denominator = 255.0;
42561 # Color.Builder resultBuilder =
42562 # Color
42563 # .newBuilder()
42564 # .setRed(red / denominator)
42565 # .setGreen(green / denominator)
42566 # .setBlue(blue / denominator);
42567 # int alpha = color.getAlpha();
42568 # if (alpha != 255) {
42569 # result.setAlpha(
42570 # FloatValue
42571 # .newBuilder()
42572 # .setValue(((float) alpha) / denominator)
42573 # .build());
42574 # }
42575 # return resultBuilder.build();
42576 # }
42577 # // ...
42578 #
42579 # Example (iOS / Obj-C):
42580 #
42581 # // ...
42582 # static UIColor* fromProto(Color* protocolor) {
42583 # float red = [protocolor red];
42584 # float green = [protocolor green];
42585 # float blue = [protocolor blue];
42586 # FloatValue* alpha_wrapper = [protocolor alpha];
42587 # float alpha = 1.0;
42588 # if (alpha_wrapper != nil) {
42589 # alpha = [alpha_wrapper value];
42590 # }
42591 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42592 # }
42593 #
42594 # static Color* toProto(UIColor* color) {
42595 # CGFloat red, green, blue, alpha;
42596 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42597 # return nil;
42598 # }
42599 # Color* result = [Color alloc] init];
42600 # [result setRed:red];
42601 # [result setGreen:green];
42602 # [result setBlue:blue];
42603 # if (alpha <= 0.9999) {
42604 # [result setAlpha:floatWrapperWithValue(alpha)];
42605 # }
42606 # [result autorelease];
42607 # return result;
42608 # }
42609 # // ...
42610 #
42611 # Example (JavaScript):
42612 #
42613 # // ...
42614 #
42615 # var protoToCssColor = function(rgb_color) {
42616 # var redFrac = rgb_color.red || 0.0;
42617 # var greenFrac = rgb_color.green || 0.0;
42618 # var blueFrac = rgb_color.blue || 0.0;
42619 # var red = Math.floor(redFrac * 255);
42620 # var green = Math.floor(greenFrac * 255);
42621 # var blue = Math.floor(blueFrac * 255);
42622 #
42623 # if (!('alpha' in rgb_color)) {
42624 # return rgbToCssColor_(red, green, blue);
42625 # }
42626 #
42627 # var alphaFrac = rgb_color.alpha.value || 0.0;
42628 # var rgbParams = [red, green, blue].join(',');
42629 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42630 # };
42631 #
42632 # var rgbToCssColor_ = function(red, green, blue) {
42633 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42634 # var hexString = rgbNumber.toString(16);
42635 # var missingZeros = 6 - hexString.length;
42636 # var resultBuilder = ['#'];
42637 # for (var i = 0; i < missingZeros; i++) {
42638 # resultBuilder.push('0');
42639 # }
42640 # resultBuilder.push(hexString);
42641 # return resultBuilder.join('');
42642 # };
42643 #
42644 # // ...
42645 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42646 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42647 # the final pixel color is defined by the equation:
42648 #
42649 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42650 #
42651 # This means that a value of 1.0 corresponds to a solid color, whereas
42652 # a value of 0.0 corresponds to a completely transparent color. This
42653 # uses a wrapper message rather than a simple float scalar so that it is
42654 # possible to distinguish between a default value and the value being unset.
42655 # If omitted, this color object is to be rendered as a solid color
42656 # (as if the alpha value had been explicitly given with a value of 1.0).
42657 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42658 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42659 },
42660 "width": 42, # The width of the border, in pixels.
42661 # Deprecated; the width is determined by the "style" field.
42662 "style": "A String", # The style of the border.
42663 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042664 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042665 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042666 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042667 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
42668 # calculation. Absence of this field means that circular references will
42669 # result in calculation errors.
42670 # calculation.
42671 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
42672 # less than this threshold value, the calculation rounds stop.
42673 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
42674 # rounds to perform.
42675 },
42676 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
42677 # `America/New_York`. If the time zone isn't recognized, this may
42678 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042679 },
42680 "sheets": [ # The sheets that are part of a spreadsheet.
42681 { # A sheet in a spreadsheet.
42682 "conditionalFormats": [ # The conditional format rules in this sheet.
42683 { # A rule describing a conditional format.
42684 "ranges": [ # The ranges that will be formatted if the condition is true.
42685 # All the ranges must be on the same grid.
42686 { # A range on a sheet.
42687 # All indexes are zero-based.
42688 # Indexes are half open, e.g the start index is inclusive
42689 # and the end index is exclusive -- [start_index, end_index).
42690 # Missing indexes indicate the range is unbounded on that side.
42691 #
42692 # For example, if `"Sheet1"` is sheet ID 0, then:
42693 #
42694 # `Sheet1!A1:A1 == sheet_id: 0,
42695 # start_row_index: 0, end_row_index: 1,
42696 # start_column_index: 0, end_column_index: 1`
42697 #
42698 # `Sheet1!A3:B4 == sheet_id: 0,
42699 # start_row_index: 2, end_row_index: 4,
42700 # start_column_index: 0, end_column_index: 2`
42701 #
42702 # `Sheet1!A:B == sheet_id: 0,
42703 # start_column_index: 0, end_column_index: 2`
42704 #
42705 # `Sheet1!A5:B == sheet_id: 0,
42706 # start_row_index: 4,
42707 # start_column_index: 0, end_column_index: 2`
42708 #
42709 # `Sheet1 == sheet_id:0`
42710 #
42711 # The start index must always be less than or equal to the end index.
42712 # If the start index equals the end index, then the range is empty.
42713 # Empty ranges are typically not meaningful and are usually rendered in the
42714 # UI as `#REF!`.
42715 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070042716 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042717 "sheetId": 42, # The sheet this range is on.
42718 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070042719 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042720 },
42721 ],
42722 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
42723 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
42724 # the format will be applied.
42725 # BooleanConditions are used by conditional formatting,
42726 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042727 "values": [ # The values of the condition. The number of supported values depends
42728 # on the condition type. Some support zero values,
42729 # others one or two values,
42730 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
42731 { # The value of the condition.
42732 "relativeDate": "A String", # A relative date (based on the current date).
42733 # Valid only if the type is
42734 # DATE_BEFORE,
42735 # DATE_AFTER,
42736 # DATE_ON_OR_BEFORE or
42737 # DATE_ON_OR_AFTER.
42738 #
42739 # Relative dates are not supported in data validation.
42740 # They are supported only in conditional formatting and
42741 # conditional filters.
42742 "userEnteredValue": "A String", # A value the condition is based on.
42743 # The value will be parsed as if the user typed into a cell.
42744 # Formulas are supported (and must begin with an `=`).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042745 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042746 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042747 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042748 },
42749 "format": { # The format of a cell. # The format to apply.
42750 # Conditional formatting can only apply a subset of formatting:
42751 # bold, italic,
42752 # strikethrough,
42753 # foreground color &
42754 # background color.
42755 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
42756 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
42757 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042758 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042759 # information about the supported patterns.
42760 "type": "A String", # The type of the number format.
42761 # When writing, this field must be set.
42762 },
42763 "textDirection": "A String", # The direction of the text in the cell.
42764 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
42765 # When updating padding, every field must be specified.
42766 "top": 42, # The top padding of the cell.
42767 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042768 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042769 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042770 },
Thomas Coffee2f245372017-03-27 10:39:26 -070042771 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042772 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
42773 # for simplicity of conversion to/from color representations in various
42774 # languages over compactness; for example, the fields of this representation
42775 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42776 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42777 # method in iOS; and, with just a little work, it can be easily formatted into
42778 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42779 #
42780 # Example (Java):
42781 #
42782 # import com.google.type.Color;
42783 #
42784 # // ...
42785 # public static java.awt.Color fromProto(Color protocolor) {
42786 # float alpha = protocolor.hasAlpha()
42787 # ? protocolor.getAlpha().getValue()
42788 # : 1.0;
42789 #
42790 # return new java.awt.Color(
42791 # protocolor.getRed(),
42792 # protocolor.getGreen(),
42793 # protocolor.getBlue(),
42794 # alpha);
42795 # }
42796 #
42797 # public static Color toProto(java.awt.Color color) {
42798 # float red = (float) color.getRed();
42799 # float green = (float) color.getGreen();
42800 # float blue = (float) color.getBlue();
42801 # float denominator = 255.0;
42802 # Color.Builder resultBuilder =
42803 # Color
42804 # .newBuilder()
42805 # .setRed(red / denominator)
42806 # .setGreen(green / denominator)
42807 # .setBlue(blue / denominator);
42808 # int alpha = color.getAlpha();
42809 # if (alpha != 255) {
42810 # result.setAlpha(
42811 # FloatValue
42812 # .newBuilder()
42813 # .setValue(((float) alpha) / denominator)
42814 # .build());
42815 # }
42816 # return resultBuilder.build();
42817 # }
42818 # // ...
42819 #
42820 # Example (iOS / Obj-C):
42821 #
42822 # // ...
42823 # static UIColor* fromProto(Color* protocolor) {
42824 # float red = [protocolor red];
42825 # float green = [protocolor green];
42826 # float blue = [protocolor blue];
42827 # FloatValue* alpha_wrapper = [protocolor alpha];
42828 # float alpha = 1.0;
42829 # if (alpha_wrapper != nil) {
42830 # alpha = [alpha_wrapper value];
42831 # }
42832 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42833 # }
42834 #
42835 # static Color* toProto(UIColor* color) {
42836 # CGFloat red, green, blue, alpha;
42837 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42838 # return nil;
42839 # }
42840 # Color* result = [Color alloc] init];
42841 # [result setRed:red];
42842 # [result setGreen:green];
42843 # [result setBlue:blue];
42844 # if (alpha <= 0.9999) {
42845 # [result setAlpha:floatWrapperWithValue(alpha)];
42846 # }
42847 # [result autorelease];
42848 # return result;
42849 # }
42850 # // ...
42851 #
42852 # Example (JavaScript):
42853 #
42854 # // ...
42855 #
42856 # var protoToCssColor = function(rgb_color) {
42857 # var redFrac = rgb_color.red || 0.0;
42858 # var greenFrac = rgb_color.green || 0.0;
42859 # var blueFrac = rgb_color.blue || 0.0;
42860 # var red = Math.floor(redFrac * 255);
42861 # var green = Math.floor(greenFrac * 255);
42862 # var blue = Math.floor(blueFrac * 255);
42863 #
42864 # if (!('alpha' in rgb_color)) {
42865 # return rgbToCssColor_(red, green, blue);
42866 # }
42867 #
42868 # var alphaFrac = rgb_color.alpha.value || 0.0;
42869 # var rgbParams = [red, green, blue].join(',');
42870 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42871 # };
42872 #
42873 # var rgbToCssColor_ = function(red, green, blue) {
42874 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42875 # var hexString = rgbNumber.toString(16);
42876 # var missingZeros = 6 - hexString.length;
42877 # var resultBuilder = ['#'];
42878 # for (var i = 0; i < missingZeros; i++) {
42879 # resultBuilder.push('0');
42880 # }
42881 # resultBuilder.push(hexString);
42882 # return resultBuilder.join('');
42883 # };
42884 #
42885 # // ...
42886 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42887 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42888 # the final pixel color is defined by the equation:
42889 #
42890 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42891 #
42892 # This means that a value of 1.0 corresponds to a solid color, whereas
42893 # a value of 0.0 corresponds to a completely transparent color. This
42894 # uses a wrapper message rather than a simple float scalar so that it is
42895 # possible to distinguish between a default value and the value being unset.
42896 # If omitted, this color object is to be rendered as a solid color
42897 # (as if the alpha value had been explicitly given with a value of 1.0).
42898 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42899 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42900 },
Thomas Coffee2f245372017-03-27 10:39:26 -070042901 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042902 "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).
42903 # Absent values indicate that the field isn't specified.
42904 "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 -070042905 # for simplicity of conversion to/from color representations in various
42906 # languages over compactness; for example, the fields of this representation
42907 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42908 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42909 # method in iOS; and, with just a little work, it can be easily formatted into
42910 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42911 #
42912 # Example (Java):
42913 #
42914 # import com.google.type.Color;
42915 #
42916 # // ...
42917 # public static java.awt.Color fromProto(Color protocolor) {
42918 # float alpha = protocolor.hasAlpha()
42919 # ? protocolor.getAlpha().getValue()
42920 # : 1.0;
42921 #
42922 # return new java.awt.Color(
42923 # protocolor.getRed(),
42924 # protocolor.getGreen(),
42925 # protocolor.getBlue(),
42926 # alpha);
42927 # }
42928 #
42929 # public static Color toProto(java.awt.Color color) {
42930 # float red = (float) color.getRed();
42931 # float green = (float) color.getGreen();
42932 # float blue = (float) color.getBlue();
42933 # float denominator = 255.0;
42934 # Color.Builder resultBuilder =
42935 # Color
42936 # .newBuilder()
42937 # .setRed(red / denominator)
42938 # .setGreen(green / denominator)
42939 # .setBlue(blue / denominator);
42940 # int alpha = color.getAlpha();
42941 # if (alpha != 255) {
42942 # result.setAlpha(
42943 # FloatValue
42944 # .newBuilder()
42945 # .setValue(((float) alpha) / denominator)
42946 # .build());
42947 # }
42948 # return resultBuilder.build();
42949 # }
42950 # // ...
42951 #
42952 # Example (iOS / Obj-C):
42953 #
42954 # // ...
42955 # static UIColor* fromProto(Color* protocolor) {
42956 # float red = [protocolor red];
42957 # float green = [protocolor green];
42958 # float blue = [protocolor blue];
42959 # FloatValue* alpha_wrapper = [protocolor alpha];
42960 # float alpha = 1.0;
42961 # if (alpha_wrapper != nil) {
42962 # alpha = [alpha_wrapper value];
42963 # }
42964 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42965 # }
42966 #
42967 # static Color* toProto(UIColor* color) {
42968 # CGFloat red, green, blue, alpha;
42969 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42970 # return nil;
42971 # }
42972 # Color* result = [Color alloc] init];
42973 # [result setRed:red];
42974 # [result setGreen:green];
42975 # [result setBlue:blue];
42976 # if (alpha <= 0.9999) {
42977 # [result setAlpha:floatWrapperWithValue(alpha)];
42978 # }
42979 # [result autorelease];
42980 # return result;
42981 # }
42982 # // ...
42983 #
42984 # Example (JavaScript):
42985 #
42986 # // ...
42987 #
42988 # var protoToCssColor = function(rgb_color) {
42989 # var redFrac = rgb_color.red || 0.0;
42990 # var greenFrac = rgb_color.green || 0.0;
42991 # var blueFrac = rgb_color.blue || 0.0;
42992 # var red = Math.floor(redFrac * 255);
42993 # var green = Math.floor(greenFrac * 255);
42994 # var blue = Math.floor(blueFrac * 255);
42995 #
42996 # if (!('alpha' in rgb_color)) {
42997 # return rgbToCssColor_(red, green, blue);
42998 # }
42999 #
43000 # var alphaFrac = rgb_color.alpha.value || 0.0;
43001 # var rgbParams = [red, green, blue].join(',');
43002 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43003 # };
43004 #
43005 # var rgbToCssColor_ = function(red, green, blue) {
43006 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43007 # var hexString = rgbNumber.toString(16);
43008 # var missingZeros = 6 - hexString.length;
43009 # var resultBuilder = ['#'];
43010 # for (var i = 0; i < missingZeros; i++) {
43011 # resultBuilder.push('0');
43012 # }
43013 # resultBuilder.push(hexString);
43014 # return resultBuilder.join('');
43015 # };
43016 #
43017 # // ...
43018 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43019 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43020 # the final pixel color is defined by the equation:
43021 #
43022 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43023 #
43024 # This means that a value of 1.0 corresponds to a solid color, whereas
43025 # a value of 0.0 corresponds to a completely transparent color. This
43026 # uses a wrapper message rather than a simple float scalar so that it is
43027 # possible to distinguish between a default value and the value being unset.
43028 # If omitted, this color object is to be rendered as a solid color
43029 # (as if the alpha value had been explicitly given with a value of 1.0).
43030 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43031 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43032 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043033 "bold": True or False, # True if the text is bold.
43034 "strikethrough": True or False, # True if the text has a strikethrough.
43035 "fontFamily": "A String", # The font family.
43036 "fontSize": 42, # The size of the font.
43037 "italic": True or False, # True if the text is italicized.
43038 "underline": True or False, # True if the text is underlined.
43039 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070043040 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
43041 "angle": 42, # The angle between the standard orientation and the desired orientation.
43042 # Measured in degrees. Valid values are between -90 and 90. Positive
43043 # angles are angled upwards, negative are angled downwards.
43044 #
43045 # Note: For LTR text direction positive angles are in the counterclockwise
43046 # direction, whereas for RTL they are in the clockwise direction
43047 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
43048 # characters is unchanged.
43049 # For example:
43050 #
43051 # | V |
43052 # | e |
43053 # | r |
43054 # | t |
43055 # | i |
43056 # | c |
43057 # | a |
43058 # | l |
43059 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043060 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
43061 "borders": { # The borders of the cell. # The borders of the cell.
43062 "top": { # A border along a cell. # The top border of the cell.
43063 "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 -070043064 # for simplicity of conversion to/from color representations in various
43065 # languages over compactness; for example, the fields of this representation
43066 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43067 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43068 # method in iOS; and, with just a little work, it can be easily formatted into
43069 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43070 #
43071 # Example (Java):
43072 #
43073 # import com.google.type.Color;
43074 #
43075 # // ...
43076 # public static java.awt.Color fromProto(Color protocolor) {
43077 # float alpha = protocolor.hasAlpha()
43078 # ? protocolor.getAlpha().getValue()
43079 # : 1.0;
43080 #
43081 # return new java.awt.Color(
43082 # protocolor.getRed(),
43083 # protocolor.getGreen(),
43084 # protocolor.getBlue(),
43085 # alpha);
43086 # }
43087 #
43088 # public static Color toProto(java.awt.Color color) {
43089 # float red = (float) color.getRed();
43090 # float green = (float) color.getGreen();
43091 # float blue = (float) color.getBlue();
43092 # float denominator = 255.0;
43093 # Color.Builder resultBuilder =
43094 # Color
43095 # .newBuilder()
43096 # .setRed(red / denominator)
43097 # .setGreen(green / denominator)
43098 # .setBlue(blue / denominator);
43099 # int alpha = color.getAlpha();
43100 # if (alpha != 255) {
43101 # result.setAlpha(
43102 # FloatValue
43103 # .newBuilder()
43104 # .setValue(((float) alpha) / denominator)
43105 # .build());
43106 # }
43107 # return resultBuilder.build();
43108 # }
43109 # // ...
43110 #
43111 # Example (iOS / Obj-C):
43112 #
43113 # // ...
43114 # static UIColor* fromProto(Color* protocolor) {
43115 # float red = [protocolor red];
43116 # float green = [protocolor green];
43117 # float blue = [protocolor blue];
43118 # FloatValue* alpha_wrapper = [protocolor alpha];
43119 # float alpha = 1.0;
43120 # if (alpha_wrapper != nil) {
43121 # alpha = [alpha_wrapper value];
43122 # }
43123 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43124 # }
43125 #
43126 # static Color* toProto(UIColor* color) {
43127 # CGFloat red, green, blue, alpha;
43128 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43129 # return nil;
43130 # }
43131 # Color* result = [Color alloc] init];
43132 # [result setRed:red];
43133 # [result setGreen:green];
43134 # [result setBlue:blue];
43135 # if (alpha <= 0.9999) {
43136 # [result setAlpha:floatWrapperWithValue(alpha)];
43137 # }
43138 # [result autorelease];
43139 # return result;
43140 # }
43141 # // ...
43142 #
43143 # Example (JavaScript):
43144 #
43145 # // ...
43146 #
43147 # var protoToCssColor = function(rgb_color) {
43148 # var redFrac = rgb_color.red || 0.0;
43149 # var greenFrac = rgb_color.green || 0.0;
43150 # var blueFrac = rgb_color.blue || 0.0;
43151 # var red = Math.floor(redFrac * 255);
43152 # var green = Math.floor(greenFrac * 255);
43153 # var blue = Math.floor(blueFrac * 255);
43154 #
43155 # if (!('alpha' in rgb_color)) {
43156 # return rgbToCssColor_(red, green, blue);
43157 # }
43158 #
43159 # var alphaFrac = rgb_color.alpha.value || 0.0;
43160 # var rgbParams = [red, green, blue].join(',');
43161 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43162 # };
43163 #
43164 # var rgbToCssColor_ = function(red, green, blue) {
43165 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43166 # var hexString = rgbNumber.toString(16);
43167 # var missingZeros = 6 - hexString.length;
43168 # var resultBuilder = ['#'];
43169 # for (var i = 0; i < missingZeros; i++) {
43170 # resultBuilder.push('0');
43171 # }
43172 # resultBuilder.push(hexString);
43173 # return resultBuilder.join('');
43174 # };
43175 #
43176 # // ...
43177 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43178 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43179 # the final pixel color is defined by the equation:
43180 #
43181 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43182 #
43183 # This means that a value of 1.0 corresponds to a solid color, whereas
43184 # a value of 0.0 corresponds to a completely transparent color. This
43185 # uses a wrapper message rather than a simple float scalar so that it is
43186 # possible to distinguish between a default value and the value being unset.
43187 # If omitted, this color object is to be rendered as a solid color
43188 # (as if the alpha value had been explicitly given with a value of 1.0).
43189 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43190 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43191 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043192 "width": 42, # The width of the border, in pixels.
43193 # Deprecated; the width is determined by the "style" field.
43194 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043195 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043196 "right": { # A border along a cell. # The right border of the cell.
43197 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43198 # for simplicity of conversion to/from color representations in various
43199 # languages over compactness; for example, the fields of this representation
43200 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43201 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43202 # method in iOS; and, with just a little work, it can be easily formatted into
43203 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43204 #
43205 # Example (Java):
43206 #
43207 # import com.google.type.Color;
43208 #
43209 # // ...
43210 # public static java.awt.Color fromProto(Color protocolor) {
43211 # float alpha = protocolor.hasAlpha()
43212 # ? protocolor.getAlpha().getValue()
43213 # : 1.0;
43214 #
43215 # return new java.awt.Color(
43216 # protocolor.getRed(),
43217 # protocolor.getGreen(),
43218 # protocolor.getBlue(),
43219 # alpha);
43220 # }
43221 #
43222 # public static Color toProto(java.awt.Color color) {
43223 # float red = (float) color.getRed();
43224 # float green = (float) color.getGreen();
43225 # float blue = (float) color.getBlue();
43226 # float denominator = 255.0;
43227 # Color.Builder resultBuilder =
43228 # Color
43229 # .newBuilder()
43230 # .setRed(red / denominator)
43231 # .setGreen(green / denominator)
43232 # .setBlue(blue / denominator);
43233 # int alpha = color.getAlpha();
43234 # if (alpha != 255) {
43235 # result.setAlpha(
43236 # FloatValue
43237 # .newBuilder()
43238 # .setValue(((float) alpha) / denominator)
43239 # .build());
43240 # }
43241 # return resultBuilder.build();
43242 # }
43243 # // ...
43244 #
43245 # Example (iOS / Obj-C):
43246 #
43247 # // ...
43248 # static UIColor* fromProto(Color* protocolor) {
43249 # float red = [protocolor red];
43250 # float green = [protocolor green];
43251 # float blue = [protocolor blue];
43252 # FloatValue* alpha_wrapper = [protocolor alpha];
43253 # float alpha = 1.0;
43254 # if (alpha_wrapper != nil) {
43255 # alpha = [alpha_wrapper value];
43256 # }
43257 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43258 # }
43259 #
43260 # static Color* toProto(UIColor* color) {
43261 # CGFloat red, green, blue, alpha;
43262 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43263 # return nil;
43264 # }
43265 # Color* result = [Color alloc] init];
43266 # [result setRed:red];
43267 # [result setGreen:green];
43268 # [result setBlue:blue];
43269 # if (alpha <= 0.9999) {
43270 # [result setAlpha:floatWrapperWithValue(alpha)];
43271 # }
43272 # [result autorelease];
43273 # return result;
43274 # }
43275 # // ...
43276 #
43277 # Example (JavaScript):
43278 #
43279 # // ...
43280 #
43281 # var protoToCssColor = function(rgb_color) {
43282 # var redFrac = rgb_color.red || 0.0;
43283 # var greenFrac = rgb_color.green || 0.0;
43284 # var blueFrac = rgb_color.blue || 0.0;
43285 # var red = Math.floor(redFrac * 255);
43286 # var green = Math.floor(greenFrac * 255);
43287 # var blue = Math.floor(blueFrac * 255);
43288 #
43289 # if (!('alpha' in rgb_color)) {
43290 # return rgbToCssColor_(red, green, blue);
43291 # }
43292 #
43293 # var alphaFrac = rgb_color.alpha.value || 0.0;
43294 # var rgbParams = [red, green, blue].join(',');
43295 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43296 # };
43297 #
43298 # var rgbToCssColor_ = function(red, green, blue) {
43299 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43300 # var hexString = rgbNumber.toString(16);
43301 # var missingZeros = 6 - hexString.length;
43302 # var resultBuilder = ['#'];
43303 # for (var i = 0; i < missingZeros; i++) {
43304 # resultBuilder.push('0');
43305 # }
43306 # resultBuilder.push(hexString);
43307 # return resultBuilder.join('');
43308 # };
43309 #
43310 # // ...
43311 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43312 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43313 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043314 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043315 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043316 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043317 # This means that a value of 1.0 corresponds to a solid color, whereas
43318 # a value of 0.0 corresponds to a completely transparent color. This
43319 # uses a wrapper message rather than a simple float scalar so that it is
43320 # possible to distinguish between a default value and the value being unset.
43321 # If omitted, this color object is to be rendered as a solid color
43322 # (as if the alpha value had been explicitly given with a value of 1.0).
43323 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43324 "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 -070043325 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043326 "width": 42, # The width of the border, in pixels.
43327 # Deprecated; the width is determined by the "style" field.
43328 "style": "A String", # The style of the border.
43329 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043330 "left": { # A border along a cell. # The left border of the cell.
43331 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43332 # for simplicity of conversion to/from color representations in various
43333 # languages over compactness; for example, the fields of this representation
43334 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43335 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43336 # method in iOS; and, with just a little work, it can be easily formatted into
43337 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43338 #
43339 # Example (Java):
43340 #
43341 # import com.google.type.Color;
43342 #
43343 # // ...
43344 # public static java.awt.Color fromProto(Color protocolor) {
43345 # float alpha = protocolor.hasAlpha()
43346 # ? protocolor.getAlpha().getValue()
43347 # : 1.0;
43348 #
43349 # return new java.awt.Color(
43350 # protocolor.getRed(),
43351 # protocolor.getGreen(),
43352 # protocolor.getBlue(),
43353 # alpha);
43354 # }
43355 #
43356 # public static Color toProto(java.awt.Color color) {
43357 # float red = (float) color.getRed();
43358 # float green = (float) color.getGreen();
43359 # float blue = (float) color.getBlue();
43360 # float denominator = 255.0;
43361 # Color.Builder resultBuilder =
43362 # Color
43363 # .newBuilder()
43364 # .setRed(red / denominator)
43365 # .setGreen(green / denominator)
43366 # .setBlue(blue / denominator);
43367 # int alpha = color.getAlpha();
43368 # if (alpha != 255) {
43369 # result.setAlpha(
43370 # FloatValue
43371 # .newBuilder()
43372 # .setValue(((float) alpha) / denominator)
43373 # .build());
43374 # }
43375 # return resultBuilder.build();
43376 # }
43377 # // ...
43378 #
43379 # Example (iOS / Obj-C):
43380 #
43381 # // ...
43382 # static UIColor* fromProto(Color* protocolor) {
43383 # float red = [protocolor red];
43384 # float green = [protocolor green];
43385 # float blue = [protocolor blue];
43386 # FloatValue* alpha_wrapper = [protocolor alpha];
43387 # float alpha = 1.0;
43388 # if (alpha_wrapper != nil) {
43389 # alpha = [alpha_wrapper value];
43390 # }
43391 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43392 # }
43393 #
43394 # static Color* toProto(UIColor* color) {
43395 # CGFloat red, green, blue, alpha;
43396 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43397 # return nil;
43398 # }
43399 # Color* result = [Color alloc] init];
43400 # [result setRed:red];
43401 # [result setGreen:green];
43402 # [result setBlue:blue];
43403 # if (alpha <= 0.9999) {
43404 # [result setAlpha:floatWrapperWithValue(alpha)];
43405 # }
43406 # [result autorelease];
43407 # return result;
43408 # }
43409 # // ...
43410 #
43411 # Example (JavaScript):
43412 #
43413 # // ...
43414 #
43415 # var protoToCssColor = function(rgb_color) {
43416 # var redFrac = rgb_color.red || 0.0;
43417 # var greenFrac = rgb_color.green || 0.0;
43418 # var blueFrac = rgb_color.blue || 0.0;
43419 # var red = Math.floor(redFrac * 255);
43420 # var green = Math.floor(greenFrac * 255);
43421 # var blue = Math.floor(blueFrac * 255);
43422 #
43423 # if (!('alpha' in rgb_color)) {
43424 # return rgbToCssColor_(red, green, blue);
43425 # }
43426 #
43427 # var alphaFrac = rgb_color.alpha.value || 0.0;
43428 # var rgbParams = [red, green, blue].join(',');
43429 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43430 # };
43431 #
43432 # var rgbToCssColor_ = function(red, green, blue) {
43433 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43434 # var hexString = rgbNumber.toString(16);
43435 # var missingZeros = 6 - hexString.length;
43436 # var resultBuilder = ['#'];
43437 # for (var i = 0; i < missingZeros; i++) {
43438 # resultBuilder.push('0');
43439 # }
43440 # resultBuilder.push(hexString);
43441 # return resultBuilder.join('');
43442 # };
43443 #
43444 # // ...
43445 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43446 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43447 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043448 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043449 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043450 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043451 # This means that a value of 1.0 corresponds to a solid color, whereas
43452 # a value of 0.0 corresponds to a completely transparent color. This
43453 # uses a wrapper message rather than a simple float scalar so that it is
43454 # possible to distinguish between a default value and the value being unset.
43455 # If omitted, this color object is to be rendered as a solid color
43456 # (as if the alpha value had been explicitly given with a value of 1.0).
43457 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43458 "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 -070043459 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043460 "width": 42, # The width of the border, in pixels.
43461 # Deprecated; the width is determined by the "style" field.
43462 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043463 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070043464 "bottom": { # A border along a cell. # The bottom border of the cell.
43465 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43466 # for simplicity of conversion to/from color representations in various
43467 # languages over compactness; for example, the fields of this representation
43468 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43469 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43470 # method in iOS; and, with just a little work, it can be easily formatted into
43471 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43472 #
43473 # Example (Java):
43474 #
43475 # import com.google.type.Color;
43476 #
43477 # // ...
43478 # public static java.awt.Color fromProto(Color protocolor) {
43479 # float alpha = protocolor.hasAlpha()
43480 # ? protocolor.getAlpha().getValue()
43481 # : 1.0;
43482 #
43483 # return new java.awt.Color(
43484 # protocolor.getRed(),
43485 # protocolor.getGreen(),
43486 # protocolor.getBlue(),
43487 # alpha);
43488 # }
43489 #
43490 # public static Color toProto(java.awt.Color color) {
43491 # float red = (float) color.getRed();
43492 # float green = (float) color.getGreen();
43493 # float blue = (float) color.getBlue();
43494 # float denominator = 255.0;
43495 # Color.Builder resultBuilder =
43496 # Color
43497 # .newBuilder()
43498 # .setRed(red / denominator)
43499 # .setGreen(green / denominator)
43500 # .setBlue(blue / denominator);
43501 # int alpha = color.getAlpha();
43502 # if (alpha != 255) {
43503 # result.setAlpha(
43504 # FloatValue
43505 # .newBuilder()
43506 # .setValue(((float) alpha) / denominator)
43507 # .build());
43508 # }
43509 # return resultBuilder.build();
43510 # }
43511 # // ...
43512 #
43513 # Example (iOS / Obj-C):
43514 #
43515 # // ...
43516 # static UIColor* fromProto(Color* protocolor) {
43517 # float red = [protocolor red];
43518 # float green = [protocolor green];
43519 # float blue = [protocolor blue];
43520 # FloatValue* alpha_wrapper = [protocolor alpha];
43521 # float alpha = 1.0;
43522 # if (alpha_wrapper != nil) {
43523 # alpha = [alpha_wrapper value];
43524 # }
43525 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43526 # }
43527 #
43528 # static Color* toProto(UIColor* color) {
43529 # CGFloat red, green, blue, alpha;
43530 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43531 # return nil;
43532 # }
43533 # Color* result = [Color alloc] init];
43534 # [result setRed:red];
43535 # [result setGreen:green];
43536 # [result setBlue:blue];
43537 # if (alpha <= 0.9999) {
43538 # [result setAlpha:floatWrapperWithValue(alpha)];
43539 # }
43540 # [result autorelease];
43541 # return result;
43542 # }
43543 # // ...
43544 #
43545 # Example (JavaScript):
43546 #
43547 # // ...
43548 #
43549 # var protoToCssColor = function(rgb_color) {
43550 # var redFrac = rgb_color.red || 0.0;
43551 # var greenFrac = rgb_color.green || 0.0;
43552 # var blueFrac = rgb_color.blue || 0.0;
43553 # var red = Math.floor(redFrac * 255);
43554 # var green = Math.floor(greenFrac * 255);
43555 # var blue = Math.floor(blueFrac * 255);
43556 #
43557 # if (!('alpha' in rgb_color)) {
43558 # return rgbToCssColor_(red, green, blue);
43559 # }
43560 #
43561 # var alphaFrac = rgb_color.alpha.value || 0.0;
43562 # var rgbParams = [red, green, blue].join(',');
43563 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43564 # };
43565 #
43566 # var rgbToCssColor_ = function(red, green, blue) {
43567 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43568 # var hexString = rgbNumber.toString(16);
43569 # var missingZeros = 6 - hexString.length;
43570 # var resultBuilder = ['#'];
43571 # for (var i = 0; i < missingZeros; i++) {
43572 # resultBuilder.push('0');
43573 # }
43574 # resultBuilder.push(hexString);
43575 # return resultBuilder.join('');
43576 # };
43577 #
43578 # // ...
43579 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43580 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43581 # the final pixel color is defined by the equation:
43582 #
43583 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43584 #
43585 # This means that a value of 1.0 corresponds to a solid color, whereas
43586 # a value of 0.0 corresponds to a completely transparent color. This
43587 # uses a wrapper message rather than a simple float scalar so that it is
43588 # possible to distinguish between a default value and the value being unset.
43589 # If omitted, this color object is to be rendered as a solid color
43590 # (as if the alpha value had been explicitly given with a value of 1.0).
43591 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43592 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43593 },
43594 "width": 42, # The width of the border, in pixels.
43595 # Deprecated; the width is determined by the "style" field.
43596 "style": "A String", # The style of the border.
43597 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043598 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070043599 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043600 },
43601 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043602 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
43603 # the interpolation points listed. The format of a cell will vary
43604 # based on its contents as compared to the values of the interpolation
43605 # points.
43606 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
43607 # These pin the gradient color scale according to the color,
43608 # type and value chosen.
43609 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
43610 # for simplicity of conversion to/from color representations in various
43611 # languages over compactness; for example, the fields of this representation
43612 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43613 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43614 # method in iOS; and, with just a little work, it can be easily formatted into
43615 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43616 #
43617 # Example (Java):
43618 #
43619 # import com.google.type.Color;
43620 #
43621 # // ...
43622 # public static java.awt.Color fromProto(Color protocolor) {
43623 # float alpha = protocolor.hasAlpha()
43624 # ? protocolor.getAlpha().getValue()
43625 # : 1.0;
43626 #
43627 # return new java.awt.Color(
43628 # protocolor.getRed(),
43629 # protocolor.getGreen(),
43630 # protocolor.getBlue(),
43631 # alpha);
43632 # }
43633 #
43634 # public static Color toProto(java.awt.Color color) {
43635 # float red = (float) color.getRed();
43636 # float green = (float) color.getGreen();
43637 # float blue = (float) color.getBlue();
43638 # float denominator = 255.0;
43639 # Color.Builder resultBuilder =
43640 # Color
43641 # .newBuilder()
43642 # .setRed(red / denominator)
43643 # .setGreen(green / denominator)
43644 # .setBlue(blue / denominator);
43645 # int alpha = color.getAlpha();
43646 # if (alpha != 255) {
43647 # result.setAlpha(
43648 # FloatValue
43649 # .newBuilder()
43650 # .setValue(((float) alpha) / denominator)
43651 # .build());
43652 # }
43653 # return resultBuilder.build();
43654 # }
43655 # // ...
43656 #
43657 # Example (iOS / Obj-C):
43658 #
43659 # // ...
43660 # static UIColor* fromProto(Color* protocolor) {
43661 # float red = [protocolor red];
43662 # float green = [protocolor green];
43663 # float blue = [protocolor blue];
43664 # FloatValue* alpha_wrapper = [protocolor alpha];
43665 # float alpha = 1.0;
43666 # if (alpha_wrapper != nil) {
43667 # alpha = [alpha_wrapper value];
43668 # }
43669 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43670 # }
43671 #
43672 # static Color* toProto(UIColor* color) {
43673 # CGFloat red, green, blue, alpha;
43674 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43675 # return nil;
43676 # }
43677 # Color* result = [Color alloc] init];
43678 # [result setRed:red];
43679 # [result setGreen:green];
43680 # [result setBlue:blue];
43681 # if (alpha <= 0.9999) {
43682 # [result setAlpha:floatWrapperWithValue(alpha)];
43683 # }
43684 # [result autorelease];
43685 # return result;
43686 # }
43687 # // ...
43688 #
43689 # Example (JavaScript):
43690 #
43691 # // ...
43692 #
43693 # var protoToCssColor = function(rgb_color) {
43694 # var redFrac = rgb_color.red || 0.0;
43695 # var greenFrac = rgb_color.green || 0.0;
43696 # var blueFrac = rgb_color.blue || 0.0;
43697 # var red = Math.floor(redFrac * 255);
43698 # var green = Math.floor(greenFrac * 255);
43699 # var blue = Math.floor(blueFrac * 255);
43700 #
43701 # if (!('alpha' in rgb_color)) {
43702 # return rgbToCssColor_(red, green, blue);
43703 # }
43704 #
43705 # var alphaFrac = rgb_color.alpha.value || 0.0;
43706 # var rgbParams = [red, green, blue].join(',');
43707 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43708 # };
43709 #
43710 # var rgbToCssColor_ = function(red, green, blue) {
43711 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43712 # var hexString = rgbNumber.toString(16);
43713 # var missingZeros = 6 - hexString.length;
43714 # var resultBuilder = ['#'];
43715 # for (var i = 0; i < missingZeros; i++) {
43716 # resultBuilder.push('0');
43717 # }
43718 # resultBuilder.push(hexString);
43719 # return resultBuilder.join('');
43720 # };
43721 #
43722 # // ...
43723 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43724 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43725 # the final pixel color is defined by the equation:
43726 #
43727 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43728 #
43729 # This means that a value of 1.0 corresponds to a solid color, whereas
43730 # a value of 0.0 corresponds to a completely transparent color. This
43731 # uses a wrapper message rather than a simple float scalar so that it is
43732 # possible to distinguish between a default value and the value being unset.
43733 # If omitted, this color object is to be rendered as a solid color
43734 # (as if the alpha value had been explicitly given with a value of 1.0).
43735 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43736 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43737 },
43738 "type": "A String", # How the value should be interpreted.
43739 "value": "A String", # The value this interpolation point uses. May be a formula.
43740 # Unused if type is MIN or
43741 # MAX.
43742 },
43743 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
43744 # These pin the gradient color scale according to the color,
43745 # type and value chosen.
43746 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
43747 # for simplicity of conversion to/from color representations in various
43748 # languages over compactness; for example, the fields of this representation
43749 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43750 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43751 # method in iOS; and, with just a little work, it can be easily formatted into
43752 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43753 #
43754 # Example (Java):
43755 #
43756 # import com.google.type.Color;
43757 #
43758 # // ...
43759 # public static java.awt.Color fromProto(Color protocolor) {
43760 # float alpha = protocolor.hasAlpha()
43761 # ? protocolor.getAlpha().getValue()
43762 # : 1.0;
43763 #
43764 # return new java.awt.Color(
43765 # protocolor.getRed(),
43766 # protocolor.getGreen(),
43767 # protocolor.getBlue(),
43768 # alpha);
43769 # }
43770 #
43771 # public static Color toProto(java.awt.Color color) {
43772 # float red = (float) color.getRed();
43773 # float green = (float) color.getGreen();
43774 # float blue = (float) color.getBlue();
43775 # float denominator = 255.0;
43776 # Color.Builder resultBuilder =
43777 # Color
43778 # .newBuilder()
43779 # .setRed(red / denominator)
43780 # .setGreen(green / denominator)
43781 # .setBlue(blue / denominator);
43782 # int alpha = color.getAlpha();
43783 # if (alpha != 255) {
43784 # result.setAlpha(
43785 # FloatValue
43786 # .newBuilder()
43787 # .setValue(((float) alpha) / denominator)
43788 # .build());
43789 # }
43790 # return resultBuilder.build();
43791 # }
43792 # // ...
43793 #
43794 # Example (iOS / Obj-C):
43795 #
43796 # // ...
43797 # static UIColor* fromProto(Color* protocolor) {
43798 # float red = [protocolor red];
43799 # float green = [protocolor green];
43800 # float blue = [protocolor blue];
43801 # FloatValue* alpha_wrapper = [protocolor alpha];
43802 # float alpha = 1.0;
43803 # if (alpha_wrapper != nil) {
43804 # alpha = [alpha_wrapper value];
43805 # }
43806 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43807 # }
43808 #
43809 # static Color* toProto(UIColor* color) {
43810 # CGFloat red, green, blue, alpha;
43811 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43812 # return nil;
43813 # }
43814 # Color* result = [Color alloc] init];
43815 # [result setRed:red];
43816 # [result setGreen:green];
43817 # [result setBlue:blue];
43818 # if (alpha <= 0.9999) {
43819 # [result setAlpha:floatWrapperWithValue(alpha)];
43820 # }
43821 # [result autorelease];
43822 # return result;
43823 # }
43824 # // ...
43825 #
43826 # Example (JavaScript):
43827 #
43828 # // ...
43829 #
43830 # var protoToCssColor = function(rgb_color) {
43831 # var redFrac = rgb_color.red || 0.0;
43832 # var greenFrac = rgb_color.green || 0.0;
43833 # var blueFrac = rgb_color.blue || 0.0;
43834 # var red = Math.floor(redFrac * 255);
43835 # var green = Math.floor(greenFrac * 255);
43836 # var blue = Math.floor(blueFrac * 255);
43837 #
43838 # if (!('alpha' in rgb_color)) {
43839 # return rgbToCssColor_(red, green, blue);
43840 # }
43841 #
43842 # var alphaFrac = rgb_color.alpha.value || 0.0;
43843 # var rgbParams = [red, green, blue].join(',');
43844 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43845 # };
43846 #
43847 # var rgbToCssColor_ = function(red, green, blue) {
43848 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43849 # var hexString = rgbNumber.toString(16);
43850 # var missingZeros = 6 - hexString.length;
43851 # var resultBuilder = ['#'];
43852 # for (var i = 0; i < missingZeros; i++) {
43853 # resultBuilder.push('0');
43854 # }
43855 # resultBuilder.push(hexString);
43856 # return resultBuilder.join('');
43857 # };
43858 #
43859 # // ...
43860 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43861 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43862 # the final pixel color is defined by the equation:
43863 #
43864 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43865 #
43866 # This means that a value of 1.0 corresponds to a solid color, whereas
43867 # a value of 0.0 corresponds to a completely transparent color. This
43868 # uses a wrapper message rather than a simple float scalar so that it is
43869 # possible to distinguish between a default value and the value being unset.
43870 # If omitted, this color object is to be rendered as a solid color
43871 # (as if the alpha value had been explicitly given with a value of 1.0).
43872 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43873 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43874 },
43875 "type": "A String", # How the value should be interpreted.
43876 "value": "A String", # The value this interpolation point uses. May be a formula.
43877 # Unused if type is MIN or
43878 # MAX.
43879 },
43880 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
43881 # These pin the gradient color scale according to the color,
43882 # type and value chosen.
43883 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
43884 # for simplicity of conversion to/from color representations in various
43885 # languages over compactness; for example, the fields of this representation
43886 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43887 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43888 # method in iOS; and, with just a little work, it can be easily formatted into
43889 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43890 #
43891 # Example (Java):
43892 #
43893 # import com.google.type.Color;
43894 #
43895 # // ...
43896 # public static java.awt.Color fromProto(Color protocolor) {
43897 # float alpha = protocolor.hasAlpha()
43898 # ? protocolor.getAlpha().getValue()
43899 # : 1.0;
43900 #
43901 # return new java.awt.Color(
43902 # protocolor.getRed(),
43903 # protocolor.getGreen(),
43904 # protocolor.getBlue(),
43905 # alpha);
43906 # }
43907 #
43908 # public static Color toProto(java.awt.Color color) {
43909 # float red = (float) color.getRed();
43910 # float green = (float) color.getGreen();
43911 # float blue = (float) color.getBlue();
43912 # float denominator = 255.0;
43913 # Color.Builder resultBuilder =
43914 # Color
43915 # .newBuilder()
43916 # .setRed(red / denominator)
43917 # .setGreen(green / denominator)
43918 # .setBlue(blue / denominator);
43919 # int alpha = color.getAlpha();
43920 # if (alpha != 255) {
43921 # result.setAlpha(
43922 # FloatValue
43923 # .newBuilder()
43924 # .setValue(((float) alpha) / denominator)
43925 # .build());
43926 # }
43927 # return resultBuilder.build();
43928 # }
43929 # // ...
43930 #
43931 # Example (iOS / Obj-C):
43932 #
43933 # // ...
43934 # static UIColor* fromProto(Color* protocolor) {
43935 # float red = [protocolor red];
43936 # float green = [protocolor green];
43937 # float blue = [protocolor blue];
43938 # FloatValue* alpha_wrapper = [protocolor alpha];
43939 # float alpha = 1.0;
43940 # if (alpha_wrapper != nil) {
43941 # alpha = [alpha_wrapper value];
43942 # }
43943 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43944 # }
43945 #
43946 # static Color* toProto(UIColor* color) {
43947 # CGFloat red, green, blue, alpha;
43948 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43949 # return nil;
43950 # }
43951 # Color* result = [Color alloc] init];
43952 # [result setRed:red];
43953 # [result setGreen:green];
43954 # [result setBlue:blue];
43955 # if (alpha <= 0.9999) {
43956 # [result setAlpha:floatWrapperWithValue(alpha)];
43957 # }
43958 # [result autorelease];
43959 # return result;
43960 # }
43961 # // ...
43962 #
43963 # Example (JavaScript):
43964 #
43965 # // ...
43966 #
43967 # var protoToCssColor = function(rgb_color) {
43968 # var redFrac = rgb_color.red || 0.0;
43969 # var greenFrac = rgb_color.green || 0.0;
43970 # var blueFrac = rgb_color.blue || 0.0;
43971 # var red = Math.floor(redFrac * 255);
43972 # var green = Math.floor(greenFrac * 255);
43973 # var blue = Math.floor(blueFrac * 255);
43974 #
43975 # if (!('alpha' in rgb_color)) {
43976 # return rgbToCssColor_(red, green, blue);
43977 # }
43978 #
43979 # var alphaFrac = rgb_color.alpha.value || 0.0;
43980 # var rgbParams = [red, green, blue].join(',');
43981 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43982 # };
43983 #
43984 # var rgbToCssColor_ = function(red, green, blue) {
43985 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43986 # var hexString = rgbNumber.toString(16);
43987 # var missingZeros = 6 - hexString.length;
43988 # var resultBuilder = ['#'];
43989 # for (var i = 0; i < missingZeros; i++) {
43990 # resultBuilder.push('0');
43991 # }
43992 # resultBuilder.push(hexString);
43993 # return resultBuilder.join('');
43994 # };
43995 #
43996 # // ...
43997 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43998 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43999 # the final pixel color is defined by the equation:
44000 #
44001 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44002 #
44003 # This means that a value of 1.0 corresponds to a solid color, whereas
44004 # a value of 0.0 corresponds to a completely transparent color. This
44005 # uses a wrapper message rather than a simple float scalar so that it is
44006 # possible to distinguish between a default value and the value being unset.
44007 # If omitted, this color object is to be rendered as a solid color
44008 # (as if the alpha value had been explicitly given with a value of 1.0).
44009 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44010 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44011 },
44012 "type": "A String", # How the value should be interpreted.
44013 "value": "A String", # The value this interpolation point uses. May be a formula.
44014 # Unused if type is MIN or
44015 # MAX.
44016 },
44017 },
44018 },
44019 ],
44020 "bandedRanges": [ # The banded (i.e. alternating colors) ranges on this sheet.
44021 { # A banded (alternating colors) range in a sheet.
44022 "range": { # A range on a sheet. # The range over which these properties are applied.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044023 # All indexes are zero-based.
44024 # Indexes are half open, e.g the start index is inclusive
44025 # and the end index is exclusive -- [start_index, end_index).
44026 # Missing indexes indicate the range is unbounded on that side.
44027 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044028 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044029 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044030 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044031 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044032 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044033 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044034 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044035 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044036 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044037 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044038 # `Sheet1!A:B == sheet_id: 0,
44039 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044040 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044041 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044042 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044043 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044044 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070044045 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044046 #
44047 # The start index must always be less than or equal to the end index.
44048 # If the start index equals the end index, then the range is empty.
44049 # Empty ranges are typically not meaningful and are usually rendered in the
44050 # UI as `#REF!`.
44051 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070044052 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044053 "sheetId": 42, # The sheet this range is on.
44054 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070044055 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070044056 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080044057 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
44058 # by-column basis throughout all the columns in the range. At least one of
44059 # row_properties or column_properties must be specified.
44060 # BandedRange.row_properties and BandedRange.column_properties are
44061 # set, the fill colors are applied to cells according to the following rules:
44062 #
44063 # * header_color and footer_color take priority over band colors.
44064 # * first_band_color takes priority over second_band_color.
44065 # * row_properties takes priority over column_properties.
44066 #
44067 # For example, the first row color takes priority over the first column
44068 # color, but the first column color takes priority over the second row color.
44069 # Similarly, the row header takes priority over the column header in the
44070 # top left cell, but the column header takes priority over the first row
44071 # color if the row header is not set.
44072 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
44073 # for simplicity of conversion to/from color representations in various
44074 # languages over compactness; for example, the fields of this representation
44075 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44076 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44077 # method in iOS; and, with just a little work, it can be easily formatted into
44078 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44079 #
44080 # Example (Java):
44081 #
44082 # import com.google.type.Color;
44083 #
44084 # // ...
44085 # public static java.awt.Color fromProto(Color protocolor) {
44086 # float alpha = protocolor.hasAlpha()
44087 # ? protocolor.getAlpha().getValue()
44088 # : 1.0;
44089 #
44090 # return new java.awt.Color(
44091 # protocolor.getRed(),
44092 # protocolor.getGreen(),
44093 # protocolor.getBlue(),
44094 # alpha);
44095 # }
44096 #
44097 # public static Color toProto(java.awt.Color color) {
44098 # float red = (float) color.getRed();
44099 # float green = (float) color.getGreen();
44100 # float blue = (float) color.getBlue();
44101 # float denominator = 255.0;
44102 # Color.Builder resultBuilder =
44103 # Color
44104 # .newBuilder()
44105 # .setRed(red / denominator)
44106 # .setGreen(green / denominator)
44107 # .setBlue(blue / denominator);
44108 # int alpha = color.getAlpha();
44109 # if (alpha != 255) {
44110 # result.setAlpha(
44111 # FloatValue
44112 # .newBuilder()
44113 # .setValue(((float) alpha) / denominator)
44114 # .build());
44115 # }
44116 # return resultBuilder.build();
44117 # }
44118 # // ...
44119 #
44120 # Example (iOS / Obj-C):
44121 #
44122 # // ...
44123 # static UIColor* fromProto(Color* protocolor) {
44124 # float red = [protocolor red];
44125 # float green = [protocolor green];
44126 # float blue = [protocolor blue];
44127 # FloatValue* alpha_wrapper = [protocolor alpha];
44128 # float alpha = 1.0;
44129 # if (alpha_wrapper != nil) {
44130 # alpha = [alpha_wrapper value];
44131 # }
44132 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44133 # }
44134 #
44135 # static Color* toProto(UIColor* color) {
44136 # CGFloat red, green, blue, alpha;
44137 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44138 # return nil;
44139 # }
44140 # Color* result = [Color alloc] init];
44141 # [result setRed:red];
44142 # [result setGreen:green];
44143 # [result setBlue:blue];
44144 # if (alpha <= 0.9999) {
44145 # [result setAlpha:floatWrapperWithValue(alpha)];
44146 # }
44147 # [result autorelease];
44148 # return result;
44149 # }
44150 # // ...
44151 #
44152 # Example (JavaScript):
44153 #
44154 # // ...
44155 #
44156 # var protoToCssColor = function(rgb_color) {
44157 # var redFrac = rgb_color.red || 0.0;
44158 # var greenFrac = rgb_color.green || 0.0;
44159 # var blueFrac = rgb_color.blue || 0.0;
44160 # var red = Math.floor(redFrac * 255);
44161 # var green = Math.floor(greenFrac * 255);
44162 # var blue = Math.floor(blueFrac * 255);
44163 #
44164 # if (!('alpha' in rgb_color)) {
44165 # return rgbToCssColor_(red, green, blue);
44166 # }
44167 #
44168 # var alphaFrac = rgb_color.alpha.value || 0.0;
44169 # var rgbParams = [red, green, blue].join(',');
44170 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44171 # };
44172 #
44173 # var rgbToCssColor_ = function(red, green, blue) {
44174 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44175 # var hexString = rgbNumber.toString(16);
44176 # var missingZeros = 6 - hexString.length;
44177 # var resultBuilder = ['#'];
44178 # for (var i = 0; i < missingZeros; i++) {
44179 # resultBuilder.push('0');
44180 # }
44181 # resultBuilder.push(hexString);
44182 # return resultBuilder.join('');
44183 # };
44184 #
44185 # // ...
44186 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44187 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44188 # the final pixel color is defined by the equation:
44189 #
44190 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44191 #
44192 # This means that a value of 1.0 corresponds to a solid color, whereas
44193 # a value of 0.0 corresponds to a completely transparent color. This
44194 # uses a wrapper message rather than a simple float scalar so that it is
44195 # possible to distinguish between a default value and the value being unset.
44196 # If omitted, this color object is to be rendered as a solid color
44197 # (as if the alpha value had been explicitly given with a value of 1.0).
44198 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44199 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44200 },
44201 "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
44202 # row or column will be filled with this color and the colors will
44203 # alternate between first_band_color and second_band_color starting
44204 # from the second row or column. Otherwise, the first row or column will be
44205 # filled with first_band_color and the colors will proceed to alternate
44206 # as they normally would.
44207 # for simplicity of conversion to/from color representations in various
44208 # languages over compactness; for example, the fields of this representation
44209 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44210 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44211 # method in iOS; and, with just a little work, it can be easily formatted into
44212 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44213 #
44214 # Example (Java):
44215 #
44216 # import com.google.type.Color;
44217 #
44218 # // ...
44219 # public static java.awt.Color fromProto(Color protocolor) {
44220 # float alpha = protocolor.hasAlpha()
44221 # ? protocolor.getAlpha().getValue()
44222 # : 1.0;
44223 #
44224 # return new java.awt.Color(
44225 # protocolor.getRed(),
44226 # protocolor.getGreen(),
44227 # protocolor.getBlue(),
44228 # alpha);
44229 # }
44230 #
44231 # public static Color toProto(java.awt.Color color) {
44232 # float red = (float) color.getRed();
44233 # float green = (float) color.getGreen();
44234 # float blue = (float) color.getBlue();
44235 # float denominator = 255.0;
44236 # Color.Builder resultBuilder =
44237 # Color
44238 # .newBuilder()
44239 # .setRed(red / denominator)
44240 # .setGreen(green / denominator)
44241 # .setBlue(blue / denominator);
44242 # int alpha = color.getAlpha();
44243 # if (alpha != 255) {
44244 # result.setAlpha(
44245 # FloatValue
44246 # .newBuilder()
44247 # .setValue(((float) alpha) / denominator)
44248 # .build());
44249 # }
44250 # return resultBuilder.build();
44251 # }
44252 # // ...
44253 #
44254 # Example (iOS / Obj-C):
44255 #
44256 # // ...
44257 # static UIColor* fromProto(Color* protocolor) {
44258 # float red = [protocolor red];
44259 # float green = [protocolor green];
44260 # float blue = [protocolor blue];
44261 # FloatValue* alpha_wrapper = [protocolor alpha];
44262 # float alpha = 1.0;
44263 # if (alpha_wrapper != nil) {
44264 # alpha = [alpha_wrapper value];
44265 # }
44266 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44267 # }
44268 #
44269 # static Color* toProto(UIColor* color) {
44270 # CGFloat red, green, blue, alpha;
44271 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44272 # return nil;
44273 # }
44274 # Color* result = [Color alloc] init];
44275 # [result setRed:red];
44276 # [result setGreen:green];
44277 # [result setBlue:blue];
44278 # if (alpha <= 0.9999) {
44279 # [result setAlpha:floatWrapperWithValue(alpha)];
44280 # }
44281 # [result autorelease];
44282 # return result;
44283 # }
44284 # // ...
44285 #
44286 # Example (JavaScript):
44287 #
44288 # // ...
44289 #
44290 # var protoToCssColor = function(rgb_color) {
44291 # var redFrac = rgb_color.red || 0.0;
44292 # var greenFrac = rgb_color.green || 0.0;
44293 # var blueFrac = rgb_color.blue || 0.0;
44294 # var red = Math.floor(redFrac * 255);
44295 # var green = Math.floor(greenFrac * 255);
44296 # var blue = Math.floor(blueFrac * 255);
44297 #
44298 # if (!('alpha' in rgb_color)) {
44299 # return rgbToCssColor_(red, green, blue);
44300 # }
44301 #
44302 # var alphaFrac = rgb_color.alpha.value || 0.0;
44303 # var rgbParams = [red, green, blue].join(',');
44304 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44305 # };
44306 #
44307 # var rgbToCssColor_ = function(red, green, blue) {
44308 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44309 # var hexString = rgbNumber.toString(16);
44310 # var missingZeros = 6 - hexString.length;
44311 # var resultBuilder = ['#'];
44312 # for (var i = 0; i < missingZeros; i++) {
44313 # resultBuilder.push('0');
44314 # }
44315 # resultBuilder.push(hexString);
44316 # return resultBuilder.join('');
44317 # };
44318 #
44319 # // ...
44320 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44321 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44322 # the final pixel color is defined by the equation:
44323 #
44324 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44325 #
44326 # This means that a value of 1.0 corresponds to a solid color, whereas
44327 # a value of 0.0 corresponds to a completely transparent color. This
44328 # uses a wrapper message rather than a simple float scalar so that it is
44329 # possible to distinguish between a default value and the value being unset.
44330 # If omitted, this color object is to be rendered as a solid color
44331 # (as if the alpha value had been explicitly given with a value of 1.0).
44332 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44333 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44334 },
44335 "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
44336 # row or column will be filled with either first_band_color or
44337 # second_band_color, depending on the color of the previous row or
44338 # column.
44339 # for simplicity of conversion to/from color representations in various
44340 # languages over compactness; for example, the fields of this representation
44341 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44342 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44343 # method in iOS; and, with just a little work, it can be easily formatted into
44344 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44345 #
44346 # Example (Java):
44347 #
44348 # import com.google.type.Color;
44349 #
44350 # // ...
44351 # public static java.awt.Color fromProto(Color protocolor) {
44352 # float alpha = protocolor.hasAlpha()
44353 # ? protocolor.getAlpha().getValue()
44354 # : 1.0;
44355 #
44356 # return new java.awt.Color(
44357 # protocolor.getRed(),
44358 # protocolor.getGreen(),
44359 # protocolor.getBlue(),
44360 # alpha);
44361 # }
44362 #
44363 # public static Color toProto(java.awt.Color color) {
44364 # float red = (float) color.getRed();
44365 # float green = (float) color.getGreen();
44366 # float blue = (float) color.getBlue();
44367 # float denominator = 255.0;
44368 # Color.Builder resultBuilder =
44369 # Color
44370 # .newBuilder()
44371 # .setRed(red / denominator)
44372 # .setGreen(green / denominator)
44373 # .setBlue(blue / denominator);
44374 # int alpha = color.getAlpha();
44375 # if (alpha != 255) {
44376 # result.setAlpha(
44377 # FloatValue
44378 # .newBuilder()
44379 # .setValue(((float) alpha) / denominator)
44380 # .build());
44381 # }
44382 # return resultBuilder.build();
44383 # }
44384 # // ...
44385 #
44386 # Example (iOS / Obj-C):
44387 #
44388 # // ...
44389 # static UIColor* fromProto(Color* protocolor) {
44390 # float red = [protocolor red];
44391 # float green = [protocolor green];
44392 # float blue = [protocolor blue];
44393 # FloatValue* alpha_wrapper = [protocolor alpha];
44394 # float alpha = 1.0;
44395 # if (alpha_wrapper != nil) {
44396 # alpha = [alpha_wrapper value];
44397 # }
44398 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44399 # }
44400 #
44401 # static Color* toProto(UIColor* color) {
44402 # CGFloat red, green, blue, alpha;
44403 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44404 # return nil;
44405 # }
44406 # Color* result = [Color alloc] init];
44407 # [result setRed:red];
44408 # [result setGreen:green];
44409 # [result setBlue:blue];
44410 # if (alpha <= 0.9999) {
44411 # [result setAlpha:floatWrapperWithValue(alpha)];
44412 # }
44413 # [result autorelease];
44414 # return result;
44415 # }
44416 # // ...
44417 #
44418 # Example (JavaScript):
44419 #
44420 # // ...
44421 #
44422 # var protoToCssColor = function(rgb_color) {
44423 # var redFrac = rgb_color.red || 0.0;
44424 # var greenFrac = rgb_color.green || 0.0;
44425 # var blueFrac = rgb_color.blue || 0.0;
44426 # var red = Math.floor(redFrac * 255);
44427 # var green = Math.floor(greenFrac * 255);
44428 # var blue = Math.floor(blueFrac * 255);
44429 #
44430 # if (!('alpha' in rgb_color)) {
44431 # return rgbToCssColor_(red, green, blue);
44432 # }
44433 #
44434 # var alphaFrac = rgb_color.alpha.value || 0.0;
44435 # var rgbParams = [red, green, blue].join(',');
44436 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44437 # };
44438 #
44439 # var rgbToCssColor_ = function(red, green, blue) {
44440 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44441 # var hexString = rgbNumber.toString(16);
44442 # var missingZeros = 6 - hexString.length;
44443 # var resultBuilder = ['#'];
44444 # for (var i = 0; i < missingZeros; i++) {
44445 # resultBuilder.push('0');
44446 # }
44447 # resultBuilder.push(hexString);
44448 # return resultBuilder.join('');
44449 # };
44450 #
44451 # // ...
44452 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44453 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44454 # the final pixel color is defined by the equation:
44455 #
44456 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44457 #
44458 # This means that a value of 1.0 corresponds to a solid color, whereas
44459 # a value of 0.0 corresponds to a completely transparent color. This
44460 # uses a wrapper message rather than a simple float scalar so that it is
44461 # possible to distinguish between a default value and the value being unset.
44462 # If omitted, this color object is to be rendered as a solid color
44463 # (as if the alpha value had been explicitly given with a value of 1.0).
44464 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44465 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44466 },
44467 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
44468 # for simplicity of conversion to/from color representations in various
44469 # languages over compactness; for example, the fields of this representation
44470 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44471 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44472 # method in iOS; and, with just a little work, it can be easily formatted into
44473 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44474 #
44475 # Example (Java):
44476 #
44477 # import com.google.type.Color;
44478 #
44479 # // ...
44480 # public static java.awt.Color fromProto(Color protocolor) {
44481 # float alpha = protocolor.hasAlpha()
44482 # ? protocolor.getAlpha().getValue()
44483 # : 1.0;
44484 #
44485 # return new java.awt.Color(
44486 # protocolor.getRed(),
44487 # protocolor.getGreen(),
44488 # protocolor.getBlue(),
44489 # alpha);
44490 # }
44491 #
44492 # public static Color toProto(java.awt.Color color) {
44493 # float red = (float) color.getRed();
44494 # float green = (float) color.getGreen();
44495 # float blue = (float) color.getBlue();
44496 # float denominator = 255.0;
44497 # Color.Builder resultBuilder =
44498 # Color
44499 # .newBuilder()
44500 # .setRed(red / denominator)
44501 # .setGreen(green / denominator)
44502 # .setBlue(blue / denominator);
44503 # int alpha = color.getAlpha();
44504 # if (alpha != 255) {
44505 # result.setAlpha(
44506 # FloatValue
44507 # .newBuilder()
44508 # .setValue(((float) alpha) / denominator)
44509 # .build());
44510 # }
44511 # return resultBuilder.build();
44512 # }
44513 # // ...
44514 #
44515 # Example (iOS / Obj-C):
44516 #
44517 # // ...
44518 # static UIColor* fromProto(Color* protocolor) {
44519 # float red = [protocolor red];
44520 # float green = [protocolor green];
44521 # float blue = [protocolor blue];
44522 # FloatValue* alpha_wrapper = [protocolor alpha];
44523 # float alpha = 1.0;
44524 # if (alpha_wrapper != nil) {
44525 # alpha = [alpha_wrapper value];
44526 # }
44527 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44528 # }
44529 #
44530 # static Color* toProto(UIColor* color) {
44531 # CGFloat red, green, blue, alpha;
44532 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44533 # return nil;
44534 # }
44535 # Color* result = [Color alloc] init];
44536 # [result setRed:red];
44537 # [result setGreen:green];
44538 # [result setBlue:blue];
44539 # if (alpha <= 0.9999) {
44540 # [result setAlpha:floatWrapperWithValue(alpha)];
44541 # }
44542 # [result autorelease];
44543 # return result;
44544 # }
44545 # // ...
44546 #
44547 # Example (JavaScript):
44548 #
44549 # // ...
44550 #
44551 # var protoToCssColor = function(rgb_color) {
44552 # var redFrac = rgb_color.red || 0.0;
44553 # var greenFrac = rgb_color.green || 0.0;
44554 # var blueFrac = rgb_color.blue || 0.0;
44555 # var red = Math.floor(redFrac * 255);
44556 # var green = Math.floor(greenFrac * 255);
44557 # var blue = Math.floor(blueFrac * 255);
44558 #
44559 # if (!('alpha' in rgb_color)) {
44560 # return rgbToCssColor_(red, green, blue);
44561 # }
44562 #
44563 # var alphaFrac = rgb_color.alpha.value || 0.0;
44564 # var rgbParams = [red, green, blue].join(',');
44565 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44566 # };
44567 #
44568 # var rgbToCssColor_ = function(red, green, blue) {
44569 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44570 # var hexString = rgbNumber.toString(16);
44571 # var missingZeros = 6 - hexString.length;
44572 # var resultBuilder = ['#'];
44573 # for (var i = 0; i < missingZeros; i++) {
44574 # resultBuilder.push('0');
44575 # }
44576 # resultBuilder.push(hexString);
44577 # return resultBuilder.join('');
44578 # };
44579 #
44580 # // ...
44581 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44582 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44583 # the final pixel color is defined by the equation:
44584 #
44585 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44586 #
44587 # This means that a value of 1.0 corresponds to a solid color, whereas
44588 # a value of 0.0 corresponds to a completely transparent color. This
44589 # uses a wrapper message rather than a simple float scalar so that it is
44590 # possible to distinguish between a default value and the value being unset.
44591 # If omitted, this color object is to be rendered as a solid color
44592 # (as if the alpha value had been explicitly given with a value of 1.0).
44593 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44594 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44595 },
44596 },
44597 "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
44598 # basis throughout all the rows in the range. At least one of
44599 # row_properties or column_properties must be specified.
44600 # BandedRange.row_properties and BandedRange.column_properties are
44601 # set, the fill colors are applied to cells according to the following rules:
44602 #
44603 # * header_color and footer_color take priority over band colors.
44604 # * first_band_color takes priority over second_band_color.
44605 # * row_properties takes priority over column_properties.
44606 #
44607 # For example, the first row color takes priority over the first column
44608 # color, but the first column color takes priority over the second row color.
44609 # Similarly, the row header takes priority over the column header in the
44610 # top left cell, but the column header takes priority over the first row
44611 # color if the row header is not set.
44612 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
44613 # for simplicity of conversion to/from color representations in various
44614 # languages over compactness; for example, the fields of this representation
44615 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44616 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44617 # method in iOS; and, with just a little work, it can be easily formatted into
44618 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44619 #
44620 # Example (Java):
44621 #
44622 # import com.google.type.Color;
44623 #
44624 # // ...
44625 # public static java.awt.Color fromProto(Color protocolor) {
44626 # float alpha = protocolor.hasAlpha()
44627 # ? protocolor.getAlpha().getValue()
44628 # : 1.0;
44629 #
44630 # return new java.awt.Color(
44631 # protocolor.getRed(),
44632 # protocolor.getGreen(),
44633 # protocolor.getBlue(),
44634 # alpha);
44635 # }
44636 #
44637 # public static Color toProto(java.awt.Color color) {
44638 # float red = (float) color.getRed();
44639 # float green = (float) color.getGreen();
44640 # float blue = (float) color.getBlue();
44641 # float denominator = 255.0;
44642 # Color.Builder resultBuilder =
44643 # Color
44644 # .newBuilder()
44645 # .setRed(red / denominator)
44646 # .setGreen(green / denominator)
44647 # .setBlue(blue / denominator);
44648 # int alpha = color.getAlpha();
44649 # if (alpha != 255) {
44650 # result.setAlpha(
44651 # FloatValue
44652 # .newBuilder()
44653 # .setValue(((float) alpha) / denominator)
44654 # .build());
44655 # }
44656 # return resultBuilder.build();
44657 # }
44658 # // ...
44659 #
44660 # Example (iOS / Obj-C):
44661 #
44662 # // ...
44663 # static UIColor* fromProto(Color* protocolor) {
44664 # float red = [protocolor red];
44665 # float green = [protocolor green];
44666 # float blue = [protocolor blue];
44667 # FloatValue* alpha_wrapper = [protocolor alpha];
44668 # float alpha = 1.0;
44669 # if (alpha_wrapper != nil) {
44670 # alpha = [alpha_wrapper value];
44671 # }
44672 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44673 # }
44674 #
44675 # static Color* toProto(UIColor* color) {
44676 # CGFloat red, green, blue, alpha;
44677 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44678 # return nil;
44679 # }
44680 # Color* result = [Color alloc] init];
44681 # [result setRed:red];
44682 # [result setGreen:green];
44683 # [result setBlue:blue];
44684 # if (alpha <= 0.9999) {
44685 # [result setAlpha:floatWrapperWithValue(alpha)];
44686 # }
44687 # [result autorelease];
44688 # return result;
44689 # }
44690 # // ...
44691 #
44692 # Example (JavaScript):
44693 #
44694 # // ...
44695 #
44696 # var protoToCssColor = function(rgb_color) {
44697 # var redFrac = rgb_color.red || 0.0;
44698 # var greenFrac = rgb_color.green || 0.0;
44699 # var blueFrac = rgb_color.blue || 0.0;
44700 # var red = Math.floor(redFrac * 255);
44701 # var green = Math.floor(greenFrac * 255);
44702 # var blue = Math.floor(blueFrac * 255);
44703 #
44704 # if (!('alpha' in rgb_color)) {
44705 # return rgbToCssColor_(red, green, blue);
44706 # }
44707 #
44708 # var alphaFrac = rgb_color.alpha.value || 0.0;
44709 # var rgbParams = [red, green, blue].join(',');
44710 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44711 # };
44712 #
44713 # var rgbToCssColor_ = function(red, green, blue) {
44714 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44715 # var hexString = rgbNumber.toString(16);
44716 # var missingZeros = 6 - hexString.length;
44717 # var resultBuilder = ['#'];
44718 # for (var i = 0; i < missingZeros; i++) {
44719 # resultBuilder.push('0');
44720 # }
44721 # resultBuilder.push(hexString);
44722 # return resultBuilder.join('');
44723 # };
44724 #
44725 # // ...
44726 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44727 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44728 # the final pixel color is defined by the equation:
44729 #
44730 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44731 #
44732 # This means that a value of 1.0 corresponds to a solid color, whereas
44733 # a value of 0.0 corresponds to a completely transparent color. This
44734 # uses a wrapper message rather than a simple float scalar so that it is
44735 # possible to distinguish between a default value and the value being unset.
44736 # If omitted, this color object is to be rendered as a solid color
44737 # (as if the alpha value had been explicitly given with a value of 1.0).
44738 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44739 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44740 },
44741 "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
44742 # row or column will be filled with this color and the colors will
44743 # alternate between first_band_color and second_band_color starting
44744 # from the second row or column. Otherwise, the first row or column will be
44745 # filled with first_band_color and the colors will proceed to alternate
44746 # as they normally would.
44747 # for simplicity of conversion to/from color representations in various
44748 # languages over compactness; for example, the fields of this representation
44749 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44750 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44751 # method in iOS; and, with just a little work, it can be easily formatted into
44752 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44753 #
44754 # Example (Java):
44755 #
44756 # import com.google.type.Color;
44757 #
44758 # // ...
44759 # public static java.awt.Color fromProto(Color protocolor) {
44760 # float alpha = protocolor.hasAlpha()
44761 # ? protocolor.getAlpha().getValue()
44762 # : 1.0;
44763 #
44764 # return new java.awt.Color(
44765 # protocolor.getRed(),
44766 # protocolor.getGreen(),
44767 # protocolor.getBlue(),
44768 # alpha);
44769 # }
44770 #
44771 # public static Color toProto(java.awt.Color color) {
44772 # float red = (float) color.getRed();
44773 # float green = (float) color.getGreen();
44774 # float blue = (float) color.getBlue();
44775 # float denominator = 255.0;
44776 # Color.Builder resultBuilder =
44777 # Color
44778 # .newBuilder()
44779 # .setRed(red / denominator)
44780 # .setGreen(green / denominator)
44781 # .setBlue(blue / denominator);
44782 # int alpha = color.getAlpha();
44783 # if (alpha != 255) {
44784 # result.setAlpha(
44785 # FloatValue
44786 # .newBuilder()
44787 # .setValue(((float) alpha) / denominator)
44788 # .build());
44789 # }
44790 # return resultBuilder.build();
44791 # }
44792 # // ...
44793 #
44794 # Example (iOS / Obj-C):
44795 #
44796 # // ...
44797 # static UIColor* fromProto(Color* protocolor) {
44798 # float red = [protocolor red];
44799 # float green = [protocolor green];
44800 # float blue = [protocolor blue];
44801 # FloatValue* alpha_wrapper = [protocolor alpha];
44802 # float alpha = 1.0;
44803 # if (alpha_wrapper != nil) {
44804 # alpha = [alpha_wrapper value];
44805 # }
44806 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44807 # }
44808 #
44809 # static Color* toProto(UIColor* color) {
44810 # CGFloat red, green, blue, alpha;
44811 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44812 # return nil;
44813 # }
44814 # Color* result = [Color alloc] init];
44815 # [result setRed:red];
44816 # [result setGreen:green];
44817 # [result setBlue:blue];
44818 # if (alpha <= 0.9999) {
44819 # [result setAlpha:floatWrapperWithValue(alpha)];
44820 # }
44821 # [result autorelease];
44822 # return result;
44823 # }
44824 # // ...
44825 #
44826 # Example (JavaScript):
44827 #
44828 # // ...
44829 #
44830 # var protoToCssColor = function(rgb_color) {
44831 # var redFrac = rgb_color.red || 0.0;
44832 # var greenFrac = rgb_color.green || 0.0;
44833 # var blueFrac = rgb_color.blue || 0.0;
44834 # var red = Math.floor(redFrac * 255);
44835 # var green = Math.floor(greenFrac * 255);
44836 # var blue = Math.floor(blueFrac * 255);
44837 #
44838 # if (!('alpha' in rgb_color)) {
44839 # return rgbToCssColor_(red, green, blue);
44840 # }
44841 #
44842 # var alphaFrac = rgb_color.alpha.value || 0.0;
44843 # var rgbParams = [red, green, blue].join(',');
44844 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44845 # };
44846 #
44847 # var rgbToCssColor_ = function(red, green, blue) {
44848 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44849 # var hexString = rgbNumber.toString(16);
44850 # var missingZeros = 6 - hexString.length;
44851 # var resultBuilder = ['#'];
44852 # for (var i = 0; i < missingZeros; i++) {
44853 # resultBuilder.push('0');
44854 # }
44855 # resultBuilder.push(hexString);
44856 # return resultBuilder.join('');
44857 # };
44858 #
44859 # // ...
44860 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44861 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44862 # the final pixel color is defined by the equation:
44863 #
44864 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44865 #
44866 # This means that a value of 1.0 corresponds to a solid color, whereas
44867 # a value of 0.0 corresponds to a completely transparent color. This
44868 # uses a wrapper message rather than a simple float scalar so that it is
44869 # possible to distinguish between a default value and the value being unset.
44870 # If omitted, this color object is to be rendered as a solid color
44871 # (as if the alpha value had been explicitly given with a value of 1.0).
44872 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
44873 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
44874 },
44875 "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
44876 # row or column will be filled with either first_band_color or
44877 # second_band_color, depending on the color of the previous row or
44878 # column.
44879 # for simplicity of conversion to/from color representations in various
44880 # languages over compactness; for example, the fields of this representation
44881 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
44882 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
44883 # method in iOS; and, with just a little work, it can be easily formatted into
44884 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
44885 #
44886 # Example (Java):
44887 #
44888 # import com.google.type.Color;
44889 #
44890 # // ...
44891 # public static java.awt.Color fromProto(Color protocolor) {
44892 # float alpha = protocolor.hasAlpha()
44893 # ? protocolor.getAlpha().getValue()
44894 # : 1.0;
44895 #
44896 # return new java.awt.Color(
44897 # protocolor.getRed(),
44898 # protocolor.getGreen(),
44899 # protocolor.getBlue(),
44900 # alpha);
44901 # }
44902 #
44903 # public static Color toProto(java.awt.Color color) {
44904 # float red = (float) color.getRed();
44905 # float green = (float) color.getGreen();
44906 # float blue = (float) color.getBlue();
44907 # float denominator = 255.0;
44908 # Color.Builder resultBuilder =
44909 # Color
44910 # .newBuilder()
44911 # .setRed(red / denominator)
44912 # .setGreen(green / denominator)
44913 # .setBlue(blue / denominator);
44914 # int alpha = color.getAlpha();
44915 # if (alpha != 255) {
44916 # result.setAlpha(
44917 # FloatValue
44918 # .newBuilder()
44919 # .setValue(((float) alpha) / denominator)
44920 # .build());
44921 # }
44922 # return resultBuilder.build();
44923 # }
44924 # // ...
44925 #
44926 # Example (iOS / Obj-C):
44927 #
44928 # // ...
44929 # static UIColor* fromProto(Color* protocolor) {
44930 # float red = [protocolor red];
44931 # float green = [protocolor green];
44932 # float blue = [protocolor blue];
44933 # FloatValue* alpha_wrapper = [protocolor alpha];
44934 # float alpha = 1.0;
44935 # if (alpha_wrapper != nil) {
44936 # alpha = [alpha_wrapper value];
44937 # }
44938 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
44939 # }
44940 #
44941 # static Color* toProto(UIColor* color) {
44942 # CGFloat red, green, blue, alpha;
44943 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
44944 # return nil;
44945 # }
44946 # Color* result = [Color alloc] init];
44947 # [result setRed:red];
44948 # [result setGreen:green];
44949 # [result setBlue:blue];
44950 # if (alpha <= 0.9999) {
44951 # [result setAlpha:floatWrapperWithValue(alpha)];
44952 # }
44953 # [result autorelease];
44954 # return result;
44955 # }
44956 # // ...
44957 #
44958 # Example (JavaScript):
44959 #
44960 # // ...
44961 #
44962 # var protoToCssColor = function(rgb_color) {
44963 # var redFrac = rgb_color.red || 0.0;
44964 # var greenFrac = rgb_color.green || 0.0;
44965 # var blueFrac = rgb_color.blue || 0.0;
44966 # var red = Math.floor(redFrac * 255);
44967 # var green = Math.floor(greenFrac * 255);
44968 # var blue = Math.floor(blueFrac * 255);
44969 #
44970 # if (!('alpha' in rgb_color)) {
44971 # return rgbToCssColor_(red, green, blue);
44972 # }
44973 #
44974 # var alphaFrac = rgb_color.alpha.value || 0.0;
44975 # var rgbParams = [red, green, blue].join(',');
44976 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
44977 # };
44978 #
44979 # var rgbToCssColor_ = function(red, green, blue) {
44980 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
44981 # var hexString = rgbNumber.toString(16);
44982 # var missingZeros = 6 - hexString.length;
44983 # var resultBuilder = ['#'];
44984 # for (var i = 0; i < missingZeros; i++) {
44985 # resultBuilder.push('0');
44986 # }
44987 # resultBuilder.push(hexString);
44988 # return resultBuilder.join('');
44989 # };
44990 #
44991 # // ...
44992 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
44993 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
44994 # the final pixel color is defined by the equation:
44995 #
44996 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
44997 #
44998 # This means that a value of 1.0 corresponds to a solid color, whereas
44999 # a value of 0.0 corresponds to a completely transparent color. This
45000 # uses a wrapper message rather than a simple float scalar so that it is
45001 # possible to distinguish between a default value and the value being unset.
45002 # If omitted, this color object is to be rendered as a solid color
45003 # (as if the alpha value had been explicitly given with a value of 1.0).
45004 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45005 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45006 },
45007 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
45008 # for simplicity of conversion to/from color representations in various
45009 # languages over compactness; for example, the fields of this representation
45010 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45011 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45012 # method in iOS; and, with just a little work, it can be easily formatted into
45013 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45014 #
45015 # Example (Java):
45016 #
45017 # import com.google.type.Color;
45018 #
45019 # // ...
45020 # public static java.awt.Color fromProto(Color protocolor) {
45021 # float alpha = protocolor.hasAlpha()
45022 # ? protocolor.getAlpha().getValue()
45023 # : 1.0;
45024 #
45025 # return new java.awt.Color(
45026 # protocolor.getRed(),
45027 # protocolor.getGreen(),
45028 # protocolor.getBlue(),
45029 # alpha);
45030 # }
45031 #
45032 # public static Color toProto(java.awt.Color color) {
45033 # float red = (float) color.getRed();
45034 # float green = (float) color.getGreen();
45035 # float blue = (float) color.getBlue();
45036 # float denominator = 255.0;
45037 # Color.Builder resultBuilder =
45038 # Color
45039 # .newBuilder()
45040 # .setRed(red / denominator)
45041 # .setGreen(green / denominator)
45042 # .setBlue(blue / denominator);
45043 # int alpha = color.getAlpha();
45044 # if (alpha != 255) {
45045 # result.setAlpha(
45046 # FloatValue
45047 # .newBuilder()
45048 # .setValue(((float) alpha) / denominator)
45049 # .build());
45050 # }
45051 # return resultBuilder.build();
45052 # }
45053 # // ...
45054 #
45055 # Example (iOS / Obj-C):
45056 #
45057 # // ...
45058 # static UIColor* fromProto(Color* protocolor) {
45059 # float red = [protocolor red];
45060 # float green = [protocolor green];
45061 # float blue = [protocolor blue];
45062 # FloatValue* alpha_wrapper = [protocolor alpha];
45063 # float alpha = 1.0;
45064 # if (alpha_wrapper != nil) {
45065 # alpha = [alpha_wrapper value];
45066 # }
45067 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45068 # }
45069 #
45070 # static Color* toProto(UIColor* color) {
45071 # CGFloat red, green, blue, alpha;
45072 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45073 # return nil;
45074 # }
45075 # Color* result = [Color alloc] init];
45076 # [result setRed:red];
45077 # [result setGreen:green];
45078 # [result setBlue:blue];
45079 # if (alpha <= 0.9999) {
45080 # [result setAlpha:floatWrapperWithValue(alpha)];
45081 # }
45082 # [result autorelease];
45083 # return result;
45084 # }
45085 # // ...
45086 #
45087 # Example (JavaScript):
45088 #
45089 # // ...
45090 #
45091 # var protoToCssColor = function(rgb_color) {
45092 # var redFrac = rgb_color.red || 0.0;
45093 # var greenFrac = rgb_color.green || 0.0;
45094 # var blueFrac = rgb_color.blue || 0.0;
45095 # var red = Math.floor(redFrac * 255);
45096 # var green = Math.floor(greenFrac * 255);
45097 # var blue = Math.floor(blueFrac * 255);
45098 #
45099 # if (!('alpha' in rgb_color)) {
45100 # return rgbToCssColor_(red, green, blue);
45101 # }
45102 #
45103 # var alphaFrac = rgb_color.alpha.value || 0.0;
45104 # var rgbParams = [red, green, blue].join(',');
45105 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45106 # };
45107 #
45108 # var rgbToCssColor_ = function(red, green, blue) {
45109 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45110 # var hexString = rgbNumber.toString(16);
45111 # var missingZeros = 6 - hexString.length;
45112 # var resultBuilder = ['#'];
45113 # for (var i = 0; i < missingZeros; i++) {
45114 # resultBuilder.push('0');
45115 # }
45116 # resultBuilder.push(hexString);
45117 # return resultBuilder.join('');
45118 # };
45119 #
45120 # // ...
45121 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45122 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45123 # the final pixel color is defined by the equation:
45124 #
45125 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45126 #
45127 # This means that a value of 1.0 corresponds to a solid color, whereas
45128 # a value of 0.0 corresponds to a completely transparent color. This
45129 # uses a wrapper message rather than a simple float scalar so that it is
45130 # possible to distinguish between a default value and the value being unset.
45131 # If omitted, this color object is to be rendered as a solid color
45132 # (as if the alpha value had been explicitly given with a value of 1.0).
45133 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45134 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45135 },
45136 },
45137 "bandedRangeId": 42, # The id of the banded range.
45138 },
45139 ],
45140 "merges": [ # The ranges that are merged together.
45141 { # A range on a sheet.
45142 # All indexes are zero-based.
45143 # Indexes are half open, e.g the start index is inclusive
45144 # and the end index is exclusive -- [start_index, end_index).
45145 # Missing indexes indicate the range is unbounded on that side.
45146 #
45147 # For example, if `"Sheet1"` is sheet ID 0, then:
45148 #
45149 # `Sheet1!A1:A1 == sheet_id: 0,
45150 # start_row_index: 0, end_row_index: 1,
45151 # start_column_index: 0, end_column_index: 1`
45152 #
45153 # `Sheet1!A3:B4 == sheet_id: 0,
45154 # start_row_index: 2, end_row_index: 4,
45155 # start_column_index: 0, end_column_index: 2`
45156 #
45157 # `Sheet1!A:B == sheet_id: 0,
45158 # start_column_index: 0, end_column_index: 2`
45159 #
45160 # `Sheet1!A5:B == sheet_id: 0,
45161 # start_row_index: 4,
45162 # start_column_index: 0, end_column_index: 2`
45163 #
45164 # `Sheet1 == sheet_id:0`
45165 #
45166 # The start index must always be less than or equal to the end index.
45167 # If the start index equals the end index, then the range is empty.
45168 # Empty ranges are typically not meaningful and are usually rendered in the
45169 # UI as `#REF!`.
45170 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045171 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045172 "sheetId": 42, # The sheet this range is on.
45173 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045174 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045175 },
45176 ],
45177 "basicFilter": { # The default filter associated with a sheet. # The filter on this sheet, if any.
45178 "range": { # A range on a sheet. # The range the filter covers.
45179 # All indexes are zero-based.
45180 # Indexes are half open, e.g the start index is inclusive
45181 # and the end index is exclusive -- [start_index, end_index).
45182 # Missing indexes indicate the range is unbounded on that side.
45183 #
45184 # For example, if `"Sheet1"` is sheet ID 0, then:
45185 #
45186 # `Sheet1!A1:A1 == sheet_id: 0,
45187 # start_row_index: 0, end_row_index: 1,
45188 # start_column_index: 0, end_column_index: 1`
45189 #
45190 # `Sheet1!A3:B4 == sheet_id: 0,
45191 # start_row_index: 2, end_row_index: 4,
45192 # start_column_index: 0, end_column_index: 2`
45193 #
45194 # `Sheet1!A:B == sheet_id: 0,
45195 # start_column_index: 0, end_column_index: 2`
45196 #
45197 # `Sheet1!A5:B == sheet_id: 0,
45198 # start_row_index: 4,
45199 # start_column_index: 0, end_column_index: 2`
45200 #
45201 # `Sheet1 == sheet_id:0`
45202 #
45203 # The start index must always be less than or equal to the end index.
45204 # If the start index equals the end index, then the range is empty.
45205 # Empty ranges are typically not meaningful and are usually rendered in the
45206 # UI as `#REF!`.
45207 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045208 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045209 "sheetId": 42, # The sheet this range is on.
45210 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045211 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045212 },
45213 "sortSpecs": [ # The sort order per column. Later specifications are used when values
45214 # are equal in the earlier specifications.
45215 { # A sort order associated with a specific column or row.
45216 "sortOrder": "A String", # The order data should be sorted.
45217 "dimensionIndex": 42, # The dimension the sort should be applied to.
45218 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045219 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045220 "criteria": { # The criteria for showing/hiding values per column.
45221 # The map's key is the column index, and the value is the criteria for
45222 # that column.
45223 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
45224 "hiddenValues": [ # Values that should be hidden.
45225 "A String",
45226 ],
45227 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
45228 # (This does not override hiddenValues -- if a value is listed there,
45229 # it will still be hidden.)
45230 # BooleanConditions are used by conditional formatting,
45231 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045232 "values": [ # The values of the condition. The number of supported values depends
45233 # on the condition type. Some support zero values,
45234 # others one or two values,
45235 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
45236 { # The value of the condition.
45237 "relativeDate": "A String", # A relative date (based on the current date).
45238 # Valid only if the type is
45239 # DATE_BEFORE,
45240 # DATE_AFTER,
45241 # DATE_ON_OR_BEFORE or
45242 # DATE_ON_OR_AFTER.
45243 #
45244 # Relative dates are not supported in data validation.
45245 # They are supported only in conditional formatting and
45246 # conditional filters.
45247 "userEnteredValue": "A String", # A value the condition is based on.
45248 # The value will be parsed as if the user typed into a cell.
45249 # Formulas are supported (and must begin with an `=`).
45250 },
45251 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045252 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045253 },
45254 },
45255 },
45256 },
45257 "charts": [ # The specifications of every chart on this sheet.
45258 { # A chart embedded in a sheet.
45259 "chartId": 42, # The ID of the chart.
45260 "position": { # The position of an embedded object such as a chart. # The position of the chart.
45261 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
45262 # is chosen for you. Used only when writing.
45263 "sheetId": 42, # The sheet this is on. Set only if the embedded object
45264 # is on its own sheet. Must be non-negative.
45265 "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.
45266 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
45267 # All indexes are zero-based.
45268 "rowIndex": 42, # The row index of the coordinate.
45269 "columnIndex": 42, # The column index of the coordinate.
45270 "sheetId": 42, # The sheet this coordinate is on.
45271 },
45272 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
45273 # from the anchor cell.
Thomas Coffee2f245372017-03-27 10:39:26 -070045274 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045275 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
45276 # from the anchor cell.
45277 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
45278 },
45279 },
45280 "spec": { # The specifications of a chart. # The specification of the chart.
45281 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
45282 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
45283 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
45284 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
45285 "sources": [ # The ranges of data for a series or domain.
45286 # Exactly one dimension must have a length of 1,
45287 # and all sources in the list must have the same dimension
45288 # with length 1.
45289 # The domain (if it exists) & all series must have the same number
45290 # of source ranges. If using more than one source range, then the source
45291 # range at a given offset must be contiguous across the domain and series.
45292 #
45293 # For example, these are valid configurations:
45294 #
45295 # domain sources: A1:A5
45296 # series1 sources: B1:B5
45297 # series2 sources: D6:D10
45298 #
45299 # domain sources: A1:A5, C10:C12
45300 # series1 sources: B1:B5, D10:D12
45301 # series2 sources: C1:C5, E10:E12
45302 { # A range on a sheet.
45303 # All indexes are zero-based.
45304 # Indexes are half open, e.g the start index is inclusive
45305 # and the end index is exclusive -- [start_index, end_index).
45306 # Missing indexes indicate the range is unbounded on that side.
45307 #
45308 # For example, if `"Sheet1"` is sheet ID 0, then:
45309 #
45310 # `Sheet1!A1:A1 == sheet_id: 0,
45311 # start_row_index: 0, end_row_index: 1,
45312 # start_column_index: 0, end_column_index: 1`
45313 #
45314 # `Sheet1!A3:B4 == sheet_id: 0,
45315 # start_row_index: 2, end_row_index: 4,
45316 # start_column_index: 0, end_column_index: 2`
45317 #
45318 # `Sheet1!A:B == sheet_id: 0,
45319 # start_column_index: 0, end_column_index: 2`
45320 #
45321 # `Sheet1!A5:B == sheet_id: 0,
45322 # start_row_index: 4,
45323 # start_column_index: 0, end_column_index: 2`
45324 #
45325 # `Sheet1 == sheet_id:0`
45326 #
45327 # The start index must always be less than or equal to the end index.
45328 # If the start index equals the end index, then the range is empty.
45329 # Empty ranges are typically not meaningful and are usually rendered in the
45330 # UI as `#REF!`.
45331 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045332 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045333 "sheetId": 42, # The sheet this range is on.
45334 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045335 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045336 },
45337 ],
45338 },
45339 },
45340 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
45341 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
45342 "sources": [ # The ranges of data for a series or domain.
45343 # Exactly one dimension must have a length of 1,
45344 # and all sources in the list must have the same dimension
45345 # with length 1.
45346 # The domain (if it exists) & all series must have the same number
45347 # of source ranges. If using more than one source range, then the source
45348 # range at a given offset must be contiguous across the domain and series.
45349 #
45350 # For example, these are valid configurations:
45351 #
45352 # domain sources: A1:A5
45353 # series1 sources: B1:B5
45354 # series2 sources: D6:D10
45355 #
45356 # domain sources: A1:A5, C10:C12
45357 # series1 sources: B1:B5, D10:D12
45358 # series2 sources: C1:C5, E10:E12
45359 { # A range on a sheet.
45360 # All indexes are zero-based.
45361 # Indexes are half open, e.g the start index is inclusive
45362 # and the end index is exclusive -- [start_index, end_index).
45363 # Missing indexes indicate the range is unbounded on that side.
45364 #
45365 # For example, if `"Sheet1"` is sheet ID 0, then:
45366 #
45367 # `Sheet1!A1:A1 == sheet_id: 0,
45368 # start_row_index: 0, end_row_index: 1,
45369 # start_column_index: 0, end_column_index: 1`
45370 #
45371 # `Sheet1!A3:B4 == sheet_id: 0,
45372 # start_row_index: 2, end_row_index: 4,
45373 # start_column_index: 0, end_column_index: 2`
45374 #
45375 # `Sheet1!A:B == sheet_id: 0,
45376 # start_column_index: 0, end_column_index: 2`
45377 #
45378 # `Sheet1!A5:B == sheet_id: 0,
45379 # start_row_index: 4,
45380 # start_column_index: 0, end_column_index: 2`
45381 #
45382 # `Sheet1 == sheet_id:0`
45383 #
45384 # The start index must always be less than or equal to the end index.
45385 # If the start index equals the end index, then the range is empty.
45386 # Empty ranges are typically not meaningful and are usually rendered in the
45387 # UI as `#REF!`.
45388 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045389 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045390 "sheetId": 42, # The sheet this range is on.
45391 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045392 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045393 },
45394 ],
45395 },
45396 },
45397 "threeDimensional": True or False, # True if the pie is three dimensional.
45398 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
45399 "pieHole": 3.14, # The size of the hole in the pie chart.
45400 },
45401 "basicChart": { # The specification for a basic chart. See BasicChartType for the list # A basic chart specification, can be one of many kinds of charts.
45402 # See BasicChartType for the list of all
45403 # charts this supports.
45404 # of charts this supports.
45405 "headerCount": 42, # The number of rows or columns in the data that are "headers".
45406 # If not set, Google Sheets will guess how many rows are headers based
45407 # on the data.
45408 #
45409 # (Note that BasicChartAxis.title may override the axis title
45410 # inferred from the header values.)
45411 "series": [ # The data this chart is visualizing.
45412 { # A single series of data in a chart.
45413 # For example, if charting stock prices over time, multiple series may exist,
45414 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
45415 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
45416 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
45417 "sources": [ # The ranges of data for a series or domain.
45418 # Exactly one dimension must have a length of 1,
45419 # and all sources in the list must have the same dimension
45420 # with length 1.
45421 # The domain (if it exists) & all series must have the same number
45422 # of source ranges. If using more than one source range, then the source
45423 # range at a given offset must be contiguous across the domain and series.
45424 #
45425 # For example, these are valid configurations:
45426 #
45427 # domain sources: A1:A5
45428 # series1 sources: B1:B5
45429 # series2 sources: D6:D10
45430 #
45431 # domain sources: A1:A5, C10:C12
45432 # series1 sources: B1:B5, D10:D12
45433 # series2 sources: C1:C5, E10:E12
45434 { # A range on a sheet.
45435 # All indexes are zero-based.
45436 # Indexes are half open, e.g the start index is inclusive
45437 # and the end index is exclusive -- [start_index, end_index).
45438 # Missing indexes indicate the range is unbounded on that side.
45439 #
45440 # For example, if `"Sheet1"` is sheet ID 0, then:
45441 #
45442 # `Sheet1!A1:A1 == sheet_id: 0,
45443 # start_row_index: 0, end_row_index: 1,
45444 # start_column_index: 0, end_column_index: 1`
45445 #
45446 # `Sheet1!A3:B4 == sheet_id: 0,
45447 # start_row_index: 2, end_row_index: 4,
45448 # start_column_index: 0, end_column_index: 2`
45449 #
45450 # `Sheet1!A:B == sheet_id: 0,
45451 # start_column_index: 0, end_column_index: 2`
45452 #
45453 # `Sheet1!A5:B == sheet_id: 0,
45454 # start_row_index: 4,
45455 # start_column_index: 0, end_column_index: 2`
45456 #
45457 # `Sheet1 == sheet_id:0`
45458 #
45459 # The start index must always be less than or equal to the end index.
45460 # If the start index equals the end index, then the range is empty.
45461 # Empty ranges are typically not meaningful and are usually rendered in the
45462 # UI as `#REF!`.
45463 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045464 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045465 "sheetId": 42, # The sheet this range is on.
45466 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045467 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045468 },
45469 ],
45470 },
45471 },
45472 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
45473 # For example, if charting stocks over time, the "Volume" series
45474 # may want to be pinned to the right with the prices pinned to the left,
45475 # because the scale of trading volume is different than the scale of
45476 # prices.
45477 # It is an error to specify an axis that isn't a valid minor axis
45478 # for the chart's type.
45479 "type": "A String", # The type of this series. Valid only if the
45480 # chartType is
45481 # COMBO.
45482 # Different types will change the way the series is visualized.
45483 # Only LINE, AREA,
45484 # and COLUMN are supported.
45485 },
45486 ],
45487 "legendPosition": "A String", # The position of the chart legend.
45488 "domains": [ # The domain of data this is charting.
45489 # Only a single domain is currently supported.
45490 { # The domain of a chart.
45491 # For example, if charting stock prices over time, this would be the date.
45492 "domain": { # The data included in a domain or series. # The data of the domain. For example, if charting stock prices over time,
45493 # this is the data representing the dates.
45494 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
45495 "sources": [ # The ranges of data for a series or domain.
45496 # Exactly one dimension must have a length of 1,
45497 # and all sources in the list must have the same dimension
45498 # with length 1.
45499 # The domain (if it exists) & all series must have the same number
45500 # of source ranges. If using more than one source range, then the source
45501 # range at a given offset must be contiguous across the domain and series.
45502 #
45503 # For example, these are valid configurations:
45504 #
45505 # domain sources: A1:A5
45506 # series1 sources: B1:B5
45507 # series2 sources: D6:D10
45508 #
45509 # domain sources: A1:A5, C10:C12
45510 # series1 sources: B1:B5, D10:D12
45511 # series2 sources: C1:C5, E10:E12
45512 { # A range on a sheet.
45513 # All indexes are zero-based.
45514 # Indexes are half open, e.g the start index is inclusive
45515 # and the end index is exclusive -- [start_index, end_index).
45516 # Missing indexes indicate the range is unbounded on that side.
45517 #
45518 # For example, if `"Sheet1"` is sheet ID 0, then:
45519 #
45520 # `Sheet1!A1:A1 == sheet_id: 0,
45521 # start_row_index: 0, end_row_index: 1,
45522 # start_column_index: 0, end_column_index: 1`
45523 #
45524 # `Sheet1!A3:B4 == sheet_id: 0,
45525 # start_row_index: 2, end_row_index: 4,
45526 # start_column_index: 0, end_column_index: 2`
45527 #
45528 # `Sheet1!A:B == sheet_id: 0,
45529 # start_column_index: 0, end_column_index: 2`
45530 #
45531 # `Sheet1!A5:B == sheet_id: 0,
45532 # start_row_index: 4,
45533 # start_column_index: 0, end_column_index: 2`
45534 #
45535 # `Sheet1 == sheet_id:0`
45536 #
45537 # The start index must always be less than or equal to the end index.
45538 # If the start index equals the end index, then the range is empty.
45539 # Empty ranges are typically not meaningful and are usually rendered in the
45540 # UI as `#REF!`.
45541 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045542 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045543 "sheetId": 42, # The sheet this range is on.
45544 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045545 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045546 },
45547 ],
45548 },
45549 },
45550 },
45551 ],
45552 "chartType": "A String", # The type of the chart.
45553 "axis": [ # The axis on the chart.
45554 { # An axis of the chart.
45555 # A chart may not have more than one axis per
45556 # axis position.
45557 "position": "A String", # The position of this axis.
45558 "format": { # The format of a run of text in a cell. # The format of the title.
45559 # Only valid if the axis is not associated with the domain.
45560 # Absent values indicate that the field isn't specified.
45561 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
45562 # for simplicity of conversion to/from color representations in various
45563 # languages over compactness; for example, the fields of this representation
45564 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45565 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45566 # method in iOS; and, with just a little work, it can be easily formatted into
45567 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45568 #
45569 # Example (Java):
45570 #
45571 # import com.google.type.Color;
45572 #
45573 # // ...
45574 # public static java.awt.Color fromProto(Color protocolor) {
45575 # float alpha = protocolor.hasAlpha()
45576 # ? protocolor.getAlpha().getValue()
45577 # : 1.0;
45578 #
45579 # return new java.awt.Color(
45580 # protocolor.getRed(),
45581 # protocolor.getGreen(),
45582 # protocolor.getBlue(),
45583 # alpha);
45584 # }
45585 #
45586 # public static Color toProto(java.awt.Color color) {
45587 # float red = (float) color.getRed();
45588 # float green = (float) color.getGreen();
45589 # float blue = (float) color.getBlue();
45590 # float denominator = 255.0;
45591 # Color.Builder resultBuilder =
45592 # Color
45593 # .newBuilder()
45594 # .setRed(red / denominator)
45595 # .setGreen(green / denominator)
45596 # .setBlue(blue / denominator);
45597 # int alpha = color.getAlpha();
45598 # if (alpha != 255) {
45599 # result.setAlpha(
45600 # FloatValue
45601 # .newBuilder()
45602 # .setValue(((float) alpha) / denominator)
45603 # .build());
45604 # }
45605 # return resultBuilder.build();
45606 # }
45607 # // ...
45608 #
45609 # Example (iOS / Obj-C):
45610 #
45611 # // ...
45612 # static UIColor* fromProto(Color* protocolor) {
45613 # float red = [protocolor red];
45614 # float green = [protocolor green];
45615 # float blue = [protocolor blue];
45616 # FloatValue* alpha_wrapper = [protocolor alpha];
45617 # float alpha = 1.0;
45618 # if (alpha_wrapper != nil) {
45619 # alpha = [alpha_wrapper value];
45620 # }
45621 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45622 # }
45623 #
45624 # static Color* toProto(UIColor* color) {
45625 # CGFloat red, green, blue, alpha;
45626 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45627 # return nil;
45628 # }
45629 # Color* result = [Color alloc] init];
45630 # [result setRed:red];
45631 # [result setGreen:green];
45632 # [result setBlue:blue];
45633 # if (alpha <= 0.9999) {
45634 # [result setAlpha:floatWrapperWithValue(alpha)];
45635 # }
45636 # [result autorelease];
45637 # return result;
45638 # }
45639 # // ...
45640 #
45641 # Example (JavaScript):
45642 #
45643 # // ...
45644 #
45645 # var protoToCssColor = function(rgb_color) {
45646 # var redFrac = rgb_color.red || 0.0;
45647 # var greenFrac = rgb_color.green || 0.0;
45648 # var blueFrac = rgb_color.blue || 0.0;
45649 # var red = Math.floor(redFrac * 255);
45650 # var green = Math.floor(greenFrac * 255);
45651 # var blue = Math.floor(blueFrac * 255);
45652 #
45653 # if (!('alpha' in rgb_color)) {
45654 # return rgbToCssColor_(red, green, blue);
45655 # }
45656 #
45657 # var alphaFrac = rgb_color.alpha.value || 0.0;
45658 # var rgbParams = [red, green, blue].join(',');
45659 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45660 # };
45661 #
45662 # var rgbToCssColor_ = function(red, green, blue) {
45663 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45664 # var hexString = rgbNumber.toString(16);
45665 # var missingZeros = 6 - hexString.length;
45666 # var resultBuilder = ['#'];
45667 # for (var i = 0; i < missingZeros; i++) {
45668 # resultBuilder.push('0');
45669 # }
45670 # resultBuilder.push(hexString);
45671 # return resultBuilder.join('');
45672 # };
45673 #
45674 # // ...
45675 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45676 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45677 # the final pixel color is defined by the equation:
45678 #
45679 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45680 #
45681 # This means that a value of 1.0 corresponds to a solid color, whereas
45682 # a value of 0.0 corresponds to a completely transparent color. This
45683 # uses a wrapper message rather than a simple float scalar so that it is
45684 # possible to distinguish between a default value and the value being unset.
45685 # If omitted, this color object is to be rendered as a solid color
45686 # (as if the alpha value had been explicitly given with a value of 1.0).
45687 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45688 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45689 },
45690 "bold": True or False, # True if the text is bold.
45691 "strikethrough": True or False, # True if the text has a strikethrough.
45692 "fontFamily": "A String", # The font family.
45693 "fontSize": 42, # The size of the font.
45694 "italic": True or False, # True if the text is italicized.
45695 "underline": True or False, # True if the text is underlined.
45696 },
Thomas Coffee2f245372017-03-27 10:39:26 -070045697 "title": "A String", # The title of this axis. If set, this overrides any title inferred
45698 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045699 },
45700 ],
45701 },
45702 "title": "A String", # The title of the chart.
45703 },
45704 },
45705 ],
45706 "filterViews": [ # The filter views in this sheet.
45707 { # A filter view.
45708 "title": "A String", # The name of the filter view.
45709 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
45710 #
45711 # When writing, only one of range or named_range_id
45712 # may be set.
45713 "filterViewId": 42, # The ID of the filter view.
45714 "range": { # A range on a sheet. # The range this filter view covers.
45715 #
45716 # When writing, only one of range or named_range_id
45717 # may be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045718 # All indexes are zero-based.
45719 # Indexes are half open, e.g the start index is inclusive
45720 # and the end index is exclusive -- [start_index, end_index).
45721 # Missing indexes indicate the range is unbounded on that side.
45722 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045723 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045724 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045725 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045726 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045727 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045728 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045729 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045730 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045731 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045732 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045733 # `Sheet1!A:B == sheet_id: 0,
45734 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045735 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045736 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045737 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045738 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045739 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045740 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045741 #
45742 # The start index must always be less than or equal to the end index.
45743 # If the start index equals the end index, then the range is empty.
45744 # Empty ranges are typically not meaningful and are usually rendered in the
45745 # UI as `#REF!`.
45746 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045747 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045748 "sheetId": 42, # The sheet this range is on.
45749 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045750 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045751 },
45752 "sortSpecs": [ # The sort order per column. Later specifications are used when values
45753 # are equal in the earlier specifications.
45754 { # A sort order associated with a specific column or row.
45755 "sortOrder": "A String", # The order data should be sorted.
45756 "dimensionIndex": 42, # The dimension the sort should be applied to.
45757 },
45758 ],
45759 "criteria": { # The criteria for showing/hiding values per column.
45760 # The map's key is the column index, and the value is the criteria for
45761 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070045762 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045763 "hiddenValues": [ # Values that should be hidden.
45764 "A String",
45765 ],
45766 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
45767 # (This does not override hiddenValues -- if a value is listed there,
45768 # it will still be hidden.)
45769 # BooleanConditions are used by conditional formatting,
45770 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045771 "values": [ # The values of the condition. The number of supported values depends
45772 # on the condition type. Some support zero values,
45773 # others one or two values,
45774 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
45775 { # The value of the condition.
45776 "relativeDate": "A String", # A relative date (based on the current date).
45777 # Valid only if the type is
45778 # DATE_BEFORE,
45779 # DATE_AFTER,
45780 # DATE_ON_OR_BEFORE or
45781 # DATE_ON_OR_AFTER.
45782 #
45783 # Relative dates are not supported in data validation.
45784 # They are supported only in conditional formatting and
45785 # conditional filters.
45786 "userEnteredValue": "A String", # A value the condition is based on.
45787 # The value will be parsed as if the user typed into a cell.
45788 # Formulas are supported (and must begin with an `=`).
45789 },
45790 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045791 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045792 },
45793 },
45794 },
45795 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045796 ],
45797 "protectedRanges": [ # The protected ranges in this sheet.
45798 { # A protected range.
45799 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
45800 # Unprotected ranges are only supported on protected sheets.
45801 { # A range on a sheet.
45802 # All indexes are zero-based.
45803 # Indexes are half open, e.g the start index is inclusive
45804 # and the end index is exclusive -- [start_index, end_index).
45805 # Missing indexes indicate the range is unbounded on that side.
45806 #
45807 # For example, if `"Sheet1"` is sheet ID 0, then:
45808 #
45809 # `Sheet1!A1:A1 == sheet_id: 0,
45810 # start_row_index: 0, end_row_index: 1,
45811 # start_column_index: 0, end_column_index: 1`
45812 #
45813 # `Sheet1!A3:B4 == sheet_id: 0,
45814 # start_row_index: 2, end_row_index: 4,
45815 # start_column_index: 0, end_column_index: 2`
45816 #
45817 # `Sheet1!A:B == sheet_id: 0,
45818 # start_column_index: 0, end_column_index: 2`
45819 #
45820 # `Sheet1!A5:B == sheet_id: 0,
45821 # start_row_index: 4,
45822 # start_column_index: 0, end_column_index: 2`
45823 #
45824 # `Sheet1 == sheet_id:0`
45825 #
45826 # The start index must always be less than or equal to the end index.
45827 # If the start index equals the end index, then the range is empty.
45828 # Empty ranges are typically not meaningful and are usually rendered in the
45829 # UI as `#REF!`.
45830 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045831 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045832 "sheetId": 42, # The sheet this range is on.
45833 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045834 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045835 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045836 ],
45837 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
45838 # protected area.
45839 # This field is read-only.
45840 "description": "A String", # The description of this protected range.
45841 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
45842 #
45843 # When writing, only one of range or named_range_id
45844 # may be set.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045845 "range": { # A range on a sheet. # The range that is being protected.
45846 # The range may be fully unbounded, in which case this is considered
45847 # a protected sheet.
45848 #
45849 # When writing, only one of range or named_range_id
45850 # may be set.
45851 # All indexes are zero-based.
45852 # Indexes are half open, e.g the start index is inclusive
45853 # and the end index is exclusive -- [start_index, end_index).
45854 # Missing indexes indicate the range is unbounded on that side.
45855 #
45856 # For example, if `"Sheet1"` is sheet ID 0, then:
45857 #
45858 # `Sheet1!A1:A1 == sheet_id: 0,
45859 # start_row_index: 0, end_row_index: 1,
45860 # start_column_index: 0, end_column_index: 1`
45861 #
45862 # `Sheet1!A3:B4 == sheet_id: 0,
45863 # start_row_index: 2, end_row_index: 4,
45864 # start_column_index: 0, end_column_index: 2`
45865 #
45866 # `Sheet1!A:B == sheet_id: 0,
45867 # start_column_index: 0, end_column_index: 2`
45868 #
45869 # `Sheet1!A5:B == sheet_id: 0,
45870 # start_row_index: 4,
45871 # start_column_index: 0, end_column_index: 2`
45872 #
45873 # `Sheet1 == sheet_id:0`
45874 #
45875 # The start index must always be less than or equal to the end index.
45876 # If the start index equals the end index, then the range is empty.
45877 # Empty ranges are typically not meaningful and are usually rendered in the
45878 # UI as `#REF!`.
45879 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045880 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045881 "sheetId": 42, # The sheet this range is on.
45882 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070045883 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045884 },
Thomas Coffee2f245372017-03-27 10:39:26 -070045885 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
45886 # This field is only visible to users with edit access to the protected
45887 # range and the document.
45888 # Editors are not supported with warning_only protection.
45889 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
45890 # range. Domain protection is only supported on documents within a domain.
45891 "users": [ # The email addresses of users with edit access to the protected range.
45892 "A String",
45893 ],
45894 "groups": [ # The email addresses of groups with edit access to the protected range.
45895 "A String",
45896 ],
45897 },
45898 "protectedRangeId": 42, # The ID of the protected range.
45899 # This field is read-only.
45900 "warningOnly": True or False, # True if this protected range will show a warning when editing.
45901 # Warning-based protection means that every user can edit data in the
45902 # protected range, except editing will prompt a warning asking the user
45903 # to confirm the edit.
45904 #
45905 # When writing: if this field is true, then editors is ignored.
45906 # Additionally, if this field is changed from true to false and the
45907 # `editors` field is not set (nor included in the field mask), then
45908 # the editors will be set to all the editors in the document.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045909 },
45910 ],
45911 "data": [ # Data in the grid, if this is a grid sheet.
45912 # The number of GridData objects returned is dependent on the number of
45913 # ranges requested on this sheet. For example, if this is representing
45914 # `Sheet1`, and the spreadsheet was requested with ranges
45915 # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a
45916 # startRow/startColumn of `0`,
45917 # while the second one will have `startRow 14` (zero-based row 15),
45918 # and `startColumn 3` (zero-based column D).
45919 { # Data in the grid, as well as metadata about the dimensions.
Thomas Coffee2f245372017-03-27 10:39:26 -070045920 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
45921 # in start_row.
45922 { # Properties about a dimension.
45923 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45924 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45925 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45926 # This field is read-only.
45927 },
45928 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -070045929 "startColumn": 42, # The first column this GridData refers to, zero-based.
45930 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
45931 # in start_column.
45932 { # Properties about a dimension.
45933 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45934 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45935 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45936 # This field is read-only.
45937 },
45938 ],
Thomas Coffee2f245372017-03-27 10:39:26 -070045939 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045940 "rowData": [ # The data in the grid, one entry per row,
45941 # starting with the row in startRow.
45942 # The values in RowData will correspond to columns starting
45943 # at start_column.
45944 { # Data about each cell in a row.
45945 "values": [ # The values in the row, one per column.
45946 { # Data about a specific cell.
45947 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
45948 # is computed dynamically based on its data, grouping, filters, values,
45949 # etc. Only the top-left cell of the pivot table contains the pivot table
45950 # definition. The other cells will contain the calculated values of the
45951 # results of the pivot in their effective_value fields.
45952 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
45953 # or vertically (as rows).
45954 "rows": [ # Each row grouping in the pivot table.
45955 { # A single grouping (either row or column) in a pivot table.
45956 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
45957 "valueMetadata": [ # Metadata about values in the grouping.
45958 { # Metadata about a value in a pivot grouping.
45959 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
45960 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
45961 # (Note that formulaValue is not valid,
45962 # because the values will be calculated.)
45963 "numberValue": 3.14, # Represents a double value.
45964 # Note: Dates, Times and DateTimes are represented as doubles in
45965 # "serial number" format.
45966 "boolValue": True or False, # Represents a boolean value.
45967 "formulaValue": "A String", # Represents a formula.
45968 "stringValue": "A String", # Represents a string value.
45969 # Leading single quotes are not included. For example, if the user typed
45970 # `'123` into the UI, this would be represented as a `stringValue` of
45971 # `"123"`.
45972 "errorValue": { # An error in a cell. # Represents an error.
45973 # This field is read-only.
45974 "message": "A String", # A message with more information about the error
45975 # (in the spreadsheet's locale).
45976 "type": "A String", # The type of error.
45977 },
45978 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045979 },
45980 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045981 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
45982 # If not specified, sorting is alphabetical by this group's values.
45983 "buckets": [ # Determines the bucket from which values are chosen to sort.
45984 #
45985 # For example, in a pivot table with one row group & two column groups,
45986 # the row group can list up to two values. The first value corresponds
45987 # to a value within the first column group, and the second value
45988 # corresponds to a value in the second column group. If no values
45989 # are listed, this would indicate that the row should be sorted according
45990 # to the "Grand Total" over the column groups. If a single value is listed,
45991 # this would correspond to using the "Total" of that bucket.
45992 { # The kinds of value that a cell in a spreadsheet can have.
45993 "numberValue": 3.14, # Represents a double value.
45994 # Note: Dates, Times and DateTimes are represented as doubles in
45995 # "serial number" format.
45996 "boolValue": True or False, # Represents a boolean value.
45997 "formulaValue": "A String", # Represents a formula.
45998 "stringValue": "A String", # Represents a string value.
45999 # Leading single quotes are not included. For example, if the user typed
46000 # `'123` into the UI, this would be represented as a `stringValue` of
46001 # `"123"`.
46002 "errorValue": { # An error in a cell. # Represents an error.
46003 # This field is read-only.
46004 "message": "A String", # A message with more information about the error
46005 # (in the spreadsheet's locale).
46006 "type": "A String", # The type of error.
46007 },
46008 },
46009 ],
46010 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
46011 # grouping should be sorted by.
46012 },
46013 "sortOrder": "A String", # The order the values in this group should be sorted.
46014 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
46015 #
46016 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46017 # means this group refers to column `C`, whereas the offset `1` would refer
46018 # to column `D`.
46019 },
46020 ],
46021 "source": { # A range on a sheet. # The range the pivot table is reading data from.
46022 # All indexes are zero-based.
46023 # Indexes are half open, e.g the start index is inclusive
46024 # and the end index is exclusive -- [start_index, end_index).
46025 # Missing indexes indicate the range is unbounded on that side.
46026 #
46027 # For example, if `"Sheet1"` is sheet ID 0, then:
46028 #
46029 # `Sheet1!A1:A1 == sheet_id: 0,
46030 # start_row_index: 0, end_row_index: 1,
46031 # start_column_index: 0, end_column_index: 1`
46032 #
46033 # `Sheet1!A3:B4 == sheet_id: 0,
46034 # start_row_index: 2, end_row_index: 4,
46035 # start_column_index: 0, end_column_index: 2`
46036 #
46037 # `Sheet1!A:B == sheet_id: 0,
46038 # start_column_index: 0, end_column_index: 2`
46039 #
46040 # `Sheet1!A5:B == sheet_id: 0,
46041 # start_row_index: 4,
46042 # start_column_index: 0, end_column_index: 2`
46043 #
46044 # `Sheet1 == sheet_id:0`
46045 #
46046 # The start index must always be less than or equal to the end index.
46047 # If the start index equals the end index, then the range is empty.
46048 # Empty ranges are typically not meaningful and are usually rendered in the
46049 # UI as `#REF!`.
46050 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070046051 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046052 "sheetId": 42, # The sheet this range is on.
46053 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Thomas Coffee2f245372017-03-27 10:39:26 -070046054 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046055 },
46056 "values": [ # A list of values to include in the pivot table.
46057 { # The definition of how a value in a pivot table should be calculated.
46058 "formula": "A String", # A custom formula to calculate the value. The formula must start
46059 # with an `=` character.
Thomas Coffee2f245372017-03-27 10:39:26 -070046060 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
46061 #
46062 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46063 # means this value refers to column `C`, whereas the offset `1` would
46064 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046065 "summarizeFunction": "A String", # A function to summarize the value.
46066 # If formula is set, the only supported values are
46067 # SUM and
46068 # CUSTOM.
46069 # If sourceColumnOffset is set, then `CUSTOM`
46070 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046071 "name": "A String", # A name to use for the value. This is only used if formula was set.
46072 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046073 },
46074 ],
46075 "criteria": { # An optional mapping of filters per source column offset.
46076 #
46077 # The filters will be applied before aggregating data into the pivot table.
46078 # The map's key is the column offset of the source range that you want to
46079 # filter, and the value is the criteria for that column.
46080 #
46081 # For example, if the source was `C10:E15`, a key of `0` will have the filter
46082 # for column `C`, whereas the key `1` is for column `D`.
46083 "a_key": { # Criteria for showing/hiding rows in a pivot table.
46084 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
46085 "A String",
46086 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046087 },
46088 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046089 "columns": [ # Each column grouping in the pivot table.
46090 { # A single grouping (either row or column) in a pivot table.
46091 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
46092 "valueMetadata": [ # Metadata about values in the grouping.
46093 { # Metadata about a value in a pivot grouping.
46094 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
46095 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
46096 # (Note that formulaValue is not valid,
46097 # because the values will be calculated.)
46098 "numberValue": 3.14, # Represents a double value.
46099 # Note: Dates, Times and DateTimes are represented as doubles in
46100 # "serial number" format.
46101 "boolValue": True or False, # Represents a boolean value.
46102 "formulaValue": "A String", # Represents a formula.
46103 "stringValue": "A String", # Represents a string value.
46104 # Leading single quotes are not included. For example, if the user typed
46105 # `'123` into the UI, this would be represented as a `stringValue` of
46106 # `"123"`.
46107 "errorValue": { # An error in a cell. # Represents an error.
46108 # This field is read-only.
46109 "message": "A String", # A message with more information about the error
46110 # (in the spreadsheet's locale).
46111 "type": "A String", # The type of error.
46112 },
46113 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046114 },
46115 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046116 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
46117 # If not specified, sorting is alphabetical by this group's values.
46118 "buckets": [ # Determines the bucket from which values are chosen to sort.
46119 #
46120 # For example, in a pivot table with one row group & two column groups,
46121 # the row group can list up to two values. The first value corresponds
46122 # to a value within the first column group, and the second value
46123 # corresponds to a value in the second column group. If no values
46124 # are listed, this would indicate that the row should be sorted according
46125 # to the "Grand Total" over the column groups. If a single value is listed,
46126 # this would correspond to using the "Total" of that bucket.
46127 { # The kinds of value that a cell in a spreadsheet can have.
46128 "numberValue": 3.14, # Represents a double value.
46129 # Note: Dates, Times and DateTimes are represented as doubles in
46130 # "serial number" format.
46131 "boolValue": True or False, # Represents a boolean value.
46132 "formulaValue": "A String", # Represents a formula.
46133 "stringValue": "A String", # Represents a string value.
46134 # Leading single quotes are not included. For example, if the user typed
46135 # `'123` into the UI, this would be represented as a `stringValue` of
46136 # `"123"`.
46137 "errorValue": { # An error in a cell. # Represents an error.
46138 # This field is read-only.
46139 "message": "A String", # A message with more information about the error
46140 # (in the spreadsheet's locale).
46141 "type": "A String", # The type of error.
46142 },
46143 },
46144 ],
46145 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
46146 # grouping should be sorted by.
46147 },
46148 "sortOrder": "A String", # The order the values in this group should be sorted.
46149 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
46150 #
46151 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46152 # means this group refers to column `C`, whereas the offset `1` would refer
46153 # to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046154 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046155 ],
46156 },
46157 "hyperlink": "A String", # A hyperlink this cell points to, if any.
46158 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
46159 "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
46160 # the calculated value. For cells with literals, this will be
46161 # the same as the user_entered_value.
46162 # This field is read-only.
46163 "numberValue": 3.14, # Represents a double value.
46164 # Note: Dates, Times and DateTimes are represented as doubles in
46165 # "serial number" format.
46166 "boolValue": True or False, # Represents a boolean value.
46167 "formulaValue": "A String", # Represents a formula.
46168 "stringValue": "A String", # Represents a string value.
46169 # Leading single quotes are not included. For example, if the user typed
46170 # `'123` into the UI, this would be represented as a `stringValue` of
46171 # `"123"`.
46172 "errorValue": { # An error in a cell. # Represents an error.
46173 # This field is read-only.
46174 "message": "A String", # A message with more information about the error
46175 # (in the spreadsheet's locale).
46176 "type": "A String", # The type of error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046177 },
46178 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046179 "formattedValue": "A String", # The formatted value of the cell.
46180 # This is the value as it's shown to the user.
46181 # This field is read-only.
46182 "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()`
46183 # Note: Dates, Times and DateTimes are represented as doubles in
46184 # serial number format.
46185 "numberValue": 3.14, # Represents a double value.
46186 # Note: Dates, Times and DateTimes are represented as doubles in
46187 # "serial number" format.
46188 "boolValue": True or False, # Represents a boolean value.
46189 "formulaValue": "A String", # Represents a formula.
46190 "stringValue": "A String", # Represents a string value.
46191 # Leading single quotes are not included. For example, if the user typed
46192 # `'123` into the UI, this would be represented as a `stringValue` of
46193 # `"123"`.
46194 "errorValue": { # An error in a cell. # Represents an error.
46195 # This field is read-only.
46196 "message": "A String", # A message with more information about the error
46197 # (in the spreadsheet's locale).
46198 "type": "A String", # The type of error.
46199 },
46200 },
46201 "note": "A String", # Any note on the cell.
46202 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
46203 # This includes the results of applying any conditional formatting and,
46204 # if the cell contains a formula, the computed number format.
46205 # If the effective format is the default format, effective format will
46206 # not be written.
46207 # This field is read-only.
46208 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
46209 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
46210 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046211 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046212 # information about the supported patterns.
46213 "type": "A String", # The type of the number format.
46214 # When writing, this field must be set.
46215 },
46216 "textDirection": "A String", # The direction of the text in the cell.
46217 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
46218 # When updating padding, every field must be specified.
46219 "top": 42, # The top padding of the cell.
46220 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046221 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046222 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046223 },
Thomas Coffee2f245372017-03-27 10:39:26 -070046224 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046225 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
46226 # for simplicity of conversion to/from color representations in various
46227 # languages over compactness; for example, the fields of this representation
46228 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46229 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46230 # method in iOS; and, with just a little work, it can be easily formatted into
46231 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46232 #
46233 # Example (Java):
46234 #
46235 # import com.google.type.Color;
46236 #
46237 # // ...
46238 # public static java.awt.Color fromProto(Color protocolor) {
46239 # float alpha = protocolor.hasAlpha()
46240 # ? protocolor.getAlpha().getValue()
46241 # : 1.0;
46242 #
46243 # return new java.awt.Color(
46244 # protocolor.getRed(),
46245 # protocolor.getGreen(),
46246 # protocolor.getBlue(),
46247 # alpha);
46248 # }
46249 #
46250 # public static Color toProto(java.awt.Color color) {
46251 # float red = (float) color.getRed();
46252 # float green = (float) color.getGreen();
46253 # float blue = (float) color.getBlue();
46254 # float denominator = 255.0;
46255 # Color.Builder resultBuilder =
46256 # Color
46257 # .newBuilder()
46258 # .setRed(red / denominator)
46259 # .setGreen(green / denominator)
46260 # .setBlue(blue / denominator);
46261 # int alpha = color.getAlpha();
46262 # if (alpha != 255) {
46263 # result.setAlpha(
46264 # FloatValue
46265 # .newBuilder()
46266 # .setValue(((float) alpha) / denominator)
46267 # .build());
46268 # }
46269 # return resultBuilder.build();
46270 # }
46271 # // ...
46272 #
46273 # Example (iOS / Obj-C):
46274 #
46275 # // ...
46276 # static UIColor* fromProto(Color* protocolor) {
46277 # float red = [protocolor red];
46278 # float green = [protocolor green];
46279 # float blue = [protocolor blue];
46280 # FloatValue* alpha_wrapper = [protocolor alpha];
46281 # float alpha = 1.0;
46282 # if (alpha_wrapper != nil) {
46283 # alpha = [alpha_wrapper value];
46284 # }
46285 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46286 # }
46287 #
46288 # static Color* toProto(UIColor* color) {
46289 # CGFloat red, green, blue, alpha;
46290 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46291 # return nil;
46292 # }
46293 # Color* result = [Color alloc] init];
46294 # [result setRed:red];
46295 # [result setGreen:green];
46296 # [result setBlue:blue];
46297 # if (alpha <= 0.9999) {
46298 # [result setAlpha:floatWrapperWithValue(alpha)];
46299 # }
46300 # [result autorelease];
46301 # return result;
46302 # }
46303 # // ...
46304 #
46305 # Example (JavaScript):
46306 #
46307 # // ...
46308 #
46309 # var protoToCssColor = function(rgb_color) {
46310 # var redFrac = rgb_color.red || 0.0;
46311 # var greenFrac = rgb_color.green || 0.0;
46312 # var blueFrac = rgb_color.blue || 0.0;
46313 # var red = Math.floor(redFrac * 255);
46314 # var green = Math.floor(greenFrac * 255);
46315 # var blue = Math.floor(blueFrac * 255);
46316 #
46317 # if (!('alpha' in rgb_color)) {
46318 # return rgbToCssColor_(red, green, blue);
46319 # }
46320 #
46321 # var alphaFrac = rgb_color.alpha.value || 0.0;
46322 # var rgbParams = [red, green, blue].join(',');
46323 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46324 # };
46325 #
46326 # var rgbToCssColor_ = function(red, green, blue) {
46327 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46328 # var hexString = rgbNumber.toString(16);
46329 # var missingZeros = 6 - hexString.length;
46330 # var resultBuilder = ['#'];
46331 # for (var i = 0; i < missingZeros; i++) {
46332 # resultBuilder.push('0');
46333 # }
46334 # resultBuilder.push(hexString);
46335 # return resultBuilder.join('');
46336 # };
46337 #
46338 # // ...
46339 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46340 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46341 # the final pixel color is defined by the equation:
46342 #
46343 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46344 #
46345 # This means that a value of 1.0 corresponds to a solid color, whereas
46346 # a value of 0.0 corresponds to a completely transparent color. This
46347 # uses a wrapper message rather than a simple float scalar so that it is
46348 # possible to distinguish between a default value and the value being unset.
46349 # If omitted, this color object is to be rendered as a solid color
46350 # (as if the alpha value had been explicitly given with a value of 1.0).
46351 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46352 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46353 },
Thomas Coffee2f245372017-03-27 10:39:26 -070046354 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046355 "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 -070046356 # Absent values indicate that the field isn't specified.
46357 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
46358 # for simplicity of conversion to/from color representations in various
46359 # languages over compactness; for example, the fields of this representation
46360 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46361 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46362 # method in iOS; and, with just a little work, it can be easily formatted into
46363 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46364 #
46365 # Example (Java):
46366 #
46367 # import com.google.type.Color;
46368 #
46369 # // ...
46370 # public static java.awt.Color fromProto(Color protocolor) {
46371 # float alpha = protocolor.hasAlpha()
46372 # ? protocolor.getAlpha().getValue()
46373 # : 1.0;
46374 #
46375 # return new java.awt.Color(
46376 # protocolor.getRed(),
46377 # protocolor.getGreen(),
46378 # protocolor.getBlue(),
46379 # alpha);
46380 # }
46381 #
46382 # public static Color toProto(java.awt.Color color) {
46383 # float red = (float) color.getRed();
46384 # float green = (float) color.getGreen();
46385 # float blue = (float) color.getBlue();
46386 # float denominator = 255.0;
46387 # Color.Builder resultBuilder =
46388 # Color
46389 # .newBuilder()
46390 # .setRed(red / denominator)
46391 # .setGreen(green / denominator)
46392 # .setBlue(blue / denominator);
46393 # int alpha = color.getAlpha();
46394 # if (alpha != 255) {
46395 # result.setAlpha(
46396 # FloatValue
46397 # .newBuilder()
46398 # .setValue(((float) alpha) / denominator)
46399 # .build());
46400 # }
46401 # return resultBuilder.build();
46402 # }
46403 # // ...
46404 #
46405 # Example (iOS / Obj-C):
46406 #
46407 # // ...
46408 # static UIColor* fromProto(Color* protocolor) {
46409 # float red = [protocolor red];
46410 # float green = [protocolor green];
46411 # float blue = [protocolor blue];
46412 # FloatValue* alpha_wrapper = [protocolor alpha];
46413 # float alpha = 1.0;
46414 # if (alpha_wrapper != nil) {
46415 # alpha = [alpha_wrapper value];
46416 # }
46417 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46418 # }
46419 #
46420 # static Color* toProto(UIColor* color) {
46421 # CGFloat red, green, blue, alpha;
46422 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46423 # return nil;
46424 # }
46425 # Color* result = [Color alloc] init];
46426 # [result setRed:red];
46427 # [result setGreen:green];
46428 # [result setBlue:blue];
46429 # if (alpha <= 0.9999) {
46430 # [result setAlpha:floatWrapperWithValue(alpha)];
46431 # }
46432 # [result autorelease];
46433 # return result;
46434 # }
46435 # // ...
46436 #
46437 # Example (JavaScript):
46438 #
46439 # // ...
46440 #
46441 # var protoToCssColor = function(rgb_color) {
46442 # var redFrac = rgb_color.red || 0.0;
46443 # var greenFrac = rgb_color.green || 0.0;
46444 # var blueFrac = rgb_color.blue || 0.0;
46445 # var red = Math.floor(redFrac * 255);
46446 # var green = Math.floor(greenFrac * 255);
46447 # var blue = Math.floor(blueFrac * 255);
46448 #
46449 # if (!('alpha' in rgb_color)) {
46450 # return rgbToCssColor_(red, green, blue);
46451 # }
46452 #
46453 # var alphaFrac = rgb_color.alpha.value || 0.0;
46454 # var rgbParams = [red, green, blue].join(',');
46455 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46456 # };
46457 #
46458 # var rgbToCssColor_ = function(red, green, blue) {
46459 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46460 # var hexString = rgbNumber.toString(16);
46461 # var missingZeros = 6 - hexString.length;
46462 # var resultBuilder = ['#'];
46463 # for (var i = 0; i < missingZeros; i++) {
46464 # resultBuilder.push('0');
46465 # }
46466 # resultBuilder.push(hexString);
46467 # return resultBuilder.join('');
46468 # };
46469 #
46470 # // ...
46471 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46472 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46473 # the final pixel color is defined by the equation:
46474 #
46475 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46476 #
46477 # This means that a value of 1.0 corresponds to a solid color, whereas
46478 # a value of 0.0 corresponds to a completely transparent color. This
46479 # uses a wrapper message rather than a simple float scalar so that it is
46480 # possible to distinguish between a default value and the value being unset.
46481 # If omitted, this color object is to be rendered as a solid color
46482 # (as if the alpha value had been explicitly given with a value of 1.0).
46483 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46484 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46485 },
46486 "bold": True or False, # True if the text is bold.
46487 "strikethrough": True or False, # True if the text has a strikethrough.
46488 "fontFamily": "A String", # The font family.
46489 "fontSize": 42, # The size of the font.
46490 "italic": True or False, # True if the text is italicized.
46491 "underline": True or False, # True if the text is underlined.
46492 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070046493 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
46494 "angle": 42, # The angle between the standard orientation and the desired orientation.
46495 # Measured in degrees. Valid values are between -90 and 90. Positive
46496 # angles are angled upwards, negative are angled downwards.
46497 #
46498 # Note: For LTR text direction positive angles are in the counterclockwise
46499 # direction, whereas for RTL they are in the clockwise direction
46500 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
46501 # characters is unchanged.
46502 # For example:
46503 #
46504 # | V |
46505 # | e |
46506 # | r |
46507 # | t |
46508 # | i |
46509 # | c |
46510 # | a |
46511 # | l |
46512 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046513 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
46514 "borders": { # The borders of the cell. # The borders of the cell.
46515 "top": { # A border along a cell. # The top border of the cell.
46516 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46517 # for simplicity of conversion to/from color representations in various
46518 # languages over compactness; for example, the fields of this representation
46519 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46520 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46521 # method in iOS; and, with just a little work, it can be easily formatted into
46522 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46523 #
46524 # Example (Java):
46525 #
46526 # import com.google.type.Color;
46527 #
46528 # // ...
46529 # public static java.awt.Color fromProto(Color protocolor) {
46530 # float alpha = protocolor.hasAlpha()
46531 # ? protocolor.getAlpha().getValue()
46532 # : 1.0;
46533 #
46534 # return new java.awt.Color(
46535 # protocolor.getRed(),
46536 # protocolor.getGreen(),
46537 # protocolor.getBlue(),
46538 # alpha);
46539 # }
46540 #
46541 # public static Color toProto(java.awt.Color color) {
46542 # float red = (float) color.getRed();
46543 # float green = (float) color.getGreen();
46544 # float blue = (float) color.getBlue();
46545 # float denominator = 255.0;
46546 # Color.Builder resultBuilder =
46547 # Color
46548 # .newBuilder()
46549 # .setRed(red / denominator)
46550 # .setGreen(green / denominator)
46551 # .setBlue(blue / denominator);
46552 # int alpha = color.getAlpha();
46553 # if (alpha != 255) {
46554 # result.setAlpha(
46555 # FloatValue
46556 # .newBuilder()
46557 # .setValue(((float) alpha) / denominator)
46558 # .build());
46559 # }
46560 # return resultBuilder.build();
46561 # }
46562 # // ...
46563 #
46564 # Example (iOS / Obj-C):
46565 #
46566 # // ...
46567 # static UIColor* fromProto(Color* protocolor) {
46568 # float red = [protocolor red];
46569 # float green = [protocolor green];
46570 # float blue = [protocolor blue];
46571 # FloatValue* alpha_wrapper = [protocolor alpha];
46572 # float alpha = 1.0;
46573 # if (alpha_wrapper != nil) {
46574 # alpha = [alpha_wrapper value];
46575 # }
46576 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46577 # }
46578 #
46579 # static Color* toProto(UIColor* color) {
46580 # CGFloat red, green, blue, alpha;
46581 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46582 # return nil;
46583 # }
46584 # Color* result = [Color alloc] init];
46585 # [result setRed:red];
46586 # [result setGreen:green];
46587 # [result setBlue:blue];
46588 # if (alpha <= 0.9999) {
46589 # [result setAlpha:floatWrapperWithValue(alpha)];
46590 # }
46591 # [result autorelease];
46592 # return result;
46593 # }
46594 # // ...
46595 #
46596 # Example (JavaScript):
46597 #
46598 # // ...
46599 #
46600 # var protoToCssColor = function(rgb_color) {
46601 # var redFrac = rgb_color.red || 0.0;
46602 # var greenFrac = rgb_color.green || 0.0;
46603 # var blueFrac = rgb_color.blue || 0.0;
46604 # var red = Math.floor(redFrac * 255);
46605 # var green = Math.floor(greenFrac * 255);
46606 # var blue = Math.floor(blueFrac * 255);
46607 #
46608 # if (!('alpha' in rgb_color)) {
46609 # return rgbToCssColor_(red, green, blue);
46610 # }
46611 #
46612 # var alphaFrac = rgb_color.alpha.value || 0.0;
46613 # var rgbParams = [red, green, blue].join(',');
46614 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46615 # };
46616 #
46617 # var rgbToCssColor_ = function(red, green, blue) {
46618 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46619 # var hexString = rgbNumber.toString(16);
46620 # var missingZeros = 6 - hexString.length;
46621 # var resultBuilder = ['#'];
46622 # for (var i = 0; i < missingZeros; i++) {
46623 # resultBuilder.push('0');
46624 # }
46625 # resultBuilder.push(hexString);
46626 # return resultBuilder.join('');
46627 # };
46628 #
46629 # // ...
46630 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46631 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46632 # the final pixel color is defined by the equation:
46633 #
46634 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46635 #
46636 # This means that a value of 1.0 corresponds to a solid color, whereas
46637 # a value of 0.0 corresponds to a completely transparent color. This
46638 # uses a wrapper message rather than a simple float scalar so that it is
46639 # possible to distinguish between a default value and the value being unset.
46640 # If omitted, this color object is to be rendered as a solid color
46641 # (as if the alpha value had been explicitly given with a value of 1.0).
46642 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46643 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46644 },
46645 "width": 42, # The width of the border, in pixels.
46646 # Deprecated; the width is determined by the "style" field.
46647 "style": "A String", # The style of the border.
46648 },
46649 "right": { # A border along a cell. # The right border of the cell.
46650 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46651 # for simplicity of conversion to/from color representations in various
46652 # languages over compactness; for example, the fields of this representation
46653 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46654 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46655 # method in iOS; and, with just a little work, it can be easily formatted into
46656 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46657 #
46658 # Example (Java):
46659 #
46660 # import com.google.type.Color;
46661 #
46662 # // ...
46663 # public static java.awt.Color fromProto(Color protocolor) {
46664 # float alpha = protocolor.hasAlpha()
46665 # ? protocolor.getAlpha().getValue()
46666 # : 1.0;
46667 #
46668 # return new java.awt.Color(
46669 # protocolor.getRed(),
46670 # protocolor.getGreen(),
46671 # protocolor.getBlue(),
46672 # alpha);
46673 # }
46674 #
46675 # public static Color toProto(java.awt.Color color) {
46676 # float red = (float) color.getRed();
46677 # float green = (float) color.getGreen();
46678 # float blue = (float) color.getBlue();
46679 # float denominator = 255.0;
46680 # Color.Builder resultBuilder =
46681 # Color
46682 # .newBuilder()
46683 # .setRed(red / denominator)
46684 # .setGreen(green / denominator)
46685 # .setBlue(blue / denominator);
46686 # int alpha = color.getAlpha();
46687 # if (alpha != 255) {
46688 # result.setAlpha(
46689 # FloatValue
46690 # .newBuilder()
46691 # .setValue(((float) alpha) / denominator)
46692 # .build());
46693 # }
46694 # return resultBuilder.build();
46695 # }
46696 # // ...
46697 #
46698 # Example (iOS / Obj-C):
46699 #
46700 # // ...
46701 # static UIColor* fromProto(Color* protocolor) {
46702 # float red = [protocolor red];
46703 # float green = [protocolor green];
46704 # float blue = [protocolor blue];
46705 # FloatValue* alpha_wrapper = [protocolor alpha];
46706 # float alpha = 1.0;
46707 # if (alpha_wrapper != nil) {
46708 # alpha = [alpha_wrapper value];
46709 # }
46710 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46711 # }
46712 #
46713 # static Color* toProto(UIColor* color) {
46714 # CGFloat red, green, blue, alpha;
46715 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46716 # return nil;
46717 # }
46718 # Color* result = [Color alloc] init];
46719 # [result setRed:red];
46720 # [result setGreen:green];
46721 # [result setBlue:blue];
46722 # if (alpha <= 0.9999) {
46723 # [result setAlpha:floatWrapperWithValue(alpha)];
46724 # }
46725 # [result autorelease];
46726 # return result;
46727 # }
46728 # // ...
46729 #
46730 # Example (JavaScript):
46731 #
46732 # // ...
46733 #
46734 # var protoToCssColor = function(rgb_color) {
46735 # var redFrac = rgb_color.red || 0.0;
46736 # var greenFrac = rgb_color.green || 0.0;
46737 # var blueFrac = rgb_color.blue || 0.0;
46738 # var red = Math.floor(redFrac * 255);
46739 # var green = Math.floor(greenFrac * 255);
46740 # var blue = Math.floor(blueFrac * 255);
46741 #
46742 # if (!('alpha' in rgb_color)) {
46743 # return rgbToCssColor_(red, green, blue);
46744 # }
46745 #
46746 # var alphaFrac = rgb_color.alpha.value || 0.0;
46747 # var rgbParams = [red, green, blue].join(',');
46748 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46749 # };
46750 #
46751 # var rgbToCssColor_ = function(red, green, blue) {
46752 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46753 # var hexString = rgbNumber.toString(16);
46754 # var missingZeros = 6 - hexString.length;
46755 # var resultBuilder = ['#'];
46756 # for (var i = 0; i < missingZeros; i++) {
46757 # resultBuilder.push('0');
46758 # }
46759 # resultBuilder.push(hexString);
46760 # return resultBuilder.join('');
46761 # };
46762 #
46763 # // ...
46764 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46765 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46766 # the final pixel color is defined by the equation:
46767 #
46768 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46769 #
46770 # This means that a value of 1.0 corresponds to a solid color, whereas
46771 # a value of 0.0 corresponds to a completely transparent color. This
46772 # uses a wrapper message rather than a simple float scalar so that it is
46773 # possible to distinguish between a default value and the value being unset.
46774 # If omitted, this color object is to be rendered as a solid color
46775 # (as if the alpha value had been explicitly given with a value of 1.0).
46776 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46777 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46778 },
46779 "width": 42, # The width of the border, in pixels.
46780 # Deprecated; the width is determined by the "style" field.
46781 "style": "A String", # The style of the border.
46782 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046783 "left": { # A border along a cell. # The left border of the cell.
46784 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46785 # for simplicity of conversion to/from color representations in various
46786 # languages over compactness; for example, the fields of this representation
46787 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46788 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46789 # method in iOS; and, with just a little work, it can be easily formatted into
46790 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46791 #
46792 # Example (Java):
46793 #
46794 # import com.google.type.Color;
46795 #
46796 # // ...
46797 # public static java.awt.Color fromProto(Color protocolor) {
46798 # float alpha = protocolor.hasAlpha()
46799 # ? protocolor.getAlpha().getValue()
46800 # : 1.0;
46801 #
46802 # return new java.awt.Color(
46803 # protocolor.getRed(),
46804 # protocolor.getGreen(),
46805 # protocolor.getBlue(),
46806 # alpha);
46807 # }
46808 #
46809 # public static Color toProto(java.awt.Color color) {
46810 # float red = (float) color.getRed();
46811 # float green = (float) color.getGreen();
46812 # float blue = (float) color.getBlue();
46813 # float denominator = 255.0;
46814 # Color.Builder resultBuilder =
46815 # Color
46816 # .newBuilder()
46817 # .setRed(red / denominator)
46818 # .setGreen(green / denominator)
46819 # .setBlue(blue / denominator);
46820 # int alpha = color.getAlpha();
46821 # if (alpha != 255) {
46822 # result.setAlpha(
46823 # FloatValue
46824 # .newBuilder()
46825 # .setValue(((float) alpha) / denominator)
46826 # .build());
46827 # }
46828 # return resultBuilder.build();
46829 # }
46830 # // ...
46831 #
46832 # Example (iOS / Obj-C):
46833 #
46834 # // ...
46835 # static UIColor* fromProto(Color* protocolor) {
46836 # float red = [protocolor red];
46837 # float green = [protocolor green];
46838 # float blue = [protocolor blue];
46839 # FloatValue* alpha_wrapper = [protocolor alpha];
46840 # float alpha = 1.0;
46841 # if (alpha_wrapper != nil) {
46842 # alpha = [alpha_wrapper value];
46843 # }
46844 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46845 # }
46846 #
46847 # static Color* toProto(UIColor* color) {
46848 # CGFloat red, green, blue, alpha;
46849 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46850 # return nil;
46851 # }
46852 # Color* result = [Color alloc] init];
46853 # [result setRed:red];
46854 # [result setGreen:green];
46855 # [result setBlue:blue];
46856 # if (alpha <= 0.9999) {
46857 # [result setAlpha:floatWrapperWithValue(alpha)];
46858 # }
46859 # [result autorelease];
46860 # return result;
46861 # }
46862 # // ...
46863 #
46864 # Example (JavaScript):
46865 #
46866 # // ...
46867 #
46868 # var protoToCssColor = function(rgb_color) {
46869 # var redFrac = rgb_color.red || 0.0;
46870 # var greenFrac = rgb_color.green || 0.0;
46871 # var blueFrac = rgb_color.blue || 0.0;
46872 # var red = Math.floor(redFrac * 255);
46873 # var green = Math.floor(greenFrac * 255);
46874 # var blue = Math.floor(blueFrac * 255);
46875 #
46876 # if (!('alpha' in rgb_color)) {
46877 # return rgbToCssColor_(red, green, blue);
46878 # }
46879 #
46880 # var alphaFrac = rgb_color.alpha.value || 0.0;
46881 # var rgbParams = [red, green, blue].join(',');
46882 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46883 # };
46884 #
46885 # var rgbToCssColor_ = function(red, green, blue) {
46886 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46887 # var hexString = rgbNumber.toString(16);
46888 # var missingZeros = 6 - hexString.length;
46889 # var resultBuilder = ['#'];
46890 # for (var i = 0; i < missingZeros; i++) {
46891 # resultBuilder.push('0');
46892 # }
46893 # resultBuilder.push(hexString);
46894 # return resultBuilder.join('');
46895 # };
46896 #
46897 # // ...
46898 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46899 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46900 # the final pixel color is defined by the equation:
46901 #
46902 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46903 #
46904 # This means that a value of 1.0 corresponds to a solid color, whereas
46905 # a value of 0.0 corresponds to a completely transparent color. This
46906 # uses a wrapper message rather than a simple float scalar so that it is
46907 # possible to distinguish between a default value and the value being unset.
46908 # If omitted, this color object is to be rendered as a solid color
46909 # (as if the alpha value had been explicitly given with a value of 1.0).
46910 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46911 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46912 },
46913 "width": 42, # The width of the border, in pixels.
46914 # Deprecated; the width is determined by the "style" field.
46915 "style": "A String", # The style of the border.
46916 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070046917 "bottom": { # A border along a cell. # The bottom border of the cell.
46918 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46919 # for simplicity of conversion to/from color representations in various
46920 # languages over compactness; for example, the fields of this representation
46921 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46922 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46923 # method in iOS; and, with just a little work, it can be easily formatted into
46924 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46925 #
46926 # Example (Java):
46927 #
46928 # import com.google.type.Color;
46929 #
46930 # // ...
46931 # public static java.awt.Color fromProto(Color protocolor) {
46932 # float alpha = protocolor.hasAlpha()
46933 # ? protocolor.getAlpha().getValue()
46934 # : 1.0;
46935 #
46936 # return new java.awt.Color(
46937 # protocolor.getRed(),
46938 # protocolor.getGreen(),
46939 # protocolor.getBlue(),
46940 # alpha);
46941 # }
46942 #
46943 # public static Color toProto(java.awt.Color color) {
46944 # float red = (float) color.getRed();
46945 # float green = (float) color.getGreen();
46946 # float blue = (float) color.getBlue();
46947 # float denominator = 255.0;
46948 # Color.Builder resultBuilder =
46949 # Color
46950 # .newBuilder()
46951 # .setRed(red / denominator)
46952 # .setGreen(green / denominator)
46953 # .setBlue(blue / denominator);
46954 # int alpha = color.getAlpha();
46955 # if (alpha != 255) {
46956 # result.setAlpha(
46957 # FloatValue
46958 # .newBuilder()
46959 # .setValue(((float) alpha) / denominator)
46960 # .build());
46961 # }
46962 # return resultBuilder.build();
46963 # }
46964 # // ...
46965 #
46966 # Example (iOS / Obj-C):
46967 #
46968 # // ...
46969 # static UIColor* fromProto(Color* protocolor) {
46970 # float red = [protocolor red];
46971 # float green = [protocolor green];
46972 # float blue = [protocolor blue];
46973 # FloatValue* alpha_wrapper = [protocolor alpha];
46974 # float alpha = 1.0;
46975 # if (alpha_wrapper != nil) {
46976 # alpha = [alpha_wrapper value];
46977 # }
46978 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46979 # }
46980 #
46981 # static Color* toProto(UIColor* color) {
46982 # CGFloat red, green, blue, alpha;
46983 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46984 # return nil;
46985 # }
46986 # Color* result = [Color alloc] init];
46987 # [result setRed:red];
46988 # [result setGreen:green];
46989 # [result setBlue:blue];
46990 # if (alpha <= 0.9999) {
46991 # [result setAlpha:floatWrapperWithValue(alpha)];
46992 # }
46993 # [result autorelease];
46994 # return result;
46995 # }
46996 # // ...
46997 #
46998 # Example (JavaScript):
46999 #
47000 # // ...
47001 #
47002 # var protoToCssColor = function(rgb_color) {
47003 # var redFrac = rgb_color.red || 0.0;
47004 # var greenFrac = rgb_color.green || 0.0;
47005 # var blueFrac = rgb_color.blue || 0.0;
47006 # var red = Math.floor(redFrac * 255);
47007 # var green = Math.floor(greenFrac * 255);
47008 # var blue = Math.floor(blueFrac * 255);
47009 #
47010 # if (!('alpha' in rgb_color)) {
47011 # return rgbToCssColor_(red, green, blue);
47012 # }
47013 #
47014 # var alphaFrac = rgb_color.alpha.value || 0.0;
47015 # var rgbParams = [red, green, blue].join(',');
47016 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47017 # };
47018 #
47019 # var rgbToCssColor_ = function(red, green, blue) {
47020 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47021 # var hexString = rgbNumber.toString(16);
47022 # var missingZeros = 6 - hexString.length;
47023 # var resultBuilder = ['#'];
47024 # for (var i = 0; i < missingZeros; i++) {
47025 # resultBuilder.push('0');
47026 # }
47027 # resultBuilder.push(hexString);
47028 # return resultBuilder.join('');
47029 # };
47030 #
47031 # // ...
47032 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47033 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47034 # the final pixel color is defined by the equation:
47035 #
47036 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47037 #
47038 # This means that a value of 1.0 corresponds to a solid color, whereas
47039 # a value of 0.0 corresponds to a completely transparent color. This
47040 # uses a wrapper message rather than a simple float scalar so that it is
47041 # possible to distinguish between a default value and the value being unset.
47042 # If omitted, this color object is to be rendered as a solid color
47043 # (as if the alpha value had been explicitly given with a value of 1.0).
47044 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47045 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47046 },
47047 "width": 42, # The width of the border, in pixels.
47048 # Deprecated; the width is determined by the "style" field.
47049 "style": "A String", # The style of the border.
47050 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047051 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070047052 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047053 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047054 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
47055 #
47056 # When writing, the new format will be merged with the existing format.
47057 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
47058 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
47059 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047060 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047061 # information about the supported patterns.
47062 "type": "A String", # The type of the number format.
47063 # When writing, this field must be set.
47064 },
47065 "textDirection": "A String", # The direction of the text in the cell.
47066 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
47067 # When updating padding, every field must be specified.
47068 "top": 42, # The top padding of the cell.
47069 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047070 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047071 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047072 },
Thomas Coffee2f245372017-03-27 10:39:26 -070047073 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047074 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
47075 # for simplicity of conversion to/from color representations in various
47076 # languages over compactness; for example, the fields of this representation
47077 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47078 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47079 # method in iOS; and, with just a little work, it can be easily formatted into
47080 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47081 #
47082 # Example (Java):
47083 #
47084 # import com.google.type.Color;
47085 #
47086 # // ...
47087 # public static java.awt.Color fromProto(Color protocolor) {
47088 # float alpha = protocolor.hasAlpha()
47089 # ? protocolor.getAlpha().getValue()
47090 # : 1.0;
47091 #
47092 # return new java.awt.Color(
47093 # protocolor.getRed(),
47094 # protocolor.getGreen(),
47095 # protocolor.getBlue(),
47096 # alpha);
47097 # }
47098 #
47099 # public static Color toProto(java.awt.Color color) {
47100 # float red = (float) color.getRed();
47101 # float green = (float) color.getGreen();
47102 # float blue = (float) color.getBlue();
47103 # float denominator = 255.0;
47104 # Color.Builder resultBuilder =
47105 # Color
47106 # .newBuilder()
47107 # .setRed(red / denominator)
47108 # .setGreen(green / denominator)
47109 # .setBlue(blue / denominator);
47110 # int alpha = color.getAlpha();
47111 # if (alpha != 255) {
47112 # result.setAlpha(
47113 # FloatValue
47114 # .newBuilder()
47115 # .setValue(((float) alpha) / denominator)
47116 # .build());
47117 # }
47118 # return resultBuilder.build();
47119 # }
47120 # // ...
47121 #
47122 # Example (iOS / Obj-C):
47123 #
47124 # // ...
47125 # static UIColor* fromProto(Color* protocolor) {
47126 # float red = [protocolor red];
47127 # float green = [protocolor green];
47128 # float blue = [protocolor blue];
47129 # FloatValue* alpha_wrapper = [protocolor alpha];
47130 # float alpha = 1.0;
47131 # if (alpha_wrapper != nil) {
47132 # alpha = [alpha_wrapper value];
47133 # }
47134 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47135 # }
47136 #
47137 # static Color* toProto(UIColor* color) {
47138 # CGFloat red, green, blue, alpha;
47139 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47140 # return nil;
47141 # }
47142 # Color* result = [Color alloc] init];
47143 # [result setRed:red];
47144 # [result setGreen:green];
47145 # [result setBlue:blue];
47146 # if (alpha <= 0.9999) {
47147 # [result setAlpha:floatWrapperWithValue(alpha)];
47148 # }
47149 # [result autorelease];
47150 # return result;
47151 # }
47152 # // ...
47153 #
47154 # Example (JavaScript):
47155 #
47156 # // ...
47157 #
47158 # var protoToCssColor = function(rgb_color) {
47159 # var redFrac = rgb_color.red || 0.0;
47160 # var greenFrac = rgb_color.green || 0.0;
47161 # var blueFrac = rgb_color.blue || 0.0;
47162 # var red = Math.floor(redFrac * 255);
47163 # var green = Math.floor(greenFrac * 255);
47164 # var blue = Math.floor(blueFrac * 255);
47165 #
47166 # if (!('alpha' in rgb_color)) {
47167 # return rgbToCssColor_(red, green, blue);
47168 # }
47169 #
47170 # var alphaFrac = rgb_color.alpha.value || 0.0;
47171 # var rgbParams = [red, green, blue].join(',');
47172 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47173 # };
47174 #
47175 # var rgbToCssColor_ = function(red, green, blue) {
47176 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47177 # var hexString = rgbNumber.toString(16);
47178 # var missingZeros = 6 - hexString.length;
47179 # var resultBuilder = ['#'];
47180 # for (var i = 0; i < missingZeros; i++) {
47181 # resultBuilder.push('0');
47182 # }
47183 # resultBuilder.push(hexString);
47184 # return resultBuilder.join('');
47185 # };
47186 #
47187 # // ...
47188 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47189 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47190 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047191 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047192 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47193 #
47194 # This means that a value of 1.0 corresponds to a solid color, whereas
47195 # a value of 0.0 corresponds to a completely transparent color. This
47196 # uses a wrapper message rather than a simple float scalar so that it is
47197 # possible to distinguish between a default value and the value being unset.
47198 # If omitted, this color object is to be rendered as a solid color
47199 # (as if the alpha value had been explicitly given with a value of 1.0).
47200 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47201 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47202 },
Thomas Coffee2f245372017-03-27 10:39:26 -070047203 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047204 "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).
47205 # Absent values indicate that the field isn't specified.
47206 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
47207 # for simplicity of conversion to/from color representations in various
47208 # languages over compactness; for example, the fields of this representation
47209 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47210 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47211 # method in iOS; and, with just a little work, it can be easily formatted into
47212 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47213 #
47214 # Example (Java):
47215 #
47216 # import com.google.type.Color;
47217 #
47218 # // ...
47219 # public static java.awt.Color fromProto(Color protocolor) {
47220 # float alpha = protocolor.hasAlpha()
47221 # ? protocolor.getAlpha().getValue()
47222 # : 1.0;
47223 #
47224 # return new java.awt.Color(
47225 # protocolor.getRed(),
47226 # protocolor.getGreen(),
47227 # protocolor.getBlue(),
47228 # alpha);
47229 # }
47230 #
47231 # public static Color toProto(java.awt.Color color) {
47232 # float red = (float) color.getRed();
47233 # float green = (float) color.getGreen();
47234 # float blue = (float) color.getBlue();
47235 # float denominator = 255.0;
47236 # Color.Builder resultBuilder =
47237 # Color
47238 # .newBuilder()
47239 # .setRed(red / denominator)
47240 # .setGreen(green / denominator)
47241 # .setBlue(blue / denominator);
47242 # int alpha = color.getAlpha();
47243 # if (alpha != 255) {
47244 # result.setAlpha(
47245 # FloatValue
47246 # .newBuilder()
47247 # .setValue(((float) alpha) / denominator)
47248 # .build());
47249 # }
47250 # return resultBuilder.build();
47251 # }
47252 # // ...
47253 #
47254 # Example (iOS / Obj-C):
47255 #
47256 # // ...
47257 # static UIColor* fromProto(Color* protocolor) {
47258 # float red = [protocolor red];
47259 # float green = [protocolor green];
47260 # float blue = [protocolor blue];
47261 # FloatValue* alpha_wrapper = [protocolor alpha];
47262 # float alpha = 1.0;
47263 # if (alpha_wrapper != nil) {
47264 # alpha = [alpha_wrapper value];
47265 # }
47266 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47267 # }
47268 #
47269 # static Color* toProto(UIColor* color) {
47270 # CGFloat red, green, blue, alpha;
47271 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47272 # return nil;
47273 # }
47274 # Color* result = [Color alloc] init];
47275 # [result setRed:red];
47276 # [result setGreen:green];
47277 # [result setBlue:blue];
47278 # if (alpha <= 0.9999) {
47279 # [result setAlpha:floatWrapperWithValue(alpha)];
47280 # }
47281 # [result autorelease];
47282 # return result;
47283 # }
47284 # // ...
47285 #
47286 # Example (JavaScript):
47287 #
47288 # // ...
47289 #
47290 # var protoToCssColor = function(rgb_color) {
47291 # var redFrac = rgb_color.red || 0.0;
47292 # var greenFrac = rgb_color.green || 0.0;
47293 # var blueFrac = rgb_color.blue || 0.0;
47294 # var red = Math.floor(redFrac * 255);
47295 # var green = Math.floor(greenFrac * 255);
47296 # var blue = Math.floor(blueFrac * 255);
47297 #
47298 # if (!('alpha' in rgb_color)) {
47299 # return rgbToCssColor_(red, green, blue);
47300 # }
47301 #
47302 # var alphaFrac = rgb_color.alpha.value || 0.0;
47303 # var rgbParams = [red, green, blue].join(',');
47304 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47305 # };
47306 #
47307 # var rgbToCssColor_ = function(red, green, blue) {
47308 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47309 # var hexString = rgbNumber.toString(16);
47310 # var missingZeros = 6 - hexString.length;
47311 # var resultBuilder = ['#'];
47312 # for (var i = 0; i < missingZeros; i++) {
47313 # resultBuilder.push('0');
47314 # }
47315 # resultBuilder.push(hexString);
47316 # return resultBuilder.join('');
47317 # };
47318 #
47319 # // ...
47320 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47321 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47322 # the final pixel color is defined by the equation:
47323 #
47324 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47325 #
47326 # This means that a value of 1.0 corresponds to a solid color, whereas
47327 # a value of 0.0 corresponds to a completely transparent color. This
47328 # uses a wrapper message rather than a simple float scalar so that it is
47329 # possible to distinguish between a default value and the value being unset.
47330 # If omitted, this color object is to be rendered as a solid color
47331 # (as if the alpha value had been explicitly given with a value of 1.0).
47332 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47333 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47334 },
47335 "bold": True or False, # True if the text is bold.
47336 "strikethrough": True or False, # True if the text has a strikethrough.
47337 "fontFamily": "A String", # The font family.
47338 "fontSize": 42, # The size of the font.
47339 "italic": True or False, # True if the text is italicized.
47340 "underline": True or False, # True if the text is underlined.
47341 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070047342 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
47343 "angle": 42, # The angle between the standard orientation and the desired orientation.
47344 # Measured in degrees. Valid values are between -90 and 90. Positive
47345 # angles are angled upwards, negative are angled downwards.
47346 #
47347 # Note: For LTR text direction positive angles are in the counterclockwise
47348 # direction, whereas for RTL they are in the clockwise direction
47349 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
47350 # characters is unchanged.
47351 # For example:
47352 #
47353 # | V |
47354 # | e |
47355 # | r |
47356 # | t |
47357 # | i |
47358 # | c |
47359 # | a |
47360 # | l |
47361 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047362 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
47363 "borders": { # The borders of the cell. # The borders of the cell.
47364 "top": { # A border along a cell. # The top border of the cell.
47365 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47366 # for simplicity of conversion to/from color representations in various
47367 # languages over compactness; for example, the fields of this representation
47368 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47369 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47370 # method in iOS; and, with just a little work, it can be easily formatted into
47371 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47372 #
47373 # Example (Java):
47374 #
47375 # import com.google.type.Color;
47376 #
47377 # // ...
47378 # public static java.awt.Color fromProto(Color protocolor) {
47379 # float alpha = protocolor.hasAlpha()
47380 # ? protocolor.getAlpha().getValue()
47381 # : 1.0;
47382 #
47383 # return new java.awt.Color(
47384 # protocolor.getRed(),
47385 # protocolor.getGreen(),
47386 # protocolor.getBlue(),
47387 # alpha);
47388 # }
47389 #
47390 # public static Color toProto(java.awt.Color color) {
47391 # float red = (float) color.getRed();
47392 # float green = (float) color.getGreen();
47393 # float blue = (float) color.getBlue();
47394 # float denominator = 255.0;
47395 # Color.Builder resultBuilder =
47396 # Color
47397 # .newBuilder()
47398 # .setRed(red / denominator)
47399 # .setGreen(green / denominator)
47400 # .setBlue(blue / denominator);
47401 # int alpha = color.getAlpha();
47402 # if (alpha != 255) {
47403 # result.setAlpha(
47404 # FloatValue
47405 # .newBuilder()
47406 # .setValue(((float) alpha) / denominator)
47407 # .build());
47408 # }
47409 # return resultBuilder.build();
47410 # }
47411 # // ...
47412 #
47413 # Example (iOS / Obj-C):
47414 #
47415 # // ...
47416 # static UIColor* fromProto(Color* protocolor) {
47417 # float red = [protocolor red];
47418 # float green = [protocolor green];
47419 # float blue = [protocolor blue];
47420 # FloatValue* alpha_wrapper = [protocolor alpha];
47421 # float alpha = 1.0;
47422 # if (alpha_wrapper != nil) {
47423 # alpha = [alpha_wrapper value];
47424 # }
47425 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47426 # }
47427 #
47428 # static Color* toProto(UIColor* color) {
47429 # CGFloat red, green, blue, alpha;
47430 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47431 # return nil;
47432 # }
47433 # Color* result = [Color alloc] init];
47434 # [result setRed:red];
47435 # [result setGreen:green];
47436 # [result setBlue:blue];
47437 # if (alpha <= 0.9999) {
47438 # [result setAlpha:floatWrapperWithValue(alpha)];
47439 # }
47440 # [result autorelease];
47441 # return result;
47442 # }
47443 # // ...
47444 #
47445 # Example (JavaScript):
47446 #
47447 # // ...
47448 #
47449 # var protoToCssColor = function(rgb_color) {
47450 # var redFrac = rgb_color.red || 0.0;
47451 # var greenFrac = rgb_color.green || 0.0;
47452 # var blueFrac = rgb_color.blue || 0.0;
47453 # var red = Math.floor(redFrac * 255);
47454 # var green = Math.floor(greenFrac * 255);
47455 # var blue = Math.floor(blueFrac * 255);
47456 #
47457 # if (!('alpha' in rgb_color)) {
47458 # return rgbToCssColor_(red, green, blue);
47459 # }
47460 #
47461 # var alphaFrac = rgb_color.alpha.value || 0.0;
47462 # var rgbParams = [red, green, blue].join(',');
47463 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47464 # };
47465 #
47466 # var rgbToCssColor_ = function(red, green, blue) {
47467 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47468 # var hexString = rgbNumber.toString(16);
47469 # var missingZeros = 6 - hexString.length;
47470 # var resultBuilder = ['#'];
47471 # for (var i = 0; i < missingZeros; i++) {
47472 # resultBuilder.push('0');
47473 # }
47474 # resultBuilder.push(hexString);
47475 # return resultBuilder.join('');
47476 # };
47477 #
47478 # // ...
47479 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47480 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47481 # the final pixel color is defined by the equation:
47482 #
47483 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47484 #
47485 # This means that a value of 1.0 corresponds to a solid color, whereas
47486 # a value of 0.0 corresponds to a completely transparent color. This
47487 # uses a wrapper message rather than a simple float scalar so that it is
47488 # possible to distinguish between a default value and the value being unset.
47489 # If omitted, this color object is to be rendered as a solid color
47490 # (as if the alpha value had been explicitly given with a value of 1.0).
47491 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47492 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47493 },
47494 "width": 42, # The width of the border, in pixels.
47495 # Deprecated; the width is determined by the "style" field.
47496 "style": "A String", # The style of the border.
47497 },
47498 "right": { # A border along a cell. # The right border of the cell.
47499 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47500 # for simplicity of conversion to/from color representations in various
47501 # languages over compactness; for example, the fields of this representation
47502 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47503 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47504 # method in iOS; and, with just a little work, it can be easily formatted into
47505 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47506 #
47507 # Example (Java):
47508 #
47509 # import com.google.type.Color;
47510 #
47511 # // ...
47512 # public static java.awt.Color fromProto(Color protocolor) {
47513 # float alpha = protocolor.hasAlpha()
47514 # ? protocolor.getAlpha().getValue()
47515 # : 1.0;
47516 #
47517 # return new java.awt.Color(
47518 # protocolor.getRed(),
47519 # protocolor.getGreen(),
47520 # protocolor.getBlue(),
47521 # alpha);
47522 # }
47523 #
47524 # public static Color toProto(java.awt.Color color) {
47525 # float red = (float) color.getRed();
47526 # float green = (float) color.getGreen();
47527 # float blue = (float) color.getBlue();
47528 # float denominator = 255.0;
47529 # Color.Builder resultBuilder =
47530 # Color
47531 # .newBuilder()
47532 # .setRed(red / denominator)
47533 # .setGreen(green / denominator)
47534 # .setBlue(blue / denominator);
47535 # int alpha = color.getAlpha();
47536 # if (alpha != 255) {
47537 # result.setAlpha(
47538 # FloatValue
47539 # .newBuilder()
47540 # .setValue(((float) alpha) / denominator)
47541 # .build());
47542 # }
47543 # return resultBuilder.build();
47544 # }
47545 # // ...
47546 #
47547 # Example (iOS / Obj-C):
47548 #
47549 # // ...
47550 # static UIColor* fromProto(Color* protocolor) {
47551 # float red = [protocolor red];
47552 # float green = [protocolor green];
47553 # float blue = [protocolor blue];
47554 # FloatValue* alpha_wrapper = [protocolor alpha];
47555 # float alpha = 1.0;
47556 # if (alpha_wrapper != nil) {
47557 # alpha = [alpha_wrapper value];
47558 # }
47559 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47560 # }
47561 #
47562 # static Color* toProto(UIColor* color) {
47563 # CGFloat red, green, blue, alpha;
47564 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47565 # return nil;
47566 # }
47567 # Color* result = [Color alloc] init];
47568 # [result setRed:red];
47569 # [result setGreen:green];
47570 # [result setBlue:blue];
47571 # if (alpha <= 0.9999) {
47572 # [result setAlpha:floatWrapperWithValue(alpha)];
47573 # }
47574 # [result autorelease];
47575 # return result;
47576 # }
47577 # // ...
47578 #
47579 # Example (JavaScript):
47580 #
47581 # // ...
47582 #
47583 # var protoToCssColor = function(rgb_color) {
47584 # var redFrac = rgb_color.red || 0.0;
47585 # var greenFrac = rgb_color.green || 0.0;
47586 # var blueFrac = rgb_color.blue || 0.0;
47587 # var red = Math.floor(redFrac * 255);
47588 # var green = Math.floor(greenFrac * 255);
47589 # var blue = Math.floor(blueFrac * 255);
47590 #
47591 # if (!('alpha' in rgb_color)) {
47592 # return rgbToCssColor_(red, green, blue);
47593 # }
47594 #
47595 # var alphaFrac = rgb_color.alpha.value || 0.0;
47596 # var rgbParams = [red, green, blue].join(',');
47597 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47598 # };
47599 #
47600 # var rgbToCssColor_ = function(red, green, blue) {
47601 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47602 # var hexString = rgbNumber.toString(16);
47603 # var missingZeros = 6 - hexString.length;
47604 # var resultBuilder = ['#'];
47605 # for (var i = 0; i < missingZeros; i++) {
47606 # resultBuilder.push('0');
47607 # }
47608 # resultBuilder.push(hexString);
47609 # return resultBuilder.join('');
47610 # };
47611 #
47612 # // ...
47613 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47614 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47615 # the final pixel color is defined by the equation:
47616 #
47617 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47618 #
47619 # This means that a value of 1.0 corresponds to a solid color, whereas
47620 # a value of 0.0 corresponds to a completely transparent color. This
47621 # uses a wrapper message rather than a simple float scalar so that it is
47622 # possible to distinguish between a default value and the value being unset.
47623 # If omitted, this color object is to be rendered as a solid color
47624 # (as if the alpha value had been explicitly given with a value of 1.0).
47625 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47626 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47627 },
47628 "width": 42, # The width of the border, in pixels.
47629 # Deprecated; the width is determined by the "style" field.
47630 "style": "A String", # The style of the border.
47631 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047632 "left": { # A border along a cell. # The left border of the cell.
47633 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47634 # for simplicity of conversion to/from color representations in various
47635 # languages over compactness; for example, the fields of this representation
47636 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47637 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47638 # method in iOS; and, with just a little work, it can be easily formatted into
47639 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47640 #
47641 # Example (Java):
47642 #
47643 # import com.google.type.Color;
47644 #
47645 # // ...
47646 # public static java.awt.Color fromProto(Color protocolor) {
47647 # float alpha = protocolor.hasAlpha()
47648 # ? protocolor.getAlpha().getValue()
47649 # : 1.0;
47650 #
47651 # return new java.awt.Color(
47652 # protocolor.getRed(),
47653 # protocolor.getGreen(),
47654 # protocolor.getBlue(),
47655 # alpha);
47656 # }
47657 #
47658 # public static Color toProto(java.awt.Color color) {
47659 # float red = (float) color.getRed();
47660 # float green = (float) color.getGreen();
47661 # float blue = (float) color.getBlue();
47662 # float denominator = 255.0;
47663 # Color.Builder resultBuilder =
47664 # Color
47665 # .newBuilder()
47666 # .setRed(red / denominator)
47667 # .setGreen(green / denominator)
47668 # .setBlue(blue / denominator);
47669 # int alpha = color.getAlpha();
47670 # if (alpha != 255) {
47671 # result.setAlpha(
47672 # FloatValue
47673 # .newBuilder()
47674 # .setValue(((float) alpha) / denominator)
47675 # .build());
47676 # }
47677 # return resultBuilder.build();
47678 # }
47679 # // ...
47680 #
47681 # Example (iOS / Obj-C):
47682 #
47683 # // ...
47684 # static UIColor* fromProto(Color* protocolor) {
47685 # float red = [protocolor red];
47686 # float green = [protocolor green];
47687 # float blue = [protocolor blue];
47688 # FloatValue* alpha_wrapper = [protocolor alpha];
47689 # float alpha = 1.0;
47690 # if (alpha_wrapper != nil) {
47691 # alpha = [alpha_wrapper value];
47692 # }
47693 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47694 # }
47695 #
47696 # static Color* toProto(UIColor* color) {
47697 # CGFloat red, green, blue, alpha;
47698 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47699 # return nil;
47700 # }
47701 # Color* result = [Color alloc] init];
47702 # [result setRed:red];
47703 # [result setGreen:green];
47704 # [result setBlue:blue];
47705 # if (alpha <= 0.9999) {
47706 # [result setAlpha:floatWrapperWithValue(alpha)];
47707 # }
47708 # [result autorelease];
47709 # return result;
47710 # }
47711 # // ...
47712 #
47713 # Example (JavaScript):
47714 #
47715 # // ...
47716 #
47717 # var protoToCssColor = function(rgb_color) {
47718 # var redFrac = rgb_color.red || 0.0;
47719 # var greenFrac = rgb_color.green || 0.0;
47720 # var blueFrac = rgb_color.blue || 0.0;
47721 # var red = Math.floor(redFrac * 255);
47722 # var green = Math.floor(greenFrac * 255);
47723 # var blue = Math.floor(blueFrac * 255);
47724 #
47725 # if (!('alpha' in rgb_color)) {
47726 # return rgbToCssColor_(red, green, blue);
47727 # }
47728 #
47729 # var alphaFrac = rgb_color.alpha.value || 0.0;
47730 # var rgbParams = [red, green, blue].join(',');
47731 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47732 # };
47733 #
47734 # var rgbToCssColor_ = function(red, green, blue) {
47735 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47736 # var hexString = rgbNumber.toString(16);
47737 # var missingZeros = 6 - hexString.length;
47738 # var resultBuilder = ['#'];
47739 # for (var i = 0; i < missingZeros; i++) {
47740 # resultBuilder.push('0');
47741 # }
47742 # resultBuilder.push(hexString);
47743 # return resultBuilder.join('');
47744 # };
47745 #
47746 # // ...
47747 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47748 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47749 # the final pixel color is defined by the equation:
47750 #
47751 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47752 #
47753 # This means that a value of 1.0 corresponds to a solid color, whereas
47754 # a value of 0.0 corresponds to a completely transparent color. This
47755 # uses a wrapper message rather than a simple float scalar so that it is
47756 # possible to distinguish between a default value and the value being unset.
47757 # If omitted, this color object is to be rendered as a solid color
47758 # (as if the alpha value had been explicitly given with a value of 1.0).
47759 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47760 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47761 },
47762 "width": 42, # The width of the border, in pixels.
47763 # Deprecated; the width is determined by the "style" field.
47764 "style": "A String", # The style of the border.
47765 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070047766 "bottom": { # A border along a cell. # The bottom border of the cell.
47767 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47768 # for simplicity of conversion to/from color representations in various
47769 # languages over compactness; for example, the fields of this representation
47770 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47771 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47772 # method in iOS; and, with just a little work, it can be easily formatted into
47773 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47774 #
47775 # Example (Java):
47776 #
47777 # import com.google.type.Color;
47778 #
47779 # // ...
47780 # public static java.awt.Color fromProto(Color protocolor) {
47781 # float alpha = protocolor.hasAlpha()
47782 # ? protocolor.getAlpha().getValue()
47783 # : 1.0;
47784 #
47785 # return new java.awt.Color(
47786 # protocolor.getRed(),
47787 # protocolor.getGreen(),
47788 # protocolor.getBlue(),
47789 # alpha);
47790 # }
47791 #
47792 # public static Color toProto(java.awt.Color color) {
47793 # float red = (float) color.getRed();
47794 # float green = (float) color.getGreen();
47795 # float blue = (float) color.getBlue();
47796 # float denominator = 255.0;
47797 # Color.Builder resultBuilder =
47798 # Color
47799 # .newBuilder()
47800 # .setRed(red / denominator)
47801 # .setGreen(green / denominator)
47802 # .setBlue(blue / denominator);
47803 # int alpha = color.getAlpha();
47804 # if (alpha != 255) {
47805 # result.setAlpha(
47806 # FloatValue
47807 # .newBuilder()
47808 # .setValue(((float) alpha) / denominator)
47809 # .build());
47810 # }
47811 # return resultBuilder.build();
47812 # }
47813 # // ...
47814 #
47815 # Example (iOS / Obj-C):
47816 #
47817 # // ...
47818 # static UIColor* fromProto(Color* protocolor) {
47819 # float red = [protocolor red];
47820 # float green = [protocolor green];
47821 # float blue = [protocolor blue];
47822 # FloatValue* alpha_wrapper = [protocolor alpha];
47823 # float alpha = 1.0;
47824 # if (alpha_wrapper != nil) {
47825 # alpha = [alpha_wrapper value];
47826 # }
47827 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47828 # }
47829 #
47830 # static Color* toProto(UIColor* color) {
47831 # CGFloat red, green, blue, alpha;
47832 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47833 # return nil;
47834 # }
47835 # Color* result = [Color alloc] init];
47836 # [result setRed:red];
47837 # [result setGreen:green];
47838 # [result setBlue:blue];
47839 # if (alpha <= 0.9999) {
47840 # [result setAlpha:floatWrapperWithValue(alpha)];
47841 # }
47842 # [result autorelease];
47843 # return result;
47844 # }
47845 # // ...
47846 #
47847 # Example (JavaScript):
47848 #
47849 # // ...
47850 #
47851 # var protoToCssColor = function(rgb_color) {
47852 # var redFrac = rgb_color.red || 0.0;
47853 # var greenFrac = rgb_color.green || 0.0;
47854 # var blueFrac = rgb_color.blue || 0.0;
47855 # var red = Math.floor(redFrac * 255);
47856 # var green = Math.floor(greenFrac * 255);
47857 # var blue = Math.floor(blueFrac * 255);
47858 #
47859 # if (!('alpha' in rgb_color)) {
47860 # return rgbToCssColor_(red, green, blue);
47861 # }
47862 #
47863 # var alphaFrac = rgb_color.alpha.value || 0.0;
47864 # var rgbParams = [red, green, blue].join(',');
47865 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47866 # };
47867 #
47868 # var rgbToCssColor_ = function(red, green, blue) {
47869 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47870 # var hexString = rgbNumber.toString(16);
47871 # var missingZeros = 6 - hexString.length;
47872 # var resultBuilder = ['#'];
47873 # for (var i = 0; i < missingZeros; i++) {
47874 # resultBuilder.push('0');
47875 # }
47876 # resultBuilder.push(hexString);
47877 # return resultBuilder.join('');
47878 # };
47879 #
47880 # // ...
47881 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47882 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47883 # the final pixel color is defined by the equation:
47884 #
47885 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47886 #
47887 # This means that a value of 1.0 corresponds to a solid color, whereas
47888 # a value of 0.0 corresponds to a completely transparent color. This
47889 # uses a wrapper message rather than a simple float scalar so that it is
47890 # possible to distinguish between a default value and the value being unset.
47891 # If omitted, this color object is to be rendered as a solid color
47892 # (as if the alpha value had been explicitly given with a value of 1.0).
47893 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47894 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47895 },
47896 "width": 42, # The width of the border, in pixels.
47897 # Deprecated; the width is determined by the "style" field.
47898 "style": "A String", # The style of the border.
47899 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047900 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070047901 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047902 },
47903 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
47904 #
47905 # When writing, the new data validation rule will overwrite any prior rule.
47906 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
47907 # If true, "List" conditions will show a dropdown.
47908 "strict": True or False, # True if invalid data should be rejected.
47909 "inputMessage": "A String", # A message to show the user when adding data to the cell.
47910 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
47911 # BooleanConditions are used by conditional formatting,
47912 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047913 "values": [ # The values of the condition. The number of supported values depends
47914 # on the condition type. Some support zero values,
47915 # others one or two values,
47916 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
47917 { # The value of the condition.
47918 "relativeDate": "A String", # A relative date (based on the current date).
47919 # Valid only if the type is
47920 # DATE_BEFORE,
47921 # DATE_AFTER,
47922 # DATE_ON_OR_BEFORE or
47923 # DATE_ON_OR_AFTER.
47924 #
47925 # Relative dates are not supported in data validation.
47926 # They are supported only in conditional formatting and
47927 # conditional filters.
47928 "userEnteredValue": "A String", # A value the condition is based on.
47929 # The value will be parsed as if the user typed into a cell.
47930 # Formulas are supported (and must begin with an `=`).
47931 },
47932 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047933 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047934 },
47935 },
47936 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
47937 # on user entered strings, not formulas, bools, or numbers.
47938 # Runs start at specific indexes in the text and continue until the next
47939 # run. Properties of a run will continue unless explicitly changed
47940 # in a subsequent run (and properties of the first run will continue
47941 # the properties of the cell unless explicitly changed).
47942 #
47943 # When writing, the new runs will overwrite any prior runs. When writing a
47944 # new user_entered_value, previous runs will be erased.
47945 { # A run of a text format. The format of this run continues until the start
47946 # index of the next run.
47947 # When updating, all fields must be set.
47948 "startIndex": 42, # The character index where this run starts.
47949 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
47950 # Absent values indicate that the field isn't specified.
47951 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
47952 # for simplicity of conversion to/from color representations in various
47953 # languages over compactness; for example, the fields of this representation
47954 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47955 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47956 # method in iOS; and, with just a little work, it can be easily formatted into
47957 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47958 #
47959 # Example (Java):
47960 #
47961 # import com.google.type.Color;
47962 #
47963 # // ...
47964 # public static java.awt.Color fromProto(Color protocolor) {
47965 # float alpha = protocolor.hasAlpha()
47966 # ? protocolor.getAlpha().getValue()
47967 # : 1.0;
47968 #
47969 # return new java.awt.Color(
47970 # protocolor.getRed(),
47971 # protocolor.getGreen(),
47972 # protocolor.getBlue(),
47973 # alpha);
47974 # }
47975 #
47976 # public static Color toProto(java.awt.Color color) {
47977 # float red = (float) color.getRed();
47978 # float green = (float) color.getGreen();
47979 # float blue = (float) color.getBlue();
47980 # float denominator = 255.0;
47981 # Color.Builder resultBuilder =
47982 # Color
47983 # .newBuilder()
47984 # .setRed(red / denominator)
47985 # .setGreen(green / denominator)
47986 # .setBlue(blue / denominator);
47987 # int alpha = color.getAlpha();
47988 # if (alpha != 255) {
47989 # result.setAlpha(
47990 # FloatValue
47991 # .newBuilder()
47992 # .setValue(((float) alpha) / denominator)
47993 # .build());
47994 # }
47995 # return resultBuilder.build();
47996 # }
47997 # // ...
47998 #
47999 # Example (iOS / Obj-C):
48000 #
48001 # // ...
48002 # static UIColor* fromProto(Color* protocolor) {
48003 # float red = [protocolor red];
48004 # float green = [protocolor green];
48005 # float blue = [protocolor blue];
48006 # FloatValue* alpha_wrapper = [protocolor alpha];
48007 # float alpha = 1.0;
48008 # if (alpha_wrapper != nil) {
48009 # alpha = [alpha_wrapper value];
48010 # }
48011 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
48012 # }
48013 #
48014 # static Color* toProto(UIColor* color) {
48015 # CGFloat red, green, blue, alpha;
48016 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
48017 # return nil;
48018 # }
48019 # Color* result = [Color alloc] init];
48020 # [result setRed:red];
48021 # [result setGreen:green];
48022 # [result setBlue:blue];
48023 # if (alpha <= 0.9999) {
48024 # [result setAlpha:floatWrapperWithValue(alpha)];
48025 # }
48026 # [result autorelease];
48027 # return result;
48028 # }
48029 # // ...
48030 #
48031 # Example (JavaScript):
48032 #
48033 # // ...
48034 #
48035 # var protoToCssColor = function(rgb_color) {
48036 # var redFrac = rgb_color.red || 0.0;
48037 # var greenFrac = rgb_color.green || 0.0;
48038 # var blueFrac = rgb_color.blue || 0.0;
48039 # var red = Math.floor(redFrac * 255);
48040 # var green = Math.floor(greenFrac * 255);
48041 # var blue = Math.floor(blueFrac * 255);
48042 #
48043 # if (!('alpha' in rgb_color)) {
48044 # return rgbToCssColor_(red, green, blue);
48045 # }
48046 #
48047 # var alphaFrac = rgb_color.alpha.value || 0.0;
48048 # var rgbParams = [red, green, blue].join(',');
48049 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
48050 # };
48051 #
48052 # var rgbToCssColor_ = function(red, green, blue) {
48053 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
48054 # var hexString = rgbNumber.toString(16);
48055 # var missingZeros = 6 - hexString.length;
48056 # var resultBuilder = ['#'];
48057 # for (var i = 0; i < missingZeros; i++) {
48058 # resultBuilder.push('0');
48059 # }
48060 # resultBuilder.push(hexString);
48061 # return resultBuilder.join('');
48062 # };
48063 #
48064 # // ...
48065 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
48066 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
48067 # the final pixel color is defined by the equation:
48068 #
48069 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
48070 #
48071 # This means that a value of 1.0 corresponds to a solid color, whereas
48072 # a value of 0.0 corresponds to a completely transparent color. This
48073 # uses a wrapper message rather than a simple float scalar so that it is
48074 # possible to distinguish between a default value and the value being unset.
48075 # If omitted, this color object is to be rendered as a solid color
48076 # (as if the alpha value had been explicitly given with a value of 1.0).
48077 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
48078 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
48079 },
48080 "bold": True or False, # True if the text is bold.
48081 "strikethrough": True or False, # True if the text has a strikethrough.
48082 "fontFamily": "A String", # The font family.
48083 "fontSize": 42, # The size of the font.
48084 "italic": True or False, # True if the text is italicized.
48085 "underline": True or False, # True if the text is underlined.
48086 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048087 },
48088 ],
48089 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048090 ],
48091 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048092 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048093 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048094 ],
48095 "properties": { # Properties of a sheet. # The properties of the sheet.
48096 "sheetType": "A String", # The type of sheet. Defaults to GRID.
48097 # This field cannot be changed once set.
48098 "index": 42, # The index of the sheet within the spreadsheet.
48099 # When adding or updating sheet properties, if this field
48100 # is excluded then the sheet will be added or moved to the end
48101 # of the sheet list. When updating sheet indices or inserting
48102 # sheets, movement is considered in "before the move" indexes.
48103 # For example, if there were 3 sheets (S1, S2, S3) in order to
48104 # move S1 ahead of S2 the index would have to be set to 2. A sheet
48105 # index update request will be ignored if the requested index is
48106 # identical to the sheets current index or if the requested new
48107 # index is equal to the current sheet index + 1.
48108 "title": "A String", # The name of the sheet.
48109 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
48110 # (If the sheet is an object sheet, containing a chart or image, then
48111 # this field will be absent.)
48112 # When writing it is an error to set any grid properties on non-grid sheets.
48113 "columnCount": 42, # The number of columns in the grid.
Thomas Coffee2f245372017-03-27 10:39:26 -070048114 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048115 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
48116 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
Thomas Coffee2f245372017-03-27 10:39:26 -070048117 "rowCount": 42, # The number of rows in the grid.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048118 },
48119 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
48120 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
48121 # for simplicity of conversion to/from color representations in various
48122 # languages over compactness; for example, the fields of this representation
48123 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
48124 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
48125 # method in iOS; and, with just a little work, it can be easily formatted into
48126 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
48127 #
48128 # Example (Java):
48129 #
48130 # import com.google.type.Color;
48131 #
48132 # // ...
48133 # public static java.awt.Color fromProto(Color protocolor) {
48134 # float alpha = protocolor.hasAlpha()
48135 # ? protocolor.getAlpha().getValue()
48136 # : 1.0;
48137 #
48138 # return new java.awt.Color(
48139 # protocolor.getRed(),
48140 # protocolor.getGreen(),
48141 # protocolor.getBlue(),
48142 # alpha);
48143 # }
48144 #
48145 # public static Color toProto(java.awt.Color color) {
48146 # float red = (float) color.getRed();
48147 # float green = (float) color.getGreen();
48148 # float blue = (float) color.getBlue();
48149 # float denominator = 255.0;
48150 # Color.Builder resultBuilder =
48151 # Color
48152 # .newBuilder()
48153 # .setRed(red / denominator)
48154 # .setGreen(green / denominator)
48155 # .setBlue(blue / denominator);
48156 # int alpha = color.getAlpha();
48157 # if (alpha != 255) {
48158 # result.setAlpha(
48159 # FloatValue
48160 # .newBuilder()
48161 # .setValue(((float) alpha) / denominator)
48162 # .build());
48163 # }
48164 # return resultBuilder.build();
48165 # }
48166 # // ...
48167 #
48168 # Example (iOS / Obj-C):
48169 #
48170 # // ...
48171 # static UIColor* fromProto(Color* protocolor) {
48172 # float red = [protocolor red];
48173 # float green = [protocolor green];
48174 # float blue = [protocolor blue];
48175 # FloatValue* alpha_wrapper = [protocolor alpha];
48176 # float alpha = 1.0;
48177 # if (alpha_wrapper != nil) {
48178 # alpha = [alpha_wrapper value];
48179 # }
48180 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
48181 # }
48182 #
48183 # static Color* toProto(UIColor* color) {
48184 # CGFloat red, green, blue, alpha;
48185 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
48186 # return nil;
48187 # }
48188 # Color* result = [Color alloc] init];
48189 # [result setRed:red];
48190 # [result setGreen:green];
48191 # [result setBlue:blue];
48192 # if (alpha <= 0.9999) {
48193 # [result setAlpha:floatWrapperWithValue(alpha)];
48194 # }
48195 # [result autorelease];
48196 # return result;
48197 # }
48198 # // ...
48199 #
48200 # Example (JavaScript):
48201 #
48202 # // ...
48203 #
48204 # var protoToCssColor = function(rgb_color) {
48205 # var redFrac = rgb_color.red || 0.0;
48206 # var greenFrac = rgb_color.green || 0.0;
48207 # var blueFrac = rgb_color.blue || 0.0;
48208 # var red = Math.floor(redFrac * 255);
48209 # var green = Math.floor(greenFrac * 255);
48210 # var blue = Math.floor(blueFrac * 255);
48211 #
48212 # if (!('alpha' in rgb_color)) {
48213 # return rgbToCssColor_(red, green, blue);
48214 # }
48215 #
48216 # var alphaFrac = rgb_color.alpha.value || 0.0;
48217 # var rgbParams = [red, green, blue].join(',');
48218 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
48219 # };
48220 #
48221 # var rgbToCssColor_ = function(red, green, blue) {
48222 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
48223 # var hexString = rgbNumber.toString(16);
48224 # var missingZeros = 6 - hexString.length;
48225 # var resultBuilder = ['#'];
48226 # for (var i = 0; i < missingZeros; i++) {
48227 # resultBuilder.push('0');
48228 # }
48229 # resultBuilder.push(hexString);
48230 # return resultBuilder.join('');
48231 # };
48232 #
48233 # // ...
48234 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
48235 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
48236 # the final pixel color is defined by the equation:
48237 #
48238 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
48239 #
48240 # This means that a value of 1.0 corresponds to a solid color, whereas
48241 # a value of 0.0 corresponds to a completely transparent color. This
48242 # uses a wrapper message rather than a simple float scalar so that it is
48243 # possible to distinguish between a default value and the value being unset.
48244 # If omitted, this color object is to be rendered as a solid color
48245 # (as if the alpha value had been explicitly given with a value of 1.0).
48246 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
48247 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
48248 },
48249 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
48250 "sheetId": 42, # The ID of the sheet. Must be non-negative.
48251 # This field cannot be changed once set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048252 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048253 },
48254 ],
48255 "spreadsheetUrl": "A String", # The url of the spreadsheet.
48256 # This field is read-only.
48257 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048258</div>
48259
48260</body></html>