blob: 5d1b646b0d8cb4a2a1d3d5d861fd05db4fabff65 [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400168 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700196 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700197 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
198 # from the anchor cell.
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.
215 "index": 42, # The zero-based index of the rule that should be replaced or moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700216 "rule": { # A rule describing a conditional format. # The rule that should replace the rule at the given index.
217 "ranges": [ # The ranges that will be formatted if the condition is true.
218 # All the ranges must be on the same grid.
219 { # A range on a sheet.
220 # All indexes are zero-based.
221 # Indexes are half open, e.g the start index is inclusive
222 # and the end index is exclusive -- [start_index, end_index).
223 # Missing indexes indicate the range is unbounded on that side.
224 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700225 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700226 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700227 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700228 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700229 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700230 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700231 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700232 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700233 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700234 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700235 # `Sheet1!A:B == sheet_id: 0,
236 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700237 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700238 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700239 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700240 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700241 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700242 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700243 #
244 # The start index must always be less than or equal to the end index.
245 # If the start index equals the end index, then the range is empty.
246 # Empty ranges are typically not meaningful and are usually rendered in the
247 # UI as `#REF!`.
248 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700250 "sheetId": 42, # The sheet this range is on.
251 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400252 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700253 },
254 ],
255 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
256 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
257 # the format will be applied.
258 # BooleanConditions are used by conditional formatting,
259 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700260 "values": [ # The values of the condition. The number of supported values depends
261 # on the condition type. Some support zero values,
262 # others one or two values,
263 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
264 { # The value of the condition.
265 "relativeDate": "A String", # A relative date (based on the current date).
266 # Valid only if the type is
267 # DATE_BEFORE,
268 # DATE_AFTER,
269 # DATE_ON_OR_BEFORE or
270 # DATE_ON_OR_AFTER.
271 #
272 # Relative dates are not supported in data validation.
273 # They are supported only in conditional formatting and
274 # conditional filters.
275 "userEnteredValue": "A String", # A value the condition is based on.
276 # The value will be parsed as if the user typed into a cell.
277 # Formulas are supported (and must begin with an `=`).
278 },
279 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700281 },
282 "format": { # The format of a cell. # The format to apply.
283 # Conditional formatting can only apply a subset of formatting:
284 # bold, italic,
285 # strikethrough,
286 # foreground color &
287 # background color.
288 "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 -0700289 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
290 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400291 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700292 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700293 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700294 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700295 },
296 "textDirection": "A String", # The direction of the text in the cell.
297 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
298 # When updating padding, every field must be specified.
299 "top": 42, # The top padding of the cell.
300 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700301 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400302 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700303 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700304 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700305 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
306 # for simplicity of conversion to/from color representations in various
307 # languages over compactness; for example, the fields of this representation
308 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
309 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
310 # method in iOS; and, with just a little work, it can be easily formatted into
311 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
312 #
313 # Example (Java):
314 #
315 # import com.google.type.Color;
316 #
317 # // ...
318 # public static java.awt.Color fromProto(Color protocolor) {
319 # float alpha = protocolor.hasAlpha()
320 # ? protocolor.getAlpha().getValue()
321 # : 1.0;
322 #
323 # return new java.awt.Color(
324 # protocolor.getRed(),
325 # protocolor.getGreen(),
326 # protocolor.getBlue(),
327 # alpha);
328 # }
329 #
330 # public static Color toProto(java.awt.Color color) {
331 # float red = (float) color.getRed();
332 # float green = (float) color.getGreen();
333 # float blue = (float) color.getBlue();
334 # float denominator = 255.0;
335 # Color.Builder resultBuilder =
336 # Color
337 # .newBuilder()
338 # .setRed(red / denominator)
339 # .setGreen(green / denominator)
340 # .setBlue(blue / denominator);
341 # int alpha = color.getAlpha();
342 # if (alpha != 255) {
343 # result.setAlpha(
344 # FloatValue
345 # .newBuilder()
346 # .setValue(((float) alpha) / denominator)
347 # .build());
348 # }
349 # return resultBuilder.build();
350 # }
351 # // ...
352 #
353 # Example (iOS / Obj-C):
354 #
355 # // ...
356 # static UIColor* fromProto(Color* protocolor) {
357 # float red = [protocolor red];
358 # float green = [protocolor green];
359 # float blue = [protocolor blue];
360 # FloatValue* alpha_wrapper = [protocolor alpha];
361 # float alpha = 1.0;
362 # if (alpha_wrapper != nil) {
363 # alpha = [alpha_wrapper value];
364 # }
365 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
366 # }
367 #
368 # static Color* toProto(UIColor* color) {
369 # CGFloat red, green, blue, alpha;
370 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
371 # return nil;
372 # }
373 # Color* result = [Color alloc] init];
374 # [result setRed:red];
375 # [result setGreen:green];
376 # [result setBlue:blue];
377 # if (alpha <= 0.9999) {
378 # [result setAlpha:floatWrapperWithValue(alpha)];
379 # }
380 # [result autorelease];
381 # return result;
382 # }
383 # // ...
384 #
385 # Example (JavaScript):
386 #
387 # // ...
388 #
389 # var protoToCssColor = function(rgb_color) {
390 # var redFrac = rgb_color.red || 0.0;
391 # var greenFrac = rgb_color.green || 0.0;
392 # var blueFrac = rgb_color.blue || 0.0;
393 # var red = Math.floor(redFrac * 255);
394 # var green = Math.floor(greenFrac * 255);
395 # var blue = Math.floor(blueFrac * 255);
396 #
397 # if (!('alpha' in rgb_color)) {
398 # return rgbToCssColor_(red, green, blue);
399 # }
400 #
401 # var alphaFrac = rgb_color.alpha.value || 0.0;
402 # var rgbParams = [red, green, blue].join(',');
403 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
404 # };
405 #
406 # var rgbToCssColor_ = function(red, green, blue) {
407 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
408 # var hexString = rgbNumber.toString(16);
409 # var missingZeros = 6 - hexString.length;
410 # var resultBuilder = ['#'];
411 # for (var i = 0; i < missingZeros; i++) {
412 # resultBuilder.push('0');
413 # }
414 # resultBuilder.push(hexString);
415 # return resultBuilder.join('');
416 # };
417 #
418 # // ...
419 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
420 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
421 # the final pixel color is defined by the equation:
422 #
423 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
424 #
425 # This means that a value of 1.0 corresponds to a solid color, whereas
426 # a value of 0.0 corresponds to a completely transparent color. This
427 # uses a wrapper message rather than a simple float scalar so that it is
428 # possible to distinguish between a default value and the value being unset.
429 # If omitted, this color object is to be rendered as a solid color
430 # (as if the alpha value had been explicitly given with a value of 1.0).
431 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
432 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
433 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700434 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700435 "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).
436 # Absent values indicate that the field isn't specified.
437 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
438 # for simplicity of conversion to/from color representations in various
439 # languages over compactness; for example, the fields of this representation
440 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
441 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
442 # method in iOS; and, with just a little work, it can be easily formatted into
443 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
444 #
445 # Example (Java):
446 #
447 # import com.google.type.Color;
448 #
449 # // ...
450 # public static java.awt.Color fromProto(Color protocolor) {
451 # float alpha = protocolor.hasAlpha()
452 # ? protocolor.getAlpha().getValue()
453 # : 1.0;
454 #
455 # return new java.awt.Color(
456 # protocolor.getRed(),
457 # protocolor.getGreen(),
458 # protocolor.getBlue(),
459 # alpha);
460 # }
461 #
462 # public static Color toProto(java.awt.Color color) {
463 # float red = (float) color.getRed();
464 # float green = (float) color.getGreen();
465 # float blue = (float) color.getBlue();
466 # float denominator = 255.0;
467 # Color.Builder resultBuilder =
468 # Color
469 # .newBuilder()
470 # .setRed(red / denominator)
471 # .setGreen(green / denominator)
472 # .setBlue(blue / denominator);
473 # int alpha = color.getAlpha();
474 # if (alpha != 255) {
475 # result.setAlpha(
476 # FloatValue
477 # .newBuilder()
478 # .setValue(((float) alpha) / denominator)
479 # .build());
480 # }
481 # return resultBuilder.build();
482 # }
483 # // ...
484 #
485 # Example (iOS / Obj-C):
486 #
487 # // ...
488 # static UIColor* fromProto(Color* protocolor) {
489 # float red = [protocolor red];
490 # float green = [protocolor green];
491 # float blue = [protocolor blue];
492 # FloatValue* alpha_wrapper = [protocolor alpha];
493 # float alpha = 1.0;
494 # if (alpha_wrapper != nil) {
495 # alpha = [alpha_wrapper value];
496 # }
497 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
498 # }
499 #
500 # static Color* toProto(UIColor* color) {
501 # CGFloat red, green, blue, alpha;
502 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
503 # return nil;
504 # }
505 # Color* result = [Color alloc] init];
506 # [result setRed:red];
507 # [result setGreen:green];
508 # [result setBlue:blue];
509 # if (alpha <= 0.9999) {
510 # [result setAlpha:floatWrapperWithValue(alpha)];
511 # }
512 # [result autorelease];
513 # return result;
514 # }
515 # // ...
516 #
517 # Example (JavaScript):
518 #
519 # // ...
520 #
521 # var protoToCssColor = function(rgb_color) {
522 # var redFrac = rgb_color.red || 0.0;
523 # var greenFrac = rgb_color.green || 0.0;
524 # var blueFrac = rgb_color.blue || 0.0;
525 # var red = Math.floor(redFrac * 255);
526 # var green = Math.floor(greenFrac * 255);
527 # var blue = Math.floor(blueFrac * 255);
528 #
529 # if (!('alpha' in rgb_color)) {
530 # return rgbToCssColor_(red, green, blue);
531 # }
532 #
533 # var alphaFrac = rgb_color.alpha.value || 0.0;
534 # var rgbParams = [red, green, blue].join(',');
535 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
536 # };
537 #
538 # var rgbToCssColor_ = function(red, green, blue) {
539 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
540 # var hexString = rgbNumber.toString(16);
541 # var missingZeros = 6 - hexString.length;
542 # var resultBuilder = ['#'];
543 # for (var i = 0; i < missingZeros; i++) {
544 # resultBuilder.push('0');
545 # }
546 # resultBuilder.push(hexString);
547 # return resultBuilder.join('');
548 # };
549 #
550 # // ...
551 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
552 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
553 # the final pixel color is defined by the equation:
554 #
555 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
556 #
557 # This means that a value of 1.0 corresponds to a solid color, whereas
558 # a value of 0.0 corresponds to a completely transparent color. This
559 # uses a wrapper message rather than a simple float scalar so that it is
560 # possible to distinguish between a default value and the value being unset.
561 # If omitted, this color object is to be rendered as a solid color
562 # (as if the alpha value had been explicitly given with a value of 1.0).
563 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
564 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
565 },
566 "bold": True or False, # True if the text is bold.
567 "strikethrough": True or False, # True if the text has a strikethrough.
568 "fontFamily": "A String", # The font family.
569 "fontSize": 42, # The size of the font.
570 "italic": True or False, # True if the text is italicized.
571 "underline": True or False, # True if the text is underlined.
572 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700573 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
574 "angle": 42, # The angle between the standard orientation and the desired orientation.
575 # Measured in degrees. Valid values are between -90 and 90. Positive
576 # angles are angled upwards, negative are angled downwards.
577 #
578 # Note: For LTR text direction positive angles are in the counterclockwise
579 # direction, whereas for RTL they are in the clockwise direction
580 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
581 # characters is unchanged.
582 # For example:
583 #
584 # | V |
585 # | e |
586 # | r |
587 # | t |
588 # | i |
589 # | c |
590 # | a |
591 # | l |
592 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700593 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
594 "borders": { # The borders of the cell. # The borders of the cell.
595 "top": { # A border along a cell. # The top border of the cell.
596 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
597 # for simplicity of conversion to/from color representations in various
598 # languages over compactness; for example, the fields of this representation
599 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
600 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
601 # method in iOS; and, with just a little work, it can be easily formatted into
602 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
603 #
604 # Example (Java):
605 #
606 # import com.google.type.Color;
607 #
608 # // ...
609 # public static java.awt.Color fromProto(Color protocolor) {
610 # float alpha = protocolor.hasAlpha()
611 # ? protocolor.getAlpha().getValue()
612 # : 1.0;
613 #
614 # return new java.awt.Color(
615 # protocolor.getRed(),
616 # protocolor.getGreen(),
617 # protocolor.getBlue(),
618 # alpha);
619 # }
620 #
621 # public static Color toProto(java.awt.Color color) {
622 # float red = (float) color.getRed();
623 # float green = (float) color.getGreen();
624 # float blue = (float) color.getBlue();
625 # float denominator = 255.0;
626 # Color.Builder resultBuilder =
627 # Color
628 # .newBuilder()
629 # .setRed(red / denominator)
630 # .setGreen(green / denominator)
631 # .setBlue(blue / denominator);
632 # int alpha = color.getAlpha();
633 # if (alpha != 255) {
634 # result.setAlpha(
635 # FloatValue
636 # .newBuilder()
637 # .setValue(((float) alpha) / denominator)
638 # .build());
639 # }
640 # return resultBuilder.build();
641 # }
642 # // ...
643 #
644 # Example (iOS / Obj-C):
645 #
646 # // ...
647 # static UIColor* fromProto(Color* protocolor) {
648 # float red = [protocolor red];
649 # float green = [protocolor green];
650 # float blue = [protocolor blue];
651 # FloatValue* alpha_wrapper = [protocolor alpha];
652 # float alpha = 1.0;
653 # if (alpha_wrapper != nil) {
654 # alpha = [alpha_wrapper value];
655 # }
656 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
657 # }
658 #
659 # static Color* toProto(UIColor* color) {
660 # CGFloat red, green, blue, alpha;
661 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
662 # return nil;
663 # }
664 # Color* result = [Color alloc] init];
665 # [result setRed:red];
666 # [result setGreen:green];
667 # [result setBlue:blue];
668 # if (alpha <= 0.9999) {
669 # [result setAlpha:floatWrapperWithValue(alpha)];
670 # }
671 # [result autorelease];
672 # return result;
673 # }
674 # // ...
675 #
676 # Example (JavaScript):
677 #
678 # // ...
679 #
680 # var protoToCssColor = function(rgb_color) {
681 # var redFrac = rgb_color.red || 0.0;
682 # var greenFrac = rgb_color.green || 0.0;
683 # var blueFrac = rgb_color.blue || 0.0;
684 # var red = Math.floor(redFrac * 255);
685 # var green = Math.floor(greenFrac * 255);
686 # var blue = Math.floor(blueFrac * 255);
687 #
688 # if (!('alpha' in rgb_color)) {
689 # return rgbToCssColor_(red, green, blue);
690 # }
691 #
692 # var alphaFrac = rgb_color.alpha.value || 0.0;
693 # var rgbParams = [red, green, blue].join(',');
694 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
695 # };
696 #
697 # var rgbToCssColor_ = function(red, green, blue) {
698 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
699 # var hexString = rgbNumber.toString(16);
700 # var missingZeros = 6 - hexString.length;
701 # var resultBuilder = ['#'];
702 # for (var i = 0; i < missingZeros; i++) {
703 # resultBuilder.push('0');
704 # }
705 # resultBuilder.push(hexString);
706 # return resultBuilder.join('');
707 # };
708 #
709 # // ...
710 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
711 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
712 # the final pixel color is defined by the equation:
713 #
714 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
715 #
716 # This means that a value of 1.0 corresponds to a solid color, whereas
717 # a value of 0.0 corresponds to a completely transparent color. This
718 # uses a wrapper message rather than a simple float scalar so that it is
719 # possible to distinguish between a default value and the value being unset.
720 # If omitted, this color object is to be rendered as a solid color
721 # (as if the alpha value had been explicitly given with a value of 1.0).
722 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
723 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
724 },
725 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700726 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700727 "style": "A String", # The style of the border.
728 },
729 "right": { # A border along a cell. # The right border of the cell.
730 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
731 # for simplicity of conversion to/from color representations in various
732 # languages over compactness; for example, the fields of this representation
733 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
734 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
735 # method in iOS; and, with just a little work, it can be easily formatted into
736 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
737 #
738 # Example (Java):
739 #
740 # import com.google.type.Color;
741 #
742 # // ...
743 # public static java.awt.Color fromProto(Color protocolor) {
744 # float alpha = protocolor.hasAlpha()
745 # ? protocolor.getAlpha().getValue()
746 # : 1.0;
747 #
748 # return new java.awt.Color(
749 # protocolor.getRed(),
750 # protocolor.getGreen(),
751 # protocolor.getBlue(),
752 # alpha);
753 # }
754 #
755 # public static Color toProto(java.awt.Color color) {
756 # float red = (float) color.getRed();
757 # float green = (float) color.getGreen();
758 # float blue = (float) color.getBlue();
759 # float denominator = 255.0;
760 # Color.Builder resultBuilder =
761 # Color
762 # .newBuilder()
763 # .setRed(red / denominator)
764 # .setGreen(green / denominator)
765 # .setBlue(blue / denominator);
766 # int alpha = color.getAlpha();
767 # if (alpha != 255) {
768 # result.setAlpha(
769 # FloatValue
770 # .newBuilder()
771 # .setValue(((float) alpha) / denominator)
772 # .build());
773 # }
774 # return resultBuilder.build();
775 # }
776 # // ...
777 #
778 # Example (iOS / Obj-C):
779 #
780 # // ...
781 # static UIColor* fromProto(Color* protocolor) {
782 # float red = [protocolor red];
783 # float green = [protocolor green];
784 # float blue = [protocolor blue];
785 # FloatValue* alpha_wrapper = [protocolor alpha];
786 # float alpha = 1.0;
787 # if (alpha_wrapper != nil) {
788 # alpha = [alpha_wrapper value];
789 # }
790 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
791 # }
792 #
793 # static Color* toProto(UIColor* color) {
794 # CGFloat red, green, blue, alpha;
795 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
796 # return nil;
797 # }
798 # Color* result = [Color alloc] init];
799 # [result setRed:red];
800 # [result setGreen:green];
801 # [result setBlue:blue];
802 # if (alpha <= 0.9999) {
803 # [result setAlpha:floatWrapperWithValue(alpha)];
804 # }
805 # [result autorelease];
806 # return result;
807 # }
808 # // ...
809 #
810 # Example (JavaScript):
811 #
812 # // ...
813 #
814 # var protoToCssColor = function(rgb_color) {
815 # var redFrac = rgb_color.red || 0.0;
816 # var greenFrac = rgb_color.green || 0.0;
817 # var blueFrac = rgb_color.blue || 0.0;
818 # var red = Math.floor(redFrac * 255);
819 # var green = Math.floor(greenFrac * 255);
820 # var blue = Math.floor(blueFrac * 255);
821 #
822 # if (!('alpha' in rgb_color)) {
823 # return rgbToCssColor_(red, green, blue);
824 # }
825 #
826 # var alphaFrac = rgb_color.alpha.value || 0.0;
827 # var rgbParams = [red, green, blue].join(',');
828 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
829 # };
830 #
831 # var rgbToCssColor_ = function(red, green, blue) {
832 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
833 # var hexString = rgbNumber.toString(16);
834 # var missingZeros = 6 - hexString.length;
835 # var resultBuilder = ['#'];
836 # for (var i = 0; i < missingZeros; i++) {
837 # resultBuilder.push('0');
838 # }
839 # resultBuilder.push(hexString);
840 # return resultBuilder.join('');
841 # };
842 #
843 # // ...
844 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
845 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
846 # the final pixel color is defined by the equation:
847 #
848 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
849 #
850 # This means that a value of 1.0 corresponds to a solid color, whereas
851 # a value of 0.0 corresponds to a completely transparent color. This
852 # uses a wrapper message rather than a simple float scalar so that it is
853 # possible to distinguish between a default value and the value being unset.
854 # If omitted, this color object is to be rendered as a solid color
855 # (as if the alpha value had been explicitly given with a value of 1.0).
856 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
857 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
858 },
859 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700860 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700861 "style": "A String", # The style of the border.
862 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700863 "left": { # A border along a cell. # The left border of the cell.
864 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
865 # for simplicity of conversion to/from color representations in various
866 # languages over compactness; for example, the fields of this representation
867 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
868 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
869 # method in iOS; and, with just a little work, it can be easily formatted into
870 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
871 #
872 # Example (Java):
873 #
874 # import com.google.type.Color;
875 #
876 # // ...
877 # public static java.awt.Color fromProto(Color protocolor) {
878 # float alpha = protocolor.hasAlpha()
879 # ? protocolor.getAlpha().getValue()
880 # : 1.0;
881 #
882 # return new java.awt.Color(
883 # protocolor.getRed(),
884 # protocolor.getGreen(),
885 # protocolor.getBlue(),
886 # alpha);
887 # }
888 #
889 # public static Color toProto(java.awt.Color color) {
890 # float red = (float) color.getRed();
891 # float green = (float) color.getGreen();
892 # float blue = (float) color.getBlue();
893 # float denominator = 255.0;
894 # Color.Builder resultBuilder =
895 # Color
896 # .newBuilder()
897 # .setRed(red / denominator)
898 # .setGreen(green / denominator)
899 # .setBlue(blue / denominator);
900 # int alpha = color.getAlpha();
901 # if (alpha != 255) {
902 # result.setAlpha(
903 # FloatValue
904 # .newBuilder()
905 # .setValue(((float) alpha) / denominator)
906 # .build());
907 # }
908 # return resultBuilder.build();
909 # }
910 # // ...
911 #
912 # Example (iOS / Obj-C):
913 #
914 # // ...
915 # static UIColor* fromProto(Color* protocolor) {
916 # float red = [protocolor red];
917 # float green = [protocolor green];
918 # float blue = [protocolor blue];
919 # FloatValue* alpha_wrapper = [protocolor alpha];
920 # float alpha = 1.0;
921 # if (alpha_wrapper != nil) {
922 # alpha = [alpha_wrapper value];
923 # }
924 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
925 # }
926 #
927 # static Color* toProto(UIColor* color) {
928 # CGFloat red, green, blue, alpha;
929 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
930 # return nil;
931 # }
932 # Color* result = [Color alloc] init];
933 # [result setRed:red];
934 # [result setGreen:green];
935 # [result setBlue:blue];
936 # if (alpha <= 0.9999) {
937 # [result setAlpha:floatWrapperWithValue(alpha)];
938 # }
939 # [result autorelease];
940 # return result;
941 # }
942 # // ...
943 #
944 # Example (JavaScript):
945 #
946 # // ...
947 #
948 # var protoToCssColor = function(rgb_color) {
949 # var redFrac = rgb_color.red || 0.0;
950 # var greenFrac = rgb_color.green || 0.0;
951 # var blueFrac = rgb_color.blue || 0.0;
952 # var red = Math.floor(redFrac * 255);
953 # var green = Math.floor(greenFrac * 255);
954 # var blue = Math.floor(blueFrac * 255);
955 #
956 # if (!('alpha' in rgb_color)) {
957 # return rgbToCssColor_(red, green, blue);
958 # }
959 #
960 # var alphaFrac = rgb_color.alpha.value || 0.0;
961 # var rgbParams = [red, green, blue].join(',');
962 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
963 # };
964 #
965 # var rgbToCssColor_ = function(red, green, blue) {
966 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
967 # var hexString = rgbNumber.toString(16);
968 # var missingZeros = 6 - hexString.length;
969 # var resultBuilder = ['#'];
970 # for (var i = 0; i < missingZeros; i++) {
971 # resultBuilder.push('0');
972 # }
973 # resultBuilder.push(hexString);
974 # return resultBuilder.join('');
975 # };
976 #
977 # // ...
978 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
979 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
980 # the final pixel color is defined by the equation:
981 #
982 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
983 #
984 # This means that a value of 1.0 corresponds to a solid color, whereas
985 # a value of 0.0 corresponds to a completely transparent color. This
986 # uses a wrapper message rather than a simple float scalar so that it is
987 # possible to distinguish between a default value and the value being unset.
988 # If omitted, this color object is to be rendered as a solid color
989 # (as if the alpha value had been explicitly given with a value of 1.0).
990 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
991 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
992 },
993 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700994 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700995 "style": "A String", # The style of the border.
996 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700997 "bottom": { # A border along a cell. # The bottom border of the cell.
998 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
999 # for simplicity of conversion to/from color representations in various
1000 # languages over compactness; for example, the fields of this representation
1001 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1002 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1003 # method in iOS; and, with just a little work, it can be easily formatted into
1004 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1005 #
1006 # Example (Java):
1007 #
1008 # import com.google.type.Color;
1009 #
1010 # // ...
1011 # public static java.awt.Color fromProto(Color protocolor) {
1012 # float alpha = protocolor.hasAlpha()
1013 # ? protocolor.getAlpha().getValue()
1014 # : 1.0;
1015 #
1016 # return new java.awt.Color(
1017 # protocolor.getRed(),
1018 # protocolor.getGreen(),
1019 # protocolor.getBlue(),
1020 # alpha);
1021 # }
1022 #
1023 # public static Color toProto(java.awt.Color color) {
1024 # float red = (float) color.getRed();
1025 # float green = (float) color.getGreen();
1026 # float blue = (float) color.getBlue();
1027 # float denominator = 255.0;
1028 # Color.Builder resultBuilder =
1029 # Color
1030 # .newBuilder()
1031 # .setRed(red / denominator)
1032 # .setGreen(green / denominator)
1033 # .setBlue(blue / denominator);
1034 # int alpha = color.getAlpha();
1035 # if (alpha != 255) {
1036 # result.setAlpha(
1037 # FloatValue
1038 # .newBuilder()
1039 # .setValue(((float) alpha) / denominator)
1040 # .build());
1041 # }
1042 # return resultBuilder.build();
1043 # }
1044 # // ...
1045 #
1046 # Example (iOS / Obj-C):
1047 #
1048 # // ...
1049 # static UIColor* fromProto(Color* protocolor) {
1050 # float red = [protocolor red];
1051 # float green = [protocolor green];
1052 # float blue = [protocolor blue];
1053 # FloatValue* alpha_wrapper = [protocolor alpha];
1054 # float alpha = 1.0;
1055 # if (alpha_wrapper != nil) {
1056 # alpha = [alpha_wrapper value];
1057 # }
1058 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1059 # }
1060 #
1061 # static Color* toProto(UIColor* color) {
1062 # CGFloat red, green, blue, alpha;
1063 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1064 # return nil;
1065 # }
1066 # Color* result = [Color alloc] init];
1067 # [result setRed:red];
1068 # [result setGreen:green];
1069 # [result setBlue:blue];
1070 # if (alpha <= 0.9999) {
1071 # [result setAlpha:floatWrapperWithValue(alpha)];
1072 # }
1073 # [result autorelease];
1074 # return result;
1075 # }
1076 # // ...
1077 #
1078 # Example (JavaScript):
1079 #
1080 # // ...
1081 #
1082 # var protoToCssColor = function(rgb_color) {
1083 # var redFrac = rgb_color.red || 0.0;
1084 # var greenFrac = rgb_color.green || 0.0;
1085 # var blueFrac = rgb_color.blue || 0.0;
1086 # var red = Math.floor(redFrac * 255);
1087 # var green = Math.floor(greenFrac * 255);
1088 # var blue = Math.floor(blueFrac * 255);
1089 #
1090 # if (!('alpha' in rgb_color)) {
1091 # return rgbToCssColor_(red, green, blue);
1092 # }
1093 #
1094 # var alphaFrac = rgb_color.alpha.value || 0.0;
1095 # var rgbParams = [red, green, blue].join(',');
1096 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1097 # };
1098 #
1099 # var rgbToCssColor_ = function(red, green, blue) {
1100 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1101 # var hexString = rgbNumber.toString(16);
1102 # var missingZeros = 6 - hexString.length;
1103 # var resultBuilder = ['#'];
1104 # for (var i = 0; i < missingZeros; i++) {
1105 # resultBuilder.push('0');
1106 # }
1107 # resultBuilder.push(hexString);
1108 # return resultBuilder.join('');
1109 # };
1110 #
1111 # // ...
1112 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1113 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1114 # the final pixel color is defined by the equation:
1115 #
1116 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1117 #
1118 # This means that a value of 1.0 corresponds to a solid color, whereas
1119 # a value of 0.0 corresponds to a completely transparent color. This
1120 # uses a wrapper message rather than a simple float scalar so that it is
1121 # possible to distinguish between a default value and the value being unset.
1122 # If omitted, this color object is to be rendered as a solid color
1123 # (as if the alpha value had been explicitly given with a value of 1.0).
1124 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1125 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1126 },
1127 "width": 42, # The width of the border, in pixels.
1128 # Deprecated; the width is determined by the "style" field.
1129 "style": "A String", # The style of the border.
1130 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001131 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001132 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001133 },
1134 },
1135 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1136 # the interpolation points listed. The format of a cell will vary
1137 # based on its contents as compared to the values of the interpolation
1138 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001139 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001140 # These pin the gradient color scale according to the color,
1141 # type and value chosen.
1142 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1143 # for simplicity of conversion to/from color representations in various
1144 # languages over compactness; for example, the fields of this representation
1145 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1146 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1147 # method in iOS; and, with just a little work, it can be easily formatted into
1148 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1149 #
1150 # Example (Java):
1151 #
1152 # import com.google.type.Color;
1153 #
1154 # // ...
1155 # public static java.awt.Color fromProto(Color protocolor) {
1156 # float alpha = protocolor.hasAlpha()
1157 # ? protocolor.getAlpha().getValue()
1158 # : 1.0;
1159 #
1160 # return new java.awt.Color(
1161 # protocolor.getRed(),
1162 # protocolor.getGreen(),
1163 # protocolor.getBlue(),
1164 # alpha);
1165 # }
1166 #
1167 # public static Color toProto(java.awt.Color color) {
1168 # float red = (float) color.getRed();
1169 # float green = (float) color.getGreen();
1170 # float blue = (float) color.getBlue();
1171 # float denominator = 255.0;
1172 # Color.Builder resultBuilder =
1173 # Color
1174 # .newBuilder()
1175 # .setRed(red / denominator)
1176 # .setGreen(green / denominator)
1177 # .setBlue(blue / denominator);
1178 # int alpha = color.getAlpha();
1179 # if (alpha != 255) {
1180 # result.setAlpha(
1181 # FloatValue
1182 # .newBuilder()
1183 # .setValue(((float) alpha) / denominator)
1184 # .build());
1185 # }
1186 # return resultBuilder.build();
1187 # }
1188 # // ...
1189 #
1190 # Example (iOS / Obj-C):
1191 #
1192 # // ...
1193 # static UIColor* fromProto(Color* protocolor) {
1194 # float red = [protocolor red];
1195 # float green = [protocolor green];
1196 # float blue = [protocolor blue];
1197 # FloatValue* alpha_wrapper = [protocolor alpha];
1198 # float alpha = 1.0;
1199 # if (alpha_wrapper != nil) {
1200 # alpha = [alpha_wrapper value];
1201 # }
1202 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1203 # }
1204 #
1205 # static Color* toProto(UIColor* color) {
1206 # CGFloat red, green, blue, alpha;
1207 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1208 # return nil;
1209 # }
1210 # Color* result = [Color alloc] init];
1211 # [result setRed:red];
1212 # [result setGreen:green];
1213 # [result setBlue:blue];
1214 # if (alpha <= 0.9999) {
1215 # [result setAlpha:floatWrapperWithValue(alpha)];
1216 # }
1217 # [result autorelease];
1218 # return result;
1219 # }
1220 # // ...
1221 #
1222 # Example (JavaScript):
1223 #
1224 # // ...
1225 #
1226 # var protoToCssColor = function(rgb_color) {
1227 # var redFrac = rgb_color.red || 0.0;
1228 # var greenFrac = rgb_color.green || 0.0;
1229 # var blueFrac = rgb_color.blue || 0.0;
1230 # var red = Math.floor(redFrac * 255);
1231 # var green = Math.floor(greenFrac * 255);
1232 # var blue = Math.floor(blueFrac * 255);
1233 #
1234 # if (!('alpha' in rgb_color)) {
1235 # return rgbToCssColor_(red, green, blue);
1236 # }
1237 #
1238 # var alphaFrac = rgb_color.alpha.value || 0.0;
1239 # var rgbParams = [red, green, blue].join(',');
1240 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1241 # };
1242 #
1243 # var rgbToCssColor_ = function(red, green, blue) {
1244 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1245 # var hexString = rgbNumber.toString(16);
1246 # var missingZeros = 6 - hexString.length;
1247 # var resultBuilder = ['#'];
1248 # for (var i = 0; i < missingZeros; i++) {
1249 # resultBuilder.push('0');
1250 # }
1251 # resultBuilder.push(hexString);
1252 # return resultBuilder.join('');
1253 # };
1254 #
1255 # // ...
1256 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1257 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1258 # the final pixel color is defined by the equation:
1259 #
1260 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1261 #
1262 # This means that a value of 1.0 corresponds to a solid color, whereas
1263 # a value of 0.0 corresponds to a completely transparent color. This
1264 # uses a wrapper message rather than a simple float scalar so that it is
1265 # possible to distinguish between a default value and the value being unset.
1266 # If omitted, this color object is to be rendered as a solid color
1267 # (as if the alpha value had been explicitly given with a value of 1.0).
1268 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1269 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1270 },
1271 "type": "A String", # How the value should be interpreted.
1272 "value": "A String", # The value this interpolation point uses. May be a formula.
1273 # Unused if type is MIN or
1274 # MAX.
1275 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001276 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001277 # These pin the gradient color scale according to the color,
1278 # type and value chosen.
1279 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1280 # for simplicity of conversion to/from color representations in various
1281 # languages over compactness; for example, the fields of this representation
1282 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1283 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1284 # method in iOS; and, with just a little work, it can be easily formatted into
1285 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1286 #
1287 # Example (Java):
1288 #
1289 # import com.google.type.Color;
1290 #
1291 # // ...
1292 # public static java.awt.Color fromProto(Color protocolor) {
1293 # float alpha = protocolor.hasAlpha()
1294 # ? protocolor.getAlpha().getValue()
1295 # : 1.0;
1296 #
1297 # return new java.awt.Color(
1298 # protocolor.getRed(),
1299 # protocolor.getGreen(),
1300 # protocolor.getBlue(),
1301 # alpha);
1302 # }
1303 #
1304 # public static Color toProto(java.awt.Color color) {
1305 # float red = (float) color.getRed();
1306 # float green = (float) color.getGreen();
1307 # float blue = (float) color.getBlue();
1308 # float denominator = 255.0;
1309 # Color.Builder resultBuilder =
1310 # Color
1311 # .newBuilder()
1312 # .setRed(red / denominator)
1313 # .setGreen(green / denominator)
1314 # .setBlue(blue / denominator);
1315 # int alpha = color.getAlpha();
1316 # if (alpha != 255) {
1317 # result.setAlpha(
1318 # FloatValue
1319 # .newBuilder()
1320 # .setValue(((float) alpha) / denominator)
1321 # .build());
1322 # }
1323 # return resultBuilder.build();
1324 # }
1325 # // ...
1326 #
1327 # Example (iOS / Obj-C):
1328 #
1329 # // ...
1330 # static UIColor* fromProto(Color* protocolor) {
1331 # float red = [protocolor red];
1332 # float green = [protocolor green];
1333 # float blue = [protocolor blue];
1334 # FloatValue* alpha_wrapper = [protocolor alpha];
1335 # float alpha = 1.0;
1336 # if (alpha_wrapper != nil) {
1337 # alpha = [alpha_wrapper value];
1338 # }
1339 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1340 # }
1341 #
1342 # static Color* toProto(UIColor* color) {
1343 # CGFloat red, green, blue, alpha;
1344 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1345 # return nil;
1346 # }
1347 # Color* result = [Color alloc] init];
1348 # [result setRed:red];
1349 # [result setGreen:green];
1350 # [result setBlue:blue];
1351 # if (alpha <= 0.9999) {
1352 # [result setAlpha:floatWrapperWithValue(alpha)];
1353 # }
1354 # [result autorelease];
1355 # return result;
1356 # }
1357 # // ...
1358 #
1359 # Example (JavaScript):
1360 #
1361 # // ...
1362 #
1363 # var protoToCssColor = function(rgb_color) {
1364 # var redFrac = rgb_color.red || 0.0;
1365 # var greenFrac = rgb_color.green || 0.0;
1366 # var blueFrac = rgb_color.blue || 0.0;
1367 # var red = Math.floor(redFrac * 255);
1368 # var green = Math.floor(greenFrac * 255);
1369 # var blue = Math.floor(blueFrac * 255);
1370 #
1371 # if (!('alpha' in rgb_color)) {
1372 # return rgbToCssColor_(red, green, blue);
1373 # }
1374 #
1375 # var alphaFrac = rgb_color.alpha.value || 0.0;
1376 # var rgbParams = [red, green, blue].join(',');
1377 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1378 # };
1379 #
1380 # var rgbToCssColor_ = function(red, green, blue) {
1381 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1382 # var hexString = rgbNumber.toString(16);
1383 # var missingZeros = 6 - hexString.length;
1384 # var resultBuilder = ['#'];
1385 # for (var i = 0; i < missingZeros; i++) {
1386 # resultBuilder.push('0');
1387 # }
1388 # resultBuilder.push(hexString);
1389 # return resultBuilder.join('');
1390 # };
1391 #
1392 # // ...
1393 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1394 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1395 # the final pixel color is defined by the equation:
1396 #
1397 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1398 #
1399 # This means that a value of 1.0 corresponds to a solid color, whereas
1400 # a value of 0.0 corresponds to a completely transparent color. This
1401 # uses a wrapper message rather than a simple float scalar so that it is
1402 # possible to distinguish between a default value and the value being unset.
1403 # If omitted, this color object is to be rendered as a solid color
1404 # (as if the alpha value had been explicitly given with a value of 1.0).
1405 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1406 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1407 },
1408 "type": "A String", # How the value should be interpreted.
1409 "value": "A String", # The value this interpolation point uses. May be a formula.
1410 # Unused if type is MIN or
1411 # MAX.
1412 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001413 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001414 # These pin the gradient color scale according to the color,
1415 # type and value chosen.
1416 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1417 # for simplicity of conversion to/from color representations in various
1418 # languages over compactness; for example, the fields of this representation
1419 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1420 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1421 # method in iOS; and, with just a little work, it can be easily formatted into
1422 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1423 #
1424 # Example (Java):
1425 #
1426 # import com.google.type.Color;
1427 #
1428 # // ...
1429 # public static java.awt.Color fromProto(Color protocolor) {
1430 # float alpha = protocolor.hasAlpha()
1431 # ? protocolor.getAlpha().getValue()
1432 # : 1.0;
1433 #
1434 # return new java.awt.Color(
1435 # protocolor.getRed(),
1436 # protocolor.getGreen(),
1437 # protocolor.getBlue(),
1438 # alpha);
1439 # }
1440 #
1441 # public static Color toProto(java.awt.Color color) {
1442 # float red = (float) color.getRed();
1443 # float green = (float) color.getGreen();
1444 # float blue = (float) color.getBlue();
1445 # float denominator = 255.0;
1446 # Color.Builder resultBuilder =
1447 # Color
1448 # .newBuilder()
1449 # .setRed(red / denominator)
1450 # .setGreen(green / denominator)
1451 # .setBlue(blue / denominator);
1452 # int alpha = color.getAlpha();
1453 # if (alpha != 255) {
1454 # result.setAlpha(
1455 # FloatValue
1456 # .newBuilder()
1457 # .setValue(((float) alpha) / denominator)
1458 # .build());
1459 # }
1460 # return resultBuilder.build();
1461 # }
1462 # // ...
1463 #
1464 # Example (iOS / Obj-C):
1465 #
1466 # // ...
1467 # static UIColor* fromProto(Color* protocolor) {
1468 # float red = [protocolor red];
1469 # float green = [protocolor green];
1470 # float blue = [protocolor blue];
1471 # FloatValue* alpha_wrapper = [protocolor alpha];
1472 # float alpha = 1.0;
1473 # if (alpha_wrapper != nil) {
1474 # alpha = [alpha_wrapper value];
1475 # }
1476 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1477 # }
1478 #
1479 # static Color* toProto(UIColor* color) {
1480 # CGFloat red, green, blue, alpha;
1481 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1482 # return nil;
1483 # }
1484 # Color* result = [Color alloc] init];
1485 # [result setRed:red];
1486 # [result setGreen:green];
1487 # [result setBlue:blue];
1488 # if (alpha <= 0.9999) {
1489 # [result setAlpha:floatWrapperWithValue(alpha)];
1490 # }
1491 # [result autorelease];
1492 # return result;
1493 # }
1494 # // ...
1495 #
1496 # Example (JavaScript):
1497 #
1498 # // ...
1499 #
1500 # var protoToCssColor = function(rgb_color) {
1501 # var redFrac = rgb_color.red || 0.0;
1502 # var greenFrac = rgb_color.green || 0.0;
1503 # var blueFrac = rgb_color.blue || 0.0;
1504 # var red = Math.floor(redFrac * 255);
1505 # var green = Math.floor(greenFrac * 255);
1506 # var blue = Math.floor(blueFrac * 255);
1507 #
1508 # if (!('alpha' in rgb_color)) {
1509 # return rgbToCssColor_(red, green, blue);
1510 # }
1511 #
1512 # var alphaFrac = rgb_color.alpha.value || 0.0;
1513 # var rgbParams = [red, green, blue].join(',');
1514 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1515 # };
1516 #
1517 # var rgbToCssColor_ = function(red, green, blue) {
1518 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1519 # var hexString = rgbNumber.toString(16);
1520 # var missingZeros = 6 - hexString.length;
1521 # var resultBuilder = ['#'];
1522 # for (var i = 0; i < missingZeros; i++) {
1523 # resultBuilder.push('0');
1524 # }
1525 # resultBuilder.push(hexString);
1526 # return resultBuilder.join('');
1527 # };
1528 #
1529 # // ...
1530 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1531 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1532 # the final pixel color is defined by the equation:
1533 #
1534 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1535 #
1536 # This means that a value of 1.0 corresponds to a solid color, whereas
1537 # a value of 0.0 corresponds to a completely transparent color. This
1538 # uses a wrapper message rather than a simple float scalar so that it is
1539 # possible to distinguish between a default value and the value being unset.
1540 # If omitted, this color object is to be rendered as a solid color
1541 # (as if the alpha value had been explicitly given with a value of 1.0).
1542 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1543 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1544 },
1545 "type": "A String", # How the value should be interpreted.
1546 "value": "A String", # The value this interpolation point uses. May be a formula.
1547 # Unused if type is MIN or
1548 # MAX.
1549 },
1550 },
1551 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001552 "sheetId": 42, # The sheet of the rule to move. Required if new_index is set,
1553 # unused otherwise.
1554 "newIndex": 42, # The zero-based new index the rule should end up at.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001594 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001597 "startRowIndex": 42, # The start row (inclusive) 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.
1608 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1609 # This field is only visible to users with edit access to the protected
1610 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001611 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001612 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1613 # range. Domain protection is only supported on documents within a domain.
1614 "users": [ # The email addresses of users with edit access to the protected range.
1615 "A String",
1616 ],
1617 "groups": [ # The email addresses of groups with edit access to the protected range.
1618 "A String",
1619 ],
1620 },
1621 "protectedRangeId": 42, # The ID of the protected range.
1622 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001623 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001624 # Warning-based protection means that every user can edit data in the
1625 # protected range, except editing will prompt a warning asking the user
1626 # to confirm the edit.
1627 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001628 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001629 # Additionally, if this field is changed from true to false and the
1630 # `editors` field is not set (nor included in the field mask), then
1631 # the editors will be set to all the editors in the document.
1632 "range": { # A range on a sheet. # The range that is being protected.
1633 # The range may be fully unbounded, in which case this is considered
1634 # a protected sheet.
1635 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001636 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001637 # may be set.
1638 # All indexes are zero-based.
1639 # Indexes are half open, e.g the start index is inclusive
1640 # and the end index is exclusive -- [start_index, end_index).
1641 # Missing indexes indicate the range is unbounded on that side.
1642 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001643 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001644 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001645 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001646 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001647 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001648 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001649 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001650 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001651 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001652 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001653 # `Sheet1!A:B == sheet_id: 0,
1654 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001655 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001656 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001657 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001658 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001659 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001660 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001661 #
1662 # The start index must always be less than or equal to the end index.
1663 # If the start index equals the end index, then the range is empty.
1664 # Empty ranges are typically not meaningful and are usually rendered in the
1665 # UI as `#REF!`.
1666 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001667 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001668 "sheetId": 42, # The sheet this range is on.
1669 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001670 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001671 },
1672 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001723 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001726 "startRowIndex": 42, # The start row (inclusive) 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.
1737 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1738 # This field is only visible to users with edit access to the protected
1739 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001740 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001741 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1742 # range. Domain protection is only supported on documents within a domain.
1743 "users": [ # The email addresses of users with edit access to the protected range.
1744 "A String",
1745 ],
1746 "groups": [ # The email addresses of groups with edit access to the protected range.
1747 "A String",
1748 ],
1749 },
1750 "protectedRangeId": 42, # The ID of the protected range.
1751 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001752 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001753 # Warning-based protection means that every user can edit data in the
1754 # protected range, except editing will prompt a warning asking the user
1755 # to confirm the edit.
1756 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001757 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001758 # Additionally, if this field is changed from true to false and the
1759 # `editors` field is not set (nor included in the field mask), then
1760 # the editors will be set to all the editors in the document.
1761 "range": { # A range on a sheet. # The range that is being protected.
1762 # The range may be fully unbounded, in which case this is considered
1763 # a protected sheet.
1764 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001765 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001766 # may be set.
1767 # All indexes are zero-based.
1768 # Indexes are half open, e.g the start index is inclusive
1769 # and the end index is exclusive -- [start_index, end_index).
1770 # Missing indexes indicate the range is unbounded on that side.
1771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001772 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001773 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001774 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001775 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001776 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001777 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001778 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001779 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001780 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001781 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001782 # `Sheet1!A:B == sheet_id: 0,
1783 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001784 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001785 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001786 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001787 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001788 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001789 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001790 #
1791 # The start index must always be less than or equal to the end index.
1792 # If the start index equals the end index, then the range is empty.
1793 # Empty ranges are typically not meaningful and are usually rendered in the
1794 # UI as `#REF!`.
1795 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001796 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001797 "sheetId": 42, # The sheet this range is on.
1798 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001799 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001800 },
1801 },
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.
1833 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
1834 # CellData.effectiveFormat will not be set if the
1835 # cell's format is equal to this default format.
1836 # This field is read-only.
1837 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
1838 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
1839 # the user's locale will be used if necessary for the given type.
1840 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
1841 # information about the supported patterns.
1842 "type": "A String", # The type of the number format.
1843 # When writing, this field must be set.
1844 },
1845 "textDirection": "A String", # The direction of the text in the cell.
1846 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
1847 # When updating padding, every field must be specified.
1848 "top": 42, # The top padding of the cell.
1849 "right": 42, # The right padding of the cell.
1850 "left": 42, # The left padding of the cell.
1851 "bottom": 42, # The bottom padding of the cell.
1852 },
1853 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
1854 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
1855 # for simplicity of conversion to/from color representations in various
1856 # languages over compactness; for example, the fields of this representation
1857 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1858 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1859 # method in iOS; and, with just a little work, it can be easily formatted into
1860 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1861 #
1862 # Example (Java):
1863 #
1864 # import com.google.type.Color;
1865 #
1866 # // ...
1867 # public static java.awt.Color fromProto(Color protocolor) {
1868 # float alpha = protocolor.hasAlpha()
1869 # ? protocolor.getAlpha().getValue()
1870 # : 1.0;
1871 #
1872 # return new java.awt.Color(
1873 # protocolor.getRed(),
1874 # protocolor.getGreen(),
1875 # protocolor.getBlue(),
1876 # alpha);
1877 # }
1878 #
1879 # public static Color toProto(java.awt.Color color) {
1880 # float red = (float) color.getRed();
1881 # float green = (float) color.getGreen();
1882 # float blue = (float) color.getBlue();
1883 # float denominator = 255.0;
1884 # Color.Builder resultBuilder =
1885 # Color
1886 # .newBuilder()
1887 # .setRed(red / denominator)
1888 # .setGreen(green / denominator)
1889 # .setBlue(blue / denominator);
1890 # int alpha = color.getAlpha();
1891 # if (alpha != 255) {
1892 # result.setAlpha(
1893 # FloatValue
1894 # .newBuilder()
1895 # .setValue(((float) alpha) / denominator)
1896 # .build());
1897 # }
1898 # return resultBuilder.build();
1899 # }
1900 # // ...
1901 #
1902 # Example (iOS / Obj-C):
1903 #
1904 # // ...
1905 # static UIColor* fromProto(Color* protocolor) {
1906 # float red = [protocolor red];
1907 # float green = [protocolor green];
1908 # float blue = [protocolor blue];
1909 # FloatValue* alpha_wrapper = [protocolor alpha];
1910 # float alpha = 1.0;
1911 # if (alpha_wrapper != nil) {
1912 # alpha = [alpha_wrapper value];
1913 # }
1914 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1915 # }
1916 #
1917 # static Color* toProto(UIColor* color) {
1918 # CGFloat red, green, blue, alpha;
1919 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1920 # return nil;
1921 # }
1922 # Color* result = [Color alloc] init];
1923 # [result setRed:red];
1924 # [result setGreen:green];
1925 # [result setBlue:blue];
1926 # if (alpha <= 0.9999) {
1927 # [result setAlpha:floatWrapperWithValue(alpha)];
1928 # }
1929 # [result autorelease];
1930 # return result;
1931 # }
1932 # // ...
1933 #
1934 # Example (JavaScript):
1935 #
1936 # // ...
1937 #
1938 # var protoToCssColor = function(rgb_color) {
1939 # var redFrac = rgb_color.red || 0.0;
1940 # var greenFrac = rgb_color.green || 0.0;
1941 # var blueFrac = rgb_color.blue || 0.0;
1942 # var red = Math.floor(redFrac * 255);
1943 # var green = Math.floor(greenFrac * 255);
1944 # var blue = Math.floor(blueFrac * 255);
1945 #
1946 # if (!('alpha' in rgb_color)) {
1947 # return rgbToCssColor_(red, green, blue);
1948 # }
1949 #
1950 # var alphaFrac = rgb_color.alpha.value || 0.0;
1951 # var rgbParams = [red, green, blue].join(',');
1952 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1953 # };
1954 #
1955 # var rgbToCssColor_ = function(red, green, blue) {
1956 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1957 # var hexString = rgbNumber.toString(16);
1958 # var missingZeros = 6 - hexString.length;
1959 # var resultBuilder = ['#'];
1960 # for (var i = 0; i < missingZeros; i++) {
1961 # resultBuilder.push('0');
1962 # }
1963 # resultBuilder.push(hexString);
1964 # return resultBuilder.join('');
1965 # };
1966 #
1967 # // ...
1968 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1969 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1970 # the final pixel color is defined by the equation:
1971 #
1972 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1973 #
1974 # This means that a value of 1.0 corresponds to a solid color, whereas
1975 # a value of 0.0 corresponds to a completely transparent color. This
1976 # uses a wrapper message rather than a simple float scalar so that it is
1977 # possible to distinguish between a default value and the value being unset.
1978 # If omitted, this color object is to be rendered as a solid color
1979 # (as if the alpha value had been explicitly given with a value of 1.0).
1980 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1981 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1982 },
1983 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
1984 "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).
1985 # Absent values indicate that the field isn't specified.
1986 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
1987 # for simplicity of conversion to/from color representations in various
1988 # languages over compactness; for example, the fields of this representation
1989 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1990 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1991 # method in iOS; and, with just a little work, it can be easily formatted into
1992 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1993 #
1994 # Example (Java):
1995 #
1996 # import com.google.type.Color;
1997 #
1998 # // ...
1999 # public static java.awt.Color fromProto(Color protocolor) {
2000 # float alpha = protocolor.hasAlpha()
2001 # ? protocolor.getAlpha().getValue()
2002 # : 1.0;
2003 #
2004 # return new java.awt.Color(
2005 # protocolor.getRed(),
2006 # protocolor.getGreen(),
2007 # protocolor.getBlue(),
2008 # alpha);
2009 # }
2010 #
2011 # public static Color toProto(java.awt.Color color) {
2012 # float red = (float) color.getRed();
2013 # float green = (float) color.getGreen();
2014 # float blue = (float) color.getBlue();
2015 # float denominator = 255.0;
2016 # Color.Builder resultBuilder =
2017 # Color
2018 # .newBuilder()
2019 # .setRed(red / denominator)
2020 # .setGreen(green / denominator)
2021 # .setBlue(blue / denominator);
2022 # int alpha = color.getAlpha();
2023 # if (alpha != 255) {
2024 # result.setAlpha(
2025 # FloatValue
2026 # .newBuilder()
2027 # .setValue(((float) alpha) / denominator)
2028 # .build());
2029 # }
2030 # return resultBuilder.build();
2031 # }
2032 # // ...
2033 #
2034 # Example (iOS / Obj-C):
2035 #
2036 # // ...
2037 # static UIColor* fromProto(Color* protocolor) {
2038 # float red = [protocolor red];
2039 # float green = [protocolor green];
2040 # float blue = [protocolor blue];
2041 # FloatValue* alpha_wrapper = [protocolor alpha];
2042 # float alpha = 1.0;
2043 # if (alpha_wrapper != nil) {
2044 # alpha = [alpha_wrapper value];
2045 # }
2046 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2047 # }
2048 #
2049 # static Color* toProto(UIColor* color) {
2050 # CGFloat red, green, blue, alpha;
2051 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2052 # return nil;
2053 # }
2054 # Color* result = [Color alloc] init];
2055 # [result setRed:red];
2056 # [result setGreen:green];
2057 # [result setBlue:blue];
2058 # if (alpha <= 0.9999) {
2059 # [result setAlpha:floatWrapperWithValue(alpha)];
2060 # }
2061 # [result autorelease];
2062 # return result;
2063 # }
2064 # // ...
2065 #
2066 # Example (JavaScript):
2067 #
2068 # // ...
2069 #
2070 # var protoToCssColor = function(rgb_color) {
2071 # var redFrac = rgb_color.red || 0.0;
2072 # var greenFrac = rgb_color.green || 0.0;
2073 # var blueFrac = rgb_color.blue || 0.0;
2074 # var red = Math.floor(redFrac * 255);
2075 # var green = Math.floor(greenFrac * 255);
2076 # var blue = Math.floor(blueFrac * 255);
2077 #
2078 # if (!('alpha' in rgb_color)) {
2079 # return rgbToCssColor_(red, green, blue);
2080 # }
2081 #
2082 # var alphaFrac = rgb_color.alpha.value || 0.0;
2083 # var rgbParams = [red, green, blue].join(',');
2084 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2085 # };
2086 #
2087 # var rgbToCssColor_ = function(red, green, blue) {
2088 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2089 # var hexString = rgbNumber.toString(16);
2090 # var missingZeros = 6 - hexString.length;
2091 # var resultBuilder = ['#'];
2092 # for (var i = 0; i < missingZeros; i++) {
2093 # resultBuilder.push('0');
2094 # }
2095 # resultBuilder.push(hexString);
2096 # return resultBuilder.join('');
2097 # };
2098 #
2099 # // ...
2100 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2101 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2102 # the final pixel color is defined by the equation:
2103 #
2104 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2105 #
2106 # This means that a value of 1.0 corresponds to a solid color, whereas
2107 # a value of 0.0 corresponds to a completely transparent color. This
2108 # uses a wrapper message rather than a simple float scalar so that it is
2109 # possible to distinguish between a default value and the value being unset.
2110 # If omitted, this color object is to be rendered as a solid color
2111 # (as if the alpha value had been explicitly given with a value of 1.0).
2112 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2113 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2114 },
2115 "bold": True or False, # True if the text is bold.
2116 "strikethrough": True or False, # True if the text has a strikethrough.
2117 "fontFamily": "A String", # The font family.
2118 "fontSize": 42, # The size of the font.
2119 "italic": True or False, # True if the text is italicized.
2120 "underline": True or False, # True if the text is underlined.
2121 },
2122 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
2123 "angle": 42, # The angle between the standard orientation and the desired orientation.
2124 # Measured in degrees. Valid values are between -90 and 90. Positive
2125 # angles are angled upwards, negative are angled downwards.
2126 #
2127 # Note: For LTR text direction positive angles are in the counterclockwise
2128 # direction, whereas for RTL they are in the clockwise direction
2129 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
2130 # characters is unchanged.
2131 # For example:
2132 #
2133 # | V |
2134 # | e |
2135 # | r |
2136 # | t |
2137 # | i |
2138 # | c |
2139 # | a |
2140 # | l |
2141 },
2142 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2143 "borders": { # The borders of the cell. # The borders of the cell.
2144 "top": { # A border along a cell. # The top border of the cell.
2145 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2146 # for simplicity of conversion to/from color representations in various
2147 # languages over compactness; for example, the fields of this representation
2148 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2149 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2150 # method in iOS; and, with just a little work, it can be easily formatted into
2151 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2152 #
2153 # Example (Java):
2154 #
2155 # import com.google.type.Color;
2156 #
2157 # // ...
2158 # public static java.awt.Color fromProto(Color protocolor) {
2159 # float alpha = protocolor.hasAlpha()
2160 # ? protocolor.getAlpha().getValue()
2161 # : 1.0;
2162 #
2163 # return new java.awt.Color(
2164 # protocolor.getRed(),
2165 # protocolor.getGreen(),
2166 # protocolor.getBlue(),
2167 # alpha);
2168 # }
2169 #
2170 # public static Color toProto(java.awt.Color color) {
2171 # float red = (float) color.getRed();
2172 # float green = (float) color.getGreen();
2173 # float blue = (float) color.getBlue();
2174 # float denominator = 255.0;
2175 # Color.Builder resultBuilder =
2176 # Color
2177 # .newBuilder()
2178 # .setRed(red / denominator)
2179 # .setGreen(green / denominator)
2180 # .setBlue(blue / denominator);
2181 # int alpha = color.getAlpha();
2182 # if (alpha != 255) {
2183 # result.setAlpha(
2184 # FloatValue
2185 # .newBuilder()
2186 # .setValue(((float) alpha) / denominator)
2187 # .build());
2188 # }
2189 # return resultBuilder.build();
2190 # }
2191 # // ...
2192 #
2193 # Example (iOS / Obj-C):
2194 #
2195 # // ...
2196 # static UIColor* fromProto(Color* protocolor) {
2197 # float red = [protocolor red];
2198 # float green = [protocolor green];
2199 # float blue = [protocolor blue];
2200 # FloatValue* alpha_wrapper = [protocolor alpha];
2201 # float alpha = 1.0;
2202 # if (alpha_wrapper != nil) {
2203 # alpha = [alpha_wrapper value];
2204 # }
2205 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2206 # }
2207 #
2208 # static Color* toProto(UIColor* color) {
2209 # CGFloat red, green, blue, alpha;
2210 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2211 # return nil;
2212 # }
2213 # Color* result = [Color alloc] init];
2214 # [result setRed:red];
2215 # [result setGreen:green];
2216 # [result setBlue:blue];
2217 # if (alpha <= 0.9999) {
2218 # [result setAlpha:floatWrapperWithValue(alpha)];
2219 # }
2220 # [result autorelease];
2221 # return result;
2222 # }
2223 # // ...
2224 #
2225 # Example (JavaScript):
2226 #
2227 # // ...
2228 #
2229 # var protoToCssColor = function(rgb_color) {
2230 # var redFrac = rgb_color.red || 0.0;
2231 # var greenFrac = rgb_color.green || 0.0;
2232 # var blueFrac = rgb_color.blue || 0.0;
2233 # var red = Math.floor(redFrac * 255);
2234 # var green = Math.floor(greenFrac * 255);
2235 # var blue = Math.floor(blueFrac * 255);
2236 #
2237 # if (!('alpha' in rgb_color)) {
2238 # return rgbToCssColor_(red, green, blue);
2239 # }
2240 #
2241 # var alphaFrac = rgb_color.alpha.value || 0.0;
2242 # var rgbParams = [red, green, blue].join(',');
2243 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2244 # };
2245 #
2246 # var rgbToCssColor_ = function(red, green, blue) {
2247 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2248 # var hexString = rgbNumber.toString(16);
2249 # var missingZeros = 6 - hexString.length;
2250 # var resultBuilder = ['#'];
2251 # for (var i = 0; i < missingZeros; i++) {
2252 # resultBuilder.push('0');
2253 # }
2254 # resultBuilder.push(hexString);
2255 # return resultBuilder.join('');
2256 # };
2257 #
2258 # // ...
2259 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2260 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2261 # the final pixel color is defined by the equation:
2262 #
2263 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2264 #
2265 # This means that a value of 1.0 corresponds to a solid color, whereas
2266 # a value of 0.0 corresponds to a completely transparent color. This
2267 # uses a wrapper message rather than a simple float scalar so that it is
2268 # possible to distinguish between a default value and the value being unset.
2269 # If omitted, this color object is to be rendered as a solid color
2270 # (as if the alpha value had been explicitly given with a value of 1.0).
2271 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2272 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2273 },
2274 "width": 42, # The width of the border, in pixels.
2275 # Deprecated; the width is determined by the "style" field.
2276 "style": "A String", # The style of the border.
2277 },
2278 "right": { # A border along a cell. # The right border of the cell.
2279 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2280 # for simplicity of conversion to/from color representations in various
2281 # languages over compactness; for example, the fields of this representation
2282 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2283 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2284 # method in iOS; and, with just a little work, it can be easily formatted into
2285 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2286 #
2287 # Example (Java):
2288 #
2289 # import com.google.type.Color;
2290 #
2291 # // ...
2292 # public static java.awt.Color fromProto(Color protocolor) {
2293 # float alpha = protocolor.hasAlpha()
2294 # ? protocolor.getAlpha().getValue()
2295 # : 1.0;
2296 #
2297 # return new java.awt.Color(
2298 # protocolor.getRed(),
2299 # protocolor.getGreen(),
2300 # protocolor.getBlue(),
2301 # alpha);
2302 # }
2303 #
2304 # public static Color toProto(java.awt.Color color) {
2305 # float red = (float) color.getRed();
2306 # float green = (float) color.getGreen();
2307 # float blue = (float) color.getBlue();
2308 # float denominator = 255.0;
2309 # Color.Builder resultBuilder =
2310 # Color
2311 # .newBuilder()
2312 # .setRed(red / denominator)
2313 # .setGreen(green / denominator)
2314 # .setBlue(blue / denominator);
2315 # int alpha = color.getAlpha();
2316 # if (alpha != 255) {
2317 # result.setAlpha(
2318 # FloatValue
2319 # .newBuilder()
2320 # .setValue(((float) alpha) / denominator)
2321 # .build());
2322 # }
2323 # return resultBuilder.build();
2324 # }
2325 # // ...
2326 #
2327 # Example (iOS / Obj-C):
2328 #
2329 # // ...
2330 # static UIColor* fromProto(Color* protocolor) {
2331 # float red = [protocolor red];
2332 # float green = [protocolor green];
2333 # float blue = [protocolor blue];
2334 # FloatValue* alpha_wrapper = [protocolor alpha];
2335 # float alpha = 1.0;
2336 # if (alpha_wrapper != nil) {
2337 # alpha = [alpha_wrapper value];
2338 # }
2339 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2340 # }
2341 #
2342 # static Color* toProto(UIColor* color) {
2343 # CGFloat red, green, blue, alpha;
2344 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2345 # return nil;
2346 # }
2347 # Color* result = [Color alloc] init];
2348 # [result setRed:red];
2349 # [result setGreen:green];
2350 # [result setBlue:blue];
2351 # if (alpha <= 0.9999) {
2352 # [result setAlpha:floatWrapperWithValue(alpha)];
2353 # }
2354 # [result autorelease];
2355 # return result;
2356 # }
2357 # // ...
2358 #
2359 # Example (JavaScript):
2360 #
2361 # // ...
2362 #
2363 # var protoToCssColor = function(rgb_color) {
2364 # var redFrac = rgb_color.red || 0.0;
2365 # var greenFrac = rgb_color.green || 0.0;
2366 # var blueFrac = rgb_color.blue || 0.0;
2367 # var red = Math.floor(redFrac * 255);
2368 # var green = Math.floor(greenFrac * 255);
2369 # var blue = Math.floor(blueFrac * 255);
2370 #
2371 # if (!('alpha' in rgb_color)) {
2372 # return rgbToCssColor_(red, green, blue);
2373 # }
2374 #
2375 # var alphaFrac = rgb_color.alpha.value || 0.0;
2376 # var rgbParams = [red, green, blue].join(',');
2377 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2378 # };
2379 #
2380 # var rgbToCssColor_ = function(red, green, blue) {
2381 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2382 # var hexString = rgbNumber.toString(16);
2383 # var missingZeros = 6 - hexString.length;
2384 # var resultBuilder = ['#'];
2385 # for (var i = 0; i < missingZeros; i++) {
2386 # resultBuilder.push('0');
2387 # }
2388 # resultBuilder.push(hexString);
2389 # return resultBuilder.join('');
2390 # };
2391 #
2392 # // ...
2393 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2394 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2395 # the final pixel color is defined by the equation:
2396 #
2397 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2398 #
2399 # This means that a value of 1.0 corresponds to a solid color, whereas
2400 # a value of 0.0 corresponds to a completely transparent color. This
2401 # uses a wrapper message rather than a simple float scalar so that it is
2402 # possible to distinguish between a default value and the value being unset.
2403 # If omitted, this color object is to be rendered as a solid color
2404 # (as if the alpha value had been explicitly given with a value of 1.0).
2405 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2406 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2407 },
2408 "width": 42, # The width of the border, in pixels.
2409 # Deprecated; the width is determined by the "style" field.
2410 "style": "A String", # The style of the border.
2411 },
2412 "left": { # A border along a cell. # The left border of the cell.
2413 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2414 # for simplicity of conversion to/from color representations in various
2415 # languages over compactness; for example, the fields of this representation
2416 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2417 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2418 # method in iOS; and, with just a little work, it can be easily formatted into
2419 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2420 #
2421 # Example (Java):
2422 #
2423 # import com.google.type.Color;
2424 #
2425 # // ...
2426 # public static java.awt.Color fromProto(Color protocolor) {
2427 # float alpha = protocolor.hasAlpha()
2428 # ? protocolor.getAlpha().getValue()
2429 # : 1.0;
2430 #
2431 # return new java.awt.Color(
2432 # protocolor.getRed(),
2433 # protocolor.getGreen(),
2434 # protocolor.getBlue(),
2435 # alpha);
2436 # }
2437 #
2438 # public static Color toProto(java.awt.Color color) {
2439 # float red = (float) color.getRed();
2440 # float green = (float) color.getGreen();
2441 # float blue = (float) color.getBlue();
2442 # float denominator = 255.0;
2443 # Color.Builder resultBuilder =
2444 # Color
2445 # .newBuilder()
2446 # .setRed(red / denominator)
2447 # .setGreen(green / denominator)
2448 # .setBlue(blue / denominator);
2449 # int alpha = color.getAlpha();
2450 # if (alpha != 255) {
2451 # result.setAlpha(
2452 # FloatValue
2453 # .newBuilder()
2454 # .setValue(((float) alpha) / denominator)
2455 # .build());
2456 # }
2457 # return resultBuilder.build();
2458 # }
2459 # // ...
2460 #
2461 # Example (iOS / Obj-C):
2462 #
2463 # // ...
2464 # static UIColor* fromProto(Color* protocolor) {
2465 # float red = [protocolor red];
2466 # float green = [protocolor green];
2467 # float blue = [protocolor blue];
2468 # FloatValue* alpha_wrapper = [protocolor alpha];
2469 # float alpha = 1.0;
2470 # if (alpha_wrapper != nil) {
2471 # alpha = [alpha_wrapper value];
2472 # }
2473 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2474 # }
2475 #
2476 # static Color* toProto(UIColor* color) {
2477 # CGFloat red, green, blue, alpha;
2478 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2479 # return nil;
2480 # }
2481 # Color* result = [Color alloc] init];
2482 # [result setRed:red];
2483 # [result setGreen:green];
2484 # [result setBlue:blue];
2485 # if (alpha <= 0.9999) {
2486 # [result setAlpha:floatWrapperWithValue(alpha)];
2487 # }
2488 # [result autorelease];
2489 # return result;
2490 # }
2491 # // ...
2492 #
2493 # Example (JavaScript):
2494 #
2495 # // ...
2496 #
2497 # var protoToCssColor = function(rgb_color) {
2498 # var redFrac = rgb_color.red || 0.0;
2499 # var greenFrac = rgb_color.green || 0.0;
2500 # var blueFrac = rgb_color.blue || 0.0;
2501 # var red = Math.floor(redFrac * 255);
2502 # var green = Math.floor(greenFrac * 255);
2503 # var blue = Math.floor(blueFrac * 255);
2504 #
2505 # if (!('alpha' in rgb_color)) {
2506 # return rgbToCssColor_(red, green, blue);
2507 # }
2508 #
2509 # var alphaFrac = rgb_color.alpha.value || 0.0;
2510 # var rgbParams = [red, green, blue].join(',');
2511 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2512 # };
2513 #
2514 # var rgbToCssColor_ = function(red, green, blue) {
2515 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2516 # var hexString = rgbNumber.toString(16);
2517 # var missingZeros = 6 - hexString.length;
2518 # var resultBuilder = ['#'];
2519 # for (var i = 0; i < missingZeros; i++) {
2520 # resultBuilder.push('0');
2521 # }
2522 # resultBuilder.push(hexString);
2523 # return resultBuilder.join('');
2524 # };
2525 #
2526 # // ...
2527 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2528 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2529 # the final pixel color is defined by the equation:
2530 #
2531 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2532 #
2533 # This means that a value of 1.0 corresponds to a solid color, whereas
2534 # a value of 0.0 corresponds to a completely transparent color. This
2535 # uses a wrapper message rather than a simple float scalar so that it is
2536 # possible to distinguish between a default value and the value being unset.
2537 # If omitted, this color object is to be rendered as a solid color
2538 # (as if the alpha value had been explicitly given with a value of 1.0).
2539 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2540 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2541 },
2542 "width": 42, # The width of the border, in pixels.
2543 # Deprecated; the width is determined by the "style" field.
2544 "style": "A String", # The style of the border.
2545 },
2546 "bottom": { # A border along a cell. # The bottom border of the cell.
2547 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2548 # for simplicity of conversion to/from color representations in various
2549 # languages over compactness; for example, the fields of this representation
2550 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2551 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2552 # method in iOS; and, with just a little work, it can be easily formatted into
2553 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2554 #
2555 # Example (Java):
2556 #
2557 # import com.google.type.Color;
2558 #
2559 # // ...
2560 # public static java.awt.Color fromProto(Color protocolor) {
2561 # float alpha = protocolor.hasAlpha()
2562 # ? protocolor.getAlpha().getValue()
2563 # : 1.0;
2564 #
2565 # return new java.awt.Color(
2566 # protocolor.getRed(),
2567 # protocolor.getGreen(),
2568 # protocolor.getBlue(),
2569 # alpha);
2570 # }
2571 #
2572 # public static Color toProto(java.awt.Color color) {
2573 # float red = (float) color.getRed();
2574 # float green = (float) color.getGreen();
2575 # float blue = (float) color.getBlue();
2576 # float denominator = 255.0;
2577 # Color.Builder resultBuilder =
2578 # Color
2579 # .newBuilder()
2580 # .setRed(red / denominator)
2581 # .setGreen(green / denominator)
2582 # .setBlue(blue / denominator);
2583 # int alpha = color.getAlpha();
2584 # if (alpha != 255) {
2585 # result.setAlpha(
2586 # FloatValue
2587 # .newBuilder()
2588 # .setValue(((float) alpha) / denominator)
2589 # .build());
2590 # }
2591 # return resultBuilder.build();
2592 # }
2593 # // ...
2594 #
2595 # Example (iOS / Obj-C):
2596 #
2597 # // ...
2598 # static UIColor* fromProto(Color* protocolor) {
2599 # float red = [protocolor red];
2600 # float green = [protocolor green];
2601 # float blue = [protocolor blue];
2602 # FloatValue* alpha_wrapper = [protocolor alpha];
2603 # float alpha = 1.0;
2604 # if (alpha_wrapper != nil) {
2605 # alpha = [alpha_wrapper value];
2606 # }
2607 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2608 # }
2609 #
2610 # static Color* toProto(UIColor* color) {
2611 # CGFloat red, green, blue, alpha;
2612 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2613 # return nil;
2614 # }
2615 # Color* result = [Color alloc] init];
2616 # [result setRed:red];
2617 # [result setGreen:green];
2618 # [result setBlue:blue];
2619 # if (alpha <= 0.9999) {
2620 # [result setAlpha:floatWrapperWithValue(alpha)];
2621 # }
2622 # [result autorelease];
2623 # return result;
2624 # }
2625 # // ...
2626 #
2627 # Example (JavaScript):
2628 #
2629 # // ...
2630 #
2631 # var protoToCssColor = function(rgb_color) {
2632 # var redFrac = rgb_color.red || 0.0;
2633 # var greenFrac = rgb_color.green || 0.0;
2634 # var blueFrac = rgb_color.blue || 0.0;
2635 # var red = Math.floor(redFrac * 255);
2636 # var green = Math.floor(greenFrac * 255);
2637 # var blue = Math.floor(blueFrac * 255);
2638 #
2639 # if (!('alpha' in rgb_color)) {
2640 # return rgbToCssColor_(red, green, blue);
2641 # }
2642 #
2643 # var alphaFrac = rgb_color.alpha.value || 0.0;
2644 # var rgbParams = [red, green, blue].join(',');
2645 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2646 # };
2647 #
2648 # var rgbToCssColor_ = function(red, green, blue) {
2649 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2650 # var hexString = rgbNumber.toString(16);
2651 # var missingZeros = 6 - hexString.length;
2652 # var resultBuilder = ['#'];
2653 # for (var i = 0; i < missingZeros; i++) {
2654 # resultBuilder.push('0');
2655 # }
2656 # resultBuilder.push(hexString);
2657 # return resultBuilder.join('');
2658 # };
2659 #
2660 # // ...
2661 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2662 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2663 # the final pixel color is defined by the equation:
2664 #
2665 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2666 #
2667 # This means that a value of 1.0 corresponds to a solid color, whereas
2668 # a value of 0.0 corresponds to a completely transparent color. This
2669 # uses a wrapper message rather than a simple float scalar so that it is
2670 # possible to distinguish between a default value and the value being unset.
2671 # If omitted, this color object is to be rendered as a solid color
2672 # (as if the alpha value had been explicitly given with a value of 1.0).
2673 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2674 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2675 },
2676 "width": 42, # The width of the border, in pixels.
2677 # Deprecated; the width is determined by the "style" field.
2678 "style": "A String", # The style of the border.
2679 },
2680 },
2681 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
2682 },
2683 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
2684 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002812 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002815 "startRowIndex": 42, # The start row (inclusive) 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.
2821 "summarizeFunction": "A String", # A function to summarize the value.
2822 # If formula is set, the only supported values are
2823 # SUM and
2824 # CUSTOM.
2825 # If sourceColumnOffset is set, then `CUSTOM`
2826 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002827 "name": "A String", # A name to use for the value. This is only used if formula was set.
2828 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002829 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
2830 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002831 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002832 # means this value refers to column `C`, whereas the offset `1` would
2833 # refer to column `D`.
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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002985 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003115 "verticalAlignment": "A String", # The vertical 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003834 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003964 "verticalAlignment": "A String", # The vertical 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.
4889 "rowCount": 42, # The number of rows in the grid.
4890 "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.
4892 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
4893 },
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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07005047 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005048 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
5049 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005107 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005110 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005164 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005167 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005239 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005242 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005317 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005320 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07005333 "title": "A String", # The title of this axis. If set, this overrides any title inferred
5334 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005335 "format": { # The format of a run of text in a cell. # The format of the title.
5336 # Only valid if the axis is not associated with the domain.
5337 # Absent values indicate that the field isn't specified.
5338 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
5339 # for simplicity of conversion to/from color representations in various
5340 # languages over compactness; for example, the fields of this representation
5341 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5342 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5343 # method in iOS; and, with just a little work, it can be easily formatted into
5344 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5345 #
5346 # Example (Java):
5347 #
5348 # import com.google.type.Color;
5349 #
5350 # // ...
5351 # public static java.awt.Color fromProto(Color protocolor) {
5352 # float alpha = protocolor.hasAlpha()
5353 # ? protocolor.getAlpha().getValue()
5354 # : 1.0;
5355 #
5356 # return new java.awt.Color(
5357 # protocolor.getRed(),
5358 # protocolor.getGreen(),
5359 # protocolor.getBlue(),
5360 # alpha);
5361 # }
5362 #
5363 # public static Color toProto(java.awt.Color color) {
5364 # float red = (float) color.getRed();
5365 # float green = (float) color.getGreen();
5366 # float blue = (float) color.getBlue();
5367 # float denominator = 255.0;
5368 # Color.Builder resultBuilder =
5369 # Color
5370 # .newBuilder()
5371 # .setRed(red / denominator)
5372 # .setGreen(green / denominator)
5373 # .setBlue(blue / denominator);
5374 # int alpha = color.getAlpha();
5375 # if (alpha != 255) {
5376 # result.setAlpha(
5377 # FloatValue
5378 # .newBuilder()
5379 # .setValue(((float) alpha) / denominator)
5380 # .build());
5381 # }
5382 # return resultBuilder.build();
5383 # }
5384 # // ...
5385 #
5386 # Example (iOS / Obj-C):
5387 #
5388 # // ...
5389 # static UIColor* fromProto(Color* protocolor) {
5390 # float red = [protocolor red];
5391 # float green = [protocolor green];
5392 # float blue = [protocolor blue];
5393 # FloatValue* alpha_wrapper = [protocolor alpha];
5394 # float alpha = 1.0;
5395 # if (alpha_wrapper != nil) {
5396 # alpha = [alpha_wrapper value];
5397 # }
5398 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5399 # }
5400 #
5401 # static Color* toProto(UIColor* color) {
5402 # CGFloat red, green, blue, alpha;
5403 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5404 # return nil;
5405 # }
5406 # Color* result = [Color alloc] init];
5407 # [result setRed:red];
5408 # [result setGreen:green];
5409 # [result setBlue:blue];
5410 # if (alpha <= 0.9999) {
5411 # [result setAlpha:floatWrapperWithValue(alpha)];
5412 # }
5413 # [result autorelease];
5414 # return result;
5415 # }
5416 # // ...
5417 #
5418 # Example (JavaScript):
5419 #
5420 # // ...
5421 #
5422 # var protoToCssColor = function(rgb_color) {
5423 # var redFrac = rgb_color.red || 0.0;
5424 # var greenFrac = rgb_color.green || 0.0;
5425 # var blueFrac = rgb_color.blue || 0.0;
5426 # var red = Math.floor(redFrac * 255);
5427 # var green = Math.floor(greenFrac * 255);
5428 # var blue = Math.floor(blueFrac * 255);
5429 #
5430 # if (!('alpha' in rgb_color)) {
5431 # return rgbToCssColor_(red, green, blue);
5432 # }
5433 #
5434 # var alphaFrac = rgb_color.alpha.value || 0.0;
5435 # var rgbParams = [red, green, blue].join(',');
5436 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5437 # };
5438 #
5439 # var rgbToCssColor_ = function(red, green, blue) {
5440 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5441 # var hexString = rgbNumber.toString(16);
5442 # var missingZeros = 6 - hexString.length;
5443 # var resultBuilder = ['#'];
5444 # for (var i = 0; i < missingZeros; i++) {
5445 # resultBuilder.push('0');
5446 # }
5447 # resultBuilder.push(hexString);
5448 # return resultBuilder.join('');
5449 # };
5450 #
5451 # // ...
5452 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5453 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5454 # the final pixel color is defined by the equation:
5455 #
5456 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5457 #
5458 # This means that a value of 1.0 corresponds to a solid color, whereas
5459 # a value of 0.0 corresponds to a completely transparent color. This
5460 # uses a wrapper message rather than a simple float scalar so that it is
5461 # possible to distinguish between a default value and the value being unset.
5462 # If omitted, this color object is to be rendered as a solid color
5463 # (as if the alpha value had been explicitly given with a value of 1.0).
5464 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5465 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5466 },
5467 "bold": True or False, # True if the text is bold.
5468 "strikethrough": True or False, # True if the text has a strikethrough.
5469 "fontFamily": "A String", # The font family.
5470 "fontSize": 42, # The size of the font.
5471 "italic": True or False, # True if the text is italicized.
5472 "underline": True or False, # True if the text is underlined.
5473 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005517 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005520 "startRowIndex": 42, # The start row (inclusive) 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005572 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005702 "verticalAlignment": "A String", # The vertical 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006942 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006945 "startRowIndex": 42, # The start row (inclusive) 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.
6951 "summarizeFunction": "A String", # A function to summarize the value.
6952 # If formula is set, the only supported values are
6953 # SUM and
6954 # CUSTOM.
6955 # If sourceColumnOffset is set, then `CUSTOM`
6956 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006957 "name": "A String", # A name to use for the value. This is only used if formula was set.
6958 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006959 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
6960 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006961 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006962 # means this value refers to column `C`, whereas the offset `1` would
6963 # refer to column `D`.
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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007115 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007245 "verticalAlignment": "A String", # The vertical 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007964 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008094 "verticalAlignment": "A String", # The vertical 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009014 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009017 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009057 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009060 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009105 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009108 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07009155 "insertRange": { # Inserts cells into a range, shifting the existing cells over or down. # Inserts new cells in a sheet, shifting the existing cells.
9156 "range": { # A range on a sheet. # The range to insert new cells into.
9157 # All indexes are zero-based.
9158 # Indexes are half open, e.g the start index is inclusive
9159 # and the end index is exclusive -- [start_index, end_index).
9160 # Missing indexes indicate the range is unbounded on that side.
9161 #
9162 # For example, if `"Sheet1"` is sheet ID 0, then:
9163 #
9164 # `Sheet1!A1:A1 == sheet_id: 0,
9165 # start_row_index: 0, end_row_index: 1,
9166 # start_column_index: 0, end_column_index: 1`
9167 #
9168 # `Sheet1!A3:B4 == sheet_id: 0,
9169 # start_row_index: 2, end_row_index: 4,
9170 # start_column_index: 0, end_column_index: 2`
9171 #
9172 # `Sheet1!A:B == sheet_id: 0,
9173 # start_column_index: 0, end_column_index: 2`
9174 #
9175 # `Sheet1!A5:B == sheet_id: 0,
9176 # start_row_index: 4,
9177 # start_column_index: 0, end_column_index: 2`
9178 #
9179 # `Sheet1 == sheet_id:0`
9180 #
9181 # The start index must always be less than or equal to the end index.
9182 # If the start index equals the end index, then the range is empty.
9183 # Empty ranges are typically not meaningful and are usually rendered in the
9184 # UI as `#REF!`.
9185 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
9186 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
9187 "sheetId": 42, # The sheet this range is on.
9188 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
9189 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009190 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07009191 "shiftDimension": "A String", # The dimension which will be shifted when inserting cells.
9192 # If ROWS, existing cells will be shifted down.
9193 # If COLUMNS, existing cells will be shifted right.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009194 },
9195 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009196 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
9197 # Any number of rows and columns (including a different number of
9198 # columns per row) may be written.
9199 # All indexes are zero-based.
9200 "rowIndex": 42, # The row index of the coordinate.
9201 "columnIndex": 42, # The column index of the coordinate.
9202 "sheetId": 42, # The sheet this coordinate is on.
9203 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009204 "range": { # A range on a sheet. # The range to write data to.
9205 #
9206 # If the data in rows does not cover the entire requested range,
9207 # the fields matching those set in fields will be cleared.
9208 # All indexes are zero-based.
9209 # Indexes are half open, e.g the start index is inclusive
9210 # and the end index is exclusive -- [start_index, end_index).
9211 # Missing indexes indicate the range is unbounded on that side.
9212 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009213 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009214 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009215 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009216 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009217 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009218 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009219 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009220 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009221 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009222 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009223 # `Sheet1!A:B == sheet_id: 0,
9224 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009225 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009226 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009227 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009228 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009229 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009230 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009231 #
9232 # The start index must always be less than or equal to the end index.
9233 # If the start index equals the end index, then the range is empty.
9234 # Empty ranges are typically not meaningful and are usually rendered in the
9235 # UI as `#REF!`.
9236 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009237 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009238 "sheetId": 42, # The sheet this range is on.
9239 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009240 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009241 },
9242 "rows": [ # The data to write.
9243 { # Data about each cell in a row.
9244 "values": [ # The values in the row, one per column.
9245 { # Data about a specific cell.
9246 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9247 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009248 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009249 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009250 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009251 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9252 # or vertically (as rows).
9253 "rows": [ # Each row grouping in the pivot table.
9254 { # A single grouping (either row or column) in a pivot table.
9255 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9256 "valueMetadata": [ # Metadata about values in the grouping.
9257 { # Metadata about a value in a pivot grouping.
9258 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9259 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9260 # (Note that formulaValue is not valid,
9261 # because the values will be calculated.)
9262 "numberValue": 3.14, # Represents a double value.
9263 # Note: Dates, Times and DateTimes are represented as doubles in
9264 # "serial number" format.
9265 "boolValue": True or False, # Represents a boolean value.
9266 "formulaValue": "A String", # Represents a formula.
9267 "stringValue": "A String", # Represents a string value.
9268 # Leading single quotes are not included. For example, if the user typed
9269 # `'123` into the UI, this would be represented as a `stringValue` of
9270 # `"123"`.
9271 "errorValue": { # An error in a cell. # Represents an error.
9272 # This field is read-only.
9273 "message": "A String", # A message with more information about the error
9274 # (in the spreadsheet's locale).
9275 "type": "A String", # The type of error.
9276 },
9277 },
9278 },
9279 ],
9280 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9281 # If not specified, sorting is alphabetical by this group's values.
9282 "buckets": [ # Determines the bucket from which values are chosen to sort.
9283 #
9284 # For example, in a pivot table with one row group & two column groups,
9285 # the row group can list up to two values. The first value corresponds
9286 # to a value within the first column group, and the second value
9287 # corresponds to a value in the second column group. If no values
9288 # are listed, this would indicate that the row should be sorted according
9289 # to the "Grand Total" over the column groups. If a single value is listed,
9290 # this would correspond to using the "Total" of that bucket.
9291 { # The kinds of value that a cell in a spreadsheet can have.
9292 "numberValue": 3.14, # Represents a double value.
9293 # Note: Dates, Times and DateTimes are represented as doubles in
9294 # "serial number" format.
9295 "boolValue": True or False, # Represents a boolean value.
9296 "formulaValue": "A String", # Represents a formula.
9297 "stringValue": "A String", # Represents a string value.
9298 # Leading single quotes are not included. For example, if the user typed
9299 # `'123` into the UI, this would be represented as a `stringValue` of
9300 # `"123"`.
9301 "errorValue": { # An error in a cell. # Represents an error.
9302 # This field is read-only.
9303 "message": "A String", # A message with more information about the error
9304 # (in the spreadsheet's locale).
9305 "type": "A String", # The type of error.
9306 },
9307 },
9308 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009309 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009310 # grouping should be sorted by.
9311 },
9312 "sortOrder": "A String", # The order the values in this group should be sorted.
9313 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9314 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009315 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009316 # means this group refers to column `C`, whereas the offset `1` would refer
9317 # to column `D`.
9318 },
9319 ],
9320 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9321 # All indexes are zero-based.
9322 # Indexes are half open, e.g the start index is inclusive
9323 # and the end index is exclusive -- [start_index, end_index).
9324 # Missing indexes indicate the range is unbounded on that side.
9325 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009326 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009327 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009328 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009329 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009330 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009331 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009332 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009333 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009334 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009335 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009336 # `Sheet1!A:B == sheet_id: 0,
9337 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009338 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009339 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009340 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009341 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009342 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009343 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009344 #
9345 # The start index must always be less than or equal to the end index.
9346 # If the start index equals the end index, then the range is empty.
9347 # Empty ranges are typically not meaningful and are usually rendered in the
9348 # UI as `#REF!`.
9349 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009350 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009351 "sheetId": 42, # The sheet this range is on.
9352 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009353 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009354 },
9355 "values": [ # A list of values to include in the pivot table.
9356 { # The definition of how a value in a pivot table should be calculated.
9357 "formula": "A String", # A custom formula to calculate the value. The formula must start
9358 # with an `=` character.
9359 "summarizeFunction": "A String", # A function to summarize the value.
9360 # If formula is set, the only supported values are
9361 # SUM and
9362 # CUSTOM.
9363 # If sourceColumnOffset is set, then `CUSTOM`
9364 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009365 "name": "A String", # A name to use for the value. This is only used if formula was set.
9366 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009367 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9368 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009369 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009370 # means this value refers to column `C`, whereas the offset `1` would
9371 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009372 },
9373 ],
9374 "criteria": { # An optional mapping of filters per source column offset.
9375 #
9376 # The filters will be applied before aggregating data into the pivot table.
9377 # The map's key is the column offset of the source range that you want to
9378 # filter, and the value is the criteria for that column.
9379 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009380 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009381 # for column `C`, whereas the key `1` is for column `D`.
9382 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9383 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9384 "A String",
9385 ],
9386 },
9387 },
9388 "columns": [ # Each column grouping in the pivot table.
9389 { # A single grouping (either row or column) in a pivot table.
9390 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9391 "valueMetadata": [ # Metadata about values in the grouping.
9392 { # Metadata about a value in a pivot grouping.
9393 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9394 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9395 # (Note that formulaValue is not valid,
9396 # because the values will be calculated.)
9397 "numberValue": 3.14, # Represents a double value.
9398 # Note: Dates, Times and DateTimes are represented as doubles in
9399 # "serial number" format.
9400 "boolValue": True or False, # Represents a boolean value.
9401 "formulaValue": "A String", # Represents a formula.
9402 "stringValue": "A String", # Represents a string value.
9403 # Leading single quotes are not included. For example, if the user typed
9404 # `'123` into the UI, this would be represented as a `stringValue` of
9405 # `"123"`.
9406 "errorValue": { # An error in a cell. # Represents an error.
9407 # This field is read-only.
9408 "message": "A String", # A message with more information about the error
9409 # (in the spreadsheet's locale).
9410 "type": "A String", # The type of error.
9411 },
9412 },
9413 },
9414 ],
9415 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9416 # If not specified, sorting is alphabetical by this group's values.
9417 "buckets": [ # Determines the bucket from which values are chosen to sort.
9418 #
9419 # For example, in a pivot table with one row group & two column groups,
9420 # the row group can list up to two values. The first value corresponds
9421 # to a value within the first column group, and the second value
9422 # corresponds to a value in the second column group. If no values
9423 # are listed, this would indicate that the row should be sorted according
9424 # to the "Grand Total" over the column groups. If a single value is listed,
9425 # this would correspond to using the "Total" of that bucket.
9426 { # The kinds of value that a cell in a spreadsheet can have.
9427 "numberValue": 3.14, # Represents a double value.
9428 # Note: Dates, Times and DateTimes are represented as doubles in
9429 # "serial number" format.
9430 "boolValue": True or False, # Represents a boolean value.
9431 "formulaValue": "A String", # Represents a formula.
9432 "stringValue": "A String", # Represents a string value.
9433 # Leading single quotes are not included. For example, if the user typed
9434 # `'123` into the UI, this would be represented as a `stringValue` of
9435 # `"123"`.
9436 "errorValue": { # An error in a cell. # Represents an error.
9437 # This field is read-only.
9438 "message": "A String", # A message with more information about the error
9439 # (in the spreadsheet's locale).
9440 "type": "A String", # The type of error.
9441 },
9442 },
9443 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009444 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009445 # grouping should be sorted by.
9446 },
9447 "sortOrder": "A String", # The order the values in this group should be sorted.
9448 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9449 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009450 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009451 # means this group refers to column `C`, whereas the offset `1` would refer
9452 # to column `D`.
9453 },
9454 ],
9455 },
9456 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9457 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9458 "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
9459 # the calculated value. For cells with literals, this will be
9460 # the same as the user_entered_value.
9461 # This field is read-only.
9462 "numberValue": 3.14, # Represents a double value.
9463 # Note: Dates, Times and DateTimes are represented as doubles in
9464 # "serial number" format.
9465 "boolValue": True or False, # Represents a boolean value.
9466 "formulaValue": "A String", # Represents a formula.
9467 "stringValue": "A String", # Represents a string value.
9468 # Leading single quotes are not included. For example, if the user typed
9469 # `'123` into the UI, this would be represented as a `stringValue` of
9470 # `"123"`.
9471 "errorValue": { # An error in a cell. # Represents an error.
9472 # This field is read-only.
9473 "message": "A String", # A message with more information about the error
9474 # (in the spreadsheet's locale).
9475 "type": "A String", # The type of error.
9476 },
9477 },
9478 "formattedValue": "A String", # The formatted value of the cell.
9479 # This is the value as it's shown to the user.
9480 # This field is read-only.
9481 "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()`
9482 # Note: Dates, Times and DateTimes are represented as doubles in
9483 # serial number format.
9484 "numberValue": 3.14, # Represents a double value.
9485 # Note: Dates, Times and DateTimes are represented as doubles in
9486 # "serial number" format.
9487 "boolValue": True or False, # Represents a boolean value.
9488 "formulaValue": "A String", # Represents a formula.
9489 "stringValue": "A String", # Represents a string value.
9490 # Leading single quotes are not included. For example, if the user typed
9491 # `'123` into the UI, this would be represented as a `stringValue` of
9492 # `"123"`.
9493 "errorValue": { # An error in a cell. # Represents an error.
9494 # This field is read-only.
9495 "message": "A String", # A message with more information about the error
9496 # (in the spreadsheet's locale).
9497 "type": "A String", # The type of error.
9498 },
9499 },
9500 "note": "A String", # Any note on the cell.
9501 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9502 # This includes the results of applying any conditional formatting and,
9503 # if the cell contains a formula, the computed number format.
9504 # If the effective format is the default format, effective format will
9505 # not be written.
9506 # This field is read-only.
9507 "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 -07009508 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9509 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009510 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07009511 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009512 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009513 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009514 },
9515 "textDirection": "A String", # The direction of the text in the cell.
9516 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9517 # When updating padding, every field must be specified.
9518 "top": 42, # The top padding of the cell.
9519 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009520 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009521 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009522 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009523 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009524 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9525 # for simplicity of conversion to/from color representations in various
9526 # languages over compactness; for example, the fields of this representation
9527 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9528 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9529 # method in iOS; and, with just a little work, it can be easily formatted into
9530 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9531 #
9532 # Example (Java):
9533 #
9534 # import com.google.type.Color;
9535 #
9536 # // ...
9537 # public static java.awt.Color fromProto(Color protocolor) {
9538 # float alpha = protocolor.hasAlpha()
9539 # ? protocolor.getAlpha().getValue()
9540 # : 1.0;
9541 #
9542 # return new java.awt.Color(
9543 # protocolor.getRed(),
9544 # protocolor.getGreen(),
9545 # protocolor.getBlue(),
9546 # alpha);
9547 # }
9548 #
9549 # public static Color toProto(java.awt.Color color) {
9550 # float red = (float) color.getRed();
9551 # float green = (float) color.getGreen();
9552 # float blue = (float) color.getBlue();
9553 # float denominator = 255.0;
9554 # Color.Builder resultBuilder =
9555 # Color
9556 # .newBuilder()
9557 # .setRed(red / denominator)
9558 # .setGreen(green / denominator)
9559 # .setBlue(blue / denominator);
9560 # int alpha = color.getAlpha();
9561 # if (alpha != 255) {
9562 # result.setAlpha(
9563 # FloatValue
9564 # .newBuilder()
9565 # .setValue(((float) alpha) / denominator)
9566 # .build());
9567 # }
9568 # return resultBuilder.build();
9569 # }
9570 # // ...
9571 #
9572 # Example (iOS / Obj-C):
9573 #
9574 # // ...
9575 # static UIColor* fromProto(Color* protocolor) {
9576 # float red = [protocolor red];
9577 # float green = [protocolor green];
9578 # float blue = [protocolor blue];
9579 # FloatValue* alpha_wrapper = [protocolor alpha];
9580 # float alpha = 1.0;
9581 # if (alpha_wrapper != nil) {
9582 # alpha = [alpha_wrapper value];
9583 # }
9584 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9585 # }
9586 #
9587 # static Color* toProto(UIColor* color) {
9588 # CGFloat red, green, blue, alpha;
9589 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9590 # return nil;
9591 # }
9592 # Color* result = [Color alloc] init];
9593 # [result setRed:red];
9594 # [result setGreen:green];
9595 # [result setBlue:blue];
9596 # if (alpha <= 0.9999) {
9597 # [result setAlpha:floatWrapperWithValue(alpha)];
9598 # }
9599 # [result autorelease];
9600 # return result;
9601 # }
9602 # // ...
9603 #
9604 # Example (JavaScript):
9605 #
9606 # // ...
9607 #
9608 # var protoToCssColor = function(rgb_color) {
9609 # var redFrac = rgb_color.red || 0.0;
9610 # var greenFrac = rgb_color.green || 0.0;
9611 # var blueFrac = rgb_color.blue || 0.0;
9612 # var red = Math.floor(redFrac * 255);
9613 # var green = Math.floor(greenFrac * 255);
9614 # var blue = Math.floor(blueFrac * 255);
9615 #
9616 # if (!('alpha' in rgb_color)) {
9617 # return rgbToCssColor_(red, green, blue);
9618 # }
9619 #
9620 # var alphaFrac = rgb_color.alpha.value || 0.0;
9621 # var rgbParams = [red, green, blue].join(',');
9622 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9623 # };
9624 #
9625 # var rgbToCssColor_ = function(red, green, blue) {
9626 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9627 # var hexString = rgbNumber.toString(16);
9628 # var missingZeros = 6 - hexString.length;
9629 # var resultBuilder = ['#'];
9630 # for (var i = 0; i < missingZeros; i++) {
9631 # resultBuilder.push('0');
9632 # }
9633 # resultBuilder.push(hexString);
9634 # return resultBuilder.join('');
9635 # };
9636 #
9637 # // ...
9638 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9639 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9640 # the final pixel color is defined by the equation:
9641 #
9642 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9643 #
9644 # This means that a value of 1.0 corresponds to a solid color, whereas
9645 # a value of 0.0 corresponds to a completely transparent color. This
9646 # uses a wrapper message rather than a simple float scalar so that it is
9647 # possible to distinguish between a default value and the value being unset.
9648 # If omitted, this color object is to be rendered as a solid color
9649 # (as if the alpha value had been explicitly given with a value of 1.0).
9650 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9651 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9652 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009653 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009654 "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).
9655 # Absent values indicate that the field isn't specified.
9656 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9657 # for simplicity of conversion to/from color representations in various
9658 # languages over compactness; for example, the fields of this representation
9659 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9660 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9661 # method in iOS; and, with just a little work, it can be easily formatted into
9662 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9663 #
9664 # Example (Java):
9665 #
9666 # import com.google.type.Color;
9667 #
9668 # // ...
9669 # public static java.awt.Color fromProto(Color protocolor) {
9670 # float alpha = protocolor.hasAlpha()
9671 # ? protocolor.getAlpha().getValue()
9672 # : 1.0;
9673 #
9674 # return new java.awt.Color(
9675 # protocolor.getRed(),
9676 # protocolor.getGreen(),
9677 # protocolor.getBlue(),
9678 # alpha);
9679 # }
9680 #
9681 # public static Color toProto(java.awt.Color color) {
9682 # float red = (float) color.getRed();
9683 # float green = (float) color.getGreen();
9684 # float blue = (float) color.getBlue();
9685 # float denominator = 255.0;
9686 # Color.Builder resultBuilder =
9687 # Color
9688 # .newBuilder()
9689 # .setRed(red / denominator)
9690 # .setGreen(green / denominator)
9691 # .setBlue(blue / denominator);
9692 # int alpha = color.getAlpha();
9693 # if (alpha != 255) {
9694 # result.setAlpha(
9695 # FloatValue
9696 # .newBuilder()
9697 # .setValue(((float) alpha) / denominator)
9698 # .build());
9699 # }
9700 # return resultBuilder.build();
9701 # }
9702 # // ...
9703 #
9704 # Example (iOS / Obj-C):
9705 #
9706 # // ...
9707 # static UIColor* fromProto(Color* protocolor) {
9708 # float red = [protocolor red];
9709 # float green = [protocolor green];
9710 # float blue = [protocolor blue];
9711 # FloatValue* alpha_wrapper = [protocolor alpha];
9712 # float alpha = 1.0;
9713 # if (alpha_wrapper != nil) {
9714 # alpha = [alpha_wrapper value];
9715 # }
9716 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9717 # }
9718 #
9719 # static Color* toProto(UIColor* color) {
9720 # CGFloat red, green, blue, alpha;
9721 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9722 # return nil;
9723 # }
9724 # Color* result = [Color alloc] init];
9725 # [result setRed:red];
9726 # [result setGreen:green];
9727 # [result setBlue:blue];
9728 # if (alpha <= 0.9999) {
9729 # [result setAlpha:floatWrapperWithValue(alpha)];
9730 # }
9731 # [result autorelease];
9732 # return result;
9733 # }
9734 # // ...
9735 #
9736 # Example (JavaScript):
9737 #
9738 # // ...
9739 #
9740 # var protoToCssColor = function(rgb_color) {
9741 # var redFrac = rgb_color.red || 0.0;
9742 # var greenFrac = rgb_color.green || 0.0;
9743 # var blueFrac = rgb_color.blue || 0.0;
9744 # var red = Math.floor(redFrac * 255);
9745 # var green = Math.floor(greenFrac * 255);
9746 # var blue = Math.floor(blueFrac * 255);
9747 #
9748 # if (!('alpha' in rgb_color)) {
9749 # return rgbToCssColor_(red, green, blue);
9750 # }
9751 #
9752 # var alphaFrac = rgb_color.alpha.value || 0.0;
9753 # var rgbParams = [red, green, blue].join(',');
9754 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9755 # };
9756 #
9757 # var rgbToCssColor_ = function(red, green, blue) {
9758 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9759 # var hexString = rgbNumber.toString(16);
9760 # var missingZeros = 6 - hexString.length;
9761 # var resultBuilder = ['#'];
9762 # for (var i = 0; i < missingZeros; i++) {
9763 # resultBuilder.push('0');
9764 # }
9765 # resultBuilder.push(hexString);
9766 # return resultBuilder.join('');
9767 # };
9768 #
9769 # // ...
9770 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9771 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9772 # the final pixel color is defined by the equation:
9773 #
9774 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9775 #
9776 # This means that a value of 1.0 corresponds to a solid color, whereas
9777 # a value of 0.0 corresponds to a completely transparent color. This
9778 # uses a wrapper message rather than a simple float scalar so that it is
9779 # possible to distinguish between a default value and the value being unset.
9780 # If omitted, this color object is to be rendered as a solid color
9781 # (as if the alpha value had been explicitly given with a value of 1.0).
9782 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9783 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9784 },
9785 "bold": True or False, # True if the text is bold.
9786 "strikethrough": True or False, # True if the text has a strikethrough.
9787 "fontFamily": "A String", # The font family.
9788 "fontSize": 42, # The size of the font.
9789 "italic": True or False, # True if the text is italicized.
9790 "underline": True or False, # True if the text is underlined.
9791 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07009792 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
9793 "angle": 42, # The angle between the standard orientation and the desired orientation.
9794 # Measured in degrees. Valid values are between -90 and 90. Positive
9795 # angles are angled upwards, negative are angled downwards.
9796 #
9797 # Note: For LTR text direction positive angles are in the counterclockwise
9798 # direction, whereas for RTL they are in the clockwise direction
9799 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
9800 # characters is unchanged.
9801 # For example:
9802 #
9803 # | V |
9804 # | e |
9805 # | r |
9806 # | t |
9807 # | i |
9808 # | c |
9809 # | a |
9810 # | l |
9811 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009812 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9813 "borders": { # The borders of the cell. # The borders of the cell.
9814 "top": { # A border along a cell. # The top border of the cell.
9815 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9816 # for simplicity of conversion to/from color representations in various
9817 # languages over compactness; for example, the fields of this representation
9818 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9819 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9820 # method in iOS; and, with just a little work, it can be easily formatted into
9821 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9822 #
9823 # Example (Java):
9824 #
9825 # import com.google.type.Color;
9826 #
9827 # // ...
9828 # public static java.awt.Color fromProto(Color protocolor) {
9829 # float alpha = protocolor.hasAlpha()
9830 # ? protocolor.getAlpha().getValue()
9831 # : 1.0;
9832 #
9833 # return new java.awt.Color(
9834 # protocolor.getRed(),
9835 # protocolor.getGreen(),
9836 # protocolor.getBlue(),
9837 # alpha);
9838 # }
9839 #
9840 # public static Color toProto(java.awt.Color color) {
9841 # float red = (float) color.getRed();
9842 # float green = (float) color.getGreen();
9843 # float blue = (float) color.getBlue();
9844 # float denominator = 255.0;
9845 # Color.Builder resultBuilder =
9846 # Color
9847 # .newBuilder()
9848 # .setRed(red / denominator)
9849 # .setGreen(green / denominator)
9850 # .setBlue(blue / denominator);
9851 # int alpha = color.getAlpha();
9852 # if (alpha != 255) {
9853 # result.setAlpha(
9854 # FloatValue
9855 # .newBuilder()
9856 # .setValue(((float) alpha) / denominator)
9857 # .build());
9858 # }
9859 # return resultBuilder.build();
9860 # }
9861 # // ...
9862 #
9863 # Example (iOS / Obj-C):
9864 #
9865 # // ...
9866 # static UIColor* fromProto(Color* protocolor) {
9867 # float red = [protocolor red];
9868 # float green = [protocolor green];
9869 # float blue = [protocolor blue];
9870 # FloatValue* alpha_wrapper = [protocolor alpha];
9871 # float alpha = 1.0;
9872 # if (alpha_wrapper != nil) {
9873 # alpha = [alpha_wrapper value];
9874 # }
9875 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9876 # }
9877 #
9878 # static Color* toProto(UIColor* color) {
9879 # CGFloat red, green, blue, alpha;
9880 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9881 # return nil;
9882 # }
9883 # Color* result = [Color alloc] init];
9884 # [result setRed:red];
9885 # [result setGreen:green];
9886 # [result setBlue:blue];
9887 # if (alpha <= 0.9999) {
9888 # [result setAlpha:floatWrapperWithValue(alpha)];
9889 # }
9890 # [result autorelease];
9891 # return result;
9892 # }
9893 # // ...
9894 #
9895 # Example (JavaScript):
9896 #
9897 # // ...
9898 #
9899 # var protoToCssColor = function(rgb_color) {
9900 # var redFrac = rgb_color.red || 0.0;
9901 # var greenFrac = rgb_color.green || 0.0;
9902 # var blueFrac = rgb_color.blue || 0.0;
9903 # var red = Math.floor(redFrac * 255);
9904 # var green = Math.floor(greenFrac * 255);
9905 # var blue = Math.floor(blueFrac * 255);
9906 #
9907 # if (!('alpha' in rgb_color)) {
9908 # return rgbToCssColor_(red, green, blue);
9909 # }
9910 #
9911 # var alphaFrac = rgb_color.alpha.value || 0.0;
9912 # var rgbParams = [red, green, blue].join(',');
9913 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9914 # };
9915 #
9916 # var rgbToCssColor_ = function(red, green, blue) {
9917 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9918 # var hexString = rgbNumber.toString(16);
9919 # var missingZeros = 6 - hexString.length;
9920 # var resultBuilder = ['#'];
9921 # for (var i = 0; i < missingZeros; i++) {
9922 # resultBuilder.push('0');
9923 # }
9924 # resultBuilder.push(hexString);
9925 # return resultBuilder.join('');
9926 # };
9927 #
9928 # // ...
9929 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9930 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9931 # the final pixel color is defined by the equation:
9932 #
9933 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9934 #
9935 # This means that a value of 1.0 corresponds to a solid color, whereas
9936 # a value of 0.0 corresponds to a completely transparent color. This
9937 # uses a wrapper message rather than a simple float scalar so that it is
9938 # possible to distinguish between a default value and the value being unset.
9939 # If omitted, this color object is to be rendered as a solid color
9940 # (as if the alpha value had been explicitly given with a value of 1.0).
9941 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9942 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9943 },
9944 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009945 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009946 "style": "A String", # The style of the border.
9947 },
9948 "right": { # A border along a cell. # The right border of the cell.
9949 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9950 # for simplicity of conversion to/from color representations in various
9951 # languages over compactness; for example, the fields of this representation
9952 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9953 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9954 # method in iOS; and, with just a little work, it can be easily formatted into
9955 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9956 #
9957 # Example (Java):
9958 #
9959 # import com.google.type.Color;
9960 #
9961 # // ...
9962 # public static java.awt.Color fromProto(Color protocolor) {
9963 # float alpha = protocolor.hasAlpha()
9964 # ? protocolor.getAlpha().getValue()
9965 # : 1.0;
9966 #
9967 # return new java.awt.Color(
9968 # protocolor.getRed(),
9969 # protocolor.getGreen(),
9970 # protocolor.getBlue(),
9971 # alpha);
9972 # }
9973 #
9974 # public static Color toProto(java.awt.Color color) {
9975 # float red = (float) color.getRed();
9976 # float green = (float) color.getGreen();
9977 # float blue = (float) color.getBlue();
9978 # float denominator = 255.0;
9979 # Color.Builder resultBuilder =
9980 # Color
9981 # .newBuilder()
9982 # .setRed(red / denominator)
9983 # .setGreen(green / denominator)
9984 # .setBlue(blue / denominator);
9985 # int alpha = color.getAlpha();
9986 # if (alpha != 255) {
9987 # result.setAlpha(
9988 # FloatValue
9989 # .newBuilder()
9990 # .setValue(((float) alpha) / denominator)
9991 # .build());
9992 # }
9993 # return resultBuilder.build();
9994 # }
9995 # // ...
9996 #
9997 # Example (iOS / Obj-C):
9998 #
9999 # // ...
10000 # static UIColor* fromProto(Color* protocolor) {
10001 # float red = [protocolor red];
10002 # float green = [protocolor green];
10003 # float blue = [protocolor blue];
10004 # FloatValue* alpha_wrapper = [protocolor alpha];
10005 # float alpha = 1.0;
10006 # if (alpha_wrapper != nil) {
10007 # alpha = [alpha_wrapper value];
10008 # }
10009 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10010 # }
10011 #
10012 # static Color* toProto(UIColor* color) {
10013 # CGFloat red, green, blue, alpha;
10014 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10015 # return nil;
10016 # }
10017 # Color* result = [Color alloc] init];
10018 # [result setRed:red];
10019 # [result setGreen:green];
10020 # [result setBlue:blue];
10021 # if (alpha <= 0.9999) {
10022 # [result setAlpha:floatWrapperWithValue(alpha)];
10023 # }
10024 # [result autorelease];
10025 # return result;
10026 # }
10027 # // ...
10028 #
10029 # Example (JavaScript):
10030 #
10031 # // ...
10032 #
10033 # var protoToCssColor = function(rgb_color) {
10034 # var redFrac = rgb_color.red || 0.0;
10035 # var greenFrac = rgb_color.green || 0.0;
10036 # var blueFrac = rgb_color.blue || 0.0;
10037 # var red = Math.floor(redFrac * 255);
10038 # var green = Math.floor(greenFrac * 255);
10039 # var blue = Math.floor(blueFrac * 255);
10040 #
10041 # if (!('alpha' in rgb_color)) {
10042 # return rgbToCssColor_(red, green, blue);
10043 # }
10044 #
10045 # var alphaFrac = rgb_color.alpha.value || 0.0;
10046 # var rgbParams = [red, green, blue].join(',');
10047 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10048 # };
10049 #
10050 # var rgbToCssColor_ = function(red, green, blue) {
10051 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10052 # var hexString = rgbNumber.toString(16);
10053 # var missingZeros = 6 - hexString.length;
10054 # var resultBuilder = ['#'];
10055 # for (var i = 0; i < missingZeros; i++) {
10056 # resultBuilder.push('0');
10057 # }
10058 # resultBuilder.push(hexString);
10059 # return resultBuilder.join('');
10060 # };
10061 #
10062 # // ...
10063 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10064 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10065 # the final pixel color is defined by the equation:
10066 #
10067 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10068 #
10069 # This means that a value of 1.0 corresponds to a solid color, whereas
10070 # a value of 0.0 corresponds to a completely transparent color. This
10071 # uses a wrapper message rather than a simple float scalar so that it is
10072 # possible to distinguish between a default value and the value being unset.
10073 # If omitted, this color object is to be rendered as a solid color
10074 # (as if the alpha value had been explicitly given with a value of 1.0).
10075 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10076 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10077 },
10078 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010079 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010080 "style": "A String", # The style of the border.
10081 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010082 "left": { # A border along a cell. # The left border of the cell.
10083 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10084 # for simplicity of conversion to/from color representations in various
10085 # languages over compactness; for example, the fields of this representation
10086 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10087 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10088 # method in iOS; and, with just a little work, it can be easily formatted into
10089 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10090 #
10091 # Example (Java):
10092 #
10093 # import com.google.type.Color;
10094 #
10095 # // ...
10096 # public static java.awt.Color fromProto(Color protocolor) {
10097 # float alpha = protocolor.hasAlpha()
10098 # ? protocolor.getAlpha().getValue()
10099 # : 1.0;
10100 #
10101 # return new java.awt.Color(
10102 # protocolor.getRed(),
10103 # protocolor.getGreen(),
10104 # protocolor.getBlue(),
10105 # alpha);
10106 # }
10107 #
10108 # public static Color toProto(java.awt.Color color) {
10109 # float red = (float) color.getRed();
10110 # float green = (float) color.getGreen();
10111 # float blue = (float) color.getBlue();
10112 # float denominator = 255.0;
10113 # Color.Builder resultBuilder =
10114 # Color
10115 # .newBuilder()
10116 # .setRed(red / denominator)
10117 # .setGreen(green / denominator)
10118 # .setBlue(blue / denominator);
10119 # int alpha = color.getAlpha();
10120 # if (alpha != 255) {
10121 # result.setAlpha(
10122 # FloatValue
10123 # .newBuilder()
10124 # .setValue(((float) alpha) / denominator)
10125 # .build());
10126 # }
10127 # return resultBuilder.build();
10128 # }
10129 # // ...
10130 #
10131 # Example (iOS / Obj-C):
10132 #
10133 # // ...
10134 # static UIColor* fromProto(Color* protocolor) {
10135 # float red = [protocolor red];
10136 # float green = [protocolor green];
10137 # float blue = [protocolor blue];
10138 # FloatValue* alpha_wrapper = [protocolor alpha];
10139 # float alpha = 1.0;
10140 # if (alpha_wrapper != nil) {
10141 # alpha = [alpha_wrapper value];
10142 # }
10143 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10144 # }
10145 #
10146 # static Color* toProto(UIColor* color) {
10147 # CGFloat red, green, blue, alpha;
10148 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10149 # return nil;
10150 # }
10151 # Color* result = [Color alloc] init];
10152 # [result setRed:red];
10153 # [result setGreen:green];
10154 # [result setBlue:blue];
10155 # if (alpha <= 0.9999) {
10156 # [result setAlpha:floatWrapperWithValue(alpha)];
10157 # }
10158 # [result autorelease];
10159 # return result;
10160 # }
10161 # // ...
10162 #
10163 # Example (JavaScript):
10164 #
10165 # // ...
10166 #
10167 # var protoToCssColor = function(rgb_color) {
10168 # var redFrac = rgb_color.red || 0.0;
10169 # var greenFrac = rgb_color.green || 0.0;
10170 # var blueFrac = rgb_color.blue || 0.0;
10171 # var red = Math.floor(redFrac * 255);
10172 # var green = Math.floor(greenFrac * 255);
10173 # var blue = Math.floor(blueFrac * 255);
10174 #
10175 # if (!('alpha' in rgb_color)) {
10176 # return rgbToCssColor_(red, green, blue);
10177 # }
10178 #
10179 # var alphaFrac = rgb_color.alpha.value || 0.0;
10180 # var rgbParams = [red, green, blue].join(',');
10181 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10182 # };
10183 #
10184 # var rgbToCssColor_ = function(red, green, blue) {
10185 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10186 # var hexString = rgbNumber.toString(16);
10187 # var missingZeros = 6 - hexString.length;
10188 # var resultBuilder = ['#'];
10189 # for (var i = 0; i < missingZeros; i++) {
10190 # resultBuilder.push('0');
10191 # }
10192 # resultBuilder.push(hexString);
10193 # return resultBuilder.join('');
10194 # };
10195 #
10196 # // ...
10197 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10198 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10199 # the final pixel color is defined by the equation:
10200 #
10201 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10202 #
10203 # This means that a value of 1.0 corresponds to a solid color, whereas
10204 # a value of 0.0 corresponds to a completely transparent color. This
10205 # uses a wrapper message rather than a simple float scalar so that it is
10206 # possible to distinguish between a default value and the value being unset.
10207 # If omitted, this color object is to be rendered as a solid color
10208 # (as if the alpha value had been explicitly given with a value of 1.0).
10209 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10210 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10211 },
10212 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010213 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010214 "style": "A String", # The style of the border.
10215 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010216 "bottom": { # A border along a cell. # The bottom border of the cell.
10217 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10218 # for simplicity of conversion to/from color representations in various
10219 # languages over compactness; for example, the fields of this representation
10220 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10221 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10222 # method in iOS; and, with just a little work, it can be easily formatted into
10223 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10224 #
10225 # Example (Java):
10226 #
10227 # import com.google.type.Color;
10228 #
10229 # // ...
10230 # public static java.awt.Color fromProto(Color protocolor) {
10231 # float alpha = protocolor.hasAlpha()
10232 # ? protocolor.getAlpha().getValue()
10233 # : 1.0;
10234 #
10235 # return new java.awt.Color(
10236 # protocolor.getRed(),
10237 # protocolor.getGreen(),
10238 # protocolor.getBlue(),
10239 # alpha);
10240 # }
10241 #
10242 # public static Color toProto(java.awt.Color color) {
10243 # float red = (float) color.getRed();
10244 # float green = (float) color.getGreen();
10245 # float blue = (float) color.getBlue();
10246 # float denominator = 255.0;
10247 # Color.Builder resultBuilder =
10248 # Color
10249 # .newBuilder()
10250 # .setRed(red / denominator)
10251 # .setGreen(green / denominator)
10252 # .setBlue(blue / denominator);
10253 # int alpha = color.getAlpha();
10254 # if (alpha != 255) {
10255 # result.setAlpha(
10256 # FloatValue
10257 # .newBuilder()
10258 # .setValue(((float) alpha) / denominator)
10259 # .build());
10260 # }
10261 # return resultBuilder.build();
10262 # }
10263 # // ...
10264 #
10265 # Example (iOS / Obj-C):
10266 #
10267 # // ...
10268 # static UIColor* fromProto(Color* protocolor) {
10269 # float red = [protocolor red];
10270 # float green = [protocolor green];
10271 # float blue = [protocolor blue];
10272 # FloatValue* alpha_wrapper = [protocolor alpha];
10273 # float alpha = 1.0;
10274 # if (alpha_wrapper != nil) {
10275 # alpha = [alpha_wrapper value];
10276 # }
10277 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10278 # }
10279 #
10280 # static Color* toProto(UIColor* color) {
10281 # CGFloat red, green, blue, alpha;
10282 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10283 # return nil;
10284 # }
10285 # Color* result = [Color alloc] init];
10286 # [result setRed:red];
10287 # [result setGreen:green];
10288 # [result setBlue:blue];
10289 # if (alpha <= 0.9999) {
10290 # [result setAlpha:floatWrapperWithValue(alpha)];
10291 # }
10292 # [result autorelease];
10293 # return result;
10294 # }
10295 # // ...
10296 #
10297 # Example (JavaScript):
10298 #
10299 # // ...
10300 #
10301 # var protoToCssColor = function(rgb_color) {
10302 # var redFrac = rgb_color.red || 0.0;
10303 # var greenFrac = rgb_color.green || 0.0;
10304 # var blueFrac = rgb_color.blue || 0.0;
10305 # var red = Math.floor(redFrac * 255);
10306 # var green = Math.floor(greenFrac * 255);
10307 # var blue = Math.floor(blueFrac * 255);
10308 #
10309 # if (!('alpha' in rgb_color)) {
10310 # return rgbToCssColor_(red, green, blue);
10311 # }
10312 #
10313 # var alphaFrac = rgb_color.alpha.value || 0.0;
10314 # var rgbParams = [red, green, blue].join(',');
10315 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10316 # };
10317 #
10318 # var rgbToCssColor_ = function(red, green, blue) {
10319 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10320 # var hexString = rgbNumber.toString(16);
10321 # var missingZeros = 6 - hexString.length;
10322 # var resultBuilder = ['#'];
10323 # for (var i = 0; i < missingZeros; i++) {
10324 # resultBuilder.push('0');
10325 # }
10326 # resultBuilder.push(hexString);
10327 # return resultBuilder.join('');
10328 # };
10329 #
10330 # // ...
10331 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10332 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10333 # the final pixel color is defined by the equation:
10334 #
10335 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10336 #
10337 # This means that a value of 1.0 corresponds to a solid color, whereas
10338 # a value of 0.0 corresponds to a completely transparent color. This
10339 # uses a wrapper message rather than a simple float scalar so that it is
10340 # possible to distinguish between a default value and the value being unset.
10341 # If omitted, this color object is to be rendered as a solid color
10342 # (as if the alpha value had been explicitly given with a value of 1.0).
10343 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10344 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10345 },
10346 "width": 42, # The width of the border, in pixels.
10347 # Deprecated; the width is determined by the "style" field.
10348 "style": "A String", # The style of the border.
10349 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010350 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010351 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010352 },
10353 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10354 #
10355 # When writing, the new format will be merged with the existing format.
10356 "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 -070010357 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10358 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010359 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070010360 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010361 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010362 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010363 },
10364 "textDirection": "A String", # The direction of the text in the cell.
10365 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10366 # When updating padding, every field must be specified.
10367 "top": 42, # The top padding of the cell.
10368 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010369 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010370 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010371 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010372 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010373 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10374 # for simplicity of conversion to/from color representations in various
10375 # languages over compactness; for example, the fields of this representation
10376 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10377 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10378 # method in iOS; and, with just a little work, it can be easily formatted into
10379 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10380 #
10381 # Example (Java):
10382 #
10383 # import com.google.type.Color;
10384 #
10385 # // ...
10386 # public static java.awt.Color fromProto(Color protocolor) {
10387 # float alpha = protocolor.hasAlpha()
10388 # ? protocolor.getAlpha().getValue()
10389 # : 1.0;
10390 #
10391 # return new java.awt.Color(
10392 # protocolor.getRed(),
10393 # protocolor.getGreen(),
10394 # protocolor.getBlue(),
10395 # alpha);
10396 # }
10397 #
10398 # public static Color toProto(java.awt.Color color) {
10399 # float red = (float) color.getRed();
10400 # float green = (float) color.getGreen();
10401 # float blue = (float) color.getBlue();
10402 # float denominator = 255.0;
10403 # Color.Builder resultBuilder =
10404 # Color
10405 # .newBuilder()
10406 # .setRed(red / denominator)
10407 # .setGreen(green / denominator)
10408 # .setBlue(blue / denominator);
10409 # int alpha = color.getAlpha();
10410 # if (alpha != 255) {
10411 # result.setAlpha(
10412 # FloatValue
10413 # .newBuilder()
10414 # .setValue(((float) alpha) / denominator)
10415 # .build());
10416 # }
10417 # return resultBuilder.build();
10418 # }
10419 # // ...
10420 #
10421 # Example (iOS / Obj-C):
10422 #
10423 # // ...
10424 # static UIColor* fromProto(Color* protocolor) {
10425 # float red = [protocolor red];
10426 # float green = [protocolor green];
10427 # float blue = [protocolor blue];
10428 # FloatValue* alpha_wrapper = [protocolor alpha];
10429 # float alpha = 1.0;
10430 # if (alpha_wrapper != nil) {
10431 # alpha = [alpha_wrapper value];
10432 # }
10433 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10434 # }
10435 #
10436 # static Color* toProto(UIColor* color) {
10437 # CGFloat red, green, blue, alpha;
10438 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10439 # return nil;
10440 # }
10441 # Color* result = [Color alloc] init];
10442 # [result setRed:red];
10443 # [result setGreen:green];
10444 # [result setBlue:blue];
10445 # if (alpha <= 0.9999) {
10446 # [result setAlpha:floatWrapperWithValue(alpha)];
10447 # }
10448 # [result autorelease];
10449 # return result;
10450 # }
10451 # // ...
10452 #
10453 # Example (JavaScript):
10454 #
10455 # // ...
10456 #
10457 # var protoToCssColor = function(rgb_color) {
10458 # var redFrac = rgb_color.red || 0.0;
10459 # var greenFrac = rgb_color.green || 0.0;
10460 # var blueFrac = rgb_color.blue || 0.0;
10461 # var red = Math.floor(redFrac * 255);
10462 # var green = Math.floor(greenFrac * 255);
10463 # var blue = Math.floor(blueFrac * 255);
10464 #
10465 # if (!('alpha' in rgb_color)) {
10466 # return rgbToCssColor_(red, green, blue);
10467 # }
10468 #
10469 # var alphaFrac = rgb_color.alpha.value || 0.0;
10470 # var rgbParams = [red, green, blue].join(',');
10471 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10472 # };
10473 #
10474 # var rgbToCssColor_ = function(red, green, blue) {
10475 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10476 # var hexString = rgbNumber.toString(16);
10477 # var missingZeros = 6 - hexString.length;
10478 # var resultBuilder = ['#'];
10479 # for (var i = 0; i < missingZeros; i++) {
10480 # resultBuilder.push('0');
10481 # }
10482 # resultBuilder.push(hexString);
10483 # return resultBuilder.join('');
10484 # };
10485 #
10486 # // ...
10487 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10488 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10489 # the final pixel color is defined by the equation:
10490 #
10491 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10492 #
10493 # This means that a value of 1.0 corresponds to a solid color, whereas
10494 # a value of 0.0 corresponds to a completely transparent color. This
10495 # uses a wrapper message rather than a simple float scalar so that it is
10496 # possible to distinguish between a default value and the value being unset.
10497 # If omitted, this color object is to be rendered as a solid color
10498 # (as if the alpha value had been explicitly given with a value of 1.0).
10499 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10500 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10501 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010502 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010503 "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).
10504 # Absent values indicate that the field isn't specified.
10505 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10506 # for simplicity of conversion to/from color representations in various
10507 # languages over compactness; for example, the fields of this representation
10508 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10509 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10510 # method in iOS; and, with just a little work, it can be easily formatted into
10511 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10512 #
10513 # Example (Java):
10514 #
10515 # import com.google.type.Color;
10516 #
10517 # // ...
10518 # public static java.awt.Color fromProto(Color protocolor) {
10519 # float alpha = protocolor.hasAlpha()
10520 # ? protocolor.getAlpha().getValue()
10521 # : 1.0;
10522 #
10523 # return new java.awt.Color(
10524 # protocolor.getRed(),
10525 # protocolor.getGreen(),
10526 # protocolor.getBlue(),
10527 # alpha);
10528 # }
10529 #
10530 # public static Color toProto(java.awt.Color color) {
10531 # float red = (float) color.getRed();
10532 # float green = (float) color.getGreen();
10533 # float blue = (float) color.getBlue();
10534 # float denominator = 255.0;
10535 # Color.Builder resultBuilder =
10536 # Color
10537 # .newBuilder()
10538 # .setRed(red / denominator)
10539 # .setGreen(green / denominator)
10540 # .setBlue(blue / denominator);
10541 # int alpha = color.getAlpha();
10542 # if (alpha != 255) {
10543 # result.setAlpha(
10544 # FloatValue
10545 # .newBuilder()
10546 # .setValue(((float) alpha) / denominator)
10547 # .build());
10548 # }
10549 # return resultBuilder.build();
10550 # }
10551 # // ...
10552 #
10553 # Example (iOS / Obj-C):
10554 #
10555 # // ...
10556 # static UIColor* fromProto(Color* protocolor) {
10557 # float red = [protocolor red];
10558 # float green = [protocolor green];
10559 # float blue = [protocolor blue];
10560 # FloatValue* alpha_wrapper = [protocolor alpha];
10561 # float alpha = 1.0;
10562 # if (alpha_wrapper != nil) {
10563 # alpha = [alpha_wrapper value];
10564 # }
10565 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10566 # }
10567 #
10568 # static Color* toProto(UIColor* color) {
10569 # CGFloat red, green, blue, alpha;
10570 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10571 # return nil;
10572 # }
10573 # Color* result = [Color alloc] init];
10574 # [result setRed:red];
10575 # [result setGreen:green];
10576 # [result setBlue:blue];
10577 # if (alpha <= 0.9999) {
10578 # [result setAlpha:floatWrapperWithValue(alpha)];
10579 # }
10580 # [result autorelease];
10581 # return result;
10582 # }
10583 # // ...
10584 #
10585 # Example (JavaScript):
10586 #
10587 # // ...
10588 #
10589 # var protoToCssColor = function(rgb_color) {
10590 # var redFrac = rgb_color.red || 0.0;
10591 # var greenFrac = rgb_color.green || 0.0;
10592 # var blueFrac = rgb_color.blue || 0.0;
10593 # var red = Math.floor(redFrac * 255);
10594 # var green = Math.floor(greenFrac * 255);
10595 # var blue = Math.floor(blueFrac * 255);
10596 #
10597 # if (!('alpha' in rgb_color)) {
10598 # return rgbToCssColor_(red, green, blue);
10599 # }
10600 #
10601 # var alphaFrac = rgb_color.alpha.value || 0.0;
10602 # var rgbParams = [red, green, blue].join(',');
10603 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10604 # };
10605 #
10606 # var rgbToCssColor_ = function(red, green, blue) {
10607 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10608 # var hexString = rgbNumber.toString(16);
10609 # var missingZeros = 6 - hexString.length;
10610 # var resultBuilder = ['#'];
10611 # for (var i = 0; i < missingZeros; i++) {
10612 # resultBuilder.push('0');
10613 # }
10614 # resultBuilder.push(hexString);
10615 # return resultBuilder.join('');
10616 # };
10617 #
10618 # // ...
10619 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10620 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10621 # the final pixel color is defined by the equation:
10622 #
10623 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10624 #
10625 # This means that a value of 1.0 corresponds to a solid color, whereas
10626 # a value of 0.0 corresponds to a completely transparent color. This
10627 # uses a wrapper message rather than a simple float scalar so that it is
10628 # possible to distinguish between a default value and the value being unset.
10629 # If omitted, this color object is to be rendered as a solid color
10630 # (as if the alpha value had been explicitly given with a value of 1.0).
10631 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10632 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10633 },
10634 "bold": True or False, # True if the text is bold.
10635 "strikethrough": True or False, # True if the text has a strikethrough.
10636 "fontFamily": "A String", # The font family.
10637 "fontSize": 42, # The size of the font.
10638 "italic": True or False, # True if the text is italicized.
10639 "underline": True or False, # True if the text is underlined.
10640 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070010641 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
10642 "angle": 42, # The angle between the standard orientation and the desired orientation.
10643 # Measured in degrees. Valid values are between -90 and 90. Positive
10644 # angles are angled upwards, negative are angled downwards.
10645 #
10646 # Note: For LTR text direction positive angles are in the counterclockwise
10647 # direction, whereas for RTL they are in the clockwise direction
10648 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
10649 # characters is unchanged.
10650 # For example:
10651 #
10652 # | V |
10653 # | e |
10654 # | r |
10655 # | t |
10656 # | i |
10657 # | c |
10658 # | a |
10659 # | l |
10660 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010661 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10662 "borders": { # The borders of the cell. # The borders of the cell.
10663 "top": { # A border along a cell. # The top border of the cell.
10664 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10665 # for simplicity of conversion to/from color representations in various
10666 # languages over compactness; for example, the fields of this representation
10667 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10668 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10669 # method in iOS; and, with just a little work, it can be easily formatted into
10670 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10671 #
10672 # Example (Java):
10673 #
10674 # import com.google.type.Color;
10675 #
10676 # // ...
10677 # public static java.awt.Color fromProto(Color protocolor) {
10678 # float alpha = protocolor.hasAlpha()
10679 # ? protocolor.getAlpha().getValue()
10680 # : 1.0;
10681 #
10682 # return new java.awt.Color(
10683 # protocolor.getRed(),
10684 # protocolor.getGreen(),
10685 # protocolor.getBlue(),
10686 # alpha);
10687 # }
10688 #
10689 # public static Color toProto(java.awt.Color color) {
10690 # float red = (float) color.getRed();
10691 # float green = (float) color.getGreen();
10692 # float blue = (float) color.getBlue();
10693 # float denominator = 255.0;
10694 # Color.Builder resultBuilder =
10695 # Color
10696 # .newBuilder()
10697 # .setRed(red / denominator)
10698 # .setGreen(green / denominator)
10699 # .setBlue(blue / denominator);
10700 # int alpha = color.getAlpha();
10701 # if (alpha != 255) {
10702 # result.setAlpha(
10703 # FloatValue
10704 # .newBuilder()
10705 # .setValue(((float) alpha) / denominator)
10706 # .build());
10707 # }
10708 # return resultBuilder.build();
10709 # }
10710 # // ...
10711 #
10712 # Example (iOS / Obj-C):
10713 #
10714 # // ...
10715 # static UIColor* fromProto(Color* protocolor) {
10716 # float red = [protocolor red];
10717 # float green = [protocolor green];
10718 # float blue = [protocolor blue];
10719 # FloatValue* alpha_wrapper = [protocolor alpha];
10720 # float alpha = 1.0;
10721 # if (alpha_wrapper != nil) {
10722 # alpha = [alpha_wrapper value];
10723 # }
10724 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10725 # }
10726 #
10727 # static Color* toProto(UIColor* color) {
10728 # CGFloat red, green, blue, alpha;
10729 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10730 # return nil;
10731 # }
10732 # Color* result = [Color alloc] init];
10733 # [result setRed:red];
10734 # [result setGreen:green];
10735 # [result setBlue:blue];
10736 # if (alpha <= 0.9999) {
10737 # [result setAlpha:floatWrapperWithValue(alpha)];
10738 # }
10739 # [result autorelease];
10740 # return result;
10741 # }
10742 # // ...
10743 #
10744 # Example (JavaScript):
10745 #
10746 # // ...
10747 #
10748 # var protoToCssColor = function(rgb_color) {
10749 # var redFrac = rgb_color.red || 0.0;
10750 # var greenFrac = rgb_color.green || 0.0;
10751 # var blueFrac = rgb_color.blue || 0.0;
10752 # var red = Math.floor(redFrac * 255);
10753 # var green = Math.floor(greenFrac * 255);
10754 # var blue = Math.floor(blueFrac * 255);
10755 #
10756 # if (!('alpha' in rgb_color)) {
10757 # return rgbToCssColor_(red, green, blue);
10758 # }
10759 #
10760 # var alphaFrac = rgb_color.alpha.value || 0.0;
10761 # var rgbParams = [red, green, blue].join(',');
10762 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10763 # };
10764 #
10765 # var rgbToCssColor_ = function(red, green, blue) {
10766 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10767 # var hexString = rgbNumber.toString(16);
10768 # var missingZeros = 6 - hexString.length;
10769 # var resultBuilder = ['#'];
10770 # for (var i = 0; i < missingZeros; i++) {
10771 # resultBuilder.push('0');
10772 # }
10773 # resultBuilder.push(hexString);
10774 # return resultBuilder.join('');
10775 # };
10776 #
10777 # // ...
10778 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10779 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10780 # the final pixel color is defined by the equation:
10781 #
10782 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10783 #
10784 # This means that a value of 1.0 corresponds to a solid color, whereas
10785 # a value of 0.0 corresponds to a completely transparent color. This
10786 # uses a wrapper message rather than a simple float scalar so that it is
10787 # possible to distinguish between a default value and the value being unset.
10788 # If omitted, this color object is to be rendered as a solid color
10789 # (as if the alpha value had been explicitly given with a value of 1.0).
10790 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10791 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10792 },
10793 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010794 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010795 "style": "A String", # The style of the border.
10796 },
10797 "right": { # A border along a cell. # The right border of the cell.
10798 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10799 # for simplicity of conversion to/from color representations in various
10800 # languages over compactness; for example, the fields of this representation
10801 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10802 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10803 # method in iOS; and, with just a little work, it can be easily formatted into
10804 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10805 #
10806 # Example (Java):
10807 #
10808 # import com.google.type.Color;
10809 #
10810 # // ...
10811 # public static java.awt.Color fromProto(Color protocolor) {
10812 # float alpha = protocolor.hasAlpha()
10813 # ? protocolor.getAlpha().getValue()
10814 # : 1.0;
10815 #
10816 # return new java.awt.Color(
10817 # protocolor.getRed(),
10818 # protocolor.getGreen(),
10819 # protocolor.getBlue(),
10820 # alpha);
10821 # }
10822 #
10823 # public static Color toProto(java.awt.Color color) {
10824 # float red = (float) color.getRed();
10825 # float green = (float) color.getGreen();
10826 # float blue = (float) color.getBlue();
10827 # float denominator = 255.0;
10828 # Color.Builder resultBuilder =
10829 # Color
10830 # .newBuilder()
10831 # .setRed(red / denominator)
10832 # .setGreen(green / denominator)
10833 # .setBlue(blue / denominator);
10834 # int alpha = color.getAlpha();
10835 # if (alpha != 255) {
10836 # result.setAlpha(
10837 # FloatValue
10838 # .newBuilder()
10839 # .setValue(((float) alpha) / denominator)
10840 # .build());
10841 # }
10842 # return resultBuilder.build();
10843 # }
10844 # // ...
10845 #
10846 # Example (iOS / Obj-C):
10847 #
10848 # // ...
10849 # static UIColor* fromProto(Color* protocolor) {
10850 # float red = [protocolor red];
10851 # float green = [protocolor green];
10852 # float blue = [protocolor blue];
10853 # FloatValue* alpha_wrapper = [protocolor alpha];
10854 # float alpha = 1.0;
10855 # if (alpha_wrapper != nil) {
10856 # alpha = [alpha_wrapper value];
10857 # }
10858 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10859 # }
10860 #
10861 # static Color* toProto(UIColor* color) {
10862 # CGFloat red, green, blue, alpha;
10863 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10864 # return nil;
10865 # }
10866 # Color* result = [Color alloc] init];
10867 # [result setRed:red];
10868 # [result setGreen:green];
10869 # [result setBlue:blue];
10870 # if (alpha <= 0.9999) {
10871 # [result setAlpha:floatWrapperWithValue(alpha)];
10872 # }
10873 # [result autorelease];
10874 # return result;
10875 # }
10876 # // ...
10877 #
10878 # Example (JavaScript):
10879 #
10880 # // ...
10881 #
10882 # var protoToCssColor = function(rgb_color) {
10883 # var redFrac = rgb_color.red || 0.0;
10884 # var greenFrac = rgb_color.green || 0.0;
10885 # var blueFrac = rgb_color.blue || 0.0;
10886 # var red = Math.floor(redFrac * 255);
10887 # var green = Math.floor(greenFrac * 255);
10888 # var blue = Math.floor(blueFrac * 255);
10889 #
10890 # if (!('alpha' in rgb_color)) {
10891 # return rgbToCssColor_(red, green, blue);
10892 # }
10893 #
10894 # var alphaFrac = rgb_color.alpha.value || 0.0;
10895 # var rgbParams = [red, green, blue].join(',');
10896 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10897 # };
10898 #
10899 # var rgbToCssColor_ = function(red, green, blue) {
10900 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10901 # var hexString = rgbNumber.toString(16);
10902 # var missingZeros = 6 - hexString.length;
10903 # var resultBuilder = ['#'];
10904 # for (var i = 0; i < missingZeros; i++) {
10905 # resultBuilder.push('0');
10906 # }
10907 # resultBuilder.push(hexString);
10908 # return resultBuilder.join('');
10909 # };
10910 #
10911 # // ...
10912 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10913 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10914 # the final pixel color is defined by the equation:
10915 #
10916 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10917 #
10918 # This means that a value of 1.0 corresponds to a solid color, whereas
10919 # a value of 0.0 corresponds to a completely transparent color. This
10920 # uses a wrapper message rather than a simple float scalar so that it is
10921 # possible to distinguish between a default value and the value being unset.
10922 # If omitted, this color object is to be rendered as a solid color
10923 # (as if the alpha value had been explicitly given with a value of 1.0).
10924 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10925 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10926 },
10927 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010928 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010929 "style": "A String", # The style of the border.
10930 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010931 "left": { # A border along a cell. # The left border of the cell.
10932 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10933 # for simplicity of conversion to/from color representations in various
10934 # languages over compactness; for example, the fields of this representation
10935 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10936 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10937 # method in iOS; and, with just a little work, it can be easily formatted into
10938 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10939 #
10940 # Example (Java):
10941 #
10942 # import com.google.type.Color;
10943 #
10944 # // ...
10945 # public static java.awt.Color fromProto(Color protocolor) {
10946 # float alpha = protocolor.hasAlpha()
10947 # ? protocolor.getAlpha().getValue()
10948 # : 1.0;
10949 #
10950 # return new java.awt.Color(
10951 # protocolor.getRed(),
10952 # protocolor.getGreen(),
10953 # protocolor.getBlue(),
10954 # alpha);
10955 # }
10956 #
10957 # public static Color toProto(java.awt.Color color) {
10958 # float red = (float) color.getRed();
10959 # float green = (float) color.getGreen();
10960 # float blue = (float) color.getBlue();
10961 # float denominator = 255.0;
10962 # Color.Builder resultBuilder =
10963 # Color
10964 # .newBuilder()
10965 # .setRed(red / denominator)
10966 # .setGreen(green / denominator)
10967 # .setBlue(blue / denominator);
10968 # int alpha = color.getAlpha();
10969 # if (alpha != 255) {
10970 # result.setAlpha(
10971 # FloatValue
10972 # .newBuilder()
10973 # .setValue(((float) alpha) / denominator)
10974 # .build());
10975 # }
10976 # return resultBuilder.build();
10977 # }
10978 # // ...
10979 #
10980 # Example (iOS / Obj-C):
10981 #
10982 # // ...
10983 # static UIColor* fromProto(Color* protocolor) {
10984 # float red = [protocolor red];
10985 # float green = [protocolor green];
10986 # float blue = [protocolor blue];
10987 # FloatValue* alpha_wrapper = [protocolor alpha];
10988 # float alpha = 1.0;
10989 # if (alpha_wrapper != nil) {
10990 # alpha = [alpha_wrapper value];
10991 # }
10992 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10993 # }
10994 #
10995 # static Color* toProto(UIColor* color) {
10996 # CGFloat red, green, blue, alpha;
10997 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10998 # return nil;
10999 # }
11000 # Color* result = [Color alloc] init];
11001 # [result setRed:red];
11002 # [result setGreen:green];
11003 # [result setBlue:blue];
11004 # if (alpha <= 0.9999) {
11005 # [result setAlpha:floatWrapperWithValue(alpha)];
11006 # }
11007 # [result autorelease];
11008 # return result;
11009 # }
11010 # // ...
11011 #
11012 # Example (JavaScript):
11013 #
11014 # // ...
11015 #
11016 # var protoToCssColor = function(rgb_color) {
11017 # var redFrac = rgb_color.red || 0.0;
11018 # var greenFrac = rgb_color.green || 0.0;
11019 # var blueFrac = rgb_color.blue || 0.0;
11020 # var red = Math.floor(redFrac * 255);
11021 # var green = Math.floor(greenFrac * 255);
11022 # var blue = Math.floor(blueFrac * 255);
11023 #
11024 # if (!('alpha' in rgb_color)) {
11025 # return rgbToCssColor_(red, green, blue);
11026 # }
11027 #
11028 # var alphaFrac = rgb_color.alpha.value || 0.0;
11029 # var rgbParams = [red, green, blue].join(',');
11030 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11031 # };
11032 #
11033 # var rgbToCssColor_ = function(red, green, blue) {
11034 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11035 # var hexString = rgbNumber.toString(16);
11036 # var missingZeros = 6 - hexString.length;
11037 # var resultBuilder = ['#'];
11038 # for (var i = 0; i < missingZeros; i++) {
11039 # resultBuilder.push('0');
11040 # }
11041 # resultBuilder.push(hexString);
11042 # return resultBuilder.join('');
11043 # };
11044 #
11045 # // ...
11046 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11047 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11048 # the final pixel color is defined by the equation:
11049 #
11050 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11051 #
11052 # This means that a value of 1.0 corresponds to a solid color, whereas
11053 # a value of 0.0 corresponds to a completely transparent color. This
11054 # uses a wrapper message rather than a simple float scalar so that it is
11055 # possible to distinguish between a default value and the value being unset.
11056 # If omitted, this color object is to be rendered as a solid color
11057 # (as if the alpha value had been explicitly given with a value of 1.0).
11058 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11059 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11060 },
11061 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070011062 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011063 "style": "A String", # The style of the border.
11064 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011065 "bottom": { # A border along a cell. # The bottom border of the cell.
11066 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
11067 # for simplicity of conversion to/from color representations in various
11068 # languages over compactness; for example, the fields of this representation
11069 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11070 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11071 # method in iOS; and, with just a little work, it can be easily formatted into
11072 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11073 #
11074 # Example (Java):
11075 #
11076 # import com.google.type.Color;
11077 #
11078 # // ...
11079 # public static java.awt.Color fromProto(Color protocolor) {
11080 # float alpha = protocolor.hasAlpha()
11081 # ? protocolor.getAlpha().getValue()
11082 # : 1.0;
11083 #
11084 # return new java.awt.Color(
11085 # protocolor.getRed(),
11086 # protocolor.getGreen(),
11087 # protocolor.getBlue(),
11088 # alpha);
11089 # }
11090 #
11091 # public static Color toProto(java.awt.Color color) {
11092 # float red = (float) color.getRed();
11093 # float green = (float) color.getGreen();
11094 # float blue = (float) color.getBlue();
11095 # float denominator = 255.0;
11096 # Color.Builder resultBuilder =
11097 # Color
11098 # .newBuilder()
11099 # .setRed(red / denominator)
11100 # .setGreen(green / denominator)
11101 # .setBlue(blue / denominator);
11102 # int alpha = color.getAlpha();
11103 # if (alpha != 255) {
11104 # result.setAlpha(
11105 # FloatValue
11106 # .newBuilder()
11107 # .setValue(((float) alpha) / denominator)
11108 # .build());
11109 # }
11110 # return resultBuilder.build();
11111 # }
11112 # // ...
11113 #
11114 # Example (iOS / Obj-C):
11115 #
11116 # // ...
11117 # static UIColor* fromProto(Color* protocolor) {
11118 # float red = [protocolor red];
11119 # float green = [protocolor green];
11120 # float blue = [protocolor blue];
11121 # FloatValue* alpha_wrapper = [protocolor alpha];
11122 # float alpha = 1.0;
11123 # if (alpha_wrapper != nil) {
11124 # alpha = [alpha_wrapper value];
11125 # }
11126 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11127 # }
11128 #
11129 # static Color* toProto(UIColor* color) {
11130 # CGFloat red, green, blue, alpha;
11131 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11132 # return nil;
11133 # }
11134 # Color* result = [Color alloc] init];
11135 # [result setRed:red];
11136 # [result setGreen:green];
11137 # [result setBlue:blue];
11138 # if (alpha <= 0.9999) {
11139 # [result setAlpha:floatWrapperWithValue(alpha)];
11140 # }
11141 # [result autorelease];
11142 # return result;
11143 # }
11144 # // ...
11145 #
11146 # Example (JavaScript):
11147 #
11148 # // ...
11149 #
11150 # var protoToCssColor = function(rgb_color) {
11151 # var redFrac = rgb_color.red || 0.0;
11152 # var greenFrac = rgb_color.green || 0.0;
11153 # var blueFrac = rgb_color.blue || 0.0;
11154 # var red = Math.floor(redFrac * 255);
11155 # var green = Math.floor(greenFrac * 255);
11156 # var blue = Math.floor(blueFrac * 255);
11157 #
11158 # if (!('alpha' in rgb_color)) {
11159 # return rgbToCssColor_(red, green, blue);
11160 # }
11161 #
11162 # var alphaFrac = rgb_color.alpha.value || 0.0;
11163 # var rgbParams = [red, green, blue].join(',');
11164 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11165 # };
11166 #
11167 # var rgbToCssColor_ = function(red, green, blue) {
11168 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11169 # var hexString = rgbNumber.toString(16);
11170 # var missingZeros = 6 - hexString.length;
11171 # var resultBuilder = ['#'];
11172 # for (var i = 0; i < missingZeros; i++) {
11173 # resultBuilder.push('0');
11174 # }
11175 # resultBuilder.push(hexString);
11176 # return resultBuilder.join('');
11177 # };
11178 #
11179 # // ...
11180 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11181 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11182 # the final pixel color is defined by the equation:
11183 #
11184 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11185 #
11186 # This means that a value of 1.0 corresponds to a solid color, whereas
11187 # a value of 0.0 corresponds to a completely transparent color. This
11188 # uses a wrapper message rather than a simple float scalar so that it is
11189 # possible to distinguish between a default value and the value being unset.
11190 # If omitted, this color object is to be rendered as a solid color
11191 # (as if the alpha value had been explicitly given with a value of 1.0).
11192 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11193 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11194 },
11195 "width": 42, # The width of the border, in pixels.
11196 # Deprecated; the width is determined by the "style" field.
11197 "style": "A String", # The style of the border.
11198 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011199 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011200 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011201 },
11202 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
11203 #
11204 # When writing, the new data validation rule will overwrite any prior rule.
11205 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
11206 # If true, "List" conditions will show a dropdown.
11207 "strict": True or False, # True if invalid data should be rejected.
11208 "inputMessage": "A String", # A message to show the user when adding data to the cell.
11209 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
11210 # BooleanConditions are used by conditional formatting,
11211 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011212 "values": [ # The values of the condition. The number of supported values depends
11213 # on the condition type. Some support zero values,
11214 # others one or two values,
11215 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
11216 { # The value of the condition.
11217 "relativeDate": "A String", # A relative date (based on the current date).
11218 # Valid only if the type is
11219 # DATE_BEFORE,
11220 # DATE_AFTER,
11221 # DATE_ON_OR_BEFORE or
11222 # DATE_ON_OR_AFTER.
11223 #
11224 # Relative dates are not supported in data validation.
11225 # They are supported only in conditional formatting and
11226 # conditional filters.
11227 "userEnteredValue": "A String", # A value the condition is based on.
11228 # The value will be parsed as if the user typed into a cell.
11229 # Formulas are supported (and must begin with an `=`).
11230 },
11231 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011232 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011233 },
11234 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011235 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
11236 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011237 # Runs start at specific indexes in the text and continue until the next
11238 # run. Properties of a run will continue unless explicitly changed
11239 # in a subsequent run (and properties of the first run will continue
11240 # the properties of the cell unless explicitly changed).
11241 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011242 # When writing, the new runs will overwrite any prior runs. When writing a
11243 # new user_entered_value, previous runs will be erased.
11244 { # A run of a text format. The format of this run continues until the start
11245 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011246 # When updating, all fields must be set.
11247 "startIndex": 42, # The character index where this run starts.
11248 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
11249 # Absent values indicate that the field isn't specified.
11250 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11251 # for simplicity of conversion to/from color representations in various
11252 # languages over compactness; for example, the fields of this representation
11253 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11254 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11255 # method in iOS; and, with just a little work, it can be easily formatted into
11256 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11257 #
11258 # Example (Java):
11259 #
11260 # import com.google.type.Color;
11261 #
11262 # // ...
11263 # public static java.awt.Color fromProto(Color protocolor) {
11264 # float alpha = protocolor.hasAlpha()
11265 # ? protocolor.getAlpha().getValue()
11266 # : 1.0;
11267 #
11268 # return new java.awt.Color(
11269 # protocolor.getRed(),
11270 # protocolor.getGreen(),
11271 # protocolor.getBlue(),
11272 # alpha);
11273 # }
11274 #
11275 # public static Color toProto(java.awt.Color color) {
11276 # float red = (float) color.getRed();
11277 # float green = (float) color.getGreen();
11278 # float blue = (float) color.getBlue();
11279 # float denominator = 255.0;
11280 # Color.Builder resultBuilder =
11281 # Color
11282 # .newBuilder()
11283 # .setRed(red / denominator)
11284 # .setGreen(green / denominator)
11285 # .setBlue(blue / denominator);
11286 # int alpha = color.getAlpha();
11287 # if (alpha != 255) {
11288 # result.setAlpha(
11289 # FloatValue
11290 # .newBuilder()
11291 # .setValue(((float) alpha) / denominator)
11292 # .build());
11293 # }
11294 # return resultBuilder.build();
11295 # }
11296 # // ...
11297 #
11298 # Example (iOS / Obj-C):
11299 #
11300 # // ...
11301 # static UIColor* fromProto(Color* protocolor) {
11302 # float red = [protocolor red];
11303 # float green = [protocolor green];
11304 # float blue = [protocolor blue];
11305 # FloatValue* alpha_wrapper = [protocolor alpha];
11306 # float alpha = 1.0;
11307 # if (alpha_wrapper != nil) {
11308 # alpha = [alpha_wrapper value];
11309 # }
11310 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11311 # }
11312 #
11313 # static Color* toProto(UIColor* color) {
11314 # CGFloat red, green, blue, alpha;
11315 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11316 # return nil;
11317 # }
11318 # Color* result = [Color alloc] init];
11319 # [result setRed:red];
11320 # [result setGreen:green];
11321 # [result setBlue:blue];
11322 # if (alpha <= 0.9999) {
11323 # [result setAlpha:floatWrapperWithValue(alpha)];
11324 # }
11325 # [result autorelease];
11326 # return result;
11327 # }
11328 # // ...
11329 #
11330 # Example (JavaScript):
11331 #
11332 # // ...
11333 #
11334 # var protoToCssColor = function(rgb_color) {
11335 # var redFrac = rgb_color.red || 0.0;
11336 # var greenFrac = rgb_color.green || 0.0;
11337 # var blueFrac = rgb_color.blue || 0.0;
11338 # var red = Math.floor(redFrac * 255);
11339 # var green = Math.floor(greenFrac * 255);
11340 # var blue = Math.floor(blueFrac * 255);
11341 #
11342 # if (!('alpha' in rgb_color)) {
11343 # return rgbToCssColor_(red, green, blue);
11344 # }
11345 #
11346 # var alphaFrac = rgb_color.alpha.value || 0.0;
11347 # var rgbParams = [red, green, blue].join(',');
11348 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11349 # };
11350 #
11351 # var rgbToCssColor_ = function(red, green, blue) {
11352 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11353 # var hexString = rgbNumber.toString(16);
11354 # var missingZeros = 6 - hexString.length;
11355 # var resultBuilder = ['#'];
11356 # for (var i = 0; i < missingZeros; i++) {
11357 # resultBuilder.push('0');
11358 # }
11359 # resultBuilder.push(hexString);
11360 # return resultBuilder.join('');
11361 # };
11362 #
11363 # // ...
11364 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11365 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11366 # the final pixel color is defined by the equation:
11367 #
11368 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11369 #
11370 # This means that a value of 1.0 corresponds to a solid color, whereas
11371 # a value of 0.0 corresponds to a completely transparent color. This
11372 # uses a wrapper message rather than a simple float scalar so that it is
11373 # possible to distinguish between a default value and the value being unset.
11374 # If omitted, this color object is to be rendered as a solid color
11375 # (as if the alpha value had been explicitly given with a value of 1.0).
11376 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11377 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11378 },
11379 "bold": True or False, # True if the text is bold.
11380 "strikethrough": True or False, # True if the text has a strikethrough.
11381 "fontFamily": "A String", # The font family.
11382 "fontSize": 42, # The size of the font.
11383 "italic": True or False, # True if the text is italicized.
11384 "underline": True or False, # True if the text is underlined.
11385 },
11386 },
11387 ],
11388 },
11389 ],
11390 },
11391 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011392 "fields": "A String", # The fields of CellData that should be updated.
11393 # At least one field must be specified.
11394 # The root is the CellData; 'row.values.' should not be specified.
11395 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011396 },
11397 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11398 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11399 # This differs based on the type and amount of source data.
11400 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11401 # the location that has data and automatically fill that data
11402 # in to the rest of the range.
11403 # All indexes are zero-based.
11404 # Indexes are half open, e.g the start index is inclusive
11405 # and the end index is exclusive -- [start_index, end_index).
11406 # Missing indexes indicate the range is unbounded on that side.
11407 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011408 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011409 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011410 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011411 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011412 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011413 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011414 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011415 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011416 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011417 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011418 # `Sheet1!A:B == sheet_id: 0,
11419 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011420 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011421 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011422 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011423 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011424 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011425 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011426 #
11427 # The start index must always be less than or equal to the end index.
11428 # If the start index equals the end index, then the range is empty.
11429 # Empty ranges are typically not meaningful and are usually rendered in the
11430 # UI as `#REF!`.
11431 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011432 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011433 "sheetId": 42, # The sheet this range is on.
11434 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011435 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011436 },
11437 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11438 # This explicitly lists the source of the autofill and where to
11439 # extend that data.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011440 "fillLength": 42, # The number of rows or columns that data should be filled into.
11441 # Positive numbers expand beyond the last row or last column
11442 # of the source. Negative numbers expand before the first row
11443 # or first column of the source.
11444 "dimension": "A String", # The dimension that data should be filled into.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011445 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11446 # All indexes are zero-based.
11447 # Indexes are half open, e.g the start index is inclusive
11448 # and the end index is exclusive -- [start_index, end_index).
11449 # Missing indexes indicate the range is unbounded on that side.
11450 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011451 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011452 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011453 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011454 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011455 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011456 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011457 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011458 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011459 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011460 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011461 # `Sheet1!A:B == sheet_id: 0,
11462 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011463 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011464 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011465 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011466 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011468 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011469 #
11470 # The start index must always be less than or equal to the end index.
11471 # If the start index equals the end index, then the range is empty.
11472 # Empty ranges are typically not meaningful and are usually rendered in the
11473 # UI as `#REF!`.
11474 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011475 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011476 "sheetId": 42, # The sheet this range is on.
11477 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011478 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011479 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011480 },
11481 },
11482 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11483 "length": 42, # The number of rows or columns to append.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011484 "dimension": "A String", # Whether rows or columns should be appended.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070011485 "sheetId": 42, # The sheet to append rows or columns to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011486 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011487 "updateBanding": { # Updates properties of the supplied banded range. # Updates a banded range
11488 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11489 # The root `bandedRange` is implied and should not be specified.
11490 # A single `"*"` can be used as short-hand for listing every field.
11491 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to update with the new properties.
11492 "range": { # A range on a sheet. # The range over which these properties are applied.
11493 # All indexes are zero-based.
11494 # Indexes are half open, e.g the start index is inclusive
11495 # and the end index is exclusive -- [start_index, end_index).
11496 # Missing indexes indicate the range is unbounded on that side.
11497 #
11498 # For example, if `"Sheet1"` is sheet ID 0, then:
11499 #
11500 # `Sheet1!A1:A1 == sheet_id: 0,
11501 # start_row_index: 0, end_row_index: 1,
11502 # start_column_index: 0, end_column_index: 1`
11503 #
11504 # `Sheet1!A3:B4 == sheet_id: 0,
11505 # start_row_index: 2, end_row_index: 4,
11506 # start_column_index: 0, end_column_index: 2`
11507 #
11508 # `Sheet1!A:B == sheet_id: 0,
11509 # start_column_index: 0, end_column_index: 2`
11510 #
11511 # `Sheet1!A5:B == sheet_id: 0,
11512 # start_row_index: 4,
11513 # start_column_index: 0, end_column_index: 2`
11514 #
11515 # `Sheet1 == sheet_id:0`
11516 #
11517 # The start index must always be less than or equal to the end index.
11518 # If the start index equals the end index, then the range is empty.
11519 # Empty ranges are typically not meaningful and are usually rendered in the
11520 # UI as `#REF!`.
11521 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011522 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011523 "sheetId": 42, # The sheet this range is on.
11524 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011525 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011526 },
11527 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
11528 # by-column basis throughout all the columns in the range. At least one of
11529 # row_properties or column_properties must be specified.
11530 # BandedRange.row_properties and BandedRange.column_properties are
11531 # set, the fill colors are applied to cells according to the following rules:
11532 #
11533 # * header_color and footer_color take priority over band colors.
11534 # * first_band_color takes priority over second_band_color.
11535 # * row_properties takes priority over column_properties.
11536 #
11537 # For example, the first row color takes priority over the first column
11538 # color, but the first column color takes priority over the second row color.
11539 # Similarly, the row header takes priority over the column header in the
11540 # top left cell, but the column header takes priority over the first row
11541 # color if the row header is not set.
11542 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
11543 # for simplicity of conversion to/from color representations in various
11544 # languages over compactness; for example, the fields of this representation
11545 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11546 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11547 # method in iOS; and, with just a little work, it can be easily formatted into
11548 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11549 #
11550 # Example (Java):
11551 #
11552 # import com.google.type.Color;
11553 #
11554 # // ...
11555 # public static java.awt.Color fromProto(Color protocolor) {
11556 # float alpha = protocolor.hasAlpha()
11557 # ? protocolor.getAlpha().getValue()
11558 # : 1.0;
11559 #
11560 # return new java.awt.Color(
11561 # protocolor.getRed(),
11562 # protocolor.getGreen(),
11563 # protocolor.getBlue(),
11564 # alpha);
11565 # }
11566 #
11567 # public static Color toProto(java.awt.Color color) {
11568 # float red = (float) color.getRed();
11569 # float green = (float) color.getGreen();
11570 # float blue = (float) color.getBlue();
11571 # float denominator = 255.0;
11572 # Color.Builder resultBuilder =
11573 # Color
11574 # .newBuilder()
11575 # .setRed(red / denominator)
11576 # .setGreen(green / denominator)
11577 # .setBlue(blue / denominator);
11578 # int alpha = color.getAlpha();
11579 # if (alpha != 255) {
11580 # result.setAlpha(
11581 # FloatValue
11582 # .newBuilder()
11583 # .setValue(((float) alpha) / denominator)
11584 # .build());
11585 # }
11586 # return resultBuilder.build();
11587 # }
11588 # // ...
11589 #
11590 # Example (iOS / Obj-C):
11591 #
11592 # // ...
11593 # static UIColor* fromProto(Color* protocolor) {
11594 # float red = [protocolor red];
11595 # float green = [protocolor green];
11596 # float blue = [protocolor blue];
11597 # FloatValue* alpha_wrapper = [protocolor alpha];
11598 # float alpha = 1.0;
11599 # if (alpha_wrapper != nil) {
11600 # alpha = [alpha_wrapper value];
11601 # }
11602 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11603 # }
11604 #
11605 # static Color* toProto(UIColor* color) {
11606 # CGFloat red, green, blue, alpha;
11607 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11608 # return nil;
11609 # }
11610 # Color* result = [Color alloc] init];
11611 # [result setRed:red];
11612 # [result setGreen:green];
11613 # [result setBlue:blue];
11614 # if (alpha <= 0.9999) {
11615 # [result setAlpha:floatWrapperWithValue(alpha)];
11616 # }
11617 # [result autorelease];
11618 # return result;
11619 # }
11620 # // ...
11621 #
11622 # Example (JavaScript):
11623 #
11624 # // ...
11625 #
11626 # var protoToCssColor = function(rgb_color) {
11627 # var redFrac = rgb_color.red || 0.0;
11628 # var greenFrac = rgb_color.green || 0.0;
11629 # var blueFrac = rgb_color.blue || 0.0;
11630 # var red = Math.floor(redFrac * 255);
11631 # var green = Math.floor(greenFrac * 255);
11632 # var blue = Math.floor(blueFrac * 255);
11633 #
11634 # if (!('alpha' in rgb_color)) {
11635 # return rgbToCssColor_(red, green, blue);
11636 # }
11637 #
11638 # var alphaFrac = rgb_color.alpha.value || 0.0;
11639 # var rgbParams = [red, green, blue].join(',');
11640 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11641 # };
11642 #
11643 # var rgbToCssColor_ = function(red, green, blue) {
11644 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11645 # var hexString = rgbNumber.toString(16);
11646 # var missingZeros = 6 - hexString.length;
11647 # var resultBuilder = ['#'];
11648 # for (var i = 0; i < missingZeros; i++) {
11649 # resultBuilder.push('0');
11650 # }
11651 # resultBuilder.push(hexString);
11652 # return resultBuilder.join('');
11653 # };
11654 #
11655 # // ...
11656 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11657 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11658 # the final pixel color is defined by the equation:
11659 #
11660 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11661 #
11662 # This means that a value of 1.0 corresponds to a solid color, whereas
11663 # a value of 0.0 corresponds to a completely transparent color. This
11664 # uses a wrapper message rather than a simple float scalar so that it is
11665 # possible to distinguish between a default value and the value being unset.
11666 # If omitted, this color object is to be rendered as a solid color
11667 # (as if the alpha value had been explicitly given with a value of 1.0).
11668 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11669 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11670 },
11671 "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
11672 # row or column will be filled with this color and the colors will
11673 # alternate between first_band_color and second_band_color starting
11674 # from the second row or column. Otherwise, the first row or column will be
11675 # filled with first_band_color and the colors will proceed to alternate
11676 # as they normally would.
11677 # for simplicity of conversion to/from color representations in various
11678 # languages over compactness; for example, the fields of this representation
11679 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11680 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11681 # method in iOS; and, with just a little work, it can be easily formatted into
11682 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11683 #
11684 # Example (Java):
11685 #
11686 # import com.google.type.Color;
11687 #
11688 # // ...
11689 # public static java.awt.Color fromProto(Color protocolor) {
11690 # float alpha = protocolor.hasAlpha()
11691 # ? protocolor.getAlpha().getValue()
11692 # : 1.0;
11693 #
11694 # return new java.awt.Color(
11695 # protocolor.getRed(),
11696 # protocolor.getGreen(),
11697 # protocolor.getBlue(),
11698 # alpha);
11699 # }
11700 #
11701 # public static Color toProto(java.awt.Color color) {
11702 # float red = (float) color.getRed();
11703 # float green = (float) color.getGreen();
11704 # float blue = (float) color.getBlue();
11705 # float denominator = 255.0;
11706 # Color.Builder resultBuilder =
11707 # Color
11708 # .newBuilder()
11709 # .setRed(red / denominator)
11710 # .setGreen(green / denominator)
11711 # .setBlue(blue / denominator);
11712 # int alpha = color.getAlpha();
11713 # if (alpha != 255) {
11714 # result.setAlpha(
11715 # FloatValue
11716 # .newBuilder()
11717 # .setValue(((float) alpha) / denominator)
11718 # .build());
11719 # }
11720 # return resultBuilder.build();
11721 # }
11722 # // ...
11723 #
11724 # Example (iOS / Obj-C):
11725 #
11726 # // ...
11727 # static UIColor* fromProto(Color* protocolor) {
11728 # float red = [protocolor red];
11729 # float green = [protocolor green];
11730 # float blue = [protocolor blue];
11731 # FloatValue* alpha_wrapper = [protocolor alpha];
11732 # float alpha = 1.0;
11733 # if (alpha_wrapper != nil) {
11734 # alpha = [alpha_wrapper value];
11735 # }
11736 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11737 # }
11738 #
11739 # static Color* toProto(UIColor* color) {
11740 # CGFloat red, green, blue, alpha;
11741 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11742 # return nil;
11743 # }
11744 # Color* result = [Color alloc] init];
11745 # [result setRed:red];
11746 # [result setGreen:green];
11747 # [result setBlue:blue];
11748 # if (alpha <= 0.9999) {
11749 # [result setAlpha:floatWrapperWithValue(alpha)];
11750 # }
11751 # [result autorelease];
11752 # return result;
11753 # }
11754 # // ...
11755 #
11756 # Example (JavaScript):
11757 #
11758 # // ...
11759 #
11760 # var protoToCssColor = function(rgb_color) {
11761 # var redFrac = rgb_color.red || 0.0;
11762 # var greenFrac = rgb_color.green || 0.0;
11763 # var blueFrac = rgb_color.blue || 0.0;
11764 # var red = Math.floor(redFrac * 255);
11765 # var green = Math.floor(greenFrac * 255);
11766 # var blue = Math.floor(blueFrac * 255);
11767 #
11768 # if (!('alpha' in rgb_color)) {
11769 # return rgbToCssColor_(red, green, blue);
11770 # }
11771 #
11772 # var alphaFrac = rgb_color.alpha.value || 0.0;
11773 # var rgbParams = [red, green, blue].join(',');
11774 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11775 # };
11776 #
11777 # var rgbToCssColor_ = function(red, green, blue) {
11778 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11779 # var hexString = rgbNumber.toString(16);
11780 # var missingZeros = 6 - hexString.length;
11781 # var resultBuilder = ['#'];
11782 # for (var i = 0; i < missingZeros; i++) {
11783 # resultBuilder.push('0');
11784 # }
11785 # resultBuilder.push(hexString);
11786 # return resultBuilder.join('');
11787 # };
11788 #
11789 # // ...
11790 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11791 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11792 # the final pixel color is defined by the equation:
11793 #
11794 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11795 #
11796 # This means that a value of 1.0 corresponds to a solid color, whereas
11797 # a value of 0.0 corresponds to a completely transparent color. This
11798 # uses a wrapper message rather than a simple float scalar so that it is
11799 # possible to distinguish between a default value and the value being unset.
11800 # If omitted, this color object is to be rendered as a solid color
11801 # (as if the alpha value had been explicitly given with a value of 1.0).
11802 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11803 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11804 },
11805 "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
11806 # row or column will be filled with either first_band_color or
11807 # second_band_color, depending on the color of the previous row or
11808 # column.
11809 # for simplicity of conversion to/from color representations in various
11810 # languages over compactness; for example, the fields of this representation
11811 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11812 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11813 # method in iOS; and, with just a little work, it can be easily formatted into
11814 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11815 #
11816 # Example (Java):
11817 #
11818 # import com.google.type.Color;
11819 #
11820 # // ...
11821 # public static java.awt.Color fromProto(Color protocolor) {
11822 # float alpha = protocolor.hasAlpha()
11823 # ? protocolor.getAlpha().getValue()
11824 # : 1.0;
11825 #
11826 # return new java.awt.Color(
11827 # protocolor.getRed(),
11828 # protocolor.getGreen(),
11829 # protocolor.getBlue(),
11830 # alpha);
11831 # }
11832 #
11833 # public static Color toProto(java.awt.Color color) {
11834 # float red = (float) color.getRed();
11835 # float green = (float) color.getGreen();
11836 # float blue = (float) color.getBlue();
11837 # float denominator = 255.0;
11838 # Color.Builder resultBuilder =
11839 # Color
11840 # .newBuilder()
11841 # .setRed(red / denominator)
11842 # .setGreen(green / denominator)
11843 # .setBlue(blue / denominator);
11844 # int alpha = color.getAlpha();
11845 # if (alpha != 255) {
11846 # result.setAlpha(
11847 # FloatValue
11848 # .newBuilder()
11849 # .setValue(((float) alpha) / denominator)
11850 # .build());
11851 # }
11852 # return resultBuilder.build();
11853 # }
11854 # // ...
11855 #
11856 # Example (iOS / Obj-C):
11857 #
11858 # // ...
11859 # static UIColor* fromProto(Color* protocolor) {
11860 # float red = [protocolor red];
11861 # float green = [protocolor green];
11862 # float blue = [protocolor blue];
11863 # FloatValue* alpha_wrapper = [protocolor alpha];
11864 # float alpha = 1.0;
11865 # if (alpha_wrapper != nil) {
11866 # alpha = [alpha_wrapper value];
11867 # }
11868 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11869 # }
11870 #
11871 # static Color* toProto(UIColor* color) {
11872 # CGFloat red, green, blue, alpha;
11873 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11874 # return nil;
11875 # }
11876 # Color* result = [Color alloc] init];
11877 # [result setRed:red];
11878 # [result setGreen:green];
11879 # [result setBlue:blue];
11880 # if (alpha <= 0.9999) {
11881 # [result setAlpha:floatWrapperWithValue(alpha)];
11882 # }
11883 # [result autorelease];
11884 # return result;
11885 # }
11886 # // ...
11887 #
11888 # Example (JavaScript):
11889 #
11890 # // ...
11891 #
11892 # var protoToCssColor = function(rgb_color) {
11893 # var redFrac = rgb_color.red || 0.0;
11894 # var greenFrac = rgb_color.green || 0.0;
11895 # var blueFrac = rgb_color.blue || 0.0;
11896 # var red = Math.floor(redFrac * 255);
11897 # var green = Math.floor(greenFrac * 255);
11898 # var blue = Math.floor(blueFrac * 255);
11899 #
11900 # if (!('alpha' in rgb_color)) {
11901 # return rgbToCssColor_(red, green, blue);
11902 # }
11903 #
11904 # var alphaFrac = rgb_color.alpha.value || 0.0;
11905 # var rgbParams = [red, green, blue].join(',');
11906 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11907 # };
11908 #
11909 # var rgbToCssColor_ = function(red, green, blue) {
11910 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11911 # var hexString = rgbNumber.toString(16);
11912 # var missingZeros = 6 - hexString.length;
11913 # var resultBuilder = ['#'];
11914 # for (var i = 0; i < missingZeros; i++) {
11915 # resultBuilder.push('0');
11916 # }
11917 # resultBuilder.push(hexString);
11918 # return resultBuilder.join('');
11919 # };
11920 #
11921 # // ...
11922 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11923 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11924 # the final pixel color is defined by the equation:
11925 #
11926 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11927 #
11928 # This means that a value of 1.0 corresponds to a solid color, whereas
11929 # a value of 0.0 corresponds to a completely transparent color. This
11930 # uses a wrapper message rather than a simple float scalar so that it is
11931 # possible to distinguish between a default value and the value being unset.
11932 # If omitted, this color object is to be rendered as a solid color
11933 # (as if the alpha value had been explicitly given with a value of 1.0).
11934 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11935 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11936 },
11937 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
11938 # for simplicity of conversion to/from color representations in various
11939 # languages over compactness; for example, the fields of this representation
11940 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11941 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11942 # method in iOS; and, with just a little work, it can be easily formatted into
11943 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11944 #
11945 # Example (Java):
11946 #
11947 # import com.google.type.Color;
11948 #
11949 # // ...
11950 # public static java.awt.Color fromProto(Color protocolor) {
11951 # float alpha = protocolor.hasAlpha()
11952 # ? protocolor.getAlpha().getValue()
11953 # : 1.0;
11954 #
11955 # return new java.awt.Color(
11956 # protocolor.getRed(),
11957 # protocolor.getGreen(),
11958 # protocolor.getBlue(),
11959 # alpha);
11960 # }
11961 #
11962 # public static Color toProto(java.awt.Color color) {
11963 # float red = (float) color.getRed();
11964 # float green = (float) color.getGreen();
11965 # float blue = (float) color.getBlue();
11966 # float denominator = 255.0;
11967 # Color.Builder resultBuilder =
11968 # Color
11969 # .newBuilder()
11970 # .setRed(red / denominator)
11971 # .setGreen(green / denominator)
11972 # .setBlue(blue / denominator);
11973 # int alpha = color.getAlpha();
11974 # if (alpha != 255) {
11975 # result.setAlpha(
11976 # FloatValue
11977 # .newBuilder()
11978 # .setValue(((float) alpha) / denominator)
11979 # .build());
11980 # }
11981 # return resultBuilder.build();
11982 # }
11983 # // ...
11984 #
11985 # Example (iOS / Obj-C):
11986 #
11987 # // ...
11988 # static UIColor* fromProto(Color* protocolor) {
11989 # float red = [protocolor red];
11990 # float green = [protocolor green];
11991 # float blue = [protocolor blue];
11992 # FloatValue* alpha_wrapper = [protocolor alpha];
11993 # float alpha = 1.0;
11994 # if (alpha_wrapper != nil) {
11995 # alpha = [alpha_wrapper value];
11996 # }
11997 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11998 # }
11999 #
12000 # static Color* toProto(UIColor* color) {
12001 # CGFloat red, green, blue, alpha;
12002 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12003 # return nil;
12004 # }
12005 # Color* result = [Color alloc] init];
12006 # [result setRed:red];
12007 # [result setGreen:green];
12008 # [result setBlue:blue];
12009 # if (alpha <= 0.9999) {
12010 # [result setAlpha:floatWrapperWithValue(alpha)];
12011 # }
12012 # [result autorelease];
12013 # return result;
12014 # }
12015 # // ...
12016 #
12017 # Example (JavaScript):
12018 #
12019 # // ...
12020 #
12021 # var protoToCssColor = function(rgb_color) {
12022 # var redFrac = rgb_color.red || 0.0;
12023 # var greenFrac = rgb_color.green || 0.0;
12024 # var blueFrac = rgb_color.blue || 0.0;
12025 # var red = Math.floor(redFrac * 255);
12026 # var green = Math.floor(greenFrac * 255);
12027 # var blue = Math.floor(blueFrac * 255);
12028 #
12029 # if (!('alpha' in rgb_color)) {
12030 # return rgbToCssColor_(red, green, blue);
12031 # }
12032 #
12033 # var alphaFrac = rgb_color.alpha.value || 0.0;
12034 # var rgbParams = [red, green, blue].join(',');
12035 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12036 # };
12037 #
12038 # var rgbToCssColor_ = function(red, green, blue) {
12039 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12040 # var hexString = rgbNumber.toString(16);
12041 # var missingZeros = 6 - hexString.length;
12042 # var resultBuilder = ['#'];
12043 # for (var i = 0; i < missingZeros; i++) {
12044 # resultBuilder.push('0');
12045 # }
12046 # resultBuilder.push(hexString);
12047 # return resultBuilder.join('');
12048 # };
12049 #
12050 # // ...
12051 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12052 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12053 # the final pixel color is defined by the equation:
12054 #
12055 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12056 #
12057 # This means that a value of 1.0 corresponds to a solid color, whereas
12058 # a value of 0.0 corresponds to a completely transparent color. This
12059 # uses a wrapper message rather than a simple float scalar so that it is
12060 # possible to distinguish between a default value and the value being unset.
12061 # If omitted, this color object is to be rendered as a solid color
12062 # (as if the alpha value had been explicitly given with a value of 1.0).
12063 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12064 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12065 },
12066 },
12067 "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
12068 # basis throughout all the rows in the range. At least one of
12069 # row_properties or column_properties must be specified.
12070 # BandedRange.row_properties and BandedRange.column_properties are
12071 # set, the fill colors are applied to cells according to the following rules:
12072 #
12073 # * header_color and footer_color take priority over band colors.
12074 # * first_band_color takes priority over second_band_color.
12075 # * row_properties takes priority over column_properties.
12076 #
12077 # For example, the first row color takes priority over the first column
12078 # color, but the first column color takes priority over the second row color.
12079 # Similarly, the row header takes priority over the column header in the
12080 # top left cell, but the column header takes priority over the first row
12081 # color if the row header is not set.
12082 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
12083 # for simplicity of conversion to/from color representations in various
12084 # languages over compactness; for example, the fields of this representation
12085 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12086 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12087 # method in iOS; and, with just a little work, it can be easily formatted into
12088 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12089 #
12090 # Example (Java):
12091 #
12092 # import com.google.type.Color;
12093 #
12094 # // ...
12095 # public static java.awt.Color fromProto(Color protocolor) {
12096 # float alpha = protocolor.hasAlpha()
12097 # ? protocolor.getAlpha().getValue()
12098 # : 1.0;
12099 #
12100 # return new java.awt.Color(
12101 # protocolor.getRed(),
12102 # protocolor.getGreen(),
12103 # protocolor.getBlue(),
12104 # alpha);
12105 # }
12106 #
12107 # public static Color toProto(java.awt.Color color) {
12108 # float red = (float) color.getRed();
12109 # float green = (float) color.getGreen();
12110 # float blue = (float) color.getBlue();
12111 # float denominator = 255.0;
12112 # Color.Builder resultBuilder =
12113 # Color
12114 # .newBuilder()
12115 # .setRed(red / denominator)
12116 # .setGreen(green / denominator)
12117 # .setBlue(blue / denominator);
12118 # int alpha = color.getAlpha();
12119 # if (alpha != 255) {
12120 # result.setAlpha(
12121 # FloatValue
12122 # .newBuilder()
12123 # .setValue(((float) alpha) / denominator)
12124 # .build());
12125 # }
12126 # return resultBuilder.build();
12127 # }
12128 # // ...
12129 #
12130 # Example (iOS / Obj-C):
12131 #
12132 # // ...
12133 # static UIColor* fromProto(Color* protocolor) {
12134 # float red = [protocolor red];
12135 # float green = [protocolor green];
12136 # float blue = [protocolor blue];
12137 # FloatValue* alpha_wrapper = [protocolor alpha];
12138 # float alpha = 1.0;
12139 # if (alpha_wrapper != nil) {
12140 # alpha = [alpha_wrapper value];
12141 # }
12142 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12143 # }
12144 #
12145 # static Color* toProto(UIColor* color) {
12146 # CGFloat red, green, blue, alpha;
12147 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12148 # return nil;
12149 # }
12150 # Color* result = [Color alloc] init];
12151 # [result setRed:red];
12152 # [result setGreen:green];
12153 # [result setBlue:blue];
12154 # if (alpha <= 0.9999) {
12155 # [result setAlpha:floatWrapperWithValue(alpha)];
12156 # }
12157 # [result autorelease];
12158 # return result;
12159 # }
12160 # // ...
12161 #
12162 # Example (JavaScript):
12163 #
12164 # // ...
12165 #
12166 # var protoToCssColor = function(rgb_color) {
12167 # var redFrac = rgb_color.red || 0.0;
12168 # var greenFrac = rgb_color.green || 0.0;
12169 # var blueFrac = rgb_color.blue || 0.0;
12170 # var red = Math.floor(redFrac * 255);
12171 # var green = Math.floor(greenFrac * 255);
12172 # var blue = Math.floor(blueFrac * 255);
12173 #
12174 # if (!('alpha' in rgb_color)) {
12175 # return rgbToCssColor_(red, green, blue);
12176 # }
12177 #
12178 # var alphaFrac = rgb_color.alpha.value || 0.0;
12179 # var rgbParams = [red, green, blue].join(',');
12180 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12181 # };
12182 #
12183 # var rgbToCssColor_ = function(red, green, blue) {
12184 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12185 # var hexString = rgbNumber.toString(16);
12186 # var missingZeros = 6 - hexString.length;
12187 # var resultBuilder = ['#'];
12188 # for (var i = 0; i < missingZeros; i++) {
12189 # resultBuilder.push('0');
12190 # }
12191 # resultBuilder.push(hexString);
12192 # return resultBuilder.join('');
12193 # };
12194 #
12195 # // ...
12196 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12197 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12198 # the final pixel color is defined by the equation:
12199 #
12200 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12201 #
12202 # This means that a value of 1.0 corresponds to a solid color, whereas
12203 # a value of 0.0 corresponds to a completely transparent color. This
12204 # uses a wrapper message rather than a simple float scalar so that it is
12205 # possible to distinguish between a default value and the value being unset.
12206 # If omitted, this color object is to be rendered as a solid color
12207 # (as if the alpha value had been explicitly given with a value of 1.0).
12208 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12209 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12210 },
12211 "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
12212 # row or column will be filled with this color and the colors will
12213 # alternate between first_band_color and second_band_color starting
12214 # from the second row or column. Otherwise, the first row or column will be
12215 # filled with first_band_color and the colors will proceed to alternate
12216 # as they normally would.
12217 # for simplicity of conversion to/from color representations in various
12218 # languages over compactness; for example, the fields of this representation
12219 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12220 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12221 # method in iOS; and, with just a little work, it can be easily formatted into
12222 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12223 #
12224 # Example (Java):
12225 #
12226 # import com.google.type.Color;
12227 #
12228 # // ...
12229 # public static java.awt.Color fromProto(Color protocolor) {
12230 # float alpha = protocolor.hasAlpha()
12231 # ? protocolor.getAlpha().getValue()
12232 # : 1.0;
12233 #
12234 # return new java.awt.Color(
12235 # protocolor.getRed(),
12236 # protocolor.getGreen(),
12237 # protocolor.getBlue(),
12238 # alpha);
12239 # }
12240 #
12241 # public static Color toProto(java.awt.Color color) {
12242 # float red = (float) color.getRed();
12243 # float green = (float) color.getGreen();
12244 # float blue = (float) color.getBlue();
12245 # float denominator = 255.0;
12246 # Color.Builder resultBuilder =
12247 # Color
12248 # .newBuilder()
12249 # .setRed(red / denominator)
12250 # .setGreen(green / denominator)
12251 # .setBlue(blue / denominator);
12252 # int alpha = color.getAlpha();
12253 # if (alpha != 255) {
12254 # result.setAlpha(
12255 # FloatValue
12256 # .newBuilder()
12257 # .setValue(((float) alpha) / denominator)
12258 # .build());
12259 # }
12260 # return resultBuilder.build();
12261 # }
12262 # // ...
12263 #
12264 # Example (iOS / Obj-C):
12265 #
12266 # // ...
12267 # static UIColor* fromProto(Color* protocolor) {
12268 # float red = [protocolor red];
12269 # float green = [protocolor green];
12270 # float blue = [protocolor blue];
12271 # FloatValue* alpha_wrapper = [protocolor alpha];
12272 # float alpha = 1.0;
12273 # if (alpha_wrapper != nil) {
12274 # alpha = [alpha_wrapper value];
12275 # }
12276 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12277 # }
12278 #
12279 # static Color* toProto(UIColor* color) {
12280 # CGFloat red, green, blue, alpha;
12281 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12282 # return nil;
12283 # }
12284 # Color* result = [Color alloc] init];
12285 # [result setRed:red];
12286 # [result setGreen:green];
12287 # [result setBlue:blue];
12288 # if (alpha <= 0.9999) {
12289 # [result setAlpha:floatWrapperWithValue(alpha)];
12290 # }
12291 # [result autorelease];
12292 # return result;
12293 # }
12294 # // ...
12295 #
12296 # Example (JavaScript):
12297 #
12298 # // ...
12299 #
12300 # var protoToCssColor = function(rgb_color) {
12301 # var redFrac = rgb_color.red || 0.0;
12302 # var greenFrac = rgb_color.green || 0.0;
12303 # var blueFrac = rgb_color.blue || 0.0;
12304 # var red = Math.floor(redFrac * 255);
12305 # var green = Math.floor(greenFrac * 255);
12306 # var blue = Math.floor(blueFrac * 255);
12307 #
12308 # if (!('alpha' in rgb_color)) {
12309 # return rgbToCssColor_(red, green, blue);
12310 # }
12311 #
12312 # var alphaFrac = rgb_color.alpha.value || 0.0;
12313 # var rgbParams = [red, green, blue].join(',');
12314 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12315 # };
12316 #
12317 # var rgbToCssColor_ = function(red, green, blue) {
12318 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12319 # var hexString = rgbNumber.toString(16);
12320 # var missingZeros = 6 - hexString.length;
12321 # var resultBuilder = ['#'];
12322 # for (var i = 0; i < missingZeros; i++) {
12323 # resultBuilder.push('0');
12324 # }
12325 # resultBuilder.push(hexString);
12326 # return resultBuilder.join('');
12327 # };
12328 #
12329 # // ...
12330 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12331 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12332 # the final pixel color is defined by the equation:
12333 #
12334 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12335 #
12336 # This means that a value of 1.0 corresponds to a solid color, whereas
12337 # a value of 0.0 corresponds to a completely transparent color. This
12338 # uses a wrapper message rather than a simple float scalar so that it is
12339 # possible to distinguish between a default value and the value being unset.
12340 # If omitted, this color object is to be rendered as a solid color
12341 # (as if the alpha value had been explicitly given with a value of 1.0).
12342 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12343 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12344 },
12345 "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
12346 # row or column will be filled with either first_band_color or
12347 # second_band_color, depending on the color of the previous row or
12348 # column.
12349 # for simplicity of conversion to/from color representations in various
12350 # languages over compactness; for example, the fields of this representation
12351 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12352 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12353 # method in iOS; and, with just a little work, it can be easily formatted into
12354 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12355 #
12356 # Example (Java):
12357 #
12358 # import com.google.type.Color;
12359 #
12360 # // ...
12361 # public static java.awt.Color fromProto(Color protocolor) {
12362 # float alpha = protocolor.hasAlpha()
12363 # ? protocolor.getAlpha().getValue()
12364 # : 1.0;
12365 #
12366 # return new java.awt.Color(
12367 # protocolor.getRed(),
12368 # protocolor.getGreen(),
12369 # protocolor.getBlue(),
12370 # alpha);
12371 # }
12372 #
12373 # public static Color toProto(java.awt.Color color) {
12374 # float red = (float) color.getRed();
12375 # float green = (float) color.getGreen();
12376 # float blue = (float) color.getBlue();
12377 # float denominator = 255.0;
12378 # Color.Builder resultBuilder =
12379 # Color
12380 # .newBuilder()
12381 # .setRed(red / denominator)
12382 # .setGreen(green / denominator)
12383 # .setBlue(blue / denominator);
12384 # int alpha = color.getAlpha();
12385 # if (alpha != 255) {
12386 # result.setAlpha(
12387 # FloatValue
12388 # .newBuilder()
12389 # .setValue(((float) alpha) / denominator)
12390 # .build());
12391 # }
12392 # return resultBuilder.build();
12393 # }
12394 # // ...
12395 #
12396 # Example (iOS / Obj-C):
12397 #
12398 # // ...
12399 # static UIColor* fromProto(Color* protocolor) {
12400 # float red = [protocolor red];
12401 # float green = [protocolor green];
12402 # float blue = [protocolor blue];
12403 # FloatValue* alpha_wrapper = [protocolor alpha];
12404 # float alpha = 1.0;
12405 # if (alpha_wrapper != nil) {
12406 # alpha = [alpha_wrapper value];
12407 # }
12408 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12409 # }
12410 #
12411 # static Color* toProto(UIColor* color) {
12412 # CGFloat red, green, blue, alpha;
12413 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12414 # return nil;
12415 # }
12416 # Color* result = [Color alloc] init];
12417 # [result setRed:red];
12418 # [result setGreen:green];
12419 # [result setBlue:blue];
12420 # if (alpha <= 0.9999) {
12421 # [result setAlpha:floatWrapperWithValue(alpha)];
12422 # }
12423 # [result autorelease];
12424 # return result;
12425 # }
12426 # // ...
12427 #
12428 # Example (JavaScript):
12429 #
12430 # // ...
12431 #
12432 # var protoToCssColor = function(rgb_color) {
12433 # var redFrac = rgb_color.red || 0.0;
12434 # var greenFrac = rgb_color.green || 0.0;
12435 # var blueFrac = rgb_color.blue || 0.0;
12436 # var red = Math.floor(redFrac * 255);
12437 # var green = Math.floor(greenFrac * 255);
12438 # var blue = Math.floor(blueFrac * 255);
12439 #
12440 # if (!('alpha' in rgb_color)) {
12441 # return rgbToCssColor_(red, green, blue);
12442 # }
12443 #
12444 # var alphaFrac = rgb_color.alpha.value || 0.0;
12445 # var rgbParams = [red, green, blue].join(',');
12446 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12447 # };
12448 #
12449 # var rgbToCssColor_ = function(red, green, blue) {
12450 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12451 # var hexString = rgbNumber.toString(16);
12452 # var missingZeros = 6 - hexString.length;
12453 # var resultBuilder = ['#'];
12454 # for (var i = 0; i < missingZeros; i++) {
12455 # resultBuilder.push('0');
12456 # }
12457 # resultBuilder.push(hexString);
12458 # return resultBuilder.join('');
12459 # };
12460 #
12461 # // ...
12462 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12463 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12464 # the final pixel color is defined by the equation:
12465 #
12466 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12467 #
12468 # This means that a value of 1.0 corresponds to a solid color, whereas
12469 # a value of 0.0 corresponds to a completely transparent color. This
12470 # uses a wrapper message rather than a simple float scalar so that it is
12471 # possible to distinguish between a default value and the value being unset.
12472 # If omitted, this color object is to be rendered as a solid color
12473 # (as if the alpha value had been explicitly given with a value of 1.0).
12474 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12475 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12476 },
12477 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
12478 # for simplicity of conversion to/from color representations in various
12479 # languages over compactness; for example, the fields of this representation
12480 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12481 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12482 # method in iOS; and, with just a little work, it can be easily formatted into
12483 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12484 #
12485 # Example (Java):
12486 #
12487 # import com.google.type.Color;
12488 #
12489 # // ...
12490 # public static java.awt.Color fromProto(Color protocolor) {
12491 # float alpha = protocolor.hasAlpha()
12492 # ? protocolor.getAlpha().getValue()
12493 # : 1.0;
12494 #
12495 # return new java.awt.Color(
12496 # protocolor.getRed(),
12497 # protocolor.getGreen(),
12498 # protocolor.getBlue(),
12499 # alpha);
12500 # }
12501 #
12502 # public static Color toProto(java.awt.Color color) {
12503 # float red = (float) color.getRed();
12504 # float green = (float) color.getGreen();
12505 # float blue = (float) color.getBlue();
12506 # float denominator = 255.0;
12507 # Color.Builder resultBuilder =
12508 # Color
12509 # .newBuilder()
12510 # .setRed(red / denominator)
12511 # .setGreen(green / denominator)
12512 # .setBlue(blue / denominator);
12513 # int alpha = color.getAlpha();
12514 # if (alpha != 255) {
12515 # result.setAlpha(
12516 # FloatValue
12517 # .newBuilder()
12518 # .setValue(((float) alpha) / denominator)
12519 # .build());
12520 # }
12521 # return resultBuilder.build();
12522 # }
12523 # // ...
12524 #
12525 # Example (iOS / Obj-C):
12526 #
12527 # // ...
12528 # static UIColor* fromProto(Color* protocolor) {
12529 # float red = [protocolor red];
12530 # float green = [protocolor green];
12531 # float blue = [protocolor blue];
12532 # FloatValue* alpha_wrapper = [protocolor alpha];
12533 # float alpha = 1.0;
12534 # if (alpha_wrapper != nil) {
12535 # alpha = [alpha_wrapper value];
12536 # }
12537 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12538 # }
12539 #
12540 # static Color* toProto(UIColor* color) {
12541 # CGFloat red, green, blue, alpha;
12542 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12543 # return nil;
12544 # }
12545 # Color* result = [Color alloc] init];
12546 # [result setRed:red];
12547 # [result setGreen:green];
12548 # [result setBlue:blue];
12549 # if (alpha <= 0.9999) {
12550 # [result setAlpha:floatWrapperWithValue(alpha)];
12551 # }
12552 # [result autorelease];
12553 # return result;
12554 # }
12555 # // ...
12556 #
12557 # Example (JavaScript):
12558 #
12559 # // ...
12560 #
12561 # var protoToCssColor = function(rgb_color) {
12562 # var redFrac = rgb_color.red || 0.0;
12563 # var greenFrac = rgb_color.green || 0.0;
12564 # var blueFrac = rgb_color.blue || 0.0;
12565 # var red = Math.floor(redFrac * 255);
12566 # var green = Math.floor(greenFrac * 255);
12567 # var blue = Math.floor(blueFrac * 255);
12568 #
12569 # if (!('alpha' in rgb_color)) {
12570 # return rgbToCssColor_(red, green, blue);
12571 # }
12572 #
12573 # var alphaFrac = rgb_color.alpha.value || 0.0;
12574 # var rgbParams = [red, green, blue].join(',');
12575 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12576 # };
12577 #
12578 # var rgbToCssColor_ = function(red, green, blue) {
12579 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12580 # var hexString = rgbNumber.toString(16);
12581 # var missingZeros = 6 - hexString.length;
12582 # var resultBuilder = ['#'];
12583 # for (var i = 0; i < missingZeros; i++) {
12584 # resultBuilder.push('0');
12585 # }
12586 # resultBuilder.push(hexString);
12587 # return resultBuilder.join('');
12588 # };
12589 #
12590 # // ...
12591 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12592 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12593 # the final pixel color is defined by the equation:
12594 #
12595 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12596 #
12597 # This means that a value of 1.0 corresponds to a solid color, whereas
12598 # a value of 0.0 corresponds to a completely transparent color. This
12599 # uses a wrapper message rather than a simple float scalar so that it is
12600 # possible to distinguish between a default value and the value being unset.
12601 # If omitted, this color object is to be rendered as a solid color
12602 # (as if the alpha value had been explicitly given with a value of 1.0).
12603 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12604 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12605 },
12606 },
12607 "bandedRangeId": 42, # The id of the banded range.
12608 },
12609 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012610 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
12611 # of the cells in that dimension.
12612 # of the cells in that dimension.
12613 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
12614 # Only COLUMNS are supported.
12615 # All indexes are zero-based.
12616 # Indexes are half open: the start index is inclusive
12617 # and the end index is exclusive.
12618 # Missing indexes indicate the range is unbounded on that side.
12619 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12620 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12621 "sheetId": 42, # The sheet this span is on.
12622 "dimension": "A String", # The dimension of the span.
12623 },
12624 },
12625 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012626 "fields": "A String", # The fields that should be updated. At least one field must be specified.
12627 # The root `properties` is implied and should not be specified.
12628 # A single `"*"` can be used as short-hand for listing every field.
12629 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
12630 # All indexes are zero-based.
12631 # Indexes are half open: the start index is inclusive
12632 # and the end index is exclusive.
12633 # Missing indexes indicate the range is unbounded on that side.
12634 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12635 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12636 "sheetId": 42, # The sheet this span is on.
12637 "dimension": "A String", # The dimension of the span.
12638 },
12639 "properties": { # Properties about a dimension. # Properties to update.
12640 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
12641 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
12642 "hiddenByFilter": True or False, # True if this dimension is being filtered.
12643 # This field is read-only.
12644 },
12645 },
12646 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
12647 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
12648 # If the range spans multiple merges, all will be unmerged.
12649 # The range must not partially span any merge.
12650 # All indexes are zero-based.
12651 # Indexes are half open, e.g the start index is inclusive
12652 # and the end index is exclusive -- [start_index, end_index).
12653 # Missing indexes indicate the range is unbounded on that side.
12654 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012655 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012656 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012657 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012658 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012659 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012660 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012661 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012662 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012663 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012664 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012665 # `Sheet1!A:B == sheet_id: 0,
12666 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012667 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012668 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012669 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012670 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012671 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012672 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012673 #
12674 # The start index must always be less than or equal to the end index.
12675 # If the start index equals the end index, then the range is empty.
12676 # Empty ranges are typically not meaningful and are usually rendered in the
12677 # UI as `#REF!`.
12678 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012679 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012680 "sheetId": 42, # The sheet this range is on.
12681 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012682 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012683 },
12684 },
12685 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
12686 # To clear validation in a range, call this with no rule specified.
12687 "range": { # A range on a sheet. # The range the data validation rule should apply to.
12688 # All indexes are zero-based.
12689 # Indexes are half open, e.g the start index is inclusive
12690 # and the end index is exclusive -- [start_index, end_index).
12691 # Missing indexes indicate the range is unbounded on that side.
12692 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012693 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012694 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012695 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012696 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012697 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012698 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012699 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012700 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012701 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012702 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012703 # `Sheet1!A:B == sheet_id: 0,
12704 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012705 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012706 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012707 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012708 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012709 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012710 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012711 #
12712 # The start index must always be less than or equal to the end index.
12713 # If the start index equals the end index, then the range is empty.
12714 # Empty ranges are typically not meaningful and are usually rendered in the
12715 # UI as `#REF!`.
12716 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012717 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012718 "sheetId": 42, # The sheet this range is on.
12719 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012720 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012721 },
12722 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
12723 # or empty to clear the data validation in the range.
12724 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
12725 # If true, "List" conditions will show a dropdown.
12726 "strict": True or False, # True if invalid data should be rejected.
12727 "inputMessage": "A String", # A message to show the user when adding data to the cell.
12728 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
12729 # BooleanConditions are used by conditional formatting,
12730 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012731 "values": [ # The values of the condition. The number of supported values depends
12732 # on the condition type. Some support zero values,
12733 # others one or two values,
12734 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12735 { # The value of the condition.
12736 "relativeDate": "A String", # A relative date (based on the current date).
12737 # Valid only if the type is
12738 # DATE_BEFORE,
12739 # DATE_AFTER,
12740 # DATE_ON_OR_BEFORE or
12741 # DATE_ON_OR_AFTER.
12742 #
12743 # Relative dates are not supported in data validation.
12744 # They are supported only in conditional formatting and
12745 # conditional filters.
12746 "userEnteredValue": "A String", # A value the condition is based on.
12747 # The value will be parsed as if the user typed into a cell.
12748 # Formulas are supported (and must begin with an `=`).
12749 },
12750 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012751 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012752 },
12753 },
12754 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012755 "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.
12756 "range": { # A range on a sheet. # The range of cells to delete.
12757 # All indexes are zero-based.
12758 # Indexes are half open, e.g the start index is inclusive
12759 # and the end index is exclusive -- [start_index, end_index).
12760 # Missing indexes indicate the range is unbounded on that side.
12761 #
12762 # For example, if `"Sheet1"` is sheet ID 0, then:
12763 #
12764 # `Sheet1!A1:A1 == sheet_id: 0,
12765 # start_row_index: 0, end_row_index: 1,
12766 # start_column_index: 0, end_column_index: 1`
12767 #
12768 # `Sheet1!A3:B4 == sheet_id: 0,
12769 # start_row_index: 2, end_row_index: 4,
12770 # start_column_index: 0, end_column_index: 2`
12771 #
12772 # `Sheet1!A:B == sheet_id: 0,
12773 # start_column_index: 0, end_column_index: 2`
12774 #
12775 # `Sheet1!A5:B == sheet_id: 0,
12776 # start_row_index: 4,
12777 # start_column_index: 0, end_column_index: 2`
12778 #
12779 # `Sheet1 == sheet_id:0`
12780 #
12781 # The start index must always be less than or equal to the end index.
12782 # If the start index equals the end index, then the range is empty.
12783 # Empty ranges are typically not meaningful and are usually rendered in the
12784 # UI as `#REF!`.
12785 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12786 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12787 "sheetId": 42, # The sheet this range is on.
12788 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12789 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12790 },
12791 "shiftDimension": "A String", # The dimension from which deleted cells will be replaced with.
12792 # If ROWS, existing cells will be shifted upward to
12793 # replace the deleted cells. If COLUMNS, existing cells
12794 # will be shifted left to replace the deleted cells.
12795 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012796 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
12797 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
12798 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070012799 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
12800 # based on a delimiter in each cell.
12801 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
12802 # All indexes are zero-based.
12803 # Indexes are half open, e.g the start index is inclusive
12804 # and the end index is exclusive -- [start_index, end_index).
12805 # Missing indexes indicate the range is unbounded on that side.
12806 #
12807 # For example, if `"Sheet1"` is sheet ID 0, then:
12808 #
12809 # `Sheet1!A1:A1 == sheet_id: 0,
12810 # start_row_index: 0, end_row_index: 1,
12811 # start_column_index: 0, end_column_index: 1`
12812 #
12813 # `Sheet1!A3:B4 == sheet_id: 0,
12814 # start_row_index: 2, end_row_index: 4,
12815 # start_column_index: 0, end_column_index: 2`
12816 #
12817 # `Sheet1!A:B == sheet_id: 0,
12818 # start_column_index: 0, end_column_index: 2`
12819 #
12820 # `Sheet1!A5:B == sheet_id: 0,
12821 # start_row_index: 4,
12822 # start_column_index: 0, end_column_index: 2`
12823 #
12824 # `Sheet1 == sheet_id:0`
12825 #
12826 # The start index must always be less than or equal to the end index.
12827 # If the start index equals the end index, then the range is empty.
12828 # Empty ranges are typically not meaningful and are usually rendered in the
12829 # UI as `#REF!`.
12830 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12831 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12832 "sheetId": 42, # The sheet this range is on.
12833 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12834 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012835 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070012836 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
12837 # CUSTOM.
12838 "delimiterType": "A String", # The delimiter type to use.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012839 },
12840 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
12841 # (This does not move or resize a chart. To move or resize a chart, use
12842 # UpdateEmbeddedObjectPositionRequest.)
12843 "chartId": 42, # The ID of the chart to update.
12844 "spec": { # The specifications of a chart. # The specification to apply to the chart.
12845 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012846 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
12847 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
12848 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12849 "sources": [ # The ranges of data for a series or domain.
12850 # Exactly one dimension must have a length of 1,
12851 # and all sources in the list must have the same dimension
12852 # with length 1.
12853 # The domain (if it exists) & all series must have the same number
12854 # of source ranges. If using more than one source range, then the source
12855 # range at a given offset must be contiguous across the domain and series.
12856 #
12857 # For example, these are valid configurations:
12858 #
12859 # domain sources: A1:A5
12860 # series1 sources: B1:B5
12861 # series2 sources: D6:D10
12862 #
12863 # domain sources: A1:A5, C10:C12
12864 # series1 sources: B1:B5, D10:D12
12865 # series2 sources: C1:C5, E10:E12
12866 { # A range on a sheet.
12867 # All indexes are zero-based.
12868 # Indexes are half open, e.g the start index is inclusive
12869 # and the end index is exclusive -- [start_index, end_index).
12870 # Missing indexes indicate the range is unbounded on that side.
12871 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012872 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012873 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012874 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012875 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012876 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012877 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012878 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012879 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012880 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012881 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012882 # `Sheet1!A:B == sheet_id: 0,
12883 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012884 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012885 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012886 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012887 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012888 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012889 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012890 #
12891 # The start index must always be less than or equal to the end index.
12892 # If the start index equals the end index, then the range is empty.
12893 # Empty ranges are typically not meaningful and are usually rendered in the
12894 # UI as `#REF!`.
12895 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012896 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012897 "sheetId": 42, # The sheet this range is on.
12898 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012899 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012900 },
12901 ],
12902 },
12903 },
12904 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
12905 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12906 "sources": [ # The ranges of data for a series or domain.
12907 # Exactly one dimension must have a length of 1,
12908 # and all sources in the list must have the same dimension
12909 # with length 1.
12910 # The domain (if it exists) & all series must have the same number
12911 # of source ranges. If using more than one source range, then the source
12912 # range at a given offset must be contiguous across the domain and series.
12913 #
12914 # For example, these are valid configurations:
12915 #
12916 # domain sources: A1:A5
12917 # series1 sources: B1:B5
12918 # series2 sources: D6:D10
12919 #
12920 # domain sources: A1:A5, C10:C12
12921 # series1 sources: B1:B5, D10:D12
12922 # series2 sources: C1:C5, E10:E12
12923 { # A range on a sheet.
12924 # All indexes are zero-based.
12925 # Indexes are half open, e.g the start index is inclusive
12926 # and the end index is exclusive -- [start_index, end_index).
12927 # Missing indexes indicate the range is unbounded on that side.
12928 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012929 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012930 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012931 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012932 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012933 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012934 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012935 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012936 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012937 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012938 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012939 # `Sheet1!A:B == sheet_id: 0,
12940 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012941 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012942 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012943 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012944 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012945 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012946 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012947 #
12948 # The start index must always be less than or equal to the end index.
12949 # If the start index equals the end index, then the range is empty.
12950 # Empty ranges are typically not meaningful and are usually rendered in the
12951 # UI as `#REF!`.
12952 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012953 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012954 "sheetId": 42, # The sheet this range is on.
12955 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012956 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012957 },
12958 ],
12959 },
12960 },
12961 "threeDimensional": True or False, # True if the pie is three dimensional.
12962 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
12963 "pieHole": 3.14, # The size of the hole in the pie chart.
12964 },
12965 "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 -070012966 # See BasicChartType for the list of all
12967 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012968 # of charts this supports.
12969 "headerCount": 42, # The number of rows or columns in the data that are "headers".
12970 # If not set, Google Sheets will guess how many rows are headers based
12971 # on the data.
12972 #
12973 # (Note that BasicChartAxis.title may override the axis title
12974 # inferred from the header values.)
12975 "series": [ # The data this chart is visualizing.
12976 { # A single series of data in a chart.
12977 # For example, if charting stock prices over time, multiple series may exist,
12978 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
12979 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
12980 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12981 "sources": [ # The ranges of data for a series or domain.
12982 # Exactly one dimension must have a length of 1,
12983 # and all sources in the list must have the same dimension
12984 # with length 1.
12985 # The domain (if it exists) & all series must have the same number
12986 # of source ranges. If using more than one source range, then the source
12987 # range at a given offset must be contiguous across the domain and series.
12988 #
12989 # For example, these are valid configurations:
12990 #
12991 # domain sources: A1:A5
12992 # series1 sources: B1:B5
12993 # series2 sources: D6:D10
12994 #
12995 # domain sources: A1:A5, C10:C12
12996 # series1 sources: B1:B5, D10:D12
12997 # series2 sources: C1:C5, E10:E12
12998 { # A range on a sheet.
12999 # All indexes are zero-based.
13000 # Indexes are half open, e.g the start index is inclusive
13001 # and the end index is exclusive -- [start_index, end_index).
13002 # Missing indexes indicate the range is unbounded on that side.
13003 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013004 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013006 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013007 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013008 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013009 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013010 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013011 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013012 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013013 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013014 # `Sheet1!A:B == sheet_id: 0,
13015 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013016 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013017 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013018 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013019 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013020 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013021 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013022 #
13023 # The start index must always be less than or equal to the end index.
13024 # If the start index equals the end index, then the range is empty.
13025 # Empty ranges are typically not meaningful and are usually rendered in the
13026 # UI as `#REF!`.
13027 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013028 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013029 "sheetId": 42, # The sheet this range is on.
13030 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013031 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013032 },
13033 ],
13034 },
13035 },
13036 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
13037 # For example, if charting stocks over time, the "Volume" series
13038 # may want to be pinned to the right with the prices pinned to the left,
13039 # because the scale of trading volume is different than the scale of
13040 # prices.
13041 # It is an error to specify an axis that isn't a valid minor axis
13042 # for the chart's type.
13043 "type": "A String", # The type of this series. Valid only if the
13044 # chartType is
13045 # COMBO.
13046 # Different types will change the way the series is visualized.
13047 # Only LINE, AREA,
13048 # and COLUMN are supported.
13049 },
13050 ],
13051 "legendPosition": "A String", # The position of the chart legend.
13052 "domains": [ # The domain of data this is charting.
13053 # Only a single domain is currently supported.
13054 { # The domain of a chart.
13055 # For example, if charting stock prices over time, this would be the date.
13056 "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 -070013057 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013058 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13059 "sources": [ # The ranges of data for a series or domain.
13060 # Exactly one dimension must have a length of 1,
13061 # and all sources in the list must have the same dimension
13062 # with length 1.
13063 # The domain (if it exists) & all series must have the same number
13064 # of source ranges. If using more than one source range, then the source
13065 # range at a given offset must be contiguous across the domain and series.
13066 #
13067 # For example, these are valid configurations:
13068 #
13069 # domain sources: A1:A5
13070 # series1 sources: B1:B5
13071 # series2 sources: D6:D10
13072 #
13073 # domain sources: A1:A5, C10:C12
13074 # series1 sources: B1:B5, D10:D12
13075 # series2 sources: C1:C5, E10:E12
13076 { # A range on a sheet.
13077 # All indexes are zero-based.
13078 # Indexes are half open, e.g the start index is inclusive
13079 # and the end index is exclusive -- [start_index, end_index).
13080 # Missing indexes indicate the range is unbounded on that side.
13081 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013082 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013083 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013084 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013085 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013086 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013087 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013088 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013089 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013090 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013091 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013092 # `Sheet1!A:B == sheet_id: 0,
13093 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013094 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013095 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013096 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013097 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013098 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013099 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013100 #
13101 # The start index must always be less than or equal to the end index.
13102 # If the start index equals the end index, then the range is empty.
13103 # Empty ranges are typically not meaningful and are usually rendered in the
13104 # UI as `#REF!`.
13105 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013106 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013107 "sheetId": 42, # The sheet this range is on.
13108 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013109 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013110 },
13111 ],
13112 },
13113 },
13114 },
13115 ],
13116 "chartType": "A String", # The type of the chart.
13117 "axis": [ # The axis on the chart.
13118 { # An axis of the chart.
13119 # A chart may not have more than one axis per
13120 # axis position.
13121 "position": "A String", # The position of this axis.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070013122 "title": "A String", # The title of this axis. If set, this overrides any title inferred
13123 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013124 "format": { # The format of a run of text in a cell. # The format of the title.
13125 # Only valid if the axis is not associated with the domain.
13126 # Absent values indicate that the field isn't specified.
13127 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
13128 # for simplicity of conversion to/from color representations in various
13129 # languages over compactness; for example, the fields of this representation
13130 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13131 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13132 # method in iOS; and, with just a little work, it can be easily formatted into
13133 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13134 #
13135 # Example (Java):
13136 #
13137 # import com.google.type.Color;
13138 #
13139 # // ...
13140 # public static java.awt.Color fromProto(Color protocolor) {
13141 # float alpha = protocolor.hasAlpha()
13142 # ? protocolor.getAlpha().getValue()
13143 # : 1.0;
13144 #
13145 # return new java.awt.Color(
13146 # protocolor.getRed(),
13147 # protocolor.getGreen(),
13148 # protocolor.getBlue(),
13149 # alpha);
13150 # }
13151 #
13152 # public static Color toProto(java.awt.Color color) {
13153 # float red = (float) color.getRed();
13154 # float green = (float) color.getGreen();
13155 # float blue = (float) color.getBlue();
13156 # float denominator = 255.0;
13157 # Color.Builder resultBuilder =
13158 # Color
13159 # .newBuilder()
13160 # .setRed(red / denominator)
13161 # .setGreen(green / denominator)
13162 # .setBlue(blue / denominator);
13163 # int alpha = color.getAlpha();
13164 # if (alpha != 255) {
13165 # result.setAlpha(
13166 # FloatValue
13167 # .newBuilder()
13168 # .setValue(((float) alpha) / denominator)
13169 # .build());
13170 # }
13171 # return resultBuilder.build();
13172 # }
13173 # // ...
13174 #
13175 # Example (iOS / Obj-C):
13176 #
13177 # // ...
13178 # static UIColor* fromProto(Color* protocolor) {
13179 # float red = [protocolor red];
13180 # float green = [protocolor green];
13181 # float blue = [protocolor blue];
13182 # FloatValue* alpha_wrapper = [protocolor alpha];
13183 # float alpha = 1.0;
13184 # if (alpha_wrapper != nil) {
13185 # alpha = [alpha_wrapper value];
13186 # }
13187 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13188 # }
13189 #
13190 # static Color* toProto(UIColor* color) {
13191 # CGFloat red, green, blue, alpha;
13192 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13193 # return nil;
13194 # }
13195 # Color* result = [Color alloc] init];
13196 # [result setRed:red];
13197 # [result setGreen:green];
13198 # [result setBlue:blue];
13199 # if (alpha <= 0.9999) {
13200 # [result setAlpha:floatWrapperWithValue(alpha)];
13201 # }
13202 # [result autorelease];
13203 # return result;
13204 # }
13205 # // ...
13206 #
13207 # Example (JavaScript):
13208 #
13209 # // ...
13210 #
13211 # var protoToCssColor = function(rgb_color) {
13212 # var redFrac = rgb_color.red || 0.0;
13213 # var greenFrac = rgb_color.green || 0.0;
13214 # var blueFrac = rgb_color.blue || 0.0;
13215 # var red = Math.floor(redFrac * 255);
13216 # var green = Math.floor(greenFrac * 255);
13217 # var blue = Math.floor(blueFrac * 255);
13218 #
13219 # if (!('alpha' in rgb_color)) {
13220 # return rgbToCssColor_(red, green, blue);
13221 # }
13222 #
13223 # var alphaFrac = rgb_color.alpha.value || 0.0;
13224 # var rgbParams = [red, green, blue].join(',');
13225 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13226 # };
13227 #
13228 # var rgbToCssColor_ = function(red, green, blue) {
13229 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13230 # var hexString = rgbNumber.toString(16);
13231 # var missingZeros = 6 - hexString.length;
13232 # var resultBuilder = ['#'];
13233 # for (var i = 0; i < missingZeros; i++) {
13234 # resultBuilder.push('0');
13235 # }
13236 # resultBuilder.push(hexString);
13237 # return resultBuilder.join('');
13238 # };
13239 #
13240 # // ...
13241 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13242 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13243 # the final pixel color is defined by the equation:
13244 #
13245 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13246 #
13247 # This means that a value of 1.0 corresponds to a solid color, whereas
13248 # a value of 0.0 corresponds to a completely transparent color. This
13249 # uses a wrapper message rather than a simple float scalar so that it is
13250 # possible to distinguish between a default value and the value being unset.
13251 # If omitted, this color object is to be rendered as a solid color
13252 # (as if the alpha value had been explicitly given with a value of 1.0).
13253 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13254 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13255 },
13256 "bold": True or False, # True if the text is bold.
13257 "strikethrough": True or False, # True if the text has a strikethrough.
13258 "fontFamily": "A String", # The font family.
13259 "fontSize": 42, # The size of the font.
13260 "italic": True or False, # True if the text is italicized.
13261 "underline": True or False, # True if the text is underlined.
13262 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013263 },
13264 ],
13265 },
13266 "title": "A String", # The title of the chart.
13267 },
13268 },
13269 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
13270 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
13271 # All indexes are zero-based.
13272 # Indexes are half open: the start index is inclusive
13273 # and the end index is exclusive.
13274 # Missing indexes indicate the range is unbounded on that side.
13275 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13276 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13277 "sheetId": 42, # The sheet this span is on.
13278 "dimension": "A String", # The dimension of the span.
13279 },
13280 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
13281 # based on the coordinates *before* the source data is removed
13282 # from the grid. Existing data will be shifted down or right
13283 # (depending on the dimension) to make room for the moved dimensions.
13284 # The source dimensions are removed from the grid, so the
13285 # the data may end up in a different index than specified.
13286 #
13287 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013288 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
13289 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013290 # (the zero-based index of row 5).
13291 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
13292 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070013293 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
13294 "namedRange": { # A named range. # The named range to add. The namedRangeId
13295 # field is optional; if one is not set, an id will be randomly generated. (It
13296 # is an error to specify the ID of a range that already exists.)
13297 "namedRangeId": "A String", # The ID of the named range.
13298 "range": { # A range on a sheet. # The range this represents.
13299 # All indexes are zero-based.
13300 # Indexes are half open, e.g the start index is inclusive
13301 # and the end index is exclusive -- [start_index, end_index).
13302 # Missing indexes indicate the range is unbounded on that side.
13303 #
13304 # For example, if `"Sheet1"` is sheet ID 0, then:
13305 #
13306 # `Sheet1!A1:A1 == sheet_id: 0,
13307 # start_row_index: 0, end_row_index: 1,
13308 # start_column_index: 0, end_column_index: 1`
13309 #
13310 # `Sheet1!A3:B4 == sheet_id: 0,
13311 # start_row_index: 2, end_row_index: 4,
13312 # start_column_index: 0, end_column_index: 2`
13313 #
13314 # `Sheet1!A:B == sheet_id: 0,
13315 # start_column_index: 0, end_column_index: 2`
13316 #
13317 # `Sheet1!A5:B == sheet_id: 0,
13318 # start_row_index: 4,
13319 # start_column_index: 0, end_column_index: 2`
13320 #
13321 # `Sheet1 == sheet_id:0`
13322 #
13323 # The start index must always be less than or equal to the end index.
13324 # If the start index equals the end index, then the range is empty.
13325 # Empty ranges are typically not meaningful and are usually rendered in the
13326 # UI as `#REF!`.
13327 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
13328 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
13329 "sheetId": 42, # The sheet this range is on.
13330 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
13331 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
13332 },
13333 "name": "A String", # The name of the named range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013334 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013335 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013336 "addBanding": { # Adds a new banded range to the spreadsheet. # Adds a new banded range
13337 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to add. The bandedRangeId
13338 # field is optional; if one is not set, an id will be randomly generated. (It
13339 # is an error to specify the ID of a range that already exists.)
13340 "range": { # A range on a sheet. # The range over which these properties are applied.
13341 # All indexes are zero-based.
13342 # Indexes are half open, e.g the start index is inclusive
13343 # and the end index is exclusive -- [start_index, end_index).
13344 # Missing indexes indicate the range is unbounded on that side.
13345 #
13346 # For example, if `"Sheet1"` is sheet ID 0, then:
13347 #
13348 # `Sheet1!A1:A1 == sheet_id: 0,
13349 # start_row_index: 0, end_row_index: 1,
13350 # start_column_index: 0, end_column_index: 1`
13351 #
13352 # `Sheet1!A3:B4 == sheet_id: 0,
13353 # start_row_index: 2, end_row_index: 4,
13354 # start_column_index: 0, end_column_index: 2`
13355 #
13356 # `Sheet1!A:B == sheet_id: 0,
13357 # start_column_index: 0, end_column_index: 2`
13358 #
13359 # `Sheet1!A5:B == sheet_id: 0,
13360 # start_row_index: 4,
13361 # start_column_index: 0, end_column_index: 2`
13362 #
13363 # `Sheet1 == sheet_id:0`
13364 #
13365 # The start index must always be less than or equal to the end index.
13366 # If the start index equals the end index, then the range is empty.
13367 # Empty ranges are typically not meaningful and are usually rendered in the
13368 # UI as `#REF!`.
13369 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013370 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013371 "sheetId": 42, # The sheet this range is on.
13372 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013373 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013374 },
13375 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
13376 # by-column basis throughout all the columns in the range. At least one of
13377 # row_properties or column_properties must be specified.
13378 # BandedRange.row_properties and BandedRange.column_properties are
13379 # set, the fill colors are applied to cells according to the following rules:
13380 #
13381 # * header_color and footer_color take priority over band colors.
13382 # * first_band_color takes priority over second_band_color.
13383 # * row_properties takes priority over column_properties.
13384 #
13385 # For example, the first row color takes priority over the first column
13386 # color, but the first column color takes priority over the second row color.
13387 # Similarly, the row header takes priority over the column header in the
13388 # top left cell, but the column header takes priority over the first row
13389 # color if the row header is not set.
13390 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13391 # for simplicity of conversion to/from color representations in various
13392 # languages over compactness; for example, the fields of this representation
13393 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13394 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13395 # method in iOS; and, with just a little work, it can be easily formatted into
13396 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13397 #
13398 # Example (Java):
13399 #
13400 # import com.google.type.Color;
13401 #
13402 # // ...
13403 # public static java.awt.Color fromProto(Color protocolor) {
13404 # float alpha = protocolor.hasAlpha()
13405 # ? protocolor.getAlpha().getValue()
13406 # : 1.0;
13407 #
13408 # return new java.awt.Color(
13409 # protocolor.getRed(),
13410 # protocolor.getGreen(),
13411 # protocolor.getBlue(),
13412 # alpha);
13413 # }
13414 #
13415 # public static Color toProto(java.awt.Color color) {
13416 # float red = (float) color.getRed();
13417 # float green = (float) color.getGreen();
13418 # float blue = (float) color.getBlue();
13419 # float denominator = 255.0;
13420 # Color.Builder resultBuilder =
13421 # Color
13422 # .newBuilder()
13423 # .setRed(red / denominator)
13424 # .setGreen(green / denominator)
13425 # .setBlue(blue / denominator);
13426 # int alpha = color.getAlpha();
13427 # if (alpha != 255) {
13428 # result.setAlpha(
13429 # FloatValue
13430 # .newBuilder()
13431 # .setValue(((float) alpha) / denominator)
13432 # .build());
13433 # }
13434 # return resultBuilder.build();
13435 # }
13436 # // ...
13437 #
13438 # Example (iOS / Obj-C):
13439 #
13440 # // ...
13441 # static UIColor* fromProto(Color* protocolor) {
13442 # float red = [protocolor red];
13443 # float green = [protocolor green];
13444 # float blue = [protocolor blue];
13445 # FloatValue* alpha_wrapper = [protocolor alpha];
13446 # float alpha = 1.0;
13447 # if (alpha_wrapper != nil) {
13448 # alpha = [alpha_wrapper value];
13449 # }
13450 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13451 # }
13452 #
13453 # static Color* toProto(UIColor* color) {
13454 # CGFloat red, green, blue, alpha;
13455 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13456 # return nil;
13457 # }
13458 # Color* result = [Color alloc] init];
13459 # [result setRed:red];
13460 # [result setGreen:green];
13461 # [result setBlue:blue];
13462 # if (alpha <= 0.9999) {
13463 # [result setAlpha:floatWrapperWithValue(alpha)];
13464 # }
13465 # [result autorelease];
13466 # return result;
13467 # }
13468 # // ...
13469 #
13470 # Example (JavaScript):
13471 #
13472 # // ...
13473 #
13474 # var protoToCssColor = function(rgb_color) {
13475 # var redFrac = rgb_color.red || 0.0;
13476 # var greenFrac = rgb_color.green || 0.0;
13477 # var blueFrac = rgb_color.blue || 0.0;
13478 # var red = Math.floor(redFrac * 255);
13479 # var green = Math.floor(greenFrac * 255);
13480 # var blue = Math.floor(blueFrac * 255);
13481 #
13482 # if (!('alpha' in rgb_color)) {
13483 # return rgbToCssColor_(red, green, blue);
13484 # }
13485 #
13486 # var alphaFrac = rgb_color.alpha.value || 0.0;
13487 # var rgbParams = [red, green, blue].join(',');
13488 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13489 # };
13490 #
13491 # var rgbToCssColor_ = function(red, green, blue) {
13492 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13493 # var hexString = rgbNumber.toString(16);
13494 # var missingZeros = 6 - hexString.length;
13495 # var resultBuilder = ['#'];
13496 # for (var i = 0; i < missingZeros; i++) {
13497 # resultBuilder.push('0');
13498 # }
13499 # resultBuilder.push(hexString);
13500 # return resultBuilder.join('');
13501 # };
13502 #
13503 # // ...
13504 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13505 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13506 # the final pixel color is defined by the equation:
13507 #
13508 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13509 #
13510 # This means that a value of 1.0 corresponds to a solid color, whereas
13511 # a value of 0.0 corresponds to a completely transparent color. This
13512 # uses a wrapper message rather than a simple float scalar so that it is
13513 # possible to distinguish between a default value and the value being unset.
13514 # If omitted, this color object is to be rendered as a solid color
13515 # (as if the alpha value had been explicitly given with a value of 1.0).
13516 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13517 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13518 },
13519 "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
13520 # row or column will be filled with this color and the colors will
13521 # alternate between first_band_color and second_band_color starting
13522 # from the second row or column. Otherwise, the first row or column will be
13523 # filled with first_band_color and the colors will proceed to alternate
13524 # as they normally would.
13525 # for simplicity of conversion to/from color representations in various
13526 # languages over compactness; for example, the fields of this representation
13527 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13528 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13529 # method in iOS; and, with just a little work, it can be easily formatted into
13530 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13531 #
13532 # Example (Java):
13533 #
13534 # import com.google.type.Color;
13535 #
13536 # // ...
13537 # public static java.awt.Color fromProto(Color protocolor) {
13538 # float alpha = protocolor.hasAlpha()
13539 # ? protocolor.getAlpha().getValue()
13540 # : 1.0;
13541 #
13542 # return new java.awt.Color(
13543 # protocolor.getRed(),
13544 # protocolor.getGreen(),
13545 # protocolor.getBlue(),
13546 # alpha);
13547 # }
13548 #
13549 # public static Color toProto(java.awt.Color color) {
13550 # float red = (float) color.getRed();
13551 # float green = (float) color.getGreen();
13552 # float blue = (float) color.getBlue();
13553 # float denominator = 255.0;
13554 # Color.Builder resultBuilder =
13555 # Color
13556 # .newBuilder()
13557 # .setRed(red / denominator)
13558 # .setGreen(green / denominator)
13559 # .setBlue(blue / denominator);
13560 # int alpha = color.getAlpha();
13561 # if (alpha != 255) {
13562 # result.setAlpha(
13563 # FloatValue
13564 # .newBuilder()
13565 # .setValue(((float) alpha) / denominator)
13566 # .build());
13567 # }
13568 # return resultBuilder.build();
13569 # }
13570 # // ...
13571 #
13572 # Example (iOS / Obj-C):
13573 #
13574 # // ...
13575 # static UIColor* fromProto(Color* protocolor) {
13576 # float red = [protocolor red];
13577 # float green = [protocolor green];
13578 # float blue = [protocolor blue];
13579 # FloatValue* alpha_wrapper = [protocolor alpha];
13580 # float alpha = 1.0;
13581 # if (alpha_wrapper != nil) {
13582 # alpha = [alpha_wrapper value];
13583 # }
13584 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13585 # }
13586 #
13587 # static Color* toProto(UIColor* color) {
13588 # CGFloat red, green, blue, alpha;
13589 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13590 # return nil;
13591 # }
13592 # Color* result = [Color alloc] init];
13593 # [result setRed:red];
13594 # [result setGreen:green];
13595 # [result setBlue:blue];
13596 # if (alpha <= 0.9999) {
13597 # [result setAlpha:floatWrapperWithValue(alpha)];
13598 # }
13599 # [result autorelease];
13600 # return result;
13601 # }
13602 # // ...
13603 #
13604 # Example (JavaScript):
13605 #
13606 # // ...
13607 #
13608 # var protoToCssColor = function(rgb_color) {
13609 # var redFrac = rgb_color.red || 0.0;
13610 # var greenFrac = rgb_color.green || 0.0;
13611 # var blueFrac = rgb_color.blue || 0.0;
13612 # var red = Math.floor(redFrac * 255);
13613 # var green = Math.floor(greenFrac * 255);
13614 # var blue = Math.floor(blueFrac * 255);
13615 #
13616 # if (!('alpha' in rgb_color)) {
13617 # return rgbToCssColor_(red, green, blue);
13618 # }
13619 #
13620 # var alphaFrac = rgb_color.alpha.value || 0.0;
13621 # var rgbParams = [red, green, blue].join(',');
13622 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13623 # };
13624 #
13625 # var rgbToCssColor_ = function(red, green, blue) {
13626 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13627 # var hexString = rgbNumber.toString(16);
13628 # var missingZeros = 6 - hexString.length;
13629 # var resultBuilder = ['#'];
13630 # for (var i = 0; i < missingZeros; i++) {
13631 # resultBuilder.push('0');
13632 # }
13633 # resultBuilder.push(hexString);
13634 # return resultBuilder.join('');
13635 # };
13636 #
13637 # // ...
13638 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13639 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13640 # the final pixel color is defined by the equation:
13641 #
13642 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13643 #
13644 # This means that a value of 1.0 corresponds to a solid color, whereas
13645 # a value of 0.0 corresponds to a completely transparent color. This
13646 # uses a wrapper message rather than a simple float scalar so that it is
13647 # possible to distinguish between a default value and the value being unset.
13648 # If omitted, this color object is to be rendered as a solid color
13649 # (as if the alpha value had been explicitly given with a value of 1.0).
13650 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13651 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13652 },
13653 "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
13654 # row or column will be filled with either first_band_color or
13655 # second_band_color, depending on the color of the previous row or
13656 # column.
13657 # for simplicity of conversion to/from color representations in various
13658 # languages over compactness; for example, the fields of this representation
13659 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13660 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13661 # method in iOS; and, with just a little work, it can be easily formatted into
13662 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13663 #
13664 # Example (Java):
13665 #
13666 # import com.google.type.Color;
13667 #
13668 # // ...
13669 # public static java.awt.Color fromProto(Color protocolor) {
13670 # float alpha = protocolor.hasAlpha()
13671 # ? protocolor.getAlpha().getValue()
13672 # : 1.0;
13673 #
13674 # return new java.awt.Color(
13675 # protocolor.getRed(),
13676 # protocolor.getGreen(),
13677 # protocolor.getBlue(),
13678 # alpha);
13679 # }
13680 #
13681 # public static Color toProto(java.awt.Color color) {
13682 # float red = (float) color.getRed();
13683 # float green = (float) color.getGreen();
13684 # float blue = (float) color.getBlue();
13685 # float denominator = 255.0;
13686 # Color.Builder resultBuilder =
13687 # Color
13688 # .newBuilder()
13689 # .setRed(red / denominator)
13690 # .setGreen(green / denominator)
13691 # .setBlue(blue / denominator);
13692 # int alpha = color.getAlpha();
13693 # if (alpha != 255) {
13694 # result.setAlpha(
13695 # FloatValue
13696 # .newBuilder()
13697 # .setValue(((float) alpha) / denominator)
13698 # .build());
13699 # }
13700 # return resultBuilder.build();
13701 # }
13702 # // ...
13703 #
13704 # Example (iOS / Obj-C):
13705 #
13706 # // ...
13707 # static UIColor* fromProto(Color* protocolor) {
13708 # float red = [protocolor red];
13709 # float green = [protocolor green];
13710 # float blue = [protocolor blue];
13711 # FloatValue* alpha_wrapper = [protocolor alpha];
13712 # float alpha = 1.0;
13713 # if (alpha_wrapper != nil) {
13714 # alpha = [alpha_wrapper value];
13715 # }
13716 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13717 # }
13718 #
13719 # static Color* toProto(UIColor* color) {
13720 # CGFloat red, green, blue, alpha;
13721 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13722 # return nil;
13723 # }
13724 # Color* result = [Color alloc] init];
13725 # [result setRed:red];
13726 # [result setGreen:green];
13727 # [result setBlue:blue];
13728 # if (alpha <= 0.9999) {
13729 # [result setAlpha:floatWrapperWithValue(alpha)];
13730 # }
13731 # [result autorelease];
13732 # return result;
13733 # }
13734 # // ...
13735 #
13736 # Example (JavaScript):
13737 #
13738 # // ...
13739 #
13740 # var protoToCssColor = function(rgb_color) {
13741 # var redFrac = rgb_color.red || 0.0;
13742 # var greenFrac = rgb_color.green || 0.0;
13743 # var blueFrac = rgb_color.blue || 0.0;
13744 # var red = Math.floor(redFrac * 255);
13745 # var green = Math.floor(greenFrac * 255);
13746 # var blue = Math.floor(blueFrac * 255);
13747 #
13748 # if (!('alpha' in rgb_color)) {
13749 # return rgbToCssColor_(red, green, blue);
13750 # }
13751 #
13752 # var alphaFrac = rgb_color.alpha.value || 0.0;
13753 # var rgbParams = [red, green, blue].join(',');
13754 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13755 # };
13756 #
13757 # var rgbToCssColor_ = function(red, green, blue) {
13758 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13759 # var hexString = rgbNumber.toString(16);
13760 # var missingZeros = 6 - hexString.length;
13761 # var resultBuilder = ['#'];
13762 # for (var i = 0; i < missingZeros; i++) {
13763 # resultBuilder.push('0');
13764 # }
13765 # resultBuilder.push(hexString);
13766 # return resultBuilder.join('');
13767 # };
13768 #
13769 # // ...
13770 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13771 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13772 # the final pixel color is defined by the equation:
13773 #
13774 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13775 #
13776 # This means that a value of 1.0 corresponds to a solid color, whereas
13777 # a value of 0.0 corresponds to a completely transparent color. This
13778 # uses a wrapper message rather than a simple float scalar so that it is
13779 # possible to distinguish between a default value and the value being unset.
13780 # If omitted, this color object is to be rendered as a solid color
13781 # (as if the alpha value had been explicitly given with a value of 1.0).
13782 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13783 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13784 },
13785 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
13786 # for simplicity of conversion to/from color representations in various
13787 # languages over compactness; for example, the fields of this representation
13788 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13789 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13790 # method in iOS; and, with just a little work, it can be easily formatted into
13791 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13792 #
13793 # Example (Java):
13794 #
13795 # import com.google.type.Color;
13796 #
13797 # // ...
13798 # public static java.awt.Color fromProto(Color protocolor) {
13799 # float alpha = protocolor.hasAlpha()
13800 # ? protocolor.getAlpha().getValue()
13801 # : 1.0;
13802 #
13803 # return new java.awt.Color(
13804 # protocolor.getRed(),
13805 # protocolor.getGreen(),
13806 # protocolor.getBlue(),
13807 # alpha);
13808 # }
13809 #
13810 # public static Color toProto(java.awt.Color color) {
13811 # float red = (float) color.getRed();
13812 # float green = (float) color.getGreen();
13813 # float blue = (float) color.getBlue();
13814 # float denominator = 255.0;
13815 # Color.Builder resultBuilder =
13816 # Color
13817 # .newBuilder()
13818 # .setRed(red / denominator)
13819 # .setGreen(green / denominator)
13820 # .setBlue(blue / denominator);
13821 # int alpha = color.getAlpha();
13822 # if (alpha != 255) {
13823 # result.setAlpha(
13824 # FloatValue
13825 # .newBuilder()
13826 # .setValue(((float) alpha) / denominator)
13827 # .build());
13828 # }
13829 # return resultBuilder.build();
13830 # }
13831 # // ...
13832 #
13833 # Example (iOS / Obj-C):
13834 #
13835 # // ...
13836 # static UIColor* fromProto(Color* protocolor) {
13837 # float red = [protocolor red];
13838 # float green = [protocolor green];
13839 # float blue = [protocolor blue];
13840 # FloatValue* alpha_wrapper = [protocolor alpha];
13841 # float alpha = 1.0;
13842 # if (alpha_wrapper != nil) {
13843 # alpha = [alpha_wrapper value];
13844 # }
13845 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13846 # }
13847 #
13848 # static Color* toProto(UIColor* color) {
13849 # CGFloat red, green, blue, alpha;
13850 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13851 # return nil;
13852 # }
13853 # Color* result = [Color alloc] init];
13854 # [result setRed:red];
13855 # [result setGreen:green];
13856 # [result setBlue:blue];
13857 # if (alpha <= 0.9999) {
13858 # [result setAlpha:floatWrapperWithValue(alpha)];
13859 # }
13860 # [result autorelease];
13861 # return result;
13862 # }
13863 # // ...
13864 #
13865 # Example (JavaScript):
13866 #
13867 # // ...
13868 #
13869 # var protoToCssColor = function(rgb_color) {
13870 # var redFrac = rgb_color.red || 0.0;
13871 # var greenFrac = rgb_color.green || 0.0;
13872 # var blueFrac = rgb_color.blue || 0.0;
13873 # var red = Math.floor(redFrac * 255);
13874 # var green = Math.floor(greenFrac * 255);
13875 # var blue = Math.floor(blueFrac * 255);
13876 #
13877 # if (!('alpha' in rgb_color)) {
13878 # return rgbToCssColor_(red, green, blue);
13879 # }
13880 #
13881 # var alphaFrac = rgb_color.alpha.value || 0.0;
13882 # var rgbParams = [red, green, blue].join(',');
13883 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13884 # };
13885 #
13886 # var rgbToCssColor_ = function(red, green, blue) {
13887 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13888 # var hexString = rgbNumber.toString(16);
13889 # var missingZeros = 6 - hexString.length;
13890 # var resultBuilder = ['#'];
13891 # for (var i = 0; i < missingZeros; i++) {
13892 # resultBuilder.push('0');
13893 # }
13894 # resultBuilder.push(hexString);
13895 # return resultBuilder.join('');
13896 # };
13897 #
13898 # // ...
13899 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13900 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13901 # the final pixel color is defined by the equation:
13902 #
13903 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13904 #
13905 # This means that a value of 1.0 corresponds to a solid color, whereas
13906 # a value of 0.0 corresponds to a completely transparent color. This
13907 # uses a wrapper message rather than a simple float scalar so that it is
13908 # possible to distinguish between a default value and the value being unset.
13909 # If omitted, this color object is to be rendered as a solid color
13910 # (as if the alpha value had been explicitly given with a value of 1.0).
13911 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13912 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13913 },
13914 },
13915 "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
13916 # basis throughout all the rows in the range. At least one of
13917 # row_properties or column_properties must be specified.
13918 # BandedRange.row_properties and BandedRange.column_properties are
13919 # set, the fill colors are applied to cells according to the following rules:
13920 #
13921 # * header_color and footer_color take priority over band colors.
13922 # * first_band_color takes priority over second_band_color.
13923 # * row_properties takes priority over column_properties.
13924 #
13925 # For example, the first row color takes priority over the first column
13926 # color, but the first column color takes priority over the second row color.
13927 # Similarly, the row header takes priority over the column header in the
13928 # top left cell, but the column header takes priority over the first row
13929 # color if the row header is not set.
13930 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13931 # for simplicity of conversion to/from color representations in various
13932 # languages over compactness; for example, the fields of this representation
13933 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13934 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13935 # method in iOS; and, with just a little work, it can be easily formatted into
13936 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13937 #
13938 # Example (Java):
13939 #
13940 # import com.google.type.Color;
13941 #
13942 # // ...
13943 # public static java.awt.Color fromProto(Color protocolor) {
13944 # float alpha = protocolor.hasAlpha()
13945 # ? protocolor.getAlpha().getValue()
13946 # : 1.0;
13947 #
13948 # return new java.awt.Color(
13949 # protocolor.getRed(),
13950 # protocolor.getGreen(),
13951 # protocolor.getBlue(),
13952 # alpha);
13953 # }
13954 #
13955 # public static Color toProto(java.awt.Color color) {
13956 # float red = (float) color.getRed();
13957 # float green = (float) color.getGreen();
13958 # float blue = (float) color.getBlue();
13959 # float denominator = 255.0;
13960 # Color.Builder resultBuilder =
13961 # Color
13962 # .newBuilder()
13963 # .setRed(red / denominator)
13964 # .setGreen(green / denominator)
13965 # .setBlue(blue / denominator);
13966 # int alpha = color.getAlpha();
13967 # if (alpha != 255) {
13968 # result.setAlpha(
13969 # FloatValue
13970 # .newBuilder()
13971 # .setValue(((float) alpha) / denominator)
13972 # .build());
13973 # }
13974 # return resultBuilder.build();
13975 # }
13976 # // ...
13977 #
13978 # Example (iOS / Obj-C):
13979 #
13980 # // ...
13981 # static UIColor* fromProto(Color* protocolor) {
13982 # float red = [protocolor red];
13983 # float green = [protocolor green];
13984 # float blue = [protocolor blue];
13985 # FloatValue* alpha_wrapper = [protocolor alpha];
13986 # float alpha = 1.0;
13987 # if (alpha_wrapper != nil) {
13988 # alpha = [alpha_wrapper value];
13989 # }
13990 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13991 # }
13992 #
13993 # static Color* toProto(UIColor* color) {
13994 # CGFloat red, green, blue, alpha;
13995 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13996 # return nil;
13997 # }
13998 # Color* result = [Color alloc] init];
13999 # [result setRed:red];
14000 # [result setGreen:green];
14001 # [result setBlue:blue];
14002 # if (alpha <= 0.9999) {
14003 # [result setAlpha:floatWrapperWithValue(alpha)];
14004 # }
14005 # [result autorelease];
14006 # return result;
14007 # }
14008 # // ...
14009 #
14010 # Example (JavaScript):
14011 #
14012 # // ...
14013 #
14014 # var protoToCssColor = function(rgb_color) {
14015 # var redFrac = rgb_color.red || 0.0;
14016 # var greenFrac = rgb_color.green || 0.0;
14017 # var blueFrac = rgb_color.blue || 0.0;
14018 # var red = Math.floor(redFrac * 255);
14019 # var green = Math.floor(greenFrac * 255);
14020 # var blue = Math.floor(blueFrac * 255);
14021 #
14022 # if (!('alpha' in rgb_color)) {
14023 # return rgbToCssColor_(red, green, blue);
14024 # }
14025 #
14026 # var alphaFrac = rgb_color.alpha.value || 0.0;
14027 # var rgbParams = [red, green, blue].join(',');
14028 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14029 # };
14030 #
14031 # var rgbToCssColor_ = function(red, green, blue) {
14032 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14033 # var hexString = rgbNumber.toString(16);
14034 # var missingZeros = 6 - hexString.length;
14035 # var resultBuilder = ['#'];
14036 # for (var i = 0; i < missingZeros; i++) {
14037 # resultBuilder.push('0');
14038 # }
14039 # resultBuilder.push(hexString);
14040 # return resultBuilder.join('');
14041 # };
14042 #
14043 # // ...
14044 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14045 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14046 # the final pixel color is defined by the equation:
14047 #
14048 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14049 #
14050 # This means that a value of 1.0 corresponds to a solid color, whereas
14051 # a value of 0.0 corresponds to a completely transparent color. This
14052 # uses a wrapper message rather than a simple float scalar so that it is
14053 # possible to distinguish between a default value and the value being unset.
14054 # If omitted, this color object is to be rendered as a solid color
14055 # (as if the alpha value had been explicitly given with a value of 1.0).
14056 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14057 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14058 },
14059 "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
14060 # row or column will be filled with this color and the colors will
14061 # alternate between first_band_color and second_band_color starting
14062 # from the second row or column. Otherwise, the first row or column will be
14063 # filled with first_band_color and the colors will proceed to alternate
14064 # as they normally would.
14065 # for simplicity of conversion to/from color representations in various
14066 # languages over compactness; for example, the fields of this representation
14067 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14068 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14069 # method in iOS; and, with just a little work, it can be easily formatted into
14070 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14071 #
14072 # Example (Java):
14073 #
14074 # import com.google.type.Color;
14075 #
14076 # // ...
14077 # public static java.awt.Color fromProto(Color protocolor) {
14078 # float alpha = protocolor.hasAlpha()
14079 # ? protocolor.getAlpha().getValue()
14080 # : 1.0;
14081 #
14082 # return new java.awt.Color(
14083 # protocolor.getRed(),
14084 # protocolor.getGreen(),
14085 # protocolor.getBlue(),
14086 # alpha);
14087 # }
14088 #
14089 # public static Color toProto(java.awt.Color color) {
14090 # float red = (float) color.getRed();
14091 # float green = (float) color.getGreen();
14092 # float blue = (float) color.getBlue();
14093 # float denominator = 255.0;
14094 # Color.Builder resultBuilder =
14095 # Color
14096 # .newBuilder()
14097 # .setRed(red / denominator)
14098 # .setGreen(green / denominator)
14099 # .setBlue(blue / denominator);
14100 # int alpha = color.getAlpha();
14101 # if (alpha != 255) {
14102 # result.setAlpha(
14103 # FloatValue
14104 # .newBuilder()
14105 # .setValue(((float) alpha) / denominator)
14106 # .build());
14107 # }
14108 # return resultBuilder.build();
14109 # }
14110 # // ...
14111 #
14112 # Example (iOS / Obj-C):
14113 #
14114 # // ...
14115 # static UIColor* fromProto(Color* protocolor) {
14116 # float red = [protocolor red];
14117 # float green = [protocolor green];
14118 # float blue = [protocolor blue];
14119 # FloatValue* alpha_wrapper = [protocolor alpha];
14120 # float alpha = 1.0;
14121 # if (alpha_wrapper != nil) {
14122 # alpha = [alpha_wrapper value];
14123 # }
14124 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14125 # }
14126 #
14127 # static Color* toProto(UIColor* color) {
14128 # CGFloat red, green, blue, alpha;
14129 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14130 # return nil;
14131 # }
14132 # Color* result = [Color alloc] init];
14133 # [result setRed:red];
14134 # [result setGreen:green];
14135 # [result setBlue:blue];
14136 # if (alpha <= 0.9999) {
14137 # [result setAlpha:floatWrapperWithValue(alpha)];
14138 # }
14139 # [result autorelease];
14140 # return result;
14141 # }
14142 # // ...
14143 #
14144 # Example (JavaScript):
14145 #
14146 # // ...
14147 #
14148 # var protoToCssColor = function(rgb_color) {
14149 # var redFrac = rgb_color.red || 0.0;
14150 # var greenFrac = rgb_color.green || 0.0;
14151 # var blueFrac = rgb_color.blue || 0.0;
14152 # var red = Math.floor(redFrac * 255);
14153 # var green = Math.floor(greenFrac * 255);
14154 # var blue = Math.floor(blueFrac * 255);
14155 #
14156 # if (!('alpha' in rgb_color)) {
14157 # return rgbToCssColor_(red, green, blue);
14158 # }
14159 #
14160 # var alphaFrac = rgb_color.alpha.value || 0.0;
14161 # var rgbParams = [red, green, blue].join(',');
14162 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14163 # };
14164 #
14165 # var rgbToCssColor_ = function(red, green, blue) {
14166 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14167 # var hexString = rgbNumber.toString(16);
14168 # var missingZeros = 6 - hexString.length;
14169 # var resultBuilder = ['#'];
14170 # for (var i = 0; i < missingZeros; i++) {
14171 # resultBuilder.push('0');
14172 # }
14173 # resultBuilder.push(hexString);
14174 # return resultBuilder.join('');
14175 # };
14176 #
14177 # // ...
14178 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14179 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14180 # the final pixel color is defined by the equation:
14181 #
14182 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14183 #
14184 # This means that a value of 1.0 corresponds to a solid color, whereas
14185 # a value of 0.0 corresponds to a completely transparent color. This
14186 # uses a wrapper message rather than a simple float scalar so that it is
14187 # possible to distinguish between a default value and the value being unset.
14188 # If omitted, this color object is to be rendered as a solid color
14189 # (as if the alpha value had been explicitly given with a value of 1.0).
14190 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14191 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14192 },
14193 "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
14194 # row or column will be filled with either first_band_color or
14195 # second_band_color, depending on the color of the previous row or
14196 # column.
14197 # for simplicity of conversion to/from color representations in various
14198 # languages over compactness; for example, the fields of this representation
14199 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14200 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14201 # method in iOS; and, with just a little work, it can be easily formatted into
14202 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14203 #
14204 # Example (Java):
14205 #
14206 # import com.google.type.Color;
14207 #
14208 # // ...
14209 # public static java.awt.Color fromProto(Color protocolor) {
14210 # float alpha = protocolor.hasAlpha()
14211 # ? protocolor.getAlpha().getValue()
14212 # : 1.0;
14213 #
14214 # return new java.awt.Color(
14215 # protocolor.getRed(),
14216 # protocolor.getGreen(),
14217 # protocolor.getBlue(),
14218 # alpha);
14219 # }
14220 #
14221 # public static Color toProto(java.awt.Color color) {
14222 # float red = (float) color.getRed();
14223 # float green = (float) color.getGreen();
14224 # float blue = (float) color.getBlue();
14225 # float denominator = 255.0;
14226 # Color.Builder resultBuilder =
14227 # Color
14228 # .newBuilder()
14229 # .setRed(red / denominator)
14230 # .setGreen(green / denominator)
14231 # .setBlue(blue / denominator);
14232 # int alpha = color.getAlpha();
14233 # if (alpha != 255) {
14234 # result.setAlpha(
14235 # FloatValue
14236 # .newBuilder()
14237 # .setValue(((float) alpha) / denominator)
14238 # .build());
14239 # }
14240 # return resultBuilder.build();
14241 # }
14242 # // ...
14243 #
14244 # Example (iOS / Obj-C):
14245 #
14246 # // ...
14247 # static UIColor* fromProto(Color* protocolor) {
14248 # float red = [protocolor red];
14249 # float green = [protocolor green];
14250 # float blue = [protocolor blue];
14251 # FloatValue* alpha_wrapper = [protocolor alpha];
14252 # float alpha = 1.0;
14253 # if (alpha_wrapper != nil) {
14254 # alpha = [alpha_wrapper value];
14255 # }
14256 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14257 # }
14258 #
14259 # static Color* toProto(UIColor* color) {
14260 # CGFloat red, green, blue, alpha;
14261 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14262 # return nil;
14263 # }
14264 # Color* result = [Color alloc] init];
14265 # [result setRed:red];
14266 # [result setGreen:green];
14267 # [result setBlue:blue];
14268 # if (alpha <= 0.9999) {
14269 # [result setAlpha:floatWrapperWithValue(alpha)];
14270 # }
14271 # [result autorelease];
14272 # return result;
14273 # }
14274 # // ...
14275 #
14276 # Example (JavaScript):
14277 #
14278 # // ...
14279 #
14280 # var protoToCssColor = function(rgb_color) {
14281 # var redFrac = rgb_color.red || 0.0;
14282 # var greenFrac = rgb_color.green || 0.0;
14283 # var blueFrac = rgb_color.blue || 0.0;
14284 # var red = Math.floor(redFrac * 255);
14285 # var green = Math.floor(greenFrac * 255);
14286 # var blue = Math.floor(blueFrac * 255);
14287 #
14288 # if (!('alpha' in rgb_color)) {
14289 # return rgbToCssColor_(red, green, blue);
14290 # }
14291 #
14292 # var alphaFrac = rgb_color.alpha.value || 0.0;
14293 # var rgbParams = [red, green, blue].join(',');
14294 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14295 # };
14296 #
14297 # var rgbToCssColor_ = function(red, green, blue) {
14298 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14299 # var hexString = rgbNumber.toString(16);
14300 # var missingZeros = 6 - hexString.length;
14301 # var resultBuilder = ['#'];
14302 # for (var i = 0; i < missingZeros; i++) {
14303 # resultBuilder.push('0');
14304 # }
14305 # resultBuilder.push(hexString);
14306 # return resultBuilder.join('');
14307 # };
14308 #
14309 # // ...
14310 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14311 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14312 # the final pixel color is defined by the equation:
14313 #
14314 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14315 #
14316 # This means that a value of 1.0 corresponds to a solid color, whereas
14317 # a value of 0.0 corresponds to a completely transparent color. This
14318 # uses a wrapper message rather than a simple float scalar so that it is
14319 # possible to distinguish between a default value and the value being unset.
14320 # If omitted, this color object is to be rendered as a solid color
14321 # (as if the alpha value had been explicitly given with a value of 1.0).
14322 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14323 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14324 },
14325 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
14326 # for simplicity of conversion to/from color representations in various
14327 # languages over compactness; for example, the fields of this representation
14328 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14329 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14330 # method in iOS; and, with just a little work, it can be easily formatted into
14331 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14332 #
14333 # Example (Java):
14334 #
14335 # import com.google.type.Color;
14336 #
14337 # // ...
14338 # public static java.awt.Color fromProto(Color protocolor) {
14339 # float alpha = protocolor.hasAlpha()
14340 # ? protocolor.getAlpha().getValue()
14341 # : 1.0;
14342 #
14343 # return new java.awt.Color(
14344 # protocolor.getRed(),
14345 # protocolor.getGreen(),
14346 # protocolor.getBlue(),
14347 # alpha);
14348 # }
14349 #
14350 # public static Color toProto(java.awt.Color color) {
14351 # float red = (float) color.getRed();
14352 # float green = (float) color.getGreen();
14353 # float blue = (float) color.getBlue();
14354 # float denominator = 255.0;
14355 # Color.Builder resultBuilder =
14356 # Color
14357 # .newBuilder()
14358 # .setRed(red / denominator)
14359 # .setGreen(green / denominator)
14360 # .setBlue(blue / denominator);
14361 # int alpha = color.getAlpha();
14362 # if (alpha != 255) {
14363 # result.setAlpha(
14364 # FloatValue
14365 # .newBuilder()
14366 # .setValue(((float) alpha) / denominator)
14367 # .build());
14368 # }
14369 # return resultBuilder.build();
14370 # }
14371 # // ...
14372 #
14373 # Example (iOS / Obj-C):
14374 #
14375 # // ...
14376 # static UIColor* fromProto(Color* protocolor) {
14377 # float red = [protocolor red];
14378 # float green = [protocolor green];
14379 # float blue = [protocolor blue];
14380 # FloatValue* alpha_wrapper = [protocolor alpha];
14381 # float alpha = 1.0;
14382 # if (alpha_wrapper != nil) {
14383 # alpha = [alpha_wrapper value];
14384 # }
14385 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14386 # }
14387 #
14388 # static Color* toProto(UIColor* color) {
14389 # CGFloat red, green, blue, alpha;
14390 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14391 # return nil;
14392 # }
14393 # Color* result = [Color alloc] init];
14394 # [result setRed:red];
14395 # [result setGreen:green];
14396 # [result setBlue:blue];
14397 # if (alpha <= 0.9999) {
14398 # [result setAlpha:floatWrapperWithValue(alpha)];
14399 # }
14400 # [result autorelease];
14401 # return result;
14402 # }
14403 # // ...
14404 #
14405 # Example (JavaScript):
14406 #
14407 # // ...
14408 #
14409 # var protoToCssColor = function(rgb_color) {
14410 # var redFrac = rgb_color.red || 0.0;
14411 # var greenFrac = rgb_color.green || 0.0;
14412 # var blueFrac = rgb_color.blue || 0.0;
14413 # var red = Math.floor(redFrac * 255);
14414 # var green = Math.floor(greenFrac * 255);
14415 # var blue = Math.floor(blueFrac * 255);
14416 #
14417 # if (!('alpha' in rgb_color)) {
14418 # return rgbToCssColor_(red, green, blue);
14419 # }
14420 #
14421 # var alphaFrac = rgb_color.alpha.value || 0.0;
14422 # var rgbParams = [red, green, blue].join(',');
14423 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14424 # };
14425 #
14426 # var rgbToCssColor_ = function(red, green, blue) {
14427 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14428 # var hexString = rgbNumber.toString(16);
14429 # var missingZeros = 6 - hexString.length;
14430 # var resultBuilder = ['#'];
14431 # for (var i = 0; i < missingZeros; i++) {
14432 # resultBuilder.push('0');
14433 # }
14434 # resultBuilder.push(hexString);
14435 # return resultBuilder.join('');
14436 # };
14437 #
14438 # // ...
14439 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14440 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14441 # the final pixel color is defined by the equation:
14442 #
14443 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14444 #
14445 # This means that a value of 1.0 corresponds to a solid color, whereas
14446 # a value of 0.0 corresponds to a completely transparent color. This
14447 # uses a wrapper message rather than a simple float scalar so that it is
14448 # possible to distinguish between a default value and the value being unset.
14449 # If omitted, this color object is to be rendered as a solid color
14450 # (as if the alpha value had been explicitly given with a value of 1.0).
14451 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14452 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14453 },
14454 },
14455 "bandedRangeId": 42, # The id of the banded range.
14456 },
14457 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014458 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
14459 "filterId": 42, # The ID of the filter to delete.
14460 },
14461 "mergeCells": { # Merges all cells in the range. # Merges cells together.
14462 "range": { # A range on a sheet. # The range of cells to merge.
14463 # All indexes are zero-based.
14464 # Indexes are half open, e.g the start index is inclusive
14465 # and the end index is exclusive -- [start_index, end_index).
14466 # Missing indexes indicate the range is unbounded on that side.
14467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014468 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014469 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014470 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014471 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014472 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014473 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014474 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014475 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014476 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014477 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014478 # `Sheet1!A:B == sheet_id: 0,
14479 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014480 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014481 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014482 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014483 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014484 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014485 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014486 #
14487 # The start index must always be less than or equal to the end index.
14488 # If the start index equals the end index, then the range is empty.
14489 # Empty ranges are typically not meaningful and are usually rendered in the
14490 # UI as `#REF!`.
14491 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014492 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014493 "sheetId": 42, # The sheet this range is on.
14494 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014495 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014496 },
14497 "mergeType": "A String", # How the cells should be merged.
14498 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014499 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014500 "protectedRangeId": 42, # The ID of the protected range to delete.
14501 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070014502 "addFilterView": { # Adds a filter view. # Adds a filter view.
14503 "filter": { # A filter view. # The filter to add. The filterViewId
14504 # field is optional; if one is not set, an id will be randomly generated. (It
14505 # is an error to specify the ID of a filter that already exists.)
14506 "title": "A String", # The name of the filter view.
14507 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
14508 #
14509 # When writing, only one of range or named_range_id
14510 # may be set.
14511 "filterViewId": 42, # The ID of the filter view.
14512 "range": { # A range on a sheet. # The range this filter view covers.
14513 #
14514 # When writing, only one of range or named_range_id
14515 # may be set.
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 #
14521 # For example, if `"Sheet1"` is sheet ID 0, then:
14522 #
14523 # `Sheet1!A1:A1 == sheet_id: 0,
14524 # start_row_index: 0, end_row_index: 1,
14525 # start_column_index: 0, end_column_index: 1`
14526 #
14527 # `Sheet1!A3:B4 == sheet_id: 0,
14528 # start_row_index: 2, end_row_index: 4,
14529 # start_column_index: 0, end_column_index: 2`
14530 #
14531 # `Sheet1!A:B == sheet_id: 0,
14532 # start_column_index: 0, end_column_index: 2`
14533 #
14534 # `Sheet1!A5:B == sheet_id: 0,
14535 # start_row_index: 4,
14536 # start_column_index: 0, end_column_index: 2`
14537 #
14538 # `Sheet1 == sheet_id:0`
14539 #
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.
14545 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14546 "sheetId": 42, # The sheet this range is on.
14547 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14548 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
14549 },
14550 "sortSpecs": [ # The sort order per column. Later specifications are used when values
14551 # are equal in the earlier specifications.
14552 { # A sort order associated with a specific column or row.
14553 "sortOrder": "A String", # The order data should be sorted.
14554 "dimensionIndex": 42, # The dimension the sort should be applied to.
14555 },
14556 ],
14557 "criteria": { # The criteria for showing/hiding values per column.
14558 # The map's key is the column index, and the value is the criteria for
14559 # that column.
14560 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
14561 "hiddenValues": [ # Values that should be hidden.
14562 "A String",
14563 ],
14564 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
14565 # (This does not override hiddenValues -- if a value is listed there,
14566 # it will still be hidden.)
14567 # BooleanConditions are used by conditional formatting,
14568 # data validation, and the criteria in filters.
14569 "values": [ # The values of the condition. The number of supported values depends
14570 # on the condition type. Some support zero values,
14571 # others one or two values,
14572 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
14573 { # The value of the condition.
14574 "relativeDate": "A String", # A relative date (based on the current date).
14575 # Valid only if the type is
14576 # DATE_BEFORE,
14577 # DATE_AFTER,
14578 # DATE_ON_OR_BEFORE or
14579 # DATE_ON_OR_AFTER.
14580 #
14581 # Relative dates are not supported in data validation.
14582 # They are supported only in conditional formatting and
14583 # conditional filters.
14584 "userEnteredValue": "A String", # A value the condition is based on.
14585 # The value will be parsed as if the user typed into a cell.
14586 # Formulas are supported (and must begin with an `=`).
14587 },
14588 ],
14589 "type": "A String", # The type of condition.
14590 },
14591 },
14592 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014593 },
14594 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015175 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015178 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015482 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015485 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015526 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015529 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015565 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015568 "startRowIndex": 42, # The start row (inclusive) 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.
15601 "rowCount": 42, # The number of rows in the grid.
15602 "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.
15604 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
15605 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015781 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015784 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015854 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015857 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015968 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015971 "startRowIndex": 42, # The start row (inclusive) 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015987 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
15988 # CellData.effectiveFormat will not be set if the
15989 # cell's format is equal to this default format.
15990 # This field is read-only.
15991 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
15992 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15993 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015994 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015995 # information about the supported patterns.
15996 "type": "A String", # The type of the number format.
15997 # When writing, this field must be set.
15998 },
15999 "textDirection": "A String", # The direction of the text in the cell.
16000 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
16001 # When updating padding, every field must be specified.
16002 "top": 42, # The top padding of the cell.
16003 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016004 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016005 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016006 },
16007 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
16008 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
16009 # for simplicity of conversion to/from color representations in various
16010 # languages over compactness; for example, the fields of this representation
16011 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16012 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16013 # method in iOS; and, with just a little work, it can be easily formatted into
16014 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16015 #
16016 # Example (Java):
16017 #
16018 # import com.google.type.Color;
16019 #
16020 # // ...
16021 # public static java.awt.Color fromProto(Color protocolor) {
16022 # float alpha = protocolor.hasAlpha()
16023 # ? protocolor.getAlpha().getValue()
16024 # : 1.0;
16025 #
16026 # return new java.awt.Color(
16027 # protocolor.getRed(),
16028 # protocolor.getGreen(),
16029 # protocolor.getBlue(),
16030 # alpha);
16031 # }
16032 #
16033 # public static Color toProto(java.awt.Color color) {
16034 # float red = (float) color.getRed();
16035 # float green = (float) color.getGreen();
16036 # float blue = (float) color.getBlue();
16037 # float denominator = 255.0;
16038 # Color.Builder resultBuilder =
16039 # Color
16040 # .newBuilder()
16041 # .setRed(red / denominator)
16042 # .setGreen(green / denominator)
16043 # .setBlue(blue / denominator);
16044 # int alpha = color.getAlpha();
16045 # if (alpha != 255) {
16046 # result.setAlpha(
16047 # FloatValue
16048 # .newBuilder()
16049 # .setValue(((float) alpha) / denominator)
16050 # .build());
16051 # }
16052 # return resultBuilder.build();
16053 # }
16054 # // ...
16055 #
16056 # Example (iOS / Obj-C):
16057 #
16058 # // ...
16059 # static UIColor* fromProto(Color* protocolor) {
16060 # float red = [protocolor red];
16061 # float green = [protocolor green];
16062 # float blue = [protocolor blue];
16063 # FloatValue* alpha_wrapper = [protocolor alpha];
16064 # float alpha = 1.0;
16065 # if (alpha_wrapper != nil) {
16066 # alpha = [alpha_wrapper value];
16067 # }
16068 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16069 # }
16070 #
16071 # static Color* toProto(UIColor* color) {
16072 # CGFloat red, green, blue, alpha;
16073 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16074 # return nil;
16075 # }
16076 # Color* result = [Color alloc] init];
16077 # [result setRed:red];
16078 # [result setGreen:green];
16079 # [result setBlue:blue];
16080 # if (alpha <= 0.9999) {
16081 # [result setAlpha:floatWrapperWithValue(alpha)];
16082 # }
16083 # [result autorelease];
16084 # return result;
16085 # }
16086 # // ...
16087 #
16088 # Example (JavaScript):
16089 #
16090 # // ...
16091 #
16092 # var protoToCssColor = function(rgb_color) {
16093 # var redFrac = rgb_color.red || 0.0;
16094 # var greenFrac = rgb_color.green || 0.0;
16095 # var blueFrac = rgb_color.blue || 0.0;
16096 # var red = Math.floor(redFrac * 255);
16097 # var green = Math.floor(greenFrac * 255);
16098 # var blue = Math.floor(blueFrac * 255);
16099 #
16100 # if (!('alpha' in rgb_color)) {
16101 # return rgbToCssColor_(red, green, blue);
16102 # }
16103 #
16104 # var alphaFrac = rgb_color.alpha.value || 0.0;
16105 # var rgbParams = [red, green, blue].join(',');
16106 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16107 # };
16108 #
16109 # var rgbToCssColor_ = function(red, green, blue) {
16110 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16111 # var hexString = rgbNumber.toString(16);
16112 # var missingZeros = 6 - hexString.length;
16113 # var resultBuilder = ['#'];
16114 # for (var i = 0; i < missingZeros; i++) {
16115 # resultBuilder.push('0');
16116 # }
16117 # resultBuilder.push(hexString);
16118 # return resultBuilder.join('');
16119 # };
16120 #
16121 # // ...
16122 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16123 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16124 # the final pixel color is defined by the equation:
16125 #
16126 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16127 #
16128 # This means that a value of 1.0 corresponds to a solid color, whereas
16129 # a value of 0.0 corresponds to a completely transparent color. This
16130 # uses a wrapper message rather than a simple float scalar so that it is
16131 # possible to distinguish between a default value and the value being unset.
16132 # If omitted, this color object is to be rendered as a solid color
16133 # (as if the alpha value had been explicitly given with a value of 1.0).
16134 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16135 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16136 },
16137 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
16138 "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).
16139 # Absent values indicate that the field isn't specified.
16140 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
16141 # for simplicity of conversion to/from color representations in various
16142 # languages over compactness; for example, the fields of this representation
16143 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16144 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16145 # method in iOS; and, with just a little work, it can be easily formatted into
16146 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16147 #
16148 # Example (Java):
16149 #
16150 # import com.google.type.Color;
16151 #
16152 # // ...
16153 # public static java.awt.Color fromProto(Color protocolor) {
16154 # float alpha = protocolor.hasAlpha()
16155 # ? protocolor.getAlpha().getValue()
16156 # : 1.0;
16157 #
16158 # return new java.awt.Color(
16159 # protocolor.getRed(),
16160 # protocolor.getGreen(),
16161 # protocolor.getBlue(),
16162 # alpha);
16163 # }
16164 #
16165 # public static Color toProto(java.awt.Color color) {
16166 # float red = (float) color.getRed();
16167 # float green = (float) color.getGreen();
16168 # float blue = (float) color.getBlue();
16169 # float denominator = 255.0;
16170 # Color.Builder resultBuilder =
16171 # Color
16172 # .newBuilder()
16173 # .setRed(red / denominator)
16174 # .setGreen(green / denominator)
16175 # .setBlue(blue / denominator);
16176 # int alpha = color.getAlpha();
16177 # if (alpha != 255) {
16178 # result.setAlpha(
16179 # FloatValue
16180 # .newBuilder()
16181 # .setValue(((float) alpha) / denominator)
16182 # .build());
16183 # }
16184 # return resultBuilder.build();
16185 # }
16186 # // ...
16187 #
16188 # Example (iOS / Obj-C):
16189 #
16190 # // ...
16191 # static UIColor* fromProto(Color* protocolor) {
16192 # float red = [protocolor red];
16193 # float green = [protocolor green];
16194 # float blue = [protocolor blue];
16195 # FloatValue* alpha_wrapper = [protocolor alpha];
16196 # float alpha = 1.0;
16197 # if (alpha_wrapper != nil) {
16198 # alpha = [alpha_wrapper value];
16199 # }
16200 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16201 # }
16202 #
16203 # static Color* toProto(UIColor* color) {
16204 # CGFloat red, green, blue, alpha;
16205 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16206 # return nil;
16207 # }
16208 # Color* result = [Color alloc] init];
16209 # [result setRed:red];
16210 # [result setGreen:green];
16211 # [result setBlue:blue];
16212 # if (alpha <= 0.9999) {
16213 # [result setAlpha:floatWrapperWithValue(alpha)];
16214 # }
16215 # [result autorelease];
16216 # return result;
16217 # }
16218 # // ...
16219 #
16220 # Example (JavaScript):
16221 #
16222 # // ...
16223 #
16224 # var protoToCssColor = function(rgb_color) {
16225 # var redFrac = rgb_color.red || 0.0;
16226 # var greenFrac = rgb_color.green || 0.0;
16227 # var blueFrac = rgb_color.blue || 0.0;
16228 # var red = Math.floor(redFrac * 255);
16229 # var green = Math.floor(greenFrac * 255);
16230 # var blue = Math.floor(blueFrac * 255);
16231 #
16232 # if (!('alpha' in rgb_color)) {
16233 # return rgbToCssColor_(red, green, blue);
16234 # }
16235 #
16236 # var alphaFrac = rgb_color.alpha.value || 0.0;
16237 # var rgbParams = [red, green, blue].join(',');
16238 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16239 # };
16240 #
16241 # var rgbToCssColor_ = function(red, green, blue) {
16242 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16243 # var hexString = rgbNumber.toString(16);
16244 # var missingZeros = 6 - hexString.length;
16245 # var resultBuilder = ['#'];
16246 # for (var i = 0; i < missingZeros; i++) {
16247 # resultBuilder.push('0');
16248 # }
16249 # resultBuilder.push(hexString);
16250 # return resultBuilder.join('');
16251 # };
16252 #
16253 # // ...
16254 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16255 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16256 # the final pixel color is defined by the equation:
16257 #
16258 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16259 #
16260 # This means that a value of 1.0 corresponds to a solid color, whereas
16261 # a value of 0.0 corresponds to a completely transparent color. This
16262 # uses a wrapper message rather than a simple float scalar so that it is
16263 # possible to distinguish between a default value and the value being unset.
16264 # If omitted, this color object is to be rendered as a solid color
16265 # (as if the alpha value had been explicitly given with a value of 1.0).
16266 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16267 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16268 },
16269 "bold": True or False, # True if the text is bold.
16270 "strikethrough": True or False, # True if the text has a strikethrough.
16271 "fontFamily": "A String", # The font family.
16272 "fontSize": 42, # The size of the font.
16273 "italic": True or False, # True if the text is italicized.
16274 "underline": True or False, # True if the text is underlined.
16275 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016276 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
16277 "angle": 42, # The angle between the standard orientation and the desired orientation.
16278 # Measured in degrees. Valid values are between -90 and 90. Positive
16279 # angles are angled upwards, negative are angled downwards.
16280 #
16281 # Note: For LTR text direction positive angles are in the counterclockwise
16282 # direction, whereas for RTL they are in the clockwise direction
16283 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
16284 # characters is unchanged.
16285 # For example:
16286 #
16287 # | V |
16288 # | e |
16289 # | r |
16290 # | t |
16291 # | i |
16292 # | c |
16293 # | a |
16294 # | l |
16295 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016296 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
16297 "borders": { # The borders of the cell. # The borders of the cell.
16298 "top": { # A border along a cell. # The top border of the cell.
16299 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16300 # for simplicity of conversion to/from color representations in various
16301 # languages over compactness; for example, the fields of this representation
16302 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16303 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16304 # method in iOS; and, with just a little work, it can be easily formatted into
16305 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16306 #
16307 # Example (Java):
16308 #
16309 # import com.google.type.Color;
16310 #
16311 # // ...
16312 # public static java.awt.Color fromProto(Color protocolor) {
16313 # float alpha = protocolor.hasAlpha()
16314 # ? protocolor.getAlpha().getValue()
16315 # : 1.0;
16316 #
16317 # return new java.awt.Color(
16318 # protocolor.getRed(),
16319 # protocolor.getGreen(),
16320 # protocolor.getBlue(),
16321 # alpha);
16322 # }
16323 #
16324 # public static Color toProto(java.awt.Color color) {
16325 # float red = (float) color.getRed();
16326 # float green = (float) color.getGreen();
16327 # float blue = (float) color.getBlue();
16328 # float denominator = 255.0;
16329 # Color.Builder resultBuilder =
16330 # Color
16331 # .newBuilder()
16332 # .setRed(red / denominator)
16333 # .setGreen(green / denominator)
16334 # .setBlue(blue / denominator);
16335 # int alpha = color.getAlpha();
16336 # if (alpha != 255) {
16337 # result.setAlpha(
16338 # FloatValue
16339 # .newBuilder()
16340 # .setValue(((float) alpha) / denominator)
16341 # .build());
16342 # }
16343 # return resultBuilder.build();
16344 # }
16345 # // ...
16346 #
16347 # Example (iOS / Obj-C):
16348 #
16349 # // ...
16350 # static UIColor* fromProto(Color* protocolor) {
16351 # float red = [protocolor red];
16352 # float green = [protocolor green];
16353 # float blue = [protocolor blue];
16354 # FloatValue* alpha_wrapper = [protocolor alpha];
16355 # float alpha = 1.0;
16356 # if (alpha_wrapper != nil) {
16357 # alpha = [alpha_wrapper value];
16358 # }
16359 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16360 # }
16361 #
16362 # static Color* toProto(UIColor* color) {
16363 # CGFloat red, green, blue, alpha;
16364 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16365 # return nil;
16366 # }
16367 # Color* result = [Color alloc] init];
16368 # [result setRed:red];
16369 # [result setGreen:green];
16370 # [result setBlue:blue];
16371 # if (alpha <= 0.9999) {
16372 # [result setAlpha:floatWrapperWithValue(alpha)];
16373 # }
16374 # [result autorelease];
16375 # return result;
16376 # }
16377 # // ...
16378 #
16379 # Example (JavaScript):
16380 #
16381 # // ...
16382 #
16383 # var protoToCssColor = function(rgb_color) {
16384 # var redFrac = rgb_color.red || 0.0;
16385 # var greenFrac = rgb_color.green || 0.0;
16386 # var blueFrac = rgb_color.blue || 0.0;
16387 # var red = Math.floor(redFrac * 255);
16388 # var green = Math.floor(greenFrac * 255);
16389 # var blue = Math.floor(blueFrac * 255);
16390 #
16391 # if (!('alpha' in rgb_color)) {
16392 # return rgbToCssColor_(red, green, blue);
16393 # }
16394 #
16395 # var alphaFrac = rgb_color.alpha.value || 0.0;
16396 # var rgbParams = [red, green, blue].join(',');
16397 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16398 # };
16399 #
16400 # var rgbToCssColor_ = function(red, green, blue) {
16401 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16402 # var hexString = rgbNumber.toString(16);
16403 # var missingZeros = 6 - hexString.length;
16404 # var resultBuilder = ['#'];
16405 # for (var i = 0; i < missingZeros; i++) {
16406 # resultBuilder.push('0');
16407 # }
16408 # resultBuilder.push(hexString);
16409 # return resultBuilder.join('');
16410 # };
16411 #
16412 # // ...
16413 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16414 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16415 # the final pixel color is defined by the equation:
16416 #
16417 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16418 #
16419 # This means that a value of 1.0 corresponds to a solid color, whereas
16420 # a value of 0.0 corresponds to a completely transparent color. This
16421 # uses a wrapper message rather than a simple float scalar so that it is
16422 # possible to distinguish between a default value and the value being unset.
16423 # If omitted, this color object is to be rendered as a solid color
16424 # (as if the alpha value had been explicitly given with a value of 1.0).
16425 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16426 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16427 },
16428 "width": 42, # The width of the border, in pixels.
16429 # Deprecated; the width is determined by the "style" field.
16430 "style": "A String", # The style of the border.
16431 },
16432 "right": { # A border along a cell. # The right border of the cell.
16433 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16434 # for simplicity of conversion to/from color representations in various
16435 # languages over compactness; for example, the fields of this representation
16436 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16437 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16438 # method in iOS; and, with just a little work, it can be easily formatted into
16439 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16440 #
16441 # Example (Java):
16442 #
16443 # import com.google.type.Color;
16444 #
16445 # // ...
16446 # public static java.awt.Color fromProto(Color protocolor) {
16447 # float alpha = protocolor.hasAlpha()
16448 # ? protocolor.getAlpha().getValue()
16449 # : 1.0;
16450 #
16451 # return new java.awt.Color(
16452 # protocolor.getRed(),
16453 # protocolor.getGreen(),
16454 # protocolor.getBlue(),
16455 # alpha);
16456 # }
16457 #
16458 # public static Color toProto(java.awt.Color color) {
16459 # float red = (float) color.getRed();
16460 # float green = (float) color.getGreen();
16461 # float blue = (float) color.getBlue();
16462 # float denominator = 255.0;
16463 # Color.Builder resultBuilder =
16464 # Color
16465 # .newBuilder()
16466 # .setRed(red / denominator)
16467 # .setGreen(green / denominator)
16468 # .setBlue(blue / denominator);
16469 # int alpha = color.getAlpha();
16470 # if (alpha != 255) {
16471 # result.setAlpha(
16472 # FloatValue
16473 # .newBuilder()
16474 # .setValue(((float) alpha) / denominator)
16475 # .build());
16476 # }
16477 # return resultBuilder.build();
16478 # }
16479 # // ...
16480 #
16481 # Example (iOS / Obj-C):
16482 #
16483 # // ...
16484 # static UIColor* fromProto(Color* protocolor) {
16485 # float red = [protocolor red];
16486 # float green = [protocolor green];
16487 # float blue = [protocolor blue];
16488 # FloatValue* alpha_wrapper = [protocolor alpha];
16489 # float alpha = 1.0;
16490 # if (alpha_wrapper != nil) {
16491 # alpha = [alpha_wrapper value];
16492 # }
16493 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16494 # }
16495 #
16496 # static Color* toProto(UIColor* color) {
16497 # CGFloat red, green, blue, alpha;
16498 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16499 # return nil;
16500 # }
16501 # Color* result = [Color alloc] init];
16502 # [result setRed:red];
16503 # [result setGreen:green];
16504 # [result setBlue:blue];
16505 # if (alpha <= 0.9999) {
16506 # [result setAlpha:floatWrapperWithValue(alpha)];
16507 # }
16508 # [result autorelease];
16509 # return result;
16510 # }
16511 # // ...
16512 #
16513 # Example (JavaScript):
16514 #
16515 # // ...
16516 #
16517 # var protoToCssColor = function(rgb_color) {
16518 # var redFrac = rgb_color.red || 0.0;
16519 # var greenFrac = rgb_color.green || 0.0;
16520 # var blueFrac = rgb_color.blue || 0.0;
16521 # var red = Math.floor(redFrac * 255);
16522 # var green = Math.floor(greenFrac * 255);
16523 # var blue = Math.floor(blueFrac * 255);
16524 #
16525 # if (!('alpha' in rgb_color)) {
16526 # return rgbToCssColor_(red, green, blue);
16527 # }
16528 #
16529 # var alphaFrac = rgb_color.alpha.value || 0.0;
16530 # var rgbParams = [red, green, blue].join(',');
16531 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16532 # };
16533 #
16534 # var rgbToCssColor_ = function(red, green, blue) {
16535 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16536 # var hexString = rgbNumber.toString(16);
16537 # var missingZeros = 6 - hexString.length;
16538 # var resultBuilder = ['#'];
16539 # for (var i = 0; i < missingZeros; i++) {
16540 # resultBuilder.push('0');
16541 # }
16542 # resultBuilder.push(hexString);
16543 # return resultBuilder.join('');
16544 # };
16545 #
16546 # // ...
16547 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16548 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16549 # the final pixel color is defined by the equation:
16550 #
16551 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16552 #
16553 # This means that a value of 1.0 corresponds to a solid color, whereas
16554 # a value of 0.0 corresponds to a completely transparent color. This
16555 # uses a wrapper message rather than a simple float scalar so that it is
16556 # possible to distinguish between a default value and the value being unset.
16557 # If omitted, this color object is to be rendered as a solid color
16558 # (as if the alpha value had been explicitly given with a value of 1.0).
16559 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16560 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16561 },
16562 "width": 42, # The width of the border, in pixels.
16563 # Deprecated; the width is determined by the "style" field.
16564 "style": "A String", # The style of the border.
16565 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016566 "left": { # A border along a cell. # The left border of the cell.
16567 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16568 # for simplicity of conversion to/from color representations in various
16569 # languages over compactness; for example, the fields of this representation
16570 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16571 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16572 # method in iOS; and, with just a little work, it can be easily formatted into
16573 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16574 #
16575 # Example (Java):
16576 #
16577 # import com.google.type.Color;
16578 #
16579 # // ...
16580 # public static java.awt.Color fromProto(Color protocolor) {
16581 # float alpha = protocolor.hasAlpha()
16582 # ? protocolor.getAlpha().getValue()
16583 # : 1.0;
16584 #
16585 # return new java.awt.Color(
16586 # protocolor.getRed(),
16587 # protocolor.getGreen(),
16588 # protocolor.getBlue(),
16589 # alpha);
16590 # }
16591 #
16592 # public static Color toProto(java.awt.Color color) {
16593 # float red = (float) color.getRed();
16594 # float green = (float) color.getGreen();
16595 # float blue = (float) color.getBlue();
16596 # float denominator = 255.0;
16597 # Color.Builder resultBuilder =
16598 # Color
16599 # .newBuilder()
16600 # .setRed(red / denominator)
16601 # .setGreen(green / denominator)
16602 # .setBlue(blue / denominator);
16603 # int alpha = color.getAlpha();
16604 # if (alpha != 255) {
16605 # result.setAlpha(
16606 # FloatValue
16607 # .newBuilder()
16608 # .setValue(((float) alpha) / denominator)
16609 # .build());
16610 # }
16611 # return resultBuilder.build();
16612 # }
16613 # // ...
16614 #
16615 # Example (iOS / Obj-C):
16616 #
16617 # // ...
16618 # static UIColor* fromProto(Color* protocolor) {
16619 # float red = [protocolor red];
16620 # float green = [protocolor green];
16621 # float blue = [protocolor blue];
16622 # FloatValue* alpha_wrapper = [protocolor alpha];
16623 # float alpha = 1.0;
16624 # if (alpha_wrapper != nil) {
16625 # alpha = [alpha_wrapper value];
16626 # }
16627 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16628 # }
16629 #
16630 # static Color* toProto(UIColor* color) {
16631 # CGFloat red, green, blue, alpha;
16632 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16633 # return nil;
16634 # }
16635 # Color* result = [Color alloc] init];
16636 # [result setRed:red];
16637 # [result setGreen:green];
16638 # [result setBlue:blue];
16639 # if (alpha <= 0.9999) {
16640 # [result setAlpha:floatWrapperWithValue(alpha)];
16641 # }
16642 # [result autorelease];
16643 # return result;
16644 # }
16645 # // ...
16646 #
16647 # Example (JavaScript):
16648 #
16649 # // ...
16650 #
16651 # var protoToCssColor = function(rgb_color) {
16652 # var redFrac = rgb_color.red || 0.0;
16653 # var greenFrac = rgb_color.green || 0.0;
16654 # var blueFrac = rgb_color.blue || 0.0;
16655 # var red = Math.floor(redFrac * 255);
16656 # var green = Math.floor(greenFrac * 255);
16657 # var blue = Math.floor(blueFrac * 255);
16658 #
16659 # if (!('alpha' in rgb_color)) {
16660 # return rgbToCssColor_(red, green, blue);
16661 # }
16662 #
16663 # var alphaFrac = rgb_color.alpha.value || 0.0;
16664 # var rgbParams = [red, green, blue].join(',');
16665 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16666 # };
16667 #
16668 # var rgbToCssColor_ = function(red, green, blue) {
16669 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16670 # var hexString = rgbNumber.toString(16);
16671 # var missingZeros = 6 - hexString.length;
16672 # var resultBuilder = ['#'];
16673 # for (var i = 0; i < missingZeros; i++) {
16674 # resultBuilder.push('0');
16675 # }
16676 # resultBuilder.push(hexString);
16677 # return resultBuilder.join('');
16678 # };
16679 #
16680 # // ...
16681 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16682 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16683 # the final pixel color is defined by the equation:
16684 #
16685 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16686 #
16687 # This means that a value of 1.0 corresponds to a solid color, whereas
16688 # a value of 0.0 corresponds to a completely transparent color. This
16689 # uses a wrapper message rather than a simple float scalar so that it is
16690 # possible to distinguish between a default value and the value being unset.
16691 # If omitted, this color object is to be rendered as a solid color
16692 # (as if the alpha value had been explicitly given with a value of 1.0).
16693 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16694 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16695 },
16696 "width": 42, # The width of the border, in pixels.
16697 # Deprecated; the width is determined by the "style" field.
16698 "style": "A String", # The style of the border.
16699 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016700 "bottom": { # A border along a cell. # The bottom border of the cell.
16701 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16702 # for simplicity of conversion to/from color representations in various
16703 # languages over compactness; for example, the fields of this representation
16704 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16705 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16706 # method in iOS; and, with just a little work, it can be easily formatted into
16707 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16708 #
16709 # Example (Java):
16710 #
16711 # import com.google.type.Color;
16712 #
16713 # // ...
16714 # public static java.awt.Color fromProto(Color protocolor) {
16715 # float alpha = protocolor.hasAlpha()
16716 # ? protocolor.getAlpha().getValue()
16717 # : 1.0;
16718 #
16719 # return new java.awt.Color(
16720 # protocolor.getRed(),
16721 # protocolor.getGreen(),
16722 # protocolor.getBlue(),
16723 # alpha);
16724 # }
16725 #
16726 # public static Color toProto(java.awt.Color color) {
16727 # float red = (float) color.getRed();
16728 # float green = (float) color.getGreen();
16729 # float blue = (float) color.getBlue();
16730 # float denominator = 255.0;
16731 # Color.Builder resultBuilder =
16732 # Color
16733 # .newBuilder()
16734 # .setRed(red / denominator)
16735 # .setGreen(green / denominator)
16736 # .setBlue(blue / denominator);
16737 # int alpha = color.getAlpha();
16738 # if (alpha != 255) {
16739 # result.setAlpha(
16740 # FloatValue
16741 # .newBuilder()
16742 # .setValue(((float) alpha) / denominator)
16743 # .build());
16744 # }
16745 # return resultBuilder.build();
16746 # }
16747 # // ...
16748 #
16749 # Example (iOS / Obj-C):
16750 #
16751 # // ...
16752 # static UIColor* fromProto(Color* protocolor) {
16753 # float red = [protocolor red];
16754 # float green = [protocolor green];
16755 # float blue = [protocolor blue];
16756 # FloatValue* alpha_wrapper = [protocolor alpha];
16757 # float alpha = 1.0;
16758 # if (alpha_wrapper != nil) {
16759 # alpha = [alpha_wrapper value];
16760 # }
16761 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16762 # }
16763 #
16764 # static Color* toProto(UIColor* color) {
16765 # CGFloat red, green, blue, alpha;
16766 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16767 # return nil;
16768 # }
16769 # Color* result = [Color alloc] init];
16770 # [result setRed:red];
16771 # [result setGreen:green];
16772 # [result setBlue:blue];
16773 # if (alpha <= 0.9999) {
16774 # [result setAlpha:floatWrapperWithValue(alpha)];
16775 # }
16776 # [result autorelease];
16777 # return result;
16778 # }
16779 # // ...
16780 #
16781 # Example (JavaScript):
16782 #
16783 # // ...
16784 #
16785 # var protoToCssColor = function(rgb_color) {
16786 # var redFrac = rgb_color.red || 0.0;
16787 # var greenFrac = rgb_color.green || 0.0;
16788 # var blueFrac = rgb_color.blue || 0.0;
16789 # var red = Math.floor(redFrac * 255);
16790 # var green = Math.floor(greenFrac * 255);
16791 # var blue = Math.floor(blueFrac * 255);
16792 #
16793 # if (!('alpha' in rgb_color)) {
16794 # return rgbToCssColor_(red, green, blue);
16795 # }
16796 #
16797 # var alphaFrac = rgb_color.alpha.value || 0.0;
16798 # var rgbParams = [red, green, blue].join(',');
16799 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16800 # };
16801 #
16802 # var rgbToCssColor_ = function(red, green, blue) {
16803 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16804 # var hexString = rgbNumber.toString(16);
16805 # var missingZeros = 6 - hexString.length;
16806 # var resultBuilder = ['#'];
16807 # for (var i = 0; i < missingZeros; i++) {
16808 # resultBuilder.push('0');
16809 # }
16810 # resultBuilder.push(hexString);
16811 # return resultBuilder.join('');
16812 # };
16813 #
16814 # // ...
16815 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16816 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16817 # the final pixel color is defined by the equation:
16818 #
16819 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16820 #
16821 # This means that a value of 1.0 corresponds to a solid color, whereas
16822 # a value of 0.0 corresponds to a completely transparent color. This
16823 # uses a wrapper message rather than a simple float scalar so that it is
16824 # possible to distinguish between a default value and the value being unset.
16825 # If omitted, this color object is to be rendered as a solid color
16826 # (as if the alpha value had been explicitly given with a value of 1.0).
16827 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16828 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16829 },
16830 "width": 42, # The width of the border, in pixels.
16831 # Deprecated; the width is determined by the "style" field.
16832 "style": "A String", # The style of the border.
16833 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016834 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016835 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016836 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070016837 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016887 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016890 "startRowIndex": 42, # The start row (inclusive) 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 },
16942 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
16943 "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 },
17072 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
17073 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040018223 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040018226 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019342 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019345 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019379 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019382 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070019443 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019444 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
19445 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019503 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019506 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019560 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019563 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019635 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019638 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019713 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019716 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070019729 "title": "A String", # The title of this axis. If set, this overrides any title inferred
19730 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080019731 "format": { # The format of a run of text in a cell. # The format of the title.
19732 # Only valid if the axis is not associated with the domain.
19733 # Absent values indicate that the field isn't specified.
19734 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19735 # for simplicity of conversion to/from color representations in various
19736 # languages over compactness; for example, the fields of this representation
19737 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19738 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19739 # method in iOS; and, with just a little work, it can be easily formatted into
19740 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19741 #
19742 # Example (Java):
19743 #
19744 # import com.google.type.Color;
19745 #
19746 # // ...
19747 # public static java.awt.Color fromProto(Color protocolor) {
19748 # float alpha = protocolor.hasAlpha()
19749 # ? protocolor.getAlpha().getValue()
19750 # : 1.0;
19751 #
19752 # return new java.awt.Color(
19753 # protocolor.getRed(),
19754 # protocolor.getGreen(),
19755 # protocolor.getBlue(),
19756 # alpha);
19757 # }
19758 #
19759 # public static Color toProto(java.awt.Color color) {
19760 # float red = (float) color.getRed();
19761 # float green = (float) color.getGreen();
19762 # float blue = (float) color.getBlue();
19763 # float denominator = 255.0;
19764 # Color.Builder resultBuilder =
19765 # Color
19766 # .newBuilder()
19767 # .setRed(red / denominator)
19768 # .setGreen(green / denominator)
19769 # .setBlue(blue / denominator);
19770 # int alpha = color.getAlpha();
19771 # if (alpha != 255) {
19772 # result.setAlpha(
19773 # FloatValue
19774 # .newBuilder()
19775 # .setValue(((float) alpha) / denominator)
19776 # .build());
19777 # }
19778 # return resultBuilder.build();
19779 # }
19780 # // ...
19781 #
19782 # Example (iOS / Obj-C):
19783 #
19784 # // ...
19785 # static UIColor* fromProto(Color* protocolor) {
19786 # float red = [protocolor red];
19787 # float green = [protocolor green];
19788 # float blue = [protocolor blue];
19789 # FloatValue* alpha_wrapper = [protocolor alpha];
19790 # float alpha = 1.0;
19791 # if (alpha_wrapper != nil) {
19792 # alpha = [alpha_wrapper value];
19793 # }
19794 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19795 # }
19796 #
19797 # static Color* toProto(UIColor* color) {
19798 # CGFloat red, green, blue, alpha;
19799 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19800 # return nil;
19801 # }
19802 # Color* result = [Color alloc] init];
19803 # [result setRed:red];
19804 # [result setGreen:green];
19805 # [result setBlue:blue];
19806 # if (alpha <= 0.9999) {
19807 # [result setAlpha:floatWrapperWithValue(alpha)];
19808 # }
19809 # [result autorelease];
19810 # return result;
19811 # }
19812 # // ...
19813 #
19814 # Example (JavaScript):
19815 #
19816 # // ...
19817 #
19818 # var protoToCssColor = function(rgb_color) {
19819 # var redFrac = rgb_color.red || 0.0;
19820 # var greenFrac = rgb_color.green || 0.0;
19821 # var blueFrac = rgb_color.blue || 0.0;
19822 # var red = Math.floor(redFrac * 255);
19823 # var green = Math.floor(greenFrac * 255);
19824 # var blue = Math.floor(blueFrac * 255);
19825 #
19826 # if (!('alpha' in rgb_color)) {
19827 # return rgbToCssColor_(red, green, blue);
19828 # }
19829 #
19830 # var alphaFrac = rgb_color.alpha.value || 0.0;
19831 # var rgbParams = [red, green, blue].join(',');
19832 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19833 # };
19834 #
19835 # var rgbToCssColor_ = function(red, green, blue) {
19836 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19837 # var hexString = rgbNumber.toString(16);
19838 # var missingZeros = 6 - hexString.length;
19839 # var resultBuilder = ['#'];
19840 # for (var i = 0; i < missingZeros; i++) {
19841 # resultBuilder.push('0');
19842 # }
19843 # resultBuilder.push(hexString);
19844 # return resultBuilder.join('');
19845 # };
19846 #
19847 # // ...
19848 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19849 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19850 # the final pixel color is defined by the equation:
19851 #
19852 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19853 #
19854 # This means that a value of 1.0 corresponds to a solid color, whereas
19855 # a value of 0.0 corresponds to a completely transparent color. This
19856 # uses a wrapper message rather than a simple float scalar so that it is
19857 # possible to distinguish between a default value and the value being unset.
19858 # If omitted, this color object is to be rendered as a solid color
19859 # (as if the alpha value had been explicitly given with a value of 1.0).
19860 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19861 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19862 },
19863 "bold": True or False, # True if the text is bold.
19864 "strikethrough": True or False, # True if the text has a strikethrough.
19865 "fontFamily": "A String", # The font family.
19866 "fontSize": 42, # The size of the font.
19867 "italic": True or False, # True if the text is italicized.
19868 "underline": True or False, # True if the text is underlined.
19869 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019918 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040019921 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020002 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020005 "startRowIndex": 42, # The start row (inclusive) 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.
20016 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
20017 # This field is only visible to users with edit access to the protected
20018 # range and the document.
20019 # Editors are not supported with warning_only protection.
20020 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
20021 # range. Domain protection is only supported on documents within a domain.
20022 "users": [ # The email addresses of users with edit access to the protected range.
20023 "A String",
20024 ],
20025 "groups": [ # The email addresses of groups with edit access to the protected range.
20026 "A String",
20027 ],
20028 },
20029 "protectedRangeId": 42, # The ID of the protected range.
20030 # This field is read-only.
20031 "warningOnly": True or False, # True if this protected range will show a warning when editing.
20032 # Warning-based protection means that every user can edit data in the
20033 # protected range, except editing will prompt a warning asking the user
20034 # to confirm the edit.
20035 #
20036 # When writing: if this field is true, then editors is ignored.
20037 # Additionally, if this field is changed from true to false and the
20038 # `editors` field is not set (nor included in the field mask), then
20039 # the editors will be set to all the editors in the document.
20040 "range": { # A range on a sheet. # The range that is being protected.
20041 # The range may be fully unbounded, in which case this is considered
20042 # a protected sheet.
20043 #
20044 # When writing, only one of range or named_range_id
20045 # may be set.
20046 # All indexes are zero-based.
20047 # Indexes are half open, e.g the start index is inclusive
20048 # and the end index is exclusive -- [start_index, end_index).
20049 # Missing indexes indicate the range is unbounded on that side.
20050 #
20051 # For example, if `"Sheet1"` is sheet ID 0, then:
20052 #
20053 # `Sheet1!A1:A1 == sheet_id: 0,
20054 # start_row_index: 0, end_row_index: 1,
20055 # start_column_index: 0, end_column_index: 1`
20056 #
20057 # `Sheet1!A3:B4 == sheet_id: 0,
20058 # start_row_index: 2, end_row_index: 4,
20059 # start_column_index: 0, end_column_index: 2`
20060 #
20061 # `Sheet1!A:B == sheet_id: 0,
20062 # start_column_index: 0, end_column_index: 2`
20063 #
20064 # `Sheet1!A5:B == sheet_id: 0,
20065 # start_row_index: 4,
20066 # start_column_index: 0, end_column_index: 2`
20067 #
20068 # `Sheet1 == sheet_id:0`
20069 #
20070 # The start index must always be less than or equal to the end index.
20071 # If the start index equals the end index, then the range is empty.
20072 # Empty ranges are typically not meaningful and are usually rendered in the
20073 # UI as `#REF!`.
20074 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020075 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020076 "sheetId": 42, # The sheet this range is on.
20077 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020078 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020079 },
20080 },
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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070020091 "startRow": 42, # The first row this GridData refers to, zero-based.
20092 "startColumn": 42, # The first column this GridData refers to, zero-based.
20093 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
20094 # in start_column.
20095 { # Properties about a dimension.
20096 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
20097 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
20098 "hiddenByFilter": True or False, # True if this dimension is being filtered.
20099 # This field is read-only.
20100 },
20101 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020102 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
20103 # in start_row.
20104 { # Properties about a dimension.
20105 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
20106 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
20107 "hiddenByFilter": True or False, # True if this dimension is being filtered.
20108 # This field is read-only.
20109 },
20110 ],
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020222 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020225 "startRowIndex": 42, # The start row (inclusive) 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.
20231 "summarizeFunction": "A String", # A function to summarize the value.
20232 # If formula is set, the only supported values are
20233 # SUM and
20234 # CUSTOM.
20235 # If sourceColumnOffset is set, then `CUSTOM`
20236 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020237 "name": "A String", # A name to use for the value. This is only used if formula was set.
20238 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020239 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
20240 #
20241 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20242 # means this value refers to column `C`, whereas the offset `1` would
20243 # refer to column `D`.
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 },
20395 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
20396 "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 },
20525 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
20526 "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 },
21244 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
21245 "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 },
21374 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
21375 "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.
22285 "rowCount": 42, # The number of rows in the grid.
22286 "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.
22288 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
22289 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022473 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022476 "startRowIndex": 42, # The start row (inclusive) 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.
22543 "rowCount": 42, # The number of rows in the grid.
22544 "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.
22546 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
22547 },
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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070022696 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022697 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22698 # from the anchor cell.
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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070022720 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022721 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22722 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022780 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022783 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022837 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022840 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022912 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022915 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022990 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022993 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070023006 "title": "A String", # The title of this axis. If set, this overrides any title inferred
23007 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023008 "format": { # The format of a run of text in a cell. # The format of the title.
23009 # Only valid if the axis is not associated with the domain.
23010 # Absent values indicate that the field isn't specified.
23011 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23012 # for simplicity of conversion to/from color representations in various
23013 # languages over compactness; for example, the fields of this representation
23014 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23015 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23016 # method in iOS; and, with just a little work, it can be easily formatted into
23017 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23018 #
23019 # Example (Java):
23020 #
23021 # import com.google.type.Color;
23022 #
23023 # // ...
23024 # public static java.awt.Color fromProto(Color protocolor) {
23025 # float alpha = protocolor.hasAlpha()
23026 # ? protocolor.getAlpha().getValue()
23027 # : 1.0;
23028 #
23029 # return new java.awt.Color(
23030 # protocolor.getRed(),
23031 # protocolor.getGreen(),
23032 # protocolor.getBlue(),
23033 # alpha);
23034 # }
23035 #
23036 # public static Color toProto(java.awt.Color color) {
23037 # float red = (float) color.getRed();
23038 # float green = (float) color.getGreen();
23039 # float blue = (float) color.getBlue();
23040 # float denominator = 255.0;
23041 # Color.Builder resultBuilder =
23042 # Color
23043 # .newBuilder()
23044 # .setRed(red / denominator)
23045 # .setGreen(green / denominator)
23046 # .setBlue(blue / denominator);
23047 # int alpha = color.getAlpha();
23048 # if (alpha != 255) {
23049 # result.setAlpha(
23050 # FloatValue
23051 # .newBuilder()
23052 # .setValue(((float) alpha) / denominator)
23053 # .build());
23054 # }
23055 # return resultBuilder.build();
23056 # }
23057 # // ...
23058 #
23059 # Example (iOS / Obj-C):
23060 #
23061 # // ...
23062 # static UIColor* fromProto(Color* protocolor) {
23063 # float red = [protocolor red];
23064 # float green = [protocolor green];
23065 # float blue = [protocolor blue];
23066 # FloatValue* alpha_wrapper = [protocolor alpha];
23067 # float alpha = 1.0;
23068 # if (alpha_wrapper != nil) {
23069 # alpha = [alpha_wrapper value];
23070 # }
23071 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23072 # }
23073 #
23074 # static Color* toProto(UIColor* color) {
23075 # CGFloat red, green, blue, alpha;
23076 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23077 # return nil;
23078 # }
23079 # Color* result = [Color alloc] init];
23080 # [result setRed:red];
23081 # [result setGreen:green];
23082 # [result setBlue:blue];
23083 # if (alpha <= 0.9999) {
23084 # [result setAlpha:floatWrapperWithValue(alpha)];
23085 # }
23086 # [result autorelease];
23087 # return result;
23088 # }
23089 # // ...
23090 #
23091 # Example (JavaScript):
23092 #
23093 # // ...
23094 #
23095 # var protoToCssColor = function(rgb_color) {
23096 # var redFrac = rgb_color.red || 0.0;
23097 # var greenFrac = rgb_color.green || 0.0;
23098 # var blueFrac = rgb_color.blue || 0.0;
23099 # var red = Math.floor(redFrac * 255);
23100 # var green = Math.floor(greenFrac * 255);
23101 # var blue = Math.floor(blueFrac * 255);
23102 #
23103 # if (!('alpha' in rgb_color)) {
23104 # return rgbToCssColor_(red, green, blue);
23105 # }
23106 #
23107 # var alphaFrac = rgb_color.alpha.value || 0.0;
23108 # var rgbParams = [red, green, blue].join(',');
23109 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23110 # };
23111 #
23112 # var rgbToCssColor_ = function(red, green, blue) {
23113 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23114 # var hexString = rgbNumber.toString(16);
23115 # var missingZeros = 6 - hexString.length;
23116 # var resultBuilder = ['#'];
23117 # for (var i = 0; i < missingZeros; i++) {
23118 # resultBuilder.push('0');
23119 # }
23120 # resultBuilder.push(hexString);
23121 # return resultBuilder.join('');
23122 # };
23123 #
23124 # // ...
23125 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23126 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23127 # the final pixel color is defined by the equation:
23128 #
23129 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23130 #
23131 # This means that a value of 1.0 corresponds to a solid color, whereas
23132 # a value of 0.0 corresponds to a completely transparent color. This
23133 # uses a wrapper message rather than a simple float scalar so that it is
23134 # possible to distinguish between a default value and the value being unset.
23135 # If omitted, this color object is to be rendered as a solid color
23136 # (as if the alpha value had been explicitly given with a value of 1.0).
23137 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23138 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23139 },
23140 "bold": True or False, # True if the text is bold.
23141 "strikethrough": True or False, # True if the text has a strikethrough.
23142 "fontFamily": "A String", # The font family.
23143 "fontSize": 42, # The size of the font.
23144 "italic": True or False, # True if the text is italicized.
23145 "underline": True or False, # True if the text is underlined.
23146 },
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).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023157 "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 -070023158 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023159 "ranges": [ # The ranges that will be formatted if the condition is true.
23160 # All the ranges must be on the same grid.
23161 { # A range on a sheet.
23162 # All indexes are zero-based.
23163 # Indexes are half open, e.g the start index is inclusive
23164 # and the end index is exclusive -- [start_index, end_index).
23165 # Missing indexes indicate the range is unbounded on that side.
23166 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023167 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023168 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023169 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023170 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023171 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023172 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023173 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023174 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023175 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023176 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023177 # `Sheet1!A:B == sheet_id: 0,
23178 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023179 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023180 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023181 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023182 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023183 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023184 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023185 #
23186 # The start index must always be less than or equal to the end index.
23187 # If the start index equals the end index, then the range is empty.
23188 # Empty ranges are typically not meaningful and are usually rendered in the
23189 # UI as `#REF!`.
23190 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023191 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023192 "sheetId": 42, # The sheet this range is on.
23193 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023194 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023195 },
23196 ],
23197 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
23198 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
23199 # the format will be applied.
23200 # BooleanConditions are used by conditional formatting,
23201 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023202 "values": [ # The values of the condition. The number of supported values depends
23203 # on the condition type. Some support zero values,
23204 # others one or two values,
23205 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
23206 { # The value of the condition.
23207 "relativeDate": "A String", # A relative date (based on the current date).
23208 # Valid only if the type is
23209 # DATE_BEFORE,
23210 # DATE_AFTER,
23211 # DATE_ON_OR_BEFORE or
23212 # DATE_ON_OR_AFTER.
23213 #
23214 # Relative dates are not supported in data validation.
23215 # They are supported only in conditional formatting and
23216 # conditional filters.
23217 "userEnteredValue": "A String", # A value the condition is based on.
23218 # The value will be parsed as if the user typed into a cell.
23219 # Formulas are supported (and must begin with an `=`).
23220 },
23221 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023222 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023223 },
23224 "format": { # The format of a cell. # The format to apply.
23225 # Conditional formatting can only apply a subset of formatting:
23226 # bold, italic,
23227 # strikethrough,
23228 # foreground color &
23229 # background color.
23230 "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 -070023231 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
23232 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023233 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070023234 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023235 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023236 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023237 },
23238 "textDirection": "A String", # The direction of the text in the cell.
23239 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
23240 # When updating padding, every field must be specified.
23241 "top": 42, # The top padding of the cell.
23242 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023243 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023244 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023245 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023246 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023247 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
23248 # for simplicity of conversion to/from color representations in various
23249 # languages over compactness; for example, the fields of this representation
23250 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23251 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23252 # method in iOS; and, with just a little work, it can be easily formatted into
23253 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23254 #
23255 # Example (Java):
23256 #
23257 # import com.google.type.Color;
23258 #
23259 # // ...
23260 # public static java.awt.Color fromProto(Color protocolor) {
23261 # float alpha = protocolor.hasAlpha()
23262 # ? protocolor.getAlpha().getValue()
23263 # : 1.0;
23264 #
23265 # return new java.awt.Color(
23266 # protocolor.getRed(),
23267 # protocolor.getGreen(),
23268 # protocolor.getBlue(),
23269 # alpha);
23270 # }
23271 #
23272 # public static Color toProto(java.awt.Color color) {
23273 # float red = (float) color.getRed();
23274 # float green = (float) color.getGreen();
23275 # float blue = (float) color.getBlue();
23276 # float denominator = 255.0;
23277 # Color.Builder resultBuilder =
23278 # Color
23279 # .newBuilder()
23280 # .setRed(red / denominator)
23281 # .setGreen(green / denominator)
23282 # .setBlue(blue / denominator);
23283 # int alpha = color.getAlpha();
23284 # if (alpha != 255) {
23285 # result.setAlpha(
23286 # FloatValue
23287 # .newBuilder()
23288 # .setValue(((float) alpha) / denominator)
23289 # .build());
23290 # }
23291 # return resultBuilder.build();
23292 # }
23293 # // ...
23294 #
23295 # Example (iOS / Obj-C):
23296 #
23297 # // ...
23298 # static UIColor* fromProto(Color* protocolor) {
23299 # float red = [protocolor red];
23300 # float green = [protocolor green];
23301 # float blue = [protocolor blue];
23302 # FloatValue* alpha_wrapper = [protocolor alpha];
23303 # float alpha = 1.0;
23304 # if (alpha_wrapper != nil) {
23305 # alpha = [alpha_wrapper value];
23306 # }
23307 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23308 # }
23309 #
23310 # static Color* toProto(UIColor* color) {
23311 # CGFloat red, green, blue, alpha;
23312 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23313 # return nil;
23314 # }
23315 # Color* result = [Color alloc] init];
23316 # [result setRed:red];
23317 # [result setGreen:green];
23318 # [result setBlue:blue];
23319 # if (alpha <= 0.9999) {
23320 # [result setAlpha:floatWrapperWithValue(alpha)];
23321 # }
23322 # [result autorelease];
23323 # return result;
23324 # }
23325 # // ...
23326 #
23327 # Example (JavaScript):
23328 #
23329 # // ...
23330 #
23331 # var protoToCssColor = function(rgb_color) {
23332 # var redFrac = rgb_color.red || 0.0;
23333 # var greenFrac = rgb_color.green || 0.0;
23334 # var blueFrac = rgb_color.blue || 0.0;
23335 # var red = Math.floor(redFrac * 255);
23336 # var green = Math.floor(greenFrac * 255);
23337 # var blue = Math.floor(blueFrac * 255);
23338 #
23339 # if (!('alpha' in rgb_color)) {
23340 # return rgbToCssColor_(red, green, blue);
23341 # }
23342 #
23343 # var alphaFrac = rgb_color.alpha.value || 0.0;
23344 # var rgbParams = [red, green, blue].join(',');
23345 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23346 # };
23347 #
23348 # var rgbToCssColor_ = function(red, green, blue) {
23349 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23350 # var hexString = rgbNumber.toString(16);
23351 # var missingZeros = 6 - hexString.length;
23352 # var resultBuilder = ['#'];
23353 # for (var i = 0; i < missingZeros; i++) {
23354 # resultBuilder.push('0');
23355 # }
23356 # resultBuilder.push(hexString);
23357 # return resultBuilder.join('');
23358 # };
23359 #
23360 # // ...
23361 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23362 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23363 # the final pixel color is defined by the equation:
23364 #
23365 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23366 #
23367 # This means that a value of 1.0 corresponds to a solid color, whereas
23368 # a value of 0.0 corresponds to a completely transparent color. This
23369 # uses a wrapper message rather than a simple float scalar so that it is
23370 # possible to distinguish between a default value and the value being unset.
23371 # If omitted, this color object is to be rendered as a solid color
23372 # (as if the alpha value had been explicitly given with a value of 1.0).
23373 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23374 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23375 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023376 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023377 "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).
23378 # Absent values indicate that the field isn't specified.
23379 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23380 # for simplicity of conversion to/from color representations in various
23381 # languages over compactness; for example, the fields of this representation
23382 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23383 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23384 # method in iOS; and, with just a little work, it can be easily formatted into
23385 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23386 #
23387 # Example (Java):
23388 #
23389 # import com.google.type.Color;
23390 #
23391 # // ...
23392 # public static java.awt.Color fromProto(Color protocolor) {
23393 # float alpha = protocolor.hasAlpha()
23394 # ? protocolor.getAlpha().getValue()
23395 # : 1.0;
23396 #
23397 # return new java.awt.Color(
23398 # protocolor.getRed(),
23399 # protocolor.getGreen(),
23400 # protocolor.getBlue(),
23401 # alpha);
23402 # }
23403 #
23404 # public static Color toProto(java.awt.Color color) {
23405 # float red = (float) color.getRed();
23406 # float green = (float) color.getGreen();
23407 # float blue = (float) color.getBlue();
23408 # float denominator = 255.0;
23409 # Color.Builder resultBuilder =
23410 # Color
23411 # .newBuilder()
23412 # .setRed(red / denominator)
23413 # .setGreen(green / denominator)
23414 # .setBlue(blue / denominator);
23415 # int alpha = color.getAlpha();
23416 # if (alpha != 255) {
23417 # result.setAlpha(
23418 # FloatValue
23419 # .newBuilder()
23420 # .setValue(((float) alpha) / denominator)
23421 # .build());
23422 # }
23423 # return resultBuilder.build();
23424 # }
23425 # // ...
23426 #
23427 # Example (iOS / Obj-C):
23428 #
23429 # // ...
23430 # static UIColor* fromProto(Color* protocolor) {
23431 # float red = [protocolor red];
23432 # float green = [protocolor green];
23433 # float blue = [protocolor blue];
23434 # FloatValue* alpha_wrapper = [protocolor alpha];
23435 # float alpha = 1.0;
23436 # if (alpha_wrapper != nil) {
23437 # alpha = [alpha_wrapper value];
23438 # }
23439 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23440 # }
23441 #
23442 # static Color* toProto(UIColor* color) {
23443 # CGFloat red, green, blue, alpha;
23444 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23445 # return nil;
23446 # }
23447 # Color* result = [Color alloc] init];
23448 # [result setRed:red];
23449 # [result setGreen:green];
23450 # [result setBlue:blue];
23451 # if (alpha <= 0.9999) {
23452 # [result setAlpha:floatWrapperWithValue(alpha)];
23453 # }
23454 # [result autorelease];
23455 # return result;
23456 # }
23457 # // ...
23458 #
23459 # Example (JavaScript):
23460 #
23461 # // ...
23462 #
23463 # var protoToCssColor = function(rgb_color) {
23464 # var redFrac = rgb_color.red || 0.0;
23465 # var greenFrac = rgb_color.green || 0.0;
23466 # var blueFrac = rgb_color.blue || 0.0;
23467 # var red = Math.floor(redFrac * 255);
23468 # var green = Math.floor(greenFrac * 255);
23469 # var blue = Math.floor(blueFrac * 255);
23470 #
23471 # if (!('alpha' in rgb_color)) {
23472 # return rgbToCssColor_(red, green, blue);
23473 # }
23474 #
23475 # var alphaFrac = rgb_color.alpha.value || 0.0;
23476 # var rgbParams = [red, green, blue].join(',');
23477 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23478 # };
23479 #
23480 # var rgbToCssColor_ = function(red, green, blue) {
23481 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23482 # var hexString = rgbNumber.toString(16);
23483 # var missingZeros = 6 - hexString.length;
23484 # var resultBuilder = ['#'];
23485 # for (var i = 0; i < missingZeros; i++) {
23486 # resultBuilder.push('0');
23487 # }
23488 # resultBuilder.push(hexString);
23489 # return resultBuilder.join('');
23490 # };
23491 #
23492 # // ...
23493 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23494 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23495 # the final pixel color is defined by the equation:
23496 #
23497 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23498 #
23499 # This means that a value of 1.0 corresponds to a solid color, whereas
23500 # a value of 0.0 corresponds to a completely transparent color. This
23501 # uses a wrapper message rather than a simple float scalar so that it is
23502 # possible to distinguish between a default value and the value being unset.
23503 # If omitted, this color object is to be rendered as a solid color
23504 # (as if the alpha value had been explicitly given with a value of 1.0).
23505 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23506 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23507 },
23508 "bold": True or False, # True if the text is bold.
23509 "strikethrough": True or False, # True if the text has a strikethrough.
23510 "fontFamily": "A String", # The font family.
23511 "fontSize": 42, # The size of the font.
23512 "italic": True or False, # True if the text is italicized.
23513 "underline": True or False, # True if the text is underlined.
23514 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070023515 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
23516 "angle": 42, # The angle between the standard orientation and the desired orientation.
23517 # Measured in degrees. Valid values are between -90 and 90. Positive
23518 # angles are angled upwards, negative are angled downwards.
23519 #
23520 # Note: For LTR text direction positive angles are in the counterclockwise
23521 # direction, whereas for RTL they are in the clockwise direction
23522 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
23523 # characters is unchanged.
23524 # For example:
23525 #
23526 # | V |
23527 # | e |
23528 # | r |
23529 # | t |
23530 # | i |
23531 # | c |
23532 # | a |
23533 # | l |
23534 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023535 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
23536 "borders": { # The borders of the cell. # The borders of the cell.
23537 "top": { # A border along a cell. # The top border of the cell.
23538 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23539 # for simplicity of conversion to/from color representations in various
23540 # languages over compactness; for example, the fields of this representation
23541 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23542 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23543 # method in iOS; and, with just a little work, it can be easily formatted into
23544 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23545 #
23546 # Example (Java):
23547 #
23548 # import com.google.type.Color;
23549 #
23550 # // ...
23551 # public static java.awt.Color fromProto(Color protocolor) {
23552 # float alpha = protocolor.hasAlpha()
23553 # ? protocolor.getAlpha().getValue()
23554 # : 1.0;
23555 #
23556 # return new java.awt.Color(
23557 # protocolor.getRed(),
23558 # protocolor.getGreen(),
23559 # protocolor.getBlue(),
23560 # alpha);
23561 # }
23562 #
23563 # public static Color toProto(java.awt.Color color) {
23564 # float red = (float) color.getRed();
23565 # float green = (float) color.getGreen();
23566 # float blue = (float) color.getBlue();
23567 # float denominator = 255.0;
23568 # Color.Builder resultBuilder =
23569 # Color
23570 # .newBuilder()
23571 # .setRed(red / denominator)
23572 # .setGreen(green / denominator)
23573 # .setBlue(blue / denominator);
23574 # int alpha = color.getAlpha();
23575 # if (alpha != 255) {
23576 # result.setAlpha(
23577 # FloatValue
23578 # .newBuilder()
23579 # .setValue(((float) alpha) / denominator)
23580 # .build());
23581 # }
23582 # return resultBuilder.build();
23583 # }
23584 # // ...
23585 #
23586 # Example (iOS / Obj-C):
23587 #
23588 # // ...
23589 # static UIColor* fromProto(Color* protocolor) {
23590 # float red = [protocolor red];
23591 # float green = [protocolor green];
23592 # float blue = [protocolor blue];
23593 # FloatValue* alpha_wrapper = [protocolor alpha];
23594 # float alpha = 1.0;
23595 # if (alpha_wrapper != nil) {
23596 # alpha = [alpha_wrapper value];
23597 # }
23598 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23599 # }
23600 #
23601 # static Color* toProto(UIColor* color) {
23602 # CGFloat red, green, blue, alpha;
23603 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23604 # return nil;
23605 # }
23606 # Color* result = [Color alloc] init];
23607 # [result setRed:red];
23608 # [result setGreen:green];
23609 # [result setBlue:blue];
23610 # if (alpha <= 0.9999) {
23611 # [result setAlpha:floatWrapperWithValue(alpha)];
23612 # }
23613 # [result autorelease];
23614 # return result;
23615 # }
23616 # // ...
23617 #
23618 # Example (JavaScript):
23619 #
23620 # // ...
23621 #
23622 # var protoToCssColor = function(rgb_color) {
23623 # var redFrac = rgb_color.red || 0.0;
23624 # var greenFrac = rgb_color.green || 0.0;
23625 # var blueFrac = rgb_color.blue || 0.0;
23626 # var red = Math.floor(redFrac * 255);
23627 # var green = Math.floor(greenFrac * 255);
23628 # var blue = Math.floor(blueFrac * 255);
23629 #
23630 # if (!('alpha' in rgb_color)) {
23631 # return rgbToCssColor_(red, green, blue);
23632 # }
23633 #
23634 # var alphaFrac = rgb_color.alpha.value || 0.0;
23635 # var rgbParams = [red, green, blue].join(',');
23636 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23637 # };
23638 #
23639 # var rgbToCssColor_ = function(red, green, blue) {
23640 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23641 # var hexString = rgbNumber.toString(16);
23642 # var missingZeros = 6 - hexString.length;
23643 # var resultBuilder = ['#'];
23644 # for (var i = 0; i < missingZeros; i++) {
23645 # resultBuilder.push('0');
23646 # }
23647 # resultBuilder.push(hexString);
23648 # return resultBuilder.join('');
23649 # };
23650 #
23651 # // ...
23652 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23653 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23654 # the final pixel color is defined by the equation:
23655 #
23656 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23657 #
23658 # This means that a value of 1.0 corresponds to a solid color, whereas
23659 # a value of 0.0 corresponds to a completely transparent color. This
23660 # uses a wrapper message rather than a simple float scalar so that it is
23661 # possible to distinguish between a default value and the value being unset.
23662 # If omitted, this color object is to be rendered as a solid color
23663 # (as if the alpha value had been explicitly given with a value of 1.0).
23664 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23665 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23666 },
23667 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023668 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023669 "style": "A String", # The style of the border.
23670 },
23671 "right": { # A border along a cell. # The right border of the cell.
23672 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23673 # for simplicity of conversion to/from color representations in various
23674 # languages over compactness; for example, the fields of this representation
23675 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23676 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23677 # method in iOS; and, with just a little work, it can be easily formatted into
23678 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23679 #
23680 # Example (Java):
23681 #
23682 # import com.google.type.Color;
23683 #
23684 # // ...
23685 # public static java.awt.Color fromProto(Color protocolor) {
23686 # float alpha = protocolor.hasAlpha()
23687 # ? protocolor.getAlpha().getValue()
23688 # : 1.0;
23689 #
23690 # return new java.awt.Color(
23691 # protocolor.getRed(),
23692 # protocolor.getGreen(),
23693 # protocolor.getBlue(),
23694 # alpha);
23695 # }
23696 #
23697 # public static Color toProto(java.awt.Color color) {
23698 # float red = (float) color.getRed();
23699 # float green = (float) color.getGreen();
23700 # float blue = (float) color.getBlue();
23701 # float denominator = 255.0;
23702 # Color.Builder resultBuilder =
23703 # Color
23704 # .newBuilder()
23705 # .setRed(red / denominator)
23706 # .setGreen(green / denominator)
23707 # .setBlue(blue / denominator);
23708 # int alpha = color.getAlpha();
23709 # if (alpha != 255) {
23710 # result.setAlpha(
23711 # FloatValue
23712 # .newBuilder()
23713 # .setValue(((float) alpha) / denominator)
23714 # .build());
23715 # }
23716 # return resultBuilder.build();
23717 # }
23718 # // ...
23719 #
23720 # Example (iOS / Obj-C):
23721 #
23722 # // ...
23723 # static UIColor* fromProto(Color* protocolor) {
23724 # float red = [protocolor red];
23725 # float green = [protocolor green];
23726 # float blue = [protocolor blue];
23727 # FloatValue* alpha_wrapper = [protocolor alpha];
23728 # float alpha = 1.0;
23729 # if (alpha_wrapper != nil) {
23730 # alpha = [alpha_wrapper value];
23731 # }
23732 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23733 # }
23734 #
23735 # static Color* toProto(UIColor* color) {
23736 # CGFloat red, green, blue, alpha;
23737 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23738 # return nil;
23739 # }
23740 # Color* result = [Color alloc] init];
23741 # [result setRed:red];
23742 # [result setGreen:green];
23743 # [result setBlue:blue];
23744 # if (alpha <= 0.9999) {
23745 # [result setAlpha:floatWrapperWithValue(alpha)];
23746 # }
23747 # [result autorelease];
23748 # return result;
23749 # }
23750 # // ...
23751 #
23752 # Example (JavaScript):
23753 #
23754 # // ...
23755 #
23756 # var protoToCssColor = function(rgb_color) {
23757 # var redFrac = rgb_color.red || 0.0;
23758 # var greenFrac = rgb_color.green || 0.0;
23759 # var blueFrac = rgb_color.blue || 0.0;
23760 # var red = Math.floor(redFrac * 255);
23761 # var green = Math.floor(greenFrac * 255);
23762 # var blue = Math.floor(blueFrac * 255);
23763 #
23764 # if (!('alpha' in rgb_color)) {
23765 # return rgbToCssColor_(red, green, blue);
23766 # }
23767 #
23768 # var alphaFrac = rgb_color.alpha.value || 0.0;
23769 # var rgbParams = [red, green, blue].join(',');
23770 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23771 # };
23772 #
23773 # var rgbToCssColor_ = function(red, green, blue) {
23774 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23775 # var hexString = rgbNumber.toString(16);
23776 # var missingZeros = 6 - hexString.length;
23777 # var resultBuilder = ['#'];
23778 # for (var i = 0; i < missingZeros; i++) {
23779 # resultBuilder.push('0');
23780 # }
23781 # resultBuilder.push(hexString);
23782 # return resultBuilder.join('');
23783 # };
23784 #
23785 # // ...
23786 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23787 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23788 # the final pixel color is defined by the equation:
23789 #
23790 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23791 #
23792 # This means that a value of 1.0 corresponds to a solid color, whereas
23793 # a value of 0.0 corresponds to a completely transparent color. This
23794 # uses a wrapper message rather than a simple float scalar so that it is
23795 # possible to distinguish between a default value and the value being unset.
23796 # If omitted, this color object is to be rendered as a solid color
23797 # (as if the alpha value had been explicitly given with a value of 1.0).
23798 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23799 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23800 },
23801 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023802 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023803 "style": "A String", # The style of the border.
23804 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023805 "left": { # A border along a cell. # The left border of the cell.
23806 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23807 # for simplicity of conversion to/from color representations in various
23808 # languages over compactness; for example, the fields of this representation
23809 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23810 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23811 # method in iOS; and, with just a little work, it can be easily formatted into
23812 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23813 #
23814 # Example (Java):
23815 #
23816 # import com.google.type.Color;
23817 #
23818 # // ...
23819 # public static java.awt.Color fromProto(Color protocolor) {
23820 # float alpha = protocolor.hasAlpha()
23821 # ? protocolor.getAlpha().getValue()
23822 # : 1.0;
23823 #
23824 # return new java.awt.Color(
23825 # protocolor.getRed(),
23826 # protocolor.getGreen(),
23827 # protocolor.getBlue(),
23828 # alpha);
23829 # }
23830 #
23831 # public static Color toProto(java.awt.Color color) {
23832 # float red = (float) color.getRed();
23833 # float green = (float) color.getGreen();
23834 # float blue = (float) color.getBlue();
23835 # float denominator = 255.0;
23836 # Color.Builder resultBuilder =
23837 # Color
23838 # .newBuilder()
23839 # .setRed(red / denominator)
23840 # .setGreen(green / denominator)
23841 # .setBlue(blue / denominator);
23842 # int alpha = color.getAlpha();
23843 # if (alpha != 255) {
23844 # result.setAlpha(
23845 # FloatValue
23846 # .newBuilder()
23847 # .setValue(((float) alpha) / denominator)
23848 # .build());
23849 # }
23850 # return resultBuilder.build();
23851 # }
23852 # // ...
23853 #
23854 # Example (iOS / Obj-C):
23855 #
23856 # // ...
23857 # static UIColor* fromProto(Color* protocolor) {
23858 # float red = [protocolor red];
23859 # float green = [protocolor green];
23860 # float blue = [protocolor blue];
23861 # FloatValue* alpha_wrapper = [protocolor alpha];
23862 # float alpha = 1.0;
23863 # if (alpha_wrapper != nil) {
23864 # alpha = [alpha_wrapper value];
23865 # }
23866 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23867 # }
23868 #
23869 # static Color* toProto(UIColor* color) {
23870 # CGFloat red, green, blue, alpha;
23871 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23872 # return nil;
23873 # }
23874 # Color* result = [Color alloc] init];
23875 # [result setRed:red];
23876 # [result setGreen:green];
23877 # [result setBlue:blue];
23878 # if (alpha <= 0.9999) {
23879 # [result setAlpha:floatWrapperWithValue(alpha)];
23880 # }
23881 # [result autorelease];
23882 # return result;
23883 # }
23884 # // ...
23885 #
23886 # Example (JavaScript):
23887 #
23888 # // ...
23889 #
23890 # var protoToCssColor = function(rgb_color) {
23891 # var redFrac = rgb_color.red || 0.0;
23892 # var greenFrac = rgb_color.green || 0.0;
23893 # var blueFrac = rgb_color.blue || 0.0;
23894 # var red = Math.floor(redFrac * 255);
23895 # var green = Math.floor(greenFrac * 255);
23896 # var blue = Math.floor(blueFrac * 255);
23897 #
23898 # if (!('alpha' in rgb_color)) {
23899 # return rgbToCssColor_(red, green, blue);
23900 # }
23901 #
23902 # var alphaFrac = rgb_color.alpha.value || 0.0;
23903 # var rgbParams = [red, green, blue].join(',');
23904 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23905 # };
23906 #
23907 # var rgbToCssColor_ = function(red, green, blue) {
23908 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23909 # var hexString = rgbNumber.toString(16);
23910 # var missingZeros = 6 - hexString.length;
23911 # var resultBuilder = ['#'];
23912 # for (var i = 0; i < missingZeros; i++) {
23913 # resultBuilder.push('0');
23914 # }
23915 # resultBuilder.push(hexString);
23916 # return resultBuilder.join('');
23917 # };
23918 #
23919 # // ...
23920 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23921 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23922 # the final pixel color is defined by the equation:
23923 #
23924 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23925 #
23926 # This means that a value of 1.0 corresponds to a solid color, whereas
23927 # a value of 0.0 corresponds to a completely transparent color. This
23928 # uses a wrapper message rather than a simple float scalar so that it is
23929 # possible to distinguish between a default value and the value being unset.
23930 # If omitted, this color object is to be rendered as a solid color
23931 # (as if the alpha value had been explicitly given with a value of 1.0).
23932 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23933 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23934 },
23935 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023936 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023937 "style": "A String", # The style of the border.
23938 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070023939 "bottom": { # A border along a cell. # The bottom border of the cell.
23940 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23941 # for simplicity of conversion to/from color representations in various
23942 # languages over compactness; for example, the fields of this representation
23943 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23944 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23945 # method in iOS; and, with just a little work, it can be easily formatted into
23946 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23947 #
23948 # Example (Java):
23949 #
23950 # import com.google.type.Color;
23951 #
23952 # // ...
23953 # public static java.awt.Color fromProto(Color protocolor) {
23954 # float alpha = protocolor.hasAlpha()
23955 # ? protocolor.getAlpha().getValue()
23956 # : 1.0;
23957 #
23958 # return new java.awt.Color(
23959 # protocolor.getRed(),
23960 # protocolor.getGreen(),
23961 # protocolor.getBlue(),
23962 # alpha);
23963 # }
23964 #
23965 # public static Color toProto(java.awt.Color color) {
23966 # float red = (float) color.getRed();
23967 # float green = (float) color.getGreen();
23968 # float blue = (float) color.getBlue();
23969 # float denominator = 255.0;
23970 # Color.Builder resultBuilder =
23971 # Color
23972 # .newBuilder()
23973 # .setRed(red / denominator)
23974 # .setGreen(green / denominator)
23975 # .setBlue(blue / denominator);
23976 # int alpha = color.getAlpha();
23977 # if (alpha != 255) {
23978 # result.setAlpha(
23979 # FloatValue
23980 # .newBuilder()
23981 # .setValue(((float) alpha) / denominator)
23982 # .build());
23983 # }
23984 # return resultBuilder.build();
23985 # }
23986 # // ...
23987 #
23988 # Example (iOS / Obj-C):
23989 #
23990 # // ...
23991 # static UIColor* fromProto(Color* protocolor) {
23992 # float red = [protocolor red];
23993 # float green = [protocolor green];
23994 # float blue = [protocolor blue];
23995 # FloatValue* alpha_wrapper = [protocolor alpha];
23996 # float alpha = 1.0;
23997 # if (alpha_wrapper != nil) {
23998 # alpha = [alpha_wrapper value];
23999 # }
24000 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24001 # }
24002 #
24003 # static Color* toProto(UIColor* color) {
24004 # CGFloat red, green, blue, alpha;
24005 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24006 # return nil;
24007 # }
24008 # Color* result = [Color alloc] init];
24009 # [result setRed:red];
24010 # [result setGreen:green];
24011 # [result setBlue:blue];
24012 # if (alpha <= 0.9999) {
24013 # [result setAlpha:floatWrapperWithValue(alpha)];
24014 # }
24015 # [result autorelease];
24016 # return result;
24017 # }
24018 # // ...
24019 #
24020 # Example (JavaScript):
24021 #
24022 # // ...
24023 #
24024 # var protoToCssColor = function(rgb_color) {
24025 # var redFrac = rgb_color.red || 0.0;
24026 # var greenFrac = rgb_color.green || 0.0;
24027 # var blueFrac = rgb_color.blue || 0.0;
24028 # var red = Math.floor(redFrac * 255);
24029 # var green = Math.floor(greenFrac * 255);
24030 # var blue = Math.floor(blueFrac * 255);
24031 #
24032 # if (!('alpha' in rgb_color)) {
24033 # return rgbToCssColor_(red, green, blue);
24034 # }
24035 #
24036 # var alphaFrac = rgb_color.alpha.value || 0.0;
24037 # var rgbParams = [red, green, blue].join(',');
24038 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24039 # };
24040 #
24041 # var rgbToCssColor_ = function(red, green, blue) {
24042 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24043 # var hexString = rgbNumber.toString(16);
24044 # var missingZeros = 6 - hexString.length;
24045 # var resultBuilder = ['#'];
24046 # for (var i = 0; i < missingZeros; i++) {
24047 # resultBuilder.push('0');
24048 # }
24049 # resultBuilder.push(hexString);
24050 # return resultBuilder.join('');
24051 # };
24052 #
24053 # // ...
24054 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24055 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24056 # the final pixel color is defined by the equation:
24057 #
24058 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24059 #
24060 # This means that a value of 1.0 corresponds to a solid color, whereas
24061 # a value of 0.0 corresponds to a completely transparent color. This
24062 # uses a wrapper message rather than a simple float scalar so that it is
24063 # possible to distinguish between a default value and the value being unset.
24064 # If omitted, this color object is to be rendered as a solid color
24065 # (as if the alpha value had been explicitly given with a value of 1.0).
24066 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24067 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24068 },
24069 "width": 42, # The width of the border, in pixels.
24070 # Deprecated; the width is determined by the "style" field.
24071 "style": "A String", # The style of the border.
24072 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024073 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070024074 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024075 },
24076 },
24077 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
24078 # the interpolation points listed. The format of a cell will vary
24079 # based on its contents as compared to the values of the interpolation
24080 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024081 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024082 # These pin the gradient color scale according to the color,
24083 # type and value chosen.
24084 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24085 # for simplicity of conversion to/from color representations in various
24086 # languages over compactness; for example, the fields of this representation
24087 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24088 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24089 # method in iOS; and, with just a little work, it can be easily formatted into
24090 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24091 #
24092 # Example (Java):
24093 #
24094 # import com.google.type.Color;
24095 #
24096 # // ...
24097 # public static java.awt.Color fromProto(Color protocolor) {
24098 # float alpha = protocolor.hasAlpha()
24099 # ? protocolor.getAlpha().getValue()
24100 # : 1.0;
24101 #
24102 # return new java.awt.Color(
24103 # protocolor.getRed(),
24104 # protocolor.getGreen(),
24105 # protocolor.getBlue(),
24106 # alpha);
24107 # }
24108 #
24109 # public static Color toProto(java.awt.Color color) {
24110 # float red = (float) color.getRed();
24111 # float green = (float) color.getGreen();
24112 # float blue = (float) color.getBlue();
24113 # float denominator = 255.0;
24114 # Color.Builder resultBuilder =
24115 # Color
24116 # .newBuilder()
24117 # .setRed(red / denominator)
24118 # .setGreen(green / denominator)
24119 # .setBlue(blue / denominator);
24120 # int alpha = color.getAlpha();
24121 # if (alpha != 255) {
24122 # result.setAlpha(
24123 # FloatValue
24124 # .newBuilder()
24125 # .setValue(((float) alpha) / denominator)
24126 # .build());
24127 # }
24128 # return resultBuilder.build();
24129 # }
24130 # // ...
24131 #
24132 # Example (iOS / Obj-C):
24133 #
24134 # // ...
24135 # static UIColor* fromProto(Color* protocolor) {
24136 # float red = [protocolor red];
24137 # float green = [protocolor green];
24138 # float blue = [protocolor blue];
24139 # FloatValue* alpha_wrapper = [protocolor alpha];
24140 # float alpha = 1.0;
24141 # if (alpha_wrapper != nil) {
24142 # alpha = [alpha_wrapper value];
24143 # }
24144 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24145 # }
24146 #
24147 # static Color* toProto(UIColor* color) {
24148 # CGFloat red, green, blue, alpha;
24149 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24150 # return nil;
24151 # }
24152 # Color* result = [Color alloc] init];
24153 # [result setRed:red];
24154 # [result setGreen:green];
24155 # [result setBlue:blue];
24156 # if (alpha <= 0.9999) {
24157 # [result setAlpha:floatWrapperWithValue(alpha)];
24158 # }
24159 # [result autorelease];
24160 # return result;
24161 # }
24162 # // ...
24163 #
24164 # Example (JavaScript):
24165 #
24166 # // ...
24167 #
24168 # var protoToCssColor = function(rgb_color) {
24169 # var redFrac = rgb_color.red || 0.0;
24170 # var greenFrac = rgb_color.green || 0.0;
24171 # var blueFrac = rgb_color.blue || 0.0;
24172 # var red = Math.floor(redFrac * 255);
24173 # var green = Math.floor(greenFrac * 255);
24174 # var blue = Math.floor(blueFrac * 255);
24175 #
24176 # if (!('alpha' in rgb_color)) {
24177 # return rgbToCssColor_(red, green, blue);
24178 # }
24179 #
24180 # var alphaFrac = rgb_color.alpha.value || 0.0;
24181 # var rgbParams = [red, green, blue].join(',');
24182 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24183 # };
24184 #
24185 # var rgbToCssColor_ = function(red, green, blue) {
24186 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24187 # var hexString = rgbNumber.toString(16);
24188 # var missingZeros = 6 - hexString.length;
24189 # var resultBuilder = ['#'];
24190 # for (var i = 0; i < missingZeros; i++) {
24191 # resultBuilder.push('0');
24192 # }
24193 # resultBuilder.push(hexString);
24194 # return resultBuilder.join('');
24195 # };
24196 #
24197 # // ...
24198 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24199 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24200 # the final pixel color is defined by the equation:
24201 #
24202 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24203 #
24204 # This means that a value of 1.0 corresponds to a solid color, whereas
24205 # a value of 0.0 corresponds to a completely transparent color. This
24206 # uses a wrapper message rather than a simple float scalar so that it is
24207 # possible to distinguish between a default value and the value being unset.
24208 # If omitted, this color object is to be rendered as a solid color
24209 # (as if the alpha value had been explicitly given with a value of 1.0).
24210 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24211 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24212 },
24213 "type": "A String", # How the value should be interpreted.
24214 "value": "A String", # The value this interpolation point uses. May be a formula.
24215 # Unused if type is MIN or
24216 # MAX.
24217 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024218 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024219 # These pin the gradient color scale according to the color,
24220 # type and value chosen.
24221 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24222 # for simplicity of conversion to/from color representations in various
24223 # languages over compactness; for example, the fields of this representation
24224 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24225 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24226 # method in iOS; and, with just a little work, it can be easily formatted into
24227 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24228 #
24229 # Example (Java):
24230 #
24231 # import com.google.type.Color;
24232 #
24233 # // ...
24234 # public static java.awt.Color fromProto(Color protocolor) {
24235 # float alpha = protocolor.hasAlpha()
24236 # ? protocolor.getAlpha().getValue()
24237 # : 1.0;
24238 #
24239 # return new java.awt.Color(
24240 # protocolor.getRed(),
24241 # protocolor.getGreen(),
24242 # protocolor.getBlue(),
24243 # alpha);
24244 # }
24245 #
24246 # public static Color toProto(java.awt.Color color) {
24247 # float red = (float) color.getRed();
24248 # float green = (float) color.getGreen();
24249 # float blue = (float) color.getBlue();
24250 # float denominator = 255.0;
24251 # Color.Builder resultBuilder =
24252 # Color
24253 # .newBuilder()
24254 # .setRed(red / denominator)
24255 # .setGreen(green / denominator)
24256 # .setBlue(blue / denominator);
24257 # int alpha = color.getAlpha();
24258 # if (alpha != 255) {
24259 # result.setAlpha(
24260 # FloatValue
24261 # .newBuilder()
24262 # .setValue(((float) alpha) / denominator)
24263 # .build());
24264 # }
24265 # return resultBuilder.build();
24266 # }
24267 # // ...
24268 #
24269 # Example (iOS / Obj-C):
24270 #
24271 # // ...
24272 # static UIColor* fromProto(Color* protocolor) {
24273 # float red = [protocolor red];
24274 # float green = [protocolor green];
24275 # float blue = [protocolor blue];
24276 # FloatValue* alpha_wrapper = [protocolor alpha];
24277 # float alpha = 1.0;
24278 # if (alpha_wrapper != nil) {
24279 # alpha = [alpha_wrapper value];
24280 # }
24281 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24282 # }
24283 #
24284 # static Color* toProto(UIColor* color) {
24285 # CGFloat red, green, blue, alpha;
24286 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24287 # return nil;
24288 # }
24289 # Color* result = [Color alloc] init];
24290 # [result setRed:red];
24291 # [result setGreen:green];
24292 # [result setBlue:blue];
24293 # if (alpha <= 0.9999) {
24294 # [result setAlpha:floatWrapperWithValue(alpha)];
24295 # }
24296 # [result autorelease];
24297 # return result;
24298 # }
24299 # // ...
24300 #
24301 # Example (JavaScript):
24302 #
24303 # // ...
24304 #
24305 # var protoToCssColor = function(rgb_color) {
24306 # var redFrac = rgb_color.red || 0.0;
24307 # var greenFrac = rgb_color.green || 0.0;
24308 # var blueFrac = rgb_color.blue || 0.0;
24309 # var red = Math.floor(redFrac * 255);
24310 # var green = Math.floor(greenFrac * 255);
24311 # var blue = Math.floor(blueFrac * 255);
24312 #
24313 # if (!('alpha' in rgb_color)) {
24314 # return rgbToCssColor_(red, green, blue);
24315 # }
24316 #
24317 # var alphaFrac = rgb_color.alpha.value || 0.0;
24318 # var rgbParams = [red, green, blue].join(',');
24319 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24320 # };
24321 #
24322 # var rgbToCssColor_ = function(red, green, blue) {
24323 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24324 # var hexString = rgbNumber.toString(16);
24325 # var missingZeros = 6 - hexString.length;
24326 # var resultBuilder = ['#'];
24327 # for (var i = 0; i < missingZeros; i++) {
24328 # resultBuilder.push('0');
24329 # }
24330 # resultBuilder.push(hexString);
24331 # return resultBuilder.join('');
24332 # };
24333 #
24334 # // ...
24335 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24336 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24337 # the final pixel color is defined by the equation:
24338 #
24339 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24340 #
24341 # This means that a value of 1.0 corresponds to a solid color, whereas
24342 # a value of 0.0 corresponds to a completely transparent color. This
24343 # uses a wrapper message rather than a simple float scalar so that it is
24344 # possible to distinguish between a default value and the value being unset.
24345 # If omitted, this color object is to be rendered as a solid color
24346 # (as if the alpha value had been explicitly given with a value of 1.0).
24347 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24348 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24349 },
24350 "type": "A String", # How the value should be interpreted.
24351 "value": "A String", # The value this interpolation point uses. May be a formula.
24352 # Unused if type is MIN or
24353 # MAX.
24354 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024355 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024356 # These pin the gradient color scale according to the color,
24357 # type and value chosen.
24358 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24359 # for simplicity of conversion to/from color representations in various
24360 # languages over compactness; for example, the fields of this representation
24361 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24362 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24363 # method in iOS; and, with just a little work, it can be easily formatted into
24364 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24365 #
24366 # Example (Java):
24367 #
24368 # import com.google.type.Color;
24369 #
24370 # // ...
24371 # public static java.awt.Color fromProto(Color protocolor) {
24372 # float alpha = protocolor.hasAlpha()
24373 # ? protocolor.getAlpha().getValue()
24374 # : 1.0;
24375 #
24376 # return new java.awt.Color(
24377 # protocolor.getRed(),
24378 # protocolor.getGreen(),
24379 # protocolor.getBlue(),
24380 # alpha);
24381 # }
24382 #
24383 # public static Color toProto(java.awt.Color color) {
24384 # float red = (float) color.getRed();
24385 # float green = (float) color.getGreen();
24386 # float blue = (float) color.getBlue();
24387 # float denominator = 255.0;
24388 # Color.Builder resultBuilder =
24389 # Color
24390 # .newBuilder()
24391 # .setRed(red / denominator)
24392 # .setGreen(green / denominator)
24393 # .setBlue(blue / denominator);
24394 # int alpha = color.getAlpha();
24395 # if (alpha != 255) {
24396 # result.setAlpha(
24397 # FloatValue
24398 # .newBuilder()
24399 # .setValue(((float) alpha) / denominator)
24400 # .build());
24401 # }
24402 # return resultBuilder.build();
24403 # }
24404 # // ...
24405 #
24406 # Example (iOS / Obj-C):
24407 #
24408 # // ...
24409 # static UIColor* fromProto(Color* protocolor) {
24410 # float red = [protocolor red];
24411 # float green = [protocolor green];
24412 # float blue = [protocolor blue];
24413 # FloatValue* alpha_wrapper = [protocolor alpha];
24414 # float alpha = 1.0;
24415 # if (alpha_wrapper != nil) {
24416 # alpha = [alpha_wrapper value];
24417 # }
24418 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24419 # }
24420 #
24421 # static Color* toProto(UIColor* color) {
24422 # CGFloat red, green, blue, alpha;
24423 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24424 # return nil;
24425 # }
24426 # Color* result = [Color alloc] init];
24427 # [result setRed:red];
24428 # [result setGreen:green];
24429 # [result setBlue:blue];
24430 # if (alpha <= 0.9999) {
24431 # [result setAlpha:floatWrapperWithValue(alpha)];
24432 # }
24433 # [result autorelease];
24434 # return result;
24435 # }
24436 # // ...
24437 #
24438 # Example (JavaScript):
24439 #
24440 # // ...
24441 #
24442 # var protoToCssColor = function(rgb_color) {
24443 # var redFrac = rgb_color.red || 0.0;
24444 # var greenFrac = rgb_color.green || 0.0;
24445 # var blueFrac = rgb_color.blue || 0.0;
24446 # var red = Math.floor(redFrac * 255);
24447 # var green = Math.floor(greenFrac * 255);
24448 # var blue = Math.floor(blueFrac * 255);
24449 #
24450 # if (!('alpha' in rgb_color)) {
24451 # return rgbToCssColor_(red, green, blue);
24452 # }
24453 #
24454 # var alphaFrac = rgb_color.alpha.value || 0.0;
24455 # var rgbParams = [red, green, blue].join(',');
24456 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24457 # };
24458 #
24459 # var rgbToCssColor_ = function(red, green, blue) {
24460 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24461 # var hexString = rgbNumber.toString(16);
24462 # var missingZeros = 6 - hexString.length;
24463 # var resultBuilder = ['#'];
24464 # for (var i = 0; i < missingZeros; i++) {
24465 # resultBuilder.push('0');
24466 # }
24467 # resultBuilder.push(hexString);
24468 # return resultBuilder.join('');
24469 # };
24470 #
24471 # // ...
24472 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24473 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24474 # the final pixel color is defined by the equation:
24475 #
24476 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24477 #
24478 # This means that a value of 1.0 corresponds to a solid color, whereas
24479 # a value of 0.0 corresponds to a completely transparent color. This
24480 # uses a wrapper message rather than a simple float scalar so that it is
24481 # possible to distinguish between a default value and the value being unset.
24482 # If omitted, this color object is to be rendered as a solid color
24483 # (as if the alpha value had been explicitly given with a value of 1.0).
24484 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24485 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24486 },
24487 "type": "A String", # How the value should be interpreted.
24488 "value": "A String", # The value this interpolation point uses. May be a formula.
24489 # Unused if type is MIN or
24490 # MAX.
24491 },
24492 },
24493 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070024494 "newIndex": 42, # The index of the new rule.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024495 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024529 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024532 "startRowIndex": 42, # The start row (inclusive) 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024584 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024714 "verticalAlignment": "A String", # The vertical 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.
25853 "rowCount": 42, # The number of rows in the grid.
25854 "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.
25856 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
25857 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026035 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026038 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026077 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026080 "startRowIndex": 42, # The start row (inclusive) 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.
26091 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
26092 # This field is only visible to users with edit access to the protected
26093 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026094 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026095 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
26096 # range. Domain protection is only supported on documents within a domain.
26097 "users": [ # The email addresses of users with edit access to the protected range.
26098 "A String",
26099 ],
26100 "groups": [ # The email addresses of groups with edit access to the protected range.
26101 "A String",
26102 ],
26103 },
26104 "protectedRangeId": 42, # The ID of the protected range.
26105 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026106 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026107 # Warning-based protection means that every user can edit data in the
26108 # protected range, except editing will prompt a warning asking the user
26109 # to confirm the edit.
26110 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026111 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026112 # Additionally, if this field is changed from true to false and the
26113 # `editors` field is not set (nor included in the field mask), then
26114 # the editors will be set to all the editors in the document.
26115 "range": { # A range on a sheet. # The range that is being protected.
26116 # The range may be fully unbounded, in which case this is considered
26117 # a protected sheet.
26118 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026119 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026120 # may be set.
26121 # All indexes are zero-based.
26122 # Indexes are half open, e.g the start index is inclusive
26123 # and the end index is exclusive -- [start_index, end_index).
26124 # Missing indexes indicate the range is unbounded on that side.
26125 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026126 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026127 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026128 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026129 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026130 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026131 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026132 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026133 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026134 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026135 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026136 # `Sheet1!A:B == sheet_id: 0,
26137 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026138 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026139 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026140 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026141 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026142 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026143 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026144 #
26145 # The start index must always be less than or equal to the end index.
26146 # If the start index equals the end index, then the range is empty.
26147 # Empty ranges are typically not meaningful and are usually rendered in the
26148 # UI as `#REF!`.
26149 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026150 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026151 "sheetId": 42, # The sheet this range is on.
26152 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026153 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026154 },
26155 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026191 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040026194 "startRowIndex": 42, # The start row (inclusive) 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026246 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070026376 "verticalAlignment": "A String", # The vertical 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040027527 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040027530 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028656 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028659 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028755 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028758 "startRowIndex": 42, # The start row (inclusive) 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028774 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
28775 # CellData.effectiveFormat will not be set if the
28776 # cell's format is equal to this default format.
28777 # This field is read-only.
28778 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
28779 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
28780 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028781 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028782 # information about the supported patterns.
28783 "type": "A String", # The type of the number format.
28784 # When writing, this field must be set.
28785 },
28786 "textDirection": "A String", # The direction of the text in the cell.
28787 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
28788 # When updating padding, every field must be specified.
28789 "top": 42, # The top padding of the cell.
28790 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028791 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028792 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028793 },
28794 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
28795 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
28796 # for simplicity of conversion to/from color representations in various
28797 # languages over compactness; for example, the fields of this representation
28798 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28799 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28800 # method in iOS; and, with just a little work, it can be easily formatted into
28801 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28802 #
28803 # Example (Java):
28804 #
28805 # import com.google.type.Color;
28806 #
28807 # // ...
28808 # public static java.awt.Color fromProto(Color protocolor) {
28809 # float alpha = protocolor.hasAlpha()
28810 # ? protocolor.getAlpha().getValue()
28811 # : 1.0;
28812 #
28813 # return new java.awt.Color(
28814 # protocolor.getRed(),
28815 # protocolor.getGreen(),
28816 # protocolor.getBlue(),
28817 # alpha);
28818 # }
28819 #
28820 # public static Color toProto(java.awt.Color color) {
28821 # float red = (float) color.getRed();
28822 # float green = (float) color.getGreen();
28823 # float blue = (float) color.getBlue();
28824 # float denominator = 255.0;
28825 # Color.Builder resultBuilder =
28826 # Color
28827 # .newBuilder()
28828 # .setRed(red / denominator)
28829 # .setGreen(green / denominator)
28830 # .setBlue(blue / denominator);
28831 # int alpha = color.getAlpha();
28832 # if (alpha != 255) {
28833 # result.setAlpha(
28834 # FloatValue
28835 # .newBuilder()
28836 # .setValue(((float) alpha) / denominator)
28837 # .build());
28838 # }
28839 # return resultBuilder.build();
28840 # }
28841 # // ...
28842 #
28843 # Example (iOS / Obj-C):
28844 #
28845 # // ...
28846 # static UIColor* fromProto(Color* protocolor) {
28847 # float red = [protocolor red];
28848 # float green = [protocolor green];
28849 # float blue = [protocolor blue];
28850 # FloatValue* alpha_wrapper = [protocolor alpha];
28851 # float alpha = 1.0;
28852 # if (alpha_wrapper != nil) {
28853 # alpha = [alpha_wrapper value];
28854 # }
28855 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28856 # }
28857 #
28858 # static Color* toProto(UIColor* color) {
28859 # CGFloat red, green, blue, alpha;
28860 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28861 # return nil;
28862 # }
28863 # Color* result = [Color alloc] init];
28864 # [result setRed:red];
28865 # [result setGreen:green];
28866 # [result setBlue:blue];
28867 # if (alpha <= 0.9999) {
28868 # [result setAlpha:floatWrapperWithValue(alpha)];
28869 # }
28870 # [result autorelease];
28871 # return result;
28872 # }
28873 # // ...
28874 #
28875 # Example (JavaScript):
28876 #
28877 # // ...
28878 #
28879 # var protoToCssColor = function(rgb_color) {
28880 # var redFrac = rgb_color.red || 0.0;
28881 # var greenFrac = rgb_color.green || 0.0;
28882 # var blueFrac = rgb_color.blue || 0.0;
28883 # var red = Math.floor(redFrac * 255);
28884 # var green = Math.floor(greenFrac * 255);
28885 # var blue = Math.floor(blueFrac * 255);
28886 #
28887 # if (!('alpha' in rgb_color)) {
28888 # return rgbToCssColor_(red, green, blue);
28889 # }
28890 #
28891 # var alphaFrac = rgb_color.alpha.value || 0.0;
28892 # var rgbParams = [red, green, blue].join(',');
28893 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28894 # };
28895 #
28896 # var rgbToCssColor_ = function(red, green, blue) {
28897 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28898 # var hexString = rgbNumber.toString(16);
28899 # var missingZeros = 6 - hexString.length;
28900 # var resultBuilder = ['#'];
28901 # for (var i = 0; i < missingZeros; i++) {
28902 # resultBuilder.push('0');
28903 # }
28904 # resultBuilder.push(hexString);
28905 # return resultBuilder.join('');
28906 # };
28907 #
28908 # // ...
28909 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28910 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28911 # the final pixel color is defined by the equation:
28912 #
28913 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28914 #
28915 # This means that a value of 1.0 corresponds to a solid color, whereas
28916 # a value of 0.0 corresponds to a completely transparent color. This
28917 # uses a wrapper message rather than a simple float scalar so that it is
28918 # possible to distinguish between a default value and the value being unset.
28919 # If omitted, this color object is to be rendered as a solid color
28920 # (as if the alpha value had been explicitly given with a value of 1.0).
28921 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28922 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28923 },
28924 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
28925 "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).
28926 # Absent values indicate that the field isn't specified.
28927 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28928 # for simplicity of conversion to/from color representations in various
28929 # languages over compactness; for example, the fields of this representation
28930 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28931 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28932 # method in iOS; and, with just a little work, it can be easily formatted into
28933 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28934 #
28935 # Example (Java):
28936 #
28937 # import com.google.type.Color;
28938 #
28939 # // ...
28940 # public static java.awt.Color fromProto(Color protocolor) {
28941 # float alpha = protocolor.hasAlpha()
28942 # ? protocolor.getAlpha().getValue()
28943 # : 1.0;
28944 #
28945 # return new java.awt.Color(
28946 # protocolor.getRed(),
28947 # protocolor.getGreen(),
28948 # protocolor.getBlue(),
28949 # alpha);
28950 # }
28951 #
28952 # public static Color toProto(java.awt.Color color) {
28953 # float red = (float) color.getRed();
28954 # float green = (float) color.getGreen();
28955 # float blue = (float) color.getBlue();
28956 # float denominator = 255.0;
28957 # Color.Builder resultBuilder =
28958 # Color
28959 # .newBuilder()
28960 # .setRed(red / denominator)
28961 # .setGreen(green / denominator)
28962 # .setBlue(blue / denominator);
28963 # int alpha = color.getAlpha();
28964 # if (alpha != 255) {
28965 # result.setAlpha(
28966 # FloatValue
28967 # .newBuilder()
28968 # .setValue(((float) alpha) / denominator)
28969 # .build());
28970 # }
28971 # return resultBuilder.build();
28972 # }
28973 # // ...
28974 #
28975 # Example (iOS / Obj-C):
28976 #
28977 # // ...
28978 # static UIColor* fromProto(Color* protocolor) {
28979 # float red = [protocolor red];
28980 # float green = [protocolor green];
28981 # float blue = [protocolor blue];
28982 # FloatValue* alpha_wrapper = [protocolor alpha];
28983 # float alpha = 1.0;
28984 # if (alpha_wrapper != nil) {
28985 # alpha = [alpha_wrapper value];
28986 # }
28987 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28988 # }
28989 #
28990 # static Color* toProto(UIColor* color) {
28991 # CGFloat red, green, blue, alpha;
28992 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28993 # return nil;
28994 # }
28995 # Color* result = [Color alloc] init];
28996 # [result setRed:red];
28997 # [result setGreen:green];
28998 # [result setBlue:blue];
28999 # if (alpha <= 0.9999) {
29000 # [result setAlpha:floatWrapperWithValue(alpha)];
29001 # }
29002 # [result autorelease];
29003 # return result;
29004 # }
29005 # // ...
29006 #
29007 # Example (JavaScript):
29008 #
29009 # // ...
29010 #
29011 # var protoToCssColor = function(rgb_color) {
29012 # var redFrac = rgb_color.red || 0.0;
29013 # var greenFrac = rgb_color.green || 0.0;
29014 # var blueFrac = rgb_color.blue || 0.0;
29015 # var red = Math.floor(redFrac * 255);
29016 # var green = Math.floor(greenFrac * 255);
29017 # var blue = Math.floor(blueFrac * 255);
29018 #
29019 # if (!('alpha' in rgb_color)) {
29020 # return rgbToCssColor_(red, green, blue);
29021 # }
29022 #
29023 # var alphaFrac = rgb_color.alpha.value || 0.0;
29024 # var rgbParams = [red, green, blue].join(',');
29025 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29026 # };
29027 #
29028 # var rgbToCssColor_ = function(red, green, blue) {
29029 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29030 # var hexString = rgbNumber.toString(16);
29031 # var missingZeros = 6 - hexString.length;
29032 # var resultBuilder = ['#'];
29033 # for (var i = 0; i < missingZeros; i++) {
29034 # resultBuilder.push('0');
29035 # }
29036 # resultBuilder.push(hexString);
29037 # return resultBuilder.join('');
29038 # };
29039 #
29040 # // ...
29041 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29042 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29043 # the final pixel color is defined by the equation:
29044 #
29045 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29046 #
29047 # This means that a value of 1.0 corresponds to a solid color, whereas
29048 # a value of 0.0 corresponds to a completely transparent color. This
29049 # uses a wrapper message rather than a simple float scalar so that it is
29050 # possible to distinguish between a default value and the value being unset.
29051 # If omitted, this color object is to be rendered as a solid color
29052 # (as if the alpha value had been explicitly given with a value of 1.0).
29053 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29054 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29055 },
29056 "bold": True or False, # True if the text is bold.
29057 "strikethrough": True or False, # True if the text has a strikethrough.
29058 "fontFamily": "A String", # The font family.
29059 "fontSize": 42, # The size of the font.
29060 "italic": True or False, # True if the text is italicized.
29061 "underline": True or False, # True if the text is underlined.
29062 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029063 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
29064 "angle": 42, # The angle between the standard orientation and the desired orientation.
29065 # Measured in degrees. Valid values are between -90 and 90. Positive
29066 # angles are angled upwards, negative are angled downwards.
29067 #
29068 # Note: For LTR text direction positive angles are in the counterclockwise
29069 # direction, whereas for RTL they are in the clockwise direction
29070 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
29071 # characters is unchanged.
29072 # For example:
29073 #
29074 # | V |
29075 # | e |
29076 # | r |
29077 # | t |
29078 # | i |
29079 # | c |
29080 # | a |
29081 # | l |
29082 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029083 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29084 "borders": { # The borders of the cell. # The borders of the cell.
29085 "top": { # A border along a cell. # The top border of the cell.
29086 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29087 # for simplicity of conversion to/from color representations in various
29088 # languages over compactness; for example, the fields of this representation
29089 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29090 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29091 # method in iOS; and, with just a little work, it can be easily formatted into
29092 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29093 #
29094 # Example (Java):
29095 #
29096 # import com.google.type.Color;
29097 #
29098 # // ...
29099 # public static java.awt.Color fromProto(Color protocolor) {
29100 # float alpha = protocolor.hasAlpha()
29101 # ? protocolor.getAlpha().getValue()
29102 # : 1.0;
29103 #
29104 # return new java.awt.Color(
29105 # protocolor.getRed(),
29106 # protocolor.getGreen(),
29107 # protocolor.getBlue(),
29108 # alpha);
29109 # }
29110 #
29111 # public static Color toProto(java.awt.Color color) {
29112 # float red = (float) color.getRed();
29113 # float green = (float) color.getGreen();
29114 # float blue = (float) color.getBlue();
29115 # float denominator = 255.0;
29116 # Color.Builder resultBuilder =
29117 # Color
29118 # .newBuilder()
29119 # .setRed(red / denominator)
29120 # .setGreen(green / denominator)
29121 # .setBlue(blue / denominator);
29122 # int alpha = color.getAlpha();
29123 # if (alpha != 255) {
29124 # result.setAlpha(
29125 # FloatValue
29126 # .newBuilder()
29127 # .setValue(((float) alpha) / denominator)
29128 # .build());
29129 # }
29130 # return resultBuilder.build();
29131 # }
29132 # // ...
29133 #
29134 # Example (iOS / Obj-C):
29135 #
29136 # // ...
29137 # static UIColor* fromProto(Color* protocolor) {
29138 # float red = [protocolor red];
29139 # float green = [protocolor green];
29140 # float blue = [protocolor blue];
29141 # FloatValue* alpha_wrapper = [protocolor alpha];
29142 # float alpha = 1.0;
29143 # if (alpha_wrapper != nil) {
29144 # alpha = [alpha_wrapper value];
29145 # }
29146 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29147 # }
29148 #
29149 # static Color* toProto(UIColor* color) {
29150 # CGFloat red, green, blue, alpha;
29151 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29152 # return nil;
29153 # }
29154 # Color* result = [Color alloc] init];
29155 # [result setRed:red];
29156 # [result setGreen:green];
29157 # [result setBlue:blue];
29158 # if (alpha <= 0.9999) {
29159 # [result setAlpha:floatWrapperWithValue(alpha)];
29160 # }
29161 # [result autorelease];
29162 # return result;
29163 # }
29164 # // ...
29165 #
29166 # Example (JavaScript):
29167 #
29168 # // ...
29169 #
29170 # var protoToCssColor = function(rgb_color) {
29171 # var redFrac = rgb_color.red || 0.0;
29172 # var greenFrac = rgb_color.green || 0.0;
29173 # var blueFrac = rgb_color.blue || 0.0;
29174 # var red = Math.floor(redFrac * 255);
29175 # var green = Math.floor(greenFrac * 255);
29176 # var blue = Math.floor(blueFrac * 255);
29177 #
29178 # if (!('alpha' in rgb_color)) {
29179 # return rgbToCssColor_(red, green, blue);
29180 # }
29181 #
29182 # var alphaFrac = rgb_color.alpha.value || 0.0;
29183 # var rgbParams = [red, green, blue].join(',');
29184 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29185 # };
29186 #
29187 # var rgbToCssColor_ = function(red, green, blue) {
29188 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29189 # var hexString = rgbNumber.toString(16);
29190 # var missingZeros = 6 - hexString.length;
29191 # var resultBuilder = ['#'];
29192 # for (var i = 0; i < missingZeros; i++) {
29193 # resultBuilder.push('0');
29194 # }
29195 # resultBuilder.push(hexString);
29196 # return resultBuilder.join('');
29197 # };
29198 #
29199 # // ...
29200 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29201 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29202 # the final pixel color is defined by the equation:
29203 #
29204 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29205 #
29206 # This means that a value of 1.0 corresponds to a solid color, whereas
29207 # a value of 0.0 corresponds to a completely transparent color. This
29208 # uses a wrapper message rather than a simple float scalar so that it is
29209 # possible to distinguish between a default value and the value being unset.
29210 # If omitted, this color object is to be rendered as a solid color
29211 # (as if the alpha value had been explicitly given with a value of 1.0).
29212 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29213 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29214 },
29215 "width": 42, # The width of the border, in pixels.
29216 # Deprecated; the width is determined by the "style" field.
29217 "style": "A String", # The style of the border.
29218 },
29219 "right": { # A border along a cell. # The right border of the cell.
29220 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29221 # for simplicity of conversion to/from color representations in various
29222 # languages over compactness; for example, the fields of this representation
29223 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29224 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29225 # method in iOS; and, with just a little work, it can be easily formatted into
29226 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29227 #
29228 # Example (Java):
29229 #
29230 # import com.google.type.Color;
29231 #
29232 # // ...
29233 # public static java.awt.Color fromProto(Color protocolor) {
29234 # float alpha = protocolor.hasAlpha()
29235 # ? protocolor.getAlpha().getValue()
29236 # : 1.0;
29237 #
29238 # return new java.awt.Color(
29239 # protocolor.getRed(),
29240 # protocolor.getGreen(),
29241 # protocolor.getBlue(),
29242 # alpha);
29243 # }
29244 #
29245 # public static Color toProto(java.awt.Color color) {
29246 # float red = (float) color.getRed();
29247 # float green = (float) color.getGreen();
29248 # float blue = (float) color.getBlue();
29249 # float denominator = 255.0;
29250 # Color.Builder resultBuilder =
29251 # Color
29252 # .newBuilder()
29253 # .setRed(red / denominator)
29254 # .setGreen(green / denominator)
29255 # .setBlue(blue / denominator);
29256 # int alpha = color.getAlpha();
29257 # if (alpha != 255) {
29258 # result.setAlpha(
29259 # FloatValue
29260 # .newBuilder()
29261 # .setValue(((float) alpha) / denominator)
29262 # .build());
29263 # }
29264 # return resultBuilder.build();
29265 # }
29266 # // ...
29267 #
29268 # Example (iOS / Obj-C):
29269 #
29270 # // ...
29271 # static UIColor* fromProto(Color* protocolor) {
29272 # float red = [protocolor red];
29273 # float green = [protocolor green];
29274 # float blue = [protocolor blue];
29275 # FloatValue* alpha_wrapper = [protocolor alpha];
29276 # float alpha = 1.0;
29277 # if (alpha_wrapper != nil) {
29278 # alpha = [alpha_wrapper value];
29279 # }
29280 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29281 # }
29282 #
29283 # static Color* toProto(UIColor* color) {
29284 # CGFloat red, green, blue, alpha;
29285 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29286 # return nil;
29287 # }
29288 # Color* result = [Color alloc] init];
29289 # [result setRed:red];
29290 # [result setGreen:green];
29291 # [result setBlue:blue];
29292 # if (alpha <= 0.9999) {
29293 # [result setAlpha:floatWrapperWithValue(alpha)];
29294 # }
29295 # [result autorelease];
29296 # return result;
29297 # }
29298 # // ...
29299 #
29300 # Example (JavaScript):
29301 #
29302 # // ...
29303 #
29304 # var protoToCssColor = function(rgb_color) {
29305 # var redFrac = rgb_color.red || 0.0;
29306 # var greenFrac = rgb_color.green || 0.0;
29307 # var blueFrac = rgb_color.blue || 0.0;
29308 # var red = Math.floor(redFrac * 255);
29309 # var green = Math.floor(greenFrac * 255);
29310 # var blue = Math.floor(blueFrac * 255);
29311 #
29312 # if (!('alpha' in rgb_color)) {
29313 # return rgbToCssColor_(red, green, blue);
29314 # }
29315 #
29316 # var alphaFrac = rgb_color.alpha.value || 0.0;
29317 # var rgbParams = [red, green, blue].join(',');
29318 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29319 # };
29320 #
29321 # var rgbToCssColor_ = function(red, green, blue) {
29322 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29323 # var hexString = rgbNumber.toString(16);
29324 # var missingZeros = 6 - hexString.length;
29325 # var resultBuilder = ['#'];
29326 # for (var i = 0; i < missingZeros; i++) {
29327 # resultBuilder.push('0');
29328 # }
29329 # resultBuilder.push(hexString);
29330 # return resultBuilder.join('');
29331 # };
29332 #
29333 # // ...
29334 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29335 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29336 # the final pixel color is defined by the equation:
29337 #
29338 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29339 #
29340 # This means that a value of 1.0 corresponds to a solid color, whereas
29341 # a value of 0.0 corresponds to a completely transparent color. This
29342 # uses a wrapper message rather than a simple float scalar so that it is
29343 # possible to distinguish between a default value and the value being unset.
29344 # If omitted, this color object is to be rendered as a solid color
29345 # (as if the alpha value had been explicitly given with a value of 1.0).
29346 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29347 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29348 },
29349 "width": 42, # The width of the border, in pixels.
29350 # Deprecated; the width is determined by the "style" field.
29351 "style": "A String", # The style of the border.
29352 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029353 "left": { # A border along a cell. # The left border of the cell.
29354 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29355 # for simplicity of conversion to/from color representations in various
29356 # languages over compactness; for example, the fields of this representation
29357 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29358 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29359 # method in iOS; and, with just a little work, it can be easily formatted into
29360 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29361 #
29362 # Example (Java):
29363 #
29364 # import com.google.type.Color;
29365 #
29366 # // ...
29367 # public static java.awt.Color fromProto(Color protocolor) {
29368 # float alpha = protocolor.hasAlpha()
29369 # ? protocolor.getAlpha().getValue()
29370 # : 1.0;
29371 #
29372 # return new java.awt.Color(
29373 # protocolor.getRed(),
29374 # protocolor.getGreen(),
29375 # protocolor.getBlue(),
29376 # alpha);
29377 # }
29378 #
29379 # public static Color toProto(java.awt.Color color) {
29380 # float red = (float) color.getRed();
29381 # float green = (float) color.getGreen();
29382 # float blue = (float) color.getBlue();
29383 # float denominator = 255.0;
29384 # Color.Builder resultBuilder =
29385 # Color
29386 # .newBuilder()
29387 # .setRed(red / denominator)
29388 # .setGreen(green / denominator)
29389 # .setBlue(blue / denominator);
29390 # int alpha = color.getAlpha();
29391 # if (alpha != 255) {
29392 # result.setAlpha(
29393 # FloatValue
29394 # .newBuilder()
29395 # .setValue(((float) alpha) / denominator)
29396 # .build());
29397 # }
29398 # return resultBuilder.build();
29399 # }
29400 # // ...
29401 #
29402 # Example (iOS / Obj-C):
29403 #
29404 # // ...
29405 # static UIColor* fromProto(Color* protocolor) {
29406 # float red = [protocolor red];
29407 # float green = [protocolor green];
29408 # float blue = [protocolor blue];
29409 # FloatValue* alpha_wrapper = [protocolor alpha];
29410 # float alpha = 1.0;
29411 # if (alpha_wrapper != nil) {
29412 # alpha = [alpha_wrapper value];
29413 # }
29414 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29415 # }
29416 #
29417 # static Color* toProto(UIColor* color) {
29418 # CGFloat red, green, blue, alpha;
29419 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29420 # return nil;
29421 # }
29422 # Color* result = [Color alloc] init];
29423 # [result setRed:red];
29424 # [result setGreen:green];
29425 # [result setBlue:blue];
29426 # if (alpha <= 0.9999) {
29427 # [result setAlpha:floatWrapperWithValue(alpha)];
29428 # }
29429 # [result autorelease];
29430 # return result;
29431 # }
29432 # // ...
29433 #
29434 # Example (JavaScript):
29435 #
29436 # // ...
29437 #
29438 # var protoToCssColor = function(rgb_color) {
29439 # var redFrac = rgb_color.red || 0.0;
29440 # var greenFrac = rgb_color.green || 0.0;
29441 # var blueFrac = rgb_color.blue || 0.0;
29442 # var red = Math.floor(redFrac * 255);
29443 # var green = Math.floor(greenFrac * 255);
29444 # var blue = Math.floor(blueFrac * 255);
29445 #
29446 # if (!('alpha' in rgb_color)) {
29447 # return rgbToCssColor_(red, green, blue);
29448 # }
29449 #
29450 # var alphaFrac = rgb_color.alpha.value || 0.0;
29451 # var rgbParams = [red, green, blue].join(',');
29452 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29453 # };
29454 #
29455 # var rgbToCssColor_ = function(red, green, blue) {
29456 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29457 # var hexString = rgbNumber.toString(16);
29458 # var missingZeros = 6 - hexString.length;
29459 # var resultBuilder = ['#'];
29460 # for (var i = 0; i < missingZeros; i++) {
29461 # resultBuilder.push('0');
29462 # }
29463 # resultBuilder.push(hexString);
29464 # return resultBuilder.join('');
29465 # };
29466 #
29467 # // ...
29468 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29469 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29470 # the final pixel color is defined by the equation:
29471 #
29472 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29473 #
29474 # This means that a value of 1.0 corresponds to a solid color, whereas
29475 # a value of 0.0 corresponds to a completely transparent color. This
29476 # uses a wrapper message rather than a simple float scalar so that it is
29477 # possible to distinguish between a default value and the value being unset.
29478 # If omitted, this color object is to be rendered as a solid color
29479 # (as if the alpha value had been explicitly given with a value of 1.0).
29480 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29481 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29482 },
29483 "width": 42, # The width of the border, in pixels.
29484 # Deprecated; the width is determined by the "style" field.
29485 "style": "A String", # The style of the border.
29486 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029487 "bottom": { # A border along a cell. # The bottom border of the cell.
29488 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29489 # for simplicity of conversion to/from color representations in various
29490 # languages over compactness; for example, the fields of this representation
29491 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29492 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29493 # method in iOS; and, with just a little work, it can be easily formatted into
29494 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29495 #
29496 # Example (Java):
29497 #
29498 # import com.google.type.Color;
29499 #
29500 # // ...
29501 # public static java.awt.Color fromProto(Color protocolor) {
29502 # float alpha = protocolor.hasAlpha()
29503 # ? protocolor.getAlpha().getValue()
29504 # : 1.0;
29505 #
29506 # return new java.awt.Color(
29507 # protocolor.getRed(),
29508 # protocolor.getGreen(),
29509 # protocolor.getBlue(),
29510 # alpha);
29511 # }
29512 #
29513 # public static Color toProto(java.awt.Color color) {
29514 # float red = (float) color.getRed();
29515 # float green = (float) color.getGreen();
29516 # float blue = (float) color.getBlue();
29517 # float denominator = 255.0;
29518 # Color.Builder resultBuilder =
29519 # Color
29520 # .newBuilder()
29521 # .setRed(red / denominator)
29522 # .setGreen(green / denominator)
29523 # .setBlue(blue / denominator);
29524 # int alpha = color.getAlpha();
29525 # if (alpha != 255) {
29526 # result.setAlpha(
29527 # FloatValue
29528 # .newBuilder()
29529 # .setValue(((float) alpha) / denominator)
29530 # .build());
29531 # }
29532 # return resultBuilder.build();
29533 # }
29534 # // ...
29535 #
29536 # Example (iOS / Obj-C):
29537 #
29538 # // ...
29539 # static UIColor* fromProto(Color* protocolor) {
29540 # float red = [protocolor red];
29541 # float green = [protocolor green];
29542 # float blue = [protocolor blue];
29543 # FloatValue* alpha_wrapper = [protocolor alpha];
29544 # float alpha = 1.0;
29545 # if (alpha_wrapper != nil) {
29546 # alpha = [alpha_wrapper value];
29547 # }
29548 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29549 # }
29550 #
29551 # static Color* toProto(UIColor* color) {
29552 # CGFloat red, green, blue, alpha;
29553 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29554 # return nil;
29555 # }
29556 # Color* result = [Color alloc] init];
29557 # [result setRed:red];
29558 # [result setGreen:green];
29559 # [result setBlue:blue];
29560 # if (alpha <= 0.9999) {
29561 # [result setAlpha:floatWrapperWithValue(alpha)];
29562 # }
29563 # [result autorelease];
29564 # return result;
29565 # }
29566 # // ...
29567 #
29568 # Example (JavaScript):
29569 #
29570 # // ...
29571 #
29572 # var protoToCssColor = function(rgb_color) {
29573 # var redFrac = rgb_color.red || 0.0;
29574 # var greenFrac = rgb_color.green || 0.0;
29575 # var blueFrac = rgb_color.blue || 0.0;
29576 # var red = Math.floor(redFrac * 255);
29577 # var green = Math.floor(greenFrac * 255);
29578 # var blue = Math.floor(blueFrac * 255);
29579 #
29580 # if (!('alpha' in rgb_color)) {
29581 # return rgbToCssColor_(red, green, blue);
29582 # }
29583 #
29584 # var alphaFrac = rgb_color.alpha.value || 0.0;
29585 # var rgbParams = [red, green, blue].join(',');
29586 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29587 # };
29588 #
29589 # var rgbToCssColor_ = function(red, green, blue) {
29590 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29591 # var hexString = rgbNumber.toString(16);
29592 # var missingZeros = 6 - hexString.length;
29593 # var resultBuilder = ['#'];
29594 # for (var i = 0; i < missingZeros; i++) {
29595 # resultBuilder.push('0');
29596 # }
29597 # resultBuilder.push(hexString);
29598 # return resultBuilder.join('');
29599 # };
29600 #
29601 # // ...
29602 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29603 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29604 # the final pixel color is defined by the equation:
29605 #
29606 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29607 #
29608 # This means that a value of 1.0 corresponds to a solid color, whereas
29609 # a value of 0.0 corresponds to a completely transparent color. This
29610 # uses a wrapper message rather than a simple float scalar so that it is
29611 # possible to distinguish between a default value and the value being unset.
29612 # If omitted, this color object is to be rendered as a solid color
29613 # (as if the alpha value had been explicitly given with a value of 1.0).
29614 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29615 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29616 },
29617 "width": 42, # The width of the border, in pixels.
29618 # Deprecated; the width is determined by the "style" field.
29619 "style": "A String", # The style of the border.
29620 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029621 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029622 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029623 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070029624 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029674 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029677 "startRowIndex": 42, # The start row (inclusive) 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 },
29729 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
29730 "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 },
29859 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
29860 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040031010 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040031013 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032129 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032132 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032166 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032169 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070032230 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032231 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
32232 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032290 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032293 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032347 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032350 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032422 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032425 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032500 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032503 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070032516 "title": "A String", # The title of this axis. If set, this overrides any title inferred
32517 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032518 "format": { # The format of a run of text in a cell. # The format of the title.
32519 # Only valid if the axis is not associated with the domain.
32520 # Absent values indicate that the field isn't specified.
32521 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32522 # for simplicity of conversion to/from color representations in various
32523 # languages over compactness; for example, the fields of this representation
32524 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32525 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32526 # method in iOS; and, with just a little work, it can be easily formatted into
32527 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32528 #
32529 # Example (Java):
32530 #
32531 # import com.google.type.Color;
32532 #
32533 # // ...
32534 # public static java.awt.Color fromProto(Color protocolor) {
32535 # float alpha = protocolor.hasAlpha()
32536 # ? protocolor.getAlpha().getValue()
32537 # : 1.0;
32538 #
32539 # return new java.awt.Color(
32540 # protocolor.getRed(),
32541 # protocolor.getGreen(),
32542 # protocolor.getBlue(),
32543 # alpha);
32544 # }
32545 #
32546 # public static Color toProto(java.awt.Color color) {
32547 # float red = (float) color.getRed();
32548 # float green = (float) color.getGreen();
32549 # float blue = (float) color.getBlue();
32550 # float denominator = 255.0;
32551 # Color.Builder resultBuilder =
32552 # Color
32553 # .newBuilder()
32554 # .setRed(red / denominator)
32555 # .setGreen(green / denominator)
32556 # .setBlue(blue / denominator);
32557 # int alpha = color.getAlpha();
32558 # if (alpha != 255) {
32559 # result.setAlpha(
32560 # FloatValue
32561 # .newBuilder()
32562 # .setValue(((float) alpha) / denominator)
32563 # .build());
32564 # }
32565 # return resultBuilder.build();
32566 # }
32567 # // ...
32568 #
32569 # Example (iOS / Obj-C):
32570 #
32571 # // ...
32572 # static UIColor* fromProto(Color* protocolor) {
32573 # float red = [protocolor red];
32574 # float green = [protocolor green];
32575 # float blue = [protocolor blue];
32576 # FloatValue* alpha_wrapper = [protocolor alpha];
32577 # float alpha = 1.0;
32578 # if (alpha_wrapper != nil) {
32579 # alpha = [alpha_wrapper value];
32580 # }
32581 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32582 # }
32583 #
32584 # static Color* toProto(UIColor* color) {
32585 # CGFloat red, green, blue, alpha;
32586 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32587 # return nil;
32588 # }
32589 # Color* result = [Color alloc] init];
32590 # [result setRed:red];
32591 # [result setGreen:green];
32592 # [result setBlue:blue];
32593 # if (alpha <= 0.9999) {
32594 # [result setAlpha:floatWrapperWithValue(alpha)];
32595 # }
32596 # [result autorelease];
32597 # return result;
32598 # }
32599 # // ...
32600 #
32601 # Example (JavaScript):
32602 #
32603 # // ...
32604 #
32605 # var protoToCssColor = function(rgb_color) {
32606 # var redFrac = rgb_color.red || 0.0;
32607 # var greenFrac = rgb_color.green || 0.0;
32608 # var blueFrac = rgb_color.blue || 0.0;
32609 # var red = Math.floor(redFrac * 255);
32610 # var green = Math.floor(greenFrac * 255);
32611 # var blue = Math.floor(blueFrac * 255);
32612 #
32613 # if (!('alpha' in rgb_color)) {
32614 # return rgbToCssColor_(red, green, blue);
32615 # }
32616 #
32617 # var alphaFrac = rgb_color.alpha.value || 0.0;
32618 # var rgbParams = [red, green, blue].join(',');
32619 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32620 # };
32621 #
32622 # var rgbToCssColor_ = function(red, green, blue) {
32623 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32624 # var hexString = rgbNumber.toString(16);
32625 # var missingZeros = 6 - hexString.length;
32626 # var resultBuilder = ['#'];
32627 # for (var i = 0; i < missingZeros; i++) {
32628 # resultBuilder.push('0');
32629 # }
32630 # resultBuilder.push(hexString);
32631 # return resultBuilder.join('');
32632 # };
32633 #
32634 # // ...
32635 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32636 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32637 # the final pixel color is defined by the equation:
32638 #
32639 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32640 #
32641 # This means that a value of 1.0 corresponds to a solid color, whereas
32642 # a value of 0.0 corresponds to a completely transparent color. This
32643 # uses a wrapper message rather than a simple float scalar so that it is
32644 # possible to distinguish between a default value and the value being unset.
32645 # If omitted, this color object is to be rendered as a solid color
32646 # (as if the alpha value had been explicitly given with a value of 1.0).
32647 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32648 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32649 },
32650 "bold": True or False, # True if the text is bold.
32651 "strikethrough": True or False, # True if the text has a strikethrough.
32652 "fontFamily": "A String", # The font family.
32653 "fontSize": 42, # The size of the font.
32654 "italic": True or False, # True if the text is italicized.
32655 "underline": True or False, # True if the text is underlined.
32656 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032705 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032708 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032789 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032792 "startRowIndex": 42, # The start row (inclusive) 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.
32803 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
32804 # This field is only visible to users with edit access to the protected
32805 # range and the document.
32806 # Editors are not supported with warning_only protection.
32807 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
32808 # range. Domain protection is only supported on documents within a domain.
32809 "users": [ # The email addresses of users with edit access to the protected range.
32810 "A String",
32811 ],
32812 "groups": [ # The email addresses of groups with edit access to the protected range.
32813 "A String",
32814 ],
32815 },
32816 "protectedRangeId": 42, # The ID of the protected range.
32817 # This field is read-only.
32818 "warningOnly": True or False, # True if this protected range will show a warning when editing.
32819 # Warning-based protection means that every user can edit data in the
32820 # protected range, except editing will prompt a warning asking the user
32821 # to confirm the edit.
32822 #
32823 # When writing: if this field is true, then editors is ignored.
32824 # Additionally, if this field is changed from true to false and the
32825 # `editors` field is not set (nor included in the field mask), then
32826 # the editors will be set to all the editors in the document.
32827 "range": { # A range on a sheet. # The range that is being protected.
32828 # The range may be fully unbounded, in which case this is considered
32829 # a protected sheet.
32830 #
32831 # When writing, only one of range or named_range_id
32832 # may be set.
32833 # All indexes are zero-based.
32834 # Indexes are half open, e.g the start index is inclusive
32835 # and the end index is exclusive -- [start_index, end_index).
32836 # Missing indexes indicate the range is unbounded on that side.
32837 #
32838 # For example, if `"Sheet1"` is sheet ID 0, then:
32839 #
32840 # `Sheet1!A1:A1 == sheet_id: 0,
32841 # start_row_index: 0, end_row_index: 1,
32842 # start_column_index: 0, end_column_index: 1`
32843 #
32844 # `Sheet1!A3:B4 == sheet_id: 0,
32845 # start_row_index: 2, end_row_index: 4,
32846 # start_column_index: 0, end_column_index: 2`
32847 #
32848 # `Sheet1!A:B == sheet_id: 0,
32849 # start_column_index: 0, end_column_index: 2`
32850 #
32851 # `Sheet1!A5:B == sheet_id: 0,
32852 # start_row_index: 4,
32853 # start_column_index: 0, end_column_index: 2`
32854 #
32855 # `Sheet1 == sheet_id:0`
32856 #
32857 # The start index must always be less than or equal to the end index.
32858 # If the start index equals the end index, then the range is empty.
32859 # Empty ranges are typically not meaningful and are usually rendered in the
32860 # UI as `#REF!`.
32861 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032862 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032863 "sheetId": 42, # The sheet this range is on.
32864 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032865 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032866 },
32867 },
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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070032878 "startRow": 42, # The first row this GridData refers to, zero-based.
32879 "startColumn": 42, # The first column this GridData refers to, zero-based.
32880 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
32881 # in start_column.
32882 { # Properties about a dimension.
32883 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32884 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32885 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32886 # This field is read-only.
32887 },
32888 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032889 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
32890 # in start_row.
32891 { # Properties about a dimension.
32892 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32893 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32894 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32895 # This field is read-only.
32896 },
32897 ],
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033009 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033012 "startRowIndex": 42, # The start row (inclusive) 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.
33018 "summarizeFunction": "A String", # A function to summarize the value.
33019 # If formula is set, the only supported values are
33020 # SUM and
33021 # CUSTOM.
33022 # If sourceColumnOffset is set, then `CUSTOM`
33023 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033024 "name": "A String", # A name to use for the value. This is only used if formula was set.
33025 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033026 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
33027 #
33028 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
33029 # means this value refers to column `C`, whereas the offset `1` would
33030 # refer to column `D`.
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 },
33182 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
33183 "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 },
33312 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
33313 "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 },
34031 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
34032 "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 },
34161 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
34162 "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.
35072 "rowCount": 42, # The number of rows in the grid.
35073 "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.
35075 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
35076 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035261 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035264 "startRowIndex": 42, # The start row (inclusive) 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035280 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035281 # CellData.effectiveFormat will not be set if the
35282 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035283 # This field is read-only.
35284 "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 -070035285 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
35286 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035287 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070035288 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035289 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035290 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035291 },
35292 "textDirection": "A String", # The direction of the text in the cell.
35293 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
35294 # When updating padding, every field must be specified.
35295 "top": 42, # The top padding of the cell.
35296 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035297 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035298 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035299 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035300 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035301 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
35302 # for simplicity of conversion to/from color representations in various
35303 # languages over compactness; for example, the fields of this representation
35304 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35305 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35306 # method in iOS; and, with just a little work, it can be easily formatted into
35307 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35308 #
35309 # Example (Java):
35310 #
35311 # import com.google.type.Color;
35312 #
35313 # // ...
35314 # public static java.awt.Color fromProto(Color protocolor) {
35315 # float alpha = protocolor.hasAlpha()
35316 # ? protocolor.getAlpha().getValue()
35317 # : 1.0;
35318 #
35319 # return new java.awt.Color(
35320 # protocolor.getRed(),
35321 # protocolor.getGreen(),
35322 # protocolor.getBlue(),
35323 # alpha);
35324 # }
35325 #
35326 # public static Color toProto(java.awt.Color color) {
35327 # float red = (float) color.getRed();
35328 # float green = (float) color.getGreen();
35329 # float blue = (float) color.getBlue();
35330 # float denominator = 255.0;
35331 # Color.Builder resultBuilder =
35332 # Color
35333 # .newBuilder()
35334 # .setRed(red / denominator)
35335 # .setGreen(green / denominator)
35336 # .setBlue(blue / denominator);
35337 # int alpha = color.getAlpha();
35338 # if (alpha != 255) {
35339 # result.setAlpha(
35340 # FloatValue
35341 # .newBuilder()
35342 # .setValue(((float) alpha) / denominator)
35343 # .build());
35344 # }
35345 # return resultBuilder.build();
35346 # }
35347 # // ...
35348 #
35349 # Example (iOS / Obj-C):
35350 #
35351 # // ...
35352 # static UIColor* fromProto(Color* protocolor) {
35353 # float red = [protocolor red];
35354 # float green = [protocolor green];
35355 # float blue = [protocolor blue];
35356 # FloatValue* alpha_wrapper = [protocolor alpha];
35357 # float alpha = 1.0;
35358 # if (alpha_wrapper != nil) {
35359 # alpha = [alpha_wrapper value];
35360 # }
35361 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35362 # }
35363 #
35364 # static Color* toProto(UIColor* color) {
35365 # CGFloat red, green, blue, alpha;
35366 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35367 # return nil;
35368 # }
35369 # Color* result = [Color alloc] init];
35370 # [result setRed:red];
35371 # [result setGreen:green];
35372 # [result setBlue:blue];
35373 # if (alpha <= 0.9999) {
35374 # [result setAlpha:floatWrapperWithValue(alpha)];
35375 # }
35376 # [result autorelease];
35377 # return result;
35378 # }
35379 # // ...
35380 #
35381 # Example (JavaScript):
35382 #
35383 # // ...
35384 #
35385 # var protoToCssColor = function(rgb_color) {
35386 # var redFrac = rgb_color.red || 0.0;
35387 # var greenFrac = rgb_color.green || 0.0;
35388 # var blueFrac = rgb_color.blue || 0.0;
35389 # var red = Math.floor(redFrac * 255);
35390 # var green = Math.floor(greenFrac * 255);
35391 # var blue = Math.floor(blueFrac * 255);
35392 #
35393 # if (!('alpha' in rgb_color)) {
35394 # return rgbToCssColor_(red, green, blue);
35395 # }
35396 #
35397 # var alphaFrac = rgb_color.alpha.value || 0.0;
35398 # var rgbParams = [red, green, blue].join(',');
35399 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35400 # };
35401 #
35402 # var rgbToCssColor_ = function(red, green, blue) {
35403 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35404 # var hexString = rgbNumber.toString(16);
35405 # var missingZeros = 6 - hexString.length;
35406 # var resultBuilder = ['#'];
35407 # for (var i = 0; i < missingZeros; i++) {
35408 # resultBuilder.push('0');
35409 # }
35410 # resultBuilder.push(hexString);
35411 # return resultBuilder.join('');
35412 # };
35413 #
35414 # // ...
35415 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35416 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35417 # the final pixel color is defined by the equation:
35418 #
35419 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35420 #
35421 # This means that a value of 1.0 corresponds to a solid color, whereas
35422 # a value of 0.0 corresponds to a completely transparent color. This
35423 # uses a wrapper message rather than a simple float scalar so that it is
35424 # possible to distinguish between a default value and the value being unset.
35425 # If omitted, this color object is to be rendered as a solid color
35426 # (as if the alpha value had been explicitly given with a value of 1.0).
35427 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35428 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35429 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035430 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035431 "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).
35432 # Absent values indicate that the field isn't specified.
35433 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
35434 # for simplicity of conversion to/from color representations in various
35435 # languages over compactness; for example, the fields of this representation
35436 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35437 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35438 # method in iOS; and, with just a little work, it can be easily formatted into
35439 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35440 #
35441 # Example (Java):
35442 #
35443 # import com.google.type.Color;
35444 #
35445 # // ...
35446 # public static java.awt.Color fromProto(Color protocolor) {
35447 # float alpha = protocolor.hasAlpha()
35448 # ? protocolor.getAlpha().getValue()
35449 # : 1.0;
35450 #
35451 # return new java.awt.Color(
35452 # protocolor.getRed(),
35453 # protocolor.getGreen(),
35454 # protocolor.getBlue(),
35455 # alpha);
35456 # }
35457 #
35458 # public static Color toProto(java.awt.Color color) {
35459 # float red = (float) color.getRed();
35460 # float green = (float) color.getGreen();
35461 # float blue = (float) color.getBlue();
35462 # float denominator = 255.0;
35463 # Color.Builder resultBuilder =
35464 # Color
35465 # .newBuilder()
35466 # .setRed(red / denominator)
35467 # .setGreen(green / denominator)
35468 # .setBlue(blue / denominator);
35469 # int alpha = color.getAlpha();
35470 # if (alpha != 255) {
35471 # result.setAlpha(
35472 # FloatValue
35473 # .newBuilder()
35474 # .setValue(((float) alpha) / denominator)
35475 # .build());
35476 # }
35477 # return resultBuilder.build();
35478 # }
35479 # // ...
35480 #
35481 # Example (iOS / Obj-C):
35482 #
35483 # // ...
35484 # static UIColor* fromProto(Color* protocolor) {
35485 # float red = [protocolor red];
35486 # float green = [protocolor green];
35487 # float blue = [protocolor blue];
35488 # FloatValue* alpha_wrapper = [protocolor alpha];
35489 # float alpha = 1.0;
35490 # if (alpha_wrapper != nil) {
35491 # alpha = [alpha_wrapper value];
35492 # }
35493 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35494 # }
35495 #
35496 # static Color* toProto(UIColor* color) {
35497 # CGFloat red, green, blue, alpha;
35498 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35499 # return nil;
35500 # }
35501 # Color* result = [Color alloc] init];
35502 # [result setRed:red];
35503 # [result setGreen:green];
35504 # [result setBlue:blue];
35505 # if (alpha <= 0.9999) {
35506 # [result setAlpha:floatWrapperWithValue(alpha)];
35507 # }
35508 # [result autorelease];
35509 # return result;
35510 # }
35511 # // ...
35512 #
35513 # Example (JavaScript):
35514 #
35515 # // ...
35516 #
35517 # var protoToCssColor = function(rgb_color) {
35518 # var redFrac = rgb_color.red || 0.0;
35519 # var greenFrac = rgb_color.green || 0.0;
35520 # var blueFrac = rgb_color.blue || 0.0;
35521 # var red = Math.floor(redFrac * 255);
35522 # var green = Math.floor(greenFrac * 255);
35523 # var blue = Math.floor(blueFrac * 255);
35524 #
35525 # if (!('alpha' in rgb_color)) {
35526 # return rgbToCssColor_(red, green, blue);
35527 # }
35528 #
35529 # var alphaFrac = rgb_color.alpha.value || 0.0;
35530 # var rgbParams = [red, green, blue].join(',');
35531 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35532 # };
35533 #
35534 # var rgbToCssColor_ = function(red, green, blue) {
35535 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35536 # var hexString = rgbNumber.toString(16);
35537 # var missingZeros = 6 - hexString.length;
35538 # var resultBuilder = ['#'];
35539 # for (var i = 0; i < missingZeros; i++) {
35540 # resultBuilder.push('0');
35541 # }
35542 # resultBuilder.push(hexString);
35543 # return resultBuilder.join('');
35544 # };
35545 #
35546 # // ...
35547 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35548 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35549 # the final pixel color is defined by the equation:
35550 #
35551 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35552 #
35553 # This means that a value of 1.0 corresponds to a solid color, whereas
35554 # a value of 0.0 corresponds to a completely transparent color. This
35555 # uses a wrapper message rather than a simple float scalar so that it is
35556 # possible to distinguish between a default value and the value being unset.
35557 # If omitted, this color object is to be rendered as a solid color
35558 # (as if the alpha value had been explicitly given with a value of 1.0).
35559 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35560 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35561 },
35562 "bold": True or False, # True if the text is bold.
35563 "strikethrough": True or False, # True if the text has a strikethrough.
35564 "fontFamily": "A String", # The font family.
35565 "fontSize": 42, # The size of the font.
35566 "italic": True or False, # True if the text is italicized.
35567 "underline": True or False, # True if the text is underlined.
35568 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070035569 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
35570 "angle": 42, # The angle between the standard orientation and the desired orientation.
35571 # Measured in degrees. Valid values are between -90 and 90. Positive
35572 # angles are angled upwards, negative are angled downwards.
35573 #
35574 # Note: For LTR text direction positive angles are in the counterclockwise
35575 # direction, whereas for RTL they are in the clockwise direction
35576 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
35577 # characters is unchanged.
35578 # For example:
35579 #
35580 # | V |
35581 # | e |
35582 # | r |
35583 # | t |
35584 # | i |
35585 # | c |
35586 # | a |
35587 # | l |
35588 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035589 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
35590 "borders": { # The borders of the cell. # The borders of the cell.
35591 "top": { # A border along a cell. # The top border of the cell.
35592 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35593 # for simplicity of conversion to/from color representations in various
35594 # languages over compactness; for example, the fields of this representation
35595 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35596 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35597 # method in iOS; and, with just a little work, it can be easily formatted into
35598 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35599 #
35600 # Example (Java):
35601 #
35602 # import com.google.type.Color;
35603 #
35604 # // ...
35605 # public static java.awt.Color fromProto(Color protocolor) {
35606 # float alpha = protocolor.hasAlpha()
35607 # ? protocolor.getAlpha().getValue()
35608 # : 1.0;
35609 #
35610 # return new java.awt.Color(
35611 # protocolor.getRed(),
35612 # protocolor.getGreen(),
35613 # protocolor.getBlue(),
35614 # alpha);
35615 # }
35616 #
35617 # public static Color toProto(java.awt.Color color) {
35618 # float red = (float) color.getRed();
35619 # float green = (float) color.getGreen();
35620 # float blue = (float) color.getBlue();
35621 # float denominator = 255.0;
35622 # Color.Builder resultBuilder =
35623 # Color
35624 # .newBuilder()
35625 # .setRed(red / denominator)
35626 # .setGreen(green / denominator)
35627 # .setBlue(blue / denominator);
35628 # int alpha = color.getAlpha();
35629 # if (alpha != 255) {
35630 # result.setAlpha(
35631 # FloatValue
35632 # .newBuilder()
35633 # .setValue(((float) alpha) / denominator)
35634 # .build());
35635 # }
35636 # return resultBuilder.build();
35637 # }
35638 # // ...
35639 #
35640 # Example (iOS / Obj-C):
35641 #
35642 # // ...
35643 # static UIColor* fromProto(Color* protocolor) {
35644 # float red = [protocolor red];
35645 # float green = [protocolor green];
35646 # float blue = [protocolor blue];
35647 # FloatValue* alpha_wrapper = [protocolor alpha];
35648 # float alpha = 1.0;
35649 # if (alpha_wrapper != nil) {
35650 # alpha = [alpha_wrapper value];
35651 # }
35652 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35653 # }
35654 #
35655 # static Color* toProto(UIColor* color) {
35656 # CGFloat red, green, blue, alpha;
35657 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35658 # return nil;
35659 # }
35660 # Color* result = [Color alloc] init];
35661 # [result setRed:red];
35662 # [result setGreen:green];
35663 # [result setBlue:blue];
35664 # if (alpha <= 0.9999) {
35665 # [result setAlpha:floatWrapperWithValue(alpha)];
35666 # }
35667 # [result autorelease];
35668 # return result;
35669 # }
35670 # // ...
35671 #
35672 # Example (JavaScript):
35673 #
35674 # // ...
35675 #
35676 # var protoToCssColor = function(rgb_color) {
35677 # var redFrac = rgb_color.red || 0.0;
35678 # var greenFrac = rgb_color.green || 0.0;
35679 # var blueFrac = rgb_color.blue || 0.0;
35680 # var red = Math.floor(redFrac * 255);
35681 # var green = Math.floor(greenFrac * 255);
35682 # var blue = Math.floor(blueFrac * 255);
35683 #
35684 # if (!('alpha' in rgb_color)) {
35685 # return rgbToCssColor_(red, green, blue);
35686 # }
35687 #
35688 # var alphaFrac = rgb_color.alpha.value || 0.0;
35689 # var rgbParams = [red, green, blue].join(',');
35690 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35691 # };
35692 #
35693 # var rgbToCssColor_ = function(red, green, blue) {
35694 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35695 # var hexString = rgbNumber.toString(16);
35696 # var missingZeros = 6 - hexString.length;
35697 # var resultBuilder = ['#'];
35698 # for (var i = 0; i < missingZeros; i++) {
35699 # resultBuilder.push('0');
35700 # }
35701 # resultBuilder.push(hexString);
35702 # return resultBuilder.join('');
35703 # };
35704 #
35705 # // ...
35706 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35707 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35708 # the final pixel color is defined by the equation:
35709 #
35710 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35711 #
35712 # This means that a value of 1.0 corresponds to a solid color, whereas
35713 # a value of 0.0 corresponds to a completely transparent color. This
35714 # uses a wrapper message rather than a simple float scalar so that it is
35715 # possible to distinguish between a default value and the value being unset.
35716 # If omitted, this color object is to be rendered as a solid color
35717 # (as if the alpha value had been explicitly given with a value of 1.0).
35718 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35719 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35720 },
35721 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035722 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035723 "style": "A String", # The style of the border.
35724 },
35725 "right": { # A border along a cell. # The right border of the cell.
35726 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35727 # for simplicity of conversion to/from color representations in various
35728 # languages over compactness; for example, the fields of this representation
35729 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35730 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35731 # method in iOS; and, with just a little work, it can be easily formatted into
35732 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35733 #
35734 # Example (Java):
35735 #
35736 # import com.google.type.Color;
35737 #
35738 # // ...
35739 # public static java.awt.Color fromProto(Color protocolor) {
35740 # float alpha = protocolor.hasAlpha()
35741 # ? protocolor.getAlpha().getValue()
35742 # : 1.0;
35743 #
35744 # return new java.awt.Color(
35745 # protocolor.getRed(),
35746 # protocolor.getGreen(),
35747 # protocolor.getBlue(),
35748 # alpha);
35749 # }
35750 #
35751 # public static Color toProto(java.awt.Color color) {
35752 # float red = (float) color.getRed();
35753 # float green = (float) color.getGreen();
35754 # float blue = (float) color.getBlue();
35755 # float denominator = 255.0;
35756 # Color.Builder resultBuilder =
35757 # Color
35758 # .newBuilder()
35759 # .setRed(red / denominator)
35760 # .setGreen(green / denominator)
35761 # .setBlue(blue / denominator);
35762 # int alpha = color.getAlpha();
35763 # if (alpha != 255) {
35764 # result.setAlpha(
35765 # FloatValue
35766 # .newBuilder()
35767 # .setValue(((float) alpha) / denominator)
35768 # .build());
35769 # }
35770 # return resultBuilder.build();
35771 # }
35772 # // ...
35773 #
35774 # Example (iOS / Obj-C):
35775 #
35776 # // ...
35777 # static UIColor* fromProto(Color* protocolor) {
35778 # float red = [protocolor red];
35779 # float green = [protocolor green];
35780 # float blue = [protocolor blue];
35781 # FloatValue* alpha_wrapper = [protocolor alpha];
35782 # float alpha = 1.0;
35783 # if (alpha_wrapper != nil) {
35784 # alpha = [alpha_wrapper value];
35785 # }
35786 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35787 # }
35788 #
35789 # static Color* toProto(UIColor* color) {
35790 # CGFloat red, green, blue, alpha;
35791 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35792 # return nil;
35793 # }
35794 # Color* result = [Color alloc] init];
35795 # [result setRed:red];
35796 # [result setGreen:green];
35797 # [result setBlue:blue];
35798 # if (alpha <= 0.9999) {
35799 # [result setAlpha:floatWrapperWithValue(alpha)];
35800 # }
35801 # [result autorelease];
35802 # return result;
35803 # }
35804 # // ...
35805 #
35806 # Example (JavaScript):
35807 #
35808 # // ...
35809 #
35810 # var protoToCssColor = function(rgb_color) {
35811 # var redFrac = rgb_color.red || 0.0;
35812 # var greenFrac = rgb_color.green || 0.0;
35813 # var blueFrac = rgb_color.blue || 0.0;
35814 # var red = Math.floor(redFrac * 255);
35815 # var green = Math.floor(greenFrac * 255);
35816 # var blue = Math.floor(blueFrac * 255);
35817 #
35818 # if (!('alpha' in rgb_color)) {
35819 # return rgbToCssColor_(red, green, blue);
35820 # }
35821 #
35822 # var alphaFrac = rgb_color.alpha.value || 0.0;
35823 # var rgbParams = [red, green, blue].join(',');
35824 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35825 # };
35826 #
35827 # var rgbToCssColor_ = function(red, green, blue) {
35828 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35829 # var hexString = rgbNumber.toString(16);
35830 # var missingZeros = 6 - hexString.length;
35831 # var resultBuilder = ['#'];
35832 # for (var i = 0; i < missingZeros; i++) {
35833 # resultBuilder.push('0');
35834 # }
35835 # resultBuilder.push(hexString);
35836 # return resultBuilder.join('');
35837 # };
35838 #
35839 # // ...
35840 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35841 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35842 # the final pixel color is defined by the equation:
35843 #
35844 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35845 #
35846 # This means that a value of 1.0 corresponds to a solid color, whereas
35847 # a value of 0.0 corresponds to a completely transparent color. This
35848 # uses a wrapper message rather than a simple float scalar so that it is
35849 # possible to distinguish between a default value and the value being unset.
35850 # If omitted, this color object is to be rendered as a solid color
35851 # (as if the alpha value had been explicitly given with a value of 1.0).
35852 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35853 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35854 },
35855 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035856 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035857 "style": "A String", # The style of the border.
35858 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035859 "left": { # A border along a cell. # The left border of the cell.
35860 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35861 # for simplicity of conversion to/from color representations in various
35862 # languages over compactness; for example, the fields of this representation
35863 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35864 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35865 # method in iOS; and, with just a little work, it can be easily formatted into
35866 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35867 #
35868 # Example (Java):
35869 #
35870 # import com.google.type.Color;
35871 #
35872 # // ...
35873 # public static java.awt.Color fromProto(Color protocolor) {
35874 # float alpha = protocolor.hasAlpha()
35875 # ? protocolor.getAlpha().getValue()
35876 # : 1.0;
35877 #
35878 # return new java.awt.Color(
35879 # protocolor.getRed(),
35880 # protocolor.getGreen(),
35881 # protocolor.getBlue(),
35882 # alpha);
35883 # }
35884 #
35885 # public static Color toProto(java.awt.Color color) {
35886 # float red = (float) color.getRed();
35887 # float green = (float) color.getGreen();
35888 # float blue = (float) color.getBlue();
35889 # float denominator = 255.0;
35890 # Color.Builder resultBuilder =
35891 # Color
35892 # .newBuilder()
35893 # .setRed(red / denominator)
35894 # .setGreen(green / denominator)
35895 # .setBlue(blue / denominator);
35896 # int alpha = color.getAlpha();
35897 # if (alpha != 255) {
35898 # result.setAlpha(
35899 # FloatValue
35900 # .newBuilder()
35901 # .setValue(((float) alpha) / denominator)
35902 # .build());
35903 # }
35904 # return resultBuilder.build();
35905 # }
35906 # // ...
35907 #
35908 # Example (iOS / Obj-C):
35909 #
35910 # // ...
35911 # static UIColor* fromProto(Color* protocolor) {
35912 # float red = [protocolor red];
35913 # float green = [protocolor green];
35914 # float blue = [protocolor blue];
35915 # FloatValue* alpha_wrapper = [protocolor alpha];
35916 # float alpha = 1.0;
35917 # if (alpha_wrapper != nil) {
35918 # alpha = [alpha_wrapper value];
35919 # }
35920 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35921 # }
35922 #
35923 # static Color* toProto(UIColor* color) {
35924 # CGFloat red, green, blue, alpha;
35925 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35926 # return nil;
35927 # }
35928 # Color* result = [Color alloc] init];
35929 # [result setRed:red];
35930 # [result setGreen:green];
35931 # [result setBlue:blue];
35932 # if (alpha <= 0.9999) {
35933 # [result setAlpha:floatWrapperWithValue(alpha)];
35934 # }
35935 # [result autorelease];
35936 # return result;
35937 # }
35938 # // ...
35939 #
35940 # Example (JavaScript):
35941 #
35942 # // ...
35943 #
35944 # var protoToCssColor = function(rgb_color) {
35945 # var redFrac = rgb_color.red || 0.0;
35946 # var greenFrac = rgb_color.green || 0.0;
35947 # var blueFrac = rgb_color.blue || 0.0;
35948 # var red = Math.floor(redFrac * 255);
35949 # var green = Math.floor(greenFrac * 255);
35950 # var blue = Math.floor(blueFrac * 255);
35951 #
35952 # if (!('alpha' in rgb_color)) {
35953 # return rgbToCssColor_(red, green, blue);
35954 # }
35955 #
35956 # var alphaFrac = rgb_color.alpha.value || 0.0;
35957 # var rgbParams = [red, green, blue].join(',');
35958 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35959 # };
35960 #
35961 # var rgbToCssColor_ = function(red, green, blue) {
35962 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35963 # var hexString = rgbNumber.toString(16);
35964 # var missingZeros = 6 - hexString.length;
35965 # var resultBuilder = ['#'];
35966 # for (var i = 0; i < missingZeros; i++) {
35967 # resultBuilder.push('0');
35968 # }
35969 # resultBuilder.push(hexString);
35970 # return resultBuilder.join('');
35971 # };
35972 #
35973 # // ...
35974 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35975 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35976 # the final pixel color is defined by the equation:
35977 #
35978 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35979 #
35980 # This means that a value of 1.0 corresponds to a solid color, whereas
35981 # a value of 0.0 corresponds to a completely transparent color. This
35982 # uses a wrapper message rather than a simple float scalar so that it is
35983 # possible to distinguish between a default value and the value being unset.
35984 # If omitted, this color object is to be rendered as a solid color
35985 # (as if the alpha value had been explicitly given with a value of 1.0).
35986 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35987 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35988 },
35989 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035990 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035991 "style": "A String", # The style of the border.
35992 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070035993 "bottom": { # A border along a cell. # The bottom border of the cell.
35994 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35995 # for simplicity of conversion to/from color representations in various
35996 # languages over compactness; for example, the fields of this representation
35997 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35998 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35999 # method in iOS; and, with just a little work, it can be easily formatted into
36000 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36001 #
36002 # Example (Java):
36003 #
36004 # import com.google.type.Color;
36005 #
36006 # // ...
36007 # public static java.awt.Color fromProto(Color protocolor) {
36008 # float alpha = protocolor.hasAlpha()
36009 # ? protocolor.getAlpha().getValue()
36010 # : 1.0;
36011 #
36012 # return new java.awt.Color(
36013 # protocolor.getRed(),
36014 # protocolor.getGreen(),
36015 # protocolor.getBlue(),
36016 # alpha);
36017 # }
36018 #
36019 # public static Color toProto(java.awt.Color color) {
36020 # float red = (float) color.getRed();
36021 # float green = (float) color.getGreen();
36022 # float blue = (float) color.getBlue();
36023 # float denominator = 255.0;
36024 # Color.Builder resultBuilder =
36025 # Color
36026 # .newBuilder()
36027 # .setRed(red / denominator)
36028 # .setGreen(green / denominator)
36029 # .setBlue(blue / denominator);
36030 # int alpha = color.getAlpha();
36031 # if (alpha != 255) {
36032 # result.setAlpha(
36033 # FloatValue
36034 # .newBuilder()
36035 # .setValue(((float) alpha) / denominator)
36036 # .build());
36037 # }
36038 # return resultBuilder.build();
36039 # }
36040 # // ...
36041 #
36042 # Example (iOS / Obj-C):
36043 #
36044 # // ...
36045 # static UIColor* fromProto(Color* protocolor) {
36046 # float red = [protocolor red];
36047 # float green = [protocolor green];
36048 # float blue = [protocolor blue];
36049 # FloatValue* alpha_wrapper = [protocolor alpha];
36050 # float alpha = 1.0;
36051 # if (alpha_wrapper != nil) {
36052 # alpha = [alpha_wrapper value];
36053 # }
36054 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36055 # }
36056 #
36057 # static Color* toProto(UIColor* color) {
36058 # CGFloat red, green, blue, alpha;
36059 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36060 # return nil;
36061 # }
36062 # Color* result = [Color alloc] init];
36063 # [result setRed:red];
36064 # [result setGreen:green];
36065 # [result setBlue:blue];
36066 # if (alpha <= 0.9999) {
36067 # [result setAlpha:floatWrapperWithValue(alpha)];
36068 # }
36069 # [result autorelease];
36070 # return result;
36071 # }
36072 # // ...
36073 #
36074 # Example (JavaScript):
36075 #
36076 # // ...
36077 #
36078 # var protoToCssColor = function(rgb_color) {
36079 # var redFrac = rgb_color.red || 0.0;
36080 # var greenFrac = rgb_color.green || 0.0;
36081 # var blueFrac = rgb_color.blue || 0.0;
36082 # var red = Math.floor(redFrac * 255);
36083 # var green = Math.floor(greenFrac * 255);
36084 # var blue = Math.floor(blueFrac * 255);
36085 #
36086 # if (!('alpha' in rgb_color)) {
36087 # return rgbToCssColor_(red, green, blue);
36088 # }
36089 #
36090 # var alphaFrac = rgb_color.alpha.value || 0.0;
36091 # var rgbParams = [red, green, blue].join(',');
36092 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36093 # };
36094 #
36095 # var rgbToCssColor_ = function(red, green, blue) {
36096 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36097 # var hexString = rgbNumber.toString(16);
36098 # var missingZeros = 6 - hexString.length;
36099 # var resultBuilder = ['#'];
36100 # for (var i = 0; i < missingZeros; i++) {
36101 # resultBuilder.push('0');
36102 # }
36103 # resultBuilder.push(hexString);
36104 # return resultBuilder.join('');
36105 # };
36106 #
36107 # // ...
36108 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36109 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36110 # the final pixel color is defined by the equation:
36111 #
36112 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36113 #
36114 # This means that a value of 1.0 corresponds to a solid color, whereas
36115 # a value of 0.0 corresponds to a completely transparent color. This
36116 # uses a wrapper message rather than a simple float scalar so that it is
36117 # possible to distinguish between a default value and the value being unset.
36118 # If omitted, this color object is to be rendered as a solid color
36119 # (as if the alpha value had been explicitly given with a value of 1.0).
36120 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36121 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36122 },
36123 "width": 42, # The width of the border, in pixels.
36124 # Deprecated; the width is determined by the "style" field.
36125 "style": "A String", # The style of the border.
36126 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036127 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070036128 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036129 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070036130 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036180 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036183 "startRowIndex": 42, # The start row (inclusive) 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036235 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036365 "verticalAlignment": "A String", # The vertical 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040037516 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040037519 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038635 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038638 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038672 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038675 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070038736 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070038737 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
38738 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038796 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038799 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038853 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038856 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038928 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040038931 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039006 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039009 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070039022 "title": "A String", # The title of this axis. If set, this overrides any title inferred
39023 # from headers of the data.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039024 "format": { # The format of a run of text in a cell. # The format of the title.
39025 # Only valid if the axis is not associated with the domain.
39026 # Absent values indicate that the field isn't specified.
39027 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39028 # for simplicity of conversion to/from color representations in various
39029 # languages over compactness; for example, the fields of this representation
39030 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39031 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39032 # method in iOS; and, with just a little work, it can be easily formatted into
39033 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39034 #
39035 # Example (Java):
39036 #
39037 # import com.google.type.Color;
39038 #
39039 # // ...
39040 # public static java.awt.Color fromProto(Color protocolor) {
39041 # float alpha = protocolor.hasAlpha()
39042 # ? protocolor.getAlpha().getValue()
39043 # : 1.0;
39044 #
39045 # return new java.awt.Color(
39046 # protocolor.getRed(),
39047 # protocolor.getGreen(),
39048 # protocolor.getBlue(),
39049 # alpha);
39050 # }
39051 #
39052 # public static Color toProto(java.awt.Color color) {
39053 # float red = (float) color.getRed();
39054 # float green = (float) color.getGreen();
39055 # float blue = (float) color.getBlue();
39056 # float denominator = 255.0;
39057 # Color.Builder resultBuilder =
39058 # Color
39059 # .newBuilder()
39060 # .setRed(red / denominator)
39061 # .setGreen(green / denominator)
39062 # .setBlue(blue / denominator);
39063 # int alpha = color.getAlpha();
39064 # if (alpha != 255) {
39065 # result.setAlpha(
39066 # FloatValue
39067 # .newBuilder()
39068 # .setValue(((float) alpha) / denominator)
39069 # .build());
39070 # }
39071 # return resultBuilder.build();
39072 # }
39073 # // ...
39074 #
39075 # Example (iOS / Obj-C):
39076 #
39077 # // ...
39078 # static UIColor* fromProto(Color* protocolor) {
39079 # float red = [protocolor red];
39080 # float green = [protocolor green];
39081 # float blue = [protocolor blue];
39082 # FloatValue* alpha_wrapper = [protocolor alpha];
39083 # float alpha = 1.0;
39084 # if (alpha_wrapper != nil) {
39085 # alpha = [alpha_wrapper value];
39086 # }
39087 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39088 # }
39089 #
39090 # static Color* toProto(UIColor* color) {
39091 # CGFloat red, green, blue, alpha;
39092 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39093 # return nil;
39094 # }
39095 # Color* result = [Color alloc] init];
39096 # [result setRed:red];
39097 # [result setGreen:green];
39098 # [result setBlue:blue];
39099 # if (alpha <= 0.9999) {
39100 # [result setAlpha:floatWrapperWithValue(alpha)];
39101 # }
39102 # [result autorelease];
39103 # return result;
39104 # }
39105 # // ...
39106 #
39107 # Example (JavaScript):
39108 #
39109 # // ...
39110 #
39111 # var protoToCssColor = function(rgb_color) {
39112 # var redFrac = rgb_color.red || 0.0;
39113 # var greenFrac = rgb_color.green || 0.0;
39114 # var blueFrac = rgb_color.blue || 0.0;
39115 # var red = Math.floor(redFrac * 255);
39116 # var green = Math.floor(greenFrac * 255);
39117 # var blue = Math.floor(blueFrac * 255);
39118 #
39119 # if (!('alpha' in rgb_color)) {
39120 # return rgbToCssColor_(red, green, blue);
39121 # }
39122 #
39123 # var alphaFrac = rgb_color.alpha.value || 0.0;
39124 # var rgbParams = [red, green, blue].join(',');
39125 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39126 # };
39127 #
39128 # var rgbToCssColor_ = function(red, green, blue) {
39129 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39130 # var hexString = rgbNumber.toString(16);
39131 # var missingZeros = 6 - hexString.length;
39132 # var resultBuilder = ['#'];
39133 # for (var i = 0; i < missingZeros; i++) {
39134 # resultBuilder.push('0');
39135 # }
39136 # resultBuilder.push(hexString);
39137 # return resultBuilder.join('');
39138 # };
39139 #
39140 # // ...
39141 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39142 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39143 # the final pixel color is defined by the equation:
39144 #
39145 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39146 #
39147 # This means that a value of 1.0 corresponds to a solid color, whereas
39148 # a value of 0.0 corresponds to a completely transparent color. This
39149 # uses a wrapper message rather than a simple float scalar so that it is
39150 # possible to distinguish between a default value and the value being unset.
39151 # If omitted, this color object is to be rendered as a solid color
39152 # (as if the alpha value had been explicitly given with a value of 1.0).
39153 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39154 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39155 },
39156 "bold": True or False, # True if the text is bold.
39157 "strikethrough": True or False, # True if the text has a strikethrough.
39158 "fontFamily": "A String", # The font family.
39159 "fontSize": 42, # The size of the font.
39160 "italic": True or False, # True if the text is italicized.
39161 "underline": True or False, # True if the text is underlined.
39162 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039211 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039214 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039295 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039298 "startRowIndex": 42, # The start row (inclusive) 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.
39309 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
39310 # This field is only visible to users with edit access to the protected
39311 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039312 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039313 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
39314 # range. Domain protection is only supported on documents within a domain.
39315 "users": [ # The email addresses of users with edit access to the protected range.
39316 "A String",
39317 ],
39318 "groups": [ # The email addresses of groups with edit access to the protected range.
39319 "A String",
39320 ],
39321 },
39322 "protectedRangeId": 42, # The ID of the protected range.
39323 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039324 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039325 # Warning-based protection means that every user can edit data in the
39326 # protected range, except editing will prompt a warning asking the user
39327 # to confirm the edit.
39328 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039329 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039330 # Additionally, if this field is changed from true to false and the
39331 # `editors` field is not set (nor included in the field mask), then
39332 # the editors will be set to all the editors in the document.
39333 "range": { # A range on a sheet. # The range that is being protected.
39334 # The range may be fully unbounded, in which case this is considered
39335 # a protected sheet.
39336 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039337 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039338 # may be set.
39339 # All indexes are zero-based.
39340 # Indexes are half open, e.g the start index is inclusive
39341 # and the end index is exclusive -- [start_index, end_index).
39342 # Missing indexes indicate the range is unbounded on that side.
39343 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039344 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039345 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039346 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039347 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039348 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039349 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039350 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039351 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039352 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039353 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039354 # `Sheet1!A:B == sheet_id: 0,
39355 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039356 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039357 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039358 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039359 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039360 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039361 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039362 #
39363 # The start index must always be less than or equal to the end index.
39364 # If the start index equals the end index, then the range is empty.
39365 # Empty ranges are typically not meaningful and are usually rendered in the
39366 # UI as `#REF!`.
39367 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039368 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039369 "sheetId": 42, # The sheet this range is on.
39370 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039371 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039372 },
39373 },
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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070039384 "startRow": 42, # The first row this GridData refers to, zero-based.
39385 "startColumn": 42, # The first column this GridData refers to, zero-based.
39386 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
39387 # in start_column.
39388 { # Properties about a dimension.
39389 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
39390 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
39391 "hiddenByFilter": True or False, # True if this dimension is being filtered.
39392 # This field is read-only.
39393 },
39394 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039395 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039396 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039397 { # Properties about a dimension.
39398 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
39399 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
39400 "hiddenByFilter": True or False, # True if this dimension is being filtered.
39401 # This field is read-only.
39402 },
39403 ],
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039515 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039518 "startRowIndex": 42, # The start row (inclusive) 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.
39524 "summarizeFunction": "A String", # A function to summarize the value.
39525 # If formula is set, the only supported values are
39526 # SUM and
39527 # CUSTOM.
39528 # If sourceColumnOffset is set, then `CUSTOM`
39529 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039530 "name": "A String", # A name to use for the value. This is only used if formula was set.
39531 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039532 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
39533 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039534 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039535 # means this value refers to column `C`, whereas the offset `1` would
39536 # refer to column `D`.
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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039688 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039818 "verticalAlignment": "A String", # The vertical 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040537 "horizontalAlignment": "A String", # The horizontal 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 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040667 "verticalAlignment": "A String", # The vertical 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.
41578 "rowCount": 42, # The number of rows in the grid.
41579 "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.
41581 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
41582 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041797 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041800 "startRowIndex": 42, # The start row (inclusive) 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041816 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
41817 # CellData.effectiveFormat will not be set if the
41818 # cell's format is equal to this default format.
41819 # This field is read-only.
41820 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
41821 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
41822 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041823 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041824 # information about the supported patterns.
41825 "type": "A String", # The type of the number format.
41826 # When writing, this field must be set.
41827 },
41828 "textDirection": "A String", # The direction of the text in the cell.
41829 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
41830 # When updating padding, every field must be specified.
41831 "top": 42, # The top padding of the cell.
41832 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041833 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041834 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041835 },
41836 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
41837 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
41838 # for simplicity of conversion to/from color representations in various
41839 # languages over compactness; for example, the fields of this representation
41840 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41841 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41842 # method in iOS; and, with just a little work, it can be easily formatted into
41843 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041844 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041845 # Example (Java):
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041846 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041847 # import com.google.type.Color;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041848 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041849 # // ...
41850 # public static java.awt.Color fromProto(Color protocolor) {
41851 # float alpha = protocolor.hasAlpha()
41852 # ? protocolor.getAlpha().getValue()
41853 # : 1.0;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041854 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041855 # return new java.awt.Color(
41856 # protocolor.getRed(),
41857 # protocolor.getGreen(),
41858 # protocolor.getBlue(),
41859 # alpha);
41860 # }
41861 #
41862 # public static Color toProto(java.awt.Color color) {
41863 # float red = (float) color.getRed();
41864 # float green = (float) color.getGreen();
41865 # float blue = (float) color.getBlue();
41866 # float denominator = 255.0;
41867 # Color.Builder resultBuilder =
41868 # Color
41869 # .newBuilder()
41870 # .setRed(red / denominator)
41871 # .setGreen(green / denominator)
41872 # .setBlue(blue / denominator);
41873 # int alpha = color.getAlpha();
41874 # if (alpha != 255) {
41875 # result.setAlpha(
41876 # FloatValue
41877 # .newBuilder()
41878 # .setValue(((float) alpha) / denominator)
41879 # .build());
41880 # }
41881 # return resultBuilder.build();
41882 # }
41883 # // ...
41884 #
41885 # Example (iOS / Obj-C):
41886 #
41887 # // ...
41888 # static UIColor* fromProto(Color* protocolor) {
41889 # float red = [protocolor red];
41890 # float green = [protocolor green];
41891 # float blue = [protocolor blue];
41892 # FloatValue* alpha_wrapper = [protocolor alpha];
41893 # float alpha = 1.0;
41894 # if (alpha_wrapper != nil) {
41895 # alpha = [alpha_wrapper value];
41896 # }
41897 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41898 # }
41899 #
41900 # static Color* toProto(UIColor* color) {
41901 # CGFloat red, green, blue, alpha;
41902 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41903 # return nil;
41904 # }
41905 # Color* result = [Color alloc] init];
41906 # [result setRed:red];
41907 # [result setGreen:green];
41908 # [result setBlue:blue];
41909 # if (alpha <= 0.9999) {
41910 # [result setAlpha:floatWrapperWithValue(alpha)];
41911 # }
41912 # [result autorelease];
41913 # return result;
41914 # }
41915 # // ...
41916 #
41917 # Example (JavaScript):
41918 #
41919 # // ...
41920 #
41921 # var protoToCssColor = function(rgb_color) {
41922 # var redFrac = rgb_color.red || 0.0;
41923 # var greenFrac = rgb_color.green || 0.0;
41924 # var blueFrac = rgb_color.blue || 0.0;
41925 # var red = Math.floor(redFrac * 255);
41926 # var green = Math.floor(greenFrac * 255);
41927 # var blue = Math.floor(blueFrac * 255);
41928 #
41929 # if (!('alpha' in rgb_color)) {
41930 # return rgbToCssColor_(red, green, blue);
41931 # }
41932 #
41933 # var alphaFrac = rgb_color.alpha.value || 0.0;
41934 # var rgbParams = [red, green, blue].join(',');
41935 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41936 # };
41937 #
41938 # var rgbToCssColor_ = function(red, green, blue) {
41939 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41940 # var hexString = rgbNumber.toString(16);
41941 # var missingZeros = 6 - hexString.length;
41942 # var resultBuilder = ['#'];
41943 # for (var i = 0; i < missingZeros; i++) {
41944 # resultBuilder.push('0');
41945 # }
41946 # resultBuilder.push(hexString);
41947 # return resultBuilder.join('');
41948 # };
41949 #
41950 # // ...
41951 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41952 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41953 # the final pixel color is defined by the equation:
41954 #
41955 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41956 #
41957 # This means that a value of 1.0 corresponds to a solid color, whereas
41958 # a value of 0.0 corresponds to a completely transparent color. This
41959 # uses a wrapper message rather than a simple float scalar so that it is
41960 # possible to distinguish between a default value and the value being unset.
41961 # If omitted, this color object is to be rendered as a solid color
41962 # (as if the alpha value had been explicitly given with a value of 1.0).
41963 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41964 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41965 },
41966 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
41967 "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).
41968 # Absent values indicate that the field isn't specified.
41969 "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 -070041970 # for simplicity of conversion to/from color representations in various
41971 # languages over compactness; for example, the fields of this representation
41972 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41973 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41974 # method in iOS; and, with just a little work, it can be easily formatted into
41975 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41976 #
41977 # Example (Java):
41978 #
41979 # import com.google.type.Color;
41980 #
41981 # // ...
41982 # public static java.awt.Color fromProto(Color protocolor) {
41983 # float alpha = protocolor.hasAlpha()
41984 # ? protocolor.getAlpha().getValue()
41985 # : 1.0;
41986 #
41987 # return new java.awt.Color(
41988 # protocolor.getRed(),
41989 # protocolor.getGreen(),
41990 # protocolor.getBlue(),
41991 # alpha);
41992 # }
41993 #
41994 # public static Color toProto(java.awt.Color color) {
41995 # float red = (float) color.getRed();
41996 # float green = (float) color.getGreen();
41997 # float blue = (float) color.getBlue();
41998 # float denominator = 255.0;
41999 # Color.Builder resultBuilder =
42000 # Color
42001 # .newBuilder()
42002 # .setRed(red / denominator)
42003 # .setGreen(green / denominator)
42004 # .setBlue(blue / denominator);
42005 # int alpha = color.getAlpha();
42006 # if (alpha != 255) {
42007 # result.setAlpha(
42008 # FloatValue
42009 # .newBuilder()
42010 # .setValue(((float) alpha) / denominator)
42011 # .build());
42012 # }
42013 # return resultBuilder.build();
42014 # }
42015 # // ...
42016 #
42017 # Example (iOS / Obj-C):
42018 #
42019 # // ...
42020 # static UIColor* fromProto(Color* protocolor) {
42021 # float red = [protocolor red];
42022 # float green = [protocolor green];
42023 # float blue = [protocolor blue];
42024 # FloatValue* alpha_wrapper = [protocolor alpha];
42025 # float alpha = 1.0;
42026 # if (alpha_wrapper != nil) {
42027 # alpha = [alpha_wrapper value];
42028 # }
42029 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42030 # }
42031 #
42032 # static Color* toProto(UIColor* color) {
42033 # CGFloat red, green, blue, alpha;
42034 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42035 # return nil;
42036 # }
42037 # Color* result = [Color alloc] init];
42038 # [result setRed:red];
42039 # [result setGreen:green];
42040 # [result setBlue:blue];
42041 # if (alpha <= 0.9999) {
42042 # [result setAlpha:floatWrapperWithValue(alpha)];
42043 # }
42044 # [result autorelease];
42045 # return result;
42046 # }
42047 # // ...
42048 #
42049 # Example (JavaScript):
42050 #
42051 # // ...
42052 #
42053 # var protoToCssColor = function(rgb_color) {
42054 # var redFrac = rgb_color.red || 0.0;
42055 # var greenFrac = rgb_color.green || 0.0;
42056 # var blueFrac = rgb_color.blue || 0.0;
42057 # var red = Math.floor(redFrac * 255);
42058 # var green = Math.floor(greenFrac * 255);
42059 # var blue = Math.floor(blueFrac * 255);
42060 #
42061 # if (!('alpha' in rgb_color)) {
42062 # return rgbToCssColor_(red, green, blue);
42063 # }
42064 #
42065 # var alphaFrac = rgb_color.alpha.value || 0.0;
42066 # var rgbParams = [red, green, blue].join(',');
42067 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42068 # };
42069 #
42070 # var rgbToCssColor_ = function(red, green, blue) {
42071 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42072 # var hexString = rgbNumber.toString(16);
42073 # var missingZeros = 6 - hexString.length;
42074 # var resultBuilder = ['#'];
42075 # for (var i = 0; i < missingZeros; i++) {
42076 # resultBuilder.push('0');
42077 # }
42078 # resultBuilder.push(hexString);
42079 # return resultBuilder.join('');
42080 # };
42081 #
42082 # // ...
42083 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42084 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42085 # the final pixel color is defined by the equation:
42086 #
42087 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42088 #
42089 # This means that a value of 1.0 corresponds to a solid color, whereas
42090 # a value of 0.0 corresponds to a completely transparent color. This
42091 # uses a wrapper message rather than a simple float scalar so that it is
42092 # possible to distinguish between a default value and the value being unset.
42093 # If omitted, this color object is to be rendered as a solid color
42094 # (as if the alpha value had been explicitly given with a value of 1.0).
42095 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42096 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42097 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042098 "bold": True or False, # True if the text is bold.
42099 "strikethrough": True or False, # True if the text has a strikethrough.
42100 "fontFamily": "A String", # The font family.
42101 "fontSize": 42, # The size of the font.
42102 "italic": True or False, # True if the text is italicized.
42103 "underline": True or False, # True if the text is underlined.
42104 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042105 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
42106 "angle": 42, # The angle between the standard orientation and the desired orientation.
42107 # Measured in degrees. Valid values are between -90 and 90. Positive
42108 # angles are angled upwards, negative are angled downwards.
42109 #
42110 # Note: For LTR text direction positive angles are in the counterclockwise
42111 # direction, whereas for RTL they are in the clockwise direction
42112 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
42113 # characters is unchanged.
42114 # For example:
42115 #
42116 # | V |
42117 # | e |
42118 # | r |
42119 # | t |
42120 # | i |
42121 # | c |
42122 # | a |
42123 # | l |
42124 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042125 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
42126 "borders": { # The borders of the cell. # The borders of the cell.
42127 "top": { # A border along a cell. # The top border of the cell.
42128 "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 -070042129 # for simplicity of conversion to/from color representations in various
42130 # languages over compactness; for example, the fields of this representation
42131 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42132 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42133 # method in iOS; and, with just a little work, it can be easily formatted into
42134 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42135 #
42136 # Example (Java):
42137 #
42138 # import com.google.type.Color;
42139 #
42140 # // ...
42141 # public static java.awt.Color fromProto(Color protocolor) {
42142 # float alpha = protocolor.hasAlpha()
42143 # ? protocolor.getAlpha().getValue()
42144 # : 1.0;
42145 #
42146 # return new java.awt.Color(
42147 # protocolor.getRed(),
42148 # protocolor.getGreen(),
42149 # protocolor.getBlue(),
42150 # alpha);
42151 # }
42152 #
42153 # public static Color toProto(java.awt.Color color) {
42154 # float red = (float) color.getRed();
42155 # float green = (float) color.getGreen();
42156 # float blue = (float) color.getBlue();
42157 # float denominator = 255.0;
42158 # Color.Builder resultBuilder =
42159 # Color
42160 # .newBuilder()
42161 # .setRed(red / denominator)
42162 # .setGreen(green / denominator)
42163 # .setBlue(blue / denominator);
42164 # int alpha = color.getAlpha();
42165 # if (alpha != 255) {
42166 # result.setAlpha(
42167 # FloatValue
42168 # .newBuilder()
42169 # .setValue(((float) alpha) / denominator)
42170 # .build());
42171 # }
42172 # return resultBuilder.build();
42173 # }
42174 # // ...
42175 #
42176 # Example (iOS / Obj-C):
42177 #
42178 # // ...
42179 # static UIColor* fromProto(Color* protocolor) {
42180 # float red = [protocolor red];
42181 # float green = [protocolor green];
42182 # float blue = [protocolor blue];
42183 # FloatValue* alpha_wrapper = [protocolor alpha];
42184 # float alpha = 1.0;
42185 # if (alpha_wrapper != nil) {
42186 # alpha = [alpha_wrapper value];
42187 # }
42188 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42189 # }
42190 #
42191 # static Color* toProto(UIColor* color) {
42192 # CGFloat red, green, blue, alpha;
42193 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42194 # return nil;
42195 # }
42196 # Color* result = [Color alloc] init];
42197 # [result setRed:red];
42198 # [result setGreen:green];
42199 # [result setBlue:blue];
42200 # if (alpha <= 0.9999) {
42201 # [result setAlpha:floatWrapperWithValue(alpha)];
42202 # }
42203 # [result autorelease];
42204 # return result;
42205 # }
42206 # // ...
42207 #
42208 # Example (JavaScript):
42209 #
42210 # // ...
42211 #
42212 # var protoToCssColor = function(rgb_color) {
42213 # var redFrac = rgb_color.red || 0.0;
42214 # var greenFrac = rgb_color.green || 0.0;
42215 # var blueFrac = rgb_color.blue || 0.0;
42216 # var red = Math.floor(redFrac * 255);
42217 # var green = Math.floor(greenFrac * 255);
42218 # var blue = Math.floor(blueFrac * 255);
42219 #
42220 # if (!('alpha' in rgb_color)) {
42221 # return rgbToCssColor_(red, green, blue);
42222 # }
42223 #
42224 # var alphaFrac = rgb_color.alpha.value || 0.0;
42225 # var rgbParams = [red, green, blue].join(',');
42226 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42227 # };
42228 #
42229 # var rgbToCssColor_ = function(red, green, blue) {
42230 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42231 # var hexString = rgbNumber.toString(16);
42232 # var missingZeros = 6 - hexString.length;
42233 # var resultBuilder = ['#'];
42234 # for (var i = 0; i < missingZeros; i++) {
42235 # resultBuilder.push('0');
42236 # }
42237 # resultBuilder.push(hexString);
42238 # return resultBuilder.join('');
42239 # };
42240 #
42241 # // ...
42242 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42243 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42244 # the final pixel color is defined by the equation:
42245 #
42246 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42247 #
42248 # This means that a value of 1.0 corresponds to a solid color, whereas
42249 # a value of 0.0 corresponds to a completely transparent color. This
42250 # uses a wrapper message rather than a simple float scalar so that it is
42251 # possible to distinguish between a default value and the value being unset.
42252 # If omitted, this color object is to be rendered as a solid color
42253 # (as if the alpha value had been explicitly given with a value of 1.0).
42254 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42255 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42256 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042257 "width": 42, # The width of the border, in pixels.
42258 # Deprecated; the width is determined by the "style" field.
42259 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042260 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042261 "right": { # A border along a cell. # The right border of the cell.
42262 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42263 # for simplicity of conversion to/from color representations in various
42264 # languages over compactness; for example, the fields of this representation
42265 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42266 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42267 # method in iOS; and, with just a little work, it can be easily formatted into
42268 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42269 #
42270 # Example (Java):
42271 #
42272 # import com.google.type.Color;
42273 #
42274 # // ...
42275 # public static java.awt.Color fromProto(Color protocolor) {
42276 # float alpha = protocolor.hasAlpha()
42277 # ? protocolor.getAlpha().getValue()
42278 # : 1.0;
42279 #
42280 # return new java.awt.Color(
42281 # protocolor.getRed(),
42282 # protocolor.getGreen(),
42283 # protocolor.getBlue(),
42284 # alpha);
42285 # }
42286 #
42287 # public static Color toProto(java.awt.Color color) {
42288 # float red = (float) color.getRed();
42289 # float green = (float) color.getGreen();
42290 # float blue = (float) color.getBlue();
42291 # float denominator = 255.0;
42292 # Color.Builder resultBuilder =
42293 # Color
42294 # .newBuilder()
42295 # .setRed(red / denominator)
42296 # .setGreen(green / denominator)
42297 # .setBlue(blue / denominator);
42298 # int alpha = color.getAlpha();
42299 # if (alpha != 255) {
42300 # result.setAlpha(
42301 # FloatValue
42302 # .newBuilder()
42303 # .setValue(((float) alpha) / denominator)
42304 # .build());
42305 # }
42306 # return resultBuilder.build();
42307 # }
42308 # // ...
42309 #
42310 # Example (iOS / Obj-C):
42311 #
42312 # // ...
42313 # static UIColor* fromProto(Color* protocolor) {
42314 # float red = [protocolor red];
42315 # float green = [protocolor green];
42316 # float blue = [protocolor blue];
42317 # FloatValue* alpha_wrapper = [protocolor alpha];
42318 # float alpha = 1.0;
42319 # if (alpha_wrapper != nil) {
42320 # alpha = [alpha_wrapper value];
42321 # }
42322 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42323 # }
42324 #
42325 # static Color* toProto(UIColor* color) {
42326 # CGFloat red, green, blue, alpha;
42327 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42328 # return nil;
42329 # }
42330 # Color* result = [Color alloc] init];
42331 # [result setRed:red];
42332 # [result setGreen:green];
42333 # [result setBlue:blue];
42334 # if (alpha <= 0.9999) {
42335 # [result setAlpha:floatWrapperWithValue(alpha)];
42336 # }
42337 # [result autorelease];
42338 # return result;
42339 # }
42340 # // ...
42341 #
42342 # Example (JavaScript):
42343 #
42344 # // ...
42345 #
42346 # var protoToCssColor = function(rgb_color) {
42347 # var redFrac = rgb_color.red || 0.0;
42348 # var greenFrac = rgb_color.green || 0.0;
42349 # var blueFrac = rgb_color.blue || 0.0;
42350 # var red = Math.floor(redFrac * 255);
42351 # var green = Math.floor(greenFrac * 255);
42352 # var blue = Math.floor(blueFrac * 255);
42353 #
42354 # if (!('alpha' in rgb_color)) {
42355 # return rgbToCssColor_(red, green, blue);
42356 # }
42357 #
42358 # var alphaFrac = rgb_color.alpha.value || 0.0;
42359 # var rgbParams = [red, green, blue].join(',');
42360 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42361 # };
42362 #
42363 # var rgbToCssColor_ = function(red, green, blue) {
42364 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42365 # var hexString = rgbNumber.toString(16);
42366 # var missingZeros = 6 - hexString.length;
42367 # var resultBuilder = ['#'];
42368 # for (var i = 0; i < missingZeros; i++) {
42369 # resultBuilder.push('0');
42370 # }
42371 # resultBuilder.push(hexString);
42372 # return resultBuilder.join('');
42373 # };
42374 #
42375 # // ...
42376 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42377 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42378 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042379 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042380 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042381 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042382 # This means that a value of 1.0 corresponds to a solid color, whereas
42383 # a value of 0.0 corresponds to a completely transparent color. This
42384 # uses a wrapper message rather than a simple float scalar so that it is
42385 # possible to distinguish between a default value and the value being unset.
42386 # If omitted, this color object is to be rendered as a solid color
42387 # (as if the alpha value had been explicitly given with a value of 1.0).
42388 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42389 "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 -070042390 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042391 "width": 42, # The width of the border, in pixels.
42392 # Deprecated; the width is determined by the "style" field.
42393 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042394 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042395 "left": { # A border along a cell. # The left border of the cell.
42396 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42397 # for simplicity of conversion to/from color representations in various
42398 # languages over compactness; for example, the fields of this representation
42399 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42400 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42401 # method in iOS; and, with just a little work, it can be easily formatted into
42402 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42403 #
42404 # Example (Java):
42405 #
42406 # import com.google.type.Color;
42407 #
42408 # // ...
42409 # public static java.awt.Color fromProto(Color protocolor) {
42410 # float alpha = protocolor.hasAlpha()
42411 # ? protocolor.getAlpha().getValue()
42412 # : 1.0;
42413 #
42414 # return new java.awt.Color(
42415 # protocolor.getRed(),
42416 # protocolor.getGreen(),
42417 # protocolor.getBlue(),
42418 # alpha);
42419 # }
42420 #
42421 # public static Color toProto(java.awt.Color color) {
42422 # float red = (float) color.getRed();
42423 # float green = (float) color.getGreen();
42424 # float blue = (float) color.getBlue();
42425 # float denominator = 255.0;
42426 # Color.Builder resultBuilder =
42427 # Color
42428 # .newBuilder()
42429 # .setRed(red / denominator)
42430 # .setGreen(green / denominator)
42431 # .setBlue(blue / denominator);
42432 # int alpha = color.getAlpha();
42433 # if (alpha != 255) {
42434 # result.setAlpha(
42435 # FloatValue
42436 # .newBuilder()
42437 # .setValue(((float) alpha) / denominator)
42438 # .build());
42439 # }
42440 # return resultBuilder.build();
42441 # }
42442 # // ...
42443 #
42444 # Example (iOS / Obj-C):
42445 #
42446 # // ...
42447 # static UIColor* fromProto(Color* protocolor) {
42448 # float red = [protocolor red];
42449 # float green = [protocolor green];
42450 # float blue = [protocolor blue];
42451 # FloatValue* alpha_wrapper = [protocolor alpha];
42452 # float alpha = 1.0;
42453 # if (alpha_wrapper != nil) {
42454 # alpha = [alpha_wrapper value];
42455 # }
42456 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42457 # }
42458 #
42459 # static Color* toProto(UIColor* color) {
42460 # CGFloat red, green, blue, alpha;
42461 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42462 # return nil;
42463 # }
42464 # Color* result = [Color alloc] init];
42465 # [result setRed:red];
42466 # [result setGreen:green];
42467 # [result setBlue:blue];
42468 # if (alpha <= 0.9999) {
42469 # [result setAlpha:floatWrapperWithValue(alpha)];
42470 # }
42471 # [result autorelease];
42472 # return result;
42473 # }
42474 # // ...
42475 #
42476 # Example (JavaScript):
42477 #
42478 # // ...
42479 #
42480 # var protoToCssColor = function(rgb_color) {
42481 # var redFrac = rgb_color.red || 0.0;
42482 # var greenFrac = rgb_color.green || 0.0;
42483 # var blueFrac = rgb_color.blue || 0.0;
42484 # var red = Math.floor(redFrac * 255);
42485 # var green = Math.floor(greenFrac * 255);
42486 # var blue = Math.floor(blueFrac * 255);
42487 #
42488 # if (!('alpha' in rgb_color)) {
42489 # return rgbToCssColor_(red, green, blue);
42490 # }
42491 #
42492 # var alphaFrac = rgb_color.alpha.value || 0.0;
42493 # var rgbParams = [red, green, blue].join(',');
42494 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42495 # };
42496 #
42497 # var rgbToCssColor_ = function(red, green, blue) {
42498 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42499 # var hexString = rgbNumber.toString(16);
42500 # var missingZeros = 6 - hexString.length;
42501 # var resultBuilder = ['#'];
42502 # for (var i = 0; i < missingZeros; i++) {
42503 # resultBuilder.push('0');
42504 # }
42505 # resultBuilder.push(hexString);
42506 # return resultBuilder.join('');
42507 # };
42508 #
42509 # // ...
42510 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42511 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42512 # the final pixel color is defined by the equation:
42513 #
42514 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42515 #
42516 # This means that a value of 1.0 corresponds to a solid color, whereas
42517 # a value of 0.0 corresponds to a completely transparent color. This
42518 # uses a wrapper message rather than a simple float scalar so that it is
42519 # possible to distinguish between a default value and the value being unset.
42520 # If omitted, this color object is to be rendered as a solid color
42521 # (as if the alpha value had been explicitly given with a value of 1.0).
42522 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42523 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42524 },
42525 "width": 42, # The width of the border, in pixels.
42526 # Deprecated; the width is determined by the "style" field.
42527 "style": "A String", # The style of the border.
42528 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042529 "bottom": { # A border along a cell. # The bottom border of the cell.
42530 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42531 # for simplicity of conversion to/from color representations in various
42532 # languages over compactness; for example, the fields of this representation
42533 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42534 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42535 # method in iOS; and, with just a little work, it can be easily formatted into
42536 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42537 #
42538 # Example (Java):
42539 #
42540 # import com.google.type.Color;
42541 #
42542 # // ...
42543 # public static java.awt.Color fromProto(Color protocolor) {
42544 # float alpha = protocolor.hasAlpha()
42545 # ? protocolor.getAlpha().getValue()
42546 # : 1.0;
42547 #
42548 # return new java.awt.Color(
42549 # protocolor.getRed(),
42550 # protocolor.getGreen(),
42551 # protocolor.getBlue(),
42552 # alpha);
42553 # }
42554 #
42555 # public static Color toProto(java.awt.Color color) {
42556 # float red = (float) color.getRed();
42557 # float green = (float) color.getGreen();
42558 # float blue = (float) color.getBlue();
42559 # float denominator = 255.0;
42560 # Color.Builder resultBuilder =
42561 # Color
42562 # .newBuilder()
42563 # .setRed(red / denominator)
42564 # .setGreen(green / denominator)
42565 # .setBlue(blue / denominator);
42566 # int alpha = color.getAlpha();
42567 # if (alpha != 255) {
42568 # result.setAlpha(
42569 # FloatValue
42570 # .newBuilder()
42571 # .setValue(((float) alpha) / denominator)
42572 # .build());
42573 # }
42574 # return resultBuilder.build();
42575 # }
42576 # // ...
42577 #
42578 # Example (iOS / Obj-C):
42579 #
42580 # // ...
42581 # static UIColor* fromProto(Color* protocolor) {
42582 # float red = [protocolor red];
42583 # float green = [protocolor green];
42584 # float blue = [protocolor blue];
42585 # FloatValue* alpha_wrapper = [protocolor alpha];
42586 # float alpha = 1.0;
42587 # if (alpha_wrapper != nil) {
42588 # alpha = [alpha_wrapper value];
42589 # }
42590 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42591 # }
42592 #
42593 # static Color* toProto(UIColor* color) {
42594 # CGFloat red, green, blue, alpha;
42595 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42596 # return nil;
42597 # }
42598 # Color* result = [Color alloc] init];
42599 # [result setRed:red];
42600 # [result setGreen:green];
42601 # [result setBlue:blue];
42602 # if (alpha <= 0.9999) {
42603 # [result setAlpha:floatWrapperWithValue(alpha)];
42604 # }
42605 # [result autorelease];
42606 # return result;
42607 # }
42608 # // ...
42609 #
42610 # Example (JavaScript):
42611 #
42612 # // ...
42613 #
42614 # var protoToCssColor = function(rgb_color) {
42615 # var redFrac = rgb_color.red || 0.0;
42616 # var greenFrac = rgb_color.green || 0.0;
42617 # var blueFrac = rgb_color.blue || 0.0;
42618 # var red = Math.floor(redFrac * 255);
42619 # var green = Math.floor(greenFrac * 255);
42620 # var blue = Math.floor(blueFrac * 255);
42621 #
42622 # if (!('alpha' in rgb_color)) {
42623 # return rgbToCssColor_(red, green, blue);
42624 # }
42625 #
42626 # var alphaFrac = rgb_color.alpha.value || 0.0;
42627 # var rgbParams = [red, green, blue].join(',');
42628 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42629 # };
42630 #
42631 # var rgbToCssColor_ = function(red, green, blue) {
42632 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42633 # var hexString = rgbNumber.toString(16);
42634 # var missingZeros = 6 - hexString.length;
42635 # var resultBuilder = ['#'];
42636 # for (var i = 0; i < missingZeros; i++) {
42637 # resultBuilder.push('0');
42638 # }
42639 # resultBuilder.push(hexString);
42640 # return resultBuilder.join('');
42641 # };
42642 #
42643 # // ...
42644 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42645 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42646 # the final pixel color is defined by the equation:
42647 #
42648 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42649 #
42650 # This means that a value of 1.0 corresponds to a solid color, whereas
42651 # a value of 0.0 corresponds to a completely transparent color. This
42652 # uses a wrapper message rather than a simple float scalar so that it is
42653 # possible to distinguish between a default value and the value being unset.
42654 # If omitted, this color object is to be rendered as a solid color
42655 # (as if the alpha value had been explicitly given with a value of 1.0).
42656 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42657 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42658 },
42659 "width": 42, # The width of the border, in pixels.
42660 # Deprecated; the width is determined by the "style" field.
42661 "style": "A String", # The style of the border.
42662 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042663 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042664 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042665 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070042666 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042716 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042719 "startRowIndex": 42, # The start row (inclusive) 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 },
42771 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
42772 "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 },
42901 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
42902 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040044052 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040044055 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045171 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045174 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045208 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045211 "startRowIndex": 42, # The start row (inclusive) 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 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -070045272 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045273 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
45274 # from the anchor cell.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045332 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045335 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045389 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045392 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045464 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045467 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045542 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045545 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070045558 "title": "A String", # The title of this axis. If set, this overrides any title inferred
45559 # from headers of the data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045560 "format": { # The format of a run of text in a cell. # The format of the title.
45561 # Only valid if the axis is not associated with the domain.
45562 # Absent values indicate that the field isn't specified.
45563 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
45564 # for simplicity of conversion to/from color representations in various
45565 # languages over compactness; for example, the fields of this representation
45566 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45567 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45568 # method in iOS; and, with just a little work, it can be easily formatted into
45569 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45570 #
45571 # Example (Java):
45572 #
45573 # import com.google.type.Color;
45574 #
45575 # // ...
45576 # public static java.awt.Color fromProto(Color protocolor) {
45577 # float alpha = protocolor.hasAlpha()
45578 # ? protocolor.getAlpha().getValue()
45579 # : 1.0;
45580 #
45581 # return new java.awt.Color(
45582 # protocolor.getRed(),
45583 # protocolor.getGreen(),
45584 # protocolor.getBlue(),
45585 # alpha);
45586 # }
45587 #
45588 # public static Color toProto(java.awt.Color color) {
45589 # float red = (float) color.getRed();
45590 # float green = (float) color.getGreen();
45591 # float blue = (float) color.getBlue();
45592 # float denominator = 255.0;
45593 # Color.Builder resultBuilder =
45594 # Color
45595 # .newBuilder()
45596 # .setRed(red / denominator)
45597 # .setGreen(green / denominator)
45598 # .setBlue(blue / denominator);
45599 # int alpha = color.getAlpha();
45600 # if (alpha != 255) {
45601 # result.setAlpha(
45602 # FloatValue
45603 # .newBuilder()
45604 # .setValue(((float) alpha) / denominator)
45605 # .build());
45606 # }
45607 # return resultBuilder.build();
45608 # }
45609 # // ...
45610 #
45611 # Example (iOS / Obj-C):
45612 #
45613 # // ...
45614 # static UIColor* fromProto(Color* protocolor) {
45615 # float red = [protocolor red];
45616 # float green = [protocolor green];
45617 # float blue = [protocolor blue];
45618 # FloatValue* alpha_wrapper = [protocolor alpha];
45619 # float alpha = 1.0;
45620 # if (alpha_wrapper != nil) {
45621 # alpha = [alpha_wrapper value];
45622 # }
45623 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45624 # }
45625 #
45626 # static Color* toProto(UIColor* color) {
45627 # CGFloat red, green, blue, alpha;
45628 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45629 # return nil;
45630 # }
45631 # Color* result = [Color alloc] init];
45632 # [result setRed:red];
45633 # [result setGreen:green];
45634 # [result setBlue:blue];
45635 # if (alpha <= 0.9999) {
45636 # [result setAlpha:floatWrapperWithValue(alpha)];
45637 # }
45638 # [result autorelease];
45639 # return result;
45640 # }
45641 # // ...
45642 #
45643 # Example (JavaScript):
45644 #
45645 # // ...
45646 #
45647 # var protoToCssColor = function(rgb_color) {
45648 # var redFrac = rgb_color.red || 0.0;
45649 # var greenFrac = rgb_color.green || 0.0;
45650 # var blueFrac = rgb_color.blue || 0.0;
45651 # var red = Math.floor(redFrac * 255);
45652 # var green = Math.floor(greenFrac * 255);
45653 # var blue = Math.floor(blueFrac * 255);
45654 #
45655 # if (!('alpha' in rgb_color)) {
45656 # return rgbToCssColor_(red, green, blue);
45657 # }
45658 #
45659 # var alphaFrac = rgb_color.alpha.value || 0.0;
45660 # var rgbParams = [red, green, blue].join(',');
45661 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45662 # };
45663 #
45664 # var rgbToCssColor_ = function(red, green, blue) {
45665 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45666 # var hexString = rgbNumber.toString(16);
45667 # var missingZeros = 6 - hexString.length;
45668 # var resultBuilder = ['#'];
45669 # for (var i = 0; i < missingZeros; i++) {
45670 # resultBuilder.push('0');
45671 # }
45672 # resultBuilder.push(hexString);
45673 # return resultBuilder.join('');
45674 # };
45675 #
45676 # // ...
45677 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45678 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45679 # the final pixel color is defined by the equation:
45680 #
45681 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45682 #
45683 # This means that a value of 1.0 corresponds to a solid color, whereas
45684 # a value of 0.0 corresponds to a completely transparent color. This
45685 # uses a wrapper message rather than a simple float scalar so that it is
45686 # possible to distinguish between a default value and the value being unset.
45687 # If omitted, this color object is to be rendered as a solid color
45688 # (as if the alpha value had been explicitly given with a value of 1.0).
45689 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45690 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45691 },
45692 "bold": True or False, # True if the text is bold.
45693 "strikethrough": True or False, # True if the text has a strikethrough.
45694 "fontFamily": "A String", # The font family.
45695 "fontSize": 42, # The size of the font.
45696 "italic": True or False, # True if the text is italicized.
45697 "underline": True or False, # True if the text is underlined.
45698 },
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045747 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045750 "startRowIndex": 42, # The start row (inclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045831 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045834 "startRowIndex": 42, # The start row (inclusive) 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.
45845 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
45846 # This field is only visible to users with edit access to the protected
45847 # range and the document.
45848 # Editors are not supported with warning_only protection.
45849 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
45850 # range. Domain protection is only supported on documents within a domain.
45851 "users": [ # The email addresses of users with edit access to the protected range.
45852 "A String",
45853 ],
45854 "groups": [ # The email addresses of groups with edit access to the protected range.
45855 "A String",
45856 ],
45857 },
45858 "protectedRangeId": 42, # The ID of the protected range.
45859 # This field is read-only.
45860 "warningOnly": True or False, # True if this protected range will show a warning when editing.
45861 # Warning-based protection means that every user can edit data in the
45862 # protected range, except editing will prompt a warning asking the user
45863 # to confirm the edit.
45864 #
45865 # When writing: if this field is true, then editors is ignored.
45866 # Additionally, if this field is changed from true to false and the
45867 # `editors` field is not set (nor included in the field mask), then
45868 # the editors will be set to all the editors in the document.
45869 "range": { # A range on a sheet. # The range that is being protected.
45870 # The range may be fully unbounded, in which case this is considered
45871 # a protected sheet.
45872 #
45873 # When writing, only one of range or named_range_id
45874 # may be set.
45875 # All indexes are zero-based.
45876 # Indexes are half open, e.g the start index is inclusive
45877 # and the end index is exclusive -- [start_index, end_index).
45878 # Missing indexes indicate the range is unbounded on that side.
45879 #
45880 # For example, if `"Sheet1"` is sheet ID 0, then:
45881 #
45882 # `Sheet1!A1:A1 == sheet_id: 0,
45883 # start_row_index: 0, end_row_index: 1,
45884 # start_column_index: 0, end_column_index: 1`
45885 #
45886 # `Sheet1!A3:B4 == sheet_id: 0,
45887 # start_row_index: 2, end_row_index: 4,
45888 # start_column_index: 0, end_column_index: 2`
45889 #
45890 # `Sheet1!A:B == sheet_id: 0,
45891 # start_column_index: 0, end_column_index: 2`
45892 #
45893 # `Sheet1!A5:B == sheet_id: 0,
45894 # start_row_index: 4,
45895 # start_column_index: 0, end_column_index: 2`
45896 #
45897 # `Sheet1 == sheet_id:0`
45898 #
45899 # The start index must always be less than or equal to the end index.
45900 # If the start index equals the end index, then the range is empty.
45901 # Empty ranges are typically not meaningful and are usually rendered in the
45902 # UI as `#REF!`.
45903 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045904 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045905 "sheetId": 42, # The sheet this range is on.
45906 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045907 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045908 },
45909 },
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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -070045920 "startRow": 42, # The first row this GridData refers to, zero-based.
45921 "startColumn": 42, # The first column this GridData refers to, zero-based.
45922 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
45923 # in start_column.
45924 { # Properties about a dimension.
45925 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45926 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45927 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45928 # This field is read-only.
45929 },
45930 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045931 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
45932 # in start_row.
45933 { # Properties about a dimension.
45934 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45935 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45936 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45937 # This field is read-only.
45938 },
45939 ],
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046051 "endColumnIndex": 42, # The end column (exclusive) 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046054 "startRowIndex": 42, # The start row (inclusive) 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.
46060 "summarizeFunction": "A String", # A function to summarize the value.
46061 # If formula is set, the only supported values are
46062 # SUM and
46063 # CUSTOM.
46064 # If sourceColumnOffset is set, then `CUSTOM`
46065 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046066 "name": "A String", # A name to use for the value. This is only used if formula was set.
46067 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046068 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
46069 #
46070 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46071 # means this value refers to column `C`, whereas the offset `1` would
46072 # refer to column `D`.
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 },
46224 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
46225 "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 },
46354 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
46355 "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 },
47073 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
47074 "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 },
47203 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
47204 "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.
48114 "rowCount": 42, # The number of rows in the grid.
48115 "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.
48117 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
48118 },
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>