blob: b38c17f578eccc0c940d7a67e53694b17b036584 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sheets_v4.html">Google Sheets API</a> . <a href="sheets_v4.spreadsheets.html">spreadsheets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="sheets_v4.spreadsheets.sheets.html">sheets()</a></code>
79</p>
80<p class="firstline">Returns the sheets Resource.</p>
81
82<p class="toc_element">
83 <code><a href="sheets_v4.spreadsheets.values.html">values()</a></code>
84</p>
85<p class="firstline">Returns the values Resource.</p>
86
87<p class="toc_element">
88 <code><a href="#batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</a></code></p>
89<p class="firstline">Applies one or more updates to the spreadsheet.</p>
90<p class="toc_element">
91 <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
92<p class="firstline">Creates a spreadsheet, returning the newly created spreadsheet.</p>
93<p class="toc_element">
94 <code><a href="#get">get(spreadsheetId, ranges=None, x__xgafv=None, includeGridData=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095<p class="firstline">Returns the spreadsheet at the given ID.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070096<h3>Method Details</h3>
97<div class="method">
98 <code class="details" id="batchUpdate">batchUpdate(spreadsheetId, body, x__xgafv=None)</code>
99 <pre>Applies one or more updates to the spreadsheet.
100
101Each request is validated before
102being applied. If any request is not valid then the entire request will
103fail and nothing will be applied.
104
105Some requests have replies to
106give you some information about how
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700107they are applied. The replies will mirror the requests. For example,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700108if you applied 4 updates and the 3rd one had a reply, then the
109response will have 2 empty replies, the actual reply, and another empty
110reply, in that order.
111
112Due to the collaborative nature of spreadsheets, it is not guaranteed that
113the spreadsheet will reflect exactly your changes after this completes,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700114however it is guaranteed that the updates in the request will be
115applied together atomically. Your changes may be altered with respect to
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700116collaborator changes. If there are no collaborators, the spreadsheet
117should reflect your changes.
118
119Args:
120 spreadsheetId: string, The spreadsheet to apply the updates to. (required)
121 body: object, The request body. (required)
122 The object takes the form of:
123
124{ # The request for updating any aspect of a spreadsheet.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800125 "responseRanges": [ # Limits the ranges included in the response spreadsheet.
126 # Meaningful only if include_spreadsheet_response is 'true'.
127 "A String",
128 ],
129 "includeSpreadsheetInResponse": True or False, # Determines if the update response should include the spreadsheet
130 # resource.
131 "responseIncludeGridData": True or False, # True if grid data should be returned. Meaningful only if
132 # if include_spreadsheet_response is 'true'.
133 # This parameter is ignored if a field mask was set in the request.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134 "requests": [ # A list of updates to apply to the spreadsheet.
135 { # A single kind of update to apply to a spreadsheet.
136 "duplicateFilterView": { # Duplicates a particular filter view. # Duplicates a filter view.
137 "filterId": 42, # The ID of the filter being duplicated.
138 },
139 "sortRange": { # Sorts data in rows based on a sort order per column. # Sorts data in a range.
140 "range": { # A range on a sheet. # The range to sort.
141 # All indexes are zero-based.
142 # Indexes are half open, e.g the start index is inclusive
143 # and the end index is exclusive -- [start_index, end_index).
144 # Missing indexes indicate the range is unbounded on that side.
145 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700146 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700148 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700149 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700150 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700151 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700152 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700153 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700155 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700156 # `Sheet1!A:B == sheet_id: 0,
157 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700158 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700159 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700160 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700161 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700162 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700163 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700164 #
165 # The start index must always be less than or equal to the end index.
166 # If the start index equals the end index, then the range is empty.
167 # Empty ranges are typically not meaningful and are usually rendered in the
168 # UI as `#REF!`.
169 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400170 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700171 "sheetId": 42, # The sheet this range is on.
172 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400173 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700174 },
175 "sortSpecs": [ # The sort order per column. Later specifications are used when values
176 # are equal in the earlier specifications.
177 { # A sort order associated with a specific column or row.
178 "sortOrder": "A String", # The order data should be sorted.
179 "dimensionIndex": 42, # The dimension the sort should be applied to.
180 },
181 ],
182 },
183 "updateEmbeddedObjectPosition": { # Update an embedded object's position (such as a moving or resizing a # Updates an embedded object's (e.g. chart, image) position.
184 # chart or image).
185 "newPosition": { # The position of an embedded object such as a chart. # An explicit position to move the embedded object to.
186 # If newPosition.sheetId is set,
187 # a new sheet with that ID will be created.
188 # If newPosition.newSheet is set to true,
189 # a new sheet will be created with an ID that will be chosen for you.
190 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
191 # is chosen for you. Used only when writing.
192 "sheetId": 42, # The sheet this is on. Set only if the embedded object
193 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700194 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700195 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
196 # All indexes are zero-based.
197 "rowIndex": 42, # The row index of the coordinate.
198 "columnIndex": 42, # The column index of the coordinate.
199 "sheetId": 42, # The sheet this coordinate is on.
200 },
201 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
202 # from the anchor cell.
203 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
204 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
205 # from the anchor cell.
206 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
207 },
208 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700209 "fields": "A String", # The fields of OverlayPosition
210 # that should be updated when setting a new position. Used only if
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700211 # newPosition.overlayPosition
212 # is set, in which case at least one field must
213 # be specified. The root `newPosition.overlayPosition` is implied and
214 # should not be specified.
215 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700216 "objectId": 42, # The ID of the object to moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700217 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400218 "addFilterView": { # Adds a filter view. # Adds a filter view.
219 "filter": { # A filter view. # The filter to add. The filterViewId
220 # field is optional; if one is not set, an id will be randomly generated. (It
221 # is an error to specify the ID of a filter that already exists.)
222 "title": "A String", # The name of the filter view.
223 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
224 #
225 # When writing, only one of range or named_range_id
226 # may be set.
227 "filterViewId": 42, # The ID of the filter view.
228 "range": { # A range on a sheet. # The range this filter view covers.
229 #
230 # When writing, only one of range or named_range_id
231 # may be set.
232 # All indexes are zero-based.
233 # Indexes are half open, e.g the start index is inclusive
234 # and the end index is exclusive -- [start_index, end_index).
235 # Missing indexes indicate the range is unbounded on that side.
236 #
237 # For example, if `"Sheet1"` is sheet ID 0, then:
238 #
239 # `Sheet1!A1:A1 == sheet_id: 0,
240 # start_row_index: 0, end_row_index: 1,
241 # start_column_index: 0, end_column_index: 1`
242 #
243 # `Sheet1!A3:B4 == sheet_id: 0,
244 # start_row_index: 2, end_row_index: 4,
245 # start_column_index: 0, end_column_index: 2`
246 #
247 # `Sheet1!A:B == sheet_id: 0,
248 # start_column_index: 0, end_column_index: 2`
249 #
250 # `Sheet1!A5:B == sheet_id: 0,
251 # start_row_index: 4,
252 # start_column_index: 0, end_column_index: 2`
253 #
254 # `Sheet1 == sheet_id:0`
255 #
256 # The start index must always be less than or equal to the end index.
257 # If the start index equals the end index, then the range is empty.
258 # Empty ranges are typically not meaningful and are usually rendered in the
259 # UI as `#REF!`.
260 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
261 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
262 "sheetId": 42, # The sheet this range is on.
263 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
264 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
265 },
266 "sortSpecs": [ # The sort order per column. Later specifications are used when values
267 # are equal in the earlier specifications.
268 { # A sort order associated with a specific column or row.
269 "sortOrder": "A String", # The order data should be sorted.
270 "dimensionIndex": 42, # The dimension the sort should be applied to.
271 },
272 ],
273 "criteria": { # The criteria for showing/hiding values per column.
274 # The map's key is the column index, and the value is the criteria for
275 # that column.
276 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
277 "hiddenValues": [ # Values that should be hidden.
278 "A String",
279 ],
280 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
281 # (This does not override hiddenValues -- if a value is listed there,
282 # it will still be hidden.)
283 # BooleanConditions are used by conditional formatting,
284 # data validation, and the criteria in filters.
285 "values": [ # The values of the condition. The number of supported values depends
286 # on the condition type. Some support zero values,
287 # others one or two values,
288 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
289 { # The value of the condition.
290 "relativeDate": "A String", # A relative date (based on the current date).
291 # Valid only if the type is
292 # DATE_BEFORE,
293 # DATE_AFTER,
294 # DATE_ON_OR_BEFORE or
295 # DATE_ON_OR_AFTER.
296 #
297 # Relative dates are not supported in data validation.
298 # They are supported only in conditional formatting and
299 # conditional filters.
300 "userEnteredValue": "A String", # A value the condition is based on.
301 # The value will be parsed as if the user typed into a cell.
302 # Formulas are supported (and must begin with an `=`).
303 },
304 ],
305 "type": "A String", # The type of condition.
306 },
307 },
308 },
309 },
310 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700311 "updateConditionalFormatRule": { # Updates a conditional format rule at the given index, # Updates an existing conditional format rule.
312 # or moves a conditional format rule to another index.
313 "index": 42, # The zero-based index of the rule that should be replaced or moved.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700314 "rule": { # A rule describing a conditional format. # The rule that should replace the rule at the given index.
315 "ranges": [ # The ranges that will be formatted if the condition is true.
316 # All the ranges must be on the same grid.
317 { # A range on a sheet.
318 # All indexes are zero-based.
319 # Indexes are half open, e.g the start index is inclusive
320 # and the end index is exclusive -- [start_index, end_index).
321 # Missing indexes indicate the range is unbounded on that side.
322 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700323 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700324 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700325 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700326 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700327 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700328 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700329 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700330 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700331 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700332 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700333 # `Sheet1!A:B == sheet_id: 0,
334 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700335 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700336 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700337 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700338 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700340 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700341 #
342 # The start index must always be less than or equal to the end index.
343 # If the start index equals the end index, then the range is empty.
344 # Empty ranges are typically not meaningful and are usually rendered in the
345 # UI as `#REF!`.
346 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400347 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700348 "sheetId": 42, # The sheet this range is on.
349 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400350 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700351 },
352 ],
353 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
354 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
355 # the format will be applied.
356 # BooleanConditions are used by conditional formatting,
357 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700358 "values": [ # The values of the condition. The number of supported values depends
359 # on the condition type. Some support zero values,
360 # others one or two values,
361 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
362 { # The value of the condition.
363 "relativeDate": "A String", # A relative date (based on the current date).
364 # Valid only if the type is
365 # DATE_BEFORE,
366 # DATE_AFTER,
367 # DATE_ON_OR_BEFORE or
368 # DATE_ON_OR_AFTER.
369 #
370 # Relative dates are not supported in data validation.
371 # They are supported only in conditional formatting and
372 # conditional filters.
373 "userEnteredValue": "A String", # A value the condition is based on.
374 # The value will be parsed as if the user typed into a cell.
375 # Formulas are supported (and must begin with an `=`).
376 },
377 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400378 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700379 },
380 "format": { # The format of a cell. # The format to apply.
381 # Conditional formatting can only apply a subset of formatting:
382 # bold, italic,
383 # strikethrough,
384 # foreground color &
385 # background color.
386 "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 -0700387 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
388 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400389 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700390 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700391 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700392 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700393 },
394 "textDirection": "A String", # The direction of the text in the cell.
395 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
396 # When updating padding, every field must be specified.
397 "top": 42, # The top padding of the cell.
398 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700399 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400400 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700401 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700402 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700403 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
404 # for simplicity of conversion to/from color representations in various
405 # languages over compactness; for example, the fields of this representation
406 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
407 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
408 # method in iOS; and, with just a little work, it can be easily formatted into
409 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
410 #
411 # Example (Java):
412 #
413 # import com.google.type.Color;
414 #
415 # // ...
416 # public static java.awt.Color fromProto(Color protocolor) {
417 # float alpha = protocolor.hasAlpha()
418 # ? protocolor.getAlpha().getValue()
419 # : 1.0;
420 #
421 # return new java.awt.Color(
422 # protocolor.getRed(),
423 # protocolor.getGreen(),
424 # protocolor.getBlue(),
425 # alpha);
426 # }
427 #
428 # public static Color toProto(java.awt.Color color) {
429 # float red = (float) color.getRed();
430 # float green = (float) color.getGreen();
431 # float blue = (float) color.getBlue();
432 # float denominator = 255.0;
433 # Color.Builder resultBuilder =
434 # Color
435 # .newBuilder()
436 # .setRed(red / denominator)
437 # .setGreen(green / denominator)
438 # .setBlue(blue / denominator);
439 # int alpha = color.getAlpha();
440 # if (alpha != 255) {
441 # result.setAlpha(
442 # FloatValue
443 # .newBuilder()
444 # .setValue(((float) alpha) / denominator)
445 # .build());
446 # }
447 # return resultBuilder.build();
448 # }
449 # // ...
450 #
451 # Example (iOS / Obj-C):
452 #
453 # // ...
454 # static UIColor* fromProto(Color* protocolor) {
455 # float red = [protocolor red];
456 # float green = [protocolor green];
457 # float blue = [protocolor blue];
458 # FloatValue* alpha_wrapper = [protocolor alpha];
459 # float alpha = 1.0;
460 # if (alpha_wrapper != nil) {
461 # alpha = [alpha_wrapper value];
462 # }
463 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
464 # }
465 #
466 # static Color* toProto(UIColor* color) {
467 # CGFloat red, green, blue, alpha;
468 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
469 # return nil;
470 # }
471 # Color* result = [Color alloc] init];
472 # [result setRed:red];
473 # [result setGreen:green];
474 # [result setBlue:blue];
475 # if (alpha <= 0.9999) {
476 # [result setAlpha:floatWrapperWithValue(alpha)];
477 # }
478 # [result autorelease];
479 # return result;
480 # }
481 # // ...
482 #
483 # Example (JavaScript):
484 #
485 # // ...
486 #
487 # var protoToCssColor = function(rgb_color) {
488 # var redFrac = rgb_color.red || 0.0;
489 # var greenFrac = rgb_color.green || 0.0;
490 # var blueFrac = rgb_color.blue || 0.0;
491 # var red = Math.floor(redFrac * 255);
492 # var green = Math.floor(greenFrac * 255);
493 # var blue = Math.floor(blueFrac * 255);
494 #
495 # if (!('alpha' in rgb_color)) {
496 # return rgbToCssColor_(red, green, blue);
497 # }
498 #
499 # var alphaFrac = rgb_color.alpha.value || 0.0;
500 # var rgbParams = [red, green, blue].join(',');
501 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
502 # };
503 #
504 # var rgbToCssColor_ = function(red, green, blue) {
505 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
506 # var hexString = rgbNumber.toString(16);
507 # var missingZeros = 6 - hexString.length;
508 # var resultBuilder = ['#'];
509 # for (var i = 0; i < missingZeros; i++) {
510 # resultBuilder.push('0');
511 # }
512 # resultBuilder.push(hexString);
513 # return resultBuilder.join('');
514 # };
515 #
516 # // ...
517 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
518 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
519 # the final pixel color is defined by the equation:
520 #
521 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
522 #
523 # This means that a value of 1.0 corresponds to a solid color, whereas
524 # a value of 0.0 corresponds to a completely transparent color. This
525 # uses a wrapper message rather than a simple float scalar so that it is
526 # possible to distinguish between a default value and the value being unset.
527 # If omitted, this color object is to be rendered as a solid color
528 # (as if the alpha value had been explicitly given with a value of 1.0).
529 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
530 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
531 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700532 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700533 "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).
534 # Absent values indicate that the field isn't specified.
535 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
536 # for simplicity of conversion to/from color representations in various
537 # languages over compactness; for example, the fields of this representation
538 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
539 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
540 # method in iOS; and, with just a little work, it can be easily formatted into
541 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
542 #
543 # Example (Java):
544 #
545 # import com.google.type.Color;
546 #
547 # // ...
548 # public static java.awt.Color fromProto(Color protocolor) {
549 # float alpha = protocolor.hasAlpha()
550 # ? protocolor.getAlpha().getValue()
551 # : 1.0;
552 #
553 # return new java.awt.Color(
554 # protocolor.getRed(),
555 # protocolor.getGreen(),
556 # protocolor.getBlue(),
557 # alpha);
558 # }
559 #
560 # public static Color toProto(java.awt.Color color) {
561 # float red = (float) color.getRed();
562 # float green = (float) color.getGreen();
563 # float blue = (float) color.getBlue();
564 # float denominator = 255.0;
565 # Color.Builder resultBuilder =
566 # Color
567 # .newBuilder()
568 # .setRed(red / denominator)
569 # .setGreen(green / denominator)
570 # .setBlue(blue / denominator);
571 # int alpha = color.getAlpha();
572 # if (alpha != 255) {
573 # result.setAlpha(
574 # FloatValue
575 # .newBuilder()
576 # .setValue(((float) alpha) / denominator)
577 # .build());
578 # }
579 # return resultBuilder.build();
580 # }
581 # // ...
582 #
583 # Example (iOS / Obj-C):
584 #
585 # // ...
586 # static UIColor* fromProto(Color* protocolor) {
587 # float red = [protocolor red];
588 # float green = [protocolor green];
589 # float blue = [protocolor blue];
590 # FloatValue* alpha_wrapper = [protocolor alpha];
591 # float alpha = 1.0;
592 # if (alpha_wrapper != nil) {
593 # alpha = [alpha_wrapper value];
594 # }
595 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
596 # }
597 #
598 # static Color* toProto(UIColor* color) {
599 # CGFloat red, green, blue, alpha;
600 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
601 # return nil;
602 # }
603 # Color* result = [Color alloc] init];
604 # [result setRed:red];
605 # [result setGreen:green];
606 # [result setBlue:blue];
607 # if (alpha <= 0.9999) {
608 # [result setAlpha:floatWrapperWithValue(alpha)];
609 # }
610 # [result autorelease];
611 # return result;
612 # }
613 # // ...
614 #
615 # Example (JavaScript):
616 #
617 # // ...
618 #
619 # var protoToCssColor = function(rgb_color) {
620 # var redFrac = rgb_color.red || 0.0;
621 # var greenFrac = rgb_color.green || 0.0;
622 # var blueFrac = rgb_color.blue || 0.0;
623 # var red = Math.floor(redFrac * 255);
624 # var green = Math.floor(greenFrac * 255);
625 # var blue = Math.floor(blueFrac * 255);
626 #
627 # if (!('alpha' in rgb_color)) {
628 # return rgbToCssColor_(red, green, blue);
629 # }
630 #
631 # var alphaFrac = rgb_color.alpha.value || 0.0;
632 # var rgbParams = [red, green, blue].join(',');
633 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
634 # };
635 #
636 # var rgbToCssColor_ = function(red, green, blue) {
637 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
638 # var hexString = rgbNumber.toString(16);
639 # var missingZeros = 6 - hexString.length;
640 # var resultBuilder = ['#'];
641 # for (var i = 0; i < missingZeros; i++) {
642 # resultBuilder.push('0');
643 # }
644 # resultBuilder.push(hexString);
645 # return resultBuilder.join('');
646 # };
647 #
648 # // ...
649 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
650 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
651 # the final pixel color is defined by the equation:
652 #
653 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
654 #
655 # This means that a value of 1.0 corresponds to a solid color, whereas
656 # a value of 0.0 corresponds to a completely transparent color. This
657 # uses a wrapper message rather than a simple float scalar so that it is
658 # possible to distinguish between a default value and the value being unset.
659 # If omitted, this color object is to be rendered as a solid color
660 # (as if the alpha value had been explicitly given with a value of 1.0).
661 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
662 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
663 },
664 "bold": True or False, # True if the text is bold.
665 "strikethrough": True or False, # True if the text has a strikethrough.
666 "fontFamily": "A String", # The font family.
667 "fontSize": 42, # The size of the font.
668 "italic": True or False, # True if the text is italicized.
669 "underline": True or False, # True if the text is underlined.
670 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400671 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700672 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
673 "borders": { # The borders of the cell. # The borders of the cell.
674 "top": { # A border along a cell. # The top border of the cell.
675 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
676 # for simplicity of conversion to/from color representations in various
677 # languages over compactness; for example, the fields of this representation
678 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
679 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
680 # method in iOS; and, with just a little work, it can be easily formatted into
681 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
682 #
683 # Example (Java):
684 #
685 # import com.google.type.Color;
686 #
687 # // ...
688 # public static java.awt.Color fromProto(Color protocolor) {
689 # float alpha = protocolor.hasAlpha()
690 # ? protocolor.getAlpha().getValue()
691 # : 1.0;
692 #
693 # return new java.awt.Color(
694 # protocolor.getRed(),
695 # protocolor.getGreen(),
696 # protocolor.getBlue(),
697 # alpha);
698 # }
699 #
700 # public static Color toProto(java.awt.Color color) {
701 # float red = (float) color.getRed();
702 # float green = (float) color.getGreen();
703 # float blue = (float) color.getBlue();
704 # float denominator = 255.0;
705 # Color.Builder resultBuilder =
706 # Color
707 # .newBuilder()
708 # .setRed(red / denominator)
709 # .setGreen(green / denominator)
710 # .setBlue(blue / denominator);
711 # int alpha = color.getAlpha();
712 # if (alpha != 255) {
713 # result.setAlpha(
714 # FloatValue
715 # .newBuilder()
716 # .setValue(((float) alpha) / denominator)
717 # .build());
718 # }
719 # return resultBuilder.build();
720 # }
721 # // ...
722 #
723 # Example (iOS / Obj-C):
724 #
725 # // ...
726 # static UIColor* fromProto(Color* protocolor) {
727 # float red = [protocolor red];
728 # float green = [protocolor green];
729 # float blue = [protocolor blue];
730 # FloatValue* alpha_wrapper = [protocolor alpha];
731 # float alpha = 1.0;
732 # if (alpha_wrapper != nil) {
733 # alpha = [alpha_wrapper value];
734 # }
735 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
736 # }
737 #
738 # static Color* toProto(UIColor* color) {
739 # CGFloat red, green, blue, alpha;
740 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
741 # return nil;
742 # }
743 # Color* result = [Color alloc] init];
744 # [result setRed:red];
745 # [result setGreen:green];
746 # [result setBlue:blue];
747 # if (alpha <= 0.9999) {
748 # [result setAlpha:floatWrapperWithValue(alpha)];
749 # }
750 # [result autorelease];
751 # return result;
752 # }
753 # // ...
754 #
755 # Example (JavaScript):
756 #
757 # // ...
758 #
759 # var protoToCssColor = function(rgb_color) {
760 # var redFrac = rgb_color.red || 0.0;
761 # var greenFrac = rgb_color.green || 0.0;
762 # var blueFrac = rgb_color.blue || 0.0;
763 # var red = Math.floor(redFrac * 255);
764 # var green = Math.floor(greenFrac * 255);
765 # var blue = Math.floor(blueFrac * 255);
766 #
767 # if (!('alpha' in rgb_color)) {
768 # return rgbToCssColor_(red, green, blue);
769 # }
770 #
771 # var alphaFrac = rgb_color.alpha.value || 0.0;
772 # var rgbParams = [red, green, blue].join(',');
773 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
774 # };
775 #
776 # var rgbToCssColor_ = function(red, green, blue) {
777 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
778 # var hexString = rgbNumber.toString(16);
779 # var missingZeros = 6 - hexString.length;
780 # var resultBuilder = ['#'];
781 # for (var i = 0; i < missingZeros; i++) {
782 # resultBuilder.push('0');
783 # }
784 # resultBuilder.push(hexString);
785 # return resultBuilder.join('');
786 # };
787 #
788 # // ...
789 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
790 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
791 # the final pixel color is defined by the equation:
792 #
793 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
794 #
795 # This means that a value of 1.0 corresponds to a solid color, whereas
796 # a value of 0.0 corresponds to a completely transparent color. This
797 # uses a wrapper message rather than a simple float scalar so that it is
798 # possible to distinguish between a default value and the value being unset.
799 # If omitted, this color object is to be rendered as a solid color
800 # (as if the alpha value had been explicitly given with a value of 1.0).
801 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
802 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
803 },
804 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700805 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700806 "style": "A String", # The style of the border.
807 },
808 "right": { # A border along a cell. # The right border of the cell.
809 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
810 # for simplicity of conversion to/from color representations in various
811 # languages over compactness; for example, the fields of this representation
812 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
813 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
814 # method in iOS; and, with just a little work, it can be easily formatted into
815 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
816 #
817 # Example (Java):
818 #
819 # import com.google.type.Color;
820 #
821 # // ...
822 # public static java.awt.Color fromProto(Color protocolor) {
823 # float alpha = protocolor.hasAlpha()
824 # ? protocolor.getAlpha().getValue()
825 # : 1.0;
826 #
827 # return new java.awt.Color(
828 # protocolor.getRed(),
829 # protocolor.getGreen(),
830 # protocolor.getBlue(),
831 # alpha);
832 # }
833 #
834 # public static Color toProto(java.awt.Color color) {
835 # float red = (float) color.getRed();
836 # float green = (float) color.getGreen();
837 # float blue = (float) color.getBlue();
838 # float denominator = 255.0;
839 # Color.Builder resultBuilder =
840 # Color
841 # .newBuilder()
842 # .setRed(red / denominator)
843 # .setGreen(green / denominator)
844 # .setBlue(blue / denominator);
845 # int alpha = color.getAlpha();
846 # if (alpha != 255) {
847 # result.setAlpha(
848 # FloatValue
849 # .newBuilder()
850 # .setValue(((float) alpha) / denominator)
851 # .build());
852 # }
853 # return resultBuilder.build();
854 # }
855 # // ...
856 #
857 # Example (iOS / Obj-C):
858 #
859 # // ...
860 # static UIColor* fromProto(Color* protocolor) {
861 # float red = [protocolor red];
862 # float green = [protocolor green];
863 # float blue = [protocolor blue];
864 # FloatValue* alpha_wrapper = [protocolor alpha];
865 # float alpha = 1.0;
866 # if (alpha_wrapper != nil) {
867 # alpha = [alpha_wrapper value];
868 # }
869 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
870 # }
871 #
872 # static Color* toProto(UIColor* color) {
873 # CGFloat red, green, blue, alpha;
874 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
875 # return nil;
876 # }
877 # Color* result = [Color alloc] init];
878 # [result setRed:red];
879 # [result setGreen:green];
880 # [result setBlue:blue];
881 # if (alpha <= 0.9999) {
882 # [result setAlpha:floatWrapperWithValue(alpha)];
883 # }
884 # [result autorelease];
885 # return result;
886 # }
887 # // ...
888 #
889 # Example (JavaScript):
890 #
891 # // ...
892 #
893 # var protoToCssColor = function(rgb_color) {
894 # var redFrac = rgb_color.red || 0.0;
895 # var greenFrac = rgb_color.green || 0.0;
896 # var blueFrac = rgb_color.blue || 0.0;
897 # var red = Math.floor(redFrac * 255);
898 # var green = Math.floor(greenFrac * 255);
899 # var blue = Math.floor(blueFrac * 255);
900 #
901 # if (!('alpha' in rgb_color)) {
902 # return rgbToCssColor_(red, green, blue);
903 # }
904 #
905 # var alphaFrac = rgb_color.alpha.value || 0.0;
906 # var rgbParams = [red, green, blue].join(',');
907 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
908 # };
909 #
910 # var rgbToCssColor_ = function(red, green, blue) {
911 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
912 # var hexString = rgbNumber.toString(16);
913 # var missingZeros = 6 - hexString.length;
914 # var resultBuilder = ['#'];
915 # for (var i = 0; i < missingZeros; i++) {
916 # resultBuilder.push('0');
917 # }
918 # resultBuilder.push(hexString);
919 # return resultBuilder.join('');
920 # };
921 #
922 # // ...
923 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
924 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
925 # the final pixel color is defined by the equation:
926 #
927 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
928 #
929 # This means that a value of 1.0 corresponds to a solid color, whereas
930 # a value of 0.0 corresponds to a completely transparent color. This
931 # uses a wrapper message rather than a simple float scalar so that it is
932 # possible to distinguish between a default value and the value being unset.
933 # If omitted, this color object is to be rendered as a solid color
934 # (as if the alpha value had been explicitly given with a value of 1.0).
935 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
936 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
937 },
938 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700939 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700940 "style": "A String", # The style of the border.
941 },
942 "bottom": { # A border along a cell. # The bottom border of the cell.
943 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
944 # for simplicity of conversion to/from color representations in various
945 # languages over compactness; for example, the fields of this representation
946 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
947 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
948 # method in iOS; and, with just a little work, it can be easily formatted into
949 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
950 #
951 # Example (Java):
952 #
953 # import com.google.type.Color;
954 #
955 # // ...
956 # public static java.awt.Color fromProto(Color protocolor) {
957 # float alpha = protocolor.hasAlpha()
958 # ? protocolor.getAlpha().getValue()
959 # : 1.0;
960 #
961 # return new java.awt.Color(
962 # protocolor.getRed(),
963 # protocolor.getGreen(),
964 # protocolor.getBlue(),
965 # alpha);
966 # }
967 #
968 # public static Color toProto(java.awt.Color color) {
969 # float red = (float) color.getRed();
970 # float green = (float) color.getGreen();
971 # float blue = (float) color.getBlue();
972 # float denominator = 255.0;
973 # Color.Builder resultBuilder =
974 # Color
975 # .newBuilder()
976 # .setRed(red / denominator)
977 # .setGreen(green / denominator)
978 # .setBlue(blue / denominator);
979 # int alpha = color.getAlpha();
980 # if (alpha != 255) {
981 # result.setAlpha(
982 # FloatValue
983 # .newBuilder()
984 # .setValue(((float) alpha) / denominator)
985 # .build());
986 # }
987 # return resultBuilder.build();
988 # }
989 # // ...
990 #
991 # Example (iOS / Obj-C):
992 #
993 # // ...
994 # static UIColor* fromProto(Color* protocolor) {
995 # float red = [protocolor red];
996 # float green = [protocolor green];
997 # float blue = [protocolor blue];
998 # FloatValue* alpha_wrapper = [protocolor alpha];
999 # float alpha = 1.0;
1000 # if (alpha_wrapper != nil) {
1001 # alpha = [alpha_wrapper value];
1002 # }
1003 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1004 # }
1005 #
1006 # static Color* toProto(UIColor* color) {
1007 # CGFloat red, green, blue, alpha;
1008 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1009 # return nil;
1010 # }
1011 # Color* result = [Color alloc] init];
1012 # [result setRed:red];
1013 # [result setGreen:green];
1014 # [result setBlue:blue];
1015 # if (alpha <= 0.9999) {
1016 # [result setAlpha:floatWrapperWithValue(alpha)];
1017 # }
1018 # [result autorelease];
1019 # return result;
1020 # }
1021 # // ...
1022 #
1023 # Example (JavaScript):
1024 #
1025 # // ...
1026 #
1027 # var protoToCssColor = function(rgb_color) {
1028 # var redFrac = rgb_color.red || 0.0;
1029 # var greenFrac = rgb_color.green || 0.0;
1030 # var blueFrac = rgb_color.blue || 0.0;
1031 # var red = Math.floor(redFrac * 255);
1032 # var green = Math.floor(greenFrac * 255);
1033 # var blue = Math.floor(blueFrac * 255);
1034 #
1035 # if (!('alpha' in rgb_color)) {
1036 # return rgbToCssColor_(red, green, blue);
1037 # }
1038 #
1039 # var alphaFrac = rgb_color.alpha.value || 0.0;
1040 # var rgbParams = [red, green, blue].join(',');
1041 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1042 # };
1043 #
1044 # var rgbToCssColor_ = function(red, green, blue) {
1045 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1046 # var hexString = rgbNumber.toString(16);
1047 # var missingZeros = 6 - hexString.length;
1048 # var resultBuilder = ['#'];
1049 # for (var i = 0; i < missingZeros; i++) {
1050 # resultBuilder.push('0');
1051 # }
1052 # resultBuilder.push(hexString);
1053 # return resultBuilder.join('');
1054 # };
1055 #
1056 # // ...
1057 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1058 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1059 # the final pixel color is defined by the equation:
1060 #
1061 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1062 #
1063 # This means that a value of 1.0 corresponds to a solid color, whereas
1064 # a value of 0.0 corresponds to a completely transparent color. This
1065 # uses a wrapper message rather than a simple float scalar so that it is
1066 # possible to distinguish between a default value and the value being unset.
1067 # If omitted, this color object is to be rendered as a solid color
1068 # (as if the alpha value had been explicitly given with a value of 1.0).
1069 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1070 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1071 },
1072 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001073 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001074 "style": "A String", # The style of the border.
1075 },
1076 "left": { # A border along a cell. # The left border of the cell.
1077 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
1078 # for simplicity of conversion to/from color representations in various
1079 # languages over compactness; for example, the fields of this representation
1080 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1081 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1082 # method in iOS; and, with just a little work, it can be easily formatted into
1083 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1084 #
1085 # Example (Java):
1086 #
1087 # import com.google.type.Color;
1088 #
1089 # // ...
1090 # public static java.awt.Color fromProto(Color protocolor) {
1091 # float alpha = protocolor.hasAlpha()
1092 # ? protocolor.getAlpha().getValue()
1093 # : 1.0;
1094 #
1095 # return new java.awt.Color(
1096 # protocolor.getRed(),
1097 # protocolor.getGreen(),
1098 # protocolor.getBlue(),
1099 # alpha);
1100 # }
1101 #
1102 # public static Color toProto(java.awt.Color color) {
1103 # float red = (float) color.getRed();
1104 # float green = (float) color.getGreen();
1105 # float blue = (float) color.getBlue();
1106 # float denominator = 255.0;
1107 # Color.Builder resultBuilder =
1108 # Color
1109 # .newBuilder()
1110 # .setRed(red / denominator)
1111 # .setGreen(green / denominator)
1112 # .setBlue(blue / denominator);
1113 # int alpha = color.getAlpha();
1114 # if (alpha != 255) {
1115 # result.setAlpha(
1116 # FloatValue
1117 # .newBuilder()
1118 # .setValue(((float) alpha) / denominator)
1119 # .build());
1120 # }
1121 # return resultBuilder.build();
1122 # }
1123 # // ...
1124 #
1125 # Example (iOS / Obj-C):
1126 #
1127 # // ...
1128 # static UIColor* fromProto(Color* protocolor) {
1129 # float red = [protocolor red];
1130 # float green = [protocolor green];
1131 # float blue = [protocolor blue];
1132 # FloatValue* alpha_wrapper = [protocolor alpha];
1133 # float alpha = 1.0;
1134 # if (alpha_wrapper != nil) {
1135 # alpha = [alpha_wrapper value];
1136 # }
1137 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1138 # }
1139 #
1140 # static Color* toProto(UIColor* color) {
1141 # CGFloat red, green, blue, alpha;
1142 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1143 # return nil;
1144 # }
1145 # Color* result = [Color alloc] init];
1146 # [result setRed:red];
1147 # [result setGreen:green];
1148 # [result setBlue:blue];
1149 # if (alpha <= 0.9999) {
1150 # [result setAlpha:floatWrapperWithValue(alpha)];
1151 # }
1152 # [result autorelease];
1153 # return result;
1154 # }
1155 # // ...
1156 #
1157 # Example (JavaScript):
1158 #
1159 # // ...
1160 #
1161 # var protoToCssColor = function(rgb_color) {
1162 # var redFrac = rgb_color.red || 0.0;
1163 # var greenFrac = rgb_color.green || 0.0;
1164 # var blueFrac = rgb_color.blue || 0.0;
1165 # var red = Math.floor(redFrac * 255);
1166 # var green = Math.floor(greenFrac * 255);
1167 # var blue = Math.floor(blueFrac * 255);
1168 #
1169 # if (!('alpha' in rgb_color)) {
1170 # return rgbToCssColor_(red, green, blue);
1171 # }
1172 #
1173 # var alphaFrac = rgb_color.alpha.value || 0.0;
1174 # var rgbParams = [red, green, blue].join(',');
1175 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1176 # };
1177 #
1178 # var rgbToCssColor_ = function(red, green, blue) {
1179 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1180 # var hexString = rgbNumber.toString(16);
1181 # var missingZeros = 6 - hexString.length;
1182 # var resultBuilder = ['#'];
1183 # for (var i = 0; i < missingZeros; i++) {
1184 # resultBuilder.push('0');
1185 # }
1186 # resultBuilder.push(hexString);
1187 # return resultBuilder.join('');
1188 # };
1189 #
1190 # // ...
1191 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1192 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1193 # the final pixel color is defined by the equation:
1194 #
1195 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1196 #
1197 # This means that a value of 1.0 corresponds to a solid color, whereas
1198 # a value of 0.0 corresponds to a completely transparent color. This
1199 # uses a wrapper message rather than a simple float scalar so that it is
1200 # possible to distinguish between a default value and the value being unset.
1201 # If omitted, this color object is to be rendered as a solid color
1202 # (as if the alpha value had been explicitly given with a value of 1.0).
1203 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1204 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1205 },
1206 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001207 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001208 "style": "A String", # The style of the border.
1209 },
1210 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001211 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
1212 "angle": 42, # The angle between the standard orientation and the desired orientation.
1213 # Measured in degrees. Valid values are between -90 and 90. Positive
1214 # angles are angled upwards, negative are angled downwards.
1215 #
1216 # Note: For LTR text direction positive angles are in the counterclockwise
1217 # direction, whereas for RTL they are in the clockwise direction
1218 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
1219 # characters is unchanged.
1220 # For example:
1221 #
1222 # | V |
1223 # | e |
1224 # | r |
1225 # | t |
1226 # | i |
1227 # | c |
1228 # | a |
1229 # | l |
1230 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001231 },
1232 },
1233 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
1234 # the interpolation points listed. The format of a cell will vary
1235 # based on its contents as compared to the values of the interpolation
1236 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001237 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001238 # These pin the gradient color scale according to the color,
1239 # type and value chosen.
1240 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1241 # for simplicity of conversion to/from color representations in various
1242 # languages over compactness; for example, the fields of this representation
1243 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1244 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1245 # method in iOS; and, with just a little work, it can be easily formatted into
1246 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1247 #
1248 # Example (Java):
1249 #
1250 # import com.google.type.Color;
1251 #
1252 # // ...
1253 # public static java.awt.Color fromProto(Color protocolor) {
1254 # float alpha = protocolor.hasAlpha()
1255 # ? protocolor.getAlpha().getValue()
1256 # : 1.0;
1257 #
1258 # return new java.awt.Color(
1259 # protocolor.getRed(),
1260 # protocolor.getGreen(),
1261 # protocolor.getBlue(),
1262 # alpha);
1263 # }
1264 #
1265 # public static Color toProto(java.awt.Color color) {
1266 # float red = (float) color.getRed();
1267 # float green = (float) color.getGreen();
1268 # float blue = (float) color.getBlue();
1269 # float denominator = 255.0;
1270 # Color.Builder resultBuilder =
1271 # Color
1272 # .newBuilder()
1273 # .setRed(red / denominator)
1274 # .setGreen(green / denominator)
1275 # .setBlue(blue / denominator);
1276 # int alpha = color.getAlpha();
1277 # if (alpha != 255) {
1278 # result.setAlpha(
1279 # FloatValue
1280 # .newBuilder()
1281 # .setValue(((float) alpha) / denominator)
1282 # .build());
1283 # }
1284 # return resultBuilder.build();
1285 # }
1286 # // ...
1287 #
1288 # Example (iOS / Obj-C):
1289 #
1290 # // ...
1291 # static UIColor* fromProto(Color* protocolor) {
1292 # float red = [protocolor red];
1293 # float green = [protocolor green];
1294 # float blue = [protocolor blue];
1295 # FloatValue* alpha_wrapper = [protocolor alpha];
1296 # float alpha = 1.0;
1297 # if (alpha_wrapper != nil) {
1298 # alpha = [alpha_wrapper value];
1299 # }
1300 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1301 # }
1302 #
1303 # static Color* toProto(UIColor* color) {
1304 # CGFloat red, green, blue, alpha;
1305 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1306 # return nil;
1307 # }
1308 # Color* result = [Color alloc] init];
1309 # [result setRed:red];
1310 # [result setGreen:green];
1311 # [result setBlue:blue];
1312 # if (alpha <= 0.9999) {
1313 # [result setAlpha:floatWrapperWithValue(alpha)];
1314 # }
1315 # [result autorelease];
1316 # return result;
1317 # }
1318 # // ...
1319 #
1320 # Example (JavaScript):
1321 #
1322 # // ...
1323 #
1324 # var protoToCssColor = function(rgb_color) {
1325 # var redFrac = rgb_color.red || 0.0;
1326 # var greenFrac = rgb_color.green || 0.0;
1327 # var blueFrac = rgb_color.blue || 0.0;
1328 # var red = Math.floor(redFrac * 255);
1329 # var green = Math.floor(greenFrac * 255);
1330 # var blue = Math.floor(blueFrac * 255);
1331 #
1332 # if (!('alpha' in rgb_color)) {
1333 # return rgbToCssColor_(red, green, blue);
1334 # }
1335 #
1336 # var alphaFrac = rgb_color.alpha.value || 0.0;
1337 # var rgbParams = [red, green, blue].join(',');
1338 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1339 # };
1340 #
1341 # var rgbToCssColor_ = function(red, green, blue) {
1342 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1343 # var hexString = rgbNumber.toString(16);
1344 # var missingZeros = 6 - hexString.length;
1345 # var resultBuilder = ['#'];
1346 # for (var i = 0; i < missingZeros; i++) {
1347 # resultBuilder.push('0');
1348 # }
1349 # resultBuilder.push(hexString);
1350 # return resultBuilder.join('');
1351 # };
1352 #
1353 # // ...
1354 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1355 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1356 # the final pixel color is defined by the equation:
1357 #
1358 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1359 #
1360 # This means that a value of 1.0 corresponds to a solid color, whereas
1361 # a value of 0.0 corresponds to a completely transparent color. This
1362 # uses a wrapper message rather than a simple float scalar so that it is
1363 # possible to distinguish between a default value and the value being unset.
1364 # If omitted, this color object is to be rendered as a solid color
1365 # (as if the alpha value had been explicitly given with a value of 1.0).
1366 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1367 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1368 },
1369 "type": "A String", # How the value should be interpreted.
1370 "value": "A String", # The value this interpolation point uses. May be a formula.
1371 # Unused if type is MIN or
1372 # MAX.
1373 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001374 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001375 # These pin the gradient color scale according to the color,
1376 # type and value chosen.
1377 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1378 # for simplicity of conversion to/from color representations in various
1379 # languages over compactness; for example, the fields of this representation
1380 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1381 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1382 # method in iOS; and, with just a little work, it can be easily formatted into
1383 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1384 #
1385 # Example (Java):
1386 #
1387 # import com.google.type.Color;
1388 #
1389 # // ...
1390 # public static java.awt.Color fromProto(Color protocolor) {
1391 # float alpha = protocolor.hasAlpha()
1392 # ? protocolor.getAlpha().getValue()
1393 # : 1.0;
1394 #
1395 # return new java.awt.Color(
1396 # protocolor.getRed(),
1397 # protocolor.getGreen(),
1398 # protocolor.getBlue(),
1399 # alpha);
1400 # }
1401 #
1402 # public static Color toProto(java.awt.Color color) {
1403 # float red = (float) color.getRed();
1404 # float green = (float) color.getGreen();
1405 # float blue = (float) color.getBlue();
1406 # float denominator = 255.0;
1407 # Color.Builder resultBuilder =
1408 # Color
1409 # .newBuilder()
1410 # .setRed(red / denominator)
1411 # .setGreen(green / denominator)
1412 # .setBlue(blue / denominator);
1413 # int alpha = color.getAlpha();
1414 # if (alpha != 255) {
1415 # result.setAlpha(
1416 # FloatValue
1417 # .newBuilder()
1418 # .setValue(((float) alpha) / denominator)
1419 # .build());
1420 # }
1421 # return resultBuilder.build();
1422 # }
1423 # // ...
1424 #
1425 # Example (iOS / Obj-C):
1426 #
1427 # // ...
1428 # static UIColor* fromProto(Color* protocolor) {
1429 # float red = [protocolor red];
1430 # float green = [protocolor green];
1431 # float blue = [protocolor blue];
1432 # FloatValue* alpha_wrapper = [protocolor alpha];
1433 # float alpha = 1.0;
1434 # if (alpha_wrapper != nil) {
1435 # alpha = [alpha_wrapper value];
1436 # }
1437 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1438 # }
1439 #
1440 # static Color* toProto(UIColor* color) {
1441 # CGFloat red, green, blue, alpha;
1442 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1443 # return nil;
1444 # }
1445 # Color* result = [Color alloc] init];
1446 # [result setRed:red];
1447 # [result setGreen:green];
1448 # [result setBlue:blue];
1449 # if (alpha <= 0.9999) {
1450 # [result setAlpha:floatWrapperWithValue(alpha)];
1451 # }
1452 # [result autorelease];
1453 # return result;
1454 # }
1455 # // ...
1456 #
1457 # Example (JavaScript):
1458 #
1459 # // ...
1460 #
1461 # var protoToCssColor = function(rgb_color) {
1462 # var redFrac = rgb_color.red || 0.0;
1463 # var greenFrac = rgb_color.green || 0.0;
1464 # var blueFrac = rgb_color.blue || 0.0;
1465 # var red = Math.floor(redFrac * 255);
1466 # var green = Math.floor(greenFrac * 255);
1467 # var blue = Math.floor(blueFrac * 255);
1468 #
1469 # if (!('alpha' in rgb_color)) {
1470 # return rgbToCssColor_(red, green, blue);
1471 # }
1472 #
1473 # var alphaFrac = rgb_color.alpha.value || 0.0;
1474 # var rgbParams = [red, green, blue].join(',');
1475 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1476 # };
1477 #
1478 # var rgbToCssColor_ = function(red, green, blue) {
1479 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1480 # var hexString = rgbNumber.toString(16);
1481 # var missingZeros = 6 - hexString.length;
1482 # var resultBuilder = ['#'];
1483 # for (var i = 0; i < missingZeros; i++) {
1484 # resultBuilder.push('0');
1485 # }
1486 # resultBuilder.push(hexString);
1487 # return resultBuilder.join('');
1488 # };
1489 #
1490 # // ...
1491 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1492 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1493 # the final pixel color is defined by the equation:
1494 #
1495 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1496 #
1497 # This means that a value of 1.0 corresponds to a solid color, whereas
1498 # a value of 0.0 corresponds to a completely transparent color. This
1499 # uses a wrapper message rather than a simple float scalar so that it is
1500 # possible to distinguish between a default value and the value being unset.
1501 # If omitted, this color object is to be rendered as a solid color
1502 # (as if the alpha value had been explicitly given with a value of 1.0).
1503 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1504 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1505 },
1506 "type": "A String", # How the value should be interpreted.
1507 "value": "A String", # The value this interpolation point uses. May be a formula.
1508 # Unused if type is MIN or
1509 # MAX.
1510 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001511 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001512 # These pin the gradient color scale according to the color,
1513 # type and value chosen.
1514 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
1515 # for simplicity of conversion to/from color representations in various
1516 # languages over compactness; for example, the fields of this representation
1517 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1518 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1519 # method in iOS; and, with just a little work, it can be easily formatted into
1520 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1521 #
1522 # Example (Java):
1523 #
1524 # import com.google.type.Color;
1525 #
1526 # // ...
1527 # public static java.awt.Color fromProto(Color protocolor) {
1528 # float alpha = protocolor.hasAlpha()
1529 # ? protocolor.getAlpha().getValue()
1530 # : 1.0;
1531 #
1532 # return new java.awt.Color(
1533 # protocolor.getRed(),
1534 # protocolor.getGreen(),
1535 # protocolor.getBlue(),
1536 # alpha);
1537 # }
1538 #
1539 # public static Color toProto(java.awt.Color color) {
1540 # float red = (float) color.getRed();
1541 # float green = (float) color.getGreen();
1542 # float blue = (float) color.getBlue();
1543 # float denominator = 255.0;
1544 # Color.Builder resultBuilder =
1545 # Color
1546 # .newBuilder()
1547 # .setRed(red / denominator)
1548 # .setGreen(green / denominator)
1549 # .setBlue(blue / denominator);
1550 # int alpha = color.getAlpha();
1551 # if (alpha != 255) {
1552 # result.setAlpha(
1553 # FloatValue
1554 # .newBuilder()
1555 # .setValue(((float) alpha) / denominator)
1556 # .build());
1557 # }
1558 # return resultBuilder.build();
1559 # }
1560 # // ...
1561 #
1562 # Example (iOS / Obj-C):
1563 #
1564 # // ...
1565 # static UIColor* fromProto(Color* protocolor) {
1566 # float red = [protocolor red];
1567 # float green = [protocolor green];
1568 # float blue = [protocolor blue];
1569 # FloatValue* alpha_wrapper = [protocolor alpha];
1570 # float alpha = 1.0;
1571 # if (alpha_wrapper != nil) {
1572 # alpha = [alpha_wrapper value];
1573 # }
1574 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1575 # }
1576 #
1577 # static Color* toProto(UIColor* color) {
1578 # CGFloat red, green, blue, alpha;
1579 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
1580 # return nil;
1581 # }
1582 # Color* result = [Color alloc] init];
1583 # [result setRed:red];
1584 # [result setGreen:green];
1585 # [result setBlue:blue];
1586 # if (alpha <= 0.9999) {
1587 # [result setAlpha:floatWrapperWithValue(alpha)];
1588 # }
1589 # [result autorelease];
1590 # return result;
1591 # }
1592 # // ...
1593 #
1594 # Example (JavaScript):
1595 #
1596 # // ...
1597 #
1598 # var protoToCssColor = function(rgb_color) {
1599 # var redFrac = rgb_color.red || 0.0;
1600 # var greenFrac = rgb_color.green || 0.0;
1601 # var blueFrac = rgb_color.blue || 0.0;
1602 # var red = Math.floor(redFrac * 255);
1603 # var green = Math.floor(greenFrac * 255);
1604 # var blue = Math.floor(blueFrac * 255);
1605 #
1606 # if (!('alpha' in rgb_color)) {
1607 # return rgbToCssColor_(red, green, blue);
1608 # }
1609 #
1610 # var alphaFrac = rgb_color.alpha.value || 0.0;
1611 # var rgbParams = [red, green, blue].join(',');
1612 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1613 # };
1614 #
1615 # var rgbToCssColor_ = function(red, green, blue) {
1616 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1617 # var hexString = rgbNumber.toString(16);
1618 # var missingZeros = 6 - hexString.length;
1619 # var resultBuilder = ['#'];
1620 # for (var i = 0; i < missingZeros; i++) {
1621 # resultBuilder.push('0');
1622 # }
1623 # resultBuilder.push(hexString);
1624 # return resultBuilder.join('');
1625 # };
1626 #
1627 # // ...
1628 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1629 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
1630 # the final pixel color is defined by the equation:
1631 #
1632 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1633 #
1634 # This means that a value of 1.0 corresponds to a solid color, whereas
1635 # a value of 0.0 corresponds to a completely transparent color. This
1636 # uses a wrapper message rather than a simple float scalar so that it is
1637 # possible to distinguish between a default value and the value being unset.
1638 # If omitted, this color object is to be rendered as a solid color
1639 # (as if the alpha value had been explicitly given with a value of 1.0).
1640 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
1641 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
1642 },
1643 "type": "A String", # How the value should be interpreted.
1644 "value": "A String", # The value this interpolation point uses. May be a formula.
1645 # Unused if type is MIN or
1646 # MAX.
1647 },
1648 },
1649 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001650 "sheetId": 42, # The sheet of the rule to move. Required if new_index is set,
1651 # unused otherwise.
1652 "newIndex": 42, # The zero-based new index the rule should end up at.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001653 },
1654 "updateProtectedRange": { # Updates an existing protected range with the specified # Updates a protected range.
1655 # protectedRangeId.
1656 "fields": "A String", # The fields that should be updated. At least one field must be specified.
1657 # The root `protectedRange` is implied and should not be specified.
1658 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001659 "protectedRange": { # A protected range. # The protected range to update with the new properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001660 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1661 # Unprotected ranges are only supported on protected sheets.
1662 { # A range on a sheet.
1663 # All indexes are zero-based.
1664 # Indexes are half open, e.g the start index is inclusive
1665 # and the end index is exclusive -- [start_index, end_index).
1666 # Missing indexes indicate the range is unbounded on that side.
1667 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001668 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001669 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001670 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001671 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001672 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001673 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001674 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001675 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001676 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001677 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001678 # `Sheet1!A:B == sheet_id: 0,
1679 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001680 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001681 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001682 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001683 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001684 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001685 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001686 #
1687 # The start index must always be less than or equal to the end index.
1688 # If the start index equals the end index, then the range is empty.
1689 # Empty ranges are typically not meaningful and are usually rendered in the
1690 # UI as `#REF!`.
1691 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001692 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001693 "sheetId": 42, # The sheet this range is on.
1694 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001695 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001696 },
1697 ],
1698 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1699 # protected area.
1700 # This field is read-only.
1701 "description": "A String", # The description of this protected range.
1702 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1703 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001704 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001705 # may be set.
1706 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1707 # This field is only visible to users with edit access to the protected
1708 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001709 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001710 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1711 # range. Domain protection is only supported on documents within a domain.
1712 "users": [ # The email addresses of users with edit access to the protected range.
1713 "A String",
1714 ],
1715 "groups": [ # The email addresses of groups with edit access to the protected range.
1716 "A String",
1717 ],
1718 },
1719 "protectedRangeId": 42, # The ID of the protected range.
1720 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001721 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001722 # Warning-based protection means that every user can edit data in the
1723 # protected range, except editing will prompt a warning asking the user
1724 # to confirm the edit.
1725 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001726 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001727 # Additionally, if this field is changed from true to false and the
1728 # `editors` field is not set (nor included in the field mask), then
1729 # the editors will be set to all the editors in the document.
1730 "range": { # A range on a sheet. # The range that is being protected.
1731 # The range may be fully unbounded, in which case this is considered
1732 # a protected sheet.
1733 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001734 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001735 # may be set.
1736 # All indexes are zero-based.
1737 # Indexes are half open, e.g the start index is inclusive
1738 # and the end index is exclusive -- [start_index, end_index).
1739 # Missing indexes indicate the range is unbounded on that side.
1740 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001741 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001742 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001743 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001744 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001745 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001746 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001747 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001748 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001749 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001750 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001751 # `Sheet1!A:B == sheet_id: 0,
1752 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001753 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001754 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001755 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001756 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001757 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001758 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001759 #
1760 # The start index must always be less than or equal to the end index.
1761 # If the start index equals the end index, then the range is empty.
1762 # Empty ranges are typically not meaningful and are usually rendered in the
1763 # UI as `#REF!`.
1764 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001765 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001766 "sheetId": 42, # The sheet this range is on.
1767 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001768 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001769 },
1770 },
1771 },
1772 "deleteDimension": { # Deletes the dimensions from the sheet. # Deletes rows or columns in a sheet.
1773 "range": { # A range along a single dimension on a sheet. # The dimensions to delete from the sheet.
1774 # All indexes are zero-based.
1775 # Indexes are half open: the start index is inclusive
1776 # and the end index is exclusive.
1777 # Missing indexes indicate the range is unbounded on that side.
1778 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
1779 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
1780 "sheetId": 42, # The sheet this span is on.
1781 "dimension": "A String", # The dimension of the span.
1782 },
1783 },
1784 "addProtectedRange": { # Adds a new protected range. # Adds a protected range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001785 "protectedRange": { # A protected range. # The protected range to be added. The
1786 # protectedRangeId field is optional; if
1787 # one is not set, an id will be randomly generated. (It is an error to
1788 # specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001789 "unprotectedRanges": [ # The list of unprotected ranges within a protected sheet.
1790 # Unprotected ranges are only supported on protected sheets.
1791 { # A range on a sheet.
1792 # All indexes are zero-based.
1793 # Indexes are half open, e.g the start index is inclusive
1794 # and the end index is exclusive -- [start_index, end_index).
1795 # Missing indexes indicate the range is unbounded on that side.
1796 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001797 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001798 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001799 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001800 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001801 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001802 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001803 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001804 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001805 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001806 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001807 # `Sheet1!A:B == sheet_id: 0,
1808 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001809 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001810 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001811 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001812 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001813 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001814 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001815 #
1816 # The start index must always be less than or equal to the end index.
1817 # If the start index equals the end index, then the range is empty.
1818 # Empty ranges are typically not meaningful and are usually rendered in the
1819 # UI as `#REF!`.
1820 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001821 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001822 "sheetId": 42, # The sheet this range is on.
1823 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001824 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001825 },
1826 ],
1827 "requestingUserCanEdit": True or False, # True if the user who requested this protected range can edit the
1828 # protected area.
1829 # This field is read-only.
1830 "description": "A String", # The description of this protected range.
1831 "namedRangeId": "A String", # The named range this protected range is backed by, if any.
1832 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001833 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001834 # may be set.
1835 "editors": { # The editors of a protected range. # The users and groups with edit access to the protected range.
1836 # This field is only visible to users with edit access to the protected
1837 # range and the document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001838 # Editors are not supported with warning_only protection.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001839 "domainUsersCanEdit": True or False, # True if anyone in the document's domain has edit access to the protected
1840 # range. Domain protection is only supported on documents within a domain.
1841 "users": [ # The email addresses of users with edit access to the protected range.
1842 "A String",
1843 ],
1844 "groups": [ # The email addresses of groups with edit access to the protected range.
1845 "A String",
1846 ],
1847 },
1848 "protectedRangeId": 42, # The ID of the protected range.
1849 # This field is read-only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001850 "warningOnly": True or False, # True if this protected range will show a warning when editing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001851 # Warning-based protection means that every user can edit data in the
1852 # protected range, except editing will prompt a warning asking the user
1853 # to confirm the edit.
1854 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001855 # When writing: if this field is true, then editors is ignored.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001856 # Additionally, if this field is changed from true to false and the
1857 # `editors` field is not set (nor included in the field mask), then
1858 # the editors will be set to all the editors in the document.
1859 "range": { # A range on a sheet. # The range that is being protected.
1860 # The range may be fully unbounded, in which case this is considered
1861 # a protected sheet.
1862 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001863 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001864 # may be set.
1865 # All indexes are zero-based.
1866 # Indexes are half open, e.g the start index is inclusive
1867 # and the end index is exclusive -- [start_index, end_index).
1868 # Missing indexes indicate the range is unbounded on that side.
1869 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001870 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001871 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001872 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001873 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001874 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001875 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001876 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001877 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001878 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001879 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001880 # `Sheet1!A:B == sheet_id: 0,
1881 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001882 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001883 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001884 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001885 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001886 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001887 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001888 #
1889 # The start index must always be less than or equal to the end index.
1890 # If the start index equals the end index, then the range is empty.
1891 # Empty ranges are typically not meaningful and are usually rendered in the
1892 # UI as `#REF!`.
1893 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001894 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001895 "sheetId": 42, # The sheet this range is on.
1896 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001897 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001898 },
1899 },
1900 },
1901 "deleteEmbeddedObject": { # Deletes the embedded object with the given ID. # Deletes an embedded object (e.g, chart, image) in a sheet.
1902 "objectId": 42, # The ID of the embedded object to delete.
1903 },
1904 "pasteData": { # Inserts data into the spreadsheet starting at the specified coordinate. # Pastes data (HTML or delimited) into a sheet.
1905 "coordinate": { # A coordinate in a sheet. # The coordinate at which the data should start being inserted.
1906 # All indexes are zero-based.
1907 "rowIndex": 42, # The row index of the coordinate.
1908 "columnIndex": 42, # The column index of the coordinate.
1909 "sheetId": 42, # The sheet this coordinate is on.
1910 },
1911 "type": "A String", # How the data should be pasted.
1912 "delimiter": "A String", # The delimiter in the data.
1913 "html": True or False, # True if the data is HTML.
1914 "data": "A String", # The data to insert.
1915 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001916 "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 -07001917 # inserting new rows into the sheet if necessary.
1918 "fields": "A String", # The fields of CellData that should be updated.
1919 # At least one field must be specified.
1920 # The root is the CellData; 'row.values.' should not be specified.
1921 # A single `"*"` can be used as short-hand for listing every field.
1922 "rows": [ # The data to append.
1923 { # Data about each cell in a row.
1924 "values": [ # The values in the row, one per column.
1925 { # Data about a specific cell.
1926 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
1927 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001928 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001929 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001930 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001931 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
1932 # or vertically (as rows).
1933 "rows": [ # Each row grouping in the pivot table.
1934 { # A single grouping (either row or column) in a pivot table.
1935 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
1936 "valueMetadata": [ # Metadata about values in the grouping.
1937 { # Metadata about a value in a pivot grouping.
1938 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
1939 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
1940 # (Note that formulaValue is not valid,
1941 # because the values will be calculated.)
1942 "numberValue": 3.14, # Represents a double value.
1943 # Note: Dates, Times and DateTimes are represented as doubles in
1944 # "serial number" format.
1945 "boolValue": True or False, # Represents a boolean value.
1946 "formulaValue": "A String", # Represents a formula.
1947 "stringValue": "A String", # Represents a string value.
1948 # Leading single quotes are not included. For example, if the user typed
1949 # `'123` into the UI, this would be represented as a `stringValue` of
1950 # `"123"`.
1951 "errorValue": { # An error in a cell. # Represents an error.
1952 # This field is read-only.
1953 "message": "A String", # A message with more information about the error
1954 # (in the spreadsheet's locale).
1955 "type": "A String", # The type of error.
1956 },
1957 },
1958 },
1959 ],
1960 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
1961 # If not specified, sorting is alphabetical by this group's values.
1962 "buckets": [ # Determines the bucket from which values are chosen to sort.
1963 #
1964 # For example, in a pivot table with one row group & two column groups,
1965 # the row group can list up to two values. The first value corresponds
1966 # to a value within the first column group, and the second value
1967 # corresponds to a value in the second column group. If no values
1968 # are listed, this would indicate that the row should be sorted according
1969 # to the "Grand Total" over the column groups. If a single value is listed,
1970 # this would correspond to using the "Total" of that bucket.
1971 { # The kinds of value that a cell in a spreadsheet can have.
1972 "numberValue": 3.14, # Represents a double value.
1973 # Note: Dates, Times and DateTimes are represented as doubles in
1974 # "serial number" format.
1975 "boolValue": True or False, # Represents a boolean value.
1976 "formulaValue": "A String", # Represents a formula.
1977 "stringValue": "A String", # Represents a string value.
1978 # Leading single quotes are not included. For example, if the user typed
1979 # `'123` into the UI, this would be represented as a `stringValue` of
1980 # `"123"`.
1981 "errorValue": { # An error in a cell. # Represents an error.
1982 # This field is read-only.
1983 "message": "A String", # A message with more information about the error
1984 # (in the spreadsheet's locale).
1985 "type": "A String", # The type of error.
1986 },
1987 },
1988 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001989 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001990 # grouping should be sorted by.
1991 },
1992 "sortOrder": "A String", # The order the values in this group should be sorted.
1993 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
1994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001995 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001996 # means this group refers to column `C`, whereas the offset `1` would refer
1997 # to column `D`.
1998 },
1999 ],
2000 "source": { # A range on a sheet. # The range the pivot table is reading data from.
2001 # All indexes are zero-based.
2002 # Indexes are half open, e.g the start index is inclusive
2003 # and the end index is exclusive -- [start_index, end_index).
2004 # Missing indexes indicate the range is unbounded on that side.
2005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002006 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002007 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002008 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002009 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002010 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002011 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002012 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002013 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002014 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002015 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002016 # `Sheet1!A:B == sheet_id: 0,
2017 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002018 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002019 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002020 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002021 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002022 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002023 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002024 #
2025 # The start index must always be less than or equal to the end index.
2026 # If the start index equals the end index, then the range is empty.
2027 # Empty ranges are typically not meaningful and are usually rendered in the
2028 # UI as `#REF!`.
2029 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002030 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002031 "sheetId": 42, # The sheet this range is on.
2032 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002033 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002034 },
2035 "values": [ # A list of values to include in the pivot table.
2036 { # The definition of how a value in a pivot table should be calculated.
2037 "formula": "A String", # A custom formula to calculate the value. The formula must start
2038 # with an `=` character.
2039 "summarizeFunction": "A String", # A function to summarize the value.
2040 # If formula is set, the only supported values are
2041 # SUM and
2042 # CUSTOM.
2043 # If sourceColumnOffset is set, then `CUSTOM`
2044 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002045 "name": "A String", # A name to use for the value. This is only used if formula was set.
2046 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002047 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
2048 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002049 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002050 # means this value refers to column `C`, whereas the offset `1` would
2051 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002052 },
2053 ],
2054 "criteria": { # An optional mapping of filters per source column offset.
2055 #
2056 # The filters will be applied before aggregating data into the pivot table.
2057 # The map's key is the column offset of the source range that you want to
2058 # filter, and the value is the criteria for that column.
2059 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002060 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002061 # for column `C`, whereas the key `1` is for column `D`.
2062 "a_key": { # Criteria for showing/hiding rows in a pivot table.
2063 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
2064 "A String",
2065 ],
2066 },
2067 },
2068 "columns": [ # Each column grouping in the pivot table.
2069 { # A single grouping (either row or column) in a pivot table.
2070 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
2071 "valueMetadata": [ # Metadata about values in the grouping.
2072 { # Metadata about a value in a pivot grouping.
2073 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
2074 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
2075 # (Note that formulaValue is not valid,
2076 # because the values will be calculated.)
2077 "numberValue": 3.14, # Represents a double value.
2078 # Note: Dates, Times and DateTimes are represented as doubles in
2079 # "serial number" format.
2080 "boolValue": True or False, # Represents a boolean value.
2081 "formulaValue": "A String", # Represents a formula.
2082 "stringValue": "A String", # Represents a string value.
2083 # Leading single quotes are not included. For example, if the user typed
2084 # `'123` into the UI, this would be represented as a `stringValue` of
2085 # `"123"`.
2086 "errorValue": { # An error in a cell. # Represents an error.
2087 # This field is read-only.
2088 "message": "A String", # A message with more information about the error
2089 # (in the spreadsheet's locale).
2090 "type": "A String", # The type of error.
2091 },
2092 },
2093 },
2094 ],
2095 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
2096 # If not specified, sorting is alphabetical by this group's values.
2097 "buckets": [ # Determines the bucket from which values are chosen to sort.
2098 #
2099 # For example, in a pivot table with one row group & two column groups,
2100 # the row group can list up to two values. The first value corresponds
2101 # to a value within the first column group, and the second value
2102 # corresponds to a value in the second column group. If no values
2103 # are listed, this would indicate that the row should be sorted according
2104 # to the "Grand Total" over the column groups. If a single value is listed,
2105 # this would correspond to using the "Total" of that bucket.
2106 { # The kinds of value that a cell in a spreadsheet can have.
2107 "numberValue": 3.14, # Represents a double value.
2108 # Note: Dates, Times and DateTimes are represented as doubles in
2109 # "serial number" format.
2110 "boolValue": True or False, # Represents a boolean value.
2111 "formulaValue": "A String", # Represents a formula.
2112 "stringValue": "A String", # Represents a string value.
2113 # Leading single quotes are not included. For example, if the user typed
2114 # `'123` into the UI, this would be represented as a `stringValue` of
2115 # `"123"`.
2116 "errorValue": { # An error in a cell. # Represents an error.
2117 # This field is read-only.
2118 "message": "A String", # A message with more information about the error
2119 # (in the spreadsheet's locale).
2120 "type": "A String", # The type of error.
2121 },
2122 },
2123 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002124 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002125 # grouping should be sorted by.
2126 },
2127 "sortOrder": "A String", # The order the values in this group should be sorted.
2128 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
2129 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002130 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002131 # means this group refers to column `C`, whereas the offset `1` would refer
2132 # to column `D`.
2133 },
2134 ],
2135 },
2136 "hyperlink": "A String", # A hyperlink this cell points to, if any.
2137 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
2138 "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
2139 # the calculated value. For cells with literals, this will be
2140 # the same as the user_entered_value.
2141 # This field is read-only.
2142 "numberValue": 3.14, # Represents a double value.
2143 # Note: Dates, Times and DateTimes are represented as doubles in
2144 # "serial number" format.
2145 "boolValue": True or False, # Represents a boolean value.
2146 "formulaValue": "A String", # Represents a formula.
2147 "stringValue": "A String", # Represents a string value.
2148 # Leading single quotes are not included. For example, if the user typed
2149 # `'123` into the UI, this would be represented as a `stringValue` of
2150 # `"123"`.
2151 "errorValue": { # An error in a cell. # Represents an error.
2152 # This field is read-only.
2153 "message": "A String", # A message with more information about the error
2154 # (in the spreadsheet's locale).
2155 "type": "A String", # The type of error.
2156 },
2157 },
2158 "formattedValue": "A String", # The formatted value of the cell.
2159 # This is the value as it's shown to the user.
2160 # This field is read-only.
2161 "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()`
2162 # Note: Dates, Times and DateTimes are represented as doubles in
2163 # serial number format.
2164 "numberValue": 3.14, # Represents a double value.
2165 # Note: Dates, Times and DateTimes are represented as doubles in
2166 # "serial number" format.
2167 "boolValue": True or False, # Represents a boolean value.
2168 "formulaValue": "A String", # Represents a formula.
2169 "stringValue": "A String", # Represents a string value.
2170 # Leading single quotes are not included. For example, if the user typed
2171 # `'123` into the UI, this would be represented as a `stringValue` of
2172 # `"123"`.
2173 "errorValue": { # An error in a cell. # Represents an error.
2174 # This field is read-only.
2175 "message": "A String", # A message with more information about the error
2176 # (in the spreadsheet's locale).
2177 "type": "A String", # The type of error.
2178 },
2179 },
2180 "note": "A String", # Any note on the cell.
2181 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
2182 # This includes the results of applying any conditional formatting and,
2183 # if the cell contains a formula, the computed number format.
2184 # If the effective format is the default format, effective format will
2185 # not be written.
2186 # This field is read-only.
2187 "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 -07002188 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
2189 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002190 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002191 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002192 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002193 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002194 },
2195 "textDirection": "A String", # The direction of the text in the cell.
2196 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
2197 # When updating padding, every field must be specified.
2198 "top": 42, # The top padding of the cell.
2199 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002200 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002201 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002202 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002203 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002204 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
2205 # for simplicity of conversion to/from color representations in various
2206 # languages over compactness; for example, the fields of this representation
2207 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2208 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2209 # method in iOS; and, with just a little work, it can be easily formatted into
2210 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2211 #
2212 # Example (Java):
2213 #
2214 # import com.google.type.Color;
2215 #
2216 # // ...
2217 # public static java.awt.Color fromProto(Color protocolor) {
2218 # float alpha = protocolor.hasAlpha()
2219 # ? protocolor.getAlpha().getValue()
2220 # : 1.0;
2221 #
2222 # return new java.awt.Color(
2223 # protocolor.getRed(),
2224 # protocolor.getGreen(),
2225 # protocolor.getBlue(),
2226 # alpha);
2227 # }
2228 #
2229 # public static Color toProto(java.awt.Color color) {
2230 # float red = (float) color.getRed();
2231 # float green = (float) color.getGreen();
2232 # float blue = (float) color.getBlue();
2233 # float denominator = 255.0;
2234 # Color.Builder resultBuilder =
2235 # Color
2236 # .newBuilder()
2237 # .setRed(red / denominator)
2238 # .setGreen(green / denominator)
2239 # .setBlue(blue / denominator);
2240 # int alpha = color.getAlpha();
2241 # if (alpha != 255) {
2242 # result.setAlpha(
2243 # FloatValue
2244 # .newBuilder()
2245 # .setValue(((float) alpha) / denominator)
2246 # .build());
2247 # }
2248 # return resultBuilder.build();
2249 # }
2250 # // ...
2251 #
2252 # Example (iOS / Obj-C):
2253 #
2254 # // ...
2255 # static UIColor* fromProto(Color* protocolor) {
2256 # float red = [protocolor red];
2257 # float green = [protocolor green];
2258 # float blue = [protocolor blue];
2259 # FloatValue* alpha_wrapper = [protocolor alpha];
2260 # float alpha = 1.0;
2261 # if (alpha_wrapper != nil) {
2262 # alpha = [alpha_wrapper value];
2263 # }
2264 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2265 # }
2266 #
2267 # static Color* toProto(UIColor* color) {
2268 # CGFloat red, green, blue, alpha;
2269 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2270 # return nil;
2271 # }
2272 # Color* result = [Color alloc] init];
2273 # [result setRed:red];
2274 # [result setGreen:green];
2275 # [result setBlue:blue];
2276 # if (alpha <= 0.9999) {
2277 # [result setAlpha:floatWrapperWithValue(alpha)];
2278 # }
2279 # [result autorelease];
2280 # return result;
2281 # }
2282 # // ...
2283 #
2284 # Example (JavaScript):
2285 #
2286 # // ...
2287 #
2288 # var protoToCssColor = function(rgb_color) {
2289 # var redFrac = rgb_color.red || 0.0;
2290 # var greenFrac = rgb_color.green || 0.0;
2291 # var blueFrac = rgb_color.blue || 0.0;
2292 # var red = Math.floor(redFrac * 255);
2293 # var green = Math.floor(greenFrac * 255);
2294 # var blue = Math.floor(blueFrac * 255);
2295 #
2296 # if (!('alpha' in rgb_color)) {
2297 # return rgbToCssColor_(red, green, blue);
2298 # }
2299 #
2300 # var alphaFrac = rgb_color.alpha.value || 0.0;
2301 # var rgbParams = [red, green, blue].join(',');
2302 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2303 # };
2304 #
2305 # var rgbToCssColor_ = function(red, green, blue) {
2306 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2307 # var hexString = rgbNumber.toString(16);
2308 # var missingZeros = 6 - hexString.length;
2309 # var resultBuilder = ['#'];
2310 # for (var i = 0; i < missingZeros; i++) {
2311 # resultBuilder.push('0');
2312 # }
2313 # resultBuilder.push(hexString);
2314 # return resultBuilder.join('');
2315 # };
2316 #
2317 # // ...
2318 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2319 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2320 # the final pixel color is defined by the equation:
2321 #
2322 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2323 #
2324 # This means that a value of 1.0 corresponds to a solid color, whereas
2325 # a value of 0.0 corresponds to a completely transparent color. This
2326 # uses a wrapper message rather than a simple float scalar so that it is
2327 # possible to distinguish between a default value and the value being unset.
2328 # If omitted, this color object is to be rendered as a solid color
2329 # (as if the alpha value had been explicitly given with a value of 1.0).
2330 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2331 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2332 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002333 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002334 "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).
2335 # Absent values indicate that the field isn't specified.
2336 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
2337 # for simplicity of conversion to/from color representations in various
2338 # languages over compactness; for example, the fields of this representation
2339 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2340 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2341 # method in iOS; and, with just a little work, it can be easily formatted into
2342 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2343 #
2344 # Example (Java):
2345 #
2346 # import com.google.type.Color;
2347 #
2348 # // ...
2349 # public static java.awt.Color fromProto(Color protocolor) {
2350 # float alpha = protocolor.hasAlpha()
2351 # ? protocolor.getAlpha().getValue()
2352 # : 1.0;
2353 #
2354 # return new java.awt.Color(
2355 # protocolor.getRed(),
2356 # protocolor.getGreen(),
2357 # protocolor.getBlue(),
2358 # alpha);
2359 # }
2360 #
2361 # public static Color toProto(java.awt.Color color) {
2362 # float red = (float) color.getRed();
2363 # float green = (float) color.getGreen();
2364 # float blue = (float) color.getBlue();
2365 # float denominator = 255.0;
2366 # Color.Builder resultBuilder =
2367 # Color
2368 # .newBuilder()
2369 # .setRed(red / denominator)
2370 # .setGreen(green / denominator)
2371 # .setBlue(blue / denominator);
2372 # int alpha = color.getAlpha();
2373 # if (alpha != 255) {
2374 # result.setAlpha(
2375 # FloatValue
2376 # .newBuilder()
2377 # .setValue(((float) alpha) / denominator)
2378 # .build());
2379 # }
2380 # return resultBuilder.build();
2381 # }
2382 # // ...
2383 #
2384 # Example (iOS / Obj-C):
2385 #
2386 # // ...
2387 # static UIColor* fromProto(Color* protocolor) {
2388 # float red = [protocolor red];
2389 # float green = [protocolor green];
2390 # float blue = [protocolor blue];
2391 # FloatValue* alpha_wrapper = [protocolor alpha];
2392 # float alpha = 1.0;
2393 # if (alpha_wrapper != nil) {
2394 # alpha = [alpha_wrapper value];
2395 # }
2396 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2397 # }
2398 #
2399 # static Color* toProto(UIColor* color) {
2400 # CGFloat red, green, blue, alpha;
2401 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2402 # return nil;
2403 # }
2404 # Color* result = [Color alloc] init];
2405 # [result setRed:red];
2406 # [result setGreen:green];
2407 # [result setBlue:blue];
2408 # if (alpha <= 0.9999) {
2409 # [result setAlpha:floatWrapperWithValue(alpha)];
2410 # }
2411 # [result autorelease];
2412 # return result;
2413 # }
2414 # // ...
2415 #
2416 # Example (JavaScript):
2417 #
2418 # // ...
2419 #
2420 # var protoToCssColor = function(rgb_color) {
2421 # var redFrac = rgb_color.red || 0.0;
2422 # var greenFrac = rgb_color.green || 0.0;
2423 # var blueFrac = rgb_color.blue || 0.0;
2424 # var red = Math.floor(redFrac * 255);
2425 # var green = Math.floor(greenFrac * 255);
2426 # var blue = Math.floor(blueFrac * 255);
2427 #
2428 # if (!('alpha' in rgb_color)) {
2429 # return rgbToCssColor_(red, green, blue);
2430 # }
2431 #
2432 # var alphaFrac = rgb_color.alpha.value || 0.0;
2433 # var rgbParams = [red, green, blue].join(',');
2434 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2435 # };
2436 #
2437 # var rgbToCssColor_ = function(red, green, blue) {
2438 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2439 # var hexString = rgbNumber.toString(16);
2440 # var missingZeros = 6 - hexString.length;
2441 # var resultBuilder = ['#'];
2442 # for (var i = 0; i < missingZeros; i++) {
2443 # resultBuilder.push('0');
2444 # }
2445 # resultBuilder.push(hexString);
2446 # return resultBuilder.join('');
2447 # };
2448 #
2449 # // ...
2450 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2451 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2452 # the final pixel color is defined by the equation:
2453 #
2454 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2455 #
2456 # This means that a value of 1.0 corresponds to a solid color, whereas
2457 # a value of 0.0 corresponds to a completely transparent color. This
2458 # uses a wrapper message rather than a simple float scalar so that it is
2459 # possible to distinguish between a default value and the value being unset.
2460 # If omitted, this color object is to be rendered as a solid color
2461 # (as if the alpha value had been explicitly given with a value of 1.0).
2462 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2463 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2464 },
2465 "bold": True or False, # True if the text is bold.
2466 "strikethrough": True or False, # True if the text has a strikethrough.
2467 "fontFamily": "A String", # The font family.
2468 "fontSize": 42, # The size of the font.
2469 "italic": True or False, # True if the text is italicized.
2470 "underline": True or False, # True if the text is underlined.
2471 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002472 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002473 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
2474 "borders": { # The borders of the cell. # The borders of the cell.
2475 "top": { # A border along a cell. # The top border of the cell.
2476 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2477 # for simplicity of conversion to/from color representations in various
2478 # languages over compactness; for example, the fields of this representation
2479 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2480 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2481 # method in iOS; and, with just a little work, it can be easily formatted into
2482 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2483 #
2484 # Example (Java):
2485 #
2486 # import com.google.type.Color;
2487 #
2488 # // ...
2489 # public static java.awt.Color fromProto(Color protocolor) {
2490 # float alpha = protocolor.hasAlpha()
2491 # ? protocolor.getAlpha().getValue()
2492 # : 1.0;
2493 #
2494 # return new java.awt.Color(
2495 # protocolor.getRed(),
2496 # protocolor.getGreen(),
2497 # protocolor.getBlue(),
2498 # alpha);
2499 # }
2500 #
2501 # public static Color toProto(java.awt.Color color) {
2502 # float red = (float) color.getRed();
2503 # float green = (float) color.getGreen();
2504 # float blue = (float) color.getBlue();
2505 # float denominator = 255.0;
2506 # Color.Builder resultBuilder =
2507 # Color
2508 # .newBuilder()
2509 # .setRed(red / denominator)
2510 # .setGreen(green / denominator)
2511 # .setBlue(blue / denominator);
2512 # int alpha = color.getAlpha();
2513 # if (alpha != 255) {
2514 # result.setAlpha(
2515 # FloatValue
2516 # .newBuilder()
2517 # .setValue(((float) alpha) / denominator)
2518 # .build());
2519 # }
2520 # return resultBuilder.build();
2521 # }
2522 # // ...
2523 #
2524 # Example (iOS / Obj-C):
2525 #
2526 # // ...
2527 # static UIColor* fromProto(Color* protocolor) {
2528 # float red = [protocolor red];
2529 # float green = [protocolor green];
2530 # float blue = [protocolor blue];
2531 # FloatValue* alpha_wrapper = [protocolor alpha];
2532 # float alpha = 1.0;
2533 # if (alpha_wrapper != nil) {
2534 # alpha = [alpha_wrapper value];
2535 # }
2536 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2537 # }
2538 #
2539 # static Color* toProto(UIColor* color) {
2540 # CGFloat red, green, blue, alpha;
2541 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2542 # return nil;
2543 # }
2544 # Color* result = [Color alloc] init];
2545 # [result setRed:red];
2546 # [result setGreen:green];
2547 # [result setBlue:blue];
2548 # if (alpha <= 0.9999) {
2549 # [result setAlpha:floatWrapperWithValue(alpha)];
2550 # }
2551 # [result autorelease];
2552 # return result;
2553 # }
2554 # // ...
2555 #
2556 # Example (JavaScript):
2557 #
2558 # // ...
2559 #
2560 # var protoToCssColor = function(rgb_color) {
2561 # var redFrac = rgb_color.red || 0.0;
2562 # var greenFrac = rgb_color.green || 0.0;
2563 # var blueFrac = rgb_color.blue || 0.0;
2564 # var red = Math.floor(redFrac * 255);
2565 # var green = Math.floor(greenFrac * 255);
2566 # var blue = Math.floor(blueFrac * 255);
2567 #
2568 # if (!('alpha' in rgb_color)) {
2569 # return rgbToCssColor_(red, green, blue);
2570 # }
2571 #
2572 # var alphaFrac = rgb_color.alpha.value || 0.0;
2573 # var rgbParams = [red, green, blue].join(',');
2574 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2575 # };
2576 #
2577 # var rgbToCssColor_ = function(red, green, blue) {
2578 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2579 # var hexString = rgbNumber.toString(16);
2580 # var missingZeros = 6 - hexString.length;
2581 # var resultBuilder = ['#'];
2582 # for (var i = 0; i < missingZeros; i++) {
2583 # resultBuilder.push('0');
2584 # }
2585 # resultBuilder.push(hexString);
2586 # return resultBuilder.join('');
2587 # };
2588 #
2589 # // ...
2590 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2591 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2592 # the final pixel color is defined by the equation:
2593 #
2594 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2595 #
2596 # This means that a value of 1.0 corresponds to a solid color, whereas
2597 # a value of 0.0 corresponds to a completely transparent color. This
2598 # uses a wrapper message rather than a simple float scalar so that it is
2599 # possible to distinguish between a default value and the value being unset.
2600 # If omitted, this color object is to be rendered as a solid color
2601 # (as if the alpha value had been explicitly given with a value of 1.0).
2602 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2603 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2604 },
2605 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002606 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002607 "style": "A String", # The style of the border.
2608 },
2609 "right": { # A border along a cell. # The right border of the cell.
2610 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2611 # for simplicity of conversion to/from color representations in various
2612 # languages over compactness; for example, the fields of this representation
2613 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2614 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2615 # method in iOS; and, with just a little work, it can be easily formatted into
2616 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2617 #
2618 # Example (Java):
2619 #
2620 # import com.google.type.Color;
2621 #
2622 # // ...
2623 # public static java.awt.Color fromProto(Color protocolor) {
2624 # float alpha = protocolor.hasAlpha()
2625 # ? protocolor.getAlpha().getValue()
2626 # : 1.0;
2627 #
2628 # return new java.awt.Color(
2629 # protocolor.getRed(),
2630 # protocolor.getGreen(),
2631 # protocolor.getBlue(),
2632 # alpha);
2633 # }
2634 #
2635 # public static Color toProto(java.awt.Color color) {
2636 # float red = (float) color.getRed();
2637 # float green = (float) color.getGreen();
2638 # float blue = (float) color.getBlue();
2639 # float denominator = 255.0;
2640 # Color.Builder resultBuilder =
2641 # Color
2642 # .newBuilder()
2643 # .setRed(red / denominator)
2644 # .setGreen(green / denominator)
2645 # .setBlue(blue / denominator);
2646 # int alpha = color.getAlpha();
2647 # if (alpha != 255) {
2648 # result.setAlpha(
2649 # FloatValue
2650 # .newBuilder()
2651 # .setValue(((float) alpha) / denominator)
2652 # .build());
2653 # }
2654 # return resultBuilder.build();
2655 # }
2656 # // ...
2657 #
2658 # Example (iOS / Obj-C):
2659 #
2660 # // ...
2661 # static UIColor* fromProto(Color* protocolor) {
2662 # float red = [protocolor red];
2663 # float green = [protocolor green];
2664 # float blue = [protocolor blue];
2665 # FloatValue* alpha_wrapper = [protocolor alpha];
2666 # float alpha = 1.0;
2667 # if (alpha_wrapper != nil) {
2668 # alpha = [alpha_wrapper value];
2669 # }
2670 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2671 # }
2672 #
2673 # static Color* toProto(UIColor* color) {
2674 # CGFloat red, green, blue, alpha;
2675 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2676 # return nil;
2677 # }
2678 # Color* result = [Color alloc] init];
2679 # [result setRed:red];
2680 # [result setGreen:green];
2681 # [result setBlue:blue];
2682 # if (alpha <= 0.9999) {
2683 # [result setAlpha:floatWrapperWithValue(alpha)];
2684 # }
2685 # [result autorelease];
2686 # return result;
2687 # }
2688 # // ...
2689 #
2690 # Example (JavaScript):
2691 #
2692 # // ...
2693 #
2694 # var protoToCssColor = function(rgb_color) {
2695 # var redFrac = rgb_color.red || 0.0;
2696 # var greenFrac = rgb_color.green || 0.0;
2697 # var blueFrac = rgb_color.blue || 0.0;
2698 # var red = Math.floor(redFrac * 255);
2699 # var green = Math.floor(greenFrac * 255);
2700 # var blue = Math.floor(blueFrac * 255);
2701 #
2702 # if (!('alpha' in rgb_color)) {
2703 # return rgbToCssColor_(red, green, blue);
2704 # }
2705 #
2706 # var alphaFrac = rgb_color.alpha.value || 0.0;
2707 # var rgbParams = [red, green, blue].join(',');
2708 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2709 # };
2710 #
2711 # var rgbToCssColor_ = function(red, green, blue) {
2712 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2713 # var hexString = rgbNumber.toString(16);
2714 # var missingZeros = 6 - hexString.length;
2715 # var resultBuilder = ['#'];
2716 # for (var i = 0; i < missingZeros; i++) {
2717 # resultBuilder.push('0');
2718 # }
2719 # resultBuilder.push(hexString);
2720 # return resultBuilder.join('');
2721 # };
2722 #
2723 # // ...
2724 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2725 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2726 # the final pixel color is defined by the equation:
2727 #
2728 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2729 #
2730 # This means that a value of 1.0 corresponds to a solid color, whereas
2731 # a value of 0.0 corresponds to a completely transparent color. This
2732 # uses a wrapper message rather than a simple float scalar so that it is
2733 # possible to distinguish between a default value and the value being unset.
2734 # If omitted, this color object is to be rendered as a solid color
2735 # (as if the alpha value had been explicitly given with a value of 1.0).
2736 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2737 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2738 },
2739 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002740 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002741 "style": "A String", # The style of the border.
2742 },
2743 "bottom": { # A border along a cell. # The bottom border of the cell.
2744 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2745 # for simplicity of conversion to/from color representations in various
2746 # languages over compactness; for example, the fields of this representation
2747 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2748 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2749 # method in iOS; and, with just a little work, it can be easily formatted into
2750 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2751 #
2752 # Example (Java):
2753 #
2754 # import com.google.type.Color;
2755 #
2756 # // ...
2757 # public static java.awt.Color fromProto(Color protocolor) {
2758 # float alpha = protocolor.hasAlpha()
2759 # ? protocolor.getAlpha().getValue()
2760 # : 1.0;
2761 #
2762 # return new java.awt.Color(
2763 # protocolor.getRed(),
2764 # protocolor.getGreen(),
2765 # protocolor.getBlue(),
2766 # alpha);
2767 # }
2768 #
2769 # public static Color toProto(java.awt.Color color) {
2770 # float red = (float) color.getRed();
2771 # float green = (float) color.getGreen();
2772 # float blue = (float) color.getBlue();
2773 # float denominator = 255.0;
2774 # Color.Builder resultBuilder =
2775 # Color
2776 # .newBuilder()
2777 # .setRed(red / denominator)
2778 # .setGreen(green / denominator)
2779 # .setBlue(blue / denominator);
2780 # int alpha = color.getAlpha();
2781 # if (alpha != 255) {
2782 # result.setAlpha(
2783 # FloatValue
2784 # .newBuilder()
2785 # .setValue(((float) alpha) / denominator)
2786 # .build());
2787 # }
2788 # return resultBuilder.build();
2789 # }
2790 # // ...
2791 #
2792 # Example (iOS / Obj-C):
2793 #
2794 # // ...
2795 # static UIColor* fromProto(Color* protocolor) {
2796 # float red = [protocolor red];
2797 # float green = [protocolor green];
2798 # float blue = [protocolor blue];
2799 # FloatValue* alpha_wrapper = [protocolor alpha];
2800 # float alpha = 1.0;
2801 # if (alpha_wrapper != nil) {
2802 # alpha = [alpha_wrapper value];
2803 # }
2804 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2805 # }
2806 #
2807 # static Color* toProto(UIColor* color) {
2808 # CGFloat red, green, blue, alpha;
2809 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2810 # return nil;
2811 # }
2812 # Color* result = [Color alloc] init];
2813 # [result setRed:red];
2814 # [result setGreen:green];
2815 # [result setBlue:blue];
2816 # if (alpha <= 0.9999) {
2817 # [result setAlpha:floatWrapperWithValue(alpha)];
2818 # }
2819 # [result autorelease];
2820 # return result;
2821 # }
2822 # // ...
2823 #
2824 # Example (JavaScript):
2825 #
2826 # // ...
2827 #
2828 # var protoToCssColor = function(rgb_color) {
2829 # var redFrac = rgb_color.red || 0.0;
2830 # var greenFrac = rgb_color.green || 0.0;
2831 # var blueFrac = rgb_color.blue || 0.0;
2832 # var red = Math.floor(redFrac * 255);
2833 # var green = Math.floor(greenFrac * 255);
2834 # var blue = Math.floor(blueFrac * 255);
2835 #
2836 # if (!('alpha' in rgb_color)) {
2837 # return rgbToCssColor_(red, green, blue);
2838 # }
2839 #
2840 # var alphaFrac = rgb_color.alpha.value || 0.0;
2841 # var rgbParams = [red, green, blue].join(',');
2842 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2843 # };
2844 #
2845 # var rgbToCssColor_ = function(red, green, blue) {
2846 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2847 # var hexString = rgbNumber.toString(16);
2848 # var missingZeros = 6 - hexString.length;
2849 # var resultBuilder = ['#'];
2850 # for (var i = 0; i < missingZeros; i++) {
2851 # resultBuilder.push('0');
2852 # }
2853 # resultBuilder.push(hexString);
2854 # return resultBuilder.join('');
2855 # };
2856 #
2857 # // ...
2858 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2859 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2860 # the final pixel color is defined by the equation:
2861 #
2862 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2863 #
2864 # This means that a value of 1.0 corresponds to a solid color, whereas
2865 # a value of 0.0 corresponds to a completely transparent color. This
2866 # uses a wrapper message rather than a simple float scalar so that it is
2867 # possible to distinguish between a default value and the value being unset.
2868 # If omitted, this color object is to be rendered as a solid color
2869 # (as if the alpha value had been explicitly given with a value of 1.0).
2870 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
2871 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
2872 },
2873 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002874 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002875 "style": "A String", # The style of the border.
2876 },
2877 "left": { # A border along a cell. # The left border of the cell.
2878 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
2879 # for simplicity of conversion to/from color representations in various
2880 # languages over compactness; for example, the fields of this representation
2881 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
2882 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
2883 # method in iOS; and, with just a little work, it can be easily formatted into
2884 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
2885 #
2886 # Example (Java):
2887 #
2888 # import com.google.type.Color;
2889 #
2890 # // ...
2891 # public static java.awt.Color fromProto(Color protocolor) {
2892 # float alpha = protocolor.hasAlpha()
2893 # ? protocolor.getAlpha().getValue()
2894 # : 1.0;
2895 #
2896 # return new java.awt.Color(
2897 # protocolor.getRed(),
2898 # protocolor.getGreen(),
2899 # protocolor.getBlue(),
2900 # alpha);
2901 # }
2902 #
2903 # public static Color toProto(java.awt.Color color) {
2904 # float red = (float) color.getRed();
2905 # float green = (float) color.getGreen();
2906 # float blue = (float) color.getBlue();
2907 # float denominator = 255.0;
2908 # Color.Builder resultBuilder =
2909 # Color
2910 # .newBuilder()
2911 # .setRed(red / denominator)
2912 # .setGreen(green / denominator)
2913 # .setBlue(blue / denominator);
2914 # int alpha = color.getAlpha();
2915 # if (alpha != 255) {
2916 # result.setAlpha(
2917 # FloatValue
2918 # .newBuilder()
2919 # .setValue(((float) alpha) / denominator)
2920 # .build());
2921 # }
2922 # return resultBuilder.build();
2923 # }
2924 # // ...
2925 #
2926 # Example (iOS / Obj-C):
2927 #
2928 # // ...
2929 # static UIColor* fromProto(Color* protocolor) {
2930 # float red = [protocolor red];
2931 # float green = [protocolor green];
2932 # float blue = [protocolor blue];
2933 # FloatValue* alpha_wrapper = [protocolor alpha];
2934 # float alpha = 1.0;
2935 # if (alpha_wrapper != nil) {
2936 # alpha = [alpha_wrapper value];
2937 # }
2938 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
2939 # }
2940 #
2941 # static Color* toProto(UIColor* color) {
2942 # CGFloat red, green, blue, alpha;
2943 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
2944 # return nil;
2945 # }
2946 # Color* result = [Color alloc] init];
2947 # [result setRed:red];
2948 # [result setGreen:green];
2949 # [result setBlue:blue];
2950 # if (alpha <= 0.9999) {
2951 # [result setAlpha:floatWrapperWithValue(alpha)];
2952 # }
2953 # [result autorelease];
2954 # return result;
2955 # }
2956 # // ...
2957 #
2958 # Example (JavaScript):
2959 #
2960 # // ...
2961 #
2962 # var protoToCssColor = function(rgb_color) {
2963 # var redFrac = rgb_color.red || 0.0;
2964 # var greenFrac = rgb_color.green || 0.0;
2965 # var blueFrac = rgb_color.blue || 0.0;
2966 # var red = Math.floor(redFrac * 255);
2967 # var green = Math.floor(greenFrac * 255);
2968 # var blue = Math.floor(blueFrac * 255);
2969 #
2970 # if (!('alpha' in rgb_color)) {
2971 # return rgbToCssColor_(red, green, blue);
2972 # }
2973 #
2974 # var alphaFrac = rgb_color.alpha.value || 0.0;
2975 # var rgbParams = [red, green, blue].join(',');
2976 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
2977 # };
2978 #
2979 # var rgbToCssColor_ = function(red, green, blue) {
2980 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
2981 # var hexString = rgbNumber.toString(16);
2982 # var missingZeros = 6 - hexString.length;
2983 # var resultBuilder = ['#'];
2984 # for (var i = 0; i < missingZeros; i++) {
2985 # resultBuilder.push('0');
2986 # }
2987 # resultBuilder.push(hexString);
2988 # return resultBuilder.join('');
2989 # };
2990 #
2991 # // ...
2992 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2993 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
2994 # the final pixel color is defined by the equation:
2995 #
2996 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
2997 #
2998 # This means that a value of 1.0 corresponds to a solid color, whereas
2999 # a value of 0.0 corresponds to a completely transparent color. This
3000 # uses a wrapper message rather than a simple float scalar so that it is
3001 # possible to distinguish between a default value and the value being unset.
3002 # If omitted, this color object is to be rendered as a solid color
3003 # (as if the alpha value had been explicitly given with a value of 1.0).
3004 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3005 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3006 },
3007 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003008 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003009 "style": "A String", # The style of the border.
3010 },
3011 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003012 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
3013 "angle": 42, # The angle between the standard orientation and the desired orientation.
3014 # Measured in degrees. Valid values are between -90 and 90. Positive
3015 # angles are angled upwards, negative are angled downwards.
3016 #
3017 # Note: For LTR text direction positive angles are in the counterclockwise
3018 # direction, whereas for RTL they are in the clockwise direction
3019 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
3020 # characters is unchanged.
3021 # For example:
3022 #
3023 # | V |
3024 # | e |
3025 # | r |
3026 # | t |
3027 # | i |
3028 # | c |
3029 # | a |
3030 # | l |
3031 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003032 },
3033 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
3034 #
3035 # When writing, the new format will be merged with the existing format.
3036 "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 -07003037 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
3038 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003039 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07003040 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003041 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003042 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003043 },
3044 "textDirection": "A String", # The direction of the text in the cell.
3045 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
3046 # When updating padding, every field must be specified.
3047 "top": 42, # The top padding of the cell.
3048 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003049 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003050 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003051 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003052 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003053 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
3054 # for simplicity of conversion to/from color representations in various
3055 # languages over compactness; for example, the fields of this representation
3056 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3057 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3058 # method in iOS; and, with just a little work, it can be easily formatted into
3059 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3060 #
3061 # Example (Java):
3062 #
3063 # import com.google.type.Color;
3064 #
3065 # // ...
3066 # public static java.awt.Color fromProto(Color protocolor) {
3067 # float alpha = protocolor.hasAlpha()
3068 # ? protocolor.getAlpha().getValue()
3069 # : 1.0;
3070 #
3071 # return new java.awt.Color(
3072 # protocolor.getRed(),
3073 # protocolor.getGreen(),
3074 # protocolor.getBlue(),
3075 # alpha);
3076 # }
3077 #
3078 # public static Color toProto(java.awt.Color color) {
3079 # float red = (float) color.getRed();
3080 # float green = (float) color.getGreen();
3081 # float blue = (float) color.getBlue();
3082 # float denominator = 255.0;
3083 # Color.Builder resultBuilder =
3084 # Color
3085 # .newBuilder()
3086 # .setRed(red / denominator)
3087 # .setGreen(green / denominator)
3088 # .setBlue(blue / denominator);
3089 # int alpha = color.getAlpha();
3090 # if (alpha != 255) {
3091 # result.setAlpha(
3092 # FloatValue
3093 # .newBuilder()
3094 # .setValue(((float) alpha) / denominator)
3095 # .build());
3096 # }
3097 # return resultBuilder.build();
3098 # }
3099 # // ...
3100 #
3101 # Example (iOS / Obj-C):
3102 #
3103 # // ...
3104 # static UIColor* fromProto(Color* protocolor) {
3105 # float red = [protocolor red];
3106 # float green = [protocolor green];
3107 # float blue = [protocolor blue];
3108 # FloatValue* alpha_wrapper = [protocolor alpha];
3109 # float alpha = 1.0;
3110 # if (alpha_wrapper != nil) {
3111 # alpha = [alpha_wrapper value];
3112 # }
3113 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3114 # }
3115 #
3116 # static Color* toProto(UIColor* color) {
3117 # CGFloat red, green, blue, alpha;
3118 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3119 # return nil;
3120 # }
3121 # Color* result = [Color alloc] init];
3122 # [result setRed:red];
3123 # [result setGreen:green];
3124 # [result setBlue:blue];
3125 # if (alpha <= 0.9999) {
3126 # [result setAlpha:floatWrapperWithValue(alpha)];
3127 # }
3128 # [result autorelease];
3129 # return result;
3130 # }
3131 # // ...
3132 #
3133 # Example (JavaScript):
3134 #
3135 # // ...
3136 #
3137 # var protoToCssColor = function(rgb_color) {
3138 # var redFrac = rgb_color.red || 0.0;
3139 # var greenFrac = rgb_color.green || 0.0;
3140 # var blueFrac = rgb_color.blue || 0.0;
3141 # var red = Math.floor(redFrac * 255);
3142 # var green = Math.floor(greenFrac * 255);
3143 # var blue = Math.floor(blueFrac * 255);
3144 #
3145 # if (!('alpha' in rgb_color)) {
3146 # return rgbToCssColor_(red, green, blue);
3147 # }
3148 #
3149 # var alphaFrac = rgb_color.alpha.value || 0.0;
3150 # var rgbParams = [red, green, blue].join(',');
3151 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3152 # };
3153 #
3154 # var rgbToCssColor_ = function(red, green, blue) {
3155 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3156 # var hexString = rgbNumber.toString(16);
3157 # var missingZeros = 6 - hexString.length;
3158 # var resultBuilder = ['#'];
3159 # for (var i = 0; i < missingZeros; i++) {
3160 # resultBuilder.push('0');
3161 # }
3162 # resultBuilder.push(hexString);
3163 # return resultBuilder.join('');
3164 # };
3165 #
3166 # // ...
3167 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3168 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3169 # the final pixel color is defined by the equation:
3170 #
3171 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3172 #
3173 # This means that a value of 1.0 corresponds to a solid color, whereas
3174 # a value of 0.0 corresponds to a completely transparent color. This
3175 # uses a wrapper message rather than a simple float scalar so that it is
3176 # possible to distinguish between a default value and the value being unset.
3177 # If omitted, this color object is to be rendered as a solid color
3178 # (as if the alpha value had been explicitly given with a value of 1.0).
3179 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3180 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3181 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003182 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003183 "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).
3184 # Absent values indicate that the field isn't specified.
3185 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3186 # for simplicity of conversion to/from color representations in various
3187 # languages over compactness; for example, the fields of this representation
3188 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3189 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3190 # method in iOS; and, with just a little work, it can be easily formatted into
3191 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3192 #
3193 # Example (Java):
3194 #
3195 # import com.google.type.Color;
3196 #
3197 # // ...
3198 # public static java.awt.Color fromProto(Color protocolor) {
3199 # float alpha = protocolor.hasAlpha()
3200 # ? protocolor.getAlpha().getValue()
3201 # : 1.0;
3202 #
3203 # return new java.awt.Color(
3204 # protocolor.getRed(),
3205 # protocolor.getGreen(),
3206 # protocolor.getBlue(),
3207 # alpha);
3208 # }
3209 #
3210 # public static Color toProto(java.awt.Color color) {
3211 # float red = (float) color.getRed();
3212 # float green = (float) color.getGreen();
3213 # float blue = (float) color.getBlue();
3214 # float denominator = 255.0;
3215 # Color.Builder resultBuilder =
3216 # Color
3217 # .newBuilder()
3218 # .setRed(red / denominator)
3219 # .setGreen(green / denominator)
3220 # .setBlue(blue / denominator);
3221 # int alpha = color.getAlpha();
3222 # if (alpha != 255) {
3223 # result.setAlpha(
3224 # FloatValue
3225 # .newBuilder()
3226 # .setValue(((float) alpha) / denominator)
3227 # .build());
3228 # }
3229 # return resultBuilder.build();
3230 # }
3231 # // ...
3232 #
3233 # Example (iOS / Obj-C):
3234 #
3235 # // ...
3236 # static UIColor* fromProto(Color* protocolor) {
3237 # float red = [protocolor red];
3238 # float green = [protocolor green];
3239 # float blue = [protocolor blue];
3240 # FloatValue* alpha_wrapper = [protocolor alpha];
3241 # float alpha = 1.0;
3242 # if (alpha_wrapper != nil) {
3243 # alpha = [alpha_wrapper value];
3244 # }
3245 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3246 # }
3247 #
3248 # static Color* toProto(UIColor* color) {
3249 # CGFloat red, green, blue, alpha;
3250 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3251 # return nil;
3252 # }
3253 # Color* result = [Color alloc] init];
3254 # [result setRed:red];
3255 # [result setGreen:green];
3256 # [result setBlue:blue];
3257 # if (alpha <= 0.9999) {
3258 # [result setAlpha:floatWrapperWithValue(alpha)];
3259 # }
3260 # [result autorelease];
3261 # return result;
3262 # }
3263 # // ...
3264 #
3265 # Example (JavaScript):
3266 #
3267 # // ...
3268 #
3269 # var protoToCssColor = function(rgb_color) {
3270 # var redFrac = rgb_color.red || 0.0;
3271 # var greenFrac = rgb_color.green || 0.0;
3272 # var blueFrac = rgb_color.blue || 0.0;
3273 # var red = Math.floor(redFrac * 255);
3274 # var green = Math.floor(greenFrac * 255);
3275 # var blue = Math.floor(blueFrac * 255);
3276 #
3277 # if (!('alpha' in rgb_color)) {
3278 # return rgbToCssColor_(red, green, blue);
3279 # }
3280 #
3281 # var alphaFrac = rgb_color.alpha.value || 0.0;
3282 # var rgbParams = [red, green, blue].join(',');
3283 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3284 # };
3285 #
3286 # var rgbToCssColor_ = function(red, green, blue) {
3287 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3288 # var hexString = rgbNumber.toString(16);
3289 # var missingZeros = 6 - hexString.length;
3290 # var resultBuilder = ['#'];
3291 # for (var i = 0; i < missingZeros; i++) {
3292 # resultBuilder.push('0');
3293 # }
3294 # resultBuilder.push(hexString);
3295 # return resultBuilder.join('');
3296 # };
3297 #
3298 # // ...
3299 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3300 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3301 # the final pixel color is defined by the equation:
3302 #
3303 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3304 #
3305 # This means that a value of 1.0 corresponds to a solid color, whereas
3306 # a value of 0.0 corresponds to a completely transparent color. This
3307 # uses a wrapper message rather than a simple float scalar so that it is
3308 # possible to distinguish between a default value and the value being unset.
3309 # If omitted, this color object is to be rendered as a solid color
3310 # (as if the alpha value had been explicitly given with a value of 1.0).
3311 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3312 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3313 },
3314 "bold": True or False, # True if the text is bold.
3315 "strikethrough": True or False, # True if the text has a strikethrough.
3316 "fontFamily": "A String", # The font family.
3317 "fontSize": 42, # The size of the font.
3318 "italic": True or False, # True if the text is italicized.
3319 "underline": True or False, # True if the text is underlined.
3320 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003321 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003322 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
3323 "borders": { # The borders of the cell. # The borders of the cell.
3324 "top": { # A border along a cell. # The top border of the cell.
3325 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3326 # for simplicity of conversion to/from color representations in various
3327 # languages over compactness; for example, the fields of this representation
3328 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3329 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3330 # method in iOS; and, with just a little work, it can be easily formatted into
3331 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3332 #
3333 # Example (Java):
3334 #
3335 # import com.google.type.Color;
3336 #
3337 # // ...
3338 # public static java.awt.Color fromProto(Color protocolor) {
3339 # float alpha = protocolor.hasAlpha()
3340 # ? protocolor.getAlpha().getValue()
3341 # : 1.0;
3342 #
3343 # return new java.awt.Color(
3344 # protocolor.getRed(),
3345 # protocolor.getGreen(),
3346 # protocolor.getBlue(),
3347 # alpha);
3348 # }
3349 #
3350 # public static Color toProto(java.awt.Color color) {
3351 # float red = (float) color.getRed();
3352 # float green = (float) color.getGreen();
3353 # float blue = (float) color.getBlue();
3354 # float denominator = 255.0;
3355 # Color.Builder resultBuilder =
3356 # Color
3357 # .newBuilder()
3358 # .setRed(red / denominator)
3359 # .setGreen(green / denominator)
3360 # .setBlue(blue / denominator);
3361 # int alpha = color.getAlpha();
3362 # if (alpha != 255) {
3363 # result.setAlpha(
3364 # FloatValue
3365 # .newBuilder()
3366 # .setValue(((float) alpha) / denominator)
3367 # .build());
3368 # }
3369 # return resultBuilder.build();
3370 # }
3371 # // ...
3372 #
3373 # Example (iOS / Obj-C):
3374 #
3375 # // ...
3376 # static UIColor* fromProto(Color* protocolor) {
3377 # float red = [protocolor red];
3378 # float green = [protocolor green];
3379 # float blue = [protocolor blue];
3380 # FloatValue* alpha_wrapper = [protocolor alpha];
3381 # float alpha = 1.0;
3382 # if (alpha_wrapper != nil) {
3383 # alpha = [alpha_wrapper value];
3384 # }
3385 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3386 # }
3387 #
3388 # static Color* toProto(UIColor* color) {
3389 # CGFloat red, green, blue, alpha;
3390 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3391 # return nil;
3392 # }
3393 # Color* result = [Color alloc] init];
3394 # [result setRed:red];
3395 # [result setGreen:green];
3396 # [result setBlue:blue];
3397 # if (alpha <= 0.9999) {
3398 # [result setAlpha:floatWrapperWithValue(alpha)];
3399 # }
3400 # [result autorelease];
3401 # return result;
3402 # }
3403 # // ...
3404 #
3405 # Example (JavaScript):
3406 #
3407 # // ...
3408 #
3409 # var protoToCssColor = function(rgb_color) {
3410 # var redFrac = rgb_color.red || 0.0;
3411 # var greenFrac = rgb_color.green || 0.0;
3412 # var blueFrac = rgb_color.blue || 0.0;
3413 # var red = Math.floor(redFrac * 255);
3414 # var green = Math.floor(greenFrac * 255);
3415 # var blue = Math.floor(blueFrac * 255);
3416 #
3417 # if (!('alpha' in rgb_color)) {
3418 # return rgbToCssColor_(red, green, blue);
3419 # }
3420 #
3421 # var alphaFrac = rgb_color.alpha.value || 0.0;
3422 # var rgbParams = [red, green, blue].join(',');
3423 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3424 # };
3425 #
3426 # var rgbToCssColor_ = function(red, green, blue) {
3427 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3428 # var hexString = rgbNumber.toString(16);
3429 # var missingZeros = 6 - hexString.length;
3430 # var resultBuilder = ['#'];
3431 # for (var i = 0; i < missingZeros; i++) {
3432 # resultBuilder.push('0');
3433 # }
3434 # resultBuilder.push(hexString);
3435 # return resultBuilder.join('');
3436 # };
3437 #
3438 # // ...
3439 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3440 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3441 # the final pixel color is defined by the equation:
3442 #
3443 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3444 #
3445 # This means that a value of 1.0 corresponds to a solid color, whereas
3446 # a value of 0.0 corresponds to a completely transparent color. This
3447 # uses a wrapper message rather than a simple float scalar so that it is
3448 # possible to distinguish between a default value and the value being unset.
3449 # If omitted, this color object is to be rendered as a solid color
3450 # (as if the alpha value had been explicitly given with a value of 1.0).
3451 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3452 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3453 },
3454 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003455 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003456 "style": "A String", # The style of the border.
3457 },
3458 "right": { # A border along a cell. # The right border of the cell.
3459 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3460 # for simplicity of conversion to/from color representations in various
3461 # languages over compactness; for example, the fields of this representation
3462 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3463 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3464 # method in iOS; and, with just a little work, it can be easily formatted into
3465 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3466 #
3467 # Example (Java):
3468 #
3469 # import com.google.type.Color;
3470 #
3471 # // ...
3472 # public static java.awt.Color fromProto(Color protocolor) {
3473 # float alpha = protocolor.hasAlpha()
3474 # ? protocolor.getAlpha().getValue()
3475 # : 1.0;
3476 #
3477 # return new java.awt.Color(
3478 # protocolor.getRed(),
3479 # protocolor.getGreen(),
3480 # protocolor.getBlue(),
3481 # alpha);
3482 # }
3483 #
3484 # public static Color toProto(java.awt.Color color) {
3485 # float red = (float) color.getRed();
3486 # float green = (float) color.getGreen();
3487 # float blue = (float) color.getBlue();
3488 # float denominator = 255.0;
3489 # Color.Builder resultBuilder =
3490 # Color
3491 # .newBuilder()
3492 # .setRed(red / denominator)
3493 # .setGreen(green / denominator)
3494 # .setBlue(blue / denominator);
3495 # int alpha = color.getAlpha();
3496 # if (alpha != 255) {
3497 # result.setAlpha(
3498 # FloatValue
3499 # .newBuilder()
3500 # .setValue(((float) alpha) / denominator)
3501 # .build());
3502 # }
3503 # return resultBuilder.build();
3504 # }
3505 # // ...
3506 #
3507 # Example (iOS / Obj-C):
3508 #
3509 # // ...
3510 # static UIColor* fromProto(Color* protocolor) {
3511 # float red = [protocolor red];
3512 # float green = [protocolor green];
3513 # float blue = [protocolor blue];
3514 # FloatValue* alpha_wrapper = [protocolor alpha];
3515 # float alpha = 1.0;
3516 # if (alpha_wrapper != nil) {
3517 # alpha = [alpha_wrapper value];
3518 # }
3519 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3520 # }
3521 #
3522 # static Color* toProto(UIColor* color) {
3523 # CGFloat red, green, blue, alpha;
3524 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3525 # return nil;
3526 # }
3527 # Color* result = [Color alloc] init];
3528 # [result setRed:red];
3529 # [result setGreen:green];
3530 # [result setBlue:blue];
3531 # if (alpha <= 0.9999) {
3532 # [result setAlpha:floatWrapperWithValue(alpha)];
3533 # }
3534 # [result autorelease];
3535 # return result;
3536 # }
3537 # // ...
3538 #
3539 # Example (JavaScript):
3540 #
3541 # // ...
3542 #
3543 # var protoToCssColor = function(rgb_color) {
3544 # var redFrac = rgb_color.red || 0.0;
3545 # var greenFrac = rgb_color.green || 0.0;
3546 # var blueFrac = rgb_color.blue || 0.0;
3547 # var red = Math.floor(redFrac * 255);
3548 # var green = Math.floor(greenFrac * 255);
3549 # var blue = Math.floor(blueFrac * 255);
3550 #
3551 # if (!('alpha' in rgb_color)) {
3552 # return rgbToCssColor_(red, green, blue);
3553 # }
3554 #
3555 # var alphaFrac = rgb_color.alpha.value || 0.0;
3556 # var rgbParams = [red, green, blue].join(',');
3557 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3558 # };
3559 #
3560 # var rgbToCssColor_ = function(red, green, blue) {
3561 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3562 # var hexString = rgbNumber.toString(16);
3563 # var missingZeros = 6 - hexString.length;
3564 # var resultBuilder = ['#'];
3565 # for (var i = 0; i < missingZeros; i++) {
3566 # resultBuilder.push('0');
3567 # }
3568 # resultBuilder.push(hexString);
3569 # return resultBuilder.join('');
3570 # };
3571 #
3572 # // ...
3573 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3574 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3575 # the final pixel color is defined by the equation:
3576 #
3577 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3578 #
3579 # This means that a value of 1.0 corresponds to a solid color, whereas
3580 # a value of 0.0 corresponds to a completely transparent color. This
3581 # uses a wrapper message rather than a simple float scalar so that it is
3582 # possible to distinguish between a default value and the value being unset.
3583 # If omitted, this color object is to be rendered as a solid color
3584 # (as if the alpha value had been explicitly given with a value of 1.0).
3585 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3586 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3587 },
3588 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003589 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003590 "style": "A String", # The style of the border.
3591 },
3592 "bottom": { # A border along a cell. # The bottom border of the cell.
3593 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3594 # for simplicity of conversion to/from color representations in various
3595 # languages over compactness; for example, the fields of this representation
3596 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3597 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3598 # method in iOS; and, with just a little work, it can be easily formatted into
3599 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3600 #
3601 # Example (Java):
3602 #
3603 # import com.google.type.Color;
3604 #
3605 # // ...
3606 # public static java.awt.Color fromProto(Color protocolor) {
3607 # float alpha = protocolor.hasAlpha()
3608 # ? protocolor.getAlpha().getValue()
3609 # : 1.0;
3610 #
3611 # return new java.awt.Color(
3612 # protocolor.getRed(),
3613 # protocolor.getGreen(),
3614 # protocolor.getBlue(),
3615 # alpha);
3616 # }
3617 #
3618 # public static Color toProto(java.awt.Color color) {
3619 # float red = (float) color.getRed();
3620 # float green = (float) color.getGreen();
3621 # float blue = (float) color.getBlue();
3622 # float denominator = 255.0;
3623 # Color.Builder resultBuilder =
3624 # Color
3625 # .newBuilder()
3626 # .setRed(red / denominator)
3627 # .setGreen(green / denominator)
3628 # .setBlue(blue / denominator);
3629 # int alpha = color.getAlpha();
3630 # if (alpha != 255) {
3631 # result.setAlpha(
3632 # FloatValue
3633 # .newBuilder()
3634 # .setValue(((float) alpha) / denominator)
3635 # .build());
3636 # }
3637 # return resultBuilder.build();
3638 # }
3639 # // ...
3640 #
3641 # Example (iOS / Obj-C):
3642 #
3643 # // ...
3644 # static UIColor* fromProto(Color* protocolor) {
3645 # float red = [protocolor red];
3646 # float green = [protocolor green];
3647 # float blue = [protocolor blue];
3648 # FloatValue* alpha_wrapper = [protocolor alpha];
3649 # float alpha = 1.0;
3650 # if (alpha_wrapper != nil) {
3651 # alpha = [alpha_wrapper value];
3652 # }
3653 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3654 # }
3655 #
3656 # static Color* toProto(UIColor* color) {
3657 # CGFloat red, green, blue, alpha;
3658 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3659 # return nil;
3660 # }
3661 # Color* result = [Color alloc] init];
3662 # [result setRed:red];
3663 # [result setGreen:green];
3664 # [result setBlue:blue];
3665 # if (alpha <= 0.9999) {
3666 # [result setAlpha:floatWrapperWithValue(alpha)];
3667 # }
3668 # [result autorelease];
3669 # return result;
3670 # }
3671 # // ...
3672 #
3673 # Example (JavaScript):
3674 #
3675 # // ...
3676 #
3677 # var protoToCssColor = function(rgb_color) {
3678 # var redFrac = rgb_color.red || 0.0;
3679 # var greenFrac = rgb_color.green || 0.0;
3680 # var blueFrac = rgb_color.blue || 0.0;
3681 # var red = Math.floor(redFrac * 255);
3682 # var green = Math.floor(greenFrac * 255);
3683 # var blue = Math.floor(blueFrac * 255);
3684 #
3685 # if (!('alpha' in rgb_color)) {
3686 # return rgbToCssColor_(red, green, blue);
3687 # }
3688 #
3689 # var alphaFrac = rgb_color.alpha.value || 0.0;
3690 # var rgbParams = [red, green, blue].join(',');
3691 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3692 # };
3693 #
3694 # var rgbToCssColor_ = function(red, green, blue) {
3695 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3696 # var hexString = rgbNumber.toString(16);
3697 # var missingZeros = 6 - hexString.length;
3698 # var resultBuilder = ['#'];
3699 # for (var i = 0; i < missingZeros; i++) {
3700 # resultBuilder.push('0');
3701 # }
3702 # resultBuilder.push(hexString);
3703 # return resultBuilder.join('');
3704 # };
3705 #
3706 # // ...
3707 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3708 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3709 # the final pixel color is defined by the equation:
3710 #
3711 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3712 #
3713 # This means that a value of 1.0 corresponds to a solid color, whereas
3714 # a value of 0.0 corresponds to a completely transparent color. This
3715 # uses a wrapper message rather than a simple float scalar so that it is
3716 # possible to distinguish between a default value and the value being unset.
3717 # If omitted, this color object is to be rendered as a solid color
3718 # (as if the alpha value had been explicitly given with a value of 1.0).
3719 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3720 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3721 },
3722 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003723 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003724 "style": "A String", # The style of the border.
3725 },
3726 "left": { # A border along a cell. # The left border of the cell.
3727 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
3728 # for simplicity of conversion to/from color representations in various
3729 # languages over compactness; for example, the fields of this representation
3730 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3731 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3732 # method in iOS; and, with just a little work, it can be easily formatted into
3733 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3734 #
3735 # Example (Java):
3736 #
3737 # import com.google.type.Color;
3738 #
3739 # // ...
3740 # public static java.awt.Color fromProto(Color protocolor) {
3741 # float alpha = protocolor.hasAlpha()
3742 # ? protocolor.getAlpha().getValue()
3743 # : 1.0;
3744 #
3745 # return new java.awt.Color(
3746 # protocolor.getRed(),
3747 # protocolor.getGreen(),
3748 # protocolor.getBlue(),
3749 # alpha);
3750 # }
3751 #
3752 # public static Color toProto(java.awt.Color color) {
3753 # float red = (float) color.getRed();
3754 # float green = (float) color.getGreen();
3755 # float blue = (float) color.getBlue();
3756 # float denominator = 255.0;
3757 # Color.Builder resultBuilder =
3758 # Color
3759 # .newBuilder()
3760 # .setRed(red / denominator)
3761 # .setGreen(green / denominator)
3762 # .setBlue(blue / denominator);
3763 # int alpha = color.getAlpha();
3764 # if (alpha != 255) {
3765 # result.setAlpha(
3766 # FloatValue
3767 # .newBuilder()
3768 # .setValue(((float) alpha) / denominator)
3769 # .build());
3770 # }
3771 # return resultBuilder.build();
3772 # }
3773 # // ...
3774 #
3775 # Example (iOS / Obj-C):
3776 #
3777 # // ...
3778 # static UIColor* fromProto(Color* protocolor) {
3779 # float red = [protocolor red];
3780 # float green = [protocolor green];
3781 # float blue = [protocolor blue];
3782 # FloatValue* alpha_wrapper = [protocolor alpha];
3783 # float alpha = 1.0;
3784 # if (alpha_wrapper != nil) {
3785 # alpha = [alpha_wrapper value];
3786 # }
3787 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3788 # }
3789 #
3790 # static Color* toProto(UIColor* color) {
3791 # CGFloat red, green, blue, alpha;
3792 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3793 # return nil;
3794 # }
3795 # Color* result = [Color alloc] init];
3796 # [result setRed:red];
3797 # [result setGreen:green];
3798 # [result setBlue:blue];
3799 # if (alpha <= 0.9999) {
3800 # [result setAlpha:floatWrapperWithValue(alpha)];
3801 # }
3802 # [result autorelease];
3803 # return result;
3804 # }
3805 # // ...
3806 #
3807 # Example (JavaScript):
3808 #
3809 # // ...
3810 #
3811 # var protoToCssColor = function(rgb_color) {
3812 # var redFrac = rgb_color.red || 0.0;
3813 # var greenFrac = rgb_color.green || 0.0;
3814 # var blueFrac = rgb_color.blue || 0.0;
3815 # var red = Math.floor(redFrac * 255);
3816 # var green = Math.floor(greenFrac * 255);
3817 # var blue = Math.floor(blueFrac * 255);
3818 #
3819 # if (!('alpha' in rgb_color)) {
3820 # return rgbToCssColor_(red, green, blue);
3821 # }
3822 #
3823 # var alphaFrac = rgb_color.alpha.value || 0.0;
3824 # var rgbParams = [red, green, blue].join(',');
3825 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
3826 # };
3827 #
3828 # var rgbToCssColor_ = function(red, green, blue) {
3829 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
3830 # var hexString = rgbNumber.toString(16);
3831 # var missingZeros = 6 - hexString.length;
3832 # var resultBuilder = ['#'];
3833 # for (var i = 0; i < missingZeros; i++) {
3834 # resultBuilder.push('0');
3835 # }
3836 # resultBuilder.push(hexString);
3837 # return resultBuilder.join('');
3838 # };
3839 #
3840 # // ...
3841 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3842 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
3843 # the final pixel color is defined by the equation:
3844 #
3845 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
3846 #
3847 # This means that a value of 1.0 corresponds to a solid color, whereas
3848 # a value of 0.0 corresponds to a completely transparent color. This
3849 # uses a wrapper message rather than a simple float scalar so that it is
3850 # possible to distinguish between a default value and the value being unset.
3851 # If omitted, this color object is to be rendered as a solid color
3852 # (as if the alpha value had been explicitly given with a value of 1.0).
3853 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
3854 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
3855 },
3856 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003857 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003858 "style": "A String", # The style of the border.
3859 },
3860 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003861 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
3862 "angle": 42, # The angle between the standard orientation and the desired orientation.
3863 # Measured in degrees. Valid values are between -90 and 90. Positive
3864 # angles are angled upwards, negative are angled downwards.
3865 #
3866 # Note: For LTR text direction positive angles are in the counterclockwise
3867 # direction, whereas for RTL they are in the clockwise direction
3868 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
3869 # characters is unchanged.
3870 # For example:
3871 #
3872 # | V |
3873 # | e |
3874 # | r |
3875 # | t |
3876 # | i |
3877 # | c |
3878 # | a |
3879 # | l |
3880 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003881 },
3882 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
3883 #
3884 # When writing, the new data validation rule will overwrite any prior rule.
3885 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
3886 # If true, "List" conditions will show a dropdown.
3887 "strict": True or False, # True if invalid data should be rejected.
3888 "inputMessage": "A String", # A message to show the user when adding data to the cell.
3889 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
3890 # BooleanConditions are used by conditional formatting,
3891 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003892 "values": [ # The values of the condition. The number of supported values depends
3893 # on the condition type. Some support zero values,
3894 # others one or two values,
3895 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
3896 { # The value of the condition.
3897 "relativeDate": "A String", # A relative date (based on the current date).
3898 # Valid only if the type is
3899 # DATE_BEFORE,
3900 # DATE_AFTER,
3901 # DATE_ON_OR_BEFORE or
3902 # DATE_ON_OR_AFTER.
3903 #
3904 # Relative dates are not supported in data validation.
3905 # They are supported only in conditional formatting and
3906 # conditional filters.
3907 "userEnteredValue": "A String", # A value the condition is based on.
3908 # The value will be parsed as if the user typed into a cell.
3909 # Formulas are supported (and must begin with an `=`).
3910 },
3911 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003912 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003913 },
3914 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003915 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
3916 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003917 # Runs start at specific indexes in the text and continue until the next
3918 # run. Properties of a run will continue unless explicitly changed
3919 # in a subsequent run (and properties of the first run will continue
3920 # the properties of the cell unless explicitly changed).
3921 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07003922 # When writing, the new runs will overwrite any prior runs. When writing a
3923 # new user_entered_value, previous runs will be erased.
3924 { # A run of a text format. The format of this run continues until the start
3925 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003926 # When updating, all fields must be set.
3927 "startIndex": 42, # The character index where this run starts.
3928 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
3929 # Absent values indicate that the field isn't specified.
3930 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
3931 # for simplicity of conversion to/from color representations in various
3932 # languages over compactness; for example, the fields of this representation
3933 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
3934 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3935 # method in iOS; and, with just a little work, it can be easily formatted into
3936 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
3937 #
3938 # Example (Java):
3939 #
3940 # import com.google.type.Color;
3941 #
3942 # // ...
3943 # public static java.awt.Color fromProto(Color protocolor) {
3944 # float alpha = protocolor.hasAlpha()
3945 # ? protocolor.getAlpha().getValue()
3946 # : 1.0;
3947 #
3948 # return new java.awt.Color(
3949 # protocolor.getRed(),
3950 # protocolor.getGreen(),
3951 # protocolor.getBlue(),
3952 # alpha);
3953 # }
3954 #
3955 # public static Color toProto(java.awt.Color color) {
3956 # float red = (float) color.getRed();
3957 # float green = (float) color.getGreen();
3958 # float blue = (float) color.getBlue();
3959 # float denominator = 255.0;
3960 # Color.Builder resultBuilder =
3961 # Color
3962 # .newBuilder()
3963 # .setRed(red / denominator)
3964 # .setGreen(green / denominator)
3965 # .setBlue(blue / denominator);
3966 # int alpha = color.getAlpha();
3967 # if (alpha != 255) {
3968 # result.setAlpha(
3969 # FloatValue
3970 # .newBuilder()
3971 # .setValue(((float) alpha) / denominator)
3972 # .build());
3973 # }
3974 # return resultBuilder.build();
3975 # }
3976 # // ...
3977 #
3978 # Example (iOS / Obj-C):
3979 #
3980 # // ...
3981 # static UIColor* fromProto(Color* protocolor) {
3982 # float red = [protocolor red];
3983 # float green = [protocolor green];
3984 # float blue = [protocolor blue];
3985 # FloatValue* alpha_wrapper = [protocolor alpha];
3986 # float alpha = 1.0;
3987 # if (alpha_wrapper != nil) {
3988 # alpha = [alpha_wrapper value];
3989 # }
3990 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
3991 # }
3992 #
3993 # static Color* toProto(UIColor* color) {
3994 # CGFloat red, green, blue, alpha;
3995 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
3996 # return nil;
3997 # }
3998 # Color* result = [Color alloc] init];
3999 # [result setRed:red];
4000 # [result setGreen:green];
4001 # [result setBlue:blue];
4002 # if (alpha <= 0.9999) {
4003 # [result setAlpha:floatWrapperWithValue(alpha)];
4004 # }
4005 # [result autorelease];
4006 # return result;
4007 # }
4008 # // ...
4009 #
4010 # Example (JavaScript):
4011 #
4012 # // ...
4013 #
4014 # var protoToCssColor = function(rgb_color) {
4015 # var redFrac = rgb_color.red || 0.0;
4016 # var greenFrac = rgb_color.green || 0.0;
4017 # var blueFrac = rgb_color.blue || 0.0;
4018 # var red = Math.floor(redFrac * 255);
4019 # var green = Math.floor(greenFrac * 255);
4020 # var blue = Math.floor(blueFrac * 255);
4021 #
4022 # if (!('alpha' in rgb_color)) {
4023 # return rgbToCssColor_(red, green, blue);
4024 # }
4025 #
4026 # var alphaFrac = rgb_color.alpha.value || 0.0;
4027 # var rgbParams = [red, green, blue].join(',');
4028 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4029 # };
4030 #
4031 # var rgbToCssColor_ = function(red, green, blue) {
4032 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4033 # var hexString = rgbNumber.toString(16);
4034 # var missingZeros = 6 - hexString.length;
4035 # var resultBuilder = ['#'];
4036 # for (var i = 0; i < missingZeros; i++) {
4037 # resultBuilder.push('0');
4038 # }
4039 # resultBuilder.push(hexString);
4040 # return resultBuilder.join('');
4041 # };
4042 #
4043 # // ...
4044 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4045 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4046 # the final pixel color is defined by the equation:
4047 #
4048 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4049 #
4050 # This means that a value of 1.0 corresponds to a solid color, whereas
4051 # a value of 0.0 corresponds to a completely transparent color. This
4052 # uses a wrapper message rather than a simple float scalar so that it is
4053 # possible to distinguish between a default value and the value being unset.
4054 # If omitted, this color object is to be rendered as a solid color
4055 # (as if the alpha value had been explicitly given with a value of 1.0).
4056 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4057 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4058 },
4059 "bold": True or False, # True if the text is bold.
4060 "strikethrough": True or False, # True if the text has a strikethrough.
4061 "fontFamily": "A String", # The font family.
4062 "fontSize": 42, # The size of the font.
4063 "italic": True or False, # True if the text is italicized.
4064 "underline": True or False, # True if the text is underlined.
4065 },
4066 },
4067 ],
4068 },
4069 ],
4070 },
4071 ],
4072 "sheetId": 42, # The sheet ID to append the data to.
4073 },
4074 "duplicateSheet": { # Duplicates the contents of a sheet. # Duplicates a sheet.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004075 "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 -07004076 "insertSheetIndex": 42, # The zero-based index where the new sheet should be inserted.
4077 # The index of all sheets after this are incremented.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004078 "sourceSheetId": 42, # The sheet to duplicate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004079 "newSheetId": 42, # If set, the ID of the new sheet. If not set, an ID is chosen.
4080 # If set, the ID must not conflict with any existing sheet ID.
4081 # If set, it must be non-negative.
4082 },
4083 "updateSheetProperties": { # Updates properties of the sheet with the specified # Updates a sheet's properties.
4084 # sheetId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004085 "fields": "A String", # The fields that should be updated. At least one field must be specified.
4086 # The root `properties` is implied and should not be specified.
4087 # A single `"*"` can be used as short-hand for listing every field.
4088 "properties": { # Properties of a sheet. # The properties to update.
4089 "sheetType": "A String", # The type of sheet. Defaults to GRID.
4090 # This field cannot be changed once set.
4091 "index": 42, # The index of the sheet within the spreadsheet.
4092 # When adding or updating sheet properties, if this field
4093 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004094 # of the sheet list. When updating sheet indices or inserting
4095 # sheets, movement is considered in "before the move" indexes.
4096 # For example, if there were 3 sheets (S1, S2, S3) in order to
4097 # move S1 ahead of S2 the index would have to be set to 2. A sheet
4098 # index update request will be ignored if the requested index is
4099 # identical to the sheets current index or if the requested new
4100 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004101 "title": "A String", # The name of the sheet.
4102 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
4103 # (If the sheet is an object sheet, containing a chart or image, then
4104 # this field will be absent.)
4105 # When writing it is an error to set any grid properties on non-grid sheets.
4106 "columnCount": 42, # The number of columns in the grid.
4107 "rowCount": 42, # The number of rows in the grid.
4108 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
4109 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
4110 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
4111 },
4112 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
4113 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
4114 # for simplicity of conversion to/from color representations in various
4115 # languages over compactness; for example, the fields of this representation
4116 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4117 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4118 # method in iOS; and, with just a little work, it can be easily formatted into
4119 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4120 #
4121 # Example (Java):
4122 #
4123 # import com.google.type.Color;
4124 #
4125 # // ...
4126 # public static java.awt.Color fromProto(Color protocolor) {
4127 # float alpha = protocolor.hasAlpha()
4128 # ? protocolor.getAlpha().getValue()
4129 # : 1.0;
4130 #
4131 # return new java.awt.Color(
4132 # protocolor.getRed(),
4133 # protocolor.getGreen(),
4134 # protocolor.getBlue(),
4135 # alpha);
4136 # }
4137 #
4138 # public static Color toProto(java.awt.Color color) {
4139 # float red = (float) color.getRed();
4140 # float green = (float) color.getGreen();
4141 # float blue = (float) color.getBlue();
4142 # float denominator = 255.0;
4143 # Color.Builder resultBuilder =
4144 # Color
4145 # .newBuilder()
4146 # .setRed(red / denominator)
4147 # .setGreen(green / denominator)
4148 # .setBlue(blue / denominator);
4149 # int alpha = color.getAlpha();
4150 # if (alpha != 255) {
4151 # result.setAlpha(
4152 # FloatValue
4153 # .newBuilder()
4154 # .setValue(((float) alpha) / denominator)
4155 # .build());
4156 # }
4157 # return resultBuilder.build();
4158 # }
4159 # // ...
4160 #
4161 # Example (iOS / Obj-C):
4162 #
4163 # // ...
4164 # static UIColor* fromProto(Color* protocolor) {
4165 # float red = [protocolor red];
4166 # float green = [protocolor green];
4167 # float blue = [protocolor blue];
4168 # FloatValue* alpha_wrapper = [protocolor alpha];
4169 # float alpha = 1.0;
4170 # if (alpha_wrapper != nil) {
4171 # alpha = [alpha_wrapper value];
4172 # }
4173 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4174 # }
4175 #
4176 # static Color* toProto(UIColor* color) {
4177 # CGFloat red, green, blue, alpha;
4178 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4179 # return nil;
4180 # }
4181 # Color* result = [Color alloc] init];
4182 # [result setRed:red];
4183 # [result setGreen:green];
4184 # [result setBlue:blue];
4185 # if (alpha <= 0.9999) {
4186 # [result setAlpha:floatWrapperWithValue(alpha)];
4187 # }
4188 # [result autorelease];
4189 # return result;
4190 # }
4191 # // ...
4192 #
4193 # Example (JavaScript):
4194 #
4195 # // ...
4196 #
4197 # var protoToCssColor = function(rgb_color) {
4198 # var redFrac = rgb_color.red || 0.0;
4199 # var greenFrac = rgb_color.green || 0.0;
4200 # var blueFrac = rgb_color.blue || 0.0;
4201 # var red = Math.floor(redFrac * 255);
4202 # var green = Math.floor(greenFrac * 255);
4203 # var blue = Math.floor(blueFrac * 255);
4204 #
4205 # if (!('alpha' in rgb_color)) {
4206 # return rgbToCssColor_(red, green, blue);
4207 # }
4208 #
4209 # var alphaFrac = rgb_color.alpha.value || 0.0;
4210 # var rgbParams = [red, green, blue].join(',');
4211 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4212 # };
4213 #
4214 # var rgbToCssColor_ = function(red, green, blue) {
4215 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4216 # var hexString = rgbNumber.toString(16);
4217 # var missingZeros = 6 - hexString.length;
4218 # var resultBuilder = ['#'];
4219 # for (var i = 0; i < missingZeros; i++) {
4220 # resultBuilder.push('0');
4221 # }
4222 # resultBuilder.push(hexString);
4223 # return resultBuilder.join('');
4224 # };
4225 #
4226 # // ...
4227 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4228 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4229 # the final pixel color is defined by the equation:
4230 #
4231 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4232 #
4233 # This means that a value of 1.0 corresponds to a solid color, whereas
4234 # a value of 0.0 corresponds to a completely transparent color. This
4235 # uses a wrapper message rather than a simple float scalar so that it is
4236 # possible to distinguish between a default value and the value being unset.
4237 # If omitted, this color object is to be rendered as a solid color
4238 # (as if the alpha value had been explicitly given with a value of 1.0).
4239 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4240 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4241 },
4242 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
4243 "sheetId": 42, # The ID of the sheet. Must be non-negative.
4244 # This field cannot be changed once set.
4245 },
4246 },
4247 "addChart": { # Adds a chart to a sheet in the spreadsheet. # Adds a chart.
4248 "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 -07004249 # where it should be placed. The chartId
4250 # field is optional; if one is not set, an id will be randomly generated. (It
4251 # is an error to specify the ID of a chart that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004252 "chartId": 42, # The ID of the chart.
4253 "position": { # The position of an embedded object such as a chart. # The position of the chart.
4254 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
4255 # is chosen for you. Used only when writing.
4256 "sheetId": 42, # The sheet this is on. Set only if the embedded object
4257 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004258 "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 -07004259 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
4260 # All indexes are zero-based.
4261 "rowIndex": 42, # The row index of the coordinate.
4262 "columnIndex": 42, # The column index of the coordinate.
4263 "sheetId": 42, # The sheet this coordinate is on.
4264 },
4265 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
4266 # from the anchor cell.
4267 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
4268 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
4269 # from the anchor cell.
4270 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
4271 },
4272 },
4273 "spec": { # The specifications of a chart. # The specification of the chart.
4274 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004275 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
4276 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
4277 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4278 "sources": [ # The ranges of data for a series or domain.
4279 # Exactly one dimension must have a length of 1,
4280 # and all sources in the list must have the same dimension
4281 # with length 1.
4282 # The domain (if it exists) & all series must have the same number
4283 # of source ranges. If using more than one source range, then the source
4284 # range at a given offset must be contiguous across the domain and series.
4285 #
4286 # For example, these are valid configurations:
4287 #
4288 # domain sources: A1:A5
4289 # series1 sources: B1:B5
4290 # series2 sources: D6:D10
4291 #
4292 # domain sources: A1:A5, C10:C12
4293 # series1 sources: B1:B5, D10:D12
4294 # series2 sources: C1:C5, E10:E12
4295 { # A range on a sheet.
4296 # All indexes are zero-based.
4297 # Indexes are half open, e.g the start index is inclusive
4298 # and the end index is exclusive -- [start_index, end_index).
4299 # Missing indexes indicate the range is unbounded on that side.
4300 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004301 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004302 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004303 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004304 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004305 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004306 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004307 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004308 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004309 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004310 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004311 # `Sheet1!A:B == sheet_id: 0,
4312 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004313 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004314 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004315 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004316 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004317 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004318 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004319 #
4320 # The start index must always be less than or equal to the end index.
4321 # If the start index equals the end index, then the range is empty.
4322 # Empty ranges are typically not meaningful and are usually rendered in the
4323 # UI as `#REF!`.
4324 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004325 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004326 "sheetId": 42, # The sheet this range is on.
4327 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004328 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004329 },
4330 ],
4331 },
4332 },
4333 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
4334 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4335 "sources": [ # The ranges of data for a series or domain.
4336 # Exactly one dimension must have a length of 1,
4337 # and all sources in the list must have the same dimension
4338 # with length 1.
4339 # The domain (if it exists) & all series must have the same number
4340 # of source ranges. If using more than one source range, then the source
4341 # range at a given offset must be contiguous across the domain and series.
4342 #
4343 # For example, these are valid configurations:
4344 #
4345 # domain sources: A1:A5
4346 # series1 sources: B1:B5
4347 # series2 sources: D6:D10
4348 #
4349 # domain sources: A1:A5, C10:C12
4350 # series1 sources: B1:B5, D10:D12
4351 # series2 sources: C1:C5, E10:E12
4352 { # A range on a sheet.
4353 # All indexes are zero-based.
4354 # Indexes are half open, e.g the start index is inclusive
4355 # and the end index is exclusive -- [start_index, end_index).
4356 # Missing indexes indicate the range is unbounded on that side.
4357 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004358 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004359 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004360 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004361 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004362 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004363 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004364 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004365 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004366 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004367 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004368 # `Sheet1!A:B == sheet_id: 0,
4369 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004370 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004371 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004372 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004373 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004374 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004375 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004376 #
4377 # The start index must always be less than or equal to the end index.
4378 # If the start index equals the end index, then the range is empty.
4379 # Empty ranges are typically not meaningful and are usually rendered in the
4380 # UI as `#REF!`.
4381 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004382 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004383 "sheetId": 42, # The sheet this range is on.
4384 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004385 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004386 },
4387 ],
4388 },
4389 },
4390 "threeDimensional": True or False, # True if the pie is three dimensional.
4391 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
4392 "pieHole": 3.14, # The size of the hole in the pie chart.
4393 },
4394 "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 -07004395 # See BasicChartType for the list of all
4396 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004397 # of charts this supports.
4398 "headerCount": 42, # The number of rows or columns in the data that are "headers".
4399 # If not set, Google Sheets will guess how many rows are headers based
4400 # on the data.
4401 #
4402 # (Note that BasicChartAxis.title may override the axis title
4403 # inferred from the header values.)
4404 "series": [ # The data this chart is visualizing.
4405 { # A single series of data in a chart.
4406 # For example, if charting stock prices over time, multiple series may exist,
4407 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
4408 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
4409 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4410 "sources": [ # The ranges of data for a series or domain.
4411 # Exactly one dimension must have a length of 1,
4412 # and all sources in the list must have the same dimension
4413 # with length 1.
4414 # The domain (if it exists) & all series must have the same number
4415 # of source ranges. If using more than one source range, then the source
4416 # range at a given offset must be contiguous across the domain and series.
4417 #
4418 # For example, these are valid configurations:
4419 #
4420 # domain sources: A1:A5
4421 # series1 sources: B1:B5
4422 # series2 sources: D6:D10
4423 #
4424 # domain sources: A1:A5, C10:C12
4425 # series1 sources: B1:B5, D10:D12
4426 # series2 sources: C1:C5, E10:E12
4427 { # A range on a sheet.
4428 # All indexes are zero-based.
4429 # Indexes are half open, e.g the start index is inclusive
4430 # and the end index is exclusive -- [start_index, end_index).
4431 # Missing indexes indicate the range is unbounded on that side.
4432 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004433 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004434 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004435 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004436 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004437 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004438 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004439 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004440 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004441 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004442 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004443 # `Sheet1!A:B == sheet_id: 0,
4444 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004445 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004446 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004447 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004448 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004449 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004450 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004451 #
4452 # The start index must always be less than or equal to the end index.
4453 # If the start index equals the end index, then the range is empty.
4454 # Empty ranges are typically not meaningful and are usually rendered in the
4455 # UI as `#REF!`.
4456 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004457 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004458 "sheetId": 42, # The sheet this range is on.
4459 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004460 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004461 },
4462 ],
4463 },
4464 },
4465 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
4466 # For example, if charting stocks over time, the "Volume" series
4467 # may want to be pinned to the right with the prices pinned to the left,
4468 # because the scale of trading volume is different than the scale of
4469 # prices.
4470 # It is an error to specify an axis that isn't a valid minor axis
4471 # for the chart's type.
4472 "type": "A String", # The type of this series. Valid only if the
4473 # chartType is
4474 # COMBO.
4475 # Different types will change the way the series is visualized.
4476 # Only LINE, AREA,
4477 # and COLUMN are supported.
4478 },
4479 ],
4480 "legendPosition": "A String", # The position of the chart legend.
4481 "domains": [ # The domain of data this is charting.
4482 # Only a single domain is currently supported.
4483 { # The domain of a chart.
4484 # For example, if charting stock prices over time, this would be the date.
4485 "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 -07004486 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004487 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
4488 "sources": [ # The ranges of data for a series or domain.
4489 # Exactly one dimension must have a length of 1,
4490 # and all sources in the list must have the same dimension
4491 # with length 1.
4492 # The domain (if it exists) & all series must have the same number
4493 # of source ranges. If using more than one source range, then the source
4494 # range at a given offset must be contiguous across the domain and series.
4495 #
4496 # For example, these are valid configurations:
4497 #
4498 # domain sources: A1:A5
4499 # series1 sources: B1:B5
4500 # series2 sources: D6:D10
4501 #
4502 # domain sources: A1:A5, C10:C12
4503 # series1 sources: B1:B5, D10:D12
4504 # series2 sources: C1:C5, E10:E12
4505 { # A range on a sheet.
4506 # All indexes are zero-based.
4507 # Indexes are half open, e.g the start index is inclusive
4508 # and the end index is exclusive -- [start_index, end_index).
4509 # Missing indexes indicate the range is unbounded on that side.
4510 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004511 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004512 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004513 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004514 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004515 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004516 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004517 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004518 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004519 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004520 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004521 # `Sheet1!A:B == sheet_id: 0,
4522 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004523 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004524 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004525 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004526 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004527 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004528 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004529 #
4530 # The start index must always be less than or equal to the end index.
4531 # If the start index equals the end index, then the range is empty.
4532 # Empty ranges are typically not meaningful and are usually rendered in the
4533 # UI as `#REF!`.
4534 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004535 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004536 "sheetId": 42, # The sheet this range is on.
4537 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004538 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004539 },
4540 ],
4541 },
4542 },
4543 },
4544 ],
4545 "chartType": "A String", # The type of the chart.
4546 "axis": [ # The axis on the chart.
4547 { # An axis of the chart.
4548 # A chart may not have more than one axis per
4549 # axis position.
4550 "position": "A String", # The position of this axis.
4551 "format": { # The format of a run of text in a cell. # The format of the title.
4552 # Only valid if the axis is not associated with the domain.
4553 # Absent values indicate that the field isn't specified.
4554 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4555 # for simplicity of conversion to/from color representations in various
4556 # languages over compactness; for example, the fields of this representation
4557 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4558 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4559 # method in iOS; and, with just a little work, it can be easily formatted into
4560 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4561 #
4562 # Example (Java):
4563 #
4564 # import com.google.type.Color;
4565 #
4566 # // ...
4567 # public static java.awt.Color fromProto(Color protocolor) {
4568 # float alpha = protocolor.hasAlpha()
4569 # ? protocolor.getAlpha().getValue()
4570 # : 1.0;
4571 #
4572 # return new java.awt.Color(
4573 # protocolor.getRed(),
4574 # protocolor.getGreen(),
4575 # protocolor.getBlue(),
4576 # alpha);
4577 # }
4578 #
4579 # public static Color toProto(java.awt.Color color) {
4580 # float red = (float) color.getRed();
4581 # float green = (float) color.getGreen();
4582 # float blue = (float) color.getBlue();
4583 # float denominator = 255.0;
4584 # Color.Builder resultBuilder =
4585 # Color
4586 # .newBuilder()
4587 # .setRed(red / denominator)
4588 # .setGreen(green / denominator)
4589 # .setBlue(blue / denominator);
4590 # int alpha = color.getAlpha();
4591 # if (alpha != 255) {
4592 # result.setAlpha(
4593 # FloatValue
4594 # .newBuilder()
4595 # .setValue(((float) alpha) / denominator)
4596 # .build());
4597 # }
4598 # return resultBuilder.build();
4599 # }
4600 # // ...
4601 #
4602 # Example (iOS / Obj-C):
4603 #
4604 # // ...
4605 # static UIColor* fromProto(Color* protocolor) {
4606 # float red = [protocolor red];
4607 # float green = [protocolor green];
4608 # float blue = [protocolor blue];
4609 # FloatValue* alpha_wrapper = [protocolor alpha];
4610 # float alpha = 1.0;
4611 # if (alpha_wrapper != nil) {
4612 # alpha = [alpha_wrapper value];
4613 # }
4614 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4615 # }
4616 #
4617 # static Color* toProto(UIColor* color) {
4618 # CGFloat red, green, blue, alpha;
4619 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4620 # return nil;
4621 # }
4622 # Color* result = [Color alloc] init];
4623 # [result setRed:red];
4624 # [result setGreen:green];
4625 # [result setBlue:blue];
4626 # if (alpha <= 0.9999) {
4627 # [result setAlpha:floatWrapperWithValue(alpha)];
4628 # }
4629 # [result autorelease];
4630 # return result;
4631 # }
4632 # // ...
4633 #
4634 # Example (JavaScript):
4635 #
4636 # // ...
4637 #
4638 # var protoToCssColor = function(rgb_color) {
4639 # var redFrac = rgb_color.red || 0.0;
4640 # var greenFrac = rgb_color.green || 0.0;
4641 # var blueFrac = rgb_color.blue || 0.0;
4642 # var red = Math.floor(redFrac * 255);
4643 # var green = Math.floor(greenFrac * 255);
4644 # var blue = Math.floor(blueFrac * 255);
4645 #
4646 # if (!('alpha' in rgb_color)) {
4647 # return rgbToCssColor_(red, green, blue);
4648 # }
4649 #
4650 # var alphaFrac = rgb_color.alpha.value || 0.0;
4651 # var rgbParams = [red, green, blue].join(',');
4652 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4653 # };
4654 #
4655 # var rgbToCssColor_ = function(red, green, blue) {
4656 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4657 # var hexString = rgbNumber.toString(16);
4658 # var missingZeros = 6 - hexString.length;
4659 # var resultBuilder = ['#'];
4660 # for (var i = 0; i < missingZeros; i++) {
4661 # resultBuilder.push('0');
4662 # }
4663 # resultBuilder.push(hexString);
4664 # return resultBuilder.join('');
4665 # };
4666 #
4667 # // ...
4668 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4669 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4670 # the final pixel color is defined by the equation:
4671 #
4672 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4673 #
4674 # This means that a value of 1.0 corresponds to a solid color, whereas
4675 # a value of 0.0 corresponds to a completely transparent color. This
4676 # uses a wrapper message rather than a simple float scalar so that it is
4677 # possible to distinguish between a default value and the value being unset.
4678 # If omitted, this color object is to be rendered as a solid color
4679 # (as if the alpha value had been explicitly given with a value of 1.0).
4680 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4681 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4682 },
4683 "bold": True or False, # True if the text is bold.
4684 "strikethrough": True or False, # True if the text has a strikethrough.
4685 "fontFamily": "A String", # The font family.
4686 "fontSize": 42, # The size of the font.
4687 "italic": True or False, # True if the text is italicized.
4688 "underline": True or False, # True if the text is underlined.
4689 },
4690 "title": "A String", # The title of this axis. If set, this overrides any title inferred
4691 # from headers of the data.
4692 },
4693 ],
4694 },
4695 "title": "A String", # The title of the chart.
4696 },
4697 },
4698 },
4699 "addConditionalFormatRule": { # Adds a new conditional format rule at the given index. # Adds a new conditional format rule.
4700 # All subsequent rules' indexes are incremented.
4701 "index": 42, # The zero-based index where the rule should be inserted.
4702 "rule": { # A rule describing a conditional format. # The rule to add.
4703 "ranges": [ # The ranges that will be formatted if the condition is true.
4704 # All the ranges must be on the same grid.
4705 { # A range on a sheet.
4706 # All indexes are zero-based.
4707 # Indexes are half open, e.g the start index is inclusive
4708 # and the end index is exclusive -- [start_index, end_index).
4709 # Missing indexes indicate the range is unbounded on that side.
4710 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004711 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004712 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004713 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004714 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004715 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004716 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004717 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004718 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004719 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004720 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004721 # `Sheet1!A:B == sheet_id: 0,
4722 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004723 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004724 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004725 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004726 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004727 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004728 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004729 #
4730 # The start index must always be less than or equal to the end index.
4731 # If the start index equals the end index, then the range is empty.
4732 # Empty ranges are typically not meaningful and are usually rendered in the
4733 # UI as `#REF!`.
4734 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004735 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004736 "sheetId": 42, # The sheet this range is on.
4737 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004738 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004739 },
4740 ],
4741 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
4742 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
4743 # the format will be applied.
4744 # BooleanConditions are used by conditional formatting,
4745 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004746 "values": [ # The values of the condition. The number of supported values depends
4747 # on the condition type. Some support zero values,
4748 # others one or two values,
4749 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
4750 { # The value of the condition.
4751 "relativeDate": "A String", # A relative date (based on the current date).
4752 # Valid only if the type is
4753 # DATE_BEFORE,
4754 # DATE_AFTER,
4755 # DATE_ON_OR_BEFORE or
4756 # DATE_ON_OR_AFTER.
4757 #
4758 # Relative dates are not supported in data validation.
4759 # They are supported only in conditional formatting and
4760 # conditional filters.
4761 "userEnteredValue": "A String", # A value the condition is based on.
4762 # The value will be parsed as if the user typed into a cell.
4763 # Formulas are supported (and must begin with an `=`).
4764 },
4765 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004766 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004767 },
4768 "format": { # The format of a cell. # The format to apply.
4769 # Conditional formatting can only apply a subset of formatting:
4770 # bold, italic,
4771 # strikethrough,
4772 # foreground color &
4773 # background color.
4774 "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 -07004775 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
4776 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004777 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004778 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004779 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004780 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004781 },
4782 "textDirection": "A String", # The direction of the text in the cell.
4783 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
4784 # When updating padding, every field must be specified.
4785 "top": 42, # The top padding of the cell.
4786 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004787 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004788 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004789 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004790 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004791 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
4792 # for simplicity of conversion to/from color representations in various
4793 # languages over compactness; for example, the fields of this representation
4794 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4795 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4796 # method in iOS; and, with just a little work, it can be easily formatted into
4797 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4798 #
4799 # Example (Java):
4800 #
4801 # import com.google.type.Color;
4802 #
4803 # // ...
4804 # public static java.awt.Color fromProto(Color protocolor) {
4805 # float alpha = protocolor.hasAlpha()
4806 # ? protocolor.getAlpha().getValue()
4807 # : 1.0;
4808 #
4809 # return new java.awt.Color(
4810 # protocolor.getRed(),
4811 # protocolor.getGreen(),
4812 # protocolor.getBlue(),
4813 # alpha);
4814 # }
4815 #
4816 # public static Color toProto(java.awt.Color color) {
4817 # float red = (float) color.getRed();
4818 # float green = (float) color.getGreen();
4819 # float blue = (float) color.getBlue();
4820 # float denominator = 255.0;
4821 # Color.Builder resultBuilder =
4822 # Color
4823 # .newBuilder()
4824 # .setRed(red / denominator)
4825 # .setGreen(green / denominator)
4826 # .setBlue(blue / denominator);
4827 # int alpha = color.getAlpha();
4828 # if (alpha != 255) {
4829 # result.setAlpha(
4830 # FloatValue
4831 # .newBuilder()
4832 # .setValue(((float) alpha) / denominator)
4833 # .build());
4834 # }
4835 # return resultBuilder.build();
4836 # }
4837 # // ...
4838 #
4839 # Example (iOS / Obj-C):
4840 #
4841 # // ...
4842 # static UIColor* fromProto(Color* protocolor) {
4843 # float red = [protocolor red];
4844 # float green = [protocolor green];
4845 # float blue = [protocolor blue];
4846 # FloatValue* alpha_wrapper = [protocolor alpha];
4847 # float alpha = 1.0;
4848 # if (alpha_wrapper != nil) {
4849 # alpha = [alpha_wrapper value];
4850 # }
4851 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4852 # }
4853 #
4854 # static Color* toProto(UIColor* color) {
4855 # CGFloat red, green, blue, alpha;
4856 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4857 # return nil;
4858 # }
4859 # Color* result = [Color alloc] init];
4860 # [result setRed:red];
4861 # [result setGreen:green];
4862 # [result setBlue:blue];
4863 # if (alpha <= 0.9999) {
4864 # [result setAlpha:floatWrapperWithValue(alpha)];
4865 # }
4866 # [result autorelease];
4867 # return result;
4868 # }
4869 # // ...
4870 #
4871 # Example (JavaScript):
4872 #
4873 # // ...
4874 #
4875 # var protoToCssColor = function(rgb_color) {
4876 # var redFrac = rgb_color.red || 0.0;
4877 # var greenFrac = rgb_color.green || 0.0;
4878 # var blueFrac = rgb_color.blue || 0.0;
4879 # var red = Math.floor(redFrac * 255);
4880 # var green = Math.floor(greenFrac * 255);
4881 # var blue = Math.floor(blueFrac * 255);
4882 #
4883 # if (!('alpha' in rgb_color)) {
4884 # return rgbToCssColor_(red, green, blue);
4885 # }
4886 #
4887 # var alphaFrac = rgb_color.alpha.value || 0.0;
4888 # var rgbParams = [red, green, blue].join(',');
4889 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
4890 # };
4891 #
4892 # var rgbToCssColor_ = function(red, green, blue) {
4893 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
4894 # var hexString = rgbNumber.toString(16);
4895 # var missingZeros = 6 - hexString.length;
4896 # var resultBuilder = ['#'];
4897 # for (var i = 0; i < missingZeros; i++) {
4898 # resultBuilder.push('0');
4899 # }
4900 # resultBuilder.push(hexString);
4901 # return resultBuilder.join('');
4902 # };
4903 #
4904 # // ...
4905 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4906 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
4907 # the final pixel color is defined by the equation:
4908 #
4909 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
4910 #
4911 # This means that a value of 1.0 corresponds to a solid color, whereas
4912 # a value of 0.0 corresponds to a completely transparent color. This
4913 # uses a wrapper message rather than a simple float scalar so that it is
4914 # possible to distinguish between a default value and the value being unset.
4915 # If omitted, this color object is to be rendered as a solid color
4916 # (as if the alpha value had been explicitly given with a value of 1.0).
4917 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
4918 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
4919 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004920 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004921 "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).
4922 # Absent values indicate that the field isn't specified.
4923 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
4924 # for simplicity of conversion to/from color representations in various
4925 # languages over compactness; for example, the fields of this representation
4926 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
4927 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4928 # method in iOS; and, with just a little work, it can be easily formatted into
4929 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
4930 #
4931 # Example (Java):
4932 #
4933 # import com.google.type.Color;
4934 #
4935 # // ...
4936 # public static java.awt.Color fromProto(Color protocolor) {
4937 # float alpha = protocolor.hasAlpha()
4938 # ? protocolor.getAlpha().getValue()
4939 # : 1.0;
4940 #
4941 # return new java.awt.Color(
4942 # protocolor.getRed(),
4943 # protocolor.getGreen(),
4944 # protocolor.getBlue(),
4945 # alpha);
4946 # }
4947 #
4948 # public static Color toProto(java.awt.Color color) {
4949 # float red = (float) color.getRed();
4950 # float green = (float) color.getGreen();
4951 # float blue = (float) color.getBlue();
4952 # float denominator = 255.0;
4953 # Color.Builder resultBuilder =
4954 # Color
4955 # .newBuilder()
4956 # .setRed(red / denominator)
4957 # .setGreen(green / denominator)
4958 # .setBlue(blue / denominator);
4959 # int alpha = color.getAlpha();
4960 # if (alpha != 255) {
4961 # result.setAlpha(
4962 # FloatValue
4963 # .newBuilder()
4964 # .setValue(((float) alpha) / denominator)
4965 # .build());
4966 # }
4967 # return resultBuilder.build();
4968 # }
4969 # // ...
4970 #
4971 # Example (iOS / Obj-C):
4972 #
4973 # // ...
4974 # static UIColor* fromProto(Color* protocolor) {
4975 # float red = [protocolor red];
4976 # float green = [protocolor green];
4977 # float blue = [protocolor blue];
4978 # FloatValue* alpha_wrapper = [protocolor alpha];
4979 # float alpha = 1.0;
4980 # if (alpha_wrapper != nil) {
4981 # alpha = [alpha_wrapper value];
4982 # }
4983 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
4984 # }
4985 #
4986 # static Color* toProto(UIColor* color) {
4987 # CGFloat red, green, blue, alpha;
4988 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
4989 # return nil;
4990 # }
4991 # Color* result = [Color alloc] init];
4992 # [result setRed:red];
4993 # [result setGreen:green];
4994 # [result setBlue:blue];
4995 # if (alpha <= 0.9999) {
4996 # [result setAlpha:floatWrapperWithValue(alpha)];
4997 # }
4998 # [result autorelease];
4999 # return result;
5000 # }
5001 # // ...
5002 #
5003 # Example (JavaScript):
5004 #
5005 # // ...
5006 #
5007 # var protoToCssColor = function(rgb_color) {
5008 # var redFrac = rgb_color.red || 0.0;
5009 # var greenFrac = rgb_color.green || 0.0;
5010 # var blueFrac = rgb_color.blue || 0.0;
5011 # var red = Math.floor(redFrac * 255);
5012 # var green = Math.floor(greenFrac * 255);
5013 # var blue = Math.floor(blueFrac * 255);
5014 #
5015 # if (!('alpha' in rgb_color)) {
5016 # return rgbToCssColor_(red, green, blue);
5017 # }
5018 #
5019 # var alphaFrac = rgb_color.alpha.value || 0.0;
5020 # var rgbParams = [red, green, blue].join(',');
5021 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5022 # };
5023 #
5024 # var rgbToCssColor_ = function(red, green, blue) {
5025 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5026 # var hexString = rgbNumber.toString(16);
5027 # var missingZeros = 6 - hexString.length;
5028 # var resultBuilder = ['#'];
5029 # for (var i = 0; i < missingZeros; i++) {
5030 # resultBuilder.push('0');
5031 # }
5032 # resultBuilder.push(hexString);
5033 # return resultBuilder.join('');
5034 # };
5035 #
5036 # // ...
5037 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5038 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5039 # the final pixel color is defined by the equation:
5040 #
5041 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5042 #
5043 # This means that a value of 1.0 corresponds to a solid color, whereas
5044 # a value of 0.0 corresponds to a completely transparent color. This
5045 # uses a wrapper message rather than a simple float scalar so that it is
5046 # possible to distinguish between a default value and the value being unset.
5047 # If omitted, this color object is to be rendered as a solid color
5048 # (as if the alpha value had been explicitly given with a value of 1.0).
5049 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5050 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5051 },
5052 "bold": True or False, # True if the text is bold.
5053 "strikethrough": True or False, # True if the text has a strikethrough.
5054 "fontFamily": "A String", # The font family.
5055 "fontSize": 42, # The size of the font.
5056 "italic": True or False, # True if the text is italicized.
5057 "underline": True or False, # True if the text is underlined.
5058 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005059 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005060 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
5061 "borders": { # The borders of the cell. # The borders of the cell.
5062 "top": { # A border along a cell. # The top border of the cell.
5063 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5064 # for simplicity of conversion to/from color representations in various
5065 # languages over compactness; for example, the fields of this representation
5066 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5067 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5068 # method in iOS; and, with just a little work, it can be easily formatted into
5069 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5070 #
5071 # Example (Java):
5072 #
5073 # import com.google.type.Color;
5074 #
5075 # // ...
5076 # public static java.awt.Color fromProto(Color protocolor) {
5077 # float alpha = protocolor.hasAlpha()
5078 # ? protocolor.getAlpha().getValue()
5079 # : 1.0;
5080 #
5081 # return new java.awt.Color(
5082 # protocolor.getRed(),
5083 # protocolor.getGreen(),
5084 # protocolor.getBlue(),
5085 # alpha);
5086 # }
5087 #
5088 # public static Color toProto(java.awt.Color color) {
5089 # float red = (float) color.getRed();
5090 # float green = (float) color.getGreen();
5091 # float blue = (float) color.getBlue();
5092 # float denominator = 255.0;
5093 # Color.Builder resultBuilder =
5094 # Color
5095 # .newBuilder()
5096 # .setRed(red / denominator)
5097 # .setGreen(green / denominator)
5098 # .setBlue(blue / denominator);
5099 # int alpha = color.getAlpha();
5100 # if (alpha != 255) {
5101 # result.setAlpha(
5102 # FloatValue
5103 # .newBuilder()
5104 # .setValue(((float) alpha) / denominator)
5105 # .build());
5106 # }
5107 # return resultBuilder.build();
5108 # }
5109 # // ...
5110 #
5111 # Example (iOS / Obj-C):
5112 #
5113 # // ...
5114 # static UIColor* fromProto(Color* protocolor) {
5115 # float red = [protocolor red];
5116 # float green = [protocolor green];
5117 # float blue = [protocolor blue];
5118 # FloatValue* alpha_wrapper = [protocolor alpha];
5119 # float alpha = 1.0;
5120 # if (alpha_wrapper != nil) {
5121 # alpha = [alpha_wrapper value];
5122 # }
5123 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5124 # }
5125 #
5126 # static Color* toProto(UIColor* color) {
5127 # CGFloat red, green, blue, alpha;
5128 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5129 # return nil;
5130 # }
5131 # Color* result = [Color alloc] init];
5132 # [result setRed:red];
5133 # [result setGreen:green];
5134 # [result setBlue:blue];
5135 # if (alpha <= 0.9999) {
5136 # [result setAlpha:floatWrapperWithValue(alpha)];
5137 # }
5138 # [result autorelease];
5139 # return result;
5140 # }
5141 # // ...
5142 #
5143 # Example (JavaScript):
5144 #
5145 # // ...
5146 #
5147 # var protoToCssColor = function(rgb_color) {
5148 # var redFrac = rgb_color.red || 0.0;
5149 # var greenFrac = rgb_color.green || 0.0;
5150 # var blueFrac = rgb_color.blue || 0.0;
5151 # var red = Math.floor(redFrac * 255);
5152 # var green = Math.floor(greenFrac * 255);
5153 # var blue = Math.floor(blueFrac * 255);
5154 #
5155 # if (!('alpha' in rgb_color)) {
5156 # return rgbToCssColor_(red, green, blue);
5157 # }
5158 #
5159 # var alphaFrac = rgb_color.alpha.value || 0.0;
5160 # var rgbParams = [red, green, blue].join(',');
5161 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5162 # };
5163 #
5164 # var rgbToCssColor_ = function(red, green, blue) {
5165 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5166 # var hexString = rgbNumber.toString(16);
5167 # var missingZeros = 6 - hexString.length;
5168 # var resultBuilder = ['#'];
5169 # for (var i = 0; i < missingZeros; i++) {
5170 # resultBuilder.push('0');
5171 # }
5172 # resultBuilder.push(hexString);
5173 # return resultBuilder.join('');
5174 # };
5175 #
5176 # // ...
5177 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5178 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5179 # the final pixel color is defined by the equation:
5180 #
5181 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5182 #
5183 # This means that a value of 1.0 corresponds to a solid color, whereas
5184 # a value of 0.0 corresponds to a completely transparent color. This
5185 # uses a wrapper message rather than a simple float scalar so that it is
5186 # possible to distinguish between a default value and the value being unset.
5187 # If omitted, this color object is to be rendered as a solid color
5188 # (as if the alpha value had been explicitly given with a value of 1.0).
5189 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5190 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5191 },
5192 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005193 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005194 "style": "A String", # The style of the border.
5195 },
5196 "right": { # A border along a cell. # The right border of the cell.
5197 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5198 # for simplicity of conversion to/from color representations in various
5199 # languages over compactness; for example, the fields of this representation
5200 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5201 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5202 # method in iOS; and, with just a little work, it can be easily formatted into
5203 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5204 #
5205 # Example (Java):
5206 #
5207 # import com.google.type.Color;
5208 #
5209 # // ...
5210 # public static java.awt.Color fromProto(Color protocolor) {
5211 # float alpha = protocolor.hasAlpha()
5212 # ? protocolor.getAlpha().getValue()
5213 # : 1.0;
5214 #
5215 # return new java.awt.Color(
5216 # protocolor.getRed(),
5217 # protocolor.getGreen(),
5218 # protocolor.getBlue(),
5219 # alpha);
5220 # }
5221 #
5222 # public static Color toProto(java.awt.Color color) {
5223 # float red = (float) color.getRed();
5224 # float green = (float) color.getGreen();
5225 # float blue = (float) color.getBlue();
5226 # float denominator = 255.0;
5227 # Color.Builder resultBuilder =
5228 # Color
5229 # .newBuilder()
5230 # .setRed(red / denominator)
5231 # .setGreen(green / denominator)
5232 # .setBlue(blue / denominator);
5233 # int alpha = color.getAlpha();
5234 # if (alpha != 255) {
5235 # result.setAlpha(
5236 # FloatValue
5237 # .newBuilder()
5238 # .setValue(((float) alpha) / denominator)
5239 # .build());
5240 # }
5241 # return resultBuilder.build();
5242 # }
5243 # // ...
5244 #
5245 # Example (iOS / Obj-C):
5246 #
5247 # // ...
5248 # static UIColor* fromProto(Color* protocolor) {
5249 # float red = [protocolor red];
5250 # float green = [protocolor green];
5251 # float blue = [protocolor blue];
5252 # FloatValue* alpha_wrapper = [protocolor alpha];
5253 # float alpha = 1.0;
5254 # if (alpha_wrapper != nil) {
5255 # alpha = [alpha_wrapper value];
5256 # }
5257 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5258 # }
5259 #
5260 # static Color* toProto(UIColor* color) {
5261 # CGFloat red, green, blue, alpha;
5262 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5263 # return nil;
5264 # }
5265 # Color* result = [Color alloc] init];
5266 # [result setRed:red];
5267 # [result setGreen:green];
5268 # [result setBlue:blue];
5269 # if (alpha <= 0.9999) {
5270 # [result setAlpha:floatWrapperWithValue(alpha)];
5271 # }
5272 # [result autorelease];
5273 # return result;
5274 # }
5275 # // ...
5276 #
5277 # Example (JavaScript):
5278 #
5279 # // ...
5280 #
5281 # var protoToCssColor = function(rgb_color) {
5282 # var redFrac = rgb_color.red || 0.0;
5283 # var greenFrac = rgb_color.green || 0.0;
5284 # var blueFrac = rgb_color.blue || 0.0;
5285 # var red = Math.floor(redFrac * 255);
5286 # var green = Math.floor(greenFrac * 255);
5287 # var blue = Math.floor(blueFrac * 255);
5288 #
5289 # if (!('alpha' in rgb_color)) {
5290 # return rgbToCssColor_(red, green, blue);
5291 # }
5292 #
5293 # var alphaFrac = rgb_color.alpha.value || 0.0;
5294 # var rgbParams = [red, green, blue].join(',');
5295 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5296 # };
5297 #
5298 # var rgbToCssColor_ = function(red, green, blue) {
5299 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5300 # var hexString = rgbNumber.toString(16);
5301 # var missingZeros = 6 - hexString.length;
5302 # var resultBuilder = ['#'];
5303 # for (var i = 0; i < missingZeros; i++) {
5304 # resultBuilder.push('0');
5305 # }
5306 # resultBuilder.push(hexString);
5307 # return resultBuilder.join('');
5308 # };
5309 #
5310 # // ...
5311 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5312 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5313 # the final pixel color is defined by the equation:
5314 #
5315 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5316 #
5317 # This means that a value of 1.0 corresponds to a solid color, whereas
5318 # a value of 0.0 corresponds to a completely transparent color. This
5319 # uses a wrapper message rather than a simple float scalar so that it is
5320 # possible to distinguish between a default value and the value being unset.
5321 # If omitted, this color object is to be rendered as a solid color
5322 # (as if the alpha value had been explicitly given with a value of 1.0).
5323 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5324 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5325 },
5326 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005327 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005328 "style": "A String", # The style of the border.
5329 },
5330 "bottom": { # A border along a cell. # The bottom border of the cell.
5331 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5332 # for simplicity of conversion to/from color representations in various
5333 # languages over compactness; for example, the fields of this representation
5334 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5335 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5336 # method in iOS; and, with just a little work, it can be easily formatted into
5337 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5338 #
5339 # Example (Java):
5340 #
5341 # import com.google.type.Color;
5342 #
5343 # // ...
5344 # public static java.awt.Color fromProto(Color protocolor) {
5345 # float alpha = protocolor.hasAlpha()
5346 # ? protocolor.getAlpha().getValue()
5347 # : 1.0;
5348 #
5349 # return new java.awt.Color(
5350 # protocolor.getRed(),
5351 # protocolor.getGreen(),
5352 # protocolor.getBlue(),
5353 # alpha);
5354 # }
5355 #
5356 # public static Color toProto(java.awt.Color color) {
5357 # float red = (float) color.getRed();
5358 # float green = (float) color.getGreen();
5359 # float blue = (float) color.getBlue();
5360 # float denominator = 255.0;
5361 # Color.Builder resultBuilder =
5362 # Color
5363 # .newBuilder()
5364 # .setRed(red / denominator)
5365 # .setGreen(green / denominator)
5366 # .setBlue(blue / denominator);
5367 # int alpha = color.getAlpha();
5368 # if (alpha != 255) {
5369 # result.setAlpha(
5370 # FloatValue
5371 # .newBuilder()
5372 # .setValue(((float) alpha) / denominator)
5373 # .build());
5374 # }
5375 # return resultBuilder.build();
5376 # }
5377 # // ...
5378 #
5379 # Example (iOS / Obj-C):
5380 #
5381 # // ...
5382 # static UIColor* fromProto(Color* protocolor) {
5383 # float red = [protocolor red];
5384 # float green = [protocolor green];
5385 # float blue = [protocolor blue];
5386 # FloatValue* alpha_wrapper = [protocolor alpha];
5387 # float alpha = 1.0;
5388 # if (alpha_wrapper != nil) {
5389 # alpha = [alpha_wrapper value];
5390 # }
5391 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5392 # }
5393 #
5394 # static Color* toProto(UIColor* color) {
5395 # CGFloat red, green, blue, alpha;
5396 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5397 # return nil;
5398 # }
5399 # Color* result = [Color alloc] init];
5400 # [result setRed:red];
5401 # [result setGreen:green];
5402 # [result setBlue:blue];
5403 # if (alpha <= 0.9999) {
5404 # [result setAlpha:floatWrapperWithValue(alpha)];
5405 # }
5406 # [result autorelease];
5407 # return result;
5408 # }
5409 # // ...
5410 #
5411 # Example (JavaScript):
5412 #
5413 # // ...
5414 #
5415 # var protoToCssColor = function(rgb_color) {
5416 # var redFrac = rgb_color.red || 0.0;
5417 # var greenFrac = rgb_color.green || 0.0;
5418 # var blueFrac = rgb_color.blue || 0.0;
5419 # var red = Math.floor(redFrac * 255);
5420 # var green = Math.floor(greenFrac * 255);
5421 # var blue = Math.floor(blueFrac * 255);
5422 #
5423 # if (!('alpha' in rgb_color)) {
5424 # return rgbToCssColor_(red, green, blue);
5425 # }
5426 #
5427 # var alphaFrac = rgb_color.alpha.value || 0.0;
5428 # var rgbParams = [red, green, blue].join(',');
5429 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5430 # };
5431 #
5432 # var rgbToCssColor_ = function(red, green, blue) {
5433 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5434 # var hexString = rgbNumber.toString(16);
5435 # var missingZeros = 6 - hexString.length;
5436 # var resultBuilder = ['#'];
5437 # for (var i = 0; i < missingZeros; i++) {
5438 # resultBuilder.push('0');
5439 # }
5440 # resultBuilder.push(hexString);
5441 # return resultBuilder.join('');
5442 # };
5443 #
5444 # // ...
5445 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5446 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5447 # the final pixel color is defined by the equation:
5448 #
5449 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5450 #
5451 # This means that a value of 1.0 corresponds to a solid color, whereas
5452 # a value of 0.0 corresponds to a completely transparent color. This
5453 # uses a wrapper message rather than a simple float scalar so that it is
5454 # possible to distinguish between a default value and the value being unset.
5455 # If omitted, this color object is to be rendered as a solid color
5456 # (as if the alpha value had been explicitly given with a value of 1.0).
5457 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5458 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5459 },
5460 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005461 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005462 "style": "A String", # The style of the border.
5463 },
5464 "left": { # A border along a cell. # The left border of the cell.
5465 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
5466 # for simplicity of conversion to/from color representations in various
5467 # languages over compactness; for example, the fields of this representation
5468 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5469 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5470 # method in iOS; and, with just a little work, it can be easily formatted into
5471 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5472 #
5473 # Example (Java):
5474 #
5475 # import com.google.type.Color;
5476 #
5477 # // ...
5478 # public static java.awt.Color fromProto(Color protocolor) {
5479 # float alpha = protocolor.hasAlpha()
5480 # ? protocolor.getAlpha().getValue()
5481 # : 1.0;
5482 #
5483 # return new java.awt.Color(
5484 # protocolor.getRed(),
5485 # protocolor.getGreen(),
5486 # protocolor.getBlue(),
5487 # alpha);
5488 # }
5489 #
5490 # public static Color toProto(java.awt.Color color) {
5491 # float red = (float) color.getRed();
5492 # float green = (float) color.getGreen();
5493 # float blue = (float) color.getBlue();
5494 # float denominator = 255.0;
5495 # Color.Builder resultBuilder =
5496 # Color
5497 # .newBuilder()
5498 # .setRed(red / denominator)
5499 # .setGreen(green / denominator)
5500 # .setBlue(blue / denominator);
5501 # int alpha = color.getAlpha();
5502 # if (alpha != 255) {
5503 # result.setAlpha(
5504 # FloatValue
5505 # .newBuilder()
5506 # .setValue(((float) alpha) / denominator)
5507 # .build());
5508 # }
5509 # return resultBuilder.build();
5510 # }
5511 # // ...
5512 #
5513 # Example (iOS / Obj-C):
5514 #
5515 # // ...
5516 # static UIColor* fromProto(Color* protocolor) {
5517 # float red = [protocolor red];
5518 # float green = [protocolor green];
5519 # float blue = [protocolor blue];
5520 # FloatValue* alpha_wrapper = [protocolor alpha];
5521 # float alpha = 1.0;
5522 # if (alpha_wrapper != nil) {
5523 # alpha = [alpha_wrapper value];
5524 # }
5525 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5526 # }
5527 #
5528 # static Color* toProto(UIColor* color) {
5529 # CGFloat red, green, blue, alpha;
5530 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5531 # return nil;
5532 # }
5533 # Color* result = [Color alloc] init];
5534 # [result setRed:red];
5535 # [result setGreen:green];
5536 # [result setBlue:blue];
5537 # if (alpha <= 0.9999) {
5538 # [result setAlpha:floatWrapperWithValue(alpha)];
5539 # }
5540 # [result autorelease];
5541 # return result;
5542 # }
5543 # // ...
5544 #
5545 # Example (JavaScript):
5546 #
5547 # // ...
5548 #
5549 # var protoToCssColor = function(rgb_color) {
5550 # var redFrac = rgb_color.red || 0.0;
5551 # var greenFrac = rgb_color.green || 0.0;
5552 # var blueFrac = rgb_color.blue || 0.0;
5553 # var red = Math.floor(redFrac * 255);
5554 # var green = Math.floor(greenFrac * 255);
5555 # var blue = Math.floor(blueFrac * 255);
5556 #
5557 # if (!('alpha' in rgb_color)) {
5558 # return rgbToCssColor_(red, green, blue);
5559 # }
5560 #
5561 # var alphaFrac = rgb_color.alpha.value || 0.0;
5562 # var rgbParams = [red, green, blue].join(',');
5563 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5564 # };
5565 #
5566 # var rgbToCssColor_ = function(red, green, blue) {
5567 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5568 # var hexString = rgbNumber.toString(16);
5569 # var missingZeros = 6 - hexString.length;
5570 # var resultBuilder = ['#'];
5571 # for (var i = 0; i < missingZeros; i++) {
5572 # resultBuilder.push('0');
5573 # }
5574 # resultBuilder.push(hexString);
5575 # return resultBuilder.join('');
5576 # };
5577 #
5578 # // ...
5579 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5580 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5581 # the final pixel color is defined by the equation:
5582 #
5583 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5584 #
5585 # This means that a value of 1.0 corresponds to a solid color, whereas
5586 # a value of 0.0 corresponds to a completely transparent color. This
5587 # uses a wrapper message rather than a simple float scalar so that it is
5588 # possible to distinguish between a default value and the value being unset.
5589 # If omitted, this color object is to be rendered as a solid color
5590 # (as if the alpha value had been explicitly given with a value of 1.0).
5591 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5592 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5593 },
5594 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005595 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005596 "style": "A String", # The style of the border.
5597 },
5598 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005599 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
5600 "angle": 42, # The angle between the standard orientation and the desired orientation.
5601 # Measured in degrees. Valid values are between -90 and 90. Positive
5602 # angles are angled upwards, negative are angled downwards.
5603 #
5604 # Note: For LTR text direction positive angles are in the counterclockwise
5605 # direction, whereas for RTL they are in the clockwise direction
5606 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
5607 # characters is unchanged.
5608 # For example:
5609 #
5610 # | V |
5611 # | e |
5612 # | r |
5613 # | t |
5614 # | i |
5615 # | c |
5616 # | a |
5617 # | l |
5618 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005619 },
5620 },
5621 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
5622 # the interpolation points listed. The format of a cell will vary
5623 # based on its contents as compared to the values of the interpolation
5624 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005625 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005626 # These pin the gradient color scale according to the color,
5627 # type and value chosen.
5628 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5629 # for simplicity of conversion to/from color representations in various
5630 # languages over compactness; for example, the fields of this representation
5631 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5632 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5633 # method in iOS; and, with just a little work, it can be easily formatted into
5634 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5635 #
5636 # Example (Java):
5637 #
5638 # import com.google.type.Color;
5639 #
5640 # // ...
5641 # public static java.awt.Color fromProto(Color protocolor) {
5642 # float alpha = protocolor.hasAlpha()
5643 # ? protocolor.getAlpha().getValue()
5644 # : 1.0;
5645 #
5646 # return new java.awt.Color(
5647 # protocolor.getRed(),
5648 # protocolor.getGreen(),
5649 # protocolor.getBlue(),
5650 # alpha);
5651 # }
5652 #
5653 # public static Color toProto(java.awt.Color color) {
5654 # float red = (float) color.getRed();
5655 # float green = (float) color.getGreen();
5656 # float blue = (float) color.getBlue();
5657 # float denominator = 255.0;
5658 # Color.Builder resultBuilder =
5659 # Color
5660 # .newBuilder()
5661 # .setRed(red / denominator)
5662 # .setGreen(green / denominator)
5663 # .setBlue(blue / denominator);
5664 # int alpha = color.getAlpha();
5665 # if (alpha != 255) {
5666 # result.setAlpha(
5667 # FloatValue
5668 # .newBuilder()
5669 # .setValue(((float) alpha) / denominator)
5670 # .build());
5671 # }
5672 # return resultBuilder.build();
5673 # }
5674 # // ...
5675 #
5676 # Example (iOS / Obj-C):
5677 #
5678 # // ...
5679 # static UIColor* fromProto(Color* protocolor) {
5680 # float red = [protocolor red];
5681 # float green = [protocolor green];
5682 # float blue = [protocolor blue];
5683 # FloatValue* alpha_wrapper = [protocolor alpha];
5684 # float alpha = 1.0;
5685 # if (alpha_wrapper != nil) {
5686 # alpha = [alpha_wrapper value];
5687 # }
5688 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5689 # }
5690 #
5691 # static Color* toProto(UIColor* color) {
5692 # CGFloat red, green, blue, alpha;
5693 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5694 # return nil;
5695 # }
5696 # Color* result = [Color alloc] init];
5697 # [result setRed:red];
5698 # [result setGreen:green];
5699 # [result setBlue:blue];
5700 # if (alpha <= 0.9999) {
5701 # [result setAlpha:floatWrapperWithValue(alpha)];
5702 # }
5703 # [result autorelease];
5704 # return result;
5705 # }
5706 # // ...
5707 #
5708 # Example (JavaScript):
5709 #
5710 # // ...
5711 #
5712 # var protoToCssColor = function(rgb_color) {
5713 # var redFrac = rgb_color.red || 0.0;
5714 # var greenFrac = rgb_color.green || 0.0;
5715 # var blueFrac = rgb_color.blue || 0.0;
5716 # var red = Math.floor(redFrac * 255);
5717 # var green = Math.floor(greenFrac * 255);
5718 # var blue = Math.floor(blueFrac * 255);
5719 #
5720 # if (!('alpha' in rgb_color)) {
5721 # return rgbToCssColor_(red, green, blue);
5722 # }
5723 #
5724 # var alphaFrac = rgb_color.alpha.value || 0.0;
5725 # var rgbParams = [red, green, blue].join(',');
5726 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5727 # };
5728 #
5729 # var rgbToCssColor_ = function(red, green, blue) {
5730 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5731 # var hexString = rgbNumber.toString(16);
5732 # var missingZeros = 6 - hexString.length;
5733 # var resultBuilder = ['#'];
5734 # for (var i = 0; i < missingZeros; i++) {
5735 # resultBuilder.push('0');
5736 # }
5737 # resultBuilder.push(hexString);
5738 # return resultBuilder.join('');
5739 # };
5740 #
5741 # // ...
5742 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5743 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5744 # the final pixel color is defined by the equation:
5745 #
5746 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5747 #
5748 # This means that a value of 1.0 corresponds to a solid color, whereas
5749 # a value of 0.0 corresponds to a completely transparent color. This
5750 # uses a wrapper message rather than a simple float scalar so that it is
5751 # possible to distinguish between a default value and the value being unset.
5752 # If omitted, this color object is to be rendered as a solid color
5753 # (as if the alpha value had been explicitly given with a value of 1.0).
5754 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5755 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5756 },
5757 "type": "A String", # How the value should be interpreted.
5758 "value": "A String", # The value this interpolation point uses. May be a formula.
5759 # Unused if type is MIN or
5760 # MAX.
5761 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005762 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005763 # These pin the gradient color scale according to the color,
5764 # type and value chosen.
5765 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5766 # for simplicity of conversion to/from color representations in various
5767 # languages over compactness; for example, the fields of this representation
5768 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5769 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5770 # method in iOS; and, with just a little work, it can be easily formatted into
5771 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5772 #
5773 # Example (Java):
5774 #
5775 # import com.google.type.Color;
5776 #
5777 # // ...
5778 # public static java.awt.Color fromProto(Color protocolor) {
5779 # float alpha = protocolor.hasAlpha()
5780 # ? protocolor.getAlpha().getValue()
5781 # : 1.0;
5782 #
5783 # return new java.awt.Color(
5784 # protocolor.getRed(),
5785 # protocolor.getGreen(),
5786 # protocolor.getBlue(),
5787 # alpha);
5788 # }
5789 #
5790 # public static Color toProto(java.awt.Color color) {
5791 # float red = (float) color.getRed();
5792 # float green = (float) color.getGreen();
5793 # float blue = (float) color.getBlue();
5794 # float denominator = 255.0;
5795 # Color.Builder resultBuilder =
5796 # Color
5797 # .newBuilder()
5798 # .setRed(red / denominator)
5799 # .setGreen(green / denominator)
5800 # .setBlue(blue / denominator);
5801 # int alpha = color.getAlpha();
5802 # if (alpha != 255) {
5803 # result.setAlpha(
5804 # FloatValue
5805 # .newBuilder()
5806 # .setValue(((float) alpha) / denominator)
5807 # .build());
5808 # }
5809 # return resultBuilder.build();
5810 # }
5811 # // ...
5812 #
5813 # Example (iOS / Obj-C):
5814 #
5815 # // ...
5816 # static UIColor* fromProto(Color* protocolor) {
5817 # float red = [protocolor red];
5818 # float green = [protocolor green];
5819 # float blue = [protocolor blue];
5820 # FloatValue* alpha_wrapper = [protocolor alpha];
5821 # float alpha = 1.0;
5822 # if (alpha_wrapper != nil) {
5823 # alpha = [alpha_wrapper value];
5824 # }
5825 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5826 # }
5827 #
5828 # static Color* toProto(UIColor* color) {
5829 # CGFloat red, green, blue, alpha;
5830 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5831 # return nil;
5832 # }
5833 # Color* result = [Color alloc] init];
5834 # [result setRed:red];
5835 # [result setGreen:green];
5836 # [result setBlue:blue];
5837 # if (alpha <= 0.9999) {
5838 # [result setAlpha:floatWrapperWithValue(alpha)];
5839 # }
5840 # [result autorelease];
5841 # return result;
5842 # }
5843 # // ...
5844 #
5845 # Example (JavaScript):
5846 #
5847 # // ...
5848 #
5849 # var protoToCssColor = function(rgb_color) {
5850 # var redFrac = rgb_color.red || 0.0;
5851 # var greenFrac = rgb_color.green || 0.0;
5852 # var blueFrac = rgb_color.blue || 0.0;
5853 # var red = Math.floor(redFrac * 255);
5854 # var green = Math.floor(greenFrac * 255);
5855 # var blue = Math.floor(blueFrac * 255);
5856 #
5857 # if (!('alpha' in rgb_color)) {
5858 # return rgbToCssColor_(red, green, blue);
5859 # }
5860 #
5861 # var alphaFrac = rgb_color.alpha.value || 0.0;
5862 # var rgbParams = [red, green, blue].join(',');
5863 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
5864 # };
5865 #
5866 # var rgbToCssColor_ = function(red, green, blue) {
5867 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
5868 # var hexString = rgbNumber.toString(16);
5869 # var missingZeros = 6 - hexString.length;
5870 # var resultBuilder = ['#'];
5871 # for (var i = 0; i < missingZeros; i++) {
5872 # resultBuilder.push('0');
5873 # }
5874 # resultBuilder.push(hexString);
5875 # return resultBuilder.join('');
5876 # };
5877 #
5878 # // ...
5879 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5880 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
5881 # the final pixel color is defined by the equation:
5882 #
5883 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
5884 #
5885 # This means that a value of 1.0 corresponds to a solid color, whereas
5886 # a value of 0.0 corresponds to a completely transparent color. This
5887 # uses a wrapper message rather than a simple float scalar so that it is
5888 # possible to distinguish between a default value and the value being unset.
5889 # If omitted, this color object is to be rendered as a solid color
5890 # (as if the alpha value had been explicitly given with a value of 1.0).
5891 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
5892 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
5893 },
5894 "type": "A String", # How the value should be interpreted.
5895 "value": "A String", # The value this interpolation point uses. May be a formula.
5896 # Unused if type is MIN or
5897 # MAX.
5898 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07005899 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005900 # These pin the gradient color scale according to the color,
5901 # type and value chosen.
5902 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
5903 # for simplicity of conversion to/from color representations in various
5904 # languages over compactness; for example, the fields of this representation
5905 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
5906 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5907 # method in iOS; and, with just a little work, it can be easily formatted into
5908 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
5909 #
5910 # Example (Java):
5911 #
5912 # import com.google.type.Color;
5913 #
5914 # // ...
5915 # public static java.awt.Color fromProto(Color protocolor) {
5916 # float alpha = protocolor.hasAlpha()
5917 # ? protocolor.getAlpha().getValue()
5918 # : 1.0;
5919 #
5920 # return new java.awt.Color(
5921 # protocolor.getRed(),
5922 # protocolor.getGreen(),
5923 # protocolor.getBlue(),
5924 # alpha);
5925 # }
5926 #
5927 # public static Color toProto(java.awt.Color color) {
5928 # float red = (float) color.getRed();
5929 # float green = (float) color.getGreen();
5930 # float blue = (float) color.getBlue();
5931 # float denominator = 255.0;
5932 # Color.Builder resultBuilder =
5933 # Color
5934 # .newBuilder()
5935 # .setRed(red / denominator)
5936 # .setGreen(green / denominator)
5937 # .setBlue(blue / denominator);
5938 # int alpha = color.getAlpha();
5939 # if (alpha != 255) {
5940 # result.setAlpha(
5941 # FloatValue
5942 # .newBuilder()
5943 # .setValue(((float) alpha) / denominator)
5944 # .build());
5945 # }
5946 # return resultBuilder.build();
5947 # }
5948 # // ...
5949 #
5950 # Example (iOS / Obj-C):
5951 #
5952 # // ...
5953 # static UIColor* fromProto(Color* protocolor) {
5954 # float red = [protocolor red];
5955 # float green = [protocolor green];
5956 # float blue = [protocolor blue];
5957 # FloatValue* alpha_wrapper = [protocolor alpha];
5958 # float alpha = 1.0;
5959 # if (alpha_wrapper != nil) {
5960 # alpha = [alpha_wrapper value];
5961 # }
5962 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
5963 # }
5964 #
5965 # static Color* toProto(UIColor* color) {
5966 # CGFloat red, green, blue, alpha;
5967 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
5968 # return nil;
5969 # }
5970 # Color* result = [Color alloc] init];
5971 # [result setRed:red];
5972 # [result setGreen:green];
5973 # [result setBlue:blue];
5974 # if (alpha <= 0.9999) {
5975 # [result setAlpha:floatWrapperWithValue(alpha)];
5976 # }
5977 # [result autorelease];
5978 # return result;
5979 # }
5980 # // ...
5981 #
5982 # Example (JavaScript):
5983 #
5984 # // ...
5985 #
5986 # var protoToCssColor = function(rgb_color) {
5987 # var redFrac = rgb_color.red || 0.0;
5988 # var greenFrac = rgb_color.green || 0.0;
5989 # var blueFrac = rgb_color.blue || 0.0;
5990 # var red = Math.floor(redFrac * 255);
5991 # var green = Math.floor(greenFrac * 255);
5992 # var blue = Math.floor(blueFrac * 255);
5993 #
5994 # if (!('alpha' in rgb_color)) {
5995 # return rgbToCssColor_(red, green, blue);
5996 # }
5997 #
5998 # var alphaFrac = rgb_color.alpha.value || 0.0;
5999 # var rgbParams = [red, green, blue].join(',');
6000 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6001 # };
6002 #
6003 # var rgbToCssColor_ = function(red, green, blue) {
6004 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6005 # var hexString = rgbNumber.toString(16);
6006 # var missingZeros = 6 - hexString.length;
6007 # var resultBuilder = ['#'];
6008 # for (var i = 0; i < missingZeros; i++) {
6009 # resultBuilder.push('0');
6010 # }
6011 # resultBuilder.push(hexString);
6012 # return resultBuilder.join('');
6013 # };
6014 #
6015 # // ...
6016 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6017 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6018 # the final pixel color is defined by the equation:
6019 #
6020 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6021 #
6022 # This means that a value of 1.0 corresponds to a solid color, whereas
6023 # a value of 0.0 corresponds to a completely transparent color. This
6024 # uses a wrapper message rather than a simple float scalar so that it is
6025 # possible to distinguish between a default value and the value being unset.
6026 # If omitted, this color object is to be rendered as a solid color
6027 # (as if the alpha value had been explicitly given with a value of 1.0).
6028 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6029 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6030 },
6031 "type": "A String", # How the value should be interpreted.
6032 "value": "A String", # The value this interpolation point uses. May be a formula.
6033 # Unused if type is MIN or
6034 # MAX.
6035 },
6036 },
6037 },
6038 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08006039 "deleteBanding": { # Removes the banded range with the given ID from the spreadsheet. # Removes a banded range
6040 "bandedRangeId": 42, # The ID of the banded range to delete.
6041 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006042 "repeatCell": { # Updates all cells in the range to the values in the given Cell object. # Repeats a single cell across a range.
6043 # Only the fields listed in the fields field are updated; others are
6044 # unchanged.
6045 #
6046 # If writing a cell with a formula, the formula's ranges will automatically
6047 # increment for each field in the range.
6048 # For example, if writing a cell with formula `=A1` into range B2:C4,
6049 # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
6050 # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
6051 #
6052 # To keep the formula's ranges static, use the `$` indicator.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006053 # For example, use the formula `=$A$1` to prevent both the row and the
6054 # column from incrementing.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006055 "cell": { # Data about a specific cell. # The data to write.
6056 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
6057 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006058 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006059 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006060 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006061 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
6062 # or vertically (as rows).
6063 "rows": [ # Each row grouping in the pivot table.
6064 { # A single grouping (either row or column) in a pivot table.
6065 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6066 "valueMetadata": [ # Metadata about values in the grouping.
6067 { # Metadata about a value in a pivot grouping.
6068 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6069 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6070 # (Note that formulaValue is not valid,
6071 # because the values will be calculated.)
6072 "numberValue": 3.14, # Represents a double value.
6073 # Note: Dates, Times and DateTimes are represented as doubles in
6074 # "serial number" format.
6075 "boolValue": True or False, # Represents a boolean value.
6076 "formulaValue": "A String", # Represents a formula.
6077 "stringValue": "A String", # Represents a string value.
6078 # Leading single quotes are not included. For example, if the user typed
6079 # `'123` into the UI, this would be represented as a `stringValue` of
6080 # `"123"`.
6081 "errorValue": { # An error in a cell. # Represents an error.
6082 # This field is read-only.
6083 "message": "A String", # A message with more information about the error
6084 # (in the spreadsheet's locale).
6085 "type": "A String", # The type of error.
6086 },
6087 },
6088 },
6089 ],
6090 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6091 # If not specified, sorting is alphabetical by this group's values.
6092 "buckets": [ # Determines the bucket from which values are chosen to sort.
6093 #
6094 # For example, in a pivot table with one row group & two column groups,
6095 # the row group can list up to two values. The first value corresponds
6096 # to a value within the first column group, and the second value
6097 # corresponds to a value in the second column group. If no values
6098 # are listed, this would indicate that the row should be sorted according
6099 # to the "Grand Total" over the column groups. If a single value is listed,
6100 # this would correspond to using the "Total" of that bucket.
6101 { # The kinds of value that a cell in a spreadsheet can have.
6102 "numberValue": 3.14, # Represents a double value.
6103 # Note: Dates, Times and DateTimes are represented as doubles in
6104 # "serial number" format.
6105 "boolValue": True or False, # Represents a boolean value.
6106 "formulaValue": "A String", # Represents a formula.
6107 "stringValue": "A String", # Represents a string value.
6108 # Leading single quotes are not included. For example, if the user typed
6109 # `'123` into the UI, this would be represented as a `stringValue` of
6110 # `"123"`.
6111 "errorValue": { # An error in a cell. # Represents an error.
6112 # This field is read-only.
6113 "message": "A String", # A message with more information about the error
6114 # (in the spreadsheet's locale).
6115 "type": "A String", # The type of error.
6116 },
6117 },
6118 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006119 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006120 # grouping should be sorted by.
6121 },
6122 "sortOrder": "A String", # The order the values in this group should be sorted.
6123 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6124 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006125 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006126 # means this group refers to column `C`, whereas the offset `1` would refer
6127 # to column `D`.
6128 },
6129 ],
6130 "source": { # A range on a sheet. # The range the pivot table is reading data from.
6131 # All indexes are zero-based.
6132 # Indexes are half open, e.g the start index is inclusive
6133 # and the end index is exclusive -- [start_index, end_index).
6134 # Missing indexes indicate the range is unbounded on that side.
6135 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006136 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006137 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006138 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006139 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006140 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006141 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006142 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006143 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006144 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006145 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006146 # `Sheet1!A:B == sheet_id: 0,
6147 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006148 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006149 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006150 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006151 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006152 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006153 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006154 #
6155 # The start index must always be less than or equal to the end index.
6156 # If the start index equals the end index, then the range is empty.
6157 # Empty ranges are typically not meaningful and are usually rendered in the
6158 # UI as `#REF!`.
6159 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006160 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006161 "sheetId": 42, # The sheet this range is on.
6162 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006163 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006164 },
6165 "values": [ # A list of values to include in the pivot table.
6166 { # The definition of how a value in a pivot table should be calculated.
6167 "formula": "A String", # A custom formula to calculate the value. The formula must start
6168 # with an `=` character.
6169 "summarizeFunction": "A String", # A function to summarize the value.
6170 # If formula is set, the only supported values are
6171 # SUM and
6172 # CUSTOM.
6173 # If sourceColumnOffset is set, then `CUSTOM`
6174 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006175 "name": "A String", # A name to use for the value. This is only used if formula was set.
6176 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006177 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
6178 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006179 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006180 # means this value refers to column `C`, whereas the offset `1` would
6181 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006182 },
6183 ],
6184 "criteria": { # An optional mapping of filters per source column offset.
6185 #
6186 # The filters will be applied before aggregating data into the pivot table.
6187 # The map's key is the column offset of the source range that you want to
6188 # filter, and the value is the criteria for that column.
6189 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006190 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006191 # for column `C`, whereas the key `1` is for column `D`.
6192 "a_key": { # Criteria for showing/hiding rows in a pivot table.
6193 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
6194 "A String",
6195 ],
6196 },
6197 },
6198 "columns": [ # Each column grouping in the pivot table.
6199 { # A single grouping (either row or column) in a pivot table.
6200 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
6201 "valueMetadata": [ # Metadata about values in the grouping.
6202 { # Metadata about a value in a pivot grouping.
6203 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
6204 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
6205 # (Note that formulaValue is not valid,
6206 # because the values will be calculated.)
6207 "numberValue": 3.14, # Represents a double value.
6208 # Note: Dates, Times and DateTimes are represented as doubles in
6209 # "serial number" format.
6210 "boolValue": True or False, # Represents a boolean value.
6211 "formulaValue": "A String", # Represents a formula.
6212 "stringValue": "A String", # Represents a string value.
6213 # Leading single quotes are not included. For example, if the user typed
6214 # `'123` into the UI, this would be represented as a `stringValue` of
6215 # `"123"`.
6216 "errorValue": { # An error in a cell. # Represents an error.
6217 # This field is read-only.
6218 "message": "A String", # A message with more information about the error
6219 # (in the spreadsheet's locale).
6220 "type": "A String", # The type of error.
6221 },
6222 },
6223 },
6224 ],
6225 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
6226 # If not specified, sorting is alphabetical by this group's values.
6227 "buckets": [ # Determines the bucket from which values are chosen to sort.
6228 #
6229 # For example, in a pivot table with one row group & two column groups,
6230 # the row group can list up to two values. The first value corresponds
6231 # to a value within the first column group, and the second value
6232 # corresponds to a value in the second column group. If no values
6233 # are listed, this would indicate that the row should be sorted according
6234 # to the "Grand Total" over the column groups. If a single value is listed,
6235 # this would correspond to using the "Total" of that bucket.
6236 { # The kinds of value that a cell in a spreadsheet can have.
6237 "numberValue": 3.14, # Represents a double value.
6238 # Note: Dates, Times and DateTimes are represented as doubles in
6239 # "serial number" format.
6240 "boolValue": True or False, # Represents a boolean value.
6241 "formulaValue": "A String", # Represents a formula.
6242 "stringValue": "A String", # Represents a string value.
6243 # Leading single quotes are not included. For example, if the user typed
6244 # `'123` into the UI, this would be represented as a `stringValue` of
6245 # `"123"`.
6246 "errorValue": { # An error in a cell. # Represents an error.
6247 # This field is read-only.
6248 "message": "A String", # A message with more information about the error
6249 # (in the spreadsheet's locale).
6250 "type": "A String", # The type of error.
6251 },
6252 },
6253 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006254 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006255 # grouping should be sorted by.
6256 },
6257 "sortOrder": "A String", # The order the values in this group should be sorted.
6258 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
6259 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006260 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006261 # means this group refers to column `C`, whereas the offset `1` would refer
6262 # to column `D`.
6263 },
6264 ],
6265 },
6266 "hyperlink": "A String", # A hyperlink this cell points to, if any.
6267 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
6268 "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
6269 # the calculated value. For cells with literals, this will be
6270 # the same as the user_entered_value.
6271 # This field is read-only.
6272 "numberValue": 3.14, # Represents a double value.
6273 # Note: Dates, Times and DateTimes are represented as doubles in
6274 # "serial number" format.
6275 "boolValue": True or False, # Represents a boolean value.
6276 "formulaValue": "A String", # Represents a formula.
6277 "stringValue": "A String", # Represents a string value.
6278 # Leading single quotes are not included. For example, if the user typed
6279 # `'123` into the UI, this would be represented as a `stringValue` of
6280 # `"123"`.
6281 "errorValue": { # An error in a cell. # Represents an error.
6282 # This field is read-only.
6283 "message": "A String", # A message with more information about the error
6284 # (in the spreadsheet's locale).
6285 "type": "A String", # The type of error.
6286 },
6287 },
6288 "formattedValue": "A String", # The formatted value of the cell.
6289 # This is the value as it's shown to the user.
6290 # This field is read-only.
6291 "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()`
6292 # Note: Dates, Times and DateTimes are represented as doubles in
6293 # serial number format.
6294 "numberValue": 3.14, # Represents a double value.
6295 # Note: Dates, Times and DateTimes are represented as doubles in
6296 # "serial number" format.
6297 "boolValue": True or False, # Represents a boolean value.
6298 "formulaValue": "A String", # Represents a formula.
6299 "stringValue": "A String", # Represents a string value.
6300 # Leading single quotes are not included. For example, if the user typed
6301 # `'123` into the UI, this would be represented as a `stringValue` of
6302 # `"123"`.
6303 "errorValue": { # An error in a cell. # Represents an error.
6304 # This field is read-only.
6305 "message": "A String", # A message with more information about the error
6306 # (in the spreadsheet's locale).
6307 "type": "A String", # The type of error.
6308 },
6309 },
6310 "note": "A String", # Any note on the cell.
6311 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
6312 # This includes the results of applying any conditional formatting and,
6313 # if the cell contains a formula, the computed number format.
6314 # If the effective format is the default format, effective format will
6315 # not be written.
6316 # This field is read-only.
6317 "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 -07006318 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
6319 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006320 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07006321 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006322 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006323 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006324 },
6325 "textDirection": "A String", # The direction of the text in the cell.
6326 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
6327 # When updating padding, every field must be specified.
6328 "top": 42, # The top padding of the cell.
6329 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006330 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006331 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006332 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006333 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006334 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
6335 # for simplicity of conversion to/from color representations in various
6336 # languages over compactness; for example, the fields of this representation
6337 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6338 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6339 # method in iOS; and, with just a little work, it can be easily formatted into
6340 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6341 #
6342 # Example (Java):
6343 #
6344 # import com.google.type.Color;
6345 #
6346 # // ...
6347 # public static java.awt.Color fromProto(Color protocolor) {
6348 # float alpha = protocolor.hasAlpha()
6349 # ? protocolor.getAlpha().getValue()
6350 # : 1.0;
6351 #
6352 # return new java.awt.Color(
6353 # protocolor.getRed(),
6354 # protocolor.getGreen(),
6355 # protocolor.getBlue(),
6356 # alpha);
6357 # }
6358 #
6359 # public static Color toProto(java.awt.Color color) {
6360 # float red = (float) color.getRed();
6361 # float green = (float) color.getGreen();
6362 # float blue = (float) color.getBlue();
6363 # float denominator = 255.0;
6364 # Color.Builder resultBuilder =
6365 # Color
6366 # .newBuilder()
6367 # .setRed(red / denominator)
6368 # .setGreen(green / denominator)
6369 # .setBlue(blue / denominator);
6370 # int alpha = color.getAlpha();
6371 # if (alpha != 255) {
6372 # result.setAlpha(
6373 # FloatValue
6374 # .newBuilder()
6375 # .setValue(((float) alpha) / denominator)
6376 # .build());
6377 # }
6378 # return resultBuilder.build();
6379 # }
6380 # // ...
6381 #
6382 # Example (iOS / Obj-C):
6383 #
6384 # // ...
6385 # static UIColor* fromProto(Color* protocolor) {
6386 # float red = [protocolor red];
6387 # float green = [protocolor green];
6388 # float blue = [protocolor blue];
6389 # FloatValue* alpha_wrapper = [protocolor alpha];
6390 # float alpha = 1.0;
6391 # if (alpha_wrapper != nil) {
6392 # alpha = [alpha_wrapper value];
6393 # }
6394 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6395 # }
6396 #
6397 # static Color* toProto(UIColor* color) {
6398 # CGFloat red, green, blue, alpha;
6399 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6400 # return nil;
6401 # }
6402 # Color* result = [Color alloc] init];
6403 # [result setRed:red];
6404 # [result setGreen:green];
6405 # [result setBlue:blue];
6406 # if (alpha <= 0.9999) {
6407 # [result setAlpha:floatWrapperWithValue(alpha)];
6408 # }
6409 # [result autorelease];
6410 # return result;
6411 # }
6412 # // ...
6413 #
6414 # Example (JavaScript):
6415 #
6416 # // ...
6417 #
6418 # var protoToCssColor = function(rgb_color) {
6419 # var redFrac = rgb_color.red || 0.0;
6420 # var greenFrac = rgb_color.green || 0.0;
6421 # var blueFrac = rgb_color.blue || 0.0;
6422 # var red = Math.floor(redFrac * 255);
6423 # var green = Math.floor(greenFrac * 255);
6424 # var blue = Math.floor(blueFrac * 255);
6425 #
6426 # if (!('alpha' in rgb_color)) {
6427 # return rgbToCssColor_(red, green, blue);
6428 # }
6429 #
6430 # var alphaFrac = rgb_color.alpha.value || 0.0;
6431 # var rgbParams = [red, green, blue].join(',');
6432 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6433 # };
6434 #
6435 # var rgbToCssColor_ = function(red, green, blue) {
6436 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6437 # var hexString = rgbNumber.toString(16);
6438 # var missingZeros = 6 - hexString.length;
6439 # var resultBuilder = ['#'];
6440 # for (var i = 0; i < missingZeros; i++) {
6441 # resultBuilder.push('0');
6442 # }
6443 # resultBuilder.push(hexString);
6444 # return resultBuilder.join('');
6445 # };
6446 #
6447 # // ...
6448 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6449 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6450 # the final pixel color is defined by the equation:
6451 #
6452 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6453 #
6454 # This means that a value of 1.0 corresponds to a solid color, whereas
6455 # a value of 0.0 corresponds to a completely transparent color. This
6456 # uses a wrapper message rather than a simple float scalar so that it is
6457 # possible to distinguish between a default value and the value being unset.
6458 # If omitted, this color object is to be rendered as a solid color
6459 # (as if the alpha value had been explicitly given with a value of 1.0).
6460 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6461 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6462 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07006463 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006464 "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).
6465 # Absent values indicate that the field isn't specified.
6466 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
6467 # for simplicity of conversion to/from color representations in various
6468 # languages over compactness; for example, the fields of this representation
6469 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6470 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6471 # method in iOS; and, with just a little work, it can be easily formatted into
6472 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6473 #
6474 # Example (Java):
6475 #
6476 # import com.google.type.Color;
6477 #
6478 # // ...
6479 # public static java.awt.Color fromProto(Color protocolor) {
6480 # float alpha = protocolor.hasAlpha()
6481 # ? protocolor.getAlpha().getValue()
6482 # : 1.0;
6483 #
6484 # return new java.awt.Color(
6485 # protocolor.getRed(),
6486 # protocolor.getGreen(),
6487 # protocolor.getBlue(),
6488 # alpha);
6489 # }
6490 #
6491 # public static Color toProto(java.awt.Color color) {
6492 # float red = (float) color.getRed();
6493 # float green = (float) color.getGreen();
6494 # float blue = (float) color.getBlue();
6495 # float denominator = 255.0;
6496 # Color.Builder resultBuilder =
6497 # Color
6498 # .newBuilder()
6499 # .setRed(red / denominator)
6500 # .setGreen(green / denominator)
6501 # .setBlue(blue / denominator);
6502 # int alpha = color.getAlpha();
6503 # if (alpha != 255) {
6504 # result.setAlpha(
6505 # FloatValue
6506 # .newBuilder()
6507 # .setValue(((float) alpha) / denominator)
6508 # .build());
6509 # }
6510 # return resultBuilder.build();
6511 # }
6512 # // ...
6513 #
6514 # Example (iOS / Obj-C):
6515 #
6516 # // ...
6517 # static UIColor* fromProto(Color* protocolor) {
6518 # float red = [protocolor red];
6519 # float green = [protocolor green];
6520 # float blue = [protocolor blue];
6521 # FloatValue* alpha_wrapper = [protocolor alpha];
6522 # float alpha = 1.0;
6523 # if (alpha_wrapper != nil) {
6524 # alpha = [alpha_wrapper value];
6525 # }
6526 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6527 # }
6528 #
6529 # static Color* toProto(UIColor* color) {
6530 # CGFloat red, green, blue, alpha;
6531 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6532 # return nil;
6533 # }
6534 # Color* result = [Color alloc] init];
6535 # [result setRed:red];
6536 # [result setGreen:green];
6537 # [result setBlue:blue];
6538 # if (alpha <= 0.9999) {
6539 # [result setAlpha:floatWrapperWithValue(alpha)];
6540 # }
6541 # [result autorelease];
6542 # return result;
6543 # }
6544 # // ...
6545 #
6546 # Example (JavaScript):
6547 #
6548 # // ...
6549 #
6550 # var protoToCssColor = function(rgb_color) {
6551 # var redFrac = rgb_color.red || 0.0;
6552 # var greenFrac = rgb_color.green || 0.0;
6553 # var blueFrac = rgb_color.blue || 0.0;
6554 # var red = Math.floor(redFrac * 255);
6555 # var green = Math.floor(greenFrac * 255);
6556 # var blue = Math.floor(blueFrac * 255);
6557 #
6558 # if (!('alpha' in rgb_color)) {
6559 # return rgbToCssColor_(red, green, blue);
6560 # }
6561 #
6562 # var alphaFrac = rgb_color.alpha.value || 0.0;
6563 # var rgbParams = [red, green, blue].join(',');
6564 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6565 # };
6566 #
6567 # var rgbToCssColor_ = function(red, green, blue) {
6568 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6569 # var hexString = rgbNumber.toString(16);
6570 # var missingZeros = 6 - hexString.length;
6571 # var resultBuilder = ['#'];
6572 # for (var i = 0; i < missingZeros; i++) {
6573 # resultBuilder.push('0');
6574 # }
6575 # resultBuilder.push(hexString);
6576 # return resultBuilder.join('');
6577 # };
6578 #
6579 # // ...
6580 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6581 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6582 # the final pixel color is defined by the equation:
6583 #
6584 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6585 #
6586 # This means that a value of 1.0 corresponds to a solid color, whereas
6587 # a value of 0.0 corresponds to a completely transparent color. This
6588 # uses a wrapper message rather than a simple float scalar so that it is
6589 # possible to distinguish between a default value and the value being unset.
6590 # If omitted, this color object is to be rendered as a solid color
6591 # (as if the alpha value had been explicitly given with a value of 1.0).
6592 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6593 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6594 },
6595 "bold": True or False, # True if the text is bold.
6596 "strikethrough": True or False, # True if the text has a strikethrough.
6597 "fontFamily": "A String", # The font family.
6598 "fontSize": 42, # The size of the font.
6599 "italic": True or False, # True if the text is italicized.
6600 "underline": True or False, # True if the text is underlined.
6601 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006602 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006603 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
6604 "borders": { # The borders of the cell. # The borders of the cell.
6605 "top": { # A border along a cell. # The top border of the cell.
6606 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6607 # for simplicity of conversion to/from color representations in various
6608 # languages over compactness; for example, the fields of this representation
6609 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6610 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6611 # method in iOS; and, with just a little work, it can be easily formatted into
6612 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6613 #
6614 # Example (Java):
6615 #
6616 # import com.google.type.Color;
6617 #
6618 # // ...
6619 # public static java.awt.Color fromProto(Color protocolor) {
6620 # float alpha = protocolor.hasAlpha()
6621 # ? protocolor.getAlpha().getValue()
6622 # : 1.0;
6623 #
6624 # return new java.awt.Color(
6625 # protocolor.getRed(),
6626 # protocolor.getGreen(),
6627 # protocolor.getBlue(),
6628 # alpha);
6629 # }
6630 #
6631 # public static Color toProto(java.awt.Color color) {
6632 # float red = (float) color.getRed();
6633 # float green = (float) color.getGreen();
6634 # float blue = (float) color.getBlue();
6635 # float denominator = 255.0;
6636 # Color.Builder resultBuilder =
6637 # Color
6638 # .newBuilder()
6639 # .setRed(red / denominator)
6640 # .setGreen(green / denominator)
6641 # .setBlue(blue / denominator);
6642 # int alpha = color.getAlpha();
6643 # if (alpha != 255) {
6644 # result.setAlpha(
6645 # FloatValue
6646 # .newBuilder()
6647 # .setValue(((float) alpha) / denominator)
6648 # .build());
6649 # }
6650 # return resultBuilder.build();
6651 # }
6652 # // ...
6653 #
6654 # Example (iOS / Obj-C):
6655 #
6656 # // ...
6657 # static UIColor* fromProto(Color* protocolor) {
6658 # float red = [protocolor red];
6659 # float green = [protocolor green];
6660 # float blue = [protocolor blue];
6661 # FloatValue* alpha_wrapper = [protocolor alpha];
6662 # float alpha = 1.0;
6663 # if (alpha_wrapper != nil) {
6664 # alpha = [alpha_wrapper value];
6665 # }
6666 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6667 # }
6668 #
6669 # static Color* toProto(UIColor* color) {
6670 # CGFloat red, green, blue, alpha;
6671 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6672 # return nil;
6673 # }
6674 # Color* result = [Color alloc] init];
6675 # [result setRed:red];
6676 # [result setGreen:green];
6677 # [result setBlue:blue];
6678 # if (alpha <= 0.9999) {
6679 # [result setAlpha:floatWrapperWithValue(alpha)];
6680 # }
6681 # [result autorelease];
6682 # return result;
6683 # }
6684 # // ...
6685 #
6686 # Example (JavaScript):
6687 #
6688 # // ...
6689 #
6690 # var protoToCssColor = function(rgb_color) {
6691 # var redFrac = rgb_color.red || 0.0;
6692 # var greenFrac = rgb_color.green || 0.0;
6693 # var blueFrac = rgb_color.blue || 0.0;
6694 # var red = Math.floor(redFrac * 255);
6695 # var green = Math.floor(greenFrac * 255);
6696 # var blue = Math.floor(blueFrac * 255);
6697 #
6698 # if (!('alpha' in rgb_color)) {
6699 # return rgbToCssColor_(red, green, blue);
6700 # }
6701 #
6702 # var alphaFrac = rgb_color.alpha.value || 0.0;
6703 # var rgbParams = [red, green, blue].join(',');
6704 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6705 # };
6706 #
6707 # var rgbToCssColor_ = function(red, green, blue) {
6708 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6709 # var hexString = rgbNumber.toString(16);
6710 # var missingZeros = 6 - hexString.length;
6711 # var resultBuilder = ['#'];
6712 # for (var i = 0; i < missingZeros; i++) {
6713 # resultBuilder.push('0');
6714 # }
6715 # resultBuilder.push(hexString);
6716 # return resultBuilder.join('');
6717 # };
6718 #
6719 # // ...
6720 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6721 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6722 # the final pixel color is defined by the equation:
6723 #
6724 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6725 #
6726 # This means that a value of 1.0 corresponds to a solid color, whereas
6727 # a value of 0.0 corresponds to a completely transparent color. This
6728 # uses a wrapper message rather than a simple float scalar so that it is
6729 # possible to distinguish between a default value and the value being unset.
6730 # If omitted, this color object is to be rendered as a solid color
6731 # (as if the alpha value had been explicitly given with a value of 1.0).
6732 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6733 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6734 },
6735 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006736 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006737 "style": "A String", # The style of the border.
6738 },
6739 "right": { # A border along a cell. # The right border of the cell.
6740 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6741 # for simplicity of conversion to/from color representations in various
6742 # languages over compactness; for example, the fields of this representation
6743 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6744 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6745 # method in iOS; and, with just a little work, it can be easily formatted into
6746 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6747 #
6748 # Example (Java):
6749 #
6750 # import com.google.type.Color;
6751 #
6752 # // ...
6753 # public static java.awt.Color fromProto(Color protocolor) {
6754 # float alpha = protocolor.hasAlpha()
6755 # ? protocolor.getAlpha().getValue()
6756 # : 1.0;
6757 #
6758 # return new java.awt.Color(
6759 # protocolor.getRed(),
6760 # protocolor.getGreen(),
6761 # protocolor.getBlue(),
6762 # alpha);
6763 # }
6764 #
6765 # public static Color toProto(java.awt.Color color) {
6766 # float red = (float) color.getRed();
6767 # float green = (float) color.getGreen();
6768 # float blue = (float) color.getBlue();
6769 # float denominator = 255.0;
6770 # Color.Builder resultBuilder =
6771 # Color
6772 # .newBuilder()
6773 # .setRed(red / denominator)
6774 # .setGreen(green / denominator)
6775 # .setBlue(blue / denominator);
6776 # int alpha = color.getAlpha();
6777 # if (alpha != 255) {
6778 # result.setAlpha(
6779 # FloatValue
6780 # .newBuilder()
6781 # .setValue(((float) alpha) / denominator)
6782 # .build());
6783 # }
6784 # return resultBuilder.build();
6785 # }
6786 # // ...
6787 #
6788 # Example (iOS / Obj-C):
6789 #
6790 # // ...
6791 # static UIColor* fromProto(Color* protocolor) {
6792 # float red = [protocolor red];
6793 # float green = [protocolor green];
6794 # float blue = [protocolor blue];
6795 # FloatValue* alpha_wrapper = [protocolor alpha];
6796 # float alpha = 1.0;
6797 # if (alpha_wrapper != nil) {
6798 # alpha = [alpha_wrapper value];
6799 # }
6800 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6801 # }
6802 #
6803 # static Color* toProto(UIColor* color) {
6804 # CGFloat red, green, blue, alpha;
6805 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6806 # return nil;
6807 # }
6808 # Color* result = [Color alloc] init];
6809 # [result setRed:red];
6810 # [result setGreen:green];
6811 # [result setBlue:blue];
6812 # if (alpha <= 0.9999) {
6813 # [result setAlpha:floatWrapperWithValue(alpha)];
6814 # }
6815 # [result autorelease];
6816 # return result;
6817 # }
6818 # // ...
6819 #
6820 # Example (JavaScript):
6821 #
6822 # // ...
6823 #
6824 # var protoToCssColor = function(rgb_color) {
6825 # var redFrac = rgb_color.red || 0.0;
6826 # var greenFrac = rgb_color.green || 0.0;
6827 # var blueFrac = rgb_color.blue || 0.0;
6828 # var red = Math.floor(redFrac * 255);
6829 # var green = Math.floor(greenFrac * 255);
6830 # var blue = Math.floor(blueFrac * 255);
6831 #
6832 # if (!('alpha' in rgb_color)) {
6833 # return rgbToCssColor_(red, green, blue);
6834 # }
6835 #
6836 # var alphaFrac = rgb_color.alpha.value || 0.0;
6837 # var rgbParams = [red, green, blue].join(',');
6838 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6839 # };
6840 #
6841 # var rgbToCssColor_ = function(red, green, blue) {
6842 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6843 # var hexString = rgbNumber.toString(16);
6844 # var missingZeros = 6 - hexString.length;
6845 # var resultBuilder = ['#'];
6846 # for (var i = 0; i < missingZeros; i++) {
6847 # resultBuilder.push('0');
6848 # }
6849 # resultBuilder.push(hexString);
6850 # return resultBuilder.join('');
6851 # };
6852 #
6853 # // ...
6854 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6855 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6856 # the final pixel color is defined by the equation:
6857 #
6858 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6859 #
6860 # This means that a value of 1.0 corresponds to a solid color, whereas
6861 # a value of 0.0 corresponds to a completely transparent color. This
6862 # uses a wrapper message rather than a simple float scalar so that it is
6863 # possible to distinguish between a default value and the value being unset.
6864 # If omitted, this color object is to be rendered as a solid color
6865 # (as if the alpha value had been explicitly given with a value of 1.0).
6866 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
6867 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
6868 },
6869 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006870 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07006871 "style": "A String", # The style of the border.
6872 },
6873 "bottom": { # A border along a cell. # The bottom border of the cell.
6874 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
6875 # for simplicity of conversion to/from color representations in various
6876 # languages over compactness; for example, the fields of this representation
6877 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
6878 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6879 # method in iOS; and, with just a little work, it can be easily formatted into
6880 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
6881 #
6882 # Example (Java):
6883 #
6884 # import com.google.type.Color;
6885 #
6886 # // ...
6887 # public static java.awt.Color fromProto(Color protocolor) {
6888 # float alpha = protocolor.hasAlpha()
6889 # ? protocolor.getAlpha().getValue()
6890 # : 1.0;
6891 #
6892 # return new java.awt.Color(
6893 # protocolor.getRed(),
6894 # protocolor.getGreen(),
6895 # protocolor.getBlue(),
6896 # alpha);
6897 # }
6898 #
6899 # public static Color toProto(java.awt.Color color) {
6900 # float red = (float) color.getRed();
6901 # float green = (float) color.getGreen();
6902 # float blue = (float) color.getBlue();
6903 # float denominator = 255.0;
6904 # Color.Builder resultBuilder =
6905 # Color
6906 # .newBuilder()
6907 # .setRed(red / denominator)
6908 # .setGreen(green / denominator)
6909 # .setBlue(blue / denominator);
6910 # int alpha = color.getAlpha();
6911 # if (alpha != 255) {
6912 # result.setAlpha(
6913 # FloatValue
6914 # .newBuilder()
6915 # .setValue(((float) alpha) / denominator)
6916 # .build());
6917 # }
6918 # return resultBuilder.build();
6919 # }
6920 # // ...
6921 #
6922 # Example (iOS / Obj-C):
6923 #
6924 # // ...
6925 # static UIColor* fromProto(Color* protocolor) {
6926 # float red = [protocolor red];
6927 # float green = [protocolor green];
6928 # float blue = [protocolor blue];
6929 # FloatValue* alpha_wrapper = [protocolor alpha];
6930 # float alpha = 1.0;
6931 # if (alpha_wrapper != nil) {
6932 # alpha = [alpha_wrapper value];
6933 # }
6934 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
6935 # }
6936 #
6937 # static Color* toProto(UIColor* color) {
6938 # CGFloat red, green, blue, alpha;
6939 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
6940 # return nil;
6941 # }
6942 # Color* result = [Color alloc] init];
6943 # [result setRed:red];
6944 # [result setGreen:green];
6945 # [result setBlue:blue];
6946 # if (alpha <= 0.9999) {
6947 # [result setAlpha:floatWrapperWithValue(alpha)];
6948 # }
6949 # [result autorelease];
6950 # return result;
6951 # }
6952 # // ...
6953 #
6954 # Example (JavaScript):
6955 #
6956 # // ...
6957 #
6958 # var protoToCssColor = function(rgb_color) {
6959 # var redFrac = rgb_color.red || 0.0;
6960 # var greenFrac = rgb_color.green || 0.0;
6961 # var blueFrac = rgb_color.blue || 0.0;
6962 # var red = Math.floor(redFrac * 255);
6963 # var green = Math.floor(greenFrac * 255);
6964 # var blue = Math.floor(blueFrac * 255);
6965 #
6966 # if (!('alpha' in rgb_color)) {
6967 # return rgbToCssColor_(red, green, blue);
6968 # }
6969 #
6970 # var alphaFrac = rgb_color.alpha.value || 0.0;
6971 # var rgbParams = [red, green, blue].join(',');
6972 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
6973 # };
6974 #
6975 # var rgbToCssColor_ = function(red, green, blue) {
6976 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
6977 # var hexString = rgbNumber.toString(16);
6978 # var missingZeros = 6 - hexString.length;
6979 # var resultBuilder = ['#'];
6980 # for (var i = 0; i < missingZeros; i++) {
6981 # resultBuilder.push('0');
6982 # }
6983 # resultBuilder.push(hexString);
6984 # return resultBuilder.join('');
6985 # };
6986 #
6987 # // ...
6988 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6989 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
6990 # the final pixel color is defined by the equation:
6991 #
6992 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
6993 #
6994 # This means that a value of 1.0 corresponds to a solid color, whereas
6995 # a value of 0.0 corresponds to a completely transparent color. This
6996 # uses a wrapper message rather than a simple float scalar so that it is
6997 # possible to distinguish between a default value and the value being unset.
6998 # If omitted, this color object is to be rendered as a solid color
6999 # (as if the alpha value had been explicitly given with a value of 1.0).
7000 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7001 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7002 },
7003 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007004 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007005 "style": "A String", # The style of the border.
7006 },
7007 "left": { # A border along a cell. # The left border of the cell.
7008 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7009 # for simplicity of conversion to/from color representations in various
7010 # languages over compactness; for example, the fields of this representation
7011 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7012 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7013 # method in iOS; and, with just a little work, it can be easily formatted into
7014 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7015 #
7016 # Example (Java):
7017 #
7018 # import com.google.type.Color;
7019 #
7020 # // ...
7021 # public static java.awt.Color fromProto(Color protocolor) {
7022 # float alpha = protocolor.hasAlpha()
7023 # ? protocolor.getAlpha().getValue()
7024 # : 1.0;
7025 #
7026 # return new java.awt.Color(
7027 # protocolor.getRed(),
7028 # protocolor.getGreen(),
7029 # protocolor.getBlue(),
7030 # alpha);
7031 # }
7032 #
7033 # public static Color toProto(java.awt.Color color) {
7034 # float red = (float) color.getRed();
7035 # float green = (float) color.getGreen();
7036 # float blue = (float) color.getBlue();
7037 # float denominator = 255.0;
7038 # Color.Builder resultBuilder =
7039 # Color
7040 # .newBuilder()
7041 # .setRed(red / denominator)
7042 # .setGreen(green / denominator)
7043 # .setBlue(blue / denominator);
7044 # int alpha = color.getAlpha();
7045 # if (alpha != 255) {
7046 # result.setAlpha(
7047 # FloatValue
7048 # .newBuilder()
7049 # .setValue(((float) alpha) / denominator)
7050 # .build());
7051 # }
7052 # return resultBuilder.build();
7053 # }
7054 # // ...
7055 #
7056 # Example (iOS / Obj-C):
7057 #
7058 # // ...
7059 # static UIColor* fromProto(Color* protocolor) {
7060 # float red = [protocolor red];
7061 # float green = [protocolor green];
7062 # float blue = [protocolor blue];
7063 # FloatValue* alpha_wrapper = [protocolor alpha];
7064 # float alpha = 1.0;
7065 # if (alpha_wrapper != nil) {
7066 # alpha = [alpha_wrapper value];
7067 # }
7068 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7069 # }
7070 #
7071 # static Color* toProto(UIColor* color) {
7072 # CGFloat red, green, blue, alpha;
7073 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7074 # return nil;
7075 # }
7076 # Color* result = [Color alloc] init];
7077 # [result setRed:red];
7078 # [result setGreen:green];
7079 # [result setBlue:blue];
7080 # if (alpha <= 0.9999) {
7081 # [result setAlpha:floatWrapperWithValue(alpha)];
7082 # }
7083 # [result autorelease];
7084 # return result;
7085 # }
7086 # // ...
7087 #
7088 # Example (JavaScript):
7089 #
7090 # // ...
7091 #
7092 # var protoToCssColor = function(rgb_color) {
7093 # var redFrac = rgb_color.red || 0.0;
7094 # var greenFrac = rgb_color.green || 0.0;
7095 # var blueFrac = rgb_color.blue || 0.0;
7096 # var red = Math.floor(redFrac * 255);
7097 # var green = Math.floor(greenFrac * 255);
7098 # var blue = Math.floor(blueFrac * 255);
7099 #
7100 # if (!('alpha' in rgb_color)) {
7101 # return rgbToCssColor_(red, green, blue);
7102 # }
7103 #
7104 # var alphaFrac = rgb_color.alpha.value || 0.0;
7105 # var rgbParams = [red, green, blue].join(',');
7106 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7107 # };
7108 #
7109 # var rgbToCssColor_ = function(red, green, blue) {
7110 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7111 # var hexString = rgbNumber.toString(16);
7112 # var missingZeros = 6 - hexString.length;
7113 # var resultBuilder = ['#'];
7114 # for (var i = 0; i < missingZeros; i++) {
7115 # resultBuilder.push('0');
7116 # }
7117 # resultBuilder.push(hexString);
7118 # return resultBuilder.join('');
7119 # };
7120 #
7121 # // ...
7122 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7123 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7124 # the final pixel color is defined by the equation:
7125 #
7126 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7127 #
7128 # This means that a value of 1.0 corresponds to a solid color, whereas
7129 # a value of 0.0 corresponds to a completely transparent color. This
7130 # uses a wrapper message rather than a simple float scalar so that it is
7131 # possible to distinguish between a default value and the value being unset.
7132 # If omitted, this color object is to be rendered as a solid color
7133 # (as if the alpha value had been explicitly given with a value of 1.0).
7134 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7135 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7136 },
7137 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007138 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007139 "style": "A String", # The style of the border.
7140 },
7141 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007142 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
7143 "angle": 42, # The angle between the standard orientation and the desired orientation.
7144 # Measured in degrees. Valid values are between -90 and 90. Positive
7145 # angles are angled upwards, negative are angled downwards.
7146 #
7147 # Note: For LTR text direction positive angles are in the counterclockwise
7148 # direction, whereas for RTL they are in the clockwise direction
7149 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
7150 # characters is unchanged.
7151 # For example:
7152 #
7153 # | V |
7154 # | e |
7155 # | r |
7156 # | t |
7157 # | i |
7158 # | c |
7159 # | a |
7160 # | l |
7161 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007162 },
7163 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
7164 #
7165 # When writing, the new format will be merged with the existing format.
7166 "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 -07007167 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
7168 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007169 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07007170 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007171 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007172 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007173 },
7174 "textDirection": "A String", # The direction of the text in the cell.
7175 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
7176 # When updating padding, every field must be specified.
7177 "top": 42, # The top padding of the cell.
7178 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007179 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007180 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007181 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007182 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007183 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
7184 # for simplicity of conversion to/from color representations in various
7185 # languages over compactness; for example, the fields of this representation
7186 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7187 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7188 # method in iOS; and, with just a little work, it can be easily formatted into
7189 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7190 #
7191 # Example (Java):
7192 #
7193 # import com.google.type.Color;
7194 #
7195 # // ...
7196 # public static java.awt.Color fromProto(Color protocolor) {
7197 # float alpha = protocolor.hasAlpha()
7198 # ? protocolor.getAlpha().getValue()
7199 # : 1.0;
7200 #
7201 # return new java.awt.Color(
7202 # protocolor.getRed(),
7203 # protocolor.getGreen(),
7204 # protocolor.getBlue(),
7205 # alpha);
7206 # }
7207 #
7208 # public static Color toProto(java.awt.Color color) {
7209 # float red = (float) color.getRed();
7210 # float green = (float) color.getGreen();
7211 # float blue = (float) color.getBlue();
7212 # float denominator = 255.0;
7213 # Color.Builder resultBuilder =
7214 # Color
7215 # .newBuilder()
7216 # .setRed(red / denominator)
7217 # .setGreen(green / denominator)
7218 # .setBlue(blue / denominator);
7219 # int alpha = color.getAlpha();
7220 # if (alpha != 255) {
7221 # result.setAlpha(
7222 # FloatValue
7223 # .newBuilder()
7224 # .setValue(((float) alpha) / denominator)
7225 # .build());
7226 # }
7227 # return resultBuilder.build();
7228 # }
7229 # // ...
7230 #
7231 # Example (iOS / Obj-C):
7232 #
7233 # // ...
7234 # static UIColor* fromProto(Color* protocolor) {
7235 # float red = [protocolor red];
7236 # float green = [protocolor green];
7237 # float blue = [protocolor blue];
7238 # FloatValue* alpha_wrapper = [protocolor alpha];
7239 # float alpha = 1.0;
7240 # if (alpha_wrapper != nil) {
7241 # alpha = [alpha_wrapper value];
7242 # }
7243 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7244 # }
7245 #
7246 # static Color* toProto(UIColor* color) {
7247 # CGFloat red, green, blue, alpha;
7248 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7249 # return nil;
7250 # }
7251 # Color* result = [Color alloc] init];
7252 # [result setRed:red];
7253 # [result setGreen:green];
7254 # [result setBlue:blue];
7255 # if (alpha <= 0.9999) {
7256 # [result setAlpha:floatWrapperWithValue(alpha)];
7257 # }
7258 # [result autorelease];
7259 # return result;
7260 # }
7261 # // ...
7262 #
7263 # Example (JavaScript):
7264 #
7265 # // ...
7266 #
7267 # var protoToCssColor = function(rgb_color) {
7268 # var redFrac = rgb_color.red || 0.0;
7269 # var greenFrac = rgb_color.green || 0.0;
7270 # var blueFrac = rgb_color.blue || 0.0;
7271 # var red = Math.floor(redFrac * 255);
7272 # var green = Math.floor(greenFrac * 255);
7273 # var blue = Math.floor(blueFrac * 255);
7274 #
7275 # if (!('alpha' in rgb_color)) {
7276 # return rgbToCssColor_(red, green, blue);
7277 # }
7278 #
7279 # var alphaFrac = rgb_color.alpha.value || 0.0;
7280 # var rgbParams = [red, green, blue].join(',');
7281 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7282 # };
7283 #
7284 # var rgbToCssColor_ = function(red, green, blue) {
7285 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7286 # var hexString = rgbNumber.toString(16);
7287 # var missingZeros = 6 - hexString.length;
7288 # var resultBuilder = ['#'];
7289 # for (var i = 0; i < missingZeros; i++) {
7290 # resultBuilder.push('0');
7291 # }
7292 # resultBuilder.push(hexString);
7293 # return resultBuilder.join('');
7294 # };
7295 #
7296 # // ...
7297 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7298 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7299 # the final pixel color is defined by the equation:
7300 #
7301 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7302 #
7303 # This means that a value of 1.0 corresponds to a solid color, whereas
7304 # a value of 0.0 corresponds to a completely transparent color. This
7305 # uses a wrapper message rather than a simple float scalar so that it is
7306 # possible to distinguish between a default value and the value being unset.
7307 # If omitted, this color object is to be rendered as a solid color
7308 # (as if the alpha value had been explicitly given with a value of 1.0).
7309 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7310 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7311 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07007312 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007313 "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).
7314 # Absent values indicate that the field isn't specified.
7315 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
7316 # for simplicity of conversion to/from color representations in various
7317 # languages over compactness; for example, the fields of this representation
7318 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7319 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7320 # method in iOS; and, with just a little work, it can be easily formatted into
7321 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7322 #
7323 # Example (Java):
7324 #
7325 # import com.google.type.Color;
7326 #
7327 # // ...
7328 # public static java.awt.Color fromProto(Color protocolor) {
7329 # float alpha = protocolor.hasAlpha()
7330 # ? protocolor.getAlpha().getValue()
7331 # : 1.0;
7332 #
7333 # return new java.awt.Color(
7334 # protocolor.getRed(),
7335 # protocolor.getGreen(),
7336 # protocolor.getBlue(),
7337 # alpha);
7338 # }
7339 #
7340 # public static Color toProto(java.awt.Color color) {
7341 # float red = (float) color.getRed();
7342 # float green = (float) color.getGreen();
7343 # float blue = (float) color.getBlue();
7344 # float denominator = 255.0;
7345 # Color.Builder resultBuilder =
7346 # Color
7347 # .newBuilder()
7348 # .setRed(red / denominator)
7349 # .setGreen(green / denominator)
7350 # .setBlue(blue / denominator);
7351 # int alpha = color.getAlpha();
7352 # if (alpha != 255) {
7353 # result.setAlpha(
7354 # FloatValue
7355 # .newBuilder()
7356 # .setValue(((float) alpha) / denominator)
7357 # .build());
7358 # }
7359 # return resultBuilder.build();
7360 # }
7361 # // ...
7362 #
7363 # Example (iOS / Obj-C):
7364 #
7365 # // ...
7366 # static UIColor* fromProto(Color* protocolor) {
7367 # float red = [protocolor red];
7368 # float green = [protocolor green];
7369 # float blue = [protocolor blue];
7370 # FloatValue* alpha_wrapper = [protocolor alpha];
7371 # float alpha = 1.0;
7372 # if (alpha_wrapper != nil) {
7373 # alpha = [alpha_wrapper value];
7374 # }
7375 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7376 # }
7377 #
7378 # static Color* toProto(UIColor* color) {
7379 # CGFloat red, green, blue, alpha;
7380 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7381 # return nil;
7382 # }
7383 # Color* result = [Color alloc] init];
7384 # [result setRed:red];
7385 # [result setGreen:green];
7386 # [result setBlue:blue];
7387 # if (alpha <= 0.9999) {
7388 # [result setAlpha:floatWrapperWithValue(alpha)];
7389 # }
7390 # [result autorelease];
7391 # return result;
7392 # }
7393 # // ...
7394 #
7395 # Example (JavaScript):
7396 #
7397 # // ...
7398 #
7399 # var protoToCssColor = function(rgb_color) {
7400 # var redFrac = rgb_color.red || 0.0;
7401 # var greenFrac = rgb_color.green || 0.0;
7402 # var blueFrac = rgb_color.blue || 0.0;
7403 # var red = Math.floor(redFrac * 255);
7404 # var green = Math.floor(greenFrac * 255);
7405 # var blue = Math.floor(blueFrac * 255);
7406 #
7407 # if (!('alpha' in rgb_color)) {
7408 # return rgbToCssColor_(red, green, blue);
7409 # }
7410 #
7411 # var alphaFrac = rgb_color.alpha.value || 0.0;
7412 # var rgbParams = [red, green, blue].join(',');
7413 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7414 # };
7415 #
7416 # var rgbToCssColor_ = function(red, green, blue) {
7417 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7418 # var hexString = rgbNumber.toString(16);
7419 # var missingZeros = 6 - hexString.length;
7420 # var resultBuilder = ['#'];
7421 # for (var i = 0; i < missingZeros; i++) {
7422 # resultBuilder.push('0');
7423 # }
7424 # resultBuilder.push(hexString);
7425 # return resultBuilder.join('');
7426 # };
7427 #
7428 # // ...
7429 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7430 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7431 # the final pixel color is defined by the equation:
7432 #
7433 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7434 #
7435 # This means that a value of 1.0 corresponds to a solid color, whereas
7436 # a value of 0.0 corresponds to a completely transparent color. This
7437 # uses a wrapper message rather than a simple float scalar so that it is
7438 # possible to distinguish between a default value and the value being unset.
7439 # If omitted, this color object is to be rendered as a solid color
7440 # (as if the alpha value had been explicitly given with a value of 1.0).
7441 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7442 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7443 },
7444 "bold": True or False, # True if the text is bold.
7445 "strikethrough": True or False, # True if the text has a strikethrough.
7446 "fontFamily": "A String", # The font family.
7447 "fontSize": 42, # The size of the font.
7448 "italic": True or False, # True if the text is italicized.
7449 "underline": True or False, # True if the text is underlined.
7450 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007451 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007452 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
7453 "borders": { # The borders of the cell. # The borders of the cell.
7454 "top": { # A border along a cell. # The top border of the cell.
7455 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7456 # for simplicity of conversion to/from color representations in various
7457 # languages over compactness; for example, the fields of this representation
7458 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7459 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7460 # method in iOS; and, with just a little work, it can be easily formatted into
7461 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7462 #
7463 # Example (Java):
7464 #
7465 # import com.google.type.Color;
7466 #
7467 # // ...
7468 # public static java.awt.Color fromProto(Color protocolor) {
7469 # float alpha = protocolor.hasAlpha()
7470 # ? protocolor.getAlpha().getValue()
7471 # : 1.0;
7472 #
7473 # return new java.awt.Color(
7474 # protocolor.getRed(),
7475 # protocolor.getGreen(),
7476 # protocolor.getBlue(),
7477 # alpha);
7478 # }
7479 #
7480 # public static Color toProto(java.awt.Color color) {
7481 # float red = (float) color.getRed();
7482 # float green = (float) color.getGreen();
7483 # float blue = (float) color.getBlue();
7484 # float denominator = 255.0;
7485 # Color.Builder resultBuilder =
7486 # Color
7487 # .newBuilder()
7488 # .setRed(red / denominator)
7489 # .setGreen(green / denominator)
7490 # .setBlue(blue / denominator);
7491 # int alpha = color.getAlpha();
7492 # if (alpha != 255) {
7493 # result.setAlpha(
7494 # FloatValue
7495 # .newBuilder()
7496 # .setValue(((float) alpha) / denominator)
7497 # .build());
7498 # }
7499 # return resultBuilder.build();
7500 # }
7501 # // ...
7502 #
7503 # Example (iOS / Obj-C):
7504 #
7505 # // ...
7506 # static UIColor* fromProto(Color* protocolor) {
7507 # float red = [protocolor red];
7508 # float green = [protocolor green];
7509 # float blue = [protocolor blue];
7510 # FloatValue* alpha_wrapper = [protocolor alpha];
7511 # float alpha = 1.0;
7512 # if (alpha_wrapper != nil) {
7513 # alpha = [alpha_wrapper value];
7514 # }
7515 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7516 # }
7517 #
7518 # static Color* toProto(UIColor* color) {
7519 # CGFloat red, green, blue, alpha;
7520 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7521 # return nil;
7522 # }
7523 # Color* result = [Color alloc] init];
7524 # [result setRed:red];
7525 # [result setGreen:green];
7526 # [result setBlue:blue];
7527 # if (alpha <= 0.9999) {
7528 # [result setAlpha:floatWrapperWithValue(alpha)];
7529 # }
7530 # [result autorelease];
7531 # return result;
7532 # }
7533 # // ...
7534 #
7535 # Example (JavaScript):
7536 #
7537 # // ...
7538 #
7539 # var protoToCssColor = function(rgb_color) {
7540 # var redFrac = rgb_color.red || 0.0;
7541 # var greenFrac = rgb_color.green || 0.0;
7542 # var blueFrac = rgb_color.blue || 0.0;
7543 # var red = Math.floor(redFrac * 255);
7544 # var green = Math.floor(greenFrac * 255);
7545 # var blue = Math.floor(blueFrac * 255);
7546 #
7547 # if (!('alpha' in rgb_color)) {
7548 # return rgbToCssColor_(red, green, blue);
7549 # }
7550 #
7551 # var alphaFrac = rgb_color.alpha.value || 0.0;
7552 # var rgbParams = [red, green, blue].join(',');
7553 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7554 # };
7555 #
7556 # var rgbToCssColor_ = function(red, green, blue) {
7557 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7558 # var hexString = rgbNumber.toString(16);
7559 # var missingZeros = 6 - hexString.length;
7560 # var resultBuilder = ['#'];
7561 # for (var i = 0; i < missingZeros; i++) {
7562 # resultBuilder.push('0');
7563 # }
7564 # resultBuilder.push(hexString);
7565 # return resultBuilder.join('');
7566 # };
7567 #
7568 # // ...
7569 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7570 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7571 # the final pixel color is defined by the equation:
7572 #
7573 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7574 #
7575 # This means that a value of 1.0 corresponds to a solid color, whereas
7576 # a value of 0.0 corresponds to a completely transparent color. This
7577 # uses a wrapper message rather than a simple float scalar so that it is
7578 # possible to distinguish between a default value and the value being unset.
7579 # If omitted, this color object is to be rendered as a solid color
7580 # (as if the alpha value had been explicitly given with a value of 1.0).
7581 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7582 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7583 },
7584 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007585 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007586 "style": "A String", # The style of the border.
7587 },
7588 "right": { # A border along a cell. # The right border of the cell.
7589 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7590 # for simplicity of conversion to/from color representations in various
7591 # languages over compactness; for example, the fields of this representation
7592 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7593 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7594 # method in iOS; and, with just a little work, it can be easily formatted into
7595 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7596 #
7597 # Example (Java):
7598 #
7599 # import com.google.type.Color;
7600 #
7601 # // ...
7602 # public static java.awt.Color fromProto(Color protocolor) {
7603 # float alpha = protocolor.hasAlpha()
7604 # ? protocolor.getAlpha().getValue()
7605 # : 1.0;
7606 #
7607 # return new java.awt.Color(
7608 # protocolor.getRed(),
7609 # protocolor.getGreen(),
7610 # protocolor.getBlue(),
7611 # alpha);
7612 # }
7613 #
7614 # public static Color toProto(java.awt.Color color) {
7615 # float red = (float) color.getRed();
7616 # float green = (float) color.getGreen();
7617 # float blue = (float) color.getBlue();
7618 # float denominator = 255.0;
7619 # Color.Builder resultBuilder =
7620 # Color
7621 # .newBuilder()
7622 # .setRed(red / denominator)
7623 # .setGreen(green / denominator)
7624 # .setBlue(blue / denominator);
7625 # int alpha = color.getAlpha();
7626 # if (alpha != 255) {
7627 # result.setAlpha(
7628 # FloatValue
7629 # .newBuilder()
7630 # .setValue(((float) alpha) / denominator)
7631 # .build());
7632 # }
7633 # return resultBuilder.build();
7634 # }
7635 # // ...
7636 #
7637 # Example (iOS / Obj-C):
7638 #
7639 # // ...
7640 # static UIColor* fromProto(Color* protocolor) {
7641 # float red = [protocolor red];
7642 # float green = [protocolor green];
7643 # float blue = [protocolor blue];
7644 # FloatValue* alpha_wrapper = [protocolor alpha];
7645 # float alpha = 1.0;
7646 # if (alpha_wrapper != nil) {
7647 # alpha = [alpha_wrapper value];
7648 # }
7649 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7650 # }
7651 #
7652 # static Color* toProto(UIColor* color) {
7653 # CGFloat red, green, blue, alpha;
7654 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7655 # return nil;
7656 # }
7657 # Color* result = [Color alloc] init];
7658 # [result setRed:red];
7659 # [result setGreen:green];
7660 # [result setBlue:blue];
7661 # if (alpha <= 0.9999) {
7662 # [result setAlpha:floatWrapperWithValue(alpha)];
7663 # }
7664 # [result autorelease];
7665 # return result;
7666 # }
7667 # // ...
7668 #
7669 # Example (JavaScript):
7670 #
7671 # // ...
7672 #
7673 # var protoToCssColor = function(rgb_color) {
7674 # var redFrac = rgb_color.red || 0.0;
7675 # var greenFrac = rgb_color.green || 0.0;
7676 # var blueFrac = rgb_color.blue || 0.0;
7677 # var red = Math.floor(redFrac * 255);
7678 # var green = Math.floor(greenFrac * 255);
7679 # var blue = Math.floor(blueFrac * 255);
7680 #
7681 # if (!('alpha' in rgb_color)) {
7682 # return rgbToCssColor_(red, green, blue);
7683 # }
7684 #
7685 # var alphaFrac = rgb_color.alpha.value || 0.0;
7686 # var rgbParams = [red, green, blue].join(',');
7687 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7688 # };
7689 #
7690 # var rgbToCssColor_ = function(red, green, blue) {
7691 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7692 # var hexString = rgbNumber.toString(16);
7693 # var missingZeros = 6 - hexString.length;
7694 # var resultBuilder = ['#'];
7695 # for (var i = 0; i < missingZeros; i++) {
7696 # resultBuilder.push('0');
7697 # }
7698 # resultBuilder.push(hexString);
7699 # return resultBuilder.join('');
7700 # };
7701 #
7702 # // ...
7703 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7704 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7705 # the final pixel color is defined by the equation:
7706 #
7707 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7708 #
7709 # This means that a value of 1.0 corresponds to a solid color, whereas
7710 # a value of 0.0 corresponds to a completely transparent color. This
7711 # uses a wrapper message rather than a simple float scalar so that it is
7712 # possible to distinguish between a default value and the value being unset.
7713 # If omitted, this color object is to be rendered as a solid color
7714 # (as if the alpha value had been explicitly given with a value of 1.0).
7715 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7716 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7717 },
7718 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007719 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007720 "style": "A String", # The style of the border.
7721 },
7722 "bottom": { # A border along a cell. # The bottom border of the cell.
7723 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7724 # for simplicity of conversion to/from color representations in various
7725 # languages over compactness; for example, the fields of this representation
7726 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7727 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7728 # method in iOS; and, with just a little work, it can be easily formatted into
7729 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7730 #
7731 # Example (Java):
7732 #
7733 # import com.google.type.Color;
7734 #
7735 # // ...
7736 # public static java.awt.Color fromProto(Color protocolor) {
7737 # float alpha = protocolor.hasAlpha()
7738 # ? protocolor.getAlpha().getValue()
7739 # : 1.0;
7740 #
7741 # return new java.awt.Color(
7742 # protocolor.getRed(),
7743 # protocolor.getGreen(),
7744 # protocolor.getBlue(),
7745 # alpha);
7746 # }
7747 #
7748 # public static Color toProto(java.awt.Color color) {
7749 # float red = (float) color.getRed();
7750 # float green = (float) color.getGreen();
7751 # float blue = (float) color.getBlue();
7752 # float denominator = 255.0;
7753 # Color.Builder resultBuilder =
7754 # Color
7755 # .newBuilder()
7756 # .setRed(red / denominator)
7757 # .setGreen(green / denominator)
7758 # .setBlue(blue / denominator);
7759 # int alpha = color.getAlpha();
7760 # if (alpha != 255) {
7761 # result.setAlpha(
7762 # FloatValue
7763 # .newBuilder()
7764 # .setValue(((float) alpha) / denominator)
7765 # .build());
7766 # }
7767 # return resultBuilder.build();
7768 # }
7769 # // ...
7770 #
7771 # Example (iOS / Obj-C):
7772 #
7773 # // ...
7774 # static UIColor* fromProto(Color* protocolor) {
7775 # float red = [protocolor red];
7776 # float green = [protocolor green];
7777 # float blue = [protocolor blue];
7778 # FloatValue* alpha_wrapper = [protocolor alpha];
7779 # float alpha = 1.0;
7780 # if (alpha_wrapper != nil) {
7781 # alpha = [alpha_wrapper value];
7782 # }
7783 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7784 # }
7785 #
7786 # static Color* toProto(UIColor* color) {
7787 # CGFloat red, green, blue, alpha;
7788 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7789 # return nil;
7790 # }
7791 # Color* result = [Color alloc] init];
7792 # [result setRed:red];
7793 # [result setGreen:green];
7794 # [result setBlue:blue];
7795 # if (alpha <= 0.9999) {
7796 # [result setAlpha:floatWrapperWithValue(alpha)];
7797 # }
7798 # [result autorelease];
7799 # return result;
7800 # }
7801 # // ...
7802 #
7803 # Example (JavaScript):
7804 #
7805 # // ...
7806 #
7807 # var protoToCssColor = function(rgb_color) {
7808 # var redFrac = rgb_color.red || 0.0;
7809 # var greenFrac = rgb_color.green || 0.0;
7810 # var blueFrac = rgb_color.blue || 0.0;
7811 # var red = Math.floor(redFrac * 255);
7812 # var green = Math.floor(greenFrac * 255);
7813 # var blue = Math.floor(blueFrac * 255);
7814 #
7815 # if (!('alpha' in rgb_color)) {
7816 # return rgbToCssColor_(red, green, blue);
7817 # }
7818 #
7819 # var alphaFrac = rgb_color.alpha.value || 0.0;
7820 # var rgbParams = [red, green, blue].join(',');
7821 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7822 # };
7823 #
7824 # var rgbToCssColor_ = function(red, green, blue) {
7825 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7826 # var hexString = rgbNumber.toString(16);
7827 # var missingZeros = 6 - hexString.length;
7828 # var resultBuilder = ['#'];
7829 # for (var i = 0; i < missingZeros; i++) {
7830 # resultBuilder.push('0');
7831 # }
7832 # resultBuilder.push(hexString);
7833 # return resultBuilder.join('');
7834 # };
7835 #
7836 # // ...
7837 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7838 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7839 # the final pixel color is defined by the equation:
7840 #
7841 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7842 #
7843 # This means that a value of 1.0 corresponds to a solid color, whereas
7844 # a value of 0.0 corresponds to a completely transparent color. This
7845 # uses a wrapper message rather than a simple float scalar so that it is
7846 # possible to distinguish between a default value and the value being unset.
7847 # If omitted, this color object is to be rendered as a solid color
7848 # (as if the alpha value had been explicitly given with a value of 1.0).
7849 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7850 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7851 },
7852 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007853 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007854 "style": "A String", # The style of the border.
7855 },
7856 "left": { # A border along a cell. # The left border of the cell.
7857 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
7858 # for simplicity of conversion to/from color representations in various
7859 # languages over compactness; for example, the fields of this representation
7860 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
7861 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7862 # method in iOS; and, with just a little work, it can be easily formatted into
7863 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
7864 #
7865 # Example (Java):
7866 #
7867 # import com.google.type.Color;
7868 #
7869 # // ...
7870 # public static java.awt.Color fromProto(Color protocolor) {
7871 # float alpha = protocolor.hasAlpha()
7872 # ? protocolor.getAlpha().getValue()
7873 # : 1.0;
7874 #
7875 # return new java.awt.Color(
7876 # protocolor.getRed(),
7877 # protocolor.getGreen(),
7878 # protocolor.getBlue(),
7879 # alpha);
7880 # }
7881 #
7882 # public static Color toProto(java.awt.Color color) {
7883 # float red = (float) color.getRed();
7884 # float green = (float) color.getGreen();
7885 # float blue = (float) color.getBlue();
7886 # float denominator = 255.0;
7887 # Color.Builder resultBuilder =
7888 # Color
7889 # .newBuilder()
7890 # .setRed(red / denominator)
7891 # .setGreen(green / denominator)
7892 # .setBlue(blue / denominator);
7893 # int alpha = color.getAlpha();
7894 # if (alpha != 255) {
7895 # result.setAlpha(
7896 # FloatValue
7897 # .newBuilder()
7898 # .setValue(((float) alpha) / denominator)
7899 # .build());
7900 # }
7901 # return resultBuilder.build();
7902 # }
7903 # // ...
7904 #
7905 # Example (iOS / Obj-C):
7906 #
7907 # // ...
7908 # static UIColor* fromProto(Color* protocolor) {
7909 # float red = [protocolor red];
7910 # float green = [protocolor green];
7911 # float blue = [protocolor blue];
7912 # FloatValue* alpha_wrapper = [protocolor alpha];
7913 # float alpha = 1.0;
7914 # if (alpha_wrapper != nil) {
7915 # alpha = [alpha_wrapper value];
7916 # }
7917 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
7918 # }
7919 #
7920 # static Color* toProto(UIColor* color) {
7921 # CGFloat red, green, blue, alpha;
7922 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
7923 # return nil;
7924 # }
7925 # Color* result = [Color alloc] init];
7926 # [result setRed:red];
7927 # [result setGreen:green];
7928 # [result setBlue:blue];
7929 # if (alpha <= 0.9999) {
7930 # [result setAlpha:floatWrapperWithValue(alpha)];
7931 # }
7932 # [result autorelease];
7933 # return result;
7934 # }
7935 # // ...
7936 #
7937 # Example (JavaScript):
7938 #
7939 # // ...
7940 #
7941 # var protoToCssColor = function(rgb_color) {
7942 # var redFrac = rgb_color.red || 0.0;
7943 # var greenFrac = rgb_color.green || 0.0;
7944 # var blueFrac = rgb_color.blue || 0.0;
7945 # var red = Math.floor(redFrac * 255);
7946 # var green = Math.floor(greenFrac * 255);
7947 # var blue = Math.floor(blueFrac * 255);
7948 #
7949 # if (!('alpha' in rgb_color)) {
7950 # return rgbToCssColor_(red, green, blue);
7951 # }
7952 #
7953 # var alphaFrac = rgb_color.alpha.value || 0.0;
7954 # var rgbParams = [red, green, blue].join(',');
7955 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
7956 # };
7957 #
7958 # var rgbToCssColor_ = function(red, green, blue) {
7959 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
7960 # var hexString = rgbNumber.toString(16);
7961 # var missingZeros = 6 - hexString.length;
7962 # var resultBuilder = ['#'];
7963 # for (var i = 0; i < missingZeros; i++) {
7964 # resultBuilder.push('0');
7965 # }
7966 # resultBuilder.push(hexString);
7967 # return resultBuilder.join('');
7968 # };
7969 #
7970 # // ...
7971 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7972 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
7973 # the final pixel color is defined by the equation:
7974 #
7975 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
7976 #
7977 # This means that a value of 1.0 corresponds to a solid color, whereas
7978 # a value of 0.0 corresponds to a completely transparent color. This
7979 # uses a wrapper message rather than a simple float scalar so that it is
7980 # possible to distinguish between a default value and the value being unset.
7981 # If omitted, this color object is to be rendered as a solid color
7982 # (as if the alpha value had been explicitly given with a value of 1.0).
7983 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
7984 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
7985 },
7986 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007987 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07007988 "style": "A String", # The style of the border.
7989 },
7990 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04007991 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
7992 "angle": 42, # The angle between the standard orientation and the desired orientation.
7993 # Measured in degrees. Valid values are between -90 and 90. Positive
7994 # angles are angled upwards, negative are angled downwards.
7995 #
7996 # Note: For LTR text direction positive angles are in the counterclockwise
7997 # direction, whereas for RTL they are in the clockwise direction
7998 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
7999 # characters is unchanged.
8000 # For example:
8001 #
8002 # | V |
8003 # | e |
8004 # | r |
8005 # | t |
8006 # | i |
8007 # | c |
8008 # | a |
8009 # | l |
8010 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008011 },
8012 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
8013 #
8014 # When writing, the new data validation rule will overwrite any prior rule.
8015 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
8016 # If true, "List" conditions will show a dropdown.
8017 "strict": True or False, # True if invalid data should be rejected.
8018 "inputMessage": "A String", # A message to show the user when adding data to the cell.
8019 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
8020 # BooleanConditions are used by conditional formatting,
8021 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008022 "values": [ # The values of the condition. The number of supported values depends
8023 # on the condition type. Some support zero values,
8024 # others one or two values,
8025 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8026 { # The value of the condition.
8027 "relativeDate": "A String", # A relative date (based on the current date).
8028 # Valid only if the type is
8029 # DATE_BEFORE,
8030 # DATE_AFTER,
8031 # DATE_ON_OR_BEFORE or
8032 # DATE_ON_OR_AFTER.
8033 #
8034 # Relative dates are not supported in data validation.
8035 # They are supported only in conditional formatting and
8036 # conditional filters.
8037 "userEnteredValue": "A String", # A value the condition is based on.
8038 # The value will be parsed as if the user typed into a cell.
8039 # Formulas are supported (and must begin with an `=`).
8040 },
8041 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008042 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008043 },
8044 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008045 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
8046 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008047 # Runs start at specific indexes in the text and continue until the next
8048 # run. Properties of a run will continue unless explicitly changed
8049 # in a subsequent run (and properties of the first run will continue
8050 # the properties of the cell unless explicitly changed).
8051 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008052 # When writing, the new runs will overwrite any prior runs. When writing a
8053 # new user_entered_value, previous runs will be erased.
8054 { # A run of a text format. The format of this run continues until the start
8055 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008056 # When updating, all fields must be set.
8057 "startIndex": 42, # The character index where this run starts.
8058 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
8059 # Absent values indicate that the field isn't specified.
8060 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8061 # for simplicity of conversion to/from color representations in various
8062 # languages over compactness; for example, the fields of this representation
8063 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8064 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8065 # method in iOS; and, with just a little work, it can be easily formatted into
8066 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8067 #
8068 # Example (Java):
8069 #
8070 # import com.google.type.Color;
8071 #
8072 # // ...
8073 # public static java.awt.Color fromProto(Color protocolor) {
8074 # float alpha = protocolor.hasAlpha()
8075 # ? protocolor.getAlpha().getValue()
8076 # : 1.0;
8077 #
8078 # return new java.awt.Color(
8079 # protocolor.getRed(),
8080 # protocolor.getGreen(),
8081 # protocolor.getBlue(),
8082 # alpha);
8083 # }
8084 #
8085 # public static Color toProto(java.awt.Color color) {
8086 # float red = (float) color.getRed();
8087 # float green = (float) color.getGreen();
8088 # float blue = (float) color.getBlue();
8089 # float denominator = 255.0;
8090 # Color.Builder resultBuilder =
8091 # Color
8092 # .newBuilder()
8093 # .setRed(red / denominator)
8094 # .setGreen(green / denominator)
8095 # .setBlue(blue / denominator);
8096 # int alpha = color.getAlpha();
8097 # if (alpha != 255) {
8098 # result.setAlpha(
8099 # FloatValue
8100 # .newBuilder()
8101 # .setValue(((float) alpha) / denominator)
8102 # .build());
8103 # }
8104 # return resultBuilder.build();
8105 # }
8106 # // ...
8107 #
8108 # Example (iOS / Obj-C):
8109 #
8110 # // ...
8111 # static UIColor* fromProto(Color* protocolor) {
8112 # float red = [protocolor red];
8113 # float green = [protocolor green];
8114 # float blue = [protocolor blue];
8115 # FloatValue* alpha_wrapper = [protocolor alpha];
8116 # float alpha = 1.0;
8117 # if (alpha_wrapper != nil) {
8118 # alpha = [alpha_wrapper value];
8119 # }
8120 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8121 # }
8122 #
8123 # static Color* toProto(UIColor* color) {
8124 # CGFloat red, green, blue, alpha;
8125 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8126 # return nil;
8127 # }
8128 # Color* result = [Color alloc] init];
8129 # [result setRed:red];
8130 # [result setGreen:green];
8131 # [result setBlue:blue];
8132 # if (alpha <= 0.9999) {
8133 # [result setAlpha:floatWrapperWithValue(alpha)];
8134 # }
8135 # [result autorelease];
8136 # return result;
8137 # }
8138 # // ...
8139 #
8140 # Example (JavaScript):
8141 #
8142 # // ...
8143 #
8144 # var protoToCssColor = function(rgb_color) {
8145 # var redFrac = rgb_color.red || 0.0;
8146 # var greenFrac = rgb_color.green || 0.0;
8147 # var blueFrac = rgb_color.blue || 0.0;
8148 # var red = Math.floor(redFrac * 255);
8149 # var green = Math.floor(greenFrac * 255);
8150 # var blue = Math.floor(blueFrac * 255);
8151 #
8152 # if (!('alpha' in rgb_color)) {
8153 # return rgbToCssColor_(red, green, blue);
8154 # }
8155 #
8156 # var alphaFrac = rgb_color.alpha.value || 0.0;
8157 # var rgbParams = [red, green, blue].join(',');
8158 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8159 # };
8160 #
8161 # var rgbToCssColor_ = function(red, green, blue) {
8162 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8163 # var hexString = rgbNumber.toString(16);
8164 # var missingZeros = 6 - hexString.length;
8165 # var resultBuilder = ['#'];
8166 # for (var i = 0; i < missingZeros; i++) {
8167 # resultBuilder.push('0');
8168 # }
8169 # resultBuilder.push(hexString);
8170 # return resultBuilder.join('');
8171 # };
8172 #
8173 # // ...
8174 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8175 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8176 # the final pixel color is defined by the equation:
8177 #
8178 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8179 #
8180 # This means that a value of 1.0 corresponds to a solid color, whereas
8181 # a value of 0.0 corresponds to a completely transparent color. This
8182 # uses a wrapper message rather than a simple float scalar so that it is
8183 # possible to distinguish between a default value and the value being unset.
8184 # If omitted, this color object is to be rendered as a solid color
8185 # (as if the alpha value had been explicitly given with a value of 1.0).
8186 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8187 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8188 },
8189 "bold": True or False, # True if the text is bold.
8190 "strikethrough": True or False, # True if the text has a strikethrough.
8191 "fontFamily": "A String", # The font family.
8192 "fontSize": 42, # The size of the font.
8193 "italic": True or False, # True if the text is italicized.
8194 "underline": True or False, # True if the text is underlined.
8195 },
8196 },
8197 ],
8198 },
8199 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8200 # The root `cell` is implied and should not be specified.
8201 # A single `"*"` can be used as short-hand for listing every field.
8202 "range": { # A range on a sheet. # The range to repeat the cell in.
8203 # All indexes are zero-based.
8204 # Indexes are half open, e.g the start index is inclusive
8205 # and the end index is exclusive -- [start_index, end_index).
8206 # Missing indexes indicate the range is unbounded on that side.
8207 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008208 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008209 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008210 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008211 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008212 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008213 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008214 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008215 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008216 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008217 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008218 # `Sheet1!A:B == sheet_id: 0,
8219 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008220 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008221 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008222 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008223 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008224 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008225 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008226 #
8227 # The start index must always be less than or equal to the end index.
8228 # If the start index equals the end index, then the range is empty.
8229 # Empty ranges are typically not meaningful and are usually rendered in the
8230 # UI as `#REF!`.
8231 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008232 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008233 "sheetId": 42, # The sheet this range is on.
8234 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008235 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008236 },
8237 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008238 "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 -07008239 "includeFormulas": True or False, # True if the search should include cells with formulas.
8240 # False to skip cells with formulas.
8241 "matchEntireCell": True or False, # True if the find value should match the entire cell.
8242 "allSheets": True or False, # True to find/replace over all sheets.
8243 "matchCase": True or False, # True if the search is case sensitive.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008244 "find": "A String", # The value to search.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008245 "range": { # A range on a sheet. # The range to find/replace over.
8246 # All indexes are zero-based.
8247 # Indexes are half open, e.g the start index is inclusive
8248 # and the end index is exclusive -- [start_index, end_index).
8249 # Missing indexes indicate the range is unbounded on that side.
8250 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008251 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008252 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008253 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008254 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008255 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008256 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008257 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008258 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008259 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008260 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008261 # `Sheet1!A:B == sheet_id: 0,
8262 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008263 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008264 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008265 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008266 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008267 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008268 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008269 #
8270 # The start index must always be less than or equal to the end index.
8271 # If the start index equals the end index, then the range is empty.
8272 # Empty ranges are typically not meaningful and are usually rendered in the
8273 # UI as `#REF!`.
8274 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008275 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008276 "sheetId": 42, # The sheet this range is on.
8277 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008278 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008279 },
8280 "searchByRegex": True or False, # True if the find value is a regex.
8281 # The regular expression and replacement should follow Java regex rules
8282 # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
8283 # The replacement string is allowed to refer to capturing groups.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008284 # For example, if one cell has the contents `"Google Sheets"` and another
8285 # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of
8286 # `"$1 Rocks"` would change the contents of the cells to
8287 # `"GSheets Rocks"` and `"GDocs Rocks"` respectively.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008288 "sheetId": 42, # The sheet to find/replace over.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008289 "replacement": "A String", # The value to use as the replacement.
8290 },
8291 "setBasicFilter": { # Sets the basic filter associated with a sheet. # Sets the basic filter on a sheet.
8292 "filter": { # The default filter associated with a sheet. # The filter to set.
8293 "range": { # A range on a sheet. # The range the filter covers.
8294 # All indexes are zero-based.
8295 # Indexes are half open, e.g the start index is inclusive
8296 # and the end index is exclusive -- [start_index, end_index).
8297 # Missing indexes indicate the range is unbounded on that side.
8298 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008299 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008300 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008301 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008302 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008303 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008304 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008305 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008306 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008307 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008308 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008309 # `Sheet1!A:B == sheet_id: 0,
8310 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008311 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008312 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008313 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008314 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008315 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008316 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008317 #
8318 # The start index must always be less than or equal to the end index.
8319 # If the start index equals the end index, then the range is empty.
8320 # Empty ranges are typically not meaningful and are usually rendered in the
8321 # UI as `#REF!`.
8322 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008323 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008324 "sheetId": 42, # The sheet this range is on.
8325 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008326 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008327 },
8328 "sortSpecs": [ # The sort order per column. Later specifications are used when values
8329 # are equal in the earlier specifications.
8330 { # A sort order associated with a specific column or row.
8331 "sortOrder": "A String", # The order data should be sorted.
8332 "dimensionIndex": 42, # The dimension the sort should be applied to.
8333 },
8334 ],
8335 "criteria": { # The criteria for showing/hiding values per column.
8336 # The map's key is the column index, and the value is the criteria for
8337 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008338 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008339 "hiddenValues": [ # Values that should be hidden.
8340 "A String",
8341 ],
8342 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
8343 # (This does not override hiddenValues -- if a value is listed there,
8344 # it will still be hidden.)
8345 # BooleanConditions are used by conditional formatting,
8346 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008347 "values": [ # The values of the condition. The number of supported values depends
8348 # on the condition type. Some support zero values,
8349 # others one or two values,
8350 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
8351 { # The value of the condition.
8352 "relativeDate": "A String", # A relative date (based on the current date).
8353 # Valid only if the type is
8354 # DATE_BEFORE,
8355 # DATE_AFTER,
8356 # DATE_ON_OR_BEFORE or
8357 # DATE_ON_OR_AFTER.
8358 #
8359 # Relative dates are not supported in data validation.
8360 # They are supported only in conditional formatting and
8361 # conditional filters.
8362 "userEnteredValue": "A String", # A value the condition is based on.
8363 # The value will be parsed as if the user typed into a cell.
8364 # Formulas are supported (and must begin with an `=`).
8365 },
8366 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008367 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008368 },
8369 },
8370 },
8371 },
8372 },
8373 "updateSpreadsheetProperties": { # Updates properties of a spreadsheet. # Updates the spreadsheet's properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008374 "fields": "A String", # The fields that should be updated. At least one field must be specified.
8375 # The root 'properties' is implied and should not be specified.
8376 # A single `"*"` can be used as short-hand for listing every field.
8377 "properties": { # Properties of a spreadsheet. # The properties to update.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008378 "title": "A String", # The title of the spreadsheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008379 "locale": "A String", # The locale of the spreadsheet in one of the following formats:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008380 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008381 # * an ISO 639-1 language code such as `en`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008382 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008383 # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008384 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008385 # * a combination of the ISO language code and country code, such as `en_US`
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008386 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008387 # Note: when updating this field, not all locales/languages are supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008388 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
8389 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008390 # CellData.effectiveFormat will not be set if the
8391 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008392 # This field is read-only.
8393 "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 -07008394 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
8395 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008396 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07008397 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008398 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008399 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008400 },
8401 "textDirection": "A String", # The direction of the text in the cell.
8402 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
8403 # When updating padding, every field must be specified.
8404 "top": 42, # The top padding of the cell.
8405 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008406 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008407 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008408 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008409 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008410 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
8411 # for simplicity of conversion to/from color representations in various
8412 # languages over compactness; for example, the fields of this representation
8413 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8414 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8415 # method in iOS; and, with just a little work, it can be easily formatted into
8416 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8417 #
8418 # Example (Java):
8419 #
8420 # import com.google.type.Color;
8421 #
8422 # // ...
8423 # public static java.awt.Color fromProto(Color protocolor) {
8424 # float alpha = protocolor.hasAlpha()
8425 # ? protocolor.getAlpha().getValue()
8426 # : 1.0;
8427 #
8428 # return new java.awt.Color(
8429 # protocolor.getRed(),
8430 # protocolor.getGreen(),
8431 # protocolor.getBlue(),
8432 # alpha);
8433 # }
8434 #
8435 # public static Color toProto(java.awt.Color color) {
8436 # float red = (float) color.getRed();
8437 # float green = (float) color.getGreen();
8438 # float blue = (float) color.getBlue();
8439 # float denominator = 255.0;
8440 # Color.Builder resultBuilder =
8441 # Color
8442 # .newBuilder()
8443 # .setRed(red / denominator)
8444 # .setGreen(green / denominator)
8445 # .setBlue(blue / denominator);
8446 # int alpha = color.getAlpha();
8447 # if (alpha != 255) {
8448 # result.setAlpha(
8449 # FloatValue
8450 # .newBuilder()
8451 # .setValue(((float) alpha) / denominator)
8452 # .build());
8453 # }
8454 # return resultBuilder.build();
8455 # }
8456 # // ...
8457 #
8458 # Example (iOS / Obj-C):
8459 #
8460 # // ...
8461 # static UIColor* fromProto(Color* protocolor) {
8462 # float red = [protocolor red];
8463 # float green = [protocolor green];
8464 # float blue = [protocolor blue];
8465 # FloatValue* alpha_wrapper = [protocolor alpha];
8466 # float alpha = 1.0;
8467 # if (alpha_wrapper != nil) {
8468 # alpha = [alpha_wrapper value];
8469 # }
8470 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8471 # }
8472 #
8473 # static Color* toProto(UIColor* color) {
8474 # CGFloat red, green, blue, alpha;
8475 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8476 # return nil;
8477 # }
8478 # Color* result = [Color alloc] init];
8479 # [result setRed:red];
8480 # [result setGreen:green];
8481 # [result setBlue:blue];
8482 # if (alpha <= 0.9999) {
8483 # [result setAlpha:floatWrapperWithValue(alpha)];
8484 # }
8485 # [result autorelease];
8486 # return result;
8487 # }
8488 # // ...
8489 #
8490 # Example (JavaScript):
8491 #
8492 # // ...
8493 #
8494 # var protoToCssColor = function(rgb_color) {
8495 # var redFrac = rgb_color.red || 0.0;
8496 # var greenFrac = rgb_color.green || 0.0;
8497 # var blueFrac = rgb_color.blue || 0.0;
8498 # var red = Math.floor(redFrac * 255);
8499 # var green = Math.floor(greenFrac * 255);
8500 # var blue = Math.floor(blueFrac * 255);
8501 #
8502 # if (!('alpha' in rgb_color)) {
8503 # return rgbToCssColor_(red, green, blue);
8504 # }
8505 #
8506 # var alphaFrac = rgb_color.alpha.value || 0.0;
8507 # var rgbParams = [red, green, blue].join(',');
8508 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8509 # };
8510 #
8511 # var rgbToCssColor_ = function(red, green, blue) {
8512 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8513 # var hexString = rgbNumber.toString(16);
8514 # var missingZeros = 6 - hexString.length;
8515 # var resultBuilder = ['#'];
8516 # for (var i = 0; i < missingZeros; i++) {
8517 # resultBuilder.push('0');
8518 # }
8519 # resultBuilder.push(hexString);
8520 # return resultBuilder.join('');
8521 # };
8522 #
8523 # // ...
8524 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8525 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8526 # the final pixel color is defined by the equation:
8527 #
8528 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8529 #
8530 # This means that a value of 1.0 corresponds to a solid color, whereas
8531 # a value of 0.0 corresponds to a completely transparent color. This
8532 # uses a wrapper message rather than a simple float scalar so that it is
8533 # possible to distinguish between a default value and the value being unset.
8534 # If omitted, this color object is to be rendered as a solid color
8535 # (as if the alpha value had been explicitly given with a value of 1.0).
8536 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8537 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8538 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07008539 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008540 "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).
8541 # Absent values indicate that the field isn't specified.
8542 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
8543 # for simplicity of conversion to/from color representations in various
8544 # languages over compactness; for example, the fields of this representation
8545 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8546 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8547 # method in iOS; and, with just a little work, it can be easily formatted into
8548 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8549 #
8550 # Example (Java):
8551 #
8552 # import com.google.type.Color;
8553 #
8554 # // ...
8555 # public static java.awt.Color fromProto(Color protocolor) {
8556 # float alpha = protocolor.hasAlpha()
8557 # ? protocolor.getAlpha().getValue()
8558 # : 1.0;
8559 #
8560 # return new java.awt.Color(
8561 # protocolor.getRed(),
8562 # protocolor.getGreen(),
8563 # protocolor.getBlue(),
8564 # alpha);
8565 # }
8566 #
8567 # public static Color toProto(java.awt.Color color) {
8568 # float red = (float) color.getRed();
8569 # float green = (float) color.getGreen();
8570 # float blue = (float) color.getBlue();
8571 # float denominator = 255.0;
8572 # Color.Builder resultBuilder =
8573 # Color
8574 # .newBuilder()
8575 # .setRed(red / denominator)
8576 # .setGreen(green / denominator)
8577 # .setBlue(blue / denominator);
8578 # int alpha = color.getAlpha();
8579 # if (alpha != 255) {
8580 # result.setAlpha(
8581 # FloatValue
8582 # .newBuilder()
8583 # .setValue(((float) alpha) / denominator)
8584 # .build());
8585 # }
8586 # return resultBuilder.build();
8587 # }
8588 # // ...
8589 #
8590 # Example (iOS / Obj-C):
8591 #
8592 # // ...
8593 # static UIColor* fromProto(Color* protocolor) {
8594 # float red = [protocolor red];
8595 # float green = [protocolor green];
8596 # float blue = [protocolor blue];
8597 # FloatValue* alpha_wrapper = [protocolor alpha];
8598 # float alpha = 1.0;
8599 # if (alpha_wrapper != nil) {
8600 # alpha = [alpha_wrapper value];
8601 # }
8602 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8603 # }
8604 #
8605 # static Color* toProto(UIColor* color) {
8606 # CGFloat red, green, blue, alpha;
8607 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8608 # return nil;
8609 # }
8610 # Color* result = [Color alloc] init];
8611 # [result setRed:red];
8612 # [result setGreen:green];
8613 # [result setBlue:blue];
8614 # if (alpha <= 0.9999) {
8615 # [result setAlpha:floatWrapperWithValue(alpha)];
8616 # }
8617 # [result autorelease];
8618 # return result;
8619 # }
8620 # // ...
8621 #
8622 # Example (JavaScript):
8623 #
8624 # // ...
8625 #
8626 # var protoToCssColor = function(rgb_color) {
8627 # var redFrac = rgb_color.red || 0.0;
8628 # var greenFrac = rgb_color.green || 0.0;
8629 # var blueFrac = rgb_color.blue || 0.0;
8630 # var red = Math.floor(redFrac * 255);
8631 # var green = Math.floor(greenFrac * 255);
8632 # var blue = Math.floor(blueFrac * 255);
8633 #
8634 # if (!('alpha' in rgb_color)) {
8635 # return rgbToCssColor_(red, green, blue);
8636 # }
8637 #
8638 # var alphaFrac = rgb_color.alpha.value || 0.0;
8639 # var rgbParams = [red, green, blue].join(',');
8640 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8641 # };
8642 #
8643 # var rgbToCssColor_ = function(red, green, blue) {
8644 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8645 # var hexString = rgbNumber.toString(16);
8646 # var missingZeros = 6 - hexString.length;
8647 # var resultBuilder = ['#'];
8648 # for (var i = 0; i < missingZeros; i++) {
8649 # resultBuilder.push('0');
8650 # }
8651 # resultBuilder.push(hexString);
8652 # return resultBuilder.join('');
8653 # };
8654 #
8655 # // ...
8656 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8657 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8658 # the final pixel color is defined by the equation:
8659 #
8660 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8661 #
8662 # This means that a value of 1.0 corresponds to a solid color, whereas
8663 # a value of 0.0 corresponds to a completely transparent color. This
8664 # uses a wrapper message rather than a simple float scalar so that it is
8665 # possible to distinguish between a default value and the value being unset.
8666 # If omitted, this color object is to be rendered as a solid color
8667 # (as if the alpha value had been explicitly given with a value of 1.0).
8668 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8669 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8670 },
8671 "bold": True or False, # True if the text is bold.
8672 "strikethrough": True or False, # True if the text has a strikethrough.
8673 "fontFamily": "A String", # The font family.
8674 "fontSize": 42, # The size of the font.
8675 "italic": True or False, # True if the text is italicized.
8676 "underline": True or False, # True if the text is underlined.
8677 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04008678 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008679 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
8680 "borders": { # The borders of the cell. # The borders of the cell.
8681 "top": { # A border along a cell. # The top border of the cell.
8682 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8683 # for simplicity of conversion to/from color representations in various
8684 # languages over compactness; for example, the fields of this representation
8685 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8686 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8687 # method in iOS; and, with just a little work, it can be easily formatted into
8688 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8689 #
8690 # Example (Java):
8691 #
8692 # import com.google.type.Color;
8693 #
8694 # // ...
8695 # public static java.awt.Color fromProto(Color protocolor) {
8696 # float alpha = protocolor.hasAlpha()
8697 # ? protocolor.getAlpha().getValue()
8698 # : 1.0;
8699 #
8700 # return new java.awt.Color(
8701 # protocolor.getRed(),
8702 # protocolor.getGreen(),
8703 # protocolor.getBlue(),
8704 # alpha);
8705 # }
8706 #
8707 # public static Color toProto(java.awt.Color color) {
8708 # float red = (float) color.getRed();
8709 # float green = (float) color.getGreen();
8710 # float blue = (float) color.getBlue();
8711 # float denominator = 255.0;
8712 # Color.Builder resultBuilder =
8713 # Color
8714 # .newBuilder()
8715 # .setRed(red / denominator)
8716 # .setGreen(green / denominator)
8717 # .setBlue(blue / denominator);
8718 # int alpha = color.getAlpha();
8719 # if (alpha != 255) {
8720 # result.setAlpha(
8721 # FloatValue
8722 # .newBuilder()
8723 # .setValue(((float) alpha) / denominator)
8724 # .build());
8725 # }
8726 # return resultBuilder.build();
8727 # }
8728 # // ...
8729 #
8730 # Example (iOS / Obj-C):
8731 #
8732 # // ...
8733 # static UIColor* fromProto(Color* protocolor) {
8734 # float red = [protocolor red];
8735 # float green = [protocolor green];
8736 # float blue = [protocolor blue];
8737 # FloatValue* alpha_wrapper = [protocolor alpha];
8738 # float alpha = 1.0;
8739 # if (alpha_wrapper != nil) {
8740 # alpha = [alpha_wrapper value];
8741 # }
8742 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8743 # }
8744 #
8745 # static Color* toProto(UIColor* color) {
8746 # CGFloat red, green, blue, alpha;
8747 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8748 # return nil;
8749 # }
8750 # Color* result = [Color alloc] init];
8751 # [result setRed:red];
8752 # [result setGreen:green];
8753 # [result setBlue:blue];
8754 # if (alpha <= 0.9999) {
8755 # [result setAlpha:floatWrapperWithValue(alpha)];
8756 # }
8757 # [result autorelease];
8758 # return result;
8759 # }
8760 # // ...
8761 #
8762 # Example (JavaScript):
8763 #
8764 # // ...
8765 #
8766 # var protoToCssColor = function(rgb_color) {
8767 # var redFrac = rgb_color.red || 0.0;
8768 # var greenFrac = rgb_color.green || 0.0;
8769 # var blueFrac = rgb_color.blue || 0.0;
8770 # var red = Math.floor(redFrac * 255);
8771 # var green = Math.floor(greenFrac * 255);
8772 # var blue = Math.floor(blueFrac * 255);
8773 #
8774 # if (!('alpha' in rgb_color)) {
8775 # return rgbToCssColor_(red, green, blue);
8776 # }
8777 #
8778 # var alphaFrac = rgb_color.alpha.value || 0.0;
8779 # var rgbParams = [red, green, blue].join(',');
8780 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8781 # };
8782 #
8783 # var rgbToCssColor_ = function(red, green, blue) {
8784 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8785 # var hexString = rgbNumber.toString(16);
8786 # var missingZeros = 6 - hexString.length;
8787 # var resultBuilder = ['#'];
8788 # for (var i = 0; i < missingZeros; i++) {
8789 # resultBuilder.push('0');
8790 # }
8791 # resultBuilder.push(hexString);
8792 # return resultBuilder.join('');
8793 # };
8794 #
8795 # // ...
8796 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8797 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8798 # the final pixel color is defined by the equation:
8799 #
8800 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8801 #
8802 # This means that a value of 1.0 corresponds to a solid color, whereas
8803 # a value of 0.0 corresponds to a completely transparent color. This
8804 # uses a wrapper message rather than a simple float scalar so that it is
8805 # possible to distinguish between a default value and the value being unset.
8806 # If omitted, this color object is to be rendered as a solid color
8807 # (as if the alpha value had been explicitly given with a value of 1.0).
8808 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8809 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8810 },
8811 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008812 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008813 "style": "A String", # The style of the border.
8814 },
8815 "right": { # A border along a cell. # The right border of the cell.
8816 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8817 # for simplicity of conversion to/from color representations in various
8818 # languages over compactness; for example, the fields of this representation
8819 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8820 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8821 # method in iOS; and, with just a little work, it can be easily formatted into
8822 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8823 #
8824 # Example (Java):
8825 #
8826 # import com.google.type.Color;
8827 #
8828 # // ...
8829 # public static java.awt.Color fromProto(Color protocolor) {
8830 # float alpha = protocolor.hasAlpha()
8831 # ? protocolor.getAlpha().getValue()
8832 # : 1.0;
8833 #
8834 # return new java.awt.Color(
8835 # protocolor.getRed(),
8836 # protocolor.getGreen(),
8837 # protocolor.getBlue(),
8838 # alpha);
8839 # }
8840 #
8841 # public static Color toProto(java.awt.Color color) {
8842 # float red = (float) color.getRed();
8843 # float green = (float) color.getGreen();
8844 # float blue = (float) color.getBlue();
8845 # float denominator = 255.0;
8846 # Color.Builder resultBuilder =
8847 # Color
8848 # .newBuilder()
8849 # .setRed(red / denominator)
8850 # .setGreen(green / denominator)
8851 # .setBlue(blue / denominator);
8852 # int alpha = color.getAlpha();
8853 # if (alpha != 255) {
8854 # result.setAlpha(
8855 # FloatValue
8856 # .newBuilder()
8857 # .setValue(((float) alpha) / denominator)
8858 # .build());
8859 # }
8860 # return resultBuilder.build();
8861 # }
8862 # // ...
8863 #
8864 # Example (iOS / Obj-C):
8865 #
8866 # // ...
8867 # static UIColor* fromProto(Color* protocolor) {
8868 # float red = [protocolor red];
8869 # float green = [protocolor green];
8870 # float blue = [protocolor blue];
8871 # FloatValue* alpha_wrapper = [protocolor alpha];
8872 # float alpha = 1.0;
8873 # if (alpha_wrapper != nil) {
8874 # alpha = [alpha_wrapper value];
8875 # }
8876 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
8877 # }
8878 #
8879 # static Color* toProto(UIColor* color) {
8880 # CGFloat red, green, blue, alpha;
8881 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
8882 # return nil;
8883 # }
8884 # Color* result = [Color alloc] init];
8885 # [result setRed:red];
8886 # [result setGreen:green];
8887 # [result setBlue:blue];
8888 # if (alpha <= 0.9999) {
8889 # [result setAlpha:floatWrapperWithValue(alpha)];
8890 # }
8891 # [result autorelease];
8892 # return result;
8893 # }
8894 # // ...
8895 #
8896 # Example (JavaScript):
8897 #
8898 # // ...
8899 #
8900 # var protoToCssColor = function(rgb_color) {
8901 # var redFrac = rgb_color.red || 0.0;
8902 # var greenFrac = rgb_color.green || 0.0;
8903 # var blueFrac = rgb_color.blue || 0.0;
8904 # var red = Math.floor(redFrac * 255);
8905 # var green = Math.floor(greenFrac * 255);
8906 # var blue = Math.floor(blueFrac * 255);
8907 #
8908 # if (!('alpha' in rgb_color)) {
8909 # return rgbToCssColor_(red, green, blue);
8910 # }
8911 #
8912 # var alphaFrac = rgb_color.alpha.value || 0.0;
8913 # var rgbParams = [red, green, blue].join(',');
8914 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
8915 # };
8916 #
8917 # var rgbToCssColor_ = function(red, green, blue) {
8918 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
8919 # var hexString = rgbNumber.toString(16);
8920 # var missingZeros = 6 - hexString.length;
8921 # var resultBuilder = ['#'];
8922 # for (var i = 0; i < missingZeros; i++) {
8923 # resultBuilder.push('0');
8924 # }
8925 # resultBuilder.push(hexString);
8926 # return resultBuilder.join('');
8927 # };
8928 #
8929 # // ...
8930 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8931 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
8932 # the final pixel color is defined by the equation:
8933 #
8934 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
8935 #
8936 # This means that a value of 1.0 corresponds to a solid color, whereas
8937 # a value of 0.0 corresponds to a completely transparent color. This
8938 # uses a wrapper message rather than a simple float scalar so that it is
8939 # possible to distinguish between a default value and the value being unset.
8940 # If omitted, this color object is to be rendered as a solid color
8941 # (as if the alpha value had been explicitly given with a value of 1.0).
8942 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
8943 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
8944 },
8945 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07008946 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07008947 "style": "A String", # The style of the border.
8948 },
8949 "bottom": { # A border along a cell. # The bottom border of the cell.
8950 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
8951 # for simplicity of conversion to/from color representations in various
8952 # languages over compactness; for example, the fields of this representation
8953 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
8954 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
8955 # method in iOS; and, with just a little work, it can be easily formatted into
8956 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
8957 #
8958 # Example (Java):
8959 #
8960 # import com.google.type.Color;
8961 #
8962 # // ...
8963 # public static java.awt.Color fromProto(Color protocolor) {
8964 # float alpha = protocolor.hasAlpha()
8965 # ? protocolor.getAlpha().getValue()
8966 # : 1.0;
8967 #
8968 # return new java.awt.Color(
8969 # protocolor.getRed(),
8970 # protocolor.getGreen(),
8971 # protocolor.getBlue(),
8972 # alpha);
8973 # }
8974 #
8975 # public static Color toProto(java.awt.Color color) {
8976 # float red = (float) color.getRed();
8977 # float green = (float) color.getGreen();
8978 # float blue = (float) color.getBlue();
8979 # float denominator = 255.0;
8980 # Color.Builder resultBuilder =
8981 # Color
8982 # .newBuilder()
8983 # .setRed(red / denominator)
8984 # .setGreen(green / denominator)
8985 # .setBlue(blue / denominator);
8986 # int alpha = color.getAlpha();
8987 # if (alpha != 255) {
8988 # result.setAlpha(
8989 # FloatValue
8990 # .newBuilder()
8991 # .setValue(((float) alpha) / denominator)
8992 # .build());
8993 # }
8994 # return resultBuilder.build();
8995 # }
8996 # // ...
8997 #
8998 # Example (iOS / Obj-C):
8999 #
9000 # // ...
9001 # static UIColor* fromProto(Color* protocolor) {
9002 # float red = [protocolor red];
9003 # float green = [protocolor green];
9004 # float blue = [protocolor blue];
9005 # FloatValue* alpha_wrapper = [protocolor alpha];
9006 # float alpha = 1.0;
9007 # if (alpha_wrapper != nil) {
9008 # alpha = [alpha_wrapper value];
9009 # }
9010 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9011 # }
9012 #
9013 # static Color* toProto(UIColor* color) {
9014 # CGFloat red, green, blue, alpha;
9015 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9016 # return nil;
9017 # }
9018 # Color* result = [Color alloc] init];
9019 # [result setRed:red];
9020 # [result setGreen:green];
9021 # [result setBlue:blue];
9022 # if (alpha <= 0.9999) {
9023 # [result setAlpha:floatWrapperWithValue(alpha)];
9024 # }
9025 # [result autorelease];
9026 # return result;
9027 # }
9028 # // ...
9029 #
9030 # Example (JavaScript):
9031 #
9032 # // ...
9033 #
9034 # var protoToCssColor = function(rgb_color) {
9035 # var redFrac = rgb_color.red || 0.0;
9036 # var greenFrac = rgb_color.green || 0.0;
9037 # var blueFrac = rgb_color.blue || 0.0;
9038 # var red = Math.floor(redFrac * 255);
9039 # var green = Math.floor(greenFrac * 255);
9040 # var blue = Math.floor(blueFrac * 255);
9041 #
9042 # if (!('alpha' in rgb_color)) {
9043 # return rgbToCssColor_(red, green, blue);
9044 # }
9045 #
9046 # var alphaFrac = rgb_color.alpha.value || 0.0;
9047 # var rgbParams = [red, green, blue].join(',');
9048 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9049 # };
9050 #
9051 # var rgbToCssColor_ = function(red, green, blue) {
9052 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9053 # var hexString = rgbNumber.toString(16);
9054 # var missingZeros = 6 - hexString.length;
9055 # var resultBuilder = ['#'];
9056 # for (var i = 0; i < missingZeros; i++) {
9057 # resultBuilder.push('0');
9058 # }
9059 # resultBuilder.push(hexString);
9060 # return resultBuilder.join('');
9061 # };
9062 #
9063 # // ...
9064 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9065 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9066 # the final pixel color is defined by the equation:
9067 #
9068 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9069 #
9070 # This means that a value of 1.0 corresponds to a solid color, whereas
9071 # a value of 0.0 corresponds to a completely transparent color. This
9072 # uses a wrapper message rather than a simple float scalar so that it is
9073 # possible to distinguish between a default value and the value being unset.
9074 # If omitted, this color object is to be rendered as a solid color
9075 # (as if the alpha value had been explicitly given with a value of 1.0).
9076 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9077 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9078 },
9079 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009080 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009081 "style": "A String", # The style of the border.
9082 },
9083 "left": { # A border along a cell. # The left border of the cell.
9084 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9085 # for simplicity of conversion to/from color representations in various
9086 # languages over compactness; for example, the fields of this representation
9087 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9088 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9089 # method in iOS; and, with just a little work, it can be easily formatted into
9090 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9091 #
9092 # Example (Java):
9093 #
9094 # import com.google.type.Color;
9095 #
9096 # // ...
9097 # public static java.awt.Color fromProto(Color protocolor) {
9098 # float alpha = protocolor.hasAlpha()
9099 # ? protocolor.getAlpha().getValue()
9100 # : 1.0;
9101 #
9102 # return new java.awt.Color(
9103 # protocolor.getRed(),
9104 # protocolor.getGreen(),
9105 # protocolor.getBlue(),
9106 # alpha);
9107 # }
9108 #
9109 # public static Color toProto(java.awt.Color color) {
9110 # float red = (float) color.getRed();
9111 # float green = (float) color.getGreen();
9112 # float blue = (float) color.getBlue();
9113 # float denominator = 255.0;
9114 # Color.Builder resultBuilder =
9115 # Color
9116 # .newBuilder()
9117 # .setRed(red / denominator)
9118 # .setGreen(green / denominator)
9119 # .setBlue(blue / denominator);
9120 # int alpha = color.getAlpha();
9121 # if (alpha != 255) {
9122 # result.setAlpha(
9123 # FloatValue
9124 # .newBuilder()
9125 # .setValue(((float) alpha) / denominator)
9126 # .build());
9127 # }
9128 # return resultBuilder.build();
9129 # }
9130 # // ...
9131 #
9132 # Example (iOS / Obj-C):
9133 #
9134 # // ...
9135 # static UIColor* fromProto(Color* protocolor) {
9136 # float red = [protocolor red];
9137 # float green = [protocolor green];
9138 # float blue = [protocolor blue];
9139 # FloatValue* alpha_wrapper = [protocolor alpha];
9140 # float alpha = 1.0;
9141 # if (alpha_wrapper != nil) {
9142 # alpha = [alpha_wrapper value];
9143 # }
9144 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9145 # }
9146 #
9147 # static Color* toProto(UIColor* color) {
9148 # CGFloat red, green, blue, alpha;
9149 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9150 # return nil;
9151 # }
9152 # Color* result = [Color alloc] init];
9153 # [result setRed:red];
9154 # [result setGreen:green];
9155 # [result setBlue:blue];
9156 # if (alpha <= 0.9999) {
9157 # [result setAlpha:floatWrapperWithValue(alpha)];
9158 # }
9159 # [result autorelease];
9160 # return result;
9161 # }
9162 # // ...
9163 #
9164 # Example (JavaScript):
9165 #
9166 # // ...
9167 #
9168 # var protoToCssColor = function(rgb_color) {
9169 # var redFrac = rgb_color.red || 0.0;
9170 # var greenFrac = rgb_color.green || 0.0;
9171 # var blueFrac = rgb_color.blue || 0.0;
9172 # var red = Math.floor(redFrac * 255);
9173 # var green = Math.floor(greenFrac * 255);
9174 # var blue = Math.floor(blueFrac * 255);
9175 #
9176 # if (!('alpha' in rgb_color)) {
9177 # return rgbToCssColor_(red, green, blue);
9178 # }
9179 #
9180 # var alphaFrac = rgb_color.alpha.value || 0.0;
9181 # var rgbParams = [red, green, blue].join(',');
9182 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9183 # };
9184 #
9185 # var rgbToCssColor_ = function(red, green, blue) {
9186 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9187 # var hexString = rgbNumber.toString(16);
9188 # var missingZeros = 6 - hexString.length;
9189 # var resultBuilder = ['#'];
9190 # for (var i = 0; i < missingZeros; i++) {
9191 # resultBuilder.push('0');
9192 # }
9193 # resultBuilder.push(hexString);
9194 # return resultBuilder.join('');
9195 # };
9196 #
9197 # // ...
9198 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9199 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9200 # the final pixel color is defined by the equation:
9201 #
9202 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9203 #
9204 # This means that a value of 1.0 corresponds to a solid color, whereas
9205 # a value of 0.0 corresponds to a completely transparent color. This
9206 # uses a wrapper message rather than a simple float scalar so that it is
9207 # possible to distinguish between a default value and the value being unset.
9208 # If omitted, this color object is to be rendered as a solid color
9209 # (as if the alpha value had been explicitly given with a value of 1.0).
9210 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9211 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9212 },
9213 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009214 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009215 "style": "A String", # The style of the border.
9216 },
9217 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009218 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
9219 "angle": 42, # The angle between the standard orientation and the desired orientation.
9220 # Measured in degrees. Valid values are between -90 and 90. Positive
9221 # angles are angled upwards, negative are angled downwards.
9222 #
9223 # Note: For LTR text direction positive angles are in the counterclockwise
9224 # direction, whereas for RTL they are in the clockwise direction
9225 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
9226 # characters is unchanged.
9227 # For example:
9228 #
9229 # | V |
9230 # | e |
9231 # | r |
9232 # | t |
9233 # | i |
9234 # | c |
9235 # | a |
9236 # | l |
9237 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009238 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009239 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
9240 # calculation. Absence of this field means that circular references will
9241 # result in calculation errors.
9242 # calculation.
9243 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
9244 # less than this threshold value, the calculation rounds stop.
9245 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
9246 # rounds to perform.
9247 },
9248 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
9249 # `America/New_York`. If the time zone isn't recognized, this may
9250 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009251 },
9252 },
9253 "updateCells": { # Updates all cells in a range with new data. # Updates many cells at once.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009254 "start": { # A coordinate in a sheet. # The coordinate to start writing data at.
9255 # Any number of rows and columns (including a different number of
9256 # columns per row) may be written.
9257 # All indexes are zero-based.
9258 "rowIndex": 42, # The row index of the coordinate.
9259 "columnIndex": 42, # The column index of the coordinate.
9260 "sheetId": 42, # The sheet this coordinate is on.
9261 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009262 "range": { # A range on a sheet. # The range to write data to.
9263 #
9264 # If the data in rows does not cover the entire requested range,
9265 # the fields matching those set in fields will be cleared.
9266 # All indexes are zero-based.
9267 # Indexes are half open, e.g the start index is inclusive
9268 # and the end index is exclusive -- [start_index, end_index).
9269 # Missing indexes indicate the range is unbounded on that side.
9270 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009271 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009272 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009273 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009274 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009275 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009276 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009277 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009278 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009279 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009280 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009281 # `Sheet1!A:B == sheet_id: 0,
9282 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009283 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009284 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009285 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009286 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009287 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009288 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009289 #
9290 # The start index must always be less than or equal to the end index.
9291 # If the start index equals the end index, then the range is empty.
9292 # Empty ranges are typically not meaningful and are usually rendered in the
9293 # UI as `#REF!`.
9294 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009295 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009296 "sheetId": 42, # The sheet this range is on.
9297 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009298 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009299 },
9300 "rows": [ # The data to write.
9301 { # Data about each cell in a row.
9302 "values": [ # The values in the row, one per column.
9303 { # Data about a specific cell.
9304 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
9305 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009306 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009307 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009308 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009309 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
9310 # or vertically (as rows).
9311 "rows": [ # Each row grouping in the pivot table.
9312 { # A single grouping (either row or column) in a pivot table.
9313 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9314 "valueMetadata": [ # Metadata about values in the grouping.
9315 { # Metadata about a value in a pivot grouping.
9316 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9317 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9318 # (Note that formulaValue is not valid,
9319 # because the values will be calculated.)
9320 "numberValue": 3.14, # Represents a double value.
9321 # Note: Dates, Times and DateTimes are represented as doubles in
9322 # "serial number" format.
9323 "boolValue": True or False, # Represents a boolean value.
9324 "formulaValue": "A String", # Represents a formula.
9325 "stringValue": "A String", # Represents a string value.
9326 # Leading single quotes are not included. For example, if the user typed
9327 # `'123` into the UI, this would be represented as a `stringValue` of
9328 # `"123"`.
9329 "errorValue": { # An error in a cell. # Represents an error.
9330 # This field is read-only.
9331 "message": "A String", # A message with more information about the error
9332 # (in the spreadsheet's locale).
9333 "type": "A String", # The type of error.
9334 },
9335 },
9336 },
9337 ],
9338 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9339 # If not specified, sorting is alphabetical by this group's values.
9340 "buckets": [ # Determines the bucket from which values are chosen to sort.
9341 #
9342 # For example, in a pivot table with one row group & two column groups,
9343 # the row group can list up to two values. The first value corresponds
9344 # to a value within the first column group, and the second value
9345 # corresponds to a value in the second column group. If no values
9346 # are listed, this would indicate that the row should be sorted according
9347 # to the "Grand Total" over the column groups. If a single value is listed,
9348 # this would correspond to using the "Total" of that bucket.
9349 { # The kinds of value that a cell in a spreadsheet can have.
9350 "numberValue": 3.14, # Represents a double value.
9351 # Note: Dates, Times and DateTimes are represented as doubles in
9352 # "serial number" format.
9353 "boolValue": True or False, # Represents a boolean value.
9354 "formulaValue": "A String", # Represents a formula.
9355 "stringValue": "A String", # Represents a string value.
9356 # Leading single quotes are not included. For example, if the user typed
9357 # `'123` into the UI, this would be represented as a `stringValue` of
9358 # `"123"`.
9359 "errorValue": { # An error in a cell. # Represents an error.
9360 # This field is read-only.
9361 "message": "A String", # A message with more information about the error
9362 # (in the spreadsheet's locale).
9363 "type": "A String", # The type of error.
9364 },
9365 },
9366 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009367 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009368 # grouping should be sorted by.
9369 },
9370 "sortOrder": "A String", # The order the values in this group should be sorted.
9371 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9372 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009373 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009374 # means this group refers to column `C`, whereas the offset `1` would refer
9375 # to column `D`.
9376 },
9377 ],
9378 "source": { # A range on a sheet. # The range the pivot table is reading data from.
9379 # All indexes are zero-based.
9380 # Indexes are half open, e.g the start index is inclusive
9381 # and the end index is exclusive -- [start_index, end_index).
9382 # Missing indexes indicate the range is unbounded on that side.
9383 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009384 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009385 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009386 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009387 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009388 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009389 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009390 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009391 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009392 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009393 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009394 # `Sheet1!A:B == sheet_id: 0,
9395 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009396 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009397 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009398 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009399 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009400 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009401 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009402 #
9403 # The start index must always be less than or equal to the end index.
9404 # If the start index equals the end index, then the range is empty.
9405 # Empty ranges are typically not meaningful and are usually rendered in the
9406 # UI as `#REF!`.
9407 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009408 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009409 "sheetId": 42, # The sheet this range is on.
9410 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009411 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009412 },
9413 "values": [ # A list of values to include in the pivot table.
9414 { # The definition of how a value in a pivot table should be calculated.
9415 "formula": "A String", # A custom formula to calculate the value. The formula must start
9416 # with an `=` character.
9417 "summarizeFunction": "A String", # A function to summarize the value.
9418 # If formula is set, the only supported values are
9419 # SUM and
9420 # CUSTOM.
9421 # If sourceColumnOffset is set, then `CUSTOM`
9422 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009423 "name": "A String", # A name to use for the value. This is only used if formula was set.
9424 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009425 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
9426 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009427 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009428 # means this value refers to column `C`, whereas the offset `1` would
9429 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009430 },
9431 ],
9432 "criteria": { # An optional mapping of filters per source column offset.
9433 #
9434 # The filters will be applied before aggregating data into the pivot table.
9435 # The map's key is the column offset of the source range that you want to
9436 # filter, and the value is the criteria for that column.
9437 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009438 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009439 # for column `C`, whereas the key `1` is for column `D`.
9440 "a_key": { # Criteria for showing/hiding rows in a pivot table.
9441 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
9442 "A String",
9443 ],
9444 },
9445 },
9446 "columns": [ # Each column grouping in the pivot table.
9447 { # A single grouping (either row or column) in a pivot table.
9448 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
9449 "valueMetadata": [ # Metadata about values in the grouping.
9450 { # Metadata about a value in a pivot grouping.
9451 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
9452 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
9453 # (Note that formulaValue is not valid,
9454 # because the values will be calculated.)
9455 "numberValue": 3.14, # Represents a double value.
9456 # Note: Dates, Times and DateTimes are represented as doubles in
9457 # "serial number" format.
9458 "boolValue": True or False, # Represents a boolean value.
9459 "formulaValue": "A String", # Represents a formula.
9460 "stringValue": "A String", # Represents a string value.
9461 # Leading single quotes are not included. For example, if the user typed
9462 # `'123` into the UI, this would be represented as a `stringValue` of
9463 # `"123"`.
9464 "errorValue": { # An error in a cell. # Represents an error.
9465 # This field is read-only.
9466 "message": "A String", # A message with more information about the error
9467 # (in the spreadsheet's locale).
9468 "type": "A String", # The type of error.
9469 },
9470 },
9471 },
9472 ],
9473 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
9474 # If not specified, sorting is alphabetical by this group's values.
9475 "buckets": [ # Determines the bucket from which values are chosen to sort.
9476 #
9477 # For example, in a pivot table with one row group & two column groups,
9478 # the row group can list up to two values. The first value corresponds
9479 # to a value within the first column group, and the second value
9480 # corresponds to a value in the second column group. If no values
9481 # are listed, this would indicate that the row should be sorted according
9482 # to the "Grand Total" over the column groups. If a single value is listed,
9483 # this would correspond to using the "Total" of that bucket.
9484 { # The kinds of value that a cell in a spreadsheet can have.
9485 "numberValue": 3.14, # Represents a double value.
9486 # Note: Dates, Times and DateTimes are represented as doubles in
9487 # "serial number" format.
9488 "boolValue": True or False, # Represents a boolean value.
9489 "formulaValue": "A String", # Represents a formula.
9490 "stringValue": "A String", # Represents a string value.
9491 # Leading single quotes are not included. For example, if the user typed
9492 # `'123` into the UI, this would be represented as a `stringValue` of
9493 # `"123"`.
9494 "errorValue": { # An error in a cell. # Represents an error.
9495 # This field is read-only.
9496 "message": "A String", # A message with more information about the error
9497 # (in the spreadsheet's locale).
9498 "type": "A String", # The type of error.
9499 },
9500 },
9501 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009502 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009503 # grouping should be sorted by.
9504 },
9505 "sortOrder": "A String", # The order the values in this group should be sorted.
9506 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
9507 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009508 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009509 # means this group refers to column `C`, whereas the offset `1` would refer
9510 # to column `D`.
9511 },
9512 ],
9513 },
9514 "hyperlink": "A String", # A hyperlink this cell points to, if any.
9515 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
9516 "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
9517 # the calculated value. For cells with literals, this will be
9518 # the same as the user_entered_value.
9519 # This field is read-only.
9520 "numberValue": 3.14, # Represents a double value.
9521 # Note: Dates, Times and DateTimes are represented as doubles in
9522 # "serial number" format.
9523 "boolValue": True or False, # Represents a boolean value.
9524 "formulaValue": "A String", # Represents a formula.
9525 "stringValue": "A String", # Represents a string value.
9526 # Leading single quotes are not included. For example, if the user typed
9527 # `'123` into the UI, this would be represented as a `stringValue` of
9528 # `"123"`.
9529 "errorValue": { # An error in a cell. # Represents an error.
9530 # This field is read-only.
9531 "message": "A String", # A message with more information about the error
9532 # (in the spreadsheet's locale).
9533 "type": "A String", # The type of error.
9534 },
9535 },
9536 "formattedValue": "A String", # The formatted value of the cell.
9537 # This is the value as it's shown to the user.
9538 # This field is read-only.
9539 "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()`
9540 # Note: Dates, Times and DateTimes are represented as doubles in
9541 # serial number format.
9542 "numberValue": 3.14, # Represents a double value.
9543 # Note: Dates, Times and DateTimes are represented as doubles in
9544 # "serial number" format.
9545 "boolValue": True or False, # Represents a boolean value.
9546 "formulaValue": "A String", # Represents a formula.
9547 "stringValue": "A String", # Represents a string value.
9548 # Leading single quotes are not included. For example, if the user typed
9549 # `'123` into the UI, this would be represented as a `stringValue` of
9550 # `"123"`.
9551 "errorValue": { # An error in a cell. # Represents an error.
9552 # This field is read-only.
9553 "message": "A String", # A message with more information about the error
9554 # (in the spreadsheet's locale).
9555 "type": "A String", # The type of error.
9556 },
9557 },
9558 "note": "A String", # Any note on the cell.
9559 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
9560 # This includes the results of applying any conditional formatting and,
9561 # if the cell contains a formula, the computed number format.
9562 # If the effective format is the default format, effective format will
9563 # not be written.
9564 # This field is read-only.
9565 "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 -07009566 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
9567 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009568 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07009569 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009570 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009571 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009572 },
9573 "textDirection": "A String", # The direction of the text in the cell.
9574 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
9575 # When updating padding, every field must be specified.
9576 "top": 42, # The top padding of the cell.
9577 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009578 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009579 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009580 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009581 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009582 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
9583 # for simplicity of conversion to/from color representations in various
9584 # languages over compactness; for example, the fields of this representation
9585 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9586 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9587 # method in iOS; and, with just a little work, it can be easily formatted into
9588 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9589 #
9590 # Example (Java):
9591 #
9592 # import com.google.type.Color;
9593 #
9594 # // ...
9595 # public static java.awt.Color fromProto(Color protocolor) {
9596 # float alpha = protocolor.hasAlpha()
9597 # ? protocolor.getAlpha().getValue()
9598 # : 1.0;
9599 #
9600 # return new java.awt.Color(
9601 # protocolor.getRed(),
9602 # protocolor.getGreen(),
9603 # protocolor.getBlue(),
9604 # alpha);
9605 # }
9606 #
9607 # public static Color toProto(java.awt.Color color) {
9608 # float red = (float) color.getRed();
9609 # float green = (float) color.getGreen();
9610 # float blue = (float) color.getBlue();
9611 # float denominator = 255.0;
9612 # Color.Builder resultBuilder =
9613 # Color
9614 # .newBuilder()
9615 # .setRed(red / denominator)
9616 # .setGreen(green / denominator)
9617 # .setBlue(blue / denominator);
9618 # int alpha = color.getAlpha();
9619 # if (alpha != 255) {
9620 # result.setAlpha(
9621 # FloatValue
9622 # .newBuilder()
9623 # .setValue(((float) alpha) / denominator)
9624 # .build());
9625 # }
9626 # return resultBuilder.build();
9627 # }
9628 # // ...
9629 #
9630 # Example (iOS / Obj-C):
9631 #
9632 # // ...
9633 # static UIColor* fromProto(Color* protocolor) {
9634 # float red = [protocolor red];
9635 # float green = [protocolor green];
9636 # float blue = [protocolor blue];
9637 # FloatValue* alpha_wrapper = [protocolor alpha];
9638 # float alpha = 1.0;
9639 # if (alpha_wrapper != nil) {
9640 # alpha = [alpha_wrapper value];
9641 # }
9642 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9643 # }
9644 #
9645 # static Color* toProto(UIColor* color) {
9646 # CGFloat red, green, blue, alpha;
9647 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9648 # return nil;
9649 # }
9650 # Color* result = [Color alloc] init];
9651 # [result setRed:red];
9652 # [result setGreen:green];
9653 # [result setBlue:blue];
9654 # if (alpha <= 0.9999) {
9655 # [result setAlpha:floatWrapperWithValue(alpha)];
9656 # }
9657 # [result autorelease];
9658 # return result;
9659 # }
9660 # // ...
9661 #
9662 # Example (JavaScript):
9663 #
9664 # // ...
9665 #
9666 # var protoToCssColor = function(rgb_color) {
9667 # var redFrac = rgb_color.red || 0.0;
9668 # var greenFrac = rgb_color.green || 0.0;
9669 # var blueFrac = rgb_color.blue || 0.0;
9670 # var red = Math.floor(redFrac * 255);
9671 # var green = Math.floor(greenFrac * 255);
9672 # var blue = Math.floor(blueFrac * 255);
9673 #
9674 # if (!('alpha' in rgb_color)) {
9675 # return rgbToCssColor_(red, green, blue);
9676 # }
9677 #
9678 # var alphaFrac = rgb_color.alpha.value || 0.0;
9679 # var rgbParams = [red, green, blue].join(',');
9680 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9681 # };
9682 #
9683 # var rgbToCssColor_ = function(red, green, blue) {
9684 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9685 # var hexString = rgbNumber.toString(16);
9686 # var missingZeros = 6 - hexString.length;
9687 # var resultBuilder = ['#'];
9688 # for (var i = 0; i < missingZeros; i++) {
9689 # resultBuilder.push('0');
9690 # }
9691 # resultBuilder.push(hexString);
9692 # return resultBuilder.join('');
9693 # };
9694 #
9695 # // ...
9696 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9697 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9698 # the final pixel color is defined by the equation:
9699 #
9700 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9701 #
9702 # This means that a value of 1.0 corresponds to a solid color, whereas
9703 # a value of 0.0 corresponds to a completely transparent color. This
9704 # uses a wrapper message rather than a simple float scalar so that it is
9705 # possible to distinguish between a default value and the value being unset.
9706 # If omitted, this color object is to be rendered as a solid color
9707 # (as if the alpha value had been explicitly given with a value of 1.0).
9708 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9709 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9710 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07009711 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009712 "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).
9713 # Absent values indicate that the field isn't specified.
9714 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
9715 # for simplicity of conversion to/from color representations in various
9716 # languages over compactness; for example, the fields of this representation
9717 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9718 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9719 # method in iOS; and, with just a little work, it can be easily formatted into
9720 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9721 #
9722 # Example (Java):
9723 #
9724 # import com.google.type.Color;
9725 #
9726 # // ...
9727 # public static java.awt.Color fromProto(Color protocolor) {
9728 # float alpha = protocolor.hasAlpha()
9729 # ? protocolor.getAlpha().getValue()
9730 # : 1.0;
9731 #
9732 # return new java.awt.Color(
9733 # protocolor.getRed(),
9734 # protocolor.getGreen(),
9735 # protocolor.getBlue(),
9736 # alpha);
9737 # }
9738 #
9739 # public static Color toProto(java.awt.Color color) {
9740 # float red = (float) color.getRed();
9741 # float green = (float) color.getGreen();
9742 # float blue = (float) color.getBlue();
9743 # float denominator = 255.0;
9744 # Color.Builder resultBuilder =
9745 # Color
9746 # .newBuilder()
9747 # .setRed(red / denominator)
9748 # .setGreen(green / denominator)
9749 # .setBlue(blue / denominator);
9750 # int alpha = color.getAlpha();
9751 # if (alpha != 255) {
9752 # result.setAlpha(
9753 # FloatValue
9754 # .newBuilder()
9755 # .setValue(((float) alpha) / denominator)
9756 # .build());
9757 # }
9758 # return resultBuilder.build();
9759 # }
9760 # // ...
9761 #
9762 # Example (iOS / Obj-C):
9763 #
9764 # // ...
9765 # static UIColor* fromProto(Color* protocolor) {
9766 # float red = [protocolor red];
9767 # float green = [protocolor green];
9768 # float blue = [protocolor blue];
9769 # FloatValue* alpha_wrapper = [protocolor alpha];
9770 # float alpha = 1.0;
9771 # if (alpha_wrapper != nil) {
9772 # alpha = [alpha_wrapper value];
9773 # }
9774 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9775 # }
9776 #
9777 # static Color* toProto(UIColor* color) {
9778 # CGFloat red, green, blue, alpha;
9779 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9780 # return nil;
9781 # }
9782 # Color* result = [Color alloc] init];
9783 # [result setRed:red];
9784 # [result setGreen:green];
9785 # [result setBlue:blue];
9786 # if (alpha <= 0.9999) {
9787 # [result setAlpha:floatWrapperWithValue(alpha)];
9788 # }
9789 # [result autorelease];
9790 # return result;
9791 # }
9792 # // ...
9793 #
9794 # Example (JavaScript):
9795 #
9796 # // ...
9797 #
9798 # var protoToCssColor = function(rgb_color) {
9799 # var redFrac = rgb_color.red || 0.0;
9800 # var greenFrac = rgb_color.green || 0.0;
9801 # var blueFrac = rgb_color.blue || 0.0;
9802 # var red = Math.floor(redFrac * 255);
9803 # var green = Math.floor(greenFrac * 255);
9804 # var blue = Math.floor(blueFrac * 255);
9805 #
9806 # if (!('alpha' in rgb_color)) {
9807 # return rgbToCssColor_(red, green, blue);
9808 # }
9809 #
9810 # var alphaFrac = rgb_color.alpha.value || 0.0;
9811 # var rgbParams = [red, green, blue].join(',');
9812 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9813 # };
9814 #
9815 # var rgbToCssColor_ = function(red, green, blue) {
9816 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9817 # var hexString = rgbNumber.toString(16);
9818 # var missingZeros = 6 - hexString.length;
9819 # var resultBuilder = ['#'];
9820 # for (var i = 0; i < missingZeros; i++) {
9821 # resultBuilder.push('0');
9822 # }
9823 # resultBuilder.push(hexString);
9824 # return resultBuilder.join('');
9825 # };
9826 #
9827 # // ...
9828 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9829 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9830 # the final pixel color is defined by the equation:
9831 #
9832 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9833 #
9834 # This means that a value of 1.0 corresponds to a solid color, whereas
9835 # a value of 0.0 corresponds to a completely transparent color. This
9836 # uses a wrapper message rather than a simple float scalar so that it is
9837 # possible to distinguish between a default value and the value being unset.
9838 # If omitted, this color object is to be rendered as a solid color
9839 # (as if the alpha value had been explicitly given with a value of 1.0).
9840 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9841 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9842 },
9843 "bold": True or False, # True if the text is bold.
9844 "strikethrough": True or False, # True if the text has a strikethrough.
9845 "fontFamily": "A String", # The font family.
9846 "fontSize": 42, # The size of the font.
9847 "italic": True or False, # True if the text is italicized.
9848 "underline": True or False, # True if the text is underlined.
9849 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04009850 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009851 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
9852 "borders": { # The borders of the cell. # The borders of the cell.
9853 "top": { # A border along a cell. # The top border of the cell.
9854 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9855 # for simplicity of conversion to/from color representations in various
9856 # languages over compactness; for example, the fields of this representation
9857 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9858 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9859 # method in iOS; and, with just a little work, it can be easily formatted into
9860 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9861 #
9862 # Example (Java):
9863 #
9864 # import com.google.type.Color;
9865 #
9866 # // ...
9867 # public static java.awt.Color fromProto(Color protocolor) {
9868 # float alpha = protocolor.hasAlpha()
9869 # ? protocolor.getAlpha().getValue()
9870 # : 1.0;
9871 #
9872 # return new java.awt.Color(
9873 # protocolor.getRed(),
9874 # protocolor.getGreen(),
9875 # protocolor.getBlue(),
9876 # alpha);
9877 # }
9878 #
9879 # public static Color toProto(java.awt.Color color) {
9880 # float red = (float) color.getRed();
9881 # float green = (float) color.getGreen();
9882 # float blue = (float) color.getBlue();
9883 # float denominator = 255.0;
9884 # Color.Builder resultBuilder =
9885 # Color
9886 # .newBuilder()
9887 # .setRed(red / denominator)
9888 # .setGreen(green / denominator)
9889 # .setBlue(blue / denominator);
9890 # int alpha = color.getAlpha();
9891 # if (alpha != 255) {
9892 # result.setAlpha(
9893 # FloatValue
9894 # .newBuilder()
9895 # .setValue(((float) alpha) / denominator)
9896 # .build());
9897 # }
9898 # return resultBuilder.build();
9899 # }
9900 # // ...
9901 #
9902 # Example (iOS / Obj-C):
9903 #
9904 # // ...
9905 # static UIColor* fromProto(Color* protocolor) {
9906 # float red = [protocolor red];
9907 # float green = [protocolor green];
9908 # float blue = [protocolor blue];
9909 # FloatValue* alpha_wrapper = [protocolor alpha];
9910 # float alpha = 1.0;
9911 # if (alpha_wrapper != nil) {
9912 # alpha = [alpha_wrapper value];
9913 # }
9914 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9915 # }
9916 #
9917 # static Color* toProto(UIColor* color) {
9918 # CGFloat red, green, blue, alpha;
9919 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
9920 # return nil;
9921 # }
9922 # Color* result = [Color alloc] init];
9923 # [result setRed:red];
9924 # [result setGreen:green];
9925 # [result setBlue:blue];
9926 # if (alpha <= 0.9999) {
9927 # [result setAlpha:floatWrapperWithValue(alpha)];
9928 # }
9929 # [result autorelease];
9930 # return result;
9931 # }
9932 # // ...
9933 #
9934 # Example (JavaScript):
9935 #
9936 # // ...
9937 #
9938 # var protoToCssColor = function(rgb_color) {
9939 # var redFrac = rgb_color.red || 0.0;
9940 # var greenFrac = rgb_color.green || 0.0;
9941 # var blueFrac = rgb_color.blue || 0.0;
9942 # var red = Math.floor(redFrac * 255);
9943 # var green = Math.floor(greenFrac * 255);
9944 # var blue = Math.floor(blueFrac * 255);
9945 #
9946 # if (!('alpha' in rgb_color)) {
9947 # return rgbToCssColor_(red, green, blue);
9948 # }
9949 #
9950 # var alphaFrac = rgb_color.alpha.value || 0.0;
9951 # var rgbParams = [red, green, blue].join(',');
9952 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9953 # };
9954 #
9955 # var rgbToCssColor_ = function(red, green, blue) {
9956 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9957 # var hexString = rgbNumber.toString(16);
9958 # var missingZeros = 6 - hexString.length;
9959 # var resultBuilder = ['#'];
9960 # for (var i = 0; i < missingZeros; i++) {
9961 # resultBuilder.push('0');
9962 # }
9963 # resultBuilder.push(hexString);
9964 # return resultBuilder.join('');
9965 # };
9966 #
9967 # // ...
9968 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
9969 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
9970 # the final pixel color is defined by the equation:
9971 #
9972 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
9973 #
9974 # This means that a value of 1.0 corresponds to a solid color, whereas
9975 # a value of 0.0 corresponds to a completely transparent color. This
9976 # uses a wrapper message rather than a simple float scalar so that it is
9977 # possible to distinguish between a default value and the value being unset.
9978 # If omitted, this color object is to be rendered as a solid color
9979 # (as if the alpha value had been explicitly given with a value of 1.0).
9980 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
9981 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
9982 },
9983 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07009984 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07009985 "style": "A String", # The style of the border.
9986 },
9987 "right": { # A border along a cell. # The right border of the cell.
9988 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
9989 # for simplicity of conversion to/from color representations in various
9990 # languages over compactness; for example, the fields of this representation
9991 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9992 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9993 # method in iOS; and, with just a little work, it can be easily formatted into
9994 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
9995 #
9996 # Example (Java):
9997 #
9998 # import com.google.type.Color;
9999 #
10000 # // ...
10001 # public static java.awt.Color fromProto(Color protocolor) {
10002 # float alpha = protocolor.hasAlpha()
10003 # ? protocolor.getAlpha().getValue()
10004 # : 1.0;
10005 #
10006 # return new java.awt.Color(
10007 # protocolor.getRed(),
10008 # protocolor.getGreen(),
10009 # protocolor.getBlue(),
10010 # alpha);
10011 # }
10012 #
10013 # public static Color toProto(java.awt.Color color) {
10014 # float red = (float) color.getRed();
10015 # float green = (float) color.getGreen();
10016 # float blue = (float) color.getBlue();
10017 # float denominator = 255.0;
10018 # Color.Builder resultBuilder =
10019 # Color
10020 # .newBuilder()
10021 # .setRed(red / denominator)
10022 # .setGreen(green / denominator)
10023 # .setBlue(blue / denominator);
10024 # int alpha = color.getAlpha();
10025 # if (alpha != 255) {
10026 # result.setAlpha(
10027 # FloatValue
10028 # .newBuilder()
10029 # .setValue(((float) alpha) / denominator)
10030 # .build());
10031 # }
10032 # return resultBuilder.build();
10033 # }
10034 # // ...
10035 #
10036 # Example (iOS / Obj-C):
10037 #
10038 # // ...
10039 # static UIColor* fromProto(Color* protocolor) {
10040 # float red = [protocolor red];
10041 # float green = [protocolor green];
10042 # float blue = [protocolor blue];
10043 # FloatValue* alpha_wrapper = [protocolor alpha];
10044 # float alpha = 1.0;
10045 # if (alpha_wrapper != nil) {
10046 # alpha = [alpha_wrapper value];
10047 # }
10048 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10049 # }
10050 #
10051 # static Color* toProto(UIColor* color) {
10052 # CGFloat red, green, blue, alpha;
10053 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10054 # return nil;
10055 # }
10056 # Color* result = [Color alloc] init];
10057 # [result setRed:red];
10058 # [result setGreen:green];
10059 # [result setBlue:blue];
10060 # if (alpha <= 0.9999) {
10061 # [result setAlpha:floatWrapperWithValue(alpha)];
10062 # }
10063 # [result autorelease];
10064 # return result;
10065 # }
10066 # // ...
10067 #
10068 # Example (JavaScript):
10069 #
10070 # // ...
10071 #
10072 # var protoToCssColor = function(rgb_color) {
10073 # var redFrac = rgb_color.red || 0.0;
10074 # var greenFrac = rgb_color.green || 0.0;
10075 # var blueFrac = rgb_color.blue || 0.0;
10076 # var red = Math.floor(redFrac * 255);
10077 # var green = Math.floor(greenFrac * 255);
10078 # var blue = Math.floor(blueFrac * 255);
10079 #
10080 # if (!('alpha' in rgb_color)) {
10081 # return rgbToCssColor_(red, green, blue);
10082 # }
10083 #
10084 # var alphaFrac = rgb_color.alpha.value || 0.0;
10085 # var rgbParams = [red, green, blue].join(',');
10086 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10087 # };
10088 #
10089 # var rgbToCssColor_ = function(red, green, blue) {
10090 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10091 # var hexString = rgbNumber.toString(16);
10092 # var missingZeros = 6 - hexString.length;
10093 # var resultBuilder = ['#'];
10094 # for (var i = 0; i < missingZeros; i++) {
10095 # resultBuilder.push('0');
10096 # }
10097 # resultBuilder.push(hexString);
10098 # return resultBuilder.join('');
10099 # };
10100 #
10101 # // ...
10102 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10103 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10104 # the final pixel color is defined by the equation:
10105 #
10106 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10107 #
10108 # This means that a value of 1.0 corresponds to a solid color, whereas
10109 # a value of 0.0 corresponds to a completely transparent color. This
10110 # uses a wrapper message rather than a simple float scalar so that it is
10111 # possible to distinguish between a default value and the value being unset.
10112 # If omitted, this color object is to be rendered as a solid color
10113 # (as if the alpha value had been explicitly given with a value of 1.0).
10114 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10115 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10116 },
10117 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010118 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010119 "style": "A String", # The style of the border.
10120 },
10121 "bottom": { # A border along a cell. # The bottom border of the cell.
10122 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10123 # for simplicity of conversion to/from color representations in various
10124 # languages over compactness; for example, the fields of this representation
10125 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10126 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10127 # method in iOS; and, with just a little work, it can be easily formatted into
10128 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10129 #
10130 # Example (Java):
10131 #
10132 # import com.google.type.Color;
10133 #
10134 # // ...
10135 # public static java.awt.Color fromProto(Color protocolor) {
10136 # float alpha = protocolor.hasAlpha()
10137 # ? protocolor.getAlpha().getValue()
10138 # : 1.0;
10139 #
10140 # return new java.awt.Color(
10141 # protocolor.getRed(),
10142 # protocolor.getGreen(),
10143 # protocolor.getBlue(),
10144 # alpha);
10145 # }
10146 #
10147 # public static Color toProto(java.awt.Color color) {
10148 # float red = (float) color.getRed();
10149 # float green = (float) color.getGreen();
10150 # float blue = (float) color.getBlue();
10151 # float denominator = 255.0;
10152 # Color.Builder resultBuilder =
10153 # Color
10154 # .newBuilder()
10155 # .setRed(red / denominator)
10156 # .setGreen(green / denominator)
10157 # .setBlue(blue / denominator);
10158 # int alpha = color.getAlpha();
10159 # if (alpha != 255) {
10160 # result.setAlpha(
10161 # FloatValue
10162 # .newBuilder()
10163 # .setValue(((float) alpha) / denominator)
10164 # .build());
10165 # }
10166 # return resultBuilder.build();
10167 # }
10168 # // ...
10169 #
10170 # Example (iOS / Obj-C):
10171 #
10172 # // ...
10173 # static UIColor* fromProto(Color* protocolor) {
10174 # float red = [protocolor red];
10175 # float green = [protocolor green];
10176 # float blue = [protocolor blue];
10177 # FloatValue* alpha_wrapper = [protocolor alpha];
10178 # float alpha = 1.0;
10179 # if (alpha_wrapper != nil) {
10180 # alpha = [alpha_wrapper value];
10181 # }
10182 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10183 # }
10184 #
10185 # static Color* toProto(UIColor* color) {
10186 # CGFloat red, green, blue, alpha;
10187 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10188 # return nil;
10189 # }
10190 # Color* result = [Color alloc] init];
10191 # [result setRed:red];
10192 # [result setGreen:green];
10193 # [result setBlue:blue];
10194 # if (alpha <= 0.9999) {
10195 # [result setAlpha:floatWrapperWithValue(alpha)];
10196 # }
10197 # [result autorelease];
10198 # return result;
10199 # }
10200 # // ...
10201 #
10202 # Example (JavaScript):
10203 #
10204 # // ...
10205 #
10206 # var protoToCssColor = function(rgb_color) {
10207 # var redFrac = rgb_color.red || 0.0;
10208 # var greenFrac = rgb_color.green || 0.0;
10209 # var blueFrac = rgb_color.blue || 0.0;
10210 # var red = Math.floor(redFrac * 255);
10211 # var green = Math.floor(greenFrac * 255);
10212 # var blue = Math.floor(blueFrac * 255);
10213 #
10214 # if (!('alpha' in rgb_color)) {
10215 # return rgbToCssColor_(red, green, blue);
10216 # }
10217 #
10218 # var alphaFrac = rgb_color.alpha.value || 0.0;
10219 # var rgbParams = [red, green, blue].join(',');
10220 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10221 # };
10222 #
10223 # var rgbToCssColor_ = function(red, green, blue) {
10224 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10225 # var hexString = rgbNumber.toString(16);
10226 # var missingZeros = 6 - hexString.length;
10227 # var resultBuilder = ['#'];
10228 # for (var i = 0; i < missingZeros; i++) {
10229 # resultBuilder.push('0');
10230 # }
10231 # resultBuilder.push(hexString);
10232 # return resultBuilder.join('');
10233 # };
10234 #
10235 # // ...
10236 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10237 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10238 # the final pixel color is defined by the equation:
10239 #
10240 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10241 #
10242 # This means that a value of 1.0 corresponds to a solid color, whereas
10243 # a value of 0.0 corresponds to a completely transparent color. This
10244 # uses a wrapper message rather than a simple float scalar so that it is
10245 # possible to distinguish between a default value and the value being unset.
10246 # If omitted, this color object is to be rendered as a solid color
10247 # (as if the alpha value had been explicitly given with a value of 1.0).
10248 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10249 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10250 },
10251 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010252 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010253 "style": "A String", # The style of the border.
10254 },
10255 "left": { # A border along a cell. # The left border of the cell.
10256 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10257 # for simplicity of conversion to/from color representations in various
10258 # languages over compactness; for example, the fields of this representation
10259 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10260 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10261 # method in iOS; and, with just a little work, it can be easily formatted into
10262 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10263 #
10264 # Example (Java):
10265 #
10266 # import com.google.type.Color;
10267 #
10268 # // ...
10269 # public static java.awt.Color fromProto(Color protocolor) {
10270 # float alpha = protocolor.hasAlpha()
10271 # ? protocolor.getAlpha().getValue()
10272 # : 1.0;
10273 #
10274 # return new java.awt.Color(
10275 # protocolor.getRed(),
10276 # protocolor.getGreen(),
10277 # protocolor.getBlue(),
10278 # alpha);
10279 # }
10280 #
10281 # public static Color toProto(java.awt.Color color) {
10282 # float red = (float) color.getRed();
10283 # float green = (float) color.getGreen();
10284 # float blue = (float) color.getBlue();
10285 # float denominator = 255.0;
10286 # Color.Builder resultBuilder =
10287 # Color
10288 # .newBuilder()
10289 # .setRed(red / denominator)
10290 # .setGreen(green / denominator)
10291 # .setBlue(blue / denominator);
10292 # int alpha = color.getAlpha();
10293 # if (alpha != 255) {
10294 # result.setAlpha(
10295 # FloatValue
10296 # .newBuilder()
10297 # .setValue(((float) alpha) / denominator)
10298 # .build());
10299 # }
10300 # return resultBuilder.build();
10301 # }
10302 # // ...
10303 #
10304 # Example (iOS / Obj-C):
10305 #
10306 # // ...
10307 # static UIColor* fromProto(Color* protocolor) {
10308 # float red = [protocolor red];
10309 # float green = [protocolor green];
10310 # float blue = [protocolor blue];
10311 # FloatValue* alpha_wrapper = [protocolor alpha];
10312 # float alpha = 1.0;
10313 # if (alpha_wrapper != nil) {
10314 # alpha = [alpha_wrapper value];
10315 # }
10316 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10317 # }
10318 #
10319 # static Color* toProto(UIColor* color) {
10320 # CGFloat red, green, blue, alpha;
10321 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10322 # return nil;
10323 # }
10324 # Color* result = [Color alloc] init];
10325 # [result setRed:red];
10326 # [result setGreen:green];
10327 # [result setBlue:blue];
10328 # if (alpha <= 0.9999) {
10329 # [result setAlpha:floatWrapperWithValue(alpha)];
10330 # }
10331 # [result autorelease];
10332 # return result;
10333 # }
10334 # // ...
10335 #
10336 # Example (JavaScript):
10337 #
10338 # // ...
10339 #
10340 # var protoToCssColor = function(rgb_color) {
10341 # var redFrac = rgb_color.red || 0.0;
10342 # var greenFrac = rgb_color.green || 0.0;
10343 # var blueFrac = rgb_color.blue || 0.0;
10344 # var red = Math.floor(redFrac * 255);
10345 # var green = Math.floor(greenFrac * 255);
10346 # var blue = Math.floor(blueFrac * 255);
10347 #
10348 # if (!('alpha' in rgb_color)) {
10349 # return rgbToCssColor_(red, green, blue);
10350 # }
10351 #
10352 # var alphaFrac = rgb_color.alpha.value || 0.0;
10353 # var rgbParams = [red, green, blue].join(',');
10354 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10355 # };
10356 #
10357 # var rgbToCssColor_ = function(red, green, blue) {
10358 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10359 # var hexString = rgbNumber.toString(16);
10360 # var missingZeros = 6 - hexString.length;
10361 # var resultBuilder = ['#'];
10362 # for (var i = 0; i < missingZeros; i++) {
10363 # resultBuilder.push('0');
10364 # }
10365 # resultBuilder.push(hexString);
10366 # return resultBuilder.join('');
10367 # };
10368 #
10369 # // ...
10370 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10371 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10372 # the final pixel color is defined by the equation:
10373 #
10374 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10375 #
10376 # This means that a value of 1.0 corresponds to a solid color, whereas
10377 # a value of 0.0 corresponds to a completely transparent color. This
10378 # uses a wrapper message rather than a simple float scalar so that it is
10379 # possible to distinguish between a default value and the value being unset.
10380 # If omitted, this color object is to be rendered as a solid color
10381 # (as if the alpha value had been explicitly given with a value of 1.0).
10382 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10383 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10384 },
10385 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010386 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010387 "style": "A String", # The style of the border.
10388 },
10389 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010390 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
10391 "angle": 42, # The angle between the standard orientation and the desired orientation.
10392 # Measured in degrees. Valid values are between -90 and 90. Positive
10393 # angles are angled upwards, negative are angled downwards.
10394 #
10395 # Note: For LTR text direction positive angles are in the counterclockwise
10396 # direction, whereas for RTL they are in the clockwise direction
10397 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
10398 # characters is unchanged.
10399 # For example:
10400 #
10401 # | V |
10402 # | e |
10403 # | r |
10404 # | t |
10405 # | i |
10406 # | c |
10407 # | a |
10408 # | l |
10409 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010410 },
10411 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
10412 #
10413 # When writing, the new format will be merged with the existing format.
10414 "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 -070010415 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
10416 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010417 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070010418 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010419 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010420 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010421 },
10422 "textDirection": "A String", # The direction of the text in the cell.
10423 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
10424 # When updating padding, every field must be specified.
10425 "top": 42, # The top padding of the cell.
10426 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010427 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010428 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010429 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010430 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010431 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
10432 # for simplicity of conversion to/from color representations in various
10433 # languages over compactness; for example, the fields of this representation
10434 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10435 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10436 # method in iOS; and, with just a little work, it can be easily formatted into
10437 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10438 #
10439 # Example (Java):
10440 #
10441 # import com.google.type.Color;
10442 #
10443 # // ...
10444 # public static java.awt.Color fromProto(Color protocolor) {
10445 # float alpha = protocolor.hasAlpha()
10446 # ? protocolor.getAlpha().getValue()
10447 # : 1.0;
10448 #
10449 # return new java.awt.Color(
10450 # protocolor.getRed(),
10451 # protocolor.getGreen(),
10452 # protocolor.getBlue(),
10453 # alpha);
10454 # }
10455 #
10456 # public static Color toProto(java.awt.Color color) {
10457 # float red = (float) color.getRed();
10458 # float green = (float) color.getGreen();
10459 # float blue = (float) color.getBlue();
10460 # float denominator = 255.0;
10461 # Color.Builder resultBuilder =
10462 # Color
10463 # .newBuilder()
10464 # .setRed(red / denominator)
10465 # .setGreen(green / denominator)
10466 # .setBlue(blue / denominator);
10467 # int alpha = color.getAlpha();
10468 # if (alpha != 255) {
10469 # result.setAlpha(
10470 # FloatValue
10471 # .newBuilder()
10472 # .setValue(((float) alpha) / denominator)
10473 # .build());
10474 # }
10475 # return resultBuilder.build();
10476 # }
10477 # // ...
10478 #
10479 # Example (iOS / Obj-C):
10480 #
10481 # // ...
10482 # static UIColor* fromProto(Color* protocolor) {
10483 # float red = [protocolor red];
10484 # float green = [protocolor green];
10485 # float blue = [protocolor blue];
10486 # FloatValue* alpha_wrapper = [protocolor alpha];
10487 # float alpha = 1.0;
10488 # if (alpha_wrapper != nil) {
10489 # alpha = [alpha_wrapper value];
10490 # }
10491 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10492 # }
10493 #
10494 # static Color* toProto(UIColor* color) {
10495 # CGFloat red, green, blue, alpha;
10496 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10497 # return nil;
10498 # }
10499 # Color* result = [Color alloc] init];
10500 # [result setRed:red];
10501 # [result setGreen:green];
10502 # [result setBlue:blue];
10503 # if (alpha <= 0.9999) {
10504 # [result setAlpha:floatWrapperWithValue(alpha)];
10505 # }
10506 # [result autorelease];
10507 # return result;
10508 # }
10509 # // ...
10510 #
10511 # Example (JavaScript):
10512 #
10513 # // ...
10514 #
10515 # var protoToCssColor = function(rgb_color) {
10516 # var redFrac = rgb_color.red || 0.0;
10517 # var greenFrac = rgb_color.green || 0.0;
10518 # var blueFrac = rgb_color.blue || 0.0;
10519 # var red = Math.floor(redFrac * 255);
10520 # var green = Math.floor(greenFrac * 255);
10521 # var blue = Math.floor(blueFrac * 255);
10522 #
10523 # if (!('alpha' in rgb_color)) {
10524 # return rgbToCssColor_(red, green, blue);
10525 # }
10526 #
10527 # var alphaFrac = rgb_color.alpha.value || 0.0;
10528 # var rgbParams = [red, green, blue].join(',');
10529 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10530 # };
10531 #
10532 # var rgbToCssColor_ = function(red, green, blue) {
10533 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10534 # var hexString = rgbNumber.toString(16);
10535 # var missingZeros = 6 - hexString.length;
10536 # var resultBuilder = ['#'];
10537 # for (var i = 0; i < missingZeros; i++) {
10538 # resultBuilder.push('0');
10539 # }
10540 # resultBuilder.push(hexString);
10541 # return resultBuilder.join('');
10542 # };
10543 #
10544 # // ...
10545 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10546 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10547 # the final pixel color is defined by the equation:
10548 #
10549 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10550 #
10551 # This means that a value of 1.0 corresponds to a solid color, whereas
10552 # a value of 0.0 corresponds to a completely transparent color. This
10553 # uses a wrapper message rather than a simple float scalar so that it is
10554 # possible to distinguish between a default value and the value being unset.
10555 # If omitted, this color object is to be rendered as a solid color
10556 # (as if the alpha value had been explicitly given with a value of 1.0).
10557 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10558 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10559 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070010560 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010561 "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).
10562 # Absent values indicate that the field isn't specified.
10563 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
10564 # for simplicity of conversion to/from color representations in various
10565 # languages over compactness; for example, the fields of this representation
10566 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10567 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10568 # method in iOS; and, with just a little work, it can be easily formatted into
10569 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10570 #
10571 # Example (Java):
10572 #
10573 # import com.google.type.Color;
10574 #
10575 # // ...
10576 # public static java.awt.Color fromProto(Color protocolor) {
10577 # float alpha = protocolor.hasAlpha()
10578 # ? protocolor.getAlpha().getValue()
10579 # : 1.0;
10580 #
10581 # return new java.awt.Color(
10582 # protocolor.getRed(),
10583 # protocolor.getGreen(),
10584 # protocolor.getBlue(),
10585 # alpha);
10586 # }
10587 #
10588 # public static Color toProto(java.awt.Color color) {
10589 # float red = (float) color.getRed();
10590 # float green = (float) color.getGreen();
10591 # float blue = (float) color.getBlue();
10592 # float denominator = 255.0;
10593 # Color.Builder resultBuilder =
10594 # Color
10595 # .newBuilder()
10596 # .setRed(red / denominator)
10597 # .setGreen(green / denominator)
10598 # .setBlue(blue / denominator);
10599 # int alpha = color.getAlpha();
10600 # if (alpha != 255) {
10601 # result.setAlpha(
10602 # FloatValue
10603 # .newBuilder()
10604 # .setValue(((float) alpha) / denominator)
10605 # .build());
10606 # }
10607 # return resultBuilder.build();
10608 # }
10609 # // ...
10610 #
10611 # Example (iOS / Obj-C):
10612 #
10613 # // ...
10614 # static UIColor* fromProto(Color* protocolor) {
10615 # float red = [protocolor red];
10616 # float green = [protocolor green];
10617 # float blue = [protocolor blue];
10618 # FloatValue* alpha_wrapper = [protocolor alpha];
10619 # float alpha = 1.0;
10620 # if (alpha_wrapper != nil) {
10621 # alpha = [alpha_wrapper value];
10622 # }
10623 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10624 # }
10625 #
10626 # static Color* toProto(UIColor* color) {
10627 # CGFloat red, green, blue, alpha;
10628 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10629 # return nil;
10630 # }
10631 # Color* result = [Color alloc] init];
10632 # [result setRed:red];
10633 # [result setGreen:green];
10634 # [result setBlue:blue];
10635 # if (alpha <= 0.9999) {
10636 # [result setAlpha:floatWrapperWithValue(alpha)];
10637 # }
10638 # [result autorelease];
10639 # return result;
10640 # }
10641 # // ...
10642 #
10643 # Example (JavaScript):
10644 #
10645 # // ...
10646 #
10647 # var protoToCssColor = function(rgb_color) {
10648 # var redFrac = rgb_color.red || 0.0;
10649 # var greenFrac = rgb_color.green || 0.0;
10650 # var blueFrac = rgb_color.blue || 0.0;
10651 # var red = Math.floor(redFrac * 255);
10652 # var green = Math.floor(greenFrac * 255);
10653 # var blue = Math.floor(blueFrac * 255);
10654 #
10655 # if (!('alpha' in rgb_color)) {
10656 # return rgbToCssColor_(red, green, blue);
10657 # }
10658 #
10659 # var alphaFrac = rgb_color.alpha.value || 0.0;
10660 # var rgbParams = [red, green, blue].join(',');
10661 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10662 # };
10663 #
10664 # var rgbToCssColor_ = function(red, green, blue) {
10665 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10666 # var hexString = rgbNumber.toString(16);
10667 # var missingZeros = 6 - hexString.length;
10668 # var resultBuilder = ['#'];
10669 # for (var i = 0; i < missingZeros; i++) {
10670 # resultBuilder.push('0');
10671 # }
10672 # resultBuilder.push(hexString);
10673 # return resultBuilder.join('');
10674 # };
10675 #
10676 # // ...
10677 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10678 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10679 # the final pixel color is defined by the equation:
10680 #
10681 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10682 #
10683 # This means that a value of 1.0 corresponds to a solid color, whereas
10684 # a value of 0.0 corresponds to a completely transparent color. This
10685 # uses a wrapper message rather than a simple float scalar so that it is
10686 # possible to distinguish between a default value and the value being unset.
10687 # If omitted, this color object is to be rendered as a solid color
10688 # (as if the alpha value had been explicitly given with a value of 1.0).
10689 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10690 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10691 },
10692 "bold": True or False, # True if the text is bold.
10693 "strikethrough": True or False, # True if the text has a strikethrough.
10694 "fontFamily": "A String", # The font family.
10695 "fontSize": 42, # The size of the font.
10696 "italic": True or False, # True if the text is italicized.
10697 "underline": True or False, # True if the text is underlined.
10698 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040010699 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010700 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
10701 "borders": { # The borders of the cell. # The borders of the cell.
10702 "top": { # A border along a cell. # The top border of the cell.
10703 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10704 # for simplicity of conversion to/from color representations in various
10705 # languages over compactness; for example, the fields of this representation
10706 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10707 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10708 # method in iOS; and, with just a little work, it can be easily formatted into
10709 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10710 #
10711 # Example (Java):
10712 #
10713 # import com.google.type.Color;
10714 #
10715 # // ...
10716 # public static java.awt.Color fromProto(Color protocolor) {
10717 # float alpha = protocolor.hasAlpha()
10718 # ? protocolor.getAlpha().getValue()
10719 # : 1.0;
10720 #
10721 # return new java.awt.Color(
10722 # protocolor.getRed(),
10723 # protocolor.getGreen(),
10724 # protocolor.getBlue(),
10725 # alpha);
10726 # }
10727 #
10728 # public static Color toProto(java.awt.Color color) {
10729 # float red = (float) color.getRed();
10730 # float green = (float) color.getGreen();
10731 # float blue = (float) color.getBlue();
10732 # float denominator = 255.0;
10733 # Color.Builder resultBuilder =
10734 # Color
10735 # .newBuilder()
10736 # .setRed(red / denominator)
10737 # .setGreen(green / denominator)
10738 # .setBlue(blue / denominator);
10739 # int alpha = color.getAlpha();
10740 # if (alpha != 255) {
10741 # result.setAlpha(
10742 # FloatValue
10743 # .newBuilder()
10744 # .setValue(((float) alpha) / denominator)
10745 # .build());
10746 # }
10747 # return resultBuilder.build();
10748 # }
10749 # // ...
10750 #
10751 # Example (iOS / Obj-C):
10752 #
10753 # // ...
10754 # static UIColor* fromProto(Color* protocolor) {
10755 # float red = [protocolor red];
10756 # float green = [protocolor green];
10757 # float blue = [protocolor blue];
10758 # FloatValue* alpha_wrapper = [protocolor alpha];
10759 # float alpha = 1.0;
10760 # if (alpha_wrapper != nil) {
10761 # alpha = [alpha_wrapper value];
10762 # }
10763 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10764 # }
10765 #
10766 # static Color* toProto(UIColor* color) {
10767 # CGFloat red, green, blue, alpha;
10768 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10769 # return nil;
10770 # }
10771 # Color* result = [Color alloc] init];
10772 # [result setRed:red];
10773 # [result setGreen:green];
10774 # [result setBlue:blue];
10775 # if (alpha <= 0.9999) {
10776 # [result setAlpha:floatWrapperWithValue(alpha)];
10777 # }
10778 # [result autorelease];
10779 # return result;
10780 # }
10781 # // ...
10782 #
10783 # Example (JavaScript):
10784 #
10785 # // ...
10786 #
10787 # var protoToCssColor = function(rgb_color) {
10788 # var redFrac = rgb_color.red || 0.0;
10789 # var greenFrac = rgb_color.green || 0.0;
10790 # var blueFrac = rgb_color.blue || 0.0;
10791 # var red = Math.floor(redFrac * 255);
10792 # var green = Math.floor(greenFrac * 255);
10793 # var blue = Math.floor(blueFrac * 255);
10794 #
10795 # if (!('alpha' in rgb_color)) {
10796 # return rgbToCssColor_(red, green, blue);
10797 # }
10798 #
10799 # var alphaFrac = rgb_color.alpha.value || 0.0;
10800 # var rgbParams = [red, green, blue].join(',');
10801 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10802 # };
10803 #
10804 # var rgbToCssColor_ = function(red, green, blue) {
10805 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10806 # var hexString = rgbNumber.toString(16);
10807 # var missingZeros = 6 - hexString.length;
10808 # var resultBuilder = ['#'];
10809 # for (var i = 0; i < missingZeros; i++) {
10810 # resultBuilder.push('0');
10811 # }
10812 # resultBuilder.push(hexString);
10813 # return resultBuilder.join('');
10814 # };
10815 #
10816 # // ...
10817 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10818 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10819 # the final pixel color is defined by the equation:
10820 #
10821 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10822 #
10823 # This means that a value of 1.0 corresponds to a solid color, whereas
10824 # a value of 0.0 corresponds to a completely transparent color. This
10825 # uses a wrapper message rather than a simple float scalar so that it is
10826 # possible to distinguish between a default value and the value being unset.
10827 # If omitted, this color object is to be rendered as a solid color
10828 # (as if the alpha value had been explicitly given with a value of 1.0).
10829 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10830 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10831 },
10832 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010833 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010834 "style": "A String", # The style of the border.
10835 },
10836 "right": { # A border along a cell. # The right border of the cell.
10837 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10838 # for simplicity of conversion to/from color representations in various
10839 # languages over compactness; for example, the fields of this representation
10840 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10841 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10842 # method in iOS; and, with just a little work, it can be easily formatted into
10843 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10844 #
10845 # Example (Java):
10846 #
10847 # import com.google.type.Color;
10848 #
10849 # // ...
10850 # public static java.awt.Color fromProto(Color protocolor) {
10851 # float alpha = protocolor.hasAlpha()
10852 # ? protocolor.getAlpha().getValue()
10853 # : 1.0;
10854 #
10855 # return new java.awt.Color(
10856 # protocolor.getRed(),
10857 # protocolor.getGreen(),
10858 # protocolor.getBlue(),
10859 # alpha);
10860 # }
10861 #
10862 # public static Color toProto(java.awt.Color color) {
10863 # float red = (float) color.getRed();
10864 # float green = (float) color.getGreen();
10865 # float blue = (float) color.getBlue();
10866 # float denominator = 255.0;
10867 # Color.Builder resultBuilder =
10868 # Color
10869 # .newBuilder()
10870 # .setRed(red / denominator)
10871 # .setGreen(green / denominator)
10872 # .setBlue(blue / denominator);
10873 # int alpha = color.getAlpha();
10874 # if (alpha != 255) {
10875 # result.setAlpha(
10876 # FloatValue
10877 # .newBuilder()
10878 # .setValue(((float) alpha) / denominator)
10879 # .build());
10880 # }
10881 # return resultBuilder.build();
10882 # }
10883 # // ...
10884 #
10885 # Example (iOS / Obj-C):
10886 #
10887 # // ...
10888 # static UIColor* fromProto(Color* protocolor) {
10889 # float red = [protocolor red];
10890 # float green = [protocolor green];
10891 # float blue = [protocolor blue];
10892 # FloatValue* alpha_wrapper = [protocolor alpha];
10893 # float alpha = 1.0;
10894 # if (alpha_wrapper != nil) {
10895 # alpha = [alpha_wrapper value];
10896 # }
10897 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
10898 # }
10899 #
10900 # static Color* toProto(UIColor* color) {
10901 # CGFloat red, green, blue, alpha;
10902 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
10903 # return nil;
10904 # }
10905 # Color* result = [Color alloc] init];
10906 # [result setRed:red];
10907 # [result setGreen:green];
10908 # [result setBlue:blue];
10909 # if (alpha <= 0.9999) {
10910 # [result setAlpha:floatWrapperWithValue(alpha)];
10911 # }
10912 # [result autorelease];
10913 # return result;
10914 # }
10915 # // ...
10916 #
10917 # Example (JavaScript):
10918 #
10919 # // ...
10920 #
10921 # var protoToCssColor = function(rgb_color) {
10922 # var redFrac = rgb_color.red || 0.0;
10923 # var greenFrac = rgb_color.green || 0.0;
10924 # var blueFrac = rgb_color.blue || 0.0;
10925 # var red = Math.floor(redFrac * 255);
10926 # var green = Math.floor(greenFrac * 255);
10927 # var blue = Math.floor(blueFrac * 255);
10928 #
10929 # if (!('alpha' in rgb_color)) {
10930 # return rgbToCssColor_(red, green, blue);
10931 # }
10932 #
10933 # var alphaFrac = rgb_color.alpha.value || 0.0;
10934 # var rgbParams = [red, green, blue].join(',');
10935 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
10936 # };
10937 #
10938 # var rgbToCssColor_ = function(red, green, blue) {
10939 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
10940 # var hexString = rgbNumber.toString(16);
10941 # var missingZeros = 6 - hexString.length;
10942 # var resultBuilder = ['#'];
10943 # for (var i = 0; i < missingZeros; i++) {
10944 # resultBuilder.push('0');
10945 # }
10946 # resultBuilder.push(hexString);
10947 # return resultBuilder.join('');
10948 # };
10949 #
10950 # // ...
10951 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
10952 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
10953 # the final pixel color is defined by the equation:
10954 #
10955 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
10956 #
10957 # This means that a value of 1.0 corresponds to a solid color, whereas
10958 # a value of 0.0 corresponds to a completely transparent color. This
10959 # uses a wrapper message rather than a simple float scalar so that it is
10960 # possible to distinguish between a default value and the value being unset.
10961 # If omitted, this color object is to be rendered as a solid color
10962 # (as if the alpha value had been explicitly given with a value of 1.0).
10963 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
10964 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
10965 },
10966 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070010967 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070010968 "style": "A String", # The style of the border.
10969 },
10970 "bottom": { # A border along a cell. # The bottom border of the cell.
10971 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
10972 # for simplicity of conversion to/from color representations in various
10973 # languages over compactness; for example, the fields of this representation
10974 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
10975 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
10976 # method in iOS; and, with just a little work, it can be easily formatted into
10977 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
10978 #
10979 # Example (Java):
10980 #
10981 # import com.google.type.Color;
10982 #
10983 # // ...
10984 # public static java.awt.Color fromProto(Color protocolor) {
10985 # float alpha = protocolor.hasAlpha()
10986 # ? protocolor.getAlpha().getValue()
10987 # : 1.0;
10988 #
10989 # return new java.awt.Color(
10990 # protocolor.getRed(),
10991 # protocolor.getGreen(),
10992 # protocolor.getBlue(),
10993 # alpha);
10994 # }
10995 #
10996 # public static Color toProto(java.awt.Color color) {
10997 # float red = (float) color.getRed();
10998 # float green = (float) color.getGreen();
10999 # float blue = (float) color.getBlue();
11000 # float denominator = 255.0;
11001 # Color.Builder resultBuilder =
11002 # Color
11003 # .newBuilder()
11004 # .setRed(red / denominator)
11005 # .setGreen(green / denominator)
11006 # .setBlue(blue / denominator);
11007 # int alpha = color.getAlpha();
11008 # if (alpha != 255) {
11009 # result.setAlpha(
11010 # FloatValue
11011 # .newBuilder()
11012 # .setValue(((float) alpha) / denominator)
11013 # .build());
11014 # }
11015 # return resultBuilder.build();
11016 # }
11017 # // ...
11018 #
11019 # Example (iOS / Obj-C):
11020 #
11021 # // ...
11022 # static UIColor* fromProto(Color* protocolor) {
11023 # float red = [protocolor red];
11024 # float green = [protocolor green];
11025 # float blue = [protocolor blue];
11026 # FloatValue* alpha_wrapper = [protocolor alpha];
11027 # float alpha = 1.0;
11028 # if (alpha_wrapper != nil) {
11029 # alpha = [alpha_wrapper value];
11030 # }
11031 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11032 # }
11033 #
11034 # static Color* toProto(UIColor* color) {
11035 # CGFloat red, green, blue, alpha;
11036 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11037 # return nil;
11038 # }
11039 # Color* result = [Color alloc] init];
11040 # [result setRed:red];
11041 # [result setGreen:green];
11042 # [result setBlue:blue];
11043 # if (alpha <= 0.9999) {
11044 # [result setAlpha:floatWrapperWithValue(alpha)];
11045 # }
11046 # [result autorelease];
11047 # return result;
11048 # }
11049 # // ...
11050 #
11051 # Example (JavaScript):
11052 #
11053 # // ...
11054 #
11055 # var protoToCssColor = function(rgb_color) {
11056 # var redFrac = rgb_color.red || 0.0;
11057 # var greenFrac = rgb_color.green || 0.0;
11058 # var blueFrac = rgb_color.blue || 0.0;
11059 # var red = Math.floor(redFrac * 255);
11060 # var green = Math.floor(greenFrac * 255);
11061 # var blue = Math.floor(blueFrac * 255);
11062 #
11063 # if (!('alpha' in rgb_color)) {
11064 # return rgbToCssColor_(red, green, blue);
11065 # }
11066 #
11067 # var alphaFrac = rgb_color.alpha.value || 0.0;
11068 # var rgbParams = [red, green, blue].join(',');
11069 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11070 # };
11071 #
11072 # var rgbToCssColor_ = function(red, green, blue) {
11073 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11074 # var hexString = rgbNumber.toString(16);
11075 # var missingZeros = 6 - hexString.length;
11076 # var resultBuilder = ['#'];
11077 # for (var i = 0; i < missingZeros; i++) {
11078 # resultBuilder.push('0');
11079 # }
11080 # resultBuilder.push(hexString);
11081 # return resultBuilder.join('');
11082 # };
11083 #
11084 # // ...
11085 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11086 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11087 # the final pixel color is defined by the equation:
11088 #
11089 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11090 #
11091 # This means that a value of 1.0 corresponds to a solid color, whereas
11092 # a value of 0.0 corresponds to a completely transparent color. This
11093 # uses a wrapper message rather than a simple float scalar so that it is
11094 # possible to distinguish between a default value and the value being unset.
11095 # If omitted, this color object is to be rendered as a solid color
11096 # (as if the alpha value had been explicitly given with a value of 1.0).
11097 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11098 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11099 },
11100 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070011101 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011102 "style": "A String", # The style of the border.
11103 },
11104 "left": { # A border along a cell. # The left border of the cell.
11105 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
11106 # for simplicity of conversion to/from color representations in various
11107 # languages over compactness; for example, the fields of this representation
11108 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11109 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11110 # method in iOS; and, with just a little work, it can be easily formatted into
11111 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11112 #
11113 # Example (Java):
11114 #
11115 # import com.google.type.Color;
11116 #
11117 # // ...
11118 # public static java.awt.Color fromProto(Color protocolor) {
11119 # float alpha = protocolor.hasAlpha()
11120 # ? protocolor.getAlpha().getValue()
11121 # : 1.0;
11122 #
11123 # return new java.awt.Color(
11124 # protocolor.getRed(),
11125 # protocolor.getGreen(),
11126 # protocolor.getBlue(),
11127 # alpha);
11128 # }
11129 #
11130 # public static Color toProto(java.awt.Color color) {
11131 # float red = (float) color.getRed();
11132 # float green = (float) color.getGreen();
11133 # float blue = (float) color.getBlue();
11134 # float denominator = 255.0;
11135 # Color.Builder resultBuilder =
11136 # Color
11137 # .newBuilder()
11138 # .setRed(red / denominator)
11139 # .setGreen(green / denominator)
11140 # .setBlue(blue / denominator);
11141 # int alpha = color.getAlpha();
11142 # if (alpha != 255) {
11143 # result.setAlpha(
11144 # FloatValue
11145 # .newBuilder()
11146 # .setValue(((float) alpha) / denominator)
11147 # .build());
11148 # }
11149 # return resultBuilder.build();
11150 # }
11151 # // ...
11152 #
11153 # Example (iOS / Obj-C):
11154 #
11155 # // ...
11156 # static UIColor* fromProto(Color* protocolor) {
11157 # float red = [protocolor red];
11158 # float green = [protocolor green];
11159 # float blue = [protocolor blue];
11160 # FloatValue* alpha_wrapper = [protocolor alpha];
11161 # float alpha = 1.0;
11162 # if (alpha_wrapper != nil) {
11163 # alpha = [alpha_wrapper value];
11164 # }
11165 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11166 # }
11167 #
11168 # static Color* toProto(UIColor* color) {
11169 # CGFloat red, green, blue, alpha;
11170 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11171 # return nil;
11172 # }
11173 # Color* result = [Color alloc] init];
11174 # [result setRed:red];
11175 # [result setGreen:green];
11176 # [result setBlue:blue];
11177 # if (alpha <= 0.9999) {
11178 # [result setAlpha:floatWrapperWithValue(alpha)];
11179 # }
11180 # [result autorelease];
11181 # return result;
11182 # }
11183 # // ...
11184 #
11185 # Example (JavaScript):
11186 #
11187 # // ...
11188 #
11189 # var protoToCssColor = function(rgb_color) {
11190 # var redFrac = rgb_color.red || 0.0;
11191 # var greenFrac = rgb_color.green || 0.0;
11192 # var blueFrac = rgb_color.blue || 0.0;
11193 # var red = Math.floor(redFrac * 255);
11194 # var green = Math.floor(greenFrac * 255);
11195 # var blue = Math.floor(blueFrac * 255);
11196 #
11197 # if (!('alpha' in rgb_color)) {
11198 # return rgbToCssColor_(red, green, blue);
11199 # }
11200 #
11201 # var alphaFrac = rgb_color.alpha.value || 0.0;
11202 # var rgbParams = [red, green, blue].join(',');
11203 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11204 # };
11205 #
11206 # var rgbToCssColor_ = function(red, green, blue) {
11207 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11208 # var hexString = rgbNumber.toString(16);
11209 # var missingZeros = 6 - hexString.length;
11210 # var resultBuilder = ['#'];
11211 # for (var i = 0; i < missingZeros; i++) {
11212 # resultBuilder.push('0');
11213 # }
11214 # resultBuilder.push(hexString);
11215 # return resultBuilder.join('');
11216 # };
11217 #
11218 # // ...
11219 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11220 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11221 # the final pixel color is defined by the equation:
11222 #
11223 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11224 #
11225 # This means that a value of 1.0 corresponds to a solid color, whereas
11226 # a value of 0.0 corresponds to a completely transparent color. This
11227 # uses a wrapper message rather than a simple float scalar so that it is
11228 # possible to distinguish between a default value and the value being unset.
11229 # If omitted, this color object is to be rendered as a solid color
11230 # (as if the alpha value had been explicitly given with a value of 1.0).
11231 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11232 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11233 },
11234 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070011235 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011236 "style": "A String", # The style of the border.
11237 },
11238 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011239 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
11240 "angle": 42, # The angle between the standard orientation and the desired orientation.
11241 # Measured in degrees. Valid values are between -90 and 90. Positive
11242 # angles are angled upwards, negative are angled downwards.
11243 #
11244 # Note: For LTR text direction positive angles are in the counterclockwise
11245 # direction, whereas for RTL they are in the clockwise direction
11246 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
11247 # characters is unchanged.
11248 # For example:
11249 #
11250 # | V |
11251 # | e |
11252 # | r |
11253 # | t |
11254 # | i |
11255 # | c |
11256 # | a |
11257 # | l |
11258 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011259 },
11260 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
11261 #
11262 # When writing, the new data validation rule will overwrite any prior rule.
11263 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
11264 # If true, "List" conditions will show a dropdown.
11265 "strict": True or False, # True if invalid data should be rejected.
11266 "inputMessage": "A String", # A message to show the user when adding data to the cell.
11267 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
11268 # BooleanConditions are used by conditional formatting,
11269 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011270 "values": [ # The values of the condition. The number of supported values depends
11271 # on the condition type. Some support zero values,
11272 # others one or two values,
11273 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
11274 { # The value of the condition.
11275 "relativeDate": "A String", # A relative date (based on the current date).
11276 # Valid only if the type is
11277 # DATE_BEFORE,
11278 # DATE_AFTER,
11279 # DATE_ON_OR_BEFORE or
11280 # DATE_ON_OR_AFTER.
11281 #
11282 # Relative dates are not supported in data validation.
11283 # They are supported only in conditional formatting and
11284 # conditional filters.
11285 "userEnteredValue": "A String", # A value the condition is based on.
11286 # The value will be parsed as if the user typed into a cell.
11287 # Formulas are supported (and must begin with an `=`).
11288 },
11289 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011290 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011291 },
11292 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011293 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
11294 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011295 # Runs start at specific indexes in the text and continue until the next
11296 # run. Properties of a run will continue unless explicitly changed
11297 # in a subsequent run (and properties of the first run will continue
11298 # the properties of the cell unless explicitly changed).
11299 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011300 # When writing, the new runs will overwrite any prior runs. When writing a
11301 # new user_entered_value, previous runs will be erased.
11302 { # A run of a text format. The format of this run continues until the start
11303 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011304 # When updating, all fields must be set.
11305 "startIndex": 42, # The character index where this run starts.
11306 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
11307 # Absent values indicate that the field isn't specified.
11308 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
11309 # for simplicity of conversion to/from color representations in various
11310 # languages over compactness; for example, the fields of this representation
11311 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11312 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11313 # method in iOS; and, with just a little work, it can be easily formatted into
11314 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11315 #
11316 # Example (Java):
11317 #
11318 # import com.google.type.Color;
11319 #
11320 # // ...
11321 # public static java.awt.Color fromProto(Color protocolor) {
11322 # float alpha = protocolor.hasAlpha()
11323 # ? protocolor.getAlpha().getValue()
11324 # : 1.0;
11325 #
11326 # return new java.awt.Color(
11327 # protocolor.getRed(),
11328 # protocolor.getGreen(),
11329 # protocolor.getBlue(),
11330 # alpha);
11331 # }
11332 #
11333 # public static Color toProto(java.awt.Color color) {
11334 # float red = (float) color.getRed();
11335 # float green = (float) color.getGreen();
11336 # float blue = (float) color.getBlue();
11337 # float denominator = 255.0;
11338 # Color.Builder resultBuilder =
11339 # Color
11340 # .newBuilder()
11341 # .setRed(red / denominator)
11342 # .setGreen(green / denominator)
11343 # .setBlue(blue / denominator);
11344 # int alpha = color.getAlpha();
11345 # if (alpha != 255) {
11346 # result.setAlpha(
11347 # FloatValue
11348 # .newBuilder()
11349 # .setValue(((float) alpha) / denominator)
11350 # .build());
11351 # }
11352 # return resultBuilder.build();
11353 # }
11354 # // ...
11355 #
11356 # Example (iOS / Obj-C):
11357 #
11358 # // ...
11359 # static UIColor* fromProto(Color* protocolor) {
11360 # float red = [protocolor red];
11361 # float green = [protocolor green];
11362 # float blue = [protocolor blue];
11363 # FloatValue* alpha_wrapper = [protocolor alpha];
11364 # float alpha = 1.0;
11365 # if (alpha_wrapper != nil) {
11366 # alpha = [alpha_wrapper value];
11367 # }
11368 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11369 # }
11370 #
11371 # static Color* toProto(UIColor* color) {
11372 # CGFloat red, green, blue, alpha;
11373 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11374 # return nil;
11375 # }
11376 # Color* result = [Color alloc] init];
11377 # [result setRed:red];
11378 # [result setGreen:green];
11379 # [result setBlue:blue];
11380 # if (alpha <= 0.9999) {
11381 # [result setAlpha:floatWrapperWithValue(alpha)];
11382 # }
11383 # [result autorelease];
11384 # return result;
11385 # }
11386 # // ...
11387 #
11388 # Example (JavaScript):
11389 #
11390 # // ...
11391 #
11392 # var protoToCssColor = function(rgb_color) {
11393 # var redFrac = rgb_color.red || 0.0;
11394 # var greenFrac = rgb_color.green || 0.0;
11395 # var blueFrac = rgb_color.blue || 0.0;
11396 # var red = Math.floor(redFrac * 255);
11397 # var green = Math.floor(greenFrac * 255);
11398 # var blue = Math.floor(blueFrac * 255);
11399 #
11400 # if (!('alpha' in rgb_color)) {
11401 # return rgbToCssColor_(red, green, blue);
11402 # }
11403 #
11404 # var alphaFrac = rgb_color.alpha.value || 0.0;
11405 # var rgbParams = [red, green, blue].join(',');
11406 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11407 # };
11408 #
11409 # var rgbToCssColor_ = function(red, green, blue) {
11410 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11411 # var hexString = rgbNumber.toString(16);
11412 # var missingZeros = 6 - hexString.length;
11413 # var resultBuilder = ['#'];
11414 # for (var i = 0; i < missingZeros; i++) {
11415 # resultBuilder.push('0');
11416 # }
11417 # resultBuilder.push(hexString);
11418 # return resultBuilder.join('');
11419 # };
11420 #
11421 # // ...
11422 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11423 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11424 # the final pixel color is defined by the equation:
11425 #
11426 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11427 #
11428 # This means that a value of 1.0 corresponds to a solid color, whereas
11429 # a value of 0.0 corresponds to a completely transparent color. This
11430 # uses a wrapper message rather than a simple float scalar so that it is
11431 # possible to distinguish between a default value and the value being unset.
11432 # If omitted, this color object is to be rendered as a solid color
11433 # (as if the alpha value had been explicitly given with a value of 1.0).
11434 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11435 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11436 },
11437 "bold": True or False, # True if the text is bold.
11438 "strikethrough": True or False, # True if the text has a strikethrough.
11439 "fontFamily": "A String", # The font family.
11440 "fontSize": 42, # The size of the font.
11441 "italic": True or False, # True if the text is italicized.
11442 "underline": True or False, # True if the text is underlined.
11443 },
11444 },
11445 ],
11446 },
11447 ],
11448 },
11449 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011450 "fields": "A String", # The fields of CellData that should be updated.
11451 # At least one field must be specified.
11452 # The root is the CellData; 'row.values.' should not be specified.
11453 # A single `"*"` can be used as short-hand for listing every field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011454 },
11455 "autoFill": { # Fills in more data based on existing data. # Automatically fills in more data based on existing data.
11456 "useAlternateSeries": True or False, # True if we should generate data with the "alternate" series.
11457 # This differs based on the type and amount of source data.
11458 "range": { # A range on a sheet. # The range to autofill. This will examine the range and detect
11459 # the location that has data and automatically fill that data
11460 # in to the rest of the range.
11461 # All indexes are zero-based.
11462 # Indexes are half open, e.g the start index is inclusive
11463 # and the end index is exclusive -- [start_index, end_index).
11464 # Missing indexes indicate the range is unbounded on that side.
11465 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011466 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011468 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011469 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011470 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011471 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011472 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011473 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011474 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011475 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011476 # `Sheet1!A:B == sheet_id: 0,
11477 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011478 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011479 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011480 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011481 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011482 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011483 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011484 #
11485 # The start index must always be less than or equal to the end index.
11486 # If the start index equals the end index, then the range is empty.
11487 # Empty ranges are typically not meaningful and are usually rendered in the
11488 # UI as `#REF!`.
11489 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011490 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011491 "sheetId": 42, # The sheet this range is on.
11492 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011493 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011494 },
11495 "sourceAndDestination": { # A combination of a source range and how to extend that source. # The source and destination areas to autofill.
11496 # This explicitly lists the source of the autofill and where to
11497 # extend that data.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011498 "fillLength": 42, # The number of rows or columns that data should be filled into.
11499 # Positive numbers expand beyond the last row or last column
11500 # of the source. Negative numbers expand before the first row
11501 # or first column of the source.
11502 "dimension": "A String", # The dimension that data should be filled into.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011503 "source": { # A range on a sheet. # The location of the data to use as the source of the autofill.
11504 # All indexes are zero-based.
11505 # Indexes are half open, e.g the start index is inclusive
11506 # and the end index is exclusive -- [start_index, end_index).
11507 # Missing indexes indicate the range is unbounded on that side.
11508 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011509 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011510 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011511 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011512 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011513 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011514 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011515 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011516 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011517 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011518 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011519 # `Sheet1!A:B == sheet_id: 0,
11520 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011521 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011522 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011523 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011524 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011525 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070011526 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011527 #
11528 # The start index must always be less than or equal to the end index.
11529 # If the start index equals the end index, then the range is empty.
11530 # Empty ranges are typically not meaningful and are usually rendered in the
11531 # UI as `#REF!`.
11532 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011533 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011534 "sheetId": 42, # The sheet this range is on.
11535 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011536 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011537 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070011538 },
11539 },
11540 "appendDimension": { # Appends rows or columns to the end of a sheet. # Appends dimensions to the end of a sheet.
11541 "length": 42, # The number of rows or columns to append.
11542 "sheetId": 42, # The sheet to append rows or columns to.
11543 "dimension": "A String", # Whether rows or columns should be appended.
11544 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011545 "updateBanding": { # Updates properties of the supplied banded range. # Updates a banded range
11546 "fields": "A String", # The fields that should be updated. At least one field must be specified.
11547 # The root `bandedRange` is implied and should not be specified.
11548 # A single `"*"` can be used as short-hand for listing every field.
11549 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to update with the new properties.
11550 "range": { # A range on a sheet. # The range over which these properties are applied.
11551 # All indexes are zero-based.
11552 # Indexes are half open, e.g the start index is inclusive
11553 # and the end index is exclusive -- [start_index, end_index).
11554 # Missing indexes indicate the range is unbounded on that side.
11555 #
11556 # For example, if `"Sheet1"` is sheet ID 0, then:
11557 #
11558 # `Sheet1!A1:A1 == sheet_id: 0,
11559 # start_row_index: 0, end_row_index: 1,
11560 # start_column_index: 0, end_column_index: 1`
11561 #
11562 # `Sheet1!A3:B4 == sheet_id: 0,
11563 # start_row_index: 2, end_row_index: 4,
11564 # start_column_index: 0, end_column_index: 2`
11565 #
11566 # `Sheet1!A:B == sheet_id: 0,
11567 # start_column_index: 0, end_column_index: 2`
11568 #
11569 # `Sheet1!A5:B == sheet_id: 0,
11570 # start_row_index: 4,
11571 # start_column_index: 0, end_column_index: 2`
11572 #
11573 # `Sheet1 == sheet_id:0`
11574 #
11575 # The start index must always be less than or equal to the end index.
11576 # If the start index equals the end index, then the range is empty.
11577 # Empty ranges are typically not meaningful and are usually rendered in the
11578 # UI as `#REF!`.
11579 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011580 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011581 "sheetId": 42, # The sheet this range is on.
11582 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040011583 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080011584 },
11585 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
11586 # by-column basis throughout all the columns in the range. At least one of
11587 # row_properties or column_properties must be specified.
11588 # BandedRange.row_properties and BandedRange.column_properties are
11589 # set, the fill colors are applied to cells according to the following rules:
11590 #
11591 # * header_color and footer_color take priority over band colors.
11592 # * first_band_color takes priority over second_band_color.
11593 # * row_properties takes priority over column_properties.
11594 #
11595 # For example, the first row color takes priority over the first column
11596 # color, but the first column color takes priority over the second row color.
11597 # Similarly, the row header takes priority over the column header in the
11598 # top left cell, but the column header takes priority over the first row
11599 # color if the row header is not set.
11600 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
11601 # for simplicity of conversion to/from color representations in various
11602 # languages over compactness; for example, the fields of this representation
11603 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11604 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11605 # method in iOS; and, with just a little work, it can be easily formatted into
11606 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11607 #
11608 # Example (Java):
11609 #
11610 # import com.google.type.Color;
11611 #
11612 # // ...
11613 # public static java.awt.Color fromProto(Color protocolor) {
11614 # float alpha = protocolor.hasAlpha()
11615 # ? protocolor.getAlpha().getValue()
11616 # : 1.0;
11617 #
11618 # return new java.awt.Color(
11619 # protocolor.getRed(),
11620 # protocolor.getGreen(),
11621 # protocolor.getBlue(),
11622 # alpha);
11623 # }
11624 #
11625 # public static Color toProto(java.awt.Color color) {
11626 # float red = (float) color.getRed();
11627 # float green = (float) color.getGreen();
11628 # float blue = (float) color.getBlue();
11629 # float denominator = 255.0;
11630 # Color.Builder resultBuilder =
11631 # Color
11632 # .newBuilder()
11633 # .setRed(red / denominator)
11634 # .setGreen(green / denominator)
11635 # .setBlue(blue / denominator);
11636 # int alpha = color.getAlpha();
11637 # if (alpha != 255) {
11638 # result.setAlpha(
11639 # FloatValue
11640 # .newBuilder()
11641 # .setValue(((float) alpha) / denominator)
11642 # .build());
11643 # }
11644 # return resultBuilder.build();
11645 # }
11646 # // ...
11647 #
11648 # Example (iOS / Obj-C):
11649 #
11650 # // ...
11651 # static UIColor* fromProto(Color* protocolor) {
11652 # float red = [protocolor red];
11653 # float green = [protocolor green];
11654 # float blue = [protocolor blue];
11655 # FloatValue* alpha_wrapper = [protocolor alpha];
11656 # float alpha = 1.0;
11657 # if (alpha_wrapper != nil) {
11658 # alpha = [alpha_wrapper value];
11659 # }
11660 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11661 # }
11662 #
11663 # static Color* toProto(UIColor* color) {
11664 # CGFloat red, green, blue, alpha;
11665 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11666 # return nil;
11667 # }
11668 # Color* result = [Color alloc] init];
11669 # [result setRed:red];
11670 # [result setGreen:green];
11671 # [result setBlue:blue];
11672 # if (alpha <= 0.9999) {
11673 # [result setAlpha:floatWrapperWithValue(alpha)];
11674 # }
11675 # [result autorelease];
11676 # return result;
11677 # }
11678 # // ...
11679 #
11680 # Example (JavaScript):
11681 #
11682 # // ...
11683 #
11684 # var protoToCssColor = function(rgb_color) {
11685 # var redFrac = rgb_color.red || 0.0;
11686 # var greenFrac = rgb_color.green || 0.0;
11687 # var blueFrac = rgb_color.blue || 0.0;
11688 # var red = Math.floor(redFrac * 255);
11689 # var green = Math.floor(greenFrac * 255);
11690 # var blue = Math.floor(blueFrac * 255);
11691 #
11692 # if (!('alpha' in rgb_color)) {
11693 # return rgbToCssColor_(red, green, blue);
11694 # }
11695 #
11696 # var alphaFrac = rgb_color.alpha.value || 0.0;
11697 # var rgbParams = [red, green, blue].join(',');
11698 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11699 # };
11700 #
11701 # var rgbToCssColor_ = function(red, green, blue) {
11702 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11703 # var hexString = rgbNumber.toString(16);
11704 # var missingZeros = 6 - hexString.length;
11705 # var resultBuilder = ['#'];
11706 # for (var i = 0; i < missingZeros; i++) {
11707 # resultBuilder.push('0');
11708 # }
11709 # resultBuilder.push(hexString);
11710 # return resultBuilder.join('');
11711 # };
11712 #
11713 # // ...
11714 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11715 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11716 # the final pixel color is defined by the equation:
11717 #
11718 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11719 #
11720 # This means that a value of 1.0 corresponds to a solid color, whereas
11721 # a value of 0.0 corresponds to a completely transparent color. This
11722 # uses a wrapper message rather than a simple float scalar so that it is
11723 # possible to distinguish between a default value and the value being unset.
11724 # If omitted, this color object is to be rendered as a solid color
11725 # (as if the alpha value had been explicitly given with a value of 1.0).
11726 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11727 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11728 },
11729 "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
11730 # row or column will be filled with this color and the colors will
11731 # alternate between first_band_color and second_band_color starting
11732 # from the second row or column. Otherwise, the first row or column will be
11733 # filled with first_band_color and the colors will proceed to alternate
11734 # as they normally would.
11735 # for simplicity of conversion to/from color representations in various
11736 # languages over compactness; for example, the fields of this representation
11737 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11738 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11739 # method in iOS; and, with just a little work, it can be easily formatted into
11740 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11741 #
11742 # Example (Java):
11743 #
11744 # import com.google.type.Color;
11745 #
11746 # // ...
11747 # public static java.awt.Color fromProto(Color protocolor) {
11748 # float alpha = protocolor.hasAlpha()
11749 # ? protocolor.getAlpha().getValue()
11750 # : 1.0;
11751 #
11752 # return new java.awt.Color(
11753 # protocolor.getRed(),
11754 # protocolor.getGreen(),
11755 # protocolor.getBlue(),
11756 # alpha);
11757 # }
11758 #
11759 # public static Color toProto(java.awt.Color color) {
11760 # float red = (float) color.getRed();
11761 # float green = (float) color.getGreen();
11762 # float blue = (float) color.getBlue();
11763 # float denominator = 255.0;
11764 # Color.Builder resultBuilder =
11765 # Color
11766 # .newBuilder()
11767 # .setRed(red / denominator)
11768 # .setGreen(green / denominator)
11769 # .setBlue(blue / denominator);
11770 # int alpha = color.getAlpha();
11771 # if (alpha != 255) {
11772 # result.setAlpha(
11773 # FloatValue
11774 # .newBuilder()
11775 # .setValue(((float) alpha) / denominator)
11776 # .build());
11777 # }
11778 # return resultBuilder.build();
11779 # }
11780 # // ...
11781 #
11782 # Example (iOS / Obj-C):
11783 #
11784 # // ...
11785 # static UIColor* fromProto(Color* protocolor) {
11786 # float red = [protocolor red];
11787 # float green = [protocolor green];
11788 # float blue = [protocolor blue];
11789 # FloatValue* alpha_wrapper = [protocolor alpha];
11790 # float alpha = 1.0;
11791 # if (alpha_wrapper != nil) {
11792 # alpha = [alpha_wrapper value];
11793 # }
11794 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11795 # }
11796 #
11797 # static Color* toProto(UIColor* color) {
11798 # CGFloat red, green, blue, alpha;
11799 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11800 # return nil;
11801 # }
11802 # Color* result = [Color alloc] init];
11803 # [result setRed:red];
11804 # [result setGreen:green];
11805 # [result setBlue:blue];
11806 # if (alpha <= 0.9999) {
11807 # [result setAlpha:floatWrapperWithValue(alpha)];
11808 # }
11809 # [result autorelease];
11810 # return result;
11811 # }
11812 # // ...
11813 #
11814 # Example (JavaScript):
11815 #
11816 # // ...
11817 #
11818 # var protoToCssColor = function(rgb_color) {
11819 # var redFrac = rgb_color.red || 0.0;
11820 # var greenFrac = rgb_color.green || 0.0;
11821 # var blueFrac = rgb_color.blue || 0.0;
11822 # var red = Math.floor(redFrac * 255);
11823 # var green = Math.floor(greenFrac * 255);
11824 # var blue = Math.floor(blueFrac * 255);
11825 #
11826 # if (!('alpha' in rgb_color)) {
11827 # return rgbToCssColor_(red, green, blue);
11828 # }
11829 #
11830 # var alphaFrac = rgb_color.alpha.value || 0.0;
11831 # var rgbParams = [red, green, blue].join(',');
11832 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11833 # };
11834 #
11835 # var rgbToCssColor_ = function(red, green, blue) {
11836 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11837 # var hexString = rgbNumber.toString(16);
11838 # var missingZeros = 6 - hexString.length;
11839 # var resultBuilder = ['#'];
11840 # for (var i = 0; i < missingZeros; i++) {
11841 # resultBuilder.push('0');
11842 # }
11843 # resultBuilder.push(hexString);
11844 # return resultBuilder.join('');
11845 # };
11846 #
11847 # // ...
11848 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11849 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11850 # the final pixel color is defined by the equation:
11851 #
11852 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11853 #
11854 # This means that a value of 1.0 corresponds to a solid color, whereas
11855 # a value of 0.0 corresponds to a completely transparent color. This
11856 # uses a wrapper message rather than a simple float scalar so that it is
11857 # possible to distinguish between a default value and the value being unset.
11858 # If omitted, this color object is to be rendered as a solid color
11859 # (as if the alpha value had been explicitly given with a value of 1.0).
11860 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11861 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11862 },
11863 "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
11864 # row or column will be filled with either first_band_color or
11865 # second_band_color, depending on the color of the previous row or
11866 # column.
11867 # for simplicity of conversion to/from color representations in various
11868 # languages over compactness; for example, the fields of this representation
11869 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11870 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
11871 # method in iOS; and, with just a little work, it can be easily formatted into
11872 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
11873 #
11874 # Example (Java):
11875 #
11876 # import com.google.type.Color;
11877 #
11878 # // ...
11879 # public static java.awt.Color fromProto(Color protocolor) {
11880 # float alpha = protocolor.hasAlpha()
11881 # ? protocolor.getAlpha().getValue()
11882 # : 1.0;
11883 #
11884 # return new java.awt.Color(
11885 # protocolor.getRed(),
11886 # protocolor.getGreen(),
11887 # protocolor.getBlue(),
11888 # alpha);
11889 # }
11890 #
11891 # public static Color toProto(java.awt.Color color) {
11892 # float red = (float) color.getRed();
11893 # float green = (float) color.getGreen();
11894 # float blue = (float) color.getBlue();
11895 # float denominator = 255.0;
11896 # Color.Builder resultBuilder =
11897 # Color
11898 # .newBuilder()
11899 # .setRed(red / denominator)
11900 # .setGreen(green / denominator)
11901 # .setBlue(blue / denominator);
11902 # int alpha = color.getAlpha();
11903 # if (alpha != 255) {
11904 # result.setAlpha(
11905 # FloatValue
11906 # .newBuilder()
11907 # .setValue(((float) alpha) / denominator)
11908 # .build());
11909 # }
11910 # return resultBuilder.build();
11911 # }
11912 # // ...
11913 #
11914 # Example (iOS / Obj-C):
11915 #
11916 # // ...
11917 # static UIColor* fromProto(Color* protocolor) {
11918 # float red = [protocolor red];
11919 # float green = [protocolor green];
11920 # float blue = [protocolor blue];
11921 # FloatValue* alpha_wrapper = [protocolor alpha];
11922 # float alpha = 1.0;
11923 # if (alpha_wrapper != nil) {
11924 # alpha = [alpha_wrapper value];
11925 # }
11926 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
11927 # }
11928 #
11929 # static Color* toProto(UIColor* color) {
11930 # CGFloat red, green, blue, alpha;
11931 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
11932 # return nil;
11933 # }
11934 # Color* result = [Color alloc] init];
11935 # [result setRed:red];
11936 # [result setGreen:green];
11937 # [result setBlue:blue];
11938 # if (alpha <= 0.9999) {
11939 # [result setAlpha:floatWrapperWithValue(alpha)];
11940 # }
11941 # [result autorelease];
11942 # return result;
11943 # }
11944 # // ...
11945 #
11946 # Example (JavaScript):
11947 #
11948 # // ...
11949 #
11950 # var protoToCssColor = function(rgb_color) {
11951 # var redFrac = rgb_color.red || 0.0;
11952 # var greenFrac = rgb_color.green || 0.0;
11953 # var blueFrac = rgb_color.blue || 0.0;
11954 # var red = Math.floor(redFrac * 255);
11955 # var green = Math.floor(greenFrac * 255);
11956 # var blue = Math.floor(blueFrac * 255);
11957 #
11958 # if (!('alpha' in rgb_color)) {
11959 # return rgbToCssColor_(red, green, blue);
11960 # }
11961 #
11962 # var alphaFrac = rgb_color.alpha.value || 0.0;
11963 # var rgbParams = [red, green, blue].join(',');
11964 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
11965 # };
11966 #
11967 # var rgbToCssColor_ = function(red, green, blue) {
11968 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
11969 # var hexString = rgbNumber.toString(16);
11970 # var missingZeros = 6 - hexString.length;
11971 # var resultBuilder = ['#'];
11972 # for (var i = 0; i < missingZeros; i++) {
11973 # resultBuilder.push('0');
11974 # }
11975 # resultBuilder.push(hexString);
11976 # return resultBuilder.join('');
11977 # };
11978 #
11979 # // ...
11980 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
11981 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
11982 # the final pixel color is defined by the equation:
11983 #
11984 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
11985 #
11986 # This means that a value of 1.0 corresponds to a solid color, whereas
11987 # a value of 0.0 corresponds to a completely transparent color. This
11988 # uses a wrapper message rather than a simple float scalar so that it is
11989 # possible to distinguish between a default value and the value being unset.
11990 # If omitted, this color object is to be rendered as a solid color
11991 # (as if the alpha value had been explicitly given with a value of 1.0).
11992 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
11993 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
11994 },
11995 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
11996 # for simplicity of conversion to/from color representations in various
11997 # languages over compactness; for example, the fields of this representation
11998 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
11999 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12000 # method in iOS; and, with just a little work, it can be easily formatted into
12001 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12002 #
12003 # Example (Java):
12004 #
12005 # import com.google.type.Color;
12006 #
12007 # // ...
12008 # public static java.awt.Color fromProto(Color protocolor) {
12009 # float alpha = protocolor.hasAlpha()
12010 # ? protocolor.getAlpha().getValue()
12011 # : 1.0;
12012 #
12013 # return new java.awt.Color(
12014 # protocolor.getRed(),
12015 # protocolor.getGreen(),
12016 # protocolor.getBlue(),
12017 # alpha);
12018 # }
12019 #
12020 # public static Color toProto(java.awt.Color color) {
12021 # float red = (float) color.getRed();
12022 # float green = (float) color.getGreen();
12023 # float blue = (float) color.getBlue();
12024 # float denominator = 255.0;
12025 # Color.Builder resultBuilder =
12026 # Color
12027 # .newBuilder()
12028 # .setRed(red / denominator)
12029 # .setGreen(green / denominator)
12030 # .setBlue(blue / denominator);
12031 # int alpha = color.getAlpha();
12032 # if (alpha != 255) {
12033 # result.setAlpha(
12034 # FloatValue
12035 # .newBuilder()
12036 # .setValue(((float) alpha) / denominator)
12037 # .build());
12038 # }
12039 # return resultBuilder.build();
12040 # }
12041 # // ...
12042 #
12043 # Example (iOS / Obj-C):
12044 #
12045 # // ...
12046 # static UIColor* fromProto(Color* protocolor) {
12047 # float red = [protocolor red];
12048 # float green = [protocolor green];
12049 # float blue = [protocolor blue];
12050 # FloatValue* alpha_wrapper = [protocolor alpha];
12051 # float alpha = 1.0;
12052 # if (alpha_wrapper != nil) {
12053 # alpha = [alpha_wrapper value];
12054 # }
12055 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12056 # }
12057 #
12058 # static Color* toProto(UIColor* color) {
12059 # CGFloat red, green, blue, alpha;
12060 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12061 # return nil;
12062 # }
12063 # Color* result = [Color alloc] init];
12064 # [result setRed:red];
12065 # [result setGreen:green];
12066 # [result setBlue:blue];
12067 # if (alpha <= 0.9999) {
12068 # [result setAlpha:floatWrapperWithValue(alpha)];
12069 # }
12070 # [result autorelease];
12071 # return result;
12072 # }
12073 # // ...
12074 #
12075 # Example (JavaScript):
12076 #
12077 # // ...
12078 #
12079 # var protoToCssColor = function(rgb_color) {
12080 # var redFrac = rgb_color.red || 0.0;
12081 # var greenFrac = rgb_color.green || 0.0;
12082 # var blueFrac = rgb_color.blue || 0.0;
12083 # var red = Math.floor(redFrac * 255);
12084 # var green = Math.floor(greenFrac * 255);
12085 # var blue = Math.floor(blueFrac * 255);
12086 #
12087 # if (!('alpha' in rgb_color)) {
12088 # return rgbToCssColor_(red, green, blue);
12089 # }
12090 #
12091 # var alphaFrac = rgb_color.alpha.value || 0.0;
12092 # var rgbParams = [red, green, blue].join(',');
12093 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12094 # };
12095 #
12096 # var rgbToCssColor_ = function(red, green, blue) {
12097 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12098 # var hexString = rgbNumber.toString(16);
12099 # var missingZeros = 6 - hexString.length;
12100 # var resultBuilder = ['#'];
12101 # for (var i = 0; i < missingZeros; i++) {
12102 # resultBuilder.push('0');
12103 # }
12104 # resultBuilder.push(hexString);
12105 # return resultBuilder.join('');
12106 # };
12107 #
12108 # // ...
12109 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12110 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12111 # the final pixel color is defined by the equation:
12112 #
12113 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12114 #
12115 # This means that a value of 1.0 corresponds to a solid color, whereas
12116 # a value of 0.0 corresponds to a completely transparent color. This
12117 # uses a wrapper message rather than a simple float scalar so that it is
12118 # possible to distinguish between a default value and the value being unset.
12119 # If omitted, this color object is to be rendered as a solid color
12120 # (as if the alpha value had been explicitly given with a value of 1.0).
12121 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12122 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12123 },
12124 },
12125 "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
12126 # basis throughout all the rows in the range. At least one of
12127 # row_properties or column_properties must be specified.
12128 # BandedRange.row_properties and BandedRange.column_properties are
12129 # set, the fill colors are applied to cells according to the following rules:
12130 #
12131 # * header_color and footer_color take priority over band colors.
12132 # * first_band_color takes priority over second_band_color.
12133 # * row_properties takes priority over column_properties.
12134 #
12135 # For example, the first row color takes priority over the first column
12136 # color, but the first column color takes priority over the second row color.
12137 # Similarly, the row header takes priority over the column header in the
12138 # top left cell, but the column header takes priority over the first row
12139 # color if the row header is not set.
12140 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
12141 # for simplicity of conversion to/from color representations in various
12142 # languages over compactness; for example, the fields of this representation
12143 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12144 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12145 # method in iOS; and, with just a little work, it can be easily formatted into
12146 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12147 #
12148 # Example (Java):
12149 #
12150 # import com.google.type.Color;
12151 #
12152 # // ...
12153 # public static java.awt.Color fromProto(Color protocolor) {
12154 # float alpha = protocolor.hasAlpha()
12155 # ? protocolor.getAlpha().getValue()
12156 # : 1.0;
12157 #
12158 # return new java.awt.Color(
12159 # protocolor.getRed(),
12160 # protocolor.getGreen(),
12161 # protocolor.getBlue(),
12162 # alpha);
12163 # }
12164 #
12165 # public static Color toProto(java.awt.Color color) {
12166 # float red = (float) color.getRed();
12167 # float green = (float) color.getGreen();
12168 # float blue = (float) color.getBlue();
12169 # float denominator = 255.0;
12170 # Color.Builder resultBuilder =
12171 # Color
12172 # .newBuilder()
12173 # .setRed(red / denominator)
12174 # .setGreen(green / denominator)
12175 # .setBlue(blue / denominator);
12176 # int alpha = color.getAlpha();
12177 # if (alpha != 255) {
12178 # result.setAlpha(
12179 # FloatValue
12180 # .newBuilder()
12181 # .setValue(((float) alpha) / denominator)
12182 # .build());
12183 # }
12184 # return resultBuilder.build();
12185 # }
12186 # // ...
12187 #
12188 # Example (iOS / Obj-C):
12189 #
12190 # // ...
12191 # static UIColor* fromProto(Color* protocolor) {
12192 # float red = [protocolor red];
12193 # float green = [protocolor green];
12194 # float blue = [protocolor blue];
12195 # FloatValue* alpha_wrapper = [protocolor alpha];
12196 # float alpha = 1.0;
12197 # if (alpha_wrapper != nil) {
12198 # alpha = [alpha_wrapper value];
12199 # }
12200 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12201 # }
12202 #
12203 # static Color* toProto(UIColor* color) {
12204 # CGFloat red, green, blue, alpha;
12205 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12206 # return nil;
12207 # }
12208 # Color* result = [Color alloc] init];
12209 # [result setRed:red];
12210 # [result setGreen:green];
12211 # [result setBlue:blue];
12212 # if (alpha <= 0.9999) {
12213 # [result setAlpha:floatWrapperWithValue(alpha)];
12214 # }
12215 # [result autorelease];
12216 # return result;
12217 # }
12218 # // ...
12219 #
12220 # Example (JavaScript):
12221 #
12222 # // ...
12223 #
12224 # var protoToCssColor = function(rgb_color) {
12225 # var redFrac = rgb_color.red || 0.0;
12226 # var greenFrac = rgb_color.green || 0.0;
12227 # var blueFrac = rgb_color.blue || 0.0;
12228 # var red = Math.floor(redFrac * 255);
12229 # var green = Math.floor(greenFrac * 255);
12230 # var blue = Math.floor(blueFrac * 255);
12231 #
12232 # if (!('alpha' in rgb_color)) {
12233 # return rgbToCssColor_(red, green, blue);
12234 # }
12235 #
12236 # var alphaFrac = rgb_color.alpha.value || 0.0;
12237 # var rgbParams = [red, green, blue].join(',');
12238 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12239 # };
12240 #
12241 # var rgbToCssColor_ = function(red, green, blue) {
12242 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12243 # var hexString = rgbNumber.toString(16);
12244 # var missingZeros = 6 - hexString.length;
12245 # var resultBuilder = ['#'];
12246 # for (var i = 0; i < missingZeros; i++) {
12247 # resultBuilder.push('0');
12248 # }
12249 # resultBuilder.push(hexString);
12250 # return resultBuilder.join('');
12251 # };
12252 #
12253 # // ...
12254 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12255 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12256 # the final pixel color is defined by the equation:
12257 #
12258 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12259 #
12260 # This means that a value of 1.0 corresponds to a solid color, whereas
12261 # a value of 0.0 corresponds to a completely transparent color. This
12262 # uses a wrapper message rather than a simple float scalar so that it is
12263 # possible to distinguish between a default value and the value being unset.
12264 # If omitted, this color object is to be rendered as a solid color
12265 # (as if the alpha value had been explicitly given with a value of 1.0).
12266 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12267 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12268 },
12269 "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
12270 # row or column will be filled with this color and the colors will
12271 # alternate between first_band_color and second_band_color starting
12272 # from the second row or column. Otherwise, the first row or column will be
12273 # filled with first_band_color and the colors will proceed to alternate
12274 # as they normally would.
12275 # for simplicity of conversion to/from color representations in various
12276 # languages over compactness; for example, the fields of this representation
12277 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12278 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12279 # method in iOS; and, with just a little work, it can be easily formatted into
12280 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12281 #
12282 # Example (Java):
12283 #
12284 # import com.google.type.Color;
12285 #
12286 # // ...
12287 # public static java.awt.Color fromProto(Color protocolor) {
12288 # float alpha = protocolor.hasAlpha()
12289 # ? protocolor.getAlpha().getValue()
12290 # : 1.0;
12291 #
12292 # return new java.awt.Color(
12293 # protocolor.getRed(),
12294 # protocolor.getGreen(),
12295 # protocolor.getBlue(),
12296 # alpha);
12297 # }
12298 #
12299 # public static Color toProto(java.awt.Color color) {
12300 # float red = (float) color.getRed();
12301 # float green = (float) color.getGreen();
12302 # float blue = (float) color.getBlue();
12303 # float denominator = 255.0;
12304 # Color.Builder resultBuilder =
12305 # Color
12306 # .newBuilder()
12307 # .setRed(red / denominator)
12308 # .setGreen(green / denominator)
12309 # .setBlue(blue / denominator);
12310 # int alpha = color.getAlpha();
12311 # if (alpha != 255) {
12312 # result.setAlpha(
12313 # FloatValue
12314 # .newBuilder()
12315 # .setValue(((float) alpha) / denominator)
12316 # .build());
12317 # }
12318 # return resultBuilder.build();
12319 # }
12320 # // ...
12321 #
12322 # Example (iOS / Obj-C):
12323 #
12324 # // ...
12325 # static UIColor* fromProto(Color* protocolor) {
12326 # float red = [protocolor red];
12327 # float green = [protocolor green];
12328 # float blue = [protocolor blue];
12329 # FloatValue* alpha_wrapper = [protocolor alpha];
12330 # float alpha = 1.0;
12331 # if (alpha_wrapper != nil) {
12332 # alpha = [alpha_wrapper value];
12333 # }
12334 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12335 # }
12336 #
12337 # static Color* toProto(UIColor* color) {
12338 # CGFloat red, green, blue, alpha;
12339 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12340 # return nil;
12341 # }
12342 # Color* result = [Color alloc] init];
12343 # [result setRed:red];
12344 # [result setGreen:green];
12345 # [result setBlue:blue];
12346 # if (alpha <= 0.9999) {
12347 # [result setAlpha:floatWrapperWithValue(alpha)];
12348 # }
12349 # [result autorelease];
12350 # return result;
12351 # }
12352 # // ...
12353 #
12354 # Example (JavaScript):
12355 #
12356 # // ...
12357 #
12358 # var protoToCssColor = function(rgb_color) {
12359 # var redFrac = rgb_color.red || 0.0;
12360 # var greenFrac = rgb_color.green || 0.0;
12361 # var blueFrac = rgb_color.blue || 0.0;
12362 # var red = Math.floor(redFrac * 255);
12363 # var green = Math.floor(greenFrac * 255);
12364 # var blue = Math.floor(blueFrac * 255);
12365 #
12366 # if (!('alpha' in rgb_color)) {
12367 # return rgbToCssColor_(red, green, blue);
12368 # }
12369 #
12370 # var alphaFrac = rgb_color.alpha.value || 0.0;
12371 # var rgbParams = [red, green, blue].join(',');
12372 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12373 # };
12374 #
12375 # var rgbToCssColor_ = function(red, green, blue) {
12376 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12377 # var hexString = rgbNumber.toString(16);
12378 # var missingZeros = 6 - hexString.length;
12379 # var resultBuilder = ['#'];
12380 # for (var i = 0; i < missingZeros; i++) {
12381 # resultBuilder.push('0');
12382 # }
12383 # resultBuilder.push(hexString);
12384 # return resultBuilder.join('');
12385 # };
12386 #
12387 # // ...
12388 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12389 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12390 # the final pixel color is defined by the equation:
12391 #
12392 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12393 #
12394 # This means that a value of 1.0 corresponds to a solid color, whereas
12395 # a value of 0.0 corresponds to a completely transparent color. This
12396 # uses a wrapper message rather than a simple float scalar so that it is
12397 # possible to distinguish between a default value and the value being unset.
12398 # If omitted, this color object is to be rendered as a solid color
12399 # (as if the alpha value had been explicitly given with a value of 1.0).
12400 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12401 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12402 },
12403 "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
12404 # row or column will be filled with either first_band_color or
12405 # second_band_color, depending on the color of the previous row or
12406 # column.
12407 # for simplicity of conversion to/from color representations in various
12408 # languages over compactness; for example, the fields of this representation
12409 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12410 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12411 # method in iOS; and, with just a little work, it can be easily formatted into
12412 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12413 #
12414 # Example (Java):
12415 #
12416 # import com.google.type.Color;
12417 #
12418 # // ...
12419 # public static java.awt.Color fromProto(Color protocolor) {
12420 # float alpha = protocolor.hasAlpha()
12421 # ? protocolor.getAlpha().getValue()
12422 # : 1.0;
12423 #
12424 # return new java.awt.Color(
12425 # protocolor.getRed(),
12426 # protocolor.getGreen(),
12427 # protocolor.getBlue(),
12428 # alpha);
12429 # }
12430 #
12431 # public static Color toProto(java.awt.Color color) {
12432 # float red = (float) color.getRed();
12433 # float green = (float) color.getGreen();
12434 # float blue = (float) color.getBlue();
12435 # float denominator = 255.0;
12436 # Color.Builder resultBuilder =
12437 # Color
12438 # .newBuilder()
12439 # .setRed(red / denominator)
12440 # .setGreen(green / denominator)
12441 # .setBlue(blue / denominator);
12442 # int alpha = color.getAlpha();
12443 # if (alpha != 255) {
12444 # result.setAlpha(
12445 # FloatValue
12446 # .newBuilder()
12447 # .setValue(((float) alpha) / denominator)
12448 # .build());
12449 # }
12450 # return resultBuilder.build();
12451 # }
12452 # // ...
12453 #
12454 # Example (iOS / Obj-C):
12455 #
12456 # // ...
12457 # static UIColor* fromProto(Color* protocolor) {
12458 # float red = [protocolor red];
12459 # float green = [protocolor green];
12460 # float blue = [protocolor blue];
12461 # FloatValue* alpha_wrapper = [protocolor alpha];
12462 # float alpha = 1.0;
12463 # if (alpha_wrapper != nil) {
12464 # alpha = [alpha_wrapper value];
12465 # }
12466 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12467 # }
12468 #
12469 # static Color* toProto(UIColor* color) {
12470 # CGFloat red, green, blue, alpha;
12471 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12472 # return nil;
12473 # }
12474 # Color* result = [Color alloc] init];
12475 # [result setRed:red];
12476 # [result setGreen:green];
12477 # [result setBlue:blue];
12478 # if (alpha <= 0.9999) {
12479 # [result setAlpha:floatWrapperWithValue(alpha)];
12480 # }
12481 # [result autorelease];
12482 # return result;
12483 # }
12484 # // ...
12485 #
12486 # Example (JavaScript):
12487 #
12488 # // ...
12489 #
12490 # var protoToCssColor = function(rgb_color) {
12491 # var redFrac = rgb_color.red || 0.0;
12492 # var greenFrac = rgb_color.green || 0.0;
12493 # var blueFrac = rgb_color.blue || 0.0;
12494 # var red = Math.floor(redFrac * 255);
12495 # var green = Math.floor(greenFrac * 255);
12496 # var blue = Math.floor(blueFrac * 255);
12497 #
12498 # if (!('alpha' in rgb_color)) {
12499 # return rgbToCssColor_(red, green, blue);
12500 # }
12501 #
12502 # var alphaFrac = rgb_color.alpha.value || 0.0;
12503 # var rgbParams = [red, green, blue].join(',');
12504 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12505 # };
12506 #
12507 # var rgbToCssColor_ = function(red, green, blue) {
12508 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12509 # var hexString = rgbNumber.toString(16);
12510 # var missingZeros = 6 - hexString.length;
12511 # var resultBuilder = ['#'];
12512 # for (var i = 0; i < missingZeros; i++) {
12513 # resultBuilder.push('0');
12514 # }
12515 # resultBuilder.push(hexString);
12516 # return resultBuilder.join('');
12517 # };
12518 #
12519 # // ...
12520 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12521 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12522 # the final pixel color is defined by the equation:
12523 #
12524 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12525 #
12526 # This means that a value of 1.0 corresponds to a solid color, whereas
12527 # a value of 0.0 corresponds to a completely transparent color. This
12528 # uses a wrapper message rather than a simple float scalar so that it is
12529 # possible to distinguish between a default value and the value being unset.
12530 # If omitted, this color object is to be rendered as a solid color
12531 # (as if the alpha value had been explicitly given with a value of 1.0).
12532 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12533 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12534 },
12535 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
12536 # for simplicity of conversion to/from color representations in various
12537 # languages over compactness; for example, the fields of this representation
12538 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
12539 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
12540 # method in iOS; and, with just a little work, it can be easily formatted into
12541 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
12542 #
12543 # Example (Java):
12544 #
12545 # import com.google.type.Color;
12546 #
12547 # // ...
12548 # public static java.awt.Color fromProto(Color protocolor) {
12549 # float alpha = protocolor.hasAlpha()
12550 # ? protocolor.getAlpha().getValue()
12551 # : 1.0;
12552 #
12553 # return new java.awt.Color(
12554 # protocolor.getRed(),
12555 # protocolor.getGreen(),
12556 # protocolor.getBlue(),
12557 # alpha);
12558 # }
12559 #
12560 # public static Color toProto(java.awt.Color color) {
12561 # float red = (float) color.getRed();
12562 # float green = (float) color.getGreen();
12563 # float blue = (float) color.getBlue();
12564 # float denominator = 255.0;
12565 # Color.Builder resultBuilder =
12566 # Color
12567 # .newBuilder()
12568 # .setRed(red / denominator)
12569 # .setGreen(green / denominator)
12570 # .setBlue(blue / denominator);
12571 # int alpha = color.getAlpha();
12572 # if (alpha != 255) {
12573 # result.setAlpha(
12574 # FloatValue
12575 # .newBuilder()
12576 # .setValue(((float) alpha) / denominator)
12577 # .build());
12578 # }
12579 # return resultBuilder.build();
12580 # }
12581 # // ...
12582 #
12583 # Example (iOS / Obj-C):
12584 #
12585 # // ...
12586 # static UIColor* fromProto(Color* protocolor) {
12587 # float red = [protocolor red];
12588 # float green = [protocolor green];
12589 # float blue = [protocolor blue];
12590 # FloatValue* alpha_wrapper = [protocolor alpha];
12591 # float alpha = 1.0;
12592 # if (alpha_wrapper != nil) {
12593 # alpha = [alpha_wrapper value];
12594 # }
12595 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
12596 # }
12597 #
12598 # static Color* toProto(UIColor* color) {
12599 # CGFloat red, green, blue, alpha;
12600 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
12601 # return nil;
12602 # }
12603 # Color* result = [Color alloc] init];
12604 # [result setRed:red];
12605 # [result setGreen:green];
12606 # [result setBlue:blue];
12607 # if (alpha <= 0.9999) {
12608 # [result setAlpha:floatWrapperWithValue(alpha)];
12609 # }
12610 # [result autorelease];
12611 # return result;
12612 # }
12613 # // ...
12614 #
12615 # Example (JavaScript):
12616 #
12617 # // ...
12618 #
12619 # var protoToCssColor = function(rgb_color) {
12620 # var redFrac = rgb_color.red || 0.0;
12621 # var greenFrac = rgb_color.green || 0.0;
12622 # var blueFrac = rgb_color.blue || 0.0;
12623 # var red = Math.floor(redFrac * 255);
12624 # var green = Math.floor(greenFrac * 255);
12625 # var blue = Math.floor(blueFrac * 255);
12626 #
12627 # if (!('alpha' in rgb_color)) {
12628 # return rgbToCssColor_(red, green, blue);
12629 # }
12630 #
12631 # var alphaFrac = rgb_color.alpha.value || 0.0;
12632 # var rgbParams = [red, green, blue].join(',');
12633 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
12634 # };
12635 #
12636 # var rgbToCssColor_ = function(red, green, blue) {
12637 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
12638 # var hexString = rgbNumber.toString(16);
12639 # var missingZeros = 6 - hexString.length;
12640 # var resultBuilder = ['#'];
12641 # for (var i = 0; i < missingZeros; i++) {
12642 # resultBuilder.push('0');
12643 # }
12644 # resultBuilder.push(hexString);
12645 # return resultBuilder.join('');
12646 # };
12647 #
12648 # // ...
12649 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
12650 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
12651 # the final pixel color is defined by the equation:
12652 #
12653 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
12654 #
12655 # This means that a value of 1.0 corresponds to a solid color, whereas
12656 # a value of 0.0 corresponds to a completely transparent color. This
12657 # uses a wrapper message rather than a simple float scalar so that it is
12658 # possible to distinguish between a default value and the value being unset.
12659 # If omitted, this color object is to be rendered as a solid color
12660 # (as if the alpha value had been explicitly given with a value of 1.0).
12661 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
12662 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
12663 },
12664 },
12665 "bandedRangeId": 42, # The id of the banded range.
12666 },
12667 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012668 "autoResizeDimensions": { # Automatically resizes one or more dimensions based on the contents # Automatically resizes one or more dimensions based on the contents
12669 # of the cells in that dimension.
12670 # of the cells in that dimension.
12671 "dimensions": { # A range along a single dimension on a sheet. # The dimensions to automatically resize.
12672 # Only COLUMNS are supported.
12673 # All indexes are zero-based.
12674 # Indexes are half open: the start index is inclusive
12675 # and the end index is exclusive.
12676 # Missing indexes indicate the range is unbounded on that side.
12677 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12678 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12679 "sheetId": 42, # The sheet this span is on.
12680 "dimension": "A String", # The dimension of the span.
12681 },
12682 },
12683 "updateDimensionProperties": { # Updates properties of dimensions within the specified range. # Updates dimensions' properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012684 "fields": "A String", # The fields that should be updated. At least one field must be specified.
12685 # The root `properties` is implied and should not be specified.
12686 # A single `"*"` can be used as short-hand for listing every field.
12687 "range": { # A range along a single dimension on a sheet. # The rows or columns to update.
12688 # All indexes are zero-based.
12689 # Indexes are half open: the start index is inclusive
12690 # and the end index is exclusive.
12691 # Missing indexes indicate the range is unbounded on that side.
12692 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
12693 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
12694 "sheetId": 42, # The sheet this span is on.
12695 "dimension": "A String", # The dimension of the span.
12696 },
12697 "properties": { # Properties about a dimension. # Properties to update.
12698 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
12699 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
12700 "hiddenByFilter": True or False, # True if this dimension is being filtered.
12701 # This field is read-only.
12702 },
12703 },
12704 "unmergeCells": { # Unmerges cells in the given range. # Unmerges merged cells.
12705 "range": { # A range on a sheet. # The range within which all cells should be unmerged.
12706 # If the range spans multiple merges, all will be unmerged.
12707 # The range must not partially span any merge.
12708 # All indexes are zero-based.
12709 # Indexes are half open, e.g the start index is inclusive
12710 # and the end index is exclusive -- [start_index, end_index).
12711 # Missing indexes indicate the range is unbounded on that side.
12712 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012713 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012714 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012715 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012716 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012717 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012718 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012719 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012720 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012721 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012722 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012723 # `Sheet1!A:B == sheet_id: 0,
12724 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012725 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012726 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012727 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012728 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012729 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012730 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012731 #
12732 # The start index must always be less than or equal to the end index.
12733 # If the start index equals the end index, then the range is empty.
12734 # Empty ranges are typically not meaningful and are usually rendered in the
12735 # UI as `#REF!`.
12736 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012737 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012738 "sheetId": 42, # The sheet this range is on.
12739 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012740 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012741 },
12742 },
12743 "setDataValidation": { # Sets a data validation rule to every cell in the range. # Sets data validation for one or more cells.
12744 # To clear validation in a range, call this with no rule specified.
12745 "range": { # A range on a sheet. # The range the data validation rule should apply to.
12746 # All indexes are zero-based.
12747 # Indexes are half open, e.g the start index is inclusive
12748 # and the end index is exclusive -- [start_index, end_index).
12749 # Missing indexes indicate the range is unbounded on that side.
12750 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012751 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012752 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012753 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012754 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012755 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012756 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012757 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012758 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012759 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012760 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012761 # `Sheet1!A:B == sheet_id: 0,
12762 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012763 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012764 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012765 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012766 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012767 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012768 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012769 #
12770 # The start index must always be less than or equal to the end index.
12771 # If the start index equals the end index, then the range is empty.
12772 # Empty ranges are typically not meaningful and are usually rendered in the
12773 # UI as `#REF!`.
12774 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012775 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012776 "sheetId": 42, # The sheet this range is on.
12777 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012778 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012779 },
12780 "rule": { # A data validation rule. # The data validation rule to set on each cell in the range,
12781 # or empty to clear the data validation in the range.
12782 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
12783 # If true, "List" conditions will show a dropdown.
12784 "strict": True or False, # True if invalid data should be rejected.
12785 "inputMessage": "A String", # A message to show the user when adding data to the cell.
12786 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
12787 # BooleanConditions are used by conditional formatting,
12788 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012789 "values": [ # The values of the condition. The number of supported values depends
12790 # on the condition type. Some support zero values,
12791 # others one or two values,
12792 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
12793 { # The value of the condition.
12794 "relativeDate": "A String", # A relative date (based on the current date).
12795 # Valid only if the type is
12796 # DATE_BEFORE,
12797 # DATE_AFTER,
12798 # DATE_ON_OR_BEFORE or
12799 # DATE_ON_OR_AFTER.
12800 #
12801 # Relative dates are not supported in data validation.
12802 # They are supported only in conditional formatting and
12803 # conditional filters.
12804 "userEnteredValue": "A String", # A value the condition is based on.
12805 # The value will be parsed as if the user typed into a cell.
12806 # Formulas are supported (and must begin with an `=`).
12807 },
12808 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012809 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012810 },
12811 },
12812 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012813 "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.
12814 "range": { # A range on a sheet. # The range of cells to delete.
12815 # All indexes are zero-based.
12816 # Indexes are half open, e.g the start index is inclusive
12817 # and the end index is exclusive -- [start_index, end_index).
12818 # Missing indexes indicate the range is unbounded on that side.
12819 #
12820 # For example, if `"Sheet1"` is sheet ID 0, then:
12821 #
12822 # `Sheet1!A1:A1 == sheet_id: 0,
12823 # start_row_index: 0, end_row_index: 1,
12824 # start_column_index: 0, end_column_index: 1`
12825 #
12826 # `Sheet1!A3:B4 == sheet_id: 0,
12827 # start_row_index: 2, end_row_index: 4,
12828 # start_column_index: 0, end_column_index: 2`
12829 #
12830 # `Sheet1!A:B == sheet_id: 0,
12831 # start_column_index: 0, end_column_index: 2`
12832 #
12833 # `Sheet1!A5:B == sheet_id: 0,
12834 # start_row_index: 4,
12835 # start_column_index: 0, end_column_index: 2`
12836 #
12837 # `Sheet1 == sheet_id:0`
12838 #
12839 # The start index must always be less than or equal to the end index.
12840 # If the start index equals the end index, then the range is empty.
12841 # Empty ranges are typically not meaningful and are usually rendered in the
12842 # UI as `#REF!`.
12843 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
12844 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
12845 "sheetId": 42, # The sheet this range is on.
12846 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
12847 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
12848 },
12849 "shiftDimension": "A String", # The dimension from which deleted cells will be replaced with.
12850 # If ROWS, existing cells will be shifted upward to
12851 # replace the deleted cells. If COLUMNS, existing cells
12852 # will be shifted left to replace the deleted cells.
12853 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012854 "clearBasicFilter": { # Clears the basic filter, if any exists on the sheet. # Clears the basic filter on a sheet.
12855 "sheetId": 42, # The sheet ID on which the basic filter should be cleared.
12856 },
12857 "addNamedRange": { # Adds a named range to the spreadsheet. # Adds a named range.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012858 "namedRange": { # A named range. # The named range to add. The namedRangeId
12859 # field is optional; if one is not set, an id will be randomly generated. (It
12860 # is an error to specify the ID of a range that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012861 "namedRangeId": "A String", # The ID of the named range.
12862 "range": { # A range on a sheet. # The range this represents.
12863 # All indexes are zero-based.
12864 # Indexes are half open, e.g the start index is inclusive
12865 # and the end index is exclusive -- [start_index, end_index).
12866 # Missing indexes indicate the range is unbounded on that side.
12867 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012868 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012869 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012870 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012871 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012872 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012873 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012874 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012875 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012876 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012877 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012878 # `Sheet1!A:B == sheet_id: 0,
12879 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012880 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012881 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012882 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012883 # 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 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012886 #
12887 # The start index must always be less than or equal to the end index.
12888 # If the start index equals the end index, then the range is empty.
12889 # Empty ranges are typically not meaningful and are usually rendered in the
12890 # UI as `#REF!`.
12891 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012892 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012893 "sheetId": 42, # The sheet this range is on.
12894 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012895 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012896 },
12897 "name": "A String", # The name of the named range.
12898 },
12899 },
12900 "updateChartSpec": { # Updates a chart's specifications. # Updates a chart's specifications.
12901 # (This does not move or resize a chart. To move or resize a chart, use
12902 # UpdateEmbeddedObjectPositionRequest.)
12903 "chartId": 42, # The ID of the chart to update.
12904 "spec": { # The specifications of a chart. # The specification to apply to the chart.
12905 "hiddenDimensionStrategy": "A String", # Determines how the charts will use hidden rows or columns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012906 "pieChart": { # A <a href="/chart/interactive/docs/gallery/piechart">pie chart</a>. # A pie chart specification.
12907 "series": { # The data included in a domain or series. # The data that covers the one and only series of the pie chart.
12908 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12909 "sources": [ # The ranges of data for a series or domain.
12910 # Exactly one dimension must have a length of 1,
12911 # and all sources in the list must have the same dimension
12912 # with length 1.
12913 # The domain (if it exists) & all series must have the same number
12914 # of source ranges. If using more than one source range, then the source
12915 # range at a given offset must be contiguous across the domain and series.
12916 #
12917 # For example, these are valid configurations:
12918 #
12919 # domain sources: A1:A5
12920 # series1 sources: B1:B5
12921 # series2 sources: D6:D10
12922 #
12923 # domain sources: A1:A5, C10:C12
12924 # series1 sources: B1:B5, D10:D12
12925 # series2 sources: C1:C5, E10:E12
12926 { # A range on a sheet.
12927 # All indexes are zero-based.
12928 # Indexes are half open, e.g the start index is inclusive
12929 # and the end index is exclusive -- [start_index, end_index).
12930 # Missing indexes indicate the range is unbounded on that side.
12931 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012932 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012933 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012934 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012935 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012936 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012937 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012938 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012939 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012940 # 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!A:B == sheet_id: 0,
12943 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012944 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012945 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012946 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012947 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012948 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012949 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012950 #
12951 # The start index must always be less than or equal to the end index.
12952 # If the start index equals the end index, then the range is empty.
12953 # Empty ranges are typically not meaningful and are usually rendered in the
12954 # UI as `#REF!`.
12955 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012956 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012957 "sheetId": 42, # The sheet this range is on.
12958 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040012959 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012960 },
12961 ],
12962 },
12963 },
12964 "domain": { # The data included in a domain or series. # The data that covers the domain of the pie chart.
12965 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
12966 "sources": [ # The ranges of data for a series or domain.
12967 # Exactly one dimension must have a length of 1,
12968 # and all sources in the list must have the same dimension
12969 # with length 1.
12970 # The domain (if it exists) & all series must have the same number
12971 # of source ranges. If using more than one source range, then the source
12972 # range at a given offset must be contiguous across the domain and series.
12973 #
12974 # For example, these are valid configurations:
12975 #
12976 # domain sources: A1:A5
12977 # series1 sources: B1:B5
12978 # series2 sources: D6:D10
12979 #
12980 # domain sources: A1:A5, C10:C12
12981 # series1 sources: B1:B5, D10:D12
12982 # series2 sources: C1:C5, E10:E12
12983 { # A range on a sheet.
12984 # All indexes are zero-based.
12985 # Indexes are half open, e.g the start index is inclusive
12986 # and the end index is exclusive -- [start_index, end_index).
12987 # Missing indexes indicate the range is unbounded on that side.
12988 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012989 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012990 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012991 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012992 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012993 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012994 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012995 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012996 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012997 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070012998 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070012999 # `Sheet1!A:B == sheet_id: 0,
13000 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013001 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013002 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013003 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013004 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013005 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013006 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013007 #
13008 # The start index must always be less than or equal to the end index.
13009 # If the start index equals the end index, then the range is empty.
13010 # Empty ranges are typically not meaningful and are usually rendered in the
13011 # UI as `#REF!`.
13012 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013013 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013014 "sheetId": 42, # The sheet this range is on.
13015 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013016 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013017 },
13018 ],
13019 },
13020 },
13021 "threeDimensional": True or False, # True if the pie is three dimensional.
13022 "legendPosition": "A String", # Where the legend of the pie chart should be drawn.
13023 "pieHole": 3.14, # The size of the hole in the pie chart.
13024 },
13025 "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 -070013026 # See BasicChartType for the list of all
13027 # charts this supports.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013028 # of charts this supports.
13029 "headerCount": 42, # The number of rows or columns in the data that are "headers".
13030 # If not set, Google Sheets will guess how many rows are headers based
13031 # on the data.
13032 #
13033 # (Note that BasicChartAxis.title may override the axis title
13034 # inferred from the header values.)
13035 "series": [ # The data this chart is visualizing.
13036 { # A single series of data in a chart.
13037 # For example, if charting stock prices over time, multiple series may exist,
13038 # one for the "Open Price", "High Price", "Low Price" and "Close Price".
13039 "series": { # The data included in a domain or series. # The data being visualized in this chart series.
13040 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13041 "sources": [ # The ranges of data for a series or domain.
13042 # Exactly one dimension must have a length of 1,
13043 # and all sources in the list must have the same dimension
13044 # with length 1.
13045 # The domain (if it exists) & all series must have the same number
13046 # of source ranges. If using more than one source range, then the source
13047 # range at a given offset must be contiguous across the domain and series.
13048 #
13049 # For example, these are valid configurations:
13050 #
13051 # domain sources: A1:A5
13052 # series1 sources: B1:B5
13053 # series2 sources: D6:D10
13054 #
13055 # domain sources: A1:A5, C10:C12
13056 # series1 sources: B1:B5, D10:D12
13057 # series2 sources: C1:C5, E10:E12
13058 { # A range on a sheet.
13059 # All indexes are zero-based.
13060 # Indexes are half open, e.g the start index is inclusive
13061 # and the end index is exclusive -- [start_index, end_index).
13062 # Missing indexes indicate the range is unbounded on that side.
13063 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013064 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013065 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013066 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013067 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013068 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013069 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013070 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013071 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013072 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013073 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013074 # `Sheet1!A:B == sheet_id: 0,
13075 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013076 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013077 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013078 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013079 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013080 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013081 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013082 #
13083 # The start index must always be less than or equal to the end index.
13084 # If the start index equals the end index, then the range is empty.
13085 # Empty ranges are typically not meaningful and are usually rendered in the
13086 # UI as `#REF!`.
13087 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013088 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013089 "sheetId": 42, # The sheet this range is on.
13090 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013091 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013092 },
13093 ],
13094 },
13095 },
13096 "targetAxis": "A String", # The minor axis that will specify the range of values for this series.
13097 # For example, if charting stocks over time, the "Volume" series
13098 # may want to be pinned to the right with the prices pinned to the left,
13099 # because the scale of trading volume is different than the scale of
13100 # prices.
13101 # It is an error to specify an axis that isn't a valid minor axis
13102 # for the chart's type.
13103 "type": "A String", # The type of this series. Valid only if the
13104 # chartType is
13105 # COMBO.
13106 # Different types will change the way the series is visualized.
13107 # Only LINE, AREA,
13108 # and COLUMN are supported.
13109 },
13110 ],
13111 "legendPosition": "A String", # The position of the chart legend.
13112 "domains": [ # The domain of data this is charting.
13113 # Only a single domain is currently supported.
13114 { # The domain of a chart.
13115 # For example, if charting stock prices over time, this would be the date.
13116 "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 -070013117 # this is the data representing the dates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013118 "sourceRange": { # Source ranges for a chart. # The source ranges of the data.
13119 "sources": [ # The ranges of data for a series or domain.
13120 # Exactly one dimension must have a length of 1,
13121 # and all sources in the list must have the same dimension
13122 # with length 1.
13123 # The domain (if it exists) & all series must have the same number
13124 # of source ranges. If using more than one source range, then the source
13125 # range at a given offset must be contiguous across the domain and series.
13126 #
13127 # For example, these are valid configurations:
13128 #
13129 # domain sources: A1:A5
13130 # series1 sources: B1:B5
13131 # series2 sources: D6:D10
13132 #
13133 # domain sources: A1:A5, C10:C12
13134 # series1 sources: B1:B5, D10:D12
13135 # series2 sources: C1:C5, E10:E12
13136 { # A range on a sheet.
13137 # All indexes are zero-based.
13138 # Indexes are half open, e.g the start index is inclusive
13139 # and the end index is exclusive -- [start_index, end_index).
13140 # Missing indexes indicate the range is unbounded on that side.
13141 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013142 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013143 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013144 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013145 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013146 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013147 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013148 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013149 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013150 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013151 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013152 # `Sheet1!A:B == sheet_id: 0,
13153 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013154 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013155 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013156 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013157 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013158 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013159 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013160 #
13161 # The start index must always be less than or equal to the end index.
13162 # If the start index equals the end index, then the range is empty.
13163 # Empty ranges are typically not meaningful and are usually rendered in the
13164 # UI as `#REF!`.
13165 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013166 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013167 "sheetId": 42, # The sheet this range is on.
13168 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013169 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013170 },
13171 ],
13172 },
13173 },
13174 },
13175 ],
13176 "chartType": "A String", # The type of the chart.
13177 "axis": [ # The axis on the chart.
13178 { # An axis of the chart.
13179 # A chart may not have more than one axis per
13180 # axis position.
13181 "position": "A String", # The position of this axis.
13182 "format": { # The format of a run of text in a cell. # The format of the title.
13183 # Only valid if the axis is not associated with the domain.
13184 # Absent values indicate that the field isn't specified.
13185 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
13186 # for simplicity of conversion to/from color representations in various
13187 # languages over compactness; for example, the fields of this representation
13188 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13189 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13190 # method in iOS; and, with just a little work, it can be easily formatted into
13191 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13192 #
13193 # Example (Java):
13194 #
13195 # import com.google.type.Color;
13196 #
13197 # // ...
13198 # public static java.awt.Color fromProto(Color protocolor) {
13199 # float alpha = protocolor.hasAlpha()
13200 # ? protocolor.getAlpha().getValue()
13201 # : 1.0;
13202 #
13203 # return new java.awt.Color(
13204 # protocolor.getRed(),
13205 # protocolor.getGreen(),
13206 # protocolor.getBlue(),
13207 # alpha);
13208 # }
13209 #
13210 # public static Color toProto(java.awt.Color color) {
13211 # float red = (float) color.getRed();
13212 # float green = (float) color.getGreen();
13213 # float blue = (float) color.getBlue();
13214 # float denominator = 255.0;
13215 # Color.Builder resultBuilder =
13216 # Color
13217 # .newBuilder()
13218 # .setRed(red / denominator)
13219 # .setGreen(green / denominator)
13220 # .setBlue(blue / denominator);
13221 # int alpha = color.getAlpha();
13222 # if (alpha != 255) {
13223 # result.setAlpha(
13224 # FloatValue
13225 # .newBuilder()
13226 # .setValue(((float) alpha) / denominator)
13227 # .build());
13228 # }
13229 # return resultBuilder.build();
13230 # }
13231 # // ...
13232 #
13233 # Example (iOS / Obj-C):
13234 #
13235 # // ...
13236 # static UIColor* fromProto(Color* protocolor) {
13237 # float red = [protocolor red];
13238 # float green = [protocolor green];
13239 # float blue = [protocolor blue];
13240 # FloatValue* alpha_wrapper = [protocolor alpha];
13241 # float alpha = 1.0;
13242 # if (alpha_wrapper != nil) {
13243 # alpha = [alpha_wrapper value];
13244 # }
13245 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13246 # }
13247 #
13248 # static Color* toProto(UIColor* color) {
13249 # CGFloat red, green, blue, alpha;
13250 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13251 # return nil;
13252 # }
13253 # Color* result = [Color alloc] init];
13254 # [result setRed:red];
13255 # [result setGreen:green];
13256 # [result setBlue:blue];
13257 # if (alpha <= 0.9999) {
13258 # [result setAlpha:floatWrapperWithValue(alpha)];
13259 # }
13260 # [result autorelease];
13261 # return result;
13262 # }
13263 # // ...
13264 #
13265 # Example (JavaScript):
13266 #
13267 # // ...
13268 #
13269 # var protoToCssColor = function(rgb_color) {
13270 # var redFrac = rgb_color.red || 0.0;
13271 # var greenFrac = rgb_color.green || 0.0;
13272 # var blueFrac = rgb_color.blue || 0.0;
13273 # var red = Math.floor(redFrac * 255);
13274 # var green = Math.floor(greenFrac * 255);
13275 # var blue = Math.floor(blueFrac * 255);
13276 #
13277 # if (!('alpha' in rgb_color)) {
13278 # return rgbToCssColor_(red, green, blue);
13279 # }
13280 #
13281 # var alphaFrac = rgb_color.alpha.value || 0.0;
13282 # var rgbParams = [red, green, blue].join(',');
13283 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13284 # };
13285 #
13286 # var rgbToCssColor_ = function(red, green, blue) {
13287 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13288 # var hexString = rgbNumber.toString(16);
13289 # var missingZeros = 6 - hexString.length;
13290 # var resultBuilder = ['#'];
13291 # for (var i = 0; i < missingZeros; i++) {
13292 # resultBuilder.push('0');
13293 # }
13294 # resultBuilder.push(hexString);
13295 # return resultBuilder.join('');
13296 # };
13297 #
13298 # // ...
13299 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13300 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13301 # the final pixel color is defined by the equation:
13302 #
13303 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13304 #
13305 # This means that a value of 1.0 corresponds to a solid color, whereas
13306 # a value of 0.0 corresponds to a completely transparent color. This
13307 # uses a wrapper message rather than a simple float scalar so that it is
13308 # possible to distinguish between a default value and the value being unset.
13309 # If omitted, this color object is to be rendered as a solid color
13310 # (as if the alpha value had been explicitly given with a value of 1.0).
13311 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13312 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13313 },
13314 "bold": True or False, # True if the text is bold.
13315 "strikethrough": True or False, # True if the text has a strikethrough.
13316 "fontFamily": "A String", # The font family.
13317 "fontSize": 42, # The size of the font.
13318 "italic": True or False, # True if the text is italicized.
13319 "underline": True or False, # True if the text is underlined.
13320 },
13321 "title": "A String", # The title of this axis. If set, this overrides any title inferred
13322 # from headers of the data.
13323 },
13324 ],
13325 },
13326 "title": "A String", # The title of the chart.
13327 },
13328 },
13329 "moveDimension": { # Moves one or more rows or columns. # Moves rows or columns to another location in a sheet.
13330 "source": { # A range along a single dimension on a sheet. # The source dimensions to move.
13331 # All indexes are zero-based.
13332 # Indexes are half open: the start index is inclusive
13333 # and the end index is exclusive.
13334 # Missing indexes indicate the range is unbounded on that side.
13335 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
13336 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
13337 "sheetId": 42, # The sheet this span is on.
13338 "dimension": "A String", # The dimension of the span.
13339 },
13340 "destinationIndex": 42, # The zero-based start index of where to move the source data to,
13341 # based on the coordinates *before* the source data is removed
13342 # from the grid. Existing data will be shifted down or right
13343 # (depending on the dimension) to make room for the moved dimensions.
13344 # The source dimensions are removed from the grid, so the
13345 # the data may end up in a different index than specified.
13346 #
13347 # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013348 # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be
13349 # `ROWS [1..3)`,and the destination index would be `"4"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013350 # (the zero-based index of row 5).
13351 # The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
13352 },
13353 "textToColumns": { # Splits a column of text into multiple columns, # Converts a column of text into many columns of text.
13354 # based on a delimiter in each cell.
13355 "source": { # A range on a sheet. # The source data range. This must span exactly one column.
13356 # All indexes are zero-based.
13357 # Indexes are half open, e.g the start index is inclusive
13358 # and the end index is exclusive -- [start_index, end_index).
13359 # Missing indexes indicate the range is unbounded on that side.
13360 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013361 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013362 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013363 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013364 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013365 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013366 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013367 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013368 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013369 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013370 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013371 # `Sheet1!A:B == sheet_id: 0,
13372 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013373 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013374 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013375 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013376 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013377 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070013378 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013379 #
13380 # The start index must always be less than or equal to the end index.
13381 # If the start index equals the end index, then the range is empty.
13382 # Empty ranges are typically not meaningful and are usually rendered in the
13383 # UI as `#REF!`.
13384 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013385 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013386 "sheetId": 42, # The sheet this range is on.
13387 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013388 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070013389 },
13390 "delimiter": "A String", # The delimiter to use. Used only if delimiterType is
13391 # CUSTOM.
13392 "delimiterType": "A String", # The delimiter type to use.
13393 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013394 "addBanding": { # Adds a new banded range to the spreadsheet. # Adds a new banded range
13395 "bandedRange": { # A banded (alternating colors) range in a sheet. # The banded range to add. The bandedRangeId
13396 # field is optional; if one is not set, an id will be randomly generated. (It
13397 # is an error to specify the ID of a range that already exists.)
13398 "range": { # A range on a sheet. # The range over which these properties are applied.
13399 # All indexes are zero-based.
13400 # Indexes are half open, e.g the start index is inclusive
13401 # and the end index is exclusive -- [start_index, end_index).
13402 # Missing indexes indicate the range is unbounded on that side.
13403 #
13404 # For example, if `"Sheet1"` is sheet ID 0, then:
13405 #
13406 # `Sheet1!A1:A1 == sheet_id: 0,
13407 # start_row_index: 0, end_row_index: 1,
13408 # start_column_index: 0, end_column_index: 1`
13409 #
13410 # `Sheet1!A3:B4 == sheet_id: 0,
13411 # start_row_index: 2, end_row_index: 4,
13412 # start_column_index: 0, end_column_index: 2`
13413 #
13414 # `Sheet1!A:B == sheet_id: 0,
13415 # start_column_index: 0, end_column_index: 2`
13416 #
13417 # `Sheet1!A5:B == sheet_id: 0,
13418 # start_row_index: 4,
13419 # start_column_index: 0, end_column_index: 2`
13420 #
13421 # `Sheet1 == sheet_id:0`
13422 #
13423 # The start index must always be less than or equal to the end index.
13424 # If the start index equals the end index, then the range is empty.
13425 # Empty ranges are typically not meaningful and are usually rendered in the
13426 # UI as `#REF!`.
13427 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013428 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013429 "sheetId": 42, # The sheet this range is on.
13430 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040013431 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080013432 },
13433 "columnProperties": { # Properties referring a single dimension (either row or column). If both # Properties for column bands. These properties will be applied on a column-
13434 # by-column basis throughout all the columns in the range. At least one of
13435 # row_properties or column_properties must be specified.
13436 # BandedRange.row_properties and BandedRange.column_properties are
13437 # set, the fill colors are applied to cells according to the following rules:
13438 #
13439 # * header_color and footer_color take priority over band colors.
13440 # * first_band_color takes priority over second_band_color.
13441 # * row_properties takes priority over column_properties.
13442 #
13443 # For example, the first row color takes priority over the first column
13444 # color, but the first column color takes priority over the second row color.
13445 # Similarly, the row header takes priority over the column header in the
13446 # top left cell, but the column header takes priority over the first row
13447 # color if the row header is not set.
13448 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13449 # for simplicity of conversion to/from color representations in various
13450 # languages over compactness; for example, the fields of this representation
13451 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13452 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13453 # method in iOS; and, with just a little work, it can be easily formatted into
13454 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13455 #
13456 # Example (Java):
13457 #
13458 # import com.google.type.Color;
13459 #
13460 # // ...
13461 # public static java.awt.Color fromProto(Color protocolor) {
13462 # float alpha = protocolor.hasAlpha()
13463 # ? protocolor.getAlpha().getValue()
13464 # : 1.0;
13465 #
13466 # return new java.awt.Color(
13467 # protocolor.getRed(),
13468 # protocolor.getGreen(),
13469 # protocolor.getBlue(),
13470 # alpha);
13471 # }
13472 #
13473 # public static Color toProto(java.awt.Color color) {
13474 # float red = (float) color.getRed();
13475 # float green = (float) color.getGreen();
13476 # float blue = (float) color.getBlue();
13477 # float denominator = 255.0;
13478 # Color.Builder resultBuilder =
13479 # Color
13480 # .newBuilder()
13481 # .setRed(red / denominator)
13482 # .setGreen(green / denominator)
13483 # .setBlue(blue / denominator);
13484 # int alpha = color.getAlpha();
13485 # if (alpha != 255) {
13486 # result.setAlpha(
13487 # FloatValue
13488 # .newBuilder()
13489 # .setValue(((float) alpha) / denominator)
13490 # .build());
13491 # }
13492 # return resultBuilder.build();
13493 # }
13494 # // ...
13495 #
13496 # Example (iOS / Obj-C):
13497 #
13498 # // ...
13499 # static UIColor* fromProto(Color* protocolor) {
13500 # float red = [protocolor red];
13501 # float green = [protocolor green];
13502 # float blue = [protocolor blue];
13503 # FloatValue* alpha_wrapper = [protocolor alpha];
13504 # float alpha = 1.0;
13505 # if (alpha_wrapper != nil) {
13506 # alpha = [alpha_wrapper value];
13507 # }
13508 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13509 # }
13510 #
13511 # static Color* toProto(UIColor* color) {
13512 # CGFloat red, green, blue, alpha;
13513 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13514 # return nil;
13515 # }
13516 # Color* result = [Color alloc] init];
13517 # [result setRed:red];
13518 # [result setGreen:green];
13519 # [result setBlue:blue];
13520 # if (alpha <= 0.9999) {
13521 # [result setAlpha:floatWrapperWithValue(alpha)];
13522 # }
13523 # [result autorelease];
13524 # return result;
13525 # }
13526 # // ...
13527 #
13528 # Example (JavaScript):
13529 #
13530 # // ...
13531 #
13532 # var protoToCssColor = function(rgb_color) {
13533 # var redFrac = rgb_color.red || 0.0;
13534 # var greenFrac = rgb_color.green || 0.0;
13535 # var blueFrac = rgb_color.blue || 0.0;
13536 # var red = Math.floor(redFrac * 255);
13537 # var green = Math.floor(greenFrac * 255);
13538 # var blue = Math.floor(blueFrac * 255);
13539 #
13540 # if (!('alpha' in rgb_color)) {
13541 # return rgbToCssColor_(red, green, blue);
13542 # }
13543 #
13544 # var alphaFrac = rgb_color.alpha.value || 0.0;
13545 # var rgbParams = [red, green, blue].join(',');
13546 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13547 # };
13548 #
13549 # var rgbToCssColor_ = function(red, green, blue) {
13550 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13551 # var hexString = rgbNumber.toString(16);
13552 # var missingZeros = 6 - hexString.length;
13553 # var resultBuilder = ['#'];
13554 # for (var i = 0; i < missingZeros; i++) {
13555 # resultBuilder.push('0');
13556 # }
13557 # resultBuilder.push(hexString);
13558 # return resultBuilder.join('');
13559 # };
13560 #
13561 # // ...
13562 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13563 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13564 # the final pixel color is defined by the equation:
13565 #
13566 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13567 #
13568 # This means that a value of 1.0 corresponds to a solid color, whereas
13569 # a value of 0.0 corresponds to a completely transparent color. This
13570 # uses a wrapper message rather than a simple float scalar so that it is
13571 # possible to distinguish between a default value and the value being unset.
13572 # If omitted, this color object is to be rendered as a solid color
13573 # (as if the alpha value had been explicitly given with a value of 1.0).
13574 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13575 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13576 },
13577 "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
13578 # row or column will be filled with this color and the colors will
13579 # alternate between first_band_color and second_band_color starting
13580 # from the second row or column. Otherwise, the first row or column will be
13581 # filled with first_band_color and the colors will proceed to alternate
13582 # as they normally would.
13583 # for simplicity of conversion to/from color representations in various
13584 # languages over compactness; for example, the fields of this representation
13585 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13586 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13587 # method in iOS; and, with just a little work, it can be easily formatted into
13588 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13589 #
13590 # Example (Java):
13591 #
13592 # import com.google.type.Color;
13593 #
13594 # // ...
13595 # public static java.awt.Color fromProto(Color protocolor) {
13596 # float alpha = protocolor.hasAlpha()
13597 # ? protocolor.getAlpha().getValue()
13598 # : 1.0;
13599 #
13600 # return new java.awt.Color(
13601 # protocolor.getRed(),
13602 # protocolor.getGreen(),
13603 # protocolor.getBlue(),
13604 # alpha);
13605 # }
13606 #
13607 # public static Color toProto(java.awt.Color color) {
13608 # float red = (float) color.getRed();
13609 # float green = (float) color.getGreen();
13610 # float blue = (float) color.getBlue();
13611 # float denominator = 255.0;
13612 # Color.Builder resultBuilder =
13613 # Color
13614 # .newBuilder()
13615 # .setRed(red / denominator)
13616 # .setGreen(green / denominator)
13617 # .setBlue(blue / denominator);
13618 # int alpha = color.getAlpha();
13619 # if (alpha != 255) {
13620 # result.setAlpha(
13621 # FloatValue
13622 # .newBuilder()
13623 # .setValue(((float) alpha) / denominator)
13624 # .build());
13625 # }
13626 # return resultBuilder.build();
13627 # }
13628 # // ...
13629 #
13630 # Example (iOS / Obj-C):
13631 #
13632 # // ...
13633 # static UIColor* fromProto(Color* protocolor) {
13634 # float red = [protocolor red];
13635 # float green = [protocolor green];
13636 # float blue = [protocolor blue];
13637 # FloatValue* alpha_wrapper = [protocolor alpha];
13638 # float alpha = 1.0;
13639 # if (alpha_wrapper != nil) {
13640 # alpha = [alpha_wrapper value];
13641 # }
13642 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13643 # }
13644 #
13645 # static Color* toProto(UIColor* color) {
13646 # CGFloat red, green, blue, alpha;
13647 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13648 # return nil;
13649 # }
13650 # Color* result = [Color alloc] init];
13651 # [result setRed:red];
13652 # [result setGreen:green];
13653 # [result setBlue:blue];
13654 # if (alpha <= 0.9999) {
13655 # [result setAlpha:floatWrapperWithValue(alpha)];
13656 # }
13657 # [result autorelease];
13658 # return result;
13659 # }
13660 # // ...
13661 #
13662 # Example (JavaScript):
13663 #
13664 # // ...
13665 #
13666 # var protoToCssColor = function(rgb_color) {
13667 # var redFrac = rgb_color.red || 0.0;
13668 # var greenFrac = rgb_color.green || 0.0;
13669 # var blueFrac = rgb_color.blue || 0.0;
13670 # var red = Math.floor(redFrac * 255);
13671 # var green = Math.floor(greenFrac * 255);
13672 # var blue = Math.floor(blueFrac * 255);
13673 #
13674 # if (!('alpha' in rgb_color)) {
13675 # return rgbToCssColor_(red, green, blue);
13676 # }
13677 #
13678 # var alphaFrac = rgb_color.alpha.value || 0.0;
13679 # var rgbParams = [red, green, blue].join(',');
13680 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13681 # };
13682 #
13683 # var rgbToCssColor_ = function(red, green, blue) {
13684 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13685 # var hexString = rgbNumber.toString(16);
13686 # var missingZeros = 6 - hexString.length;
13687 # var resultBuilder = ['#'];
13688 # for (var i = 0; i < missingZeros; i++) {
13689 # resultBuilder.push('0');
13690 # }
13691 # resultBuilder.push(hexString);
13692 # return resultBuilder.join('');
13693 # };
13694 #
13695 # // ...
13696 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13697 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13698 # the final pixel color is defined by the equation:
13699 #
13700 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13701 #
13702 # This means that a value of 1.0 corresponds to a solid color, whereas
13703 # a value of 0.0 corresponds to a completely transparent color. This
13704 # uses a wrapper message rather than a simple float scalar so that it is
13705 # possible to distinguish between a default value and the value being unset.
13706 # If omitted, this color object is to be rendered as a solid color
13707 # (as if the alpha value had been explicitly given with a value of 1.0).
13708 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13709 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13710 },
13711 "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
13712 # row or column will be filled with either first_band_color or
13713 # second_band_color, depending on the color of the previous row or
13714 # column.
13715 # for simplicity of conversion to/from color representations in various
13716 # languages over compactness; for example, the fields of this representation
13717 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13718 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13719 # method in iOS; and, with just a little work, it can be easily formatted into
13720 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13721 #
13722 # Example (Java):
13723 #
13724 # import com.google.type.Color;
13725 #
13726 # // ...
13727 # public static java.awt.Color fromProto(Color protocolor) {
13728 # float alpha = protocolor.hasAlpha()
13729 # ? protocolor.getAlpha().getValue()
13730 # : 1.0;
13731 #
13732 # return new java.awt.Color(
13733 # protocolor.getRed(),
13734 # protocolor.getGreen(),
13735 # protocolor.getBlue(),
13736 # alpha);
13737 # }
13738 #
13739 # public static Color toProto(java.awt.Color color) {
13740 # float red = (float) color.getRed();
13741 # float green = (float) color.getGreen();
13742 # float blue = (float) color.getBlue();
13743 # float denominator = 255.0;
13744 # Color.Builder resultBuilder =
13745 # Color
13746 # .newBuilder()
13747 # .setRed(red / denominator)
13748 # .setGreen(green / denominator)
13749 # .setBlue(blue / denominator);
13750 # int alpha = color.getAlpha();
13751 # if (alpha != 255) {
13752 # result.setAlpha(
13753 # FloatValue
13754 # .newBuilder()
13755 # .setValue(((float) alpha) / denominator)
13756 # .build());
13757 # }
13758 # return resultBuilder.build();
13759 # }
13760 # // ...
13761 #
13762 # Example (iOS / Obj-C):
13763 #
13764 # // ...
13765 # static UIColor* fromProto(Color* protocolor) {
13766 # float red = [protocolor red];
13767 # float green = [protocolor green];
13768 # float blue = [protocolor blue];
13769 # FloatValue* alpha_wrapper = [protocolor alpha];
13770 # float alpha = 1.0;
13771 # if (alpha_wrapper != nil) {
13772 # alpha = [alpha_wrapper value];
13773 # }
13774 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13775 # }
13776 #
13777 # static Color* toProto(UIColor* color) {
13778 # CGFloat red, green, blue, alpha;
13779 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13780 # return nil;
13781 # }
13782 # Color* result = [Color alloc] init];
13783 # [result setRed:red];
13784 # [result setGreen:green];
13785 # [result setBlue:blue];
13786 # if (alpha <= 0.9999) {
13787 # [result setAlpha:floatWrapperWithValue(alpha)];
13788 # }
13789 # [result autorelease];
13790 # return result;
13791 # }
13792 # // ...
13793 #
13794 # Example (JavaScript):
13795 #
13796 # // ...
13797 #
13798 # var protoToCssColor = function(rgb_color) {
13799 # var redFrac = rgb_color.red || 0.0;
13800 # var greenFrac = rgb_color.green || 0.0;
13801 # var blueFrac = rgb_color.blue || 0.0;
13802 # var red = Math.floor(redFrac * 255);
13803 # var green = Math.floor(greenFrac * 255);
13804 # var blue = Math.floor(blueFrac * 255);
13805 #
13806 # if (!('alpha' in rgb_color)) {
13807 # return rgbToCssColor_(red, green, blue);
13808 # }
13809 #
13810 # var alphaFrac = rgb_color.alpha.value || 0.0;
13811 # var rgbParams = [red, green, blue].join(',');
13812 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13813 # };
13814 #
13815 # var rgbToCssColor_ = function(red, green, blue) {
13816 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13817 # var hexString = rgbNumber.toString(16);
13818 # var missingZeros = 6 - hexString.length;
13819 # var resultBuilder = ['#'];
13820 # for (var i = 0; i < missingZeros; i++) {
13821 # resultBuilder.push('0');
13822 # }
13823 # resultBuilder.push(hexString);
13824 # return resultBuilder.join('');
13825 # };
13826 #
13827 # // ...
13828 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13829 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13830 # the final pixel color is defined by the equation:
13831 #
13832 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13833 #
13834 # This means that a value of 1.0 corresponds to a solid color, whereas
13835 # a value of 0.0 corresponds to a completely transparent color. This
13836 # uses a wrapper message rather than a simple float scalar so that it is
13837 # possible to distinguish between a default value and the value being unset.
13838 # If omitted, this color object is to be rendered as a solid color
13839 # (as if the alpha value had been explicitly given with a value of 1.0).
13840 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13841 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13842 },
13843 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
13844 # for simplicity of conversion to/from color representations in various
13845 # languages over compactness; for example, the fields of this representation
13846 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13847 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13848 # method in iOS; and, with just a little work, it can be easily formatted into
13849 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13850 #
13851 # Example (Java):
13852 #
13853 # import com.google.type.Color;
13854 #
13855 # // ...
13856 # public static java.awt.Color fromProto(Color protocolor) {
13857 # float alpha = protocolor.hasAlpha()
13858 # ? protocolor.getAlpha().getValue()
13859 # : 1.0;
13860 #
13861 # return new java.awt.Color(
13862 # protocolor.getRed(),
13863 # protocolor.getGreen(),
13864 # protocolor.getBlue(),
13865 # alpha);
13866 # }
13867 #
13868 # public static Color toProto(java.awt.Color color) {
13869 # float red = (float) color.getRed();
13870 # float green = (float) color.getGreen();
13871 # float blue = (float) color.getBlue();
13872 # float denominator = 255.0;
13873 # Color.Builder resultBuilder =
13874 # Color
13875 # .newBuilder()
13876 # .setRed(red / denominator)
13877 # .setGreen(green / denominator)
13878 # .setBlue(blue / denominator);
13879 # int alpha = color.getAlpha();
13880 # if (alpha != 255) {
13881 # result.setAlpha(
13882 # FloatValue
13883 # .newBuilder()
13884 # .setValue(((float) alpha) / denominator)
13885 # .build());
13886 # }
13887 # return resultBuilder.build();
13888 # }
13889 # // ...
13890 #
13891 # Example (iOS / Obj-C):
13892 #
13893 # // ...
13894 # static UIColor* fromProto(Color* protocolor) {
13895 # float red = [protocolor red];
13896 # float green = [protocolor green];
13897 # float blue = [protocolor blue];
13898 # FloatValue* alpha_wrapper = [protocolor alpha];
13899 # float alpha = 1.0;
13900 # if (alpha_wrapper != nil) {
13901 # alpha = [alpha_wrapper value];
13902 # }
13903 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
13904 # }
13905 #
13906 # static Color* toProto(UIColor* color) {
13907 # CGFloat red, green, blue, alpha;
13908 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
13909 # return nil;
13910 # }
13911 # Color* result = [Color alloc] init];
13912 # [result setRed:red];
13913 # [result setGreen:green];
13914 # [result setBlue:blue];
13915 # if (alpha <= 0.9999) {
13916 # [result setAlpha:floatWrapperWithValue(alpha)];
13917 # }
13918 # [result autorelease];
13919 # return result;
13920 # }
13921 # // ...
13922 #
13923 # Example (JavaScript):
13924 #
13925 # // ...
13926 #
13927 # var protoToCssColor = function(rgb_color) {
13928 # var redFrac = rgb_color.red || 0.0;
13929 # var greenFrac = rgb_color.green || 0.0;
13930 # var blueFrac = rgb_color.blue || 0.0;
13931 # var red = Math.floor(redFrac * 255);
13932 # var green = Math.floor(greenFrac * 255);
13933 # var blue = Math.floor(blueFrac * 255);
13934 #
13935 # if (!('alpha' in rgb_color)) {
13936 # return rgbToCssColor_(red, green, blue);
13937 # }
13938 #
13939 # var alphaFrac = rgb_color.alpha.value || 0.0;
13940 # var rgbParams = [red, green, blue].join(',');
13941 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
13942 # };
13943 #
13944 # var rgbToCssColor_ = function(red, green, blue) {
13945 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
13946 # var hexString = rgbNumber.toString(16);
13947 # var missingZeros = 6 - hexString.length;
13948 # var resultBuilder = ['#'];
13949 # for (var i = 0; i < missingZeros; i++) {
13950 # resultBuilder.push('0');
13951 # }
13952 # resultBuilder.push(hexString);
13953 # return resultBuilder.join('');
13954 # };
13955 #
13956 # // ...
13957 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
13958 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
13959 # the final pixel color is defined by the equation:
13960 #
13961 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
13962 #
13963 # This means that a value of 1.0 corresponds to a solid color, whereas
13964 # a value of 0.0 corresponds to a completely transparent color. This
13965 # uses a wrapper message rather than a simple float scalar so that it is
13966 # possible to distinguish between a default value and the value being unset.
13967 # If omitted, this color object is to be rendered as a solid color
13968 # (as if the alpha value had been explicitly given with a value of 1.0).
13969 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
13970 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
13971 },
13972 },
13973 "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
13974 # basis throughout all the rows in the range. At least one of
13975 # row_properties or column_properties must be specified.
13976 # BandedRange.row_properties and BandedRange.column_properties are
13977 # set, the fill colors are applied to cells according to the following rules:
13978 #
13979 # * header_color and footer_color take priority over band colors.
13980 # * first_band_color takes priority over second_band_color.
13981 # * row_properties takes priority over column_properties.
13982 #
13983 # For example, the first row color takes priority over the first column
13984 # color, but the first column color takes priority over the second row color.
13985 # Similarly, the row header takes priority over the column header in the
13986 # top left cell, but the column header takes priority over the first row
13987 # color if the row header is not set.
13988 "secondBandColor": { # Represents a color in the RGBA color space. This representation is designed # The second color that is alternating. (Required)
13989 # for simplicity of conversion to/from color representations in various
13990 # languages over compactness; for example, the fields of this representation
13991 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
13992 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
13993 # method in iOS; and, with just a little work, it can be easily formatted into
13994 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
13995 #
13996 # Example (Java):
13997 #
13998 # import com.google.type.Color;
13999 #
14000 # // ...
14001 # public static java.awt.Color fromProto(Color protocolor) {
14002 # float alpha = protocolor.hasAlpha()
14003 # ? protocolor.getAlpha().getValue()
14004 # : 1.0;
14005 #
14006 # return new java.awt.Color(
14007 # protocolor.getRed(),
14008 # protocolor.getGreen(),
14009 # protocolor.getBlue(),
14010 # alpha);
14011 # }
14012 #
14013 # public static Color toProto(java.awt.Color color) {
14014 # float red = (float) color.getRed();
14015 # float green = (float) color.getGreen();
14016 # float blue = (float) color.getBlue();
14017 # float denominator = 255.0;
14018 # Color.Builder resultBuilder =
14019 # Color
14020 # .newBuilder()
14021 # .setRed(red / denominator)
14022 # .setGreen(green / denominator)
14023 # .setBlue(blue / denominator);
14024 # int alpha = color.getAlpha();
14025 # if (alpha != 255) {
14026 # result.setAlpha(
14027 # FloatValue
14028 # .newBuilder()
14029 # .setValue(((float) alpha) / denominator)
14030 # .build());
14031 # }
14032 # return resultBuilder.build();
14033 # }
14034 # // ...
14035 #
14036 # Example (iOS / Obj-C):
14037 #
14038 # // ...
14039 # static UIColor* fromProto(Color* protocolor) {
14040 # float red = [protocolor red];
14041 # float green = [protocolor green];
14042 # float blue = [protocolor blue];
14043 # FloatValue* alpha_wrapper = [protocolor alpha];
14044 # float alpha = 1.0;
14045 # if (alpha_wrapper != nil) {
14046 # alpha = [alpha_wrapper value];
14047 # }
14048 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14049 # }
14050 #
14051 # static Color* toProto(UIColor* color) {
14052 # CGFloat red, green, blue, alpha;
14053 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14054 # return nil;
14055 # }
14056 # Color* result = [Color alloc] init];
14057 # [result setRed:red];
14058 # [result setGreen:green];
14059 # [result setBlue:blue];
14060 # if (alpha <= 0.9999) {
14061 # [result setAlpha:floatWrapperWithValue(alpha)];
14062 # }
14063 # [result autorelease];
14064 # return result;
14065 # }
14066 # // ...
14067 #
14068 # Example (JavaScript):
14069 #
14070 # // ...
14071 #
14072 # var protoToCssColor = function(rgb_color) {
14073 # var redFrac = rgb_color.red || 0.0;
14074 # var greenFrac = rgb_color.green || 0.0;
14075 # var blueFrac = rgb_color.blue || 0.0;
14076 # var red = Math.floor(redFrac * 255);
14077 # var green = Math.floor(greenFrac * 255);
14078 # var blue = Math.floor(blueFrac * 255);
14079 #
14080 # if (!('alpha' in rgb_color)) {
14081 # return rgbToCssColor_(red, green, blue);
14082 # }
14083 #
14084 # var alphaFrac = rgb_color.alpha.value || 0.0;
14085 # var rgbParams = [red, green, blue].join(',');
14086 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14087 # };
14088 #
14089 # var rgbToCssColor_ = function(red, green, blue) {
14090 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14091 # var hexString = rgbNumber.toString(16);
14092 # var missingZeros = 6 - hexString.length;
14093 # var resultBuilder = ['#'];
14094 # for (var i = 0; i < missingZeros; i++) {
14095 # resultBuilder.push('0');
14096 # }
14097 # resultBuilder.push(hexString);
14098 # return resultBuilder.join('');
14099 # };
14100 #
14101 # // ...
14102 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14103 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14104 # the final pixel color is defined by the equation:
14105 #
14106 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14107 #
14108 # This means that a value of 1.0 corresponds to a solid color, whereas
14109 # a value of 0.0 corresponds to a completely transparent color. This
14110 # uses a wrapper message rather than a simple float scalar so that it is
14111 # possible to distinguish between a default value and the value being unset.
14112 # If omitted, this color object is to be rendered as a solid color
14113 # (as if the alpha value had been explicitly given with a value of 1.0).
14114 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14115 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14116 },
14117 "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
14118 # row or column will be filled with this color and the colors will
14119 # alternate between first_band_color and second_band_color starting
14120 # from the second row or column. Otherwise, the first row or column will be
14121 # filled with first_band_color and the colors will proceed to alternate
14122 # as they normally would.
14123 # for simplicity of conversion to/from color representations in various
14124 # languages over compactness; for example, the fields of this representation
14125 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14126 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14127 # method in iOS; and, with just a little work, it can be easily formatted into
14128 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14129 #
14130 # Example (Java):
14131 #
14132 # import com.google.type.Color;
14133 #
14134 # // ...
14135 # public static java.awt.Color fromProto(Color protocolor) {
14136 # float alpha = protocolor.hasAlpha()
14137 # ? protocolor.getAlpha().getValue()
14138 # : 1.0;
14139 #
14140 # return new java.awt.Color(
14141 # protocolor.getRed(),
14142 # protocolor.getGreen(),
14143 # protocolor.getBlue(),
14144 # alpha);
14145 # }
14146 #
14147 # public static Color toProto(java.awt.Color color) {
14148 # float red = (float) color.getRed();
14149 # float green = (float) color.getGreen();
14150 # float blue = (float) color.getBlue();
14151 # float denominator = 255.0;
14152 # Color.Builder resultBuilder =
14153 # Color
14154 # .newBuilder()
14155 # .setRed(red / denominator)
14156 # .setGreen(green / denominator)
14157 # .setBlue(blue / denominator);
14158 # int alpha = color.getAlpha();
14159 # if (alpha != 255) {
14160 # result.setAlpha(
14161 # FloatValue
14162 # .newBuilder()
14163 # .setValue(((float) alpha) / denominator)
14164 # .build());
14165 # }
14166 # return resultBuilder.build();
14167 # }
14168 # // ...
14169 #
14170 # Example (iOS / Obj-C):
14171 #
14172 # // ...
14173 # static UIColor* fromProto(Color* protocolor) {
14174 # float red = [protocolor red];
14175 # float green = [protocolor green];
14176 # float blue = [protocolor blue];
14177 # FloatValue* alpha_wrapper = [protocolor alpha];
14178 # float alpha = 1.0;
14179 # if (alpha_wrapper != nil) {
14180 # alpha = [alpha_wrapper value];
14181 # }
14182 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14183 # }
14184 #
14185 # static Color* toProto(UIColor* color) {
14186 # CGFloat red, green, blue, alpha;
14187 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14188 # return nil;
14189 # }
14190 # Color* result = [Color alloc] init];
14191 # [result setRed:red];
14192 # [result setGreen:green];
14193 # [result setBlue:blue];
14194 # if (alpha <= 0.9999) {
14195 # [result setAlpha:floatWrapperWithValue(alpha)];
14196 # }
14197 # [result autorelease];
14198 # return result;
14199 # }
14200 # // ...
14201 #
14202 # Example (JavaScript):
14203 #
14204 # // ...
14205 #
14206 # var protoToCssColor = function(rgb_color) {
14207 # var redFrac = rgb_color.red || 0.0;
14208 # var greenFrac = rgb_color.green || 0.0;
14209 # var blueFrac = rgb_color.blue || 0.0;
14210 # var red = Math.floor(redFrac * 255);
14211 # var green = Math.floor(greenFrac * 255);
14212 # var blue = Math.floor(blueFrac * 255);
14213 #
14214 # if (!('alpha' in rgb_color)) {
14215 # return rgbToCssColor_(red, green, blue);
14216 # }
14217 #
14218 # var alphaFrac = rgb_color.alpha.value || 0.0;
14219 # var rgbParams = [red, green, blue].join(',');
14220 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14221 # };
14222 #
14223 # var rgbToCssColor_ = function(red, green, blue) {
14224 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14225 # var hexString = rgbNumber.toString(16);
14226 # var missingZeros = 6 - hexString.length;
14227 # var resultBuilder = ['#'];
14228 # for (var i = 0; i < missingZeros; i++) {
14229 # resultBuilder.push('0');
14230 # }
14231 # resultBuilder.push(hexString);
14232 # return resultBuilder.join('');
14233 # };
14234 #
14235 # // ...
14236 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14237 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14238 # the final pixel color is defined by the equation:
14239 #
14240 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14241 #
14242 # This means that a value of 1.0 corresponds to a solid color, whereas
14243 # a value of 0.0 corresponds to a completely transparent color. This
14244 # uses a wrapper message rather than a simple float scalar so that it is
14245 # possible to distinguish between a default value and the value being unset.
14246 # If omitted, this color object is to be rendered as a solid color
14247 # (as if the alpha value had been explicitly given with a value of 1.0).
14248 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14249 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14250 },
14251 "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
14252 # row or column will be filled with either first_band_color or
14253 # second_band_color, depending on the color of the previous row or
14254 # column.
14255 # for simplicity of conversion to/from color representations in various
14256 # languages over compactness; for example, the fields of this representation
14257 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14258 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14259 # method in iOS; and, with just a little work, it can be easily formatted into
14260 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14261 #
14262 # Example (Java):
14263 #
14264 # import com.google.type.Color;
14265 #
14266 # // ...
14267 # public static java.awt.Color fromProto(Color protocolor) {
14268 # float alpha = protocolor.hasAlpha()
14269 # ? protocolor.getAlpha().getValue()
14270 # : 1.0;
14271 #
14272 # return new java.awt.Color(
14273 # protocolor.getRed(),
14274 # protocolor.getGreen(),
14275 # protocolor.getBlue(),
14276 # alpha);
14277 # }
14278 #
14279 # public static Color toProto(java.awt.Color color) {
14280 # float red = (float) color.getRed();
14281 # float green = (float) color.getGreen();
14282 # float blue = (float) color.getBlue();
14283 # float denominator = 255.0;
14284 # Color.Builder resultBuilder =
14285 # Color
14286 # .newBuilder()
14287 # .setRed(red / denominator)
14288 # .setGreen(green / denominator)
14289 # .setBlue(blue / denominator);
14290 # int alpha = color.getAlpha();
14291 # if (alpha != 255) {
14292 # result.setAlpha(
14293 # FloatValue
14294 # .newBuilder()
14295 # .setValue(((float) alpha) / denominator)
14296 # .build());
14297 # }
14298 # return resultBuilder.build();
14299 # }
14300 # // ...
14301 #
14302 # Example (iOS / Obj-C):
14303 #
14304 # // ...
14305 # static UIColor* fromProto(Color* protocolor) {
14306 # float red = [protocolor red];
14307 # float green = [protocolor green];
14308 # float blue = [protocolor blue];
14309 # FloatValue* alpha_wrapper = [protocolor alpha];
14310 # float alpha = 1.0;
14311 # if (alpha_wrapper != nil) {
14312 # alpha = [alpha_wrapper value];
14313 # }
14314 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14315 # }
14316 #
14317 # static Color* toProto(UIColor* color) {
14318 # CGFloat red, green, blue, alpha;
14319 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14320 # return nil;
14321 # }
14322 # Color* result = [Color alloc] init];
14323 # [result setRed:red];
14324 # [result setGreen:green];
14325 # [result setBlue:blue];
14326 # if (alpha <= 0.9999) {
14327 # [result setAlpha:floatWrapperWithValue(alpha)];
14328 # }
14329 # [result autorelease];
14330 # return result;
14331 # }
14332 # // ...
14333 #
14334 # Example (JavaScript):
14335 #
14336 # // ...
14337 #
14338 # var protoToCssColor = function(rgb_color) {
14339 # var redFrac = rgb_color.red || 0.0;
14340 # var greenFrac = rgb_color.green || 0.0;
14341 # var blueFrac = rgb_color.blue || 0.0;
14342 # var red = Math.floor(redFrac * 255);
14343 # var green = Math.floor(greenFrac * 255);
14344 # var blue = Math.floor(blueFrac * 255);
14345 #
14346 # if (!('alpha' in rgb_color)) {
14347 # return rgbToCssColor_(red, green, blue);
14348 # }
14349 #
14350 # var alphaFrac = rgb_color.alpha.value || 0.0;
14351 # var rgbParams = [red, green, blue].join(',');
14352 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14353 # };
14354 #
14355 # var rgbToCssColor_ = function(red, green, blue) {
14356 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14357 # var hexString = rgbNumber.toString(16);
14358 # var missingZeros = 6 - hexString.length;
14359 # var resultBuilder = ['#'];
14360 # for (var i = 0; i < missingZeros; i++) {
14361 # resultBuilder.push('0');
14362 # }
14363 # resultBuilder.push(hexString);
14364 # return resultBuilder.join('');
14365 # };
14366 #
14367 # // ...
14368 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14369 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14370 # the final pixel color is defined by the equation:
14371 #
14372 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14373 #
14374 # This means that a value of 1.0 corresponds to a solid color, whereas
14375 # a value of 0.0 corresponds to a completely transparent color. This
14376 # uses a wrapper message rather than a simple float scalar so that it is
14377 # possible to distinguish between a default value and the value being unset.
14378 # If omitted, this color object is to be rendered as a solid color
14379 # (as if the alpha value had been explicitly given with a value of 1.0).
14380 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14381 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14382 },
14383 "firstBandColor": { # Represents a color in the RGBA color space. This representation is designed # The first color that is alternating. (Required)
14384 # for simplicity of conversion to/from color representations in various
14385 # languages over compactness; for example, the fields of this representation
14386 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14387 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14388 # method in iOS; and, with just a little work, it can be easily formatted into
14389 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14390 #
14391 # Example (Java):
14392 #
14393 # import com.google.type.Color;
14394 #
14395 # // ...
14396 # public static java.awt.Color fromProto(Color protocolor) {
14397 # float alpha = protocolor.hasAlpha()
14398 # ? protocolor.getAlpha().getValue()
14399 # : 1.0;
14400 #
14401 # return new java.awt.Color(
14402 # protocolor.getRed(),
14403 # protocolor.getGreen(),
14404 # protocolor.getBlue(),
14405 # alpha);
14406 # }
14407 #
14408 # public static Color toProto(java.awt.Color color) {
14409 # float red = (float) color.getRed();
14410 # float green = (float) color.getGreen();
14411 # float blue = (float) color.getBlue();
14412 # float denominator = 255.0;
14413 # Color.Builder resultBuilder =
14414 # Color
14415 # .newBuilder()
14416 # .setRed(red / denominator)
14417 # .setGreen(green / denominator)
14418 # .setBlue(blue / denominator);
14419 # int alpha = color.getAlpha();
14420 # if (alpha != 255) {
14421 # result.setAlpha(
14422 # FloatValue
14423 # .newBuilder()
14424 # .setValue(((float) alpha) / denominator)
14425 # .build());
14426 # }
14427 # return resultBuilder.build();
14428 # }
14429 # // ...
14430 #
14431 # Example (iOS / Obj-C):
14432 #
14433 # // ...
14434 # static UIColor* fromProto(Color* protocolor) {
14435 # float red = [protocolor red];
14436 # float green = [protocolor green];
14437 # float blue = [protocolor blue];
14438 # FloatValue* alpha_wrapper = [protocolor alpha];
14439 # float alpha = 1.0;
14440 # if (alpha_wrapper != nil) {
14441 # alpha = [alpha_wrapper value];
14442 # }
14443 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14444 # }
14445 #
14446 # static Color* toProto(UIColor* color) {
14447 # CGFloat red, green, blue, alpha;
14448 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14449 # return nil;
14450 # }
14451 # Color* result = [Color alloc] init];
14452 # [result setRed:red];
14453 # [result setGreen:green];
14454 # [result setBlue:blue];
14455 # if (alpha <= 0.9999) {
14456 # [result setAlpha:floatWrapperWithValue(alpha)];
14457 # }
14458 # [result autorelease];
14459 # return result;
14460 # }
14461 # // ...
14462 #
14463 # Example (JavaScript):
14464 #
14465 # // ...
14466 #
14467 # var protoToCssColor = function(rgb_color) {
14468 # var redFrac = rgb_color.red || 0.0;
14469 # var greenFrac = rgb_color.green || 0.0;
14470 # var blueFrac = rgb_color.blue || 0.0;
14471 # var red = Math.floor(redFrac * 255);
14472 # var green = Math.floor(greenFrac * 255);
14473 # var blue = Math.floor(blueFrac * 255);
14474 #
14475 # if (!('alpha' in rgb_color)) {
14476 # return rgbToCssColor_(red, green, blue);
14477 # }
14478 #
14479 # var alphaFrac = rgb_color.alpha.value || 0.0;
14480 # var rgbParams = [red, green, blue].join(',');
14481 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14482 # };
14483 #
14484 # var rgbToCssColor_ = function(red, green, blue) {
14485 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14486 # var hexString = rgbNumber.toString(16);
14487 # var missingZeros = 6 - hexString.length;
14488 # var resultBuilder = ['#'];
14489 # for (var i = 0; i < missingZeros; i++) {
14490 # resultBuilder.push('0');
14491 # }
14492 # resultBuilder.push(hexString);
14493 # return resultBuilder.join('');
14494 # };
14495 #
14496 # // ...
14497 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14498 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14499 # the final pixel color is defined by the equation:
14500 #
14501 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14502 #
14503 # This means that a value of 1.0 corresponds to a solid color, whereas
14504 # a value of 0.0 corresponds to a completely transparent color. This
14505 # uses a wrapper message rather than a simple float scalar so that it is
14506 # possible to distinguish between a default value and the value being unset.
14507 # If omitted, this color object is to be rendered as a solid color
14508 # (as if the alpha value had been explicitly given with a value of 1.0).
14509 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14510 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14511 },
14512 },
14513 "bandedRangeId": 42, # The id of the banded range.
14514 },
14515 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014516 "deleteFilterView": { # Deletes a particular filter view. # Deletes a filter view from a sheet.
14517 "filterId": 42, # The ID of the filter to delete.
14518 },
14519 "mergeCells": { # Merges all cells in the range. # Merges cells together.
14520 "range": { # A range on a sheet. # The range of cells to merge.
14521 # All indexes are zero-based.
14522 # Indexes are half open, e.g the start index is inclusive
14523 # and the end index is exclusive -- [start_index, end_index).
14524 # Missing indexes indicate the range is unbounded on that side.
14525 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014526 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014527 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014528 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014529 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014530 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014531 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014532 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014533 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014534 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014535 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014536 # `Sheet1!A:B == sheet_id: 0,
14537 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014538 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014539 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014540 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014541 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014542 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014543 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014544 #
14545 # The start index must always be less than or equal to the end index.
14546 # If the start index equals the end index, then the range is empty.
14547 # Empty ranges are typically not meaningful and are usually rendered in the
14548 # UI as `#REF!`.
14549 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014550 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014551 "sheetId": 42, # The sheet this range is on.
14552 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014553 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014554 },
14555 "mergeType": "A String", # How the cells should be merged.
14556 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070014557 "deleteProtectedRange": { # Deletes the protected range with the given ID. # Deletes a protected range.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014558 "protectedRangeId": 42, # The ID of the protected range to delete.
14559 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014560 "insertRange": { # Inserts cells into a range, shifting the existing cells over or down. # Inserts new cells in a sheet, shifting the existing cells.
14561 "range": { # A range on a sheet. # The range to insert new cells into.
14562 # All indexes are zero-based.
14563 # Indexes are half open, e.g the start index is inclusive
14564 # and the end index is exclusive -- [start_index, end_index).
14565 # Missing indexes indicate the range is unbounded on that side.
14566 #
14567 # For example, if `"Sheet1"` is sheet ID 0, then:
14568 #
14569 # `Sheet1!A1:A1 == sheet_id: 0,
14570 # start_row_index: 0, end_row_index: 1,
14571 # start_column_index: 0, end_column_index: 1`
14572 #
14573 # `Sheet1!A3:B4 == sheet_id: 0,
14574 # start_row_index: 2, end_row_index: 4,
14575 # start_column_index: 0, end_column_index: 2`
14576 #
14577 # `Sheet1!A:B == sheet_id: 0,
14578 # start_column_index: 0, end_column_index: 2`
14579 #
14580 # `Sheet1!A5:B == sheet_id: 0,
14581 # start_row_index: 4,
14582 # start_column_index: 0, end_column_index: 2`
14583 #
14584 # `Sheet1 == sheet_id:0`
14585 #
14586 # The start index must always be less than or equal to the end index.
14587 # If the start index equals the end index, then the range is empty.
14588 # Empty ranges are typically not meaningful and are usually rendered in the
14589 # UI as `#REF!`.
14590 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
14591 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
14592 "sheetId": 42, # The sheet this range is on.
14593 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
14594 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014595 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040014596 "shiftDimension": "A String", # The dimension which will be shifted when inserting cells.
14597 # If ROWS, existing cells will be shifted down.
14598 # If COLUMNS, existing cells will be shifted right.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014599 },
14600 "deleteSheet": { # Deletes the requested sheet. # Deletes a sheet.
14601 "sheetId": 42, # The ID of the sheet to delete.
14602 },
14603 "updateBorders": { # Updates the borders of a range. # Updates the borders in a range of cells.
14604 # If a field is not set in the request, that means the border remains as-is.
14605 # For example, with two subsequent UpdateBordersRequest:
14606 #
14607 # 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
14608 # 2. range: A1:A5 `{ left: BLUE }`
14609 #
14610 # That would result in A1:A5 having a borders of
14611 # `{ top: RED, bottom: WHITE, left: BLUE }`.
14612 # If you want to clear a border, explicitly set the style to
14613 # NONE.
14614 "right": { # A border along a cell. # The border to put at the right of the range.
14615 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14616 # for simplicity of conversion to/from color representations in various
14617 # languages over compactness; for example, the fields of this representation
14618 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14619 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14620 # method in iOS; and, with just a little work, it can be easily formatted into
14621 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14622 #
14623 # Example (Java):
14624 #
14625 # import com.google.type.Color;
14626 #
14627 # // ...
14628 # public static java.awt.Color fromProto(Color protocolor) {
14629 # float alpha = protocolor.hasAlpha()
14630 # ? protocolor.getAlpha().getValue()
14631 # : 1.0;
14632 #
14633 # return new java.awt.Color(
14634 # protocolor.getRed(),
14635 # protocolor.getGreen(),
14636 # protocolor.getBlue(),
14637 # alpha);
14638 # }
14639 #
14640 # public static Color toProto(java.awt.Color color) {
14641 # float red = (float) color.getRed();
14642 # float green = (float) color.getGreen();
14643 # float blue = (float) color.getBlue();
14644 # float denominator = 255.0;
14645 # Color.Builder resultBuilder =
14646 # Color
14647 # .newBuilder()
14648 # .setRed(red / denominator)
14649 # .setGreen(green / denominator)
14650 # .setBlue(blue / denominator);
14651 # int alpha = color.getAlpha();
14652 # if (alpha != 255) {
14653 # result.setAlpha(
14654 # FloatValue
14655 # .newBuilder()
14656 # .setValue(((float) alpha) / denominator)
14657 # .build());
14658 # }
14659 # return resultBuilder.build();
14660 # }
14661 # // ...
14662 #
14663 # Example (iOS / Obj-C):
14664 #
14665 # // ...
14666 # static UIColor* fromProto(Color* protocolor) {
14667 # float red = [protocolor red];
14668 # float green = [protocolor green];
14669 # float blue = [protocolor blue];
14670 # FloatValue* alpha_wrapper = [protocolor alpha];
14671 # float alpha = 1.0;
14672 # if (alpha_wrapper != nil) {
14673 # alpha = [alpha_wrapper value];
14674 # }
14675 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14676 # }
14677 #
14678 # static Color* toProto(UIColor* color) {
14679 # CGFloat red, green, blue, alpha;
14680 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14681 # return nil;
14682 # }
14683 # Color* result = [Color alloc] init];
14684 # [result setRed:red];
14685 # [result setGreen:green];
14686 # [result setBlue:blue];
14687 # if (alpha <= 0.9999) {
14688 # [result setAlpha:floatWrapperWithValue(alpha)];
14689 # }
14690 # [result autorelease];
14691 # return result;
14692 # }
14693 # // ...
14694 #
14695 # Example (JavaScript):
14696 #
14697 # // ...
14698 #
14699 # var protoToCssColor = function(rgb_color) {
14700 # var redFrac = rgb_color.red || 0.0;
14701 # var greenFrac = rgb_color.green || 0.0;
14702 # var blueFrac = rgb_color.blue || 0.0;
14703 # var red = Math.floor(redFrac * 255);
14704 # var green = Math.floor(greenFrac * 255);
14705 # var blue = Math.floor(blueFrac * 255);
14706 #
14707 # if (!('alpha' in rgb_color)) {
14708 # return rgbToCssColor_(red, green, blue);
14709 # }
14710 #
14711 # var alphaFrac = rgb_color.alpha.value || 0.0;
14712 # var rgbParams = [red, green, blue].join(',');
14713 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14714 # };
14715 #
14716 # var rgbToCssColor_ = function(red, green, blue) {
14717 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14718 # var hexString = rgbNumber.toString(16);
14719 # var missingZeros = 6 - hexString.length;
14720 # var resultBuilder = ['#'];
14721 # for (var i = 0; i < missingZeros; i++) {
14722 # resultBuilder.push('0');
14723 # }
14724 # resultBuilder.push(hexString);
14725 # return resultBuilder.join('');
14726 # };
14727 #
14728 # // ...
14729 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14730 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14731 # the final pixel color is defined by the equation:
14732 #
14733 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14734 #
14735 # This means that a value of 1.0 corresponds to a solid color, whereas
14736 # a value of 0.0 corresponds to a completely transparent color. This
14737 # uses a wrapper message rather than a simple float scalar so that it is
14738 # possible to distinguish between a default value and the value being unset.
14739 # If omitted, this color object is to be rendered as a solid color
14740 # (as if the alpha value had been explicitly given with a value of 1.0).
14741 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14742 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14743 },
14744 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014745 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014746 "style": "A String", # The style of the border.
14747 },
14748 "bottom": { # A border along a cell. # The border to put at the bottom of the range.
14749 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14750 # for simplicity of conversion to/from color representations in various
14751 # languages over compactness; for example, the fields of this representation
14752 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14753 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14754 # method in iOS; and, with just a little work, it can be easily formatted into
14755 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14756 #
14757 # Example (Java):
14758 #
14759 # import com.google.type.Color;
14760 #
14761 # // ...
14762 # public static java.awt.Color fromProto(Color protocolor) {
14763 # float alpha = protocolor.hasAlpha()
14764 # ? protocolor.getAlpha().getValue()
14765 # : 1.0;
14766 #
14767 # return new java.awt.Color(
14768 # protocolor.getRed(),
14769 # protocolor.getGreen(),
14770 # protocolor.getBlue(),
14771 # alpha);
14772 # }
14773 #
14774 # public static Color toProto(java.awt.Color color) {
14775 # float red = (float) color.getRed();
14776 # float green = (float) color.getGreen();
14777 # float blue = (float) color.getBlue();
14778 # float denominator = 255.0;
14779 # Color.Builder resultBuilder =
14780 # Color
14781 # .newBuilder()
14782 # .setRed(red / denominator)
14783 # .setGreen(green / denominator)
14784 # .setBlue(blue / denominator);
14785 # int alpha = color.getAlpha();
14786 # if (alpha != 255) {
14787 # result.setAlpha(
14788 # FloatValue
14789 # .newBuilder()
14790 # .setValue(((float) alpha) / denominator)
14791 # .build());
14792 # }
14793 # return resultBuilder.build();
14794 # }
14795 # // ...
14796 #
14797 # Example (iOS / Obj-C):
14798 #
14799 # // ...
14800 # static UIColor* fromProto(Color* protocolor) {
14801 # float red = [protocolor red];
14802 # float green = [protocolor green];
14803 # float blue = [protocolor blue];
14804 # FloatValue* alpha_wrapper = [protocolor alpha];
14805 # float alpha = 1.0;
14806 # if (alpha_wrapper != nil) {
14807 # alpha = [alpha_wrapper value];
14808 # }
14809 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14810 # }
14811 #
14812 # static Color* toProto(UIColor* color) {
14813 # CGFloat red, green, blue, alpha;
14814 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14815 # return nil;
14816 # }
14817 # Color* result = [Color alloc] init];
14818 # [result setRed:red];
14819 # [result setGreen:green];
14820 # [result setBlue:blue];
14821 # if (alpha <= 0.9999) {
14822 # [result setAlpha:floatWrapperWithValue(alpha)];
14823 # }
14824 # [result autorelease];
14825 # return result;
14826 # }
14827 # // ...
14828 #
14829 # Example (JavaScript):
14830 #
14831 # // ...
14832 #
14833 # var protoToCssColor = function(rgb_color) {
14834 # var redFrac = rgb_color.red || 0.0;
14835 # var greenFrac = rgb_color.green || 0.0;
14836 # var blueFrac = rgb_color.blue || 0.0;
14837 # var red = Math.floor(redFrac * 255);
14838 # var green = Math.floor(greenFrac * 255);
14839 # var blue = Math.floor(blueFrac * 255);
14840 #
14841 # if (!('alpha' in rgb_color)) {
14842 # return rgbToCssColor_(red, green, blue);
14843 # }
14844 #
14845 # var alphaFrac = rgb_color.alpha.value || 0.0;
14846 # var rgbParams = [red, green, blue].join(',');
14847 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14848 # };
14849 #
14850 # var rgbToCssColor_ = function(red, green, blue) {
14851 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14852 # var hexString = rgbNumber.toString(16);
14853 # var missingZeros = 6 - hexString.length;
14854 # var resultBuilder = ['#'];
14855 # for (var i = 0; i < missingZeros; i++) {
14856 # resultBuilder.push('0');
14857 # }
14858 # resultBuilder.push(hexString);
14859 # return resultBuilder.join('');
14860 # };
14861 #
14862 # // ...
14863 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14864 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14865 # the final pixel color is defined by the equation:
14866 #
14867 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
14868 #
14869 # This means that a value of 1.0 corresponds to a solid color, whereas
14870 # a value of 0.0 corresponds to a completely transparent color. This
14871 # uses a wrapper message rather than a simple float scalar so that it is
14872 # possible to distinguish between a default value and the value being unset.
14873 # If omitted, this color object is to be rendered as a solid color
14874 # (as if the alpha value had been explicitly given with a value of 1.0).
14875 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
14876 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
14877 },
14878 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070014879 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070014880 "style": "A String", # The style of the border.
14881 },
14882 "top": { # A border along a cell. # The border to put at the top of the range.
14883 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
14884 # for simplicity of conversion to/from color representations in various
14885 # languages over compactness; for example, the fields of this representation
14886 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
14887 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
14888 # method in iOS; and, with just a little work, it can be easily formatted into
14889 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
14890 #
14891 # Example (Java):
14892 #
14893 # import com.google.type.Color;
14894 #
14895 # // ...
14896 # public static java.awt.Color fromProto(Color protocolor) {
14897 # float alpha = protocolor.hasAlpha()
14898 # ? protocolor.getAlpha().getValue()
14899 # : 1.0;
14900 #
14901 # return new java.awt.Color(
14902 # protocolor.getRed(),
14903 # protocolor.getGreen(),
14904 # protocolor.getBlue(),
14905 # alpha);
14906 # }
14907 #
14908 # public static Color toProto(java.awt.Color color) {
14909 # float red = (float) color.getRed();
14910 # float green = (float) color.getGreen();
14911 # float blue = (float) color.getBlue();
14912 # float denominator = 255.0;
14913 # Color.Builder resultBuilder =
14914 # Color
14915 # .newBuilder()
14916 # .setRed(red / denominator)
14917 # .setGreen(green / denominator)
14918 # .setBlue(blue / denominator);
14919 # int alpha = color.getAlpha();
14920 # if (alpha != 255) {
14921 # result.setAlpha(
14922 # FloatValue
14923 # .newBuilder()
14924 # .setValue(((float) alpha) / denominator)
14925 # .build());
14926 # }
14927 # return resultBuilder.build();
14928 # }
14929 # // ...
14930 #
14931 # Example (iOS / Obj-C):
14932 #
14933 # // ...
14934 # static UIColor* fromProto(Color* protocolor) {
14935 # float red = [protocolor red];
14936 # float green = [protocolor green];
14937 # float blue = [protocolor blue];
14938 # FloatValue* alpha_wrapper = [protocolor alpha];
14939 # float alpha = 1.0;
14940 # if (alpha_wrapper != nil) {
14941 # alpha = [alpha_wrapper value];
14942 # }
14943 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
14944 # }
14945 #
14946 # static Color* toProto(UIColor* color) {
14947 # CGFloat red, green, blue, alpha;
14948 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
14949 # return nil;
14950 # }
14951 # Color* result = [Color alloc] init];
14952 # [result setRed:red];
14953 # [result setGreen:green];
14954 # [result setBlue:blue];
14955 # if (alpha <= 0.9999) {
14956 # [result setAlpha:floatWrapperWithValue(alpha)];
14957 # }
14958 # [result autorelease];
14959 # return result;
14960 # }
14961 # // ...
14962 #
14963 # Example (JavaScript):
14964 #
14965 # // ...
14966 #
14967 # var protoToCssColor = function(rgb_color) {
14968 # var redFrac = rgb_color.red || 0.0;
14969 # var greenFrac = rgb_color.green || 0.0;
14970 # var blueFrac = rgb_color.blue || 0.0;
14971 # var red = Math.floor(redFrac * 255);
14972 # var green = Math.floor(greenFrac * 255);
14973 # var blue = Math.floor(blueFrac * 255);
14974 #
14975 # if (!('alpha' in rgb_color)) {
14976 # return rgbToCssColor_(red, green, blue);
14977 # }
14978 #
14979 # var alphaFrac = rgb_color.alpha.value || 0.0;
14980 # var rgbParams = [red, green, blue].join(',');
14981 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
14982 # };
14983 #
14984 # var rgbToCssColor_ = function(red, green, blue) {
14985 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
14986 # var hexString = rgbNumber.toString(16);
14987 # var missingZeros = 6 - hexString.length;
14988 # var resultBuilder = ['#'];
14989 # for (var i = 0; i < missingZeros; i++) {
14990 # resultBuilder.push('0');
14991 # }
14992 # resultBuilder.push(hexString);
14993 # return resultBuilder.join('');
14994 # };
14995 #
14996 # // ...
14997 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
14998 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
14999 # the final pixel color is defined by the equation:
15000 #
15001 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15002 #
15003 # This means that a value of 1.0 corresponds to a solid color, whereas
15004 # a value of 0.0 corresponds to a completely transparent color. This
15005 # uses a wrapper message rather than a simple float scalar so that it is
15006 # possible to distinguish between a default value and the value being unset.
15007 # If omitted, this color object is to be rendered as a solid color
15008 # (as if the alpha value had been explicitly given with a value of 1.0).
15009 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15010 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15011 },
15012 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015013 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015014 "style": "A String", # The style of the border.
15015 },
15016 "innerHorizontal": { # A border along a cell. # The horizontal border to put within the range.
15017 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15018 # for simplicity of conversion to/from color representations in various
15019 # languages over compactness; for example, the fields of this representation
15020 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15021 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15022 # method in iOS; and, with just a little work, it can be easily formatted into
15023 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15024 #
15025 # Example (Java):
15026 #
15027 # import com.google.type.Color;
15028 #
15029 # // ...
15030 # public static java.awt.Color fromProto(Color protocolor) {
15031 # float alpha = protocolor.hasAlpha()
15032 # ? protocolor.getAlpha().getValue()
15033 # : 1.0;
15034 #
15035 # return new java.awt.Color(
15036 # protocolor.getRed(),
15037 # protocolor.getGreen(),
15038 # protocolor.getBlue(),
15039 # alpha);
15040 # }
15041 #
15042 # public static Color toProto(java.awt.Color color) {
15043 # float red = (float) color.getRed();
15044 # float green = (float) color.getGreen();
15045 # float blue = (float) color.getBlue();
15046 # float denominator = 255.0;
15047 # Color.Builder resultBuilder =
15048 # Color
15049 # .newBuilder()
15050 # .setRed(red / denominator)
15051 # .setGreen(green / denominator)
15052 # .setBlue(blue / denominator);
15053 # int alpha = color.getAlpha();
15054 # if (alpha != 255) {
15055 # result.setAlpha(
15056 # FloatValue
15057 # .newBuilder()
15058 # .setValue(((float) alpha) / denominator)
15059 # .build());
15060 # }
15061 # return resultBuilder.build();
15062 # }
15063 # // ...
15064 #
15065 # Example (iOS / Obj-C):
15066 #
15067 # // ...
15068 # static UIColor* fromProto(Color* protocolor) {
15069 # float red = [protocolor red];
15070 # float green = [protocolor green];
15071 # float blue = [protocolor blue];
15072 # FloatValue* alpha_wrapper = [protocolor alpha];
15073 # float alpha = 1.0;
15074 # if (alpha_wrapper != nil) {
15075 # alpha = [alpha_wrapper value];
15076 # }
15077 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15078 # }
15079 #
15080 # static Color* toProto(UIColor* color) {
15081 # CGFloat red, green, blue, alpha;
15082 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15083 # return nil;
15084 # }
15085 # Color* result = [Color alloc] init];
15086 # [result setRed:red];
15087 # [result setGreen:green];
15088 # [result setBlue:blue];
15089 # if (alpha <= 0.9999) {
15090 # [result setAlpha:floatWrapperWithValue(alpha)];
15091 # }
15092 # [result autorelease];
15093 # return result;
15094 # }
15095 # // ...
15096 #
15097 # Example (JavaScript):
15098 #
15099 # // ...
15100 #
15101 # var protoToCssColor = function(rgb_color) {
15102 # var redFrac = rgb_color.red || 0.0;
15103 # var greenFrac = rgb_color.green || 0.0;
15104 # var blueFrac = rgb_color.blue || 0.0;
15105 # var red = Math.floor(redFrac * 255);
15106 # var green = Math.floor(greenFrac * 255);
15107 # var blue = Math.floor(blueFrac * 255);
15108 #
15109 # if (!('alpha' in rgb_color)) {
15110 # return rgbToCssColor_(red, green, blue);
15111 # }
15112 #
15113 # var alphaFrac = rgb_color.alpha.value || 0.0;
15114 # var rgbParams = [red, green, blue].join(',');
15115 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15116 # };
15117 #
15118 # var rgbToCssColor_ = function(red, green, blue) {
15119 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15120 # var hexString = rgbNumber.toString(16);
15121 # var missingZeros = 6 - hexString.length;
15122 # var resultBuilder = ['#'];
15123 # for (var i = 0; i < missingZeros; i++) {
15124 # resultBuilder.push('0');
15125 # }
15126 # resultBuilder.push(hexString);
15127 # return resultBuilder.join('');
15128 # };
15129 #
15130 # // ...
15131 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15132 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15133 # the final pixel color is defined by the equation:
15134 #
15135 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15136 #
15137 # This means that a value of 1.0 corresponds to a solid color, whereas
15138 # a value of 0.0 corresponds to a completely transparent color. This
15139 # uses a wrapper message rather than a simple float scalar so that it is
15140 # possible to distinguish between a default value and the value being unset.
15141 # If omitted, this color object is to be rendered as a solid color
15142 # (as if the alpha value had been explicitly given with a value of 1.0).
15143 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15144 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15145 },
15146 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015147 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015148 "style": "A String", # The style of the border.
15149 },
15150 "range": { # A range on a sheet. # The range whose borders should be updated.
15151 # All indexes are zero-based.
15152 # Indexes are half open, e.g the start index is inclusive
15153 # and the end index is exclusive -- [start_index, end_index).
15154 # Missing indexes indicate the range is unbounded on that side.
15155 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015156 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015158 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015159 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015160 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015161 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015162 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015163 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015164 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015165 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015166 # `Sheet1!A:B == sheet_id: 0,
15167 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015168 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015169 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015170 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015171 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015172 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015173 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015174 #
15175 # The start index must always be less than or equal to the end index.
15176 # If the start index equals the end index, then the range is empty.
15177 # Empty ranges are typically not meaningful and are usually rendered in the
15178 # UI as `#REF!`.
15179 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015180 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015181 "sheetId": 42, # The sheet this range is on.
15182 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015183 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015184 },
15185 "innerVertical": { # A border along a cell. # The vertical border to put within the range.
15186 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15187 # for simplicity of conversion to/from color representations in various
15188 # languages over compactness; for example, the fields of this representation
15189 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15190 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15191 # method in iOS; and, with just a little work, it can be easily formatted into
15192 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15193 #
15194 # Example (Java):
15195 #
15196 # import com.google.type.Color;
15197 #
15198 # // ...
15199 # public static java.awt.Color fromProto(Color protocolor) {
15200 # float alpha = protocolor.hasAlpha()
15201 # ? protocolor.getAlpha().getValue()
15202 # : 1.0;
15203 #
15204 # return new java.awt.Color(
15205 # protocolor.getRed(),
15206 # protocolor.getGreen(),
15207 # protocolor.getBlue(),
15208 # alpha);
15209 # }
15210 #
15211 # public static Color toProto(java.awt.Color color) {
15212 # float red = (float) color.getRed();
15213 # float green = (float) color.getGreen();
15214 # float blue = (float) color.getBlue();
15215 # float denominator = 255.0;
15216 # Color.Builder resultBuilder =
15217 # Color
15218 # .newBuilder()
15219 # .setRed(red / denominator)
15220 # .setGreen(green / denominator)
15221 # .setBlue(blue / denominator);
15222 # int alpha = color.getAlpha();
15223 # if (alpha != 255) {
15224 # result.setAlpha(
15225 # FloatValue
15226 # .newBuilder()
15227 # .setValue(((float) alpha) / denominator)
15228 # .build());
15229 # }
15230 # return resultBuilder.build();
15231 # }
15232 # // ...
15233 #
15234 # Example (iOS / Obj-C):
15235 #
15236 # // ...
15237 # static UIColor* fromProto(Color* protocolor) {
15238 # float red = [protocolor red];
15239 # float green = [protocolor green];
15240 # float blue = [protocolor blue];
15241 # FloatValue* alpha_wrapper = [protocolor alpha];
15242 # float alpha = 1.0;
15243 # if (alpha_wrapper != nil) {
15244 # alpha = [alpha_wrapper value];
15245 # }
15246 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15247 # }
15248 #
15249 # static Color* toProto(UIColor* color) {
15250 # CGFloat red, green, blue, alpha;
15251 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15252 # return nil;
15253 # }
15254 # Color* result = [Color alloc] init];
15255 # [result setRed:red];
15256 # [result setGreen:green];
15257 # [result setBlue:blue];
15258 # if (alpha <= 0.9999) {
15259 # [result setAlpha:floatWrapperWithValue(alpha)];
15260 # }
15261 # [result autorelease];
15262 # return result;
15263 # }
15264 # // ...
15265 #
15266 # Example (JavaScript):
15267 #
15268 # // ...
15269 #
15270 # var protoToCssColor = function(rgb_color) {
15271 # var redFrac = rgb_color.red || 0.0;
15272 # var greenFrac = rgb_color.green || 0.0;
15273 # var blueFrac = rgb_color.blue || 0.0;
15274 # var red = Math.floor(redFrac * 255);
15275 # var green = Math.floor(greenFrac * 255);
15276 # var blue = Math.floor(blueFrac * 255);
15277 #
15278 # if (!('alpha' in rgb_color)) {
15279 # return rgbToCssColor_(red, green, blue);
15280 # }
15281 #
15282 # var alphaFrac = rgb_color.alpha.value || 0.0;
15283 # var rgbParams = [red, green, blue].join(',');
15284 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15285 # };
15286 #
15287 # var rgbToCssColor_ = function(red, green, blue) {
15288 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15289 # var hexString = rgbNumber.toString(16);
15290 # var missingZeros = 6 - hexString.length;
15291 # var resultBuilder = ['#'];
15292 # for (var i = 0; i < missingZeros; i++) {
15293 # resultBuilder.push('0');
15294 # }
15295 # resultBuilder.push(hexString);
15296 # return resultBuilder.join('');
15297 # };
15298 #
15299 # // ...
15300 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15301 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15302 # the final pixel color is defined by the equation:
15303 #
15304 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15305 #
15306 # This means that a value of 1.0 corresponds to a solid color, whereas
15307 # a value of 0.0 corresponds to a completely transparent color. This
15308 # uses a wrapper message rather than a simple float scalar so that it is
15309 # possible to distinguish between a default value and the value being unset.
15310 # If omitted, this color object is to be rendered as a solid color
15311 # (as if the alpha value had been explicitly given with a value of 1.0).
15312 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15313 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15314 },
15315 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015316 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015317 "style": "A String", # The style of the border.
15318 },
15319 "left": { # A border along a cell. # The border to put at the left of the range.
15320 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
15321 # for simplicity of conversion to/from color representations in various
15322 # languages over compactness; for example, the fields of this representation
15323 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15324 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15325 # method in iOS; and, with just a little work, it can be easily formatted into
15326 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15327 #
15328 # Example (Java):
15329 #
15330 # import com.google.type.Color;
15331 #
15332 # // ...
15333 # public static java.awt.Color fromProto(Color protocolor) {
15334 # float alpha = protocolor.hasAlpha()
15335 # ? protocolor.getAlpha().getValue()
15336 # : 1.0;
15337 #
15338 # return new java.awt.Color(
15339 # protocolor.getRed(),
15340 # protocolor.getGreen(),
15341 # protocolor.getBlue(),
15342 # alpha);
15343 # }
15344 #
15345 # public static Color toProto(java.awt.Color color) {
15346 # float red = (float) color.getRed();
15347 # float green = (float) color.getGreen();
15348 # float blue = (float) color.getBlue();
15349 # float denominator = 255.0;
15350 # Color.Builder resultBuilder =
15351 # Color
15352 # .newBuilder()
15353 # .setRed(red / denominator)
15354 # .setGreen(green / denominator)
15355 # .setBlue(blue / denominator);
15356 # int alpha = color.getAlpha();
15357 # if (alpha != 255) {
15358 # result.setAlpha(
15359 # FloatValue
15360 # .newBuilder()
15361 # .setValue(((float) alpha) / denominator)
15362 # .build());
15363 # }
15364 # return resultBuilder.build();
15365 # }
15366 # // ...
15367 #
15368 # Example (iOS / Obj-C):
15369 #
15370 # // ...
15371 # static UIColor* fromProto(Color* protocolor) {
15372 # float red = [protocolor red];
15373 # float green = [protocolor green];
15374 # float blue = [protocolor blue];
15375 # FloatValue* alpha_wrapper = [protocolor alpha];
15376 # float alpha = 1.0;
15377 # if (alpha_wrapper != nil) {
15378 # alpha = [alpha_wrapper value];
15379 # }
15380 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15381 # }
15382 #
15383 # static Color* toProto(UIColor* color) {
15384 # CGFloat red, green, blue, alpha;
15385 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15386 # return nil;
15387 # }
15388 # Color* result = [Color alloc] init];
15389 # [result setRed:red];
15390 # [result setGreen:green];
15391 # [result setBlue:blue];
15392 # if (alpha <= 0.9999) {
15393 # [result setAlpha:floatWrapperWithValue(alpha)];
15394 # }
15395 # [result autorelease];
15396 # return result;
15397 # }
15398 # // ...
15399 #
15400 # Example (JavaScript):
15401 #
15402 # // ...
15403 #
15404 # var protoToCssColor = function(rgb_color) {
15405 # var redFrac = rgb_color.red || 0.0;
15406 # var greenFrac = rgb_color.green || 0.0;
15407 # var blueFrac = rgb_color.blue || 0.0;
15408 # var red = Math.floor(redFrac * 255);
15409 # var green = Math.floor(greenFrac * 255);
15410 # var blue = Math.floor(blueFrac * 255);
15411 #
15412 # if (!('alpha' in rgb_color)) {
15413 # return rgbToCssColor_(red, green, blue);
15414 # }
15415 #
15416 # var alphaFrac = rgb_color.alpha.value || 0.0;
15417 # var rgbParams = [red, green, blue].join(',');
15418 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15419 # };
15420 #
15421 # var rgbToCssColor_ = function(red, green, blue) {
15422 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15423 # var hexString = rgbNumber.toString(16);
15424 # var missingZeros = 6 - hexString.length;
15425 # var resultBuilder = ['#'];
15426 # for (var i = 0; i < missingZeros; i++) {
15427 # resultBuilder.push('0');
15428 # }
15429 # resultBuilder.push(hexString);
15430 # return resultBuilder.join('');
15431 # };
15432 #
15433 # // ...
15434 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15435 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15436 # the final pixel color is defined by the equation:
15437 #
15438 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15439 #
15440 # This means that a value of 1.0 corresponds to a solid color, whereas
15441 # a value of 0.0 corresponds to a completely transparent color. This
15442 # uses a wrapper message rather than a simple float scalar so that it is
15443 # possible to distinguish between a default value and the value being unset.
15444 # If omitted, this color object is to be rendered as a solid color
15445 # (as if the alpha value had been explicitly given with a value of 1.0).
15446 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15447 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15448 },
15449 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070015450 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015451 "style": "A String", # The style of the border.
15452 },
15453 },
15454 "cutPaste": { # Moves data from the source to the destination. # Cuts data from one area and pastes it to another.
15455 "pasteType": "A String", # What kind of data to paste. All the source data will be cut, regardless
15456 # of what is pasted.
15457 "source": { # A range on a sheet. # The source data to cut.
15458 # All indexes are zero-based.
15459 # Indexes are half open, e.g the start index is inclusive
15460 # and the end index is exclusive -- [start_index, end_index).
15461 # Missing indexes indicate the range is unbounded on that side.
15462 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015463 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015464 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015465 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015466 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015467 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015468 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015469 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015470 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015471 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015472 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015473 # `Sheet1!A:B == sheet_id: 0,
15474 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015475 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015476 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015477 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015478 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015479 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015480 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015481 #
15482 # The start index must always be less than or equal to the end index.
15483 # If the start index equals the end index, then the range is empty.
15484 # Empty ranges are typically not meaningful and are usually rendered in the
15485 # UI as `#REF!`.
15486 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015487 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015488 "sheetId": 42, # The sheet this range is on.
15489 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015490 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015491 },
15492 "destination": { # A coordinate in a sheet. # The top-left coordinate where the data should be pasted.
15493 # All indexes are zero-based.
15494 "rowIndex": 42, # The row index of the coordinate.
15495 "columnIndex": 42, # The column index of the coordinate.
15496 "sheetId": 42, # The sheet this coordinate is on.
15497 },
15498 },
15499 "copyPaste": { # Copies data from the source to the destination. # Copies data from one area and pastes it to another.
15500 "pasteType": "A String", # What kind of data to paste.
15501 "source": { # A range on a sheet. # The source range to copy.
15502 # All indexes are zero-based.
15503 # Indexes are half open, e.g the start index is inclusive
15504 # and the end index is exclusive -- [start_index, end_index).
15505 # Missing indexes indicate the range is unbounded on that side.
15506 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015507 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015508 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015509 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015510 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015511 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015512 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015513 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015514 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015515 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015516 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015517 # `Sheet1!A:B == sheet_id: 0,
15518 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015519 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015520 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015521 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015522 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015523 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015524 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015525 #
15526 # The start index must always be less than or equal to the end index.
15527 # If the start index equals the end index, then the range is empty.
15528 # Empty ranges are typically not meaningful and are usually rendered in the
15529 # UI as `#REF!`.
15530 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015531 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015532 "sheetId": 42, # The sheet this range is on.
15533 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015534 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015535 },
15536 "destination": { # A range on a sheet. # The location to paste to. If the range covers a span that's
15537 # a multiple of the source's height or width, then the
15538 # data will be repeated to fill in the destination range.
15539 # If the range is smaller than the source range, the entire
15540 # source data will still be copied (beyond the end of the destination range).
15541 # All indexes are zero-based.
15542 # Indexes are half open, e.g the start index is inclusive
15543 # and the end index is exclusive -- [start_index, end_index).
15544 # Missing indexes indicate the range is unbounded on that side.
15545 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015546 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015547 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015548 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015549 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015550 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015551 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015552 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015553 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015554 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015555 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015556 # `Sheet1!A:B == sheet_id: 0,
15557 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015558 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015559 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015560 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015561 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015562 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015563 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015564 #
15565 # The start index must always be less than or equal to the end index.
15566 # If the start index equals the end index, then the range is empty.
15567 # Empty ranges are typically not meaningful and are usually rendered in the
15568 # UI as `#REF!`.
15569 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015570 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015571 "sheetId": 42, # The sheet this range is on.
15572 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015573 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015574 },
15575 "pasteOrientation": "A String", # How that data should be oriented when pasting.
15576 },
15577 "addSheet": { # Adds a new sheet. # Adds a sheet.
15578 # When a sheet is added at a given index,
15579 # all subsequent sheets' indexes are incremented.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015580 # To add an object sheet, use AddChartRequest instead and specify
15581 # EmbeddedObjectPosition.sheetId or
15582 # EmbeddedObjectPosition.newSheet.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015583 "properties": { # Properties of a sheet. # The properties the new sheet should have.
15584 # All properties are optional.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015585 # The sheetId field is optional; if one is not
15586 # set, an id will be randomly generated. (It is an error to specify the ID
15587 # of a sheet that already exists.)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015588 "sheetType": "A String", # The type of sheet. Defaults to GRID.
15589 # This field cannot be changed once set.
15590 "index": 42, # The index of the sheet within the spreadsheet.
15591 # When adding or updating sheet properties, if this field
15592 # is excluded then the sheet will be added or moved to the end
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015593 # of the sheet list. When updating sheet indices or inserting
15594 # sheets, movement is considered in "before the move" indexes.
15595 # For example, if there were 3 sheets (S1, S2, S3) in order to
15596 # move S1 ahead of S2 the index would have to be set to 2. A sheet
15597 # index update request will be ignored if the requested index is
15598 # identical to the sheets current index or if the requested new
15599 # index is equal to the current sheet index + 1.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015600 "title": "A String", # The name of the sheet.
15601 "gridProperties": { # Properties of a grid. # Additional properties of the sheet if this sheet is a grid.
15602 # (If the sheet is an object sheet, containing a chart or image, then
15603 # this field will be absent.)
15604 # When writing it is an error to set any grid properties on non-grid sheets.
15605 "columnCount": 42, # The number of columns in the grid.
15606 "rowCount": 42, # The number of rows in the grid.
15607 "frozenColumnCount": 42, # The number of columns that are frozen in the grid.
15608 "hideGridlines": True or False, # True if the grid isn't showing gridlines in the UI.
15609 "frozenRowCount": 42, # The number of rows that are frozen in the grid.
15610 },
15611 "rightToLeft": True or False, # True if the sheet is an RTL sheet instead of an LTR sheet.
15612 "tabColor": { # Represents a color in the RGBA color space. This representation is designed # The color of the tab in the UI.
15613 # for simplicity of conversion to/from color representations in various
15614 # languages over compactness; for example, the fields of this representation
15615 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
15616 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
15617 # method in iOS; and, with just a little work, it can be easily formatted into
15618 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
15619 #
15620 # Example (Java):
15621 #
15622 # import com.google.type.Color;
15623 #
15624 # // ...
15625 # public static java.awt.Color fromProto(Color protocolor) {
15626 # float alpha = protocolor.hasAlpha()
15627 # ? protocolor.getAlpha().getValue()
15628 # : 1.0;
15629 #
15630 # return new java.awt.Color(
15631 # protocolor.getRed(),
15632 # protocolor.getGreen(),
15633 # protocolor.getBlue(),
15634 # alpha);
15635 # }
15636 #
15637 # public static Color toProto(java.awt.Color color) {
15638 # float red = (float) color.getRed();
15639 # float green = (float) color.getGreen();
15640 # float blue = (float) color.getBlue();
15641 # float denominator = 255.0;
15642 # Color.Builder resultBuilder =
15643 # Color
15644 # .newBuilder()
15645 # .setRed(red / denominator)
15646 # .setGreen(green / denominator)
15647 # .setBlue(blue / denominator);
15648 # int alpha = color.getAlpha();
15649 # if (alpha != 255) {
15650 # result.setAlpha(
15651 # FloatValue
15652 # .newBuilder()
15653 # .setValue(((float) alpha) / denominator)
15654 # .build());
15655 # }
15656 # return resultBuilder.build();
15657 # }
15658 # // ...
15659 #
15660 # Example (iOS / Obj-C):
15661 #
15662 # // ...
15663 # static UIColor* fromProto(Color* protocolor) {
15664 # float red = [protocolor red];
15665 # float green = [protocolor green];
15666 # float blue = [protocolor blue];
15667 # FloatValue* alpha_wrapper = [protocolor alpha];
15668 # float alpha = 1.0;
15669 # if (alpha_wrapper != nil) {
15670 # alpha = [alpha_wrapper value];
15671 # }
15672 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
15673 # }
15674 #
15675 # static Color* toProto(UIColor* color) {
15676 # CGFloat red, green, blue, alpha;
15677 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
15678 # return nil;
15679 # }
15680 # Color* result = [Color alloc] init];
15681 # [result setRed:red];
15682 # [result setGreen:green];
15683 # [result setBlue:blue];
15684 # if (alpha <= 0.9999) {
15685 # [result setAlpha:floatWrapperWithValue(alpha)];
15686 # }
15687 # [result autorelease];
15688 # return result;
15689 # }
15690 # // ...
15691 #
15692 # Example (JavaScript):
15693 #
15694 # // ...
15695 #
15696 # var protoToCssColor = function(rgb_color) {
15697 # var redFrac = rgb_color.red || 0.0;
15698 # var greenFrac = rgb_color.green || 0.0;
15699 # var blueFrac = rgb_color.blue || 0.0;
15700 # var red = Math.floor(redFrac * 255);
15701 # var green = Math.floor(greenFrac * 255);
15702 # var blue = Math.floor(blueFrac * 255);
15703 #
15704 # if (!('alpha' in rgb_color)) {
15705 # return rgbToCssColor_(red, green, blue);
15706 # }
15707 #
15708 # var alphaFrac = rgb_color.alpha.value || 0.0;
15709 # var rgbParams = [red, green, blue].join(',');
15710 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
15711 # };
15712 #
15713 # var rgbToCssColor_ = function(red, green, blue) {
15714 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
15715 # var hexString = rgbNumber.toString(16);
15716 # var missingZeros = 6 - hexString.length;
15717 # var resultBuilder = ['#'];
15718 # for (var i = 0; i < missingZeros; i++) {
15719 # resultBuilder.push('0');
15720 # }
15721 # resultBuilder.push(hexString);
15722 # return resultBuilder.join('');
15723 # };
15724 #
15725 # // ...
15726 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
15727 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
15728 # the final pixel color is defined by the equation:
15729 #
15730 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
15731 #
15732 # This means that a value of 1.0 corresponds to a solid color, whereas
15733 # a value of 0.0 corresponds to a completely transparent color. This
15734 # uses a wrapper message rather than a simple float scalar so that it is
15735 # possible to distinguish between a default value and the value being unset.
15736 # If omitted, this color object is to be rendered as a solid color
15737 # (as if the alpha value had been explicitly given with a value of 1.0).
15738 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
15739 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
15740 },
15741 "hidden": True or False, # True if the sheet is hidden in the UI, false if it's visible.
15742 "sheetId": 42, # The ID of the sheet. Must be non-negative.
15743 # This field cannot be changed once set.
15744 },
15745 },
15746 "deleteNamedRange": { # Removes the named range with the given ID from the spreadsheet. # Deletes a named range.
15747 "namedRangeId": "A String", # The ID of the named range to delete.
15748 },
15749 "updateNamedRange": { # Updates properties of the named range with the specified # Updates a named range.
15750 # namedRangeId.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015751 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15752 # The root `namedRange` is implied and should not be specified.
15753 # A single `"*"` can be used as short-hand for listing every field.
15754 "namedRange": { # A named range. # The named range to update with the new properties.
15755 "namedRangeId": "A String", # The ID of the named range.
15756 "range": { # A range on a sheet. # The range this represents.
15757 # All indexes are zero-based.
15758 # Indexes are half open, e.g the start index is inclusive
15759 # and the end index is exclusive -- [start_index, end_index).
15760 # Missing indexes indicate the range is unbounded on that side.
15761 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015762 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015763 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015764 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015765 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015766 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015767 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015768 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015769 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015770 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015771 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015772 # `Sheet1!A:B == sheet_id: 0,
15773 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015774 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015775 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015776 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015777 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015778 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015779 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015780 #
15781 # The start index must always be less than or equal to the end index.
15782 # If the start index equals the end index, then the range is empty.
15783 # Empty ranges are typically not meaningful and are usually rendered in the
15784 # UI as `#REF!`.
15785 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015786 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015787 "sheetId": 42, # The sheet this range is on.
15788 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015789 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015790 },
15791 "name": "A String", # The name of the named range.
15792 },
15793 },
15794 "insertDimension": { # Inserts rows or columns in a sheet at a particular index. # Inserts new rows or columns in a sheet.
15795 "inheritFromBefore": True or False, # Whether dimension properties should be extended from the dimensions
15796 # before or after the newly inserted dimensions.
15797 # True to inherit from the dimensions before (in which case the start
15798 # index must be greater than 0), and false to inherit from the dimensions
15799 # after.
15800 #
15801 # For example, if row index 0 has red background and row index 1
15802 # has a green background, then inserting 2 rows at index 1 can inherit
15803 # either the green or red background. If `inheritFromBefore` is true,
15804 # the two new rows will be red (because the row before the insertion point
15805 # was red), whereas if `inheritFromBefore` is false, the two new rows will
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015806 # be green (because the row after the insertion point was green).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015807 "range": { # A range along a single dimension on a sheet. # The dimensions to insert. Both the start and end indexes must be bounded.
15808 # All indexes are zero-based.
15809 # Indexes are half open: the start index is inclusive
15810 # and the end index is exclusive.
15811 # Missing indexes indicate the range is unbounded on that side.
15812 "endIndex": 42, # The end (exclusive) of the span, or not set if unbounded.
15813 "startIndex": 42, # The start (inclusive) of the span, or not set if unbounded.
15814 "sheetId": 42, # The sheet this span is on.
15815 "dimension": "A String", # The dimension of the span.
15816 },
15817 },
15818 "updateFilterView": { # Updates properties of the filter view. # Updates the properties of a filter view.
15819 "filter": { # A filter view. # The new properties of the filter view.
15820 "title": "A String", # The name of the filter view.
15821 "namedRangeId": "A String", # The named range this filter view is backed by, if any.
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 "filterViewId": 42, # The ID of the filter view.
15826 "range": { # A range on a sheet. # The range this filter view covers.
15827 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015828 # When writing, only one of range or named_range_id
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015829 # may be set.
15830 # All indexes are zero-based.
15831 # Indexes are half open, e.g the start index is inclusive
15832 # and the end index is exclusive -- [start_index, end_index).
15833 # Missing indexes indicate the range is unbounded on that side.
15834 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015835 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015836 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015837 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015838 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015839 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015840 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015841 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015842 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015843 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015844 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015845 # `Sheet1!A:B == sheet_id: 0,
15846 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015847 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015848 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015849 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015850 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015851 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015852 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015853 #
15854 # The start index must always be less than or equal to the end index.
15855 # If the start index equals the end index, then the range is empty.
15856 # Empty ranges are typically not meaningful and are usually rendered in the
15857 # UI as `#REF!`.
15858 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015859 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015860 "sheetId": 42, # The sheet this range is on.
15861 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015862 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015863 },
15864 "sortSpecs": [ # The sort order per column. Later specifications are used when values
15865 # are equal in the earlier specifications.
15866 { # A sort order associated with a specific column or row.
15867 "sortOrder": "A String", # The order data should be sorted.
15868 "dimensionIndex": 42, # The dimension the sort should be applied to.
15869 },
15870 ],
15871 "criteria": { # The criteria for showing/hiding values per column.
15872 # The map's key is the column index, and the value is the criteria for
15873 # that column.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070015874 "a_key": { # Criteria for showing/hiding rows in a filter or filter view.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015875 "hiddenValues": [ # Values that should be hidden.
15876 "A String",
15877 ],
15878 "condition": { # A condition that can evaluate to true or false. # A condition that must be true for values to be shown.
15879 # (This does not override hiddenValues -- if a value is listed there,
15880 # it will still be hidden.)
15881 # BooleanConditions are used by conditional formatting,
15882 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015883 "values": [ # The values of the condition. The number of supported values depends
15884 # on the condition type. Some support zero values,
15885 # others one or two values,
15886 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
15887 { # The value of the condition.
15888 "relativeDate": "A String", # A relative date (based on the current date).
15889 # Valid only if the type is
15890 # DATE_BEFORE,
15891 # DATE_AFTER,
15892 # DATE_ON_OR_BEFORE or
15893 # DATE_ON_OR_AFTER.
15894 #
15895 # Relative dates are not supported in data validation.
15896 # They are supported only in conditional formatting and
15897 # conditional filters.
15898 "userEnteredValue": "A String", # A value the condition is based on.
15899 # The value will be parsed as if the user typed into a cell.
15900 # Formulas are supported (and must begin with an `=`).
15901 },
15902 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015903 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070015904 },
15905 },
15906 },
15907 },
15908 "fields": "A String", # The fields that should be updated. At least one field must be specified.
15909 # The root `filter` is implied and should not be specified.
15910 # A single `"*"` can be used as short-hand for listing every field.
15911 },
15912 "deleteConditionalFormatRule": { # Deletes a conditional format rule at the given index. # Deletes an existing conditional format rule.
15913 # All subsequent rules' indexes are decremented.
15914 "index": 42, # The zero-based index of the rule to be deleted.
15915 "sheetId": 42, # The sheet the rule is being deleted from.
15916 },
15917 },
15918 ],
15919 }
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 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
15988 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
15989 # CellData.effectiveFormat will not be set if the
15990 # cell's format is equal to this default format.
15991 # This field is read-only.
15992 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
15993 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
15994 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040015995 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080015996 # information about the supported patterns.
15997 "type": "A String", # The type of the number format.
15998 # When writing, this field must be set.
15999 },
16000 "textDirection": "A String", # The direction of the text in the cell.
16001 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
16002 # When updating padding, every field must be specified.
16003 "top": 42, # The top padding of the cell.
16004 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016005 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016006 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016007 },
16008 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
16009 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
16010 # for simplicity of conversion to/from color representations in various
16011 # languages over compactness; for example, the fields of this representation
16012 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16013 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16014 # method in iOS; and, with just a little work, it can be easily formatted into
16015 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16016 #
16017 # Example (Java):
16018 #
16019 # import com.google.type.Color;
16020 #
16021 # // ...
16022 # public static java.awt.Color fromProto(Color protocolor) {
16023 # float alpha = protocolor.hasAlpha()
16024 # ? protocolor.getAlpha().getValue()
16025 # : 1.0;
16026 #
16027 # return new java.awt.Color(
16028 # protocolor.getRed(),
16029 # protocolor.getGreen(),
16030 # protocolor.getBlue(),
16031 # alpha);
16032 # }
16033 #
16034 # public static Color toProto(java.awt.Color color) {
16035 # float red = (float) color.getRed();
16036 # float green = (float) color.getGreen();
16037 # float blue = (float) color.getBlue();
16038 # float denominator = 255.0;
16039 # Color.Builder resultBuilder =
16040 # Color
16041 # .newBuilder()
16042 # .setRed(red / denominator)
16043 # .setGreen(green / denominator)
16044 # .setBlue(blue / denominator);
16045 # int alpha = color.getAlpha();
16046 # if (alpha != 255) {
16047 # result.setAlpha(
16048 # FloatValue
16049 # .newBuilder()
16050 # .setValue(((float) alpha) / denominator)
16051 # .build());
16052 # }
16053 # return resultBuilder.build();
16054 # }
16055 # // ...
16056 #
16057 # Example (iOS / Obj-C):
16058 #
16059 # // ...
16060 # static UIColor* fromProto(Color* protocolor) {
16061 # float red = [protocolor red];
16062 # float green = [protocolor green];
16063 # float blue = [protocolor blue];
16064 # FloatValue* alpha_wrapper = [protocolor alpha];
16065 # float alpha = 1.0;
16066 # if (alpha_wrapper != nil) {
16067 # alpha = [alpha_wrapper value];
16068 # }
16069 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16070 # }
16071 #
16072 # static Color* toProto(UIColor* color) {
16073 # CGFloat red, green, blue, alpha;
16074 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16075 # return nil;
16076 # }
16077 # Color* result = [Color alloc] init];
16078 # [result setRed:red];
16079 # [result setGreen:green];
16080 # [result setBlue:blue];
16081 # if (alpha <= 0.9999) {
16082 # [result setAlpha:floatWrapperWithValue(alpha)];
16083 # }
16084 # [result autorelease];
16085 # return result;
16086 # }
16087 # // ...
16088 #
16089 # Example (JavaScript):
16090 #
16091 # // ...
16092 #
16093 # var protoToCssColor = function(rgb_color) {
16094 # var redFrac = rgb_color.red || 0.0;
16095 # var greenFrac = rgb_color.green || 0.0;
16096 # var blueFrac = rgb_color.blue || 0.0;
16097 # var red = Math.floor(redFrac * 255);
16098 # var green = Math.floor(greenFrac * 255);
16099 # var blue = Math.floor(blueFrac * 255);
16100 #
16101 # if (!('alpha' in rgb_color)) {
16102 # return rgbToCssColor_(red, green, blue);
16103 # }
16104 #
16105 # var alphaFrac = rgb_color.alpha.value || 0.0;
16106 # var rgbParams = [red, green, blue].join(',');
16107 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16108 # };
16109 #
16110 # var rgbToCssColor_ = function(red, green, blue) {
16111 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16112 # var hexString = rgbNumber.toString(16);
16113 # var missingZeros = 6 - hexString.length;
16114 # var resultBuilder = ['#'];
16115 # for (var i = 0; i < missingZeros; i++) {
16116 # resultBuilder.push('0');
16117 # }
16118 # resultBuilder.push(hexString);
16119 # return resultBuilder.join('');
16120 # };
16121 #
16122 # // ...
16123 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16124 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16125 # the final pixel color is defined by the equation:
16126 #
16127 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16128 #
16129 # This means that a value of 1.0 corresponds to a solid color, whereas
16130 # a value of 0.0 corresponds to a completely transparent color. This
16131 # uses a wrapper message rather than a simple float scalar so that it is
16132 # possible to distinguish between a default value and the value being unset.
16133 # If omitted, this color object is to be rendered as a solid color
16134 # (as if the alpha value had been explicitly given with a value of 1.0).
16135 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16136 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16137 },
16138 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
16139 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
16140 # Absent values indicate that the field isn't specified.
16141 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
16142 # for simplicity of conversion to/from color representations in various
16143 # languages over compactness; for example, the fields of this representation
16144 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16145 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16146 # method in iOS; and, with just a little work, it can be easily formatted into
16147 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16148 #
16149 # Example (Java):
16150 #
16151 # import com.google.type.Color;
16152 #
16153 # // ...
16154 # public static java.awt.Color fromProto(Color protocolor) {
16155 # float alpha = protocolor.hasAlpha()
16156 # ? protocolor.getAlpha().getValue()
16157 # : 1.0;
16158 #
16159 # return new java.awt.Color(
16160 # protocolor.getRed(),
16161 # protocolor.getGreen(),
16162 # protocolor.getBlue(),
16163 # alpha);
16164 # }
16165 #
16166 # public static Color toProto(java.awt.Color color) {
16167 # float red = (float) color.getRed();
16168 # float green = (float) color.getGreen();
16169 # float blue = (float) color.getBlue();
16170 # float denominator = 255.0;
16171 # Color.Builder resultBuilder =
16172 # Color
16173 # .newBuilder()
16174 # .setRed(red / denominator)
16175 # .setGreen(green / denominator)
16176 # .setBlue(blue / denominator);
16177 # int alpha = color.getAlpha();
16178 # if (alpha != 255) {
16179 # result.setAlpha(
16180 # FloatValue
16181 # .newBuilder()
16182 # .setValue(((float) alpha) / denominator)
16183 # .build());
16184 # }
16185 # return resultBuilder.build();
16186 # }
16187 # // ...
16188 #
16189 # Example (iOS / Obj-C):
16190 #
16191 # // ...
16192 # static UIColor* fromProto(Color* protocolor) {
16193 # float red = [protocolor red];
16194 # float green = [protocolor green];
16195 # float blue = [protocolor blue];
16196 # FloatValue* alpha_wrapper = [protocolor alpha];
16197 # float alpha = 1.0;
16198 # if (alpha_wrapper != nil) {
16199 # alpha = [alpha_wrapper value];
16200 # }
16201 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16202 # }
16203 #
16204 # static Color* toProto(UIColor* color) {
16205 # CGFloat red, green, blue, alpha;
16206 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16207 # return nil;
16208 # }
16209 # Color* result = [Color alloc] init];
16210 # [result setRed:red];
16211 # [result setGreen:green];
16212 # [result setBlue:blue];
16213 # if (alpha <= 0.9999) {
16214 # [result setAlpha:floatWrapperWithValue(alpha)];
16215 # }
16216 # [result autorelease];
16217 # return result;
16218 # }
16219 # // ...
16220 #
16221 # Example (JavaScript):
16222 #
16223 # // ...
16224 #
16225 # var protoToCssColor = function(rgb_color) {
16226 # var redFrac = rgb_color.red || 0.0;
16227 # var greenFrac = rgb_color.green || 0.0;
16228 # var blueFrac = rgb_color.blue || 0.0;
16229 # var red = Math.floor(redFrac * 255);
16230 # var green = Math.floor(greenFrac * 255);
16231 # var blue = Math.floor(blueFrac * 255);
16232 #
16233 # if (!('alpha' in rgb_color)) {
16234 # return rgbToCssColor_(red, green, blue);
16235 # }
16236 #
16237 # var alphaFrac = rgb_color.alpha.value || 0.0;
16238 # var rgbParams = [red, green, blue].join(',');
16239 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16240 # };
16241 #
16242 # var rgbToCssColor_ = function(red, green, blue) {
16243 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16244 # var hexString = rgbNumber.toString(16);
16245 # var missingZeros = 6 - hexString.length;
16246 # var resultBuilder = ['#'];
16247 # for (var i = 0; i < missingZeros; i++) {
16248 # resultBuilder.push('0');
16249 # }
16250 # resultBuilder.push(hexString);
16251 # return resultBuilder.join('');
16252 # };
16253 #
16254 # // ...
16255 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16256 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16257 # the final pixel color is defined by the equation:
16258 #
16259 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16260 #
16261 # This means that a value of 1.0 corresponds to a solid color, whereas
16262 # a value of 0.0 corresponds to a completely transparent color. This
16263 # uses a wrapper message rather than a simple float scalar so that it is
16264 # possible to distinguish between a default value and the value being unset.
16265 # If omitted, this color object is to be rendered as a solid color
16266 # (as if the alpha value had been explicitly given with a value of 1.0).
16267 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16268 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16269 },
16270 "bold": True or False, # True if the text is bold.
16271 "strikethrough": True or False, # True if the text has a strikethrough.
16272 "fontFamily": "A String", # The font family.
16273 "fontSize": 42, # The size of the font.
16274 "italic": True or False, # True if the text is italicized.
16275 "underline": True or False, # True if the text is underlined.
16276 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016277 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016278 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
16279 "borders": { # The borders of the cell. # The borders of the cell.
16280 "top": { # A border along a cell. # The top border of the cell.
16281 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16282 # for simplicity of conversion to/from color representations in various
16283 # languages over compactness; for example, the fields of this representation
16284 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16285 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16286 # method in iOS; and, with just a little work, it can be easily formatted into
16287 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16288 #
16289 # Example (Java):
16290 #
16291 # import com.google.type.Color;
16292 #
16293 # // ...
16294 # public static java.awt.Color fromProto(Color protocolor) {
16295 # float alpha = protocolor.hasAlpha()
16296 # ? protocolor.getAlpha().getValue()
16297 # : 1.0;
16298 #
16299 # return new java.awt.Color(
16300 # protocolor.getRed(),
16301 # protocolor.getGreen(),
16302 # protocolor.getBlue(),
16303 # alpha);
16304 # }
16305 #
16306 # public static Color toProto(java.awt.Color color) {
16307 # float red = (float) color.getRed();
16308 # float green = (float) color.getGreen();
16309 # float blue = (float) color.getBlue();
16310 # float denominator = 255.0;
16311 # Color.Builder resultBuilder =
16312 # Color
16313 # .newBuilder()
16314 # .setRed(red / denominator)
16315 # .setGreen(green / denominator)
16316 # .setBlue(blue / denominator);
16317 # int alpha = color.getAlpha();
16318 # if (alpha != 255) {
16319 # result.setAlpha(
16320 # FloatValue
16321 # .newBuilder()
16322 # .setValue(((float) alpha) / denominator)
16323 # .build());
16324 # }
16325 # return resultBuilder.build();
16326 # }
16327 # // ...
16328 #
16329 # Example (iOS / Obj-C):
16330 #
16331 # // ...
16332 # static UIColor* fromProto(Color* protocolor) {
16333 # float red = [protocolor red];
16334 # float green = [protocolor green];
16335 # float blue = [protocolor blue];
16336 # FloatValue* alpha_wrapper = [protocolor alpha];
16337 # float alpha = 1.0;
16338 # if (alpha_wrapper != nil) {
16339 # alpha = [alpha_wrapper value];
16340 # }
16341 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16342 # }
16343 #
16344 # static Color* toProto(UIColor* color) {
16345 # CGFloat red, green, blue, alpha;
16346 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16347 # return nil;
16348 # }
16349 # Color* result = [Color alloc] init];
16350 # [result setRed:red];
16351 # [result setGreen:green];
16352 # [result setBlue:blue];
16353 # if (alpha <= 0.9999) {
16354 # [result setAlpha:floatWrapperWithValue(alpha)];
16355 # }
16356 # [result autorelease];
16357 # return result;
16358 # }
16359 # // ...
16360 #
16361 # Example (JavaScript):
16362 #
16363 # // ...
16364 #
16365 # var protoToCssColor = function(rgb_color) {
16366 # var redFrac = rgb_color.red || 0.0;
16367 # var greenFrac = rgb_color.green || 0.0;
16368 # var blueFrac = rgb_color.blue || 0.0;
16369 # var red = Math.floor(redFrac * 255);
16370 # var green = Math.floor(greenFrac * 255);
16371 # var blue = Math.floor(blueFrac * 255);
16372 #
16373 # if (!('alpha' in rgb_color)) {
16374 # return rgbToCssColor_(red, green, blue);
16375 # }
16376 #
16377 # var alphaFrac = rgb_color.alpha.value || 0.0;
16378 # var rgbParams = [red, green, blue].join(',');
16379 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16380 # };
16381 #
16382 # var rgbToCssColor_ = function(red, green, blue) {
16383 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16384 # var hexString = rgbNumber.toString(16);
16385 # var missingZeros = 6 - hexString.length;
16386 # var resultBuilder = ['#'];
16387 # for (var i = 0; i < missingZeros; i++) {
16388 # resultBuilder.push('0');
16389 # }
16390 # resultBuilder.push(hexString);
16391 # return resultBuilder.join('');
16392 # };
16393 #
16394 # // ...
16395 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16396 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16397 # the final pixel color is defined by the equation:
16398 #
16399 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16400 #
16401 # This means that a value of 1.0 corresponds to a solid color, whereas
16402 # a value of 0.0 corresponds to a completely transparent color. This
16403 # uses a wrapper message rather than a simple float scalar so that it is
16404 # possible to distinguish between a default value and the value being unset.
16405 # If omitted, this color object is to be rendered as a solid color
16406 # (as if the alpha value had been explicitly given with a value of 1.0).
16407 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16408 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16409 },
16410 "width": 42, # The width of the border, in pixels.
16411 # Deprecated; the width is determined by the "style" field.
16412 "style": "A String", # The style of the border.
16413 },
16414 "right": { # A border along a cell. # The right border of the cell.
16415 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16416 # for simplicity of conversion to/from color representations in various
16417 # languages over compactness; for example, the fields of this representation
16418 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16419 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16420 # method in iOS; and, with just a little work, it can be easily formatted into
16421 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16422 #
16423 # Example (Java):
16424 #
16425 # import com.google.type.Color;
16426 #
16427 # // ...
16428 # public static java.awt.Color fromProto(Color protocolor) {
16429 # float alpha = protocolor.hasAlpha()
16430 # ? protocolor.getAlpha().getValue()
16431 # : 1.0;
16432 #
16433 # return new java.awt.Color(
16434 # protocolor.getRed(),
16435 # protocolor.getGreen(),
16436 # protocolor.getBlue(),
16437 # alpha);
16438 # }
16439 #
16440 # public static Color toProto(java.awt.Color color) {
16441 # float red = (float) color.getRed();
16442 # float green = (float) color.getGreen();
16443 # float blue = (float) color.getBlue();
16444 # float denominator = 255.0;
16445 # Color.Builder resultBuilder =
16446 # Color
16447 # .newBuilder()
16448 # .setRed(red / denominator)
16449 # .setGreen(green / denominator)
16450 # .setBlue(blue / denominator);
16451 # int alpha = color.getAlpha();
16452 # if (alpha != 255) {
16453 # result.setAlpha(
16454 # FloatValue
16455 # .newBuilder()
16456 # .setValue(((float) alpha) / denominator)
16457 # .build());
16458 # }
16459 # return resultBuilder.build();
16460 # }
16461 # // ...
16462 #
16463 # Example (iOS / Obj-C):
16464 #
16465 # // ...
16466 # static UIColor* fromProto(Color* protocolor) {
16467 # float red = [protocolor red];
16468 # float green = [protocolor green];
16469 # float blue = [protocolor blue];
16470 # FloatValue* alpha_wrapper = [protocolor alpha];
16471 # float alpha = 1.0;
16472 # if (alpha_wrapper != nil) {
16473 # alpha = [alpha_wrapper value];
16474 # }
16475 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16476 # }
16477 #
16478 # static Color* toProto(UIColor* color) {
16479 # CGFloat red, green, blue, alpha;
16480 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16481 # return nil;
16482 # }
16483 # Color* result = [Color alloc] init];
16484 # [result setRed:red];
16485 # [result setGreen:green];
16486 # [result setBlue:blue];
16487 # if (alpha <= 0.9999) {
16488 # [result setAlpha:floatWrapperWithValue(alpha)];
16489 # }
16490 # [result autorelease];
16491 # return result;
16492 # }
16493 # // ...
16494 #
16495 # Example (JavaScript):
16496 #
16497 # // ...
16498 #
16499 # var protoToCssColor = function(rgb_color) {
16500 # var redFrac = rgb_color.red || 0.0;
16501 # var greenFrac = rgb_color.green || 0.0;
16502 # var blueFrac = rgb_color.blue || 0.0;
16503 # var red = Math.floor(redFrac * 255);
16504 # var green = Math.floor(greenFrac * 255);
16505 # var blue = Math.floor(blueFrac * 255);
16506 #
16507 # if (!('alpha' in rgb_color)) {
16508 # return rgbToCssColor_(red, green, blue);
16509 # }
16510 #
16511 # var alphaFrac = rgb_color.alpha.value || 0.0;
16512 # var rgbParams = [red, green, blue].join(',');
16513 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16514 # };
16515 #
16516 # var rgbToCssColor_ = function(red, green, blue) {
16517 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16518 # var hexString = rgbNumber.toString(16);
16519 # var missingZeros = 6 - hexString.length;
16520 # var resultBuilder = ['#'];
16521 # for (var i = 0; i < missingZeros; i++) {
16522 # resultBuilder.push('0');
16523 # }
16524 # resultBuilder.push(hexString);
16525 # return resultBuilder.join('');
16526 # };
16527 #
16528 # // ...
16529 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16530 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16531 # the final pixel color is defined by the equation:
16532 #
16533 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16534 #
16535 # This means that a value of 1.0 corresponds to a solid color, whereas
16536 # a value of 0.0 corresponds to a completely transparent color. This
16537 # uses a wrapper message rather than a simple float scalar so that it is
16538 # possible to distinguish between a default value and the value being unset.
16539 # If omitted, this color object is to be rendered as a solid color
16540 # (as if the alpha value had been explicitly given with a value of 1.0).
16541 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16542 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16543 },
16544 "width": 42, # The width of the border, in pixels.
16545 # Deprecated; the width is determined by the "style" field.
16546 "style": "A String", # The style of the border.
16547 },
16548 "bottom": { # A border along a cell. # The bottom border of the cell.
16549 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16550 # for simplicity of conversion to/from color representations in various
16551 # languages over compactness; for example, the fields of this representation
16552 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16553 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16554 # method in iOS; and, with just a little work, it can be easily formatted into
16555 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16556 #
16557 # Example (Java):
16558 #
16559 # import com.google.type.Color;
16560 #
16561 # // ...
16562 # public static java.awt.Color fromProto(Color protocolor) {
16563 # float alpha = protocolor.hasAlpha()
16564 # ? protocolor.getAlpha().getValue()
16565 # : 1.0;
16566 #
16567 # return new java.awt.Color(
16568 # protocolor.getRed(),
16569 # protocolor.getGreen(),
16570 # protocolor.getBlue(),
16571 # alpha);
16572 # }
16573 #
16574 # public static Color toProto(java.awt.Color color) {
16575 # float red = (float) color.getRed();
16576 # float green = (float) color.getGreen();
16577 # float blue = (float) color.getBlue();
16578 # float denominator = 255.0;
16579 # Color.Builder resultBuilder =
16580 # Color
16581 # .newBuilder()
16582 # .setRed(red / denominator)
16583 # .setGreen(green / denominator)
16584 # .setBlue(blue / denominator);
16585 # int alpha = color.getAlpha();
16586 # if (alpha != 255) {
16587 # result.setAlpha(
16588 # FloatValue
16589 # .newBuilder()
16590 # .setValue(((float) alpha) / denominator)
16591 # .build());
16592 # }
16593 # return resultBuilder.build();
16594 # }
16595 # // ...
16596 #
16597 # Example (iOS / Obj-C):
16598 #
16599 # // ...
16600 # static UIColor* fromProto(Color* protocolor) {
16601 # float red = [protocolor red];
16602 # float green = [protocolor green];
16603 # float blue = [protocolor blue];
16604 # FloatValue* alpha_wrapper = [protocolor alpha];
16605 # float alpha = 1.0;
16606 # if (alpha_wrapper != nil) {
16607 # alpha = [alpha_wrapper value];
16608 # }
16609 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16610 # }
16611 #
16612 # static Color* toProto(UIColor* color) {
16613 # CGFloat red, green, blue, alpha;
16614 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16615 # return nil;
16616 # }
16617 # Color* result = [Color alloc] init];
16618 # [result setRed:red];
16619 # [result setGreen:green];
16620 # [result setBlue:blue];
16621 # if (alpha <= 0.9999) {
16622 # [result setAlpha:floatWrapperWithValue(alpha)];
16623 # }
16624 # [result autorelease];
16625 # return result;
16626 # }
16627 # // ...
16628 #
16629 # Example (JavaScript):
16630 #
16631 # // ...
16632 #
16633 # var protoToCssColor = function(rgb_color) {
16634 # var redFrac = rgb_color.red || 0.0;
16635 # var greenFrac = rgb_color.green || 0.0;
16636 # var blueFrac = rgb_color.blue || 0.0;
16637 # var red = Math.floor(redFrac * 255);
16638 # var green = Math.floor(greenFrac * 255);
16639 # var blue = Math.floor(blueFrac * 255);
16640 #
16641 # if (!('alpha' in rgb_color)) {
16642 # return rgbToCssColor_(red, green, blue);
16643 # }
16644 #
16645 # var alphaFrac = rgb_color.alpha.value || 0.0;
16646 # var rgbParams = [red, green, blue].join(',');
16647 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16648 # };
16649 #
16650 # var rgbToCssColor_ = function(red, green, blue) {
16651 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16652 # var hexString = rgbNumber.toString(16);
16653 # var missingZeros = 6 - hexString.length;
16654 # var resultBuilder = ['#'];
16655 # for (var i = 0; i < missingZeros; i++) {
16656 # resultBuilder.push('0');
16657 # }
16658 # resultBuilder.push(hexString);
16659 # return resultBuilder.join('');
16660 # };
16661 #
16662 # // ...
16663 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16664 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16665 # the final pixel color is defined by the equation:
16666 #
16667 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16668 #
16669 # This means that a value of 1.0 corresponds to a solid color, whereas
16670 # a value of 0.0 corresponds to a completely transparent color. This
16671 # uses a wrapper message rather than a simple float scalar so that it is
16672 # possible to distinguish between a default value and the value being unset.
16673 # If omitted, this color object is to be rendered as a solid color
16674 # (as if the alpha value had been explicitly given with a value of 1.0).
16675 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16676 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16677 },
16678 "width": 42, # The width of the border, in pixels.
16679 # Deprecated; the width is determined by the "style" field.
16680 "style": "A String", # The style of the border.
16681 },
16682 "left": { # A border along a cell. # The left border of the cell.
16683 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
16684 # for simplicity of conversion to/from color representations in various
16685 # languages over compactness; for example, the fields of this representation
16686 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
16687 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
16688 # method in iOS; and, with just a little work, it can be easily formatted into
16689 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
16690 #
16691 # Example (Java):
16692 #
16693 # import com.google.type.Color;
16694 #
16695 # // ...
16696 # public static java.awt.Color fromProto(Color protocolor) {
16697 # float alpha = protocolor.hasAlpha()
16698 # ? protocolor.getAlpha().getValue()
16699 # : 1.0;
16700 #
16701 # return new java.awt.Color(
16702 # protocolor.getRed(),
16703 # protocolor.getGreen(),
16704 # protocolor.getBlue(),
16705 # alpha);
16706 # }
16707 #
16708 # public static Color toProto(java.awt.Color color) {
16709 # float red = (float) color.getRed();
16710 # float green = (float) color.getGreen();
16711 # float blue = (float) color.getBlue();
16712 # float denominator = 255.0;
16713 # Color.Builder resultBuilder =
16714 # Color
16715 # .newBuilder()
16716 # .setRed(red / denominator)
16717 # .setGreen(green / denominator)
16718 # .setBlue(blue / denominator);
16719 # int alpha = color.getAlpha();
16720 # if (alpha != 255) {
16721 # result.setAlpha(
16722 # FloatValue
16723 # .newBuilder()
16724 # .setValue(((float) alpha) / denominator)
16725 # .build());
16726 # }
16727 # return resultBuilder.build();
16728 # }
16729 # // ...
16730 #
16731 # Example (iOS / Obj-C):
16732 #
16733 # // ...
16734 # static UIColor* fromProto(Color* protocolor) {
16735 # float red = [protocolor red];
16736 # float green = [protocolor green];
16737 # float blue = [protocolor blue];
16738 # FloatValue* alpha_wrapper = [protocolor alpha];
16739 # float alpha = 1.0;
16740 # if (alpha_wrapper != nil) {
16741 # alpha = [alpha_wrapper value];
16742 # }
16743 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
16744 # }
16745 #
16746 # static Color* toProto(UIColor* color) {
16747 # CGFloat red, green, blue, alpha;
16748 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
16749 # return nil;
16750 # }
16751 # Color* result = [Color alloc] init];
16752 # [result setRed:red];
16753 # [result setGreen:green];
16754 # [result setBlue:blue];
16755 # if (alpha <= 0.9999) {
16756 # [result setAlpha:floatWrapperWithValue(alpha)];
16757 # }
16758 # [result autorelease];
16759 # return result;
16760 # }
16761 # // ...
16762 #
16763 # Example (JavaScript):
16764 #
16765 # // ...
16766 #
16767 # var protoToCssColor = function(rgb_color) {
16768 # var redFrac = rgb_color.red || 0.0;
16769 # var greenFrac = rgb_color.green || 0.0;
16770 # var blueFrac = rgb_color.blue || 0.0;
16771 # var red = Math.floor(redFrac * 255);
16772 # var green = Math.floor(greenFrac * 255);
16773 # var blue = Math.floor(blueFrac * 255);
16774 #
16775 # if (!('alpha' in rgb_color)) {
16776 # return rgbToCssColor_(red, green, blue);
16777 # }
16778 #
16779 # var alphaFrac = rgb_color.alpha.value || 0.0;
16780 # var rgbParams = [red, green, blue].join(',');
16781 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
16782 # };
16783 #
16784 # var rgbToCssColor_ = function(red, green, blue) {
16785 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
16786 # var hexString = rgbNumber.toString(16);
16787 # var missingZeros = 6 - hexString.length;
16788 # var resultBuilder = ['#'];
16789 # for (var i = 0; i < missingZeros; i++) {
16790 # resultBuilder.push('0');
16791 # }
16792 # resultBuilder.push(hexString);
16793 # return resultBuilder.join('');
16794 # };
16795 #
16796 # // ...
16797 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
16798 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
16799 # the final pixel color is defined by the equation:
16800 #
16801 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
16802 #
16803 # This means that a value of 1.0 corresponds to a solid color, whereas
16804 # a value of 0.0 corresponds to a completely transparent color. This
16805 # uses a wrapper message rather than a simple float scalar so that it is
16806 # possible to distinguish between a default value and the value being unset.
16807 # If omitted, this color object is to be rendered as a solid color
16808 # (as if the alpha value had been explicitly given with a value of 1.0).
16809 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
16810 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
16811 },
16812 "width": 42, # The width of the border, in pixels.
16813 # Deprecated; the width is determined by the "style" field.
16814 "style": "A String", # The style of the border.
16815 },
16816 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016817 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
16818 "angle": 42, # The angle between the standard orientation and the desired orientation.
16819 # Measured in degrees. Valid values are between -90 and 90. Positive
16820 # angles are angled upwards, negative are angled downwards.
16821 #
16822 # Note: For LTR text direction positive angles are in the counterclockwise
16823 # direction, whereas for RTL they are in the clockwise direction
16824 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
16825 # characters is unchanged.
16826 # For example:
16827 #
16828 # | V |
16829 # | e |
16830 # | r |
16831 # | t |
16832 # | i |
16833 # | c |
16834 # | a |
16835 # | l |
16836 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016837 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040016838 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
16839 # calculation. Absence of this field means that circular references will
16840 # result in calculation errors.
16841 # calculation.
16842 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
16843 # less than this threshold value, the calculation rounds stop.
16844 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
16845 # rounds to perform.
16846 },
16847 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
16848 # `America/New_York`. If the time zone isn't recognized, this may
16849 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080016850 },
16851 "sheets": [ # The sheets that are part of a spreadsheet.
16852 { # A sheet in a spreadsheet.
16853 "conditionalFormats": [ # The conditional format rules in this sheet.
16854 { # A rule describing a conditional format.
16855 "ranges": [ # The ranges that will be formatted if the condition is true.
16856 # All the ranges must be on the same grid.
16857 { # A range on a sheet.
16858 # All indexes are zero-based.
16859 # Indexes are half open, e.g the start index is inclusive
16860 # and the end index is exclusive -- [start_index, end_index).
16861 # Missing indexes indicate the range is unbounded on that side.
16862 #
16863 # For example, if `"Sheet1"` is sheet ID 0, then:
16864 #
16865 # `Sheet1!A1:A1 == sheet_id: 0,
16866 # start_row_index: 0, end_row_index: 1,
16867 # start_column_index: 0, end_column_index: 1`
16868 #
16869 # `Sheet1!A3:B4 == sheet_id: 0,
16870 # start_row_index: 2, end_row_index: 4,
16871 # start_column_index: 0, end_column_index: 2`
16872 #
16873 # `Sheet1!A:B == sheet_id: 0,
16874 # start_column_index: 0, end_column_index: 2`
16875 #
16876 # `Sheet1!A5:B == sheet_id: 0,
16877 # start_row_index: 4,
16878 # start_column_index: 0, end_column_index: 2`
16879 #
16880 # `Sheet1 == sheet_id:0`
16881 #
16882 # The start index must always be less than or equal to the end index.
16883 # If the start index equals the end index, then the range is empty.
16884 # Empty ranges are typically not meaningful and are usually rendered in the
16885 # UI as `#REF!`.
16886 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040017211 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080017212 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
17213 "borders": { # The borders of the cell. # The borders of the cell.
17214 "top": { # A border along a cell. # The top border of the cell.
17215 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17216 # for simplicity of conversion to/from color representations in various
17217 # languages over compactness; for example, the fields of this representation
17218 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17219 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17220 # method in iOS; and, with just a little work, it can be easily formatted into
17221 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17222 #
17223 # Example (Java):
17224 #
17225 # import com.google.type.Color;
17226 #
17227 # // ...
17228 # public static java.awt.Color fromProto(Color protocolor) {
17229 # float alpha = protocolor.hasAlpha()
17230 # ? protocolor.getAlpha().getValue()
17231 # : 1.0;
17232 #
17233 # return new java.awt.Color(
17234 # protocolor.getRed(),
17235 # protocolor.getGreen(),
17236 # protocolor.getBlue(),
17237 # alpha);
17238 # }
17239 #
17240 # public static Color toProto(java.awt.Color color) {
17241 # float red = (float) color.getRed();
17242 # float green = (float) color.getGreen();
17243 # float blue = (float) color.getBlue();
17244 # float denominator = 255.0;
17245 # Color.Builder resultBuilder =
17246 # Color
17247 # .newBuilder()
17248 # .setRed(red / denominator)
17249 # .setGreen(green / denominator)
17250 # .setBlue(blue / denominator);
17251 # int alpha = color.getAlpha();
17252 # if (alpha != 255) {
17253 # result.setAlpha(
17254 # FloatValue
17255 # .newBuilder()
17256 # .setValue(((float) alpha) / denominator)
17257 # .build());
17258 # }
17259 # return resultBuilder.build();
17260 # }
17261 # // ...
17262 #
17263 # Example (iOS / Obj-C):
17264 #
17265 # // ...
17266 # static UIColor* fromProto(Color* protocolor) {
17267 # float red = [protocolor red];
17268 # float green = [protocolor green];
17269 # float blue = [protocolor blue];
17270 # FloatValue* alpha_wrapper = [protocolor alpha];
17271 # float alpha = 1.0;
17272 # if (alpha_wrapper != nil) {
17273 # alpha = [alpha_wrapper value];
17274 # }
17275 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17276 # }
17277 #
17278 # static Color* toProto(UIColor* color) {
17279 # CGFloat red, green, blue, alpha;
17280 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17281 # return nil;
17282 # }
17283 # Color* result = [Color alloc] init];
17284 # [result setRed:red];
17285 # [result setGreen:green];
17286 # [result setBlue:blue];
17287 # if (alpha <= 0.9999) {
17288 # [result setAlpha:floatWrapperWithValue(alpha)];
17289 # }
17290 # [result autorelease];
17291 # return result;
17292 # }
17293 # // ...
17294 #
17295 # Example (JavaScript):
17296 #
17297 # // ...
17298 #
17299 # var protoToCssColor = function(rgb_color) {
17300 # var redFrac = rgb_color.red || 0.0;
17301 # var greenFrac = rgb_color.green || 0.0;
17302 # var blueFrac = rgb_color.blue || 0.0;
17303 # var red = Math.floor(redFrac * 255);
17304 # var green = Math.floor(greenFrac * 255);
17305 # var blue = Math.floor(blueFrac * 255);
17306 #
17307 # if (!('alpha' in rgb_color)) {
17308 # return rgbToCssColor_(red, green, blue);
17309 # }
17310 #
17311 # var alphaFrac = rgb_color.alpha.value || 0.0;
17312 # var rgbParams = [red, green, blue].join(',');
17313 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17314 # };
17315 #
17316 # var rgbToCssColor_ = function(red, green, blue) {
17317 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17318 # var hexString = rgbNumber.toString(16);
17319 # var missingZeros = 6 - hexString.length;
17320 # var resultBuilder = ['#'];
17321 # for (var i = 0; i < missingZeros; i++) {
17322 # resultBuilder.push('0');
17323 # }
17324 # resultBuilder.push(hexString);
17325 # return resultBuilder.join('');
17326 # };
17327 #
17328 # // ...
17329 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17330 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17331 # the final pixel color is defined by the equation:
17332 #
17333 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17334 #
17335 # This means that a value of 1.0 corresponds to a solid color, whereas
17336 # a value of 0.0 corresponds to a completely transparent color. This
17337 # uses a wrapper message rather than a simple float scalar so that it is
17338 # possible to distinguish between a default value and the value being unset.
17339 # If omitted, this color object is to be rendered as a solid color
17340 # (as if the alpha value had been explicitly given with a value of 1.0).
17341 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17342 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17343 },
17344 "width": 42, # The width of the border, in pixels.
17345 # Deprecated; the width is determined by the "style" field.
17346 "style": "A String", # The style of the border.
17347 },
17348 "right": { # A border along a cell. # The right border of the cell.
17349 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17350 # for simplicity of conversion to/from color representations in various
17351 # languages over compactness; for example, the fields of this representation
17352 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17353 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17354 # method in iOS; and, with just a little work, it can be easily formatted into
17355 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17356 #
17357 # Example (Java):
17358 #
17359 # import com.google.type.Color;
17360 #
17361 # // ...
17362 # public static java.awt.Color fromProto(Color protocolor) {
17363 # float alpha = protocolor.hasAlpha()
17364 # ? protocolor.getAlpha().getValue()
17365 # : 1.0;
17366 #
17367 # return new java.awt.Color(
17368 # protocolor.getRed(),
17369 # protocolor.getGreen(),
17370 # protocolor.getBlue(),
17371 # alpha);
17372 # }
17373 #
17374 # public static Color toProto(java.awt.Color color) {
17375 # float red = (float) color.getRed();
17376 # float green = (float) color.getGreen();
17377 # float blue = (float) color.getBlue();
17378 # float denominator = 255.0;
17379 # Color.Builder resultBuilder =
17380 # Color
17381 # .newBuilder()
17382 # .setRed(red / denominator)
17383 # .setGreen(green / denominator)
17384 # .setBlue(blue / denominator);
17385 # int alpha = color.getAlpha();
17386 # if (alpha != 255) {
17387 # result.setAlpha(
17388 # FloatValue
17389 # .newBuilder()
17390 # .setValue(((float) alpha) / denominator)
17391 # .build());
17392 # }
17393 # return resultBuilder.build();
17394 # }
17395 # // ...
17396 #
17397 # Example (iOS / Obj-C):
17398 #
17399 # // ...
17400 # static UIColor* fromProto(Color* protocolor) {
17401 # float red = [protocolor red];
17402 # float green = [protocolor green];
17403 # float blue = [protocolor blue];
17404 # FloatValue* alpha_wrapper = [protocolor alpha];
17405 # float alpha = 1.0;
17406 # if (alpha_wrapper != nil) {
17407 # alpha = [alpha_wrapper value];
17408 # }
17409 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17410 # }
17411 #
17412 # static Color* toProto(UIColor* color) {
17413 # CGFloat red, green, blue, alpha;
17414 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17415 # return nil;
17416 # }
17417 # Color* result = [Color alloc] init];
17418 # [result setRed:red];
17419 # [result setGreen:green];
17420 # [result setBlue:blue];
17421 # if (alpha <= 0.9999) {
17422 # [result setAlpha:floatWrapperWithValue(alpha)];
17423 # }
17424 # [result autorelease];
17425 # return result;
17426 # }
17427 # // ...
17428 #
17429 # Example (JavaScript):
17430 #
17431 # // ...
17432 #
17433 # var protoToCssColor = function(rgb_color) {
17434 # var redFrac = rgb_color.red || 0.0;
17435 # var greenFrac = rgb_color.green || 0.0;
17436 # var blueFrac = rgb_color.blue || 0.0;
17437 # var red = Math.floor(redFrac * 255);
17438 # var green = Math.floor(greenFrac * 255);
17439 # var blue = Math.floor(blueFrac * 255);
17440 #
17441 # if (!('alpha' in rgb_color)) {
17442 # return rgbToCssColor_(red, green, blue);
17443 # }
17444 #
17445 # var alphaFrac = rgb_color.alpha.value || 0.0;
17446 # var rgbParams = [red, green, blue].join(',');
17447 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17448 # };
17449 #
17450 # var rgbToCssColor_ = function(red, green, blue) {
17451 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17452 # var hexString = rgbNumber.toString(16);
17453 # var missingZeros = 6 - hexString.length;
17454 # var resultBuilder = ['#'];
17455 # for (var i = 0; i < missingZeros; i++) {
17456 # resultBuilder.push('0');
17457 # }
17458 # resultBuilder.push(hexString);
17459 # return resultBuilder.join('');
17460 # };
17461 #
17462 # // ...
17463 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17464 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17465 # the final pixel color is defined by the equation:
17466 #
17467 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17468 #
17469 # This means that a value of 1.0 corresponds to a solid color, whereas
17470 # a value of 0.0 corresponds to a completely transparent color. This
17471 # uses a wrapper message rather than a simple float scalar so that it is
17472 # possible to distinguish between a default value and the value being unset.
17473 # If omitted, this color object is to be rendered as a solid color
17474 # (as if the alpha value had been explicitly given with a value of 1.0).
17475 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17476 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17477 },
17478 "width": 42, # The width of the border, in pixels.
17479 # Deprecated; the width is determined by the "style" field.
17480 "style": "A String", # The style of the border.
17481 },
17482 "bottom": { # A border along a cell. # The bottom border of the cell.
17483 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17484 # for simplicity of conversion to/from color representations in various
17485 # languages over compactness; for example, the fields of this representation
17486 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17487 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17488 # method in iOS; and, with just a little work, it can be easily formatted into
17489 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17490 #
17491 # Example (Java):
17492 #
17493 # import com.google.type.Color;
17494 #
17495 # // ...
17496 # public static java.awt.Color fromProto(Color protocolor) {
17497 # float alpha = protocolor.hasAlpha()
17498 # ? protocolor.getAlpha().getValue()
17499 # : 1.0;
17500 #
17501 # return new java.awt.Color(
17502 # protocolor.getRed(),
17503 # protocolor.getGreen(),
17504 # protocolor.getBlue(),
17505 # alpha);
17506 # }
17507 #
17508 # public static Color toProto(java.awt.Color color) {
17509 # float red = (float) color.getRed();
17510 # float green = (float) color.getGreen();
17511 # float blue = (float) color.getBlue();
17512 # float denominator = 255.0;
17513 # Color.Builder resultBuilder =
17514 # Color
17515 # .newBuilder()
17516 # .setRed(red / denominator)
17517 # .setGreen(green / denominator)
17518 # .setBlue(blue / denominator);
17519 # int alpha = color.getAlpha();
17520 # if (alpha != 255) {
17521 # result.setAlpha(
17522 # FloatValue
17523 # .newBuilder()
17524 # .setValue(((float) alpha) / denominator)
17525 # .build());
17526 # }
17527 # return resultBuilder.build();
17528 # }
17529 # // ...
17530 #
17531 # Example (iOS / Obj-C):
17532 #
17533 # // ...
17534 # static UIColor* fromProto(Color* protocolor) {
17535 # float red = [protocolor red];
17536 # float green = [protocolor green];
17537 # float blue = [protocolor blue];
17538 # FloatValue* alpha_wrapper = [protocolor alpha];
17539 # float alpha = 1.0;
17540 # if (alpha_wrapper != nil) {
17541 # alpha = [alpha_wrapper value];
17542 # }
17543 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17544 # }
17545 #
17546 # static Color* toProto(UIColor* color) {
17547 # CGFloat red, green, blue, alpha;
17548 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17549 # return nil;
17550 # }
17551 # Color* result = [Color alloc] init];
17552 # [result setRed:red];
17553 # [result setGreen:green];
17554 # [result setBlue:blue];
17555 # if (alpha <= 0.9999) {
17556 # [result setAlpha:floatWrapperWithValue(alpha)];
17557 # }
17558 # [result autorelease];
17559 # return result;
17560 # }
17561 # // ...
17562 #
17563 # Example (JavaScript):
17564 #
17565 # // ...
17566 #
17567 # var protoToCssColor = function(rgb_color) {
17568 # var redFrac = rgb_color.red || 0.0;
17569 # var greenFrac = rgb_color.green || 0.0;
17570 # var blueFrac = rgb_color.blue || 0.0;
17571 # var red = Math.floor(redFrac * 255);
17572 # var green = Math.floor(greenFrac * 255);
17573 # var blue = Math.floor(blueFrac * 255);
17574 #
17575 # if (!('alpha' in rgb_color)) {
17576 # return rgbToCssColor_(red, green, blue);
17577 # }
17578 #
17579 # var alphaFrac = rgb_color.alpha.value || 0.0;
17580 # var rgbParams = [red, green, blue].join(',');
17581 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17582 # };
17583 #
17584 # var rgbToCssColor_ = function(red, green, blue) {
17585 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17586 # var hexString = rgbNumber.toString(16);
17587 # var missingZeros = 6 - hexString.length;
17588 # var resultBuilder = ['#'];
17589 # for (var i = 0; i < missingZeros; i++) {
17590 # resultBuilder.push('0');
17591 # }
17592 # resultBuilder.push(hexString);
17593 # return resultBuilder.join('');
17594 # };
17595 #
17596 # // ...
17597 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17598 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17599 # the final pixel color is defined by the equation:
17600 #
17601 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17602 #
17603 # This means that a value of 1.0 corresponds to a solid color, whereas
17604 # a value of 0.0 corresponds to a completely transparent color. This
17605 # uses a wrapper message rather than a simple float scalar so that it is
17606 # possible to distinguish between a default value and the value being unset.
17607 # If omitted, this color object is to be rendered as a solid color
17608 # (as if the alpha value had been explicitly given with a value of 1.0).
17609 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17610 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17611 },
17612 "width": 42, # The width of the border, in pixels.
17613 # Deprecated; the width is determined by the "style" field.
17614 "style": "A String", # The style of the border.
17615 },
17616 "left": { # A border along a cell. # The left border of the cell.
17617 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
17618 # for simplicity of conversion to/from color representations in various
17619 # languages over compactness; for example, the fields of this representation
17620 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
17621 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
17622 # method in iOS; and, with just a little work, it can be easily formatted into
17623 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
17624 #
17625 # Example (Java):
17626 #
17627 # import com.google.type.Color;
17628 #
17629 # // ...
17630 # public static java.awt.Color fromProto(Color protocolor) {
17631 # float alpha = protocolor.hasAlpha()
17632 # ? protocolor.getAlpha().getValue()
17633 # : 1.0;
17634 #
17635 # return new java.awt.Color(
17636 # protocolor.getRed(),
17637 # protocolor.getGreen(),
17638 # protocolor.getBlue(),
17639 # alpha);
17640 # }
17641 #
17642 # public static Color toProto(java.awt.Color color) {
17643 # float red = (float) color.getRed();
17644 # float green = (float) color.getGreen();
17645 # float blue = (float) color.getBlue();
17646 # float denominator = 255.0;
17647 # Color.Builder resultBuilder =
17648 # Color
17649 # .newBuilder()
17650 # .setRed(red / denominator)
17651 # .setGreen(green / denominator)
17652 # .setBlue(blue / denominator);
17653 # int alpha = color.getAlpha();
17654 # if (alpha != 255) {
17655 # result.setAlpha(
17656 # FloatValue
17657 # .newBuilder()
17658 # .setValue(((float) alpha) / denominator)
17659 # .build());
17660 # }
17661 # return resultBuilder.build();
17662 # }
17663 # // ...
17664 #
17665 # Example (iOS / Obj-C):
17666 #
17667 # // ...
17668 # static UIColor* fromProto(Color* protocolor) {
17669 # float red = [protocolor red];
17670 # float green = [protocolor green];
17671 # float blue = [protocolor blue];
17672 # FloatValue* alpha_wrapper = [protocolor alpha];
17673 # float alpha = 1.0;
17674 # if (alpha_wrapper != nil) {
17675 # alpha = [alpha_wrapper value];
17676 # }
17677 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
17678 # }
17679 #
17680 # static Color* toProto(UIColor* color) {
17681 # CGFloat red, green, blue, alpha;
17682 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
17683 # return nil;
17684 # }
17685 # Color* result = [Color alloc] init];
17686 # [result setRed:red];
17687 # [result setGreen:green];
17688 # [result setBlue:blue];
17689 # if (alpha <= 0.9999) {
17690 # [result setAlpha:floatWrapperWithValue(alpha)];
17691 # }
17692 # [result autorelease];
17693 # return result;
17694 # }
17695 # // ...
17696 #
17697 # Example (JavaScript):
17698 #
17699 # // ...
17700 #
17701 # var protoToCssColor = function(rgb_color) {
17702 # var redFrac = rgb_color.red || 0.0;
17703 # var greenFrac = rgb_color.green || 0.0;
17704 # var blueFrac = rgb_color.blue || 0.0;
17705 # var red = Math.floor(redFrac * 255);
17706 # var green = Math.floor(greenFrac * 255);
17707 # var blue = Math.floor(blueFrac * 255);
17708 #
17709 # if (!('alpha' in rgb_color)) {
17710 # return rgbToCssColor_(red, green, blue);
17711 # }
17712 #
17713 # var alphaFrac = rgb_color.alpha.value || 0.0;
17714 # var rgbParams = [red, green, blue].join(',');
17715 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
17716 # };
17717 #
17718 # var rgbToCssColor_ = function(red, green, blue) {
17719 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
17720 # var hexString = rgbNumber.toString(16);
17721 # var missingZeros = 6 - hexString.length;
17722 # var resultBuilder = ['#'];
17723 # for (var i = 0; i < missingZeros; i++) {
17724 # resultBuilder.push('0');
17725 # }
17726 # resultBuilder.push(hexString);
17727 # return resultBuilder.join('');
17728 # };
17729 #
17730 # // ...
17731 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
17732 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
17733 # the final pixel color is defined by the equation:
17734 #
17735 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
17736 #
17737 # This means that a value of 1.0 corresponds to a solid color, whereas
17738 # a value of 0.0 corresponds to a completely transparent color. This
17739 # uses a wrapper message rather than a simple float scalar so that it is
17740 # possible to distinguish between a default value and the value being unset.
17741 # If omitted, this color object is to be rendered as a solid color
17742 # (as if the alpha value had been explicitly given with a value of 1.0).
17743 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
17744 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
17745 },
17746 "width": 42, # The width of the border, in pixels.
17747 # Deprecated; the width is determined by the "style" field.
17748 "style": "A String", # The style of the border.
17749 },
17750 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040017751 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
17752 "angle": 42, # The angle between the standard orientation and the desired orientation.
17753 # Measured in degrees. Valid values are between -90 and 90. Positive
17754 # angles are angled upwards, negative are angled downwards.
17755 #
17756 # Note: For LTR text direction positive angles are in the counterclockwise
17757 # direction, whereas for RTL they are in the clockwise direction
17758 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
17759 # characters is unchanged.
17760 # For example:
17761 #
17762 # | V |
17763 # | e |
17764 # | r |
17765 # | t |
17766 # | i |
17767 # | c |
17768 # | a |
17769 # | l |
17770 },
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 },
19443 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
19444 # from the anchor cell.
19445 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
19446 "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.
19729 "format": { # The format of a run of text in a cell. # The format of the title.
19730 # Only valid if the axis is not associated with the domain.
19731 # Absent values indicate that the field isn't specified.
19732 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
19733 # for simplicity of conversion to/from color representations in various
19734 # languages over compactness; for example, the fields of this representation
19735 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
19736 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
19737 # method in iOS; and, with just a little work, it can be easily formatted into
19738 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
19739 #
19740 # Example (Java):
19741 #
19742 # import com.google.type.Color;
19743 #
19744 # // ...
19745 # public static java.awt.Color fromProto(Color protocolor) {
19746 # float alpha = protocolor.hasAlpha()
19747 # ? protocolor.getAlpha().getValue()
19748 # : 1.0;
19749 #
19750 # return new java.awt.Color(
19751 # protocolor.getRed(),
19752 # protocolor.getGreen(),
19753 # protocolor.getBlue(),
19754 # alpha);
19755 # }
19756 #
19757 # public static Color toProto(java.awt.Color color) {
19758 # float red = (float) color.getRed();
19759 # float green = (float) color.getGreen();
19760 # float blue = (float) color.getBlue();
19761 # float denominator = 255.0;
19762 # Color.Builder resultBuilder =
19763 # Color
19764 # .newBuilder()
19765 # .setRed(red / denominator)
19766 # .setGreen(green / denominator)
19767 # .setBlue(blue / denominator);
19768 # int alpha = color.getAlpha();
19769 # if (alpha != 255) {
19770 # result.setAlpha(
19771 # FloatValue
19772 # .newBuilder()
19773 # .setValue(((float) alpha) / denominator)
19774 # .build());
19775 # }
19776 # return resultBuilder.build();
19777 # }
19778 # // ...
19779 #
19780 # Example (iOS / Obj-C):
19781 #
19782 # // ...
19783 # static UIColor* fromProto(Color* protocolor) {
19784 # float red = [protocolor red];
19785 # float green = [protocolor green];
19786 # float blue = [protocolor blue];
19787 # FloatValue* alpha_wrapper = [protocolor alpha];
19788 # float alpha = 1.0;
19789 # if (alpha_wrapper != nil) {
19790 # alpha = [alpha_wrapper value];
19791 # }
19792 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
19793 # }
19794 #
19795 # static Color* toProto(UIColor* color) {
19796 # CGFloat red, green, blue, alpha;
19797 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
19798 # return nil;
19799 # }
19800 # Color* result = [Color alloc] init];
19801 # [result setRed:red];
19802 # [result setGreen:green];
19803 # [result setBlue:blue];
19804 # if (alpha <= 0.9999) {
19805 # [result setAlpha:floatWrapperWithValue(alpha)];
19806 # }
19807 # [result autorelease];
19808 # return result;
19809 # }
19810 # // ...
19811 #
19812 # Example (JavaScript):
19813 #
19814 # // ...
19815 #
19816 # var protoToCssColor = function(rgb_color) {
19817 # var redFrac = rgb_color.red || 0.0;
19818 # var greenFrac = rgb_color.green || 0.0;
19819 # var blueFrac = rgb_color.blue || 0.0;
19820 # var red = Math.floor(redFrac * 255);
19821 # var green = Math.floor(greenFrac * 255);
19822 # var blue = Math.floor(blueFrac * 255);
19823 #
19824 # if (!('alpha' in rgb_color)) {
19825 # return rgbToCssColor_(red, green, blue);
19826 # }
19827 #
19828 # var alphaFrac = rgb_color.alpha.value || 0.0;
19829 # var rgbParams = [red, green, blue].join(',');
19830 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
19831 # };
19832 #
19833 # var rgbToCssColor_ = function(red, green, blue) {
19834 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
19835 # var hexString = rgbNumber.toString(16);
19836 # var missingZeros = 6 - hexString.length;
19837 # var resultBuilder = ['#'];
19838 # for (var i = 0; i < missingZeros; i++) {
19839 # resultBuilder.push('0');
19840 # }
19841 # resultBuilder.push(hexString);
19842 # return resultBuilder.join('');
19843 # };
19844 #
19845 # // ...
19846 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
19847 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
19848 # the final pixel color is defined by the equation:
19849 #
19850 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
19851 #
19852 # This means that a value of 1.0 corresponds to a solid color, whereas
19853 # a value of 0.0 corresponds to a completely transparent color. This
19854 # uses a wrapper message rather than a simple float scalar so that it is
19855 # possible to distinguish between a default value and the value being unset.
19856 # If omitted, this color object is to be rendered as a solid color
19857 # (as if the alpha value had been explicitly given with a value of 1.0).
19858 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
19859 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
19860 },
19861 "bold": True or False, # True if the text is bold.
19862 "strikethrough": True or False, # True if the text has a strikethrough.
19863 "fontFamily": "A String", # The font family.
19864 "fontSize": 42, # The size of the font.
19865 "italic": True or False, # True if the text is italicized.
19866 "underline": True or False, # True if the text is underlined.
19867 },
19868 "title": "A String", # The title of this axis. If set, this overrides any title inferred
19869 # from headers of the data.
19870 },
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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020091 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
20092 # in start_row.
20093 { # Properties about a dimension.
20094 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
20095 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
20096 "hiddenByFilter": True or False, # True if this dimension is being filtered.
20097 # This field is read-only.
20098 },
20099 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020100 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020101 "startColumn": 42, # The first column this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020102 "rowData": [ # The data in the grid, one entry per row,
20103 # starting with the row in startRow.
20104 # The values in RowData will correspond to columns starting
20105 # at start_column.
20106 { # Data about each cell in a row.
20107 "values": [ # The values in the row, one per column.
20108 { # Data about a specific cell.
20109 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
20110 # is computed dynamically based on its data, grouping, filters, values,
20111 # etc. Only the top-left cell of the pivot table contains the pivot table
20112 # definition. The other cells will contain the calculated values of the
20113 # results of the pivot in their effective_value fields.
20114 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
20115 # or vertically (as rows).
20116 "rows": [ # Each row grouping in the pivot table.
20117 { # A single grouping (either row or column) in a pivot table.
20118 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
20119 "valueMetadata": [ # Metadata about values in the grouping.
20120 { # Metadata about a value in a pivot grouping.
20121 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
20122 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
20123 # (Note that formulaValue is not valid,
20124 # because the values will be calculated.)
20125 "numberValue": 3.14, # Represents a double value.
20126 # Note: Dates, Times and DateTimes are represented as doubles in
20127 # "serial number" format.
20128 "boolValue": True or False, # Represents a boolean value.
20129 "formulaValue": "A String", # Represents a formula.
20130 "stringValue": "A String", # Represents a string value.
20131 # Leading single quotes are not included. For example, if the user typed
20132 # `'123` into the UI, this would be represented as a `stringValue` of
20133 # `"123"`.
20134 "errorValue": { # An error in a cell. # Represents an error.
20135 # This field is read-only.
20136 "message": "A String", # A message with more information about the error
20137 # (in the spreadsheet's locale).
20138 "type": "A String", # The type of error.
20139 },
20140 },
20141 },
20142 ],
20143 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
20144 # If not specified, sorting is alphabetical by this group's values.
20145 "buckets": [ # Determines the bucket from which values are chosen to sort.
20146 #
20147 # For example, in a pivot table with one row group & two column groups,
20148 # the row group can list up to two values. The first value corresponds
20149 # to a value within the first column group, and the second value
20150 # corresponds to a value in the second column group. If no values
20151 # are listed, this would indicate that the row should be sorted according
20152 # to the "Grand Total" over the column groups. If a single value is listed,
20153 # this would correspond to using the "Total" of that bucket.
20154 { # The kinds of value that a cell in a spreadsheet can have.
20155 "numberValue": 3.14, # Represents a double value.
20156 # Note: Dates, Times and DateTimes are represented as doubles in
20157 # "serial number" format.
20158 "boolValue": True or False, # Represents a boolean value.
20159 "formulaValue": "A String", # Represents a formula.
20160 "stringValue": "A String", # Represents a string value.
20161 # Leading single quotes are not included. For example, if the user typed
20162 # `'123` into the UI, this would be represented as a `stringValue` of
20163 # `"123"`.
20164 "errorValue": { # An error in a cell. # Represents an error.
20165 # This field is read-only.
20166 "message": "A String", # A message with more information about the error
20167 # (in the spreadsheet's locale).
20168 "type": "A String", # The type of error.
20169 },
20170 },
20171 ],
20172 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
20173 # grouping should be sorted by.
20174 },
20175 "sortOrder": "A String", # The order the values in this group should be sorted.
20176 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
20177 #
20178 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20179 # means this group refers to column `C`, whereas the offset `1` would refer
20180 # to column `D`.
20181 },
20182 ],
20183 "source": { # A range on a sheet. # The range the pivot table is reading data from.
20184 # All indexes are zero-based.
20185 # Indexes are half open, e.g the start index is inclusive
20186 # and the end index is exclusive -- [start_index, end_index).
20187 # Missing indexes indicate the range is unbounded on that side.
20188 #
20189 # For example, if `"Sheet1"` is sheet ID 0, then:
20190 #
20191 # `Sheet1!A1:A1 == sheet_id: 0,
20192 # start_row_index: 0, end_row_index: 1,
20193 # start_column_index: 0, end_column_index: 1`
20194 #
20195 # `Sheet1!A3:B4 == sheet_id: 0,
20196 # start_row_index: 2, end_row_index: 4,
20197 # start_column_index: 0, end_column_index: 2`
20198 #
20199 # `Sheet1!A:B == sheet_id: 0,
20200 # start_column_index: 0, end_column_index: 2`
20201 #
20202 # `Sheet1!A5:B == sheet_id: 0,
20203 # start_row_index: 4,
20204 # start_column_index: 0, end_column_index: 2`
20205 #
20206 # `Sheet1 == sheet_id:0`
20207 #
20208 # The start index must always be less than or equal to the end index.
20209 # If the start index equals the end index, then the range is empty.
20210 # Empty ranges are typically not meaningful and are usually rendered in the
20211 # UI as `#REF!`.
20212 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020213 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020214 "sheetId": 42, # The sheet this range is on.
20215 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020216 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020217 },
20218 "values": [ # A list of values to include in the pivot table.
20219 { # The definition of how a value in a pivot table should be calculated.
20220 "formula": "A String", # A custom formula to calculate the value. The formula must start
20221 # with an `=` character.
20222 "summarizeFunction": "A String", # A function to summarize the value.
20223 # If formula is set, the only supported values are
20224 # SUM and
20225 # CUSTOM.
20226 # If sourceColumnOffset is set, then `CUSTOM`
20227 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020228 "name": "A String", # A name to use for the value. This is only used if formula was set.
20229 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020230 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
20231 #
20232 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20233 # means this value refers to column `C`, whereas the offset `1` would
20234 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020235 },
20236 ],
20237 "criteria": { # An optional mapping of filters per source column offset.
20238 #
20239 # The filters will be applied before aggregating data into the pivot table.
20240 # The map's key is the column offset of the source range that you want to
20241 # filter, and the value is the criteria for that column.
20242 #
20243 # For example, if the source was `C10:E15`, a key of `0` will have the filter
20244 # for column `C`, whereas the key `1` is for column `D`.
20245 "a_key": { # Criteria for showing/hiding rows in a pivot table.
20246 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
20247 "A String",
20248 ],
20249 },
20250 },
20251 "columns": [ # Each column grouping in the pivot table.
20252 { # A single grouping (either row or column) in a pivot table.
20253 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
20254 "valueMetadata": [ # Metadata about values in the grouping.
20255 { # Metadata about a value in a pivot grouping.
20256 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
20257 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
20258 # (Note that formulaValue is not valid,
20259 # because the values will be calculated.)
20260 "numberValue": 3.14, # Represents a double value.
20261 # Note: Dates, Times and DateTimes are represented as doubles in
20262 # "serial number" format.
20263 "boolValue": True or False, # Represents a boolean value.
20264 "formulaValue": "A String", # Represents a formula.
20265 "stringValue": "A String", # Represents a string value.
20266 # Leading single quotes are not included. For example, if the user typed
20267 # `'123` into the UI, this would be represented as a `stringValue` of
20268 # `"123"`.
20269 "errorValue": { # An error in a cell. # Represents an error.
20270 # This field is read-only.
20271 "message": "A String", # A message with more information about the error
20272 # (in the spreadsheet's locale).
20273 "type": "A String", # The type of error.
20274 },
20275 },
20276 },
20277 ],
20278 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
20279 # If not specified, sorting is alphabetical by this group's values.
20280 "buckets": [ # Determines the bucket from which values are chosen to sort.
20281 #
20282 # For example, in a pivot table with one row group & two column groups,
20283 # the row group can list up to two values. The first value corresponds
20284 # to a value within the first column group, and the second value
20285 # corresponds to a value in the second column group. If no values
20286 # are listed, this would indicate that the row should be sorted according
20287 # to the "Grand Total" over the column groups. If a single value is listed,
20288 # this would correspond to using the "Total" of that bucket.
20289 { # The kinds of value that a cell in a spreadsheet can have.
20290 "numberValue": 3.14, # Represents a double value.
20291 # Note: Dates, Times and DateTimes are represented as doubles in
20292 # "serial number" format.
20293 "boolValue": True or False, # Represents a boolean value.
20294 "formulaValue": "A String", # Represents a formula.
20295 "stringValue": "A String", # Represents a string value.
20296 # Leading single quotes are not included. For example, if the user typed
20297 # `'123` into the UI, this would be represented as a `stringValue` of
20298 # `"123"`.
20299 "errorValue": { # An error in a cell. # Represents an error.
20300 # This field is read-only.
20301 "message": "A String", # A message with more information about the error
20302 # (in the spreadsheet's locale).
20303 "type": "A String", # The type of error.
20304 },
20305 },
20306 ],
20307 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
20308 # grouping should be sorted by.
20309 },
20310 "sortOrder": "A String", # The order the values in this group should be sorted.
20311 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
20312 #
20313 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
20314 # means this group refers to column `C`, whereas the offset `1` would refer
20315 # to column `D`.
20316 },
20317 ],
20318 },
20319 "hyperlink": "A String", # A hyperlink this cell points to, if any.
20320 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
20321 "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
20322 # the calculated value. For cells with literals, this will be
20323 # the same as the user_entered_value.
20324 # This field is read-only.
20325 "numberValue": 3.14, # Represents a double value.
20326 # Note: Dates, Times and DateTimes are represented as doubles in
20327 # "serial number" format.
20328 "boolValue": True or False, # Represents a boolean value.
20329 "formulaValue": "A String", # Represents a formula.
20330 "stringValue": "A String", # Represents a string value.
20331 # Leading single quotes are not included. For example, if the user typed
20332 # `'123` into the UI, this would be represented as a `stringValue` of
20333 # `"123"`.
20334 "errorValue": { # An error in a cell. # Represents an error.
20335 # This field is read-only.
20336 "message": "A String", # A message with more information about the error
20337 # (in the spreadsheet's locale).
20338 "type": "A String", # The type of error.
20339 },
20340 },
20341 "formattedValue": "A String", # The formatted value of the cell.
20342 # This is the value as it's shown to the user.
20343 # This field is read-only.
20344 "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()`
20345 # Note: Dates, Times and DateTimes are represented as doubles in
20346 # serial number format.
20347 "numberValue": 3.14, # Represents a double value.
20348 # Note: Dates, Times and DateTimes are represented as doubles in
20349 # "serial number" format.
20350 "boolValue": True or False, # Represents a boolean value.
20351 "formulaValue": "A String", # Represents a formula.
20352 "stringValue": "A String", # Represents a string value.
20353 # Leading single quotes are not included. For example, if the user typed
20354 # `'123` into the UI, this would be represented as a `stringValue` of
20355 # `"123"`.
20356 "errorValue": { # An error in a cell. # Represents an error.
20357 # This field is read-only.
20358 "message": "A String", # A message with more information about the error
20359 # (in the spreadsheet's locale).
20360 "type": "A String", # The type of error.
20361 },
20362 },
20363 "note": "A String", # Any note on the cell.
20364 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
20365 # This includes the results of applying any conditional formatting and,
20366 # if the cell contains a formula, the computed number format.
20367 # If the effective format is the default format, effective format will
20368 # not be written.
20369 # This field is read-only.
20370 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
20371 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
20372 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020373 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020374 # information about the supported patterns.
20375 "type": "A String", # The type of the number format.
20376 # When writing, this field must be set.
20377 },
20378 "textDirection": "A String", # The direction of the text in the cell.
20379 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
20380 # When updating padding, every field must be specified.
20381 "top": 42, # The top padding of the cell.
20382 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020383 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020384 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020385 },
20386 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
20387 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
20388 # for simplicity of conversion to/from color representations in various
20389 # languages over compactness; for example, the fields of this representation
20390 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20391 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20392 # method in iOS; and, with just a little work, it can be easily formatted into
20393 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20394 #
20395 # Example (Java):
20396 #
20397 # import com.google.type.Color;
20398 #
20399 # // ...
20400 # public static java.awt.Color fromProto(Color protocolor) {
20401 # float alpha = protocolor.hasAlpha()
20402 # ? protocolor.getAlpha().getValue()
20403 # : 1.0;
20404 #
20405 # return new java.awt.Color(
20406 # protocolor.getRed(),
20407 # protocolor.getGreen(),
20408 # protocolor.getBlue(),
20409 # alpha);
20410 # }
20411 #
20412 # public static Color toProto(java.awt.Color color) {
20413 # float red = (float) color.getRed();
20414 # float green = (float) color.getGreen();
20415 # float blue = (float) color.getBlue();
20416 # float denominator = 255.0;
20417 # Color.Builder resultBuilder =
20418 # Color
20419 # .newBuilder()
20420 # .setRed(red / denominator)
20421 # .setGreen(green / denominator)
20422 # .setBlue(blue / denominator);
20423 # int alpha = color.getAlpha();
20424 # if (alpha != 255) {
20425 # result.setAlpha(
20426 # FloatValue
20427 # .newBuilder()
20428 # .setValue(((float) alpha) / denominator)
20429 # .build());
20430 # }
20431 # return resultBuilder.build();
20432 # }
20433 # // ...
20434 #
20435 # Example (iOS / Obj-C):
20436 #
20437 # // ...
20438 # static UIColor* fromProto(Color* protocolor) {
20439 # float red = [protocolor red];
20440 # float green = [protocolor green];
20441 # float blue = [protocolor blue];
20442 # FloatValue* alpha_wrapper = [protocolor alpha];
20443 # float alpha = 1.0;
20444 # if (alpha_wrapper != nil) {
20445 # alpha = [alpha_wrapper value];
20446 # }
20447 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20448 # }
20449 #
20450 # static Color* toProto(UIColor* color) {
20451 # CGFloat red, green, blue, alpha;
20452 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20453 # return nil;
20454 # }
20455 # Color* result = [Color alloc] init];
20456 # [result setRed:red];
20457 # [result setGreen:green];
20458 # [result setBlue:blue];
20459 # if (alpha <= 0.9999) {
20460 # [result setAlpha:floatWrapperWithValue(alpha)];
20461 # }
20462 # [result autorelease];
20463 # return result;
20464 # }
20465 # // ...
20466 #
20467 # Example (JavaScript):
20468 #
20469 # // ...
20470 #
20471 # var protoToCssColor = function(rgb_color) {
20472 # var redFrac = rgb_color.red || 0.0;
20473 # var greenFrac = rgb_color.green || 0.0;
20474 # var blueFrac = rgb_color.blue || 0.0;
20475 # var red = Math.floor(redFrac * 255);
20476 # var green = Math.floor(greenFrac * 255);
20477 # var blue = Math.floor(blueFrac * 255);
20478 #
20479 # if (!('alpha' in rgb_color)) {
20480 # return rgbToCssColor_(red, green, blue);
20481 # }
20482 #
20483 # var alphaFrac = rgb_color.alpha.value || 0.0;
20484 # var rgbParams = [red, green, blue].join(',');
20485 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20486 # };
20487 #
20488 # var rgbToCssColor_ = function(red, green, blue) {
20489 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20490 # var hexString = rgbNumber.toString(16);
20491 # var missingZeros = 6 - hexString.length;
20492 # var resultBuilder = ['#'];
20493 # for (var i = 0; i < missingZeros; i++) {
20494 # resultBuilder.push('0');
20495 # }
20496 # resultBuilder.push(hexString);
20497 # return resultBuilder.join('');
20498 # };
20499 #
20500 # // ...
20501 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20502 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20503 # the final pixel color is defined by the equation:
20504 #
20505 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20506 #
20507 # This means that a value of 1.0 corresponds to a solid color, whereas
20508 # a value of 0.0 corresponds to a completely transparent color. This
20509 # uses a wrapper message rather than a simple float scalar so that it is
20510 # possible to distinguish between a default value and the value being unset.
20511 # If omitted, this color object is to be rendered as a solid color
20512 # (as if the alpha value had been explicitly given with a value of 1.0).
20513 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20514 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20515 },
20516 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
20517 "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).
20518 # Absent values indicate that the field isn't specified.
20519 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
20520 # for simplicity of conversion to/from color representations in various
20521 # languages over compactness; for example, the fields of this representation
20522 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20523 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20524 # method in iOS; and, with just a little work, it can be easily formatted into
20525 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20526 #
20527 # Example (Java):
20528 #
20529 # import com.google.type.Color;
20530 #
20531 # // ...
20532 # public static java.awt.Color fromProto(Color protocolor) {
20533 # float alpha = protocolor.hasAlpha()
20534 # ? protocolor.getAlpha().getValue()
20535 # : 1.0;
20536 #
20537 # return new java.awt.Color(
20538 # protocolor.getRed(),
20539 # protocolor.getGreen(),
20540 # protocolor.getBlue(),
20541 # alpha);
20542 # }
20543 #
20544 # public static Color toProto(java.awt.Color color) {
20545 # float red = (float) color.getRed();
20546 # float green = (float) color.getGreen();
20547 # float blue = (float) color.getBlue();
20548 # float denominator = 255.0;
20549 # Color.Builder resultBuilder =
20550 # Color
20551 # .newBuilder()
20552 # .setRed(red / denominator)
20553 # .setGreen(green / denominator)
20554 # .setBlue(blue / denominator);
20555 # int alpha = color.getAlpha();
20556 # if (alpha != 255) {
20557 # result.setAlpha(
20558 # FloatValue
20559 # .newBuilder()
20560 # .setValue(((float) alpha) / denominator)
20561 # .build());
20562 # }
20563 # return resultBuilder.build();
20564 # }
20565 # // ...
20566 #
20567 # Example (iOS / Obj-C):
20568 #
20569 # // ...
20570 # static UIColor* fromProto(Color* protocolor) {
20571 # float red = [protocolor red];
20572 # float green = [protocolor green];
20573 # float blue = [protocolor blue];
20574 # FloatValue* alpha_wrapper = [protocolor alpha];
20575 # float alpha = 1.0;
20576 # if (alpha_wrapper != nil) {
20577 # alpha = [alpha_wrapper value];
20578 # }
20579 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20580 # }
20581 #
20582 # static Color* toProto(UIColor* color) {
20583 # CGFloat red, green, blue, alpha;
20584 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20585 # return nil;
20586 # }
20587 # Color* result = [Color alloc] init];
20588 # [result setRed:red];
20589 # [result setGreen:green];
20590 # [result setBlue:blue];
20591 # if (alpha <= 0.9999) {
20592 # [result setAlpha:floatWrapperWithValue(alpha)];
20593 # }
20594 # [result autorelease];
20595 # return result;
20596 # }
20597 # // ...
20598 #
20599 # Example (JavaScript):
20600 #
20601 # // ...
20602 #
20603 # var protoToCssColor = function(rgb_color) {
20604 # var redFrac = rgb_color.red || 0.0;
20605 # var greenFrac = rgb_color.green || 0.0;
20606 # var blueFrac = rgb_color.blue || 0.0;
20607 # var red = Math.floor(redFrac * 255);
20608 # var green = Math.floor(greenFrac * 255);
20609 # var blue = Math.floor(blueFrac * 255);
20610 #
20611 # if (!('alpha' in rgb_color)) {
20612 # return rgbToCssColor_(red, green, blue);
20613 # }
20614 #
20615 # var alphaFrac = rgb_color.alpha.value || 0.0;
20616 # var rgbParams = [red, green, blue].join(',');
20617 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20618 # };
20619 #
20620 # var rgbToCssColor_ = function(red, green, blue) {
20621 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20622 # var hexString = rgbNumber.toString(16);
20623 # var missingZeros = 6 - hexString.length;
20624 # var resultBuilder = ['#'];
20625 # for (var i = 0; i < missingZeros; i++) {
20626 # resultBuilder.push('0');
20627 # }
20628 # resultBuilder.push(hexString);
20629 # return resultBuilder.join('');
20630 # };
20631 #
20632 # // ...
20633 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20634 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20635 # the final pixel color is defined by the equation:
20636 #
20637 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20638 #
20639 # This means that a value of 1.0 corresponds to a solid color, whereas
20640 # a value of 0.0 corresponds to a completely transparent color. This
20641 # uses a wrapper message rather than a simple float scalar so that it is
20642 # possible to distinguish between a default value and the value being unset.
20643 # If omitted, this color object is to be rendered as a solid color
20644 # (as if the alpha value had been explicitly given with a value of 1.0).
20645 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20646 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20647 },
20648 "bold": True or False, # True if the text is bold.
20649 "strikethrough": True or False, # True if the text has a strikethrough.
20650 "fontFamily": "A String", # The font family.
20651 "fontSize": 42, # The size of the font.
20652 "italic": True or False, # True if the text is italicized.
20653 "underline": True or False, # True if the text is underlined.
20654 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040020655 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080020656 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
20657 "borders": { # The borders of the cell. # The borders of the cell.
20658 "top": { # A border along a cell. # The top border of the cell.
20659 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20660 # for simplicity of conversion to/from color representations in various
20661 # languages over compactness; for example, the fields of this representation
20662 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20663 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20664 # method in iOS; and, with just a little work, it can be easily formatted into
20665 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20666 #
20667 # Example (Java):
20668 #
20669 # import com.google.type.Color;
20670 #
20671 # // ...
20672 # public static java.awt.Color fromProto(Color protocolor) {
20673 # float alpha = protocolor.hasAlpha()
20674 # ? protocolor.getAlpha().getValue()
20675 # : 1.0;
20676 #
20677 # return new java.awt.Color(
20678 # protocolor.getRed(),
20679 # protocolor.getGreen(),
20680 # protocolor.getBlue(),
20681 # alpha);
20682 # }
20683 #
20684 # public static Color toProto(java.awt.Color color) {
20685 # float red = (float) color.getRed();
20686 # float green = (float) color.getGreen();
20687 # float blue = (float) color.getBlue();
20688 # float denominator = 255.0;
20689 # Color.Builder resultBuilder =
20690 # Color
20691 # .newBuilder()
20692 # .setRed(red / denominator)
20693 # .setGreen(green / denominator)
20694 # .setBlue(blue / denominator);
20695 # int alpha = color.getAlpha();
20696 # if (alpha != 255) {
20697 # result.setAlpha(
20698 # FloatValue
20699 # .newBuilder()
20700 # .setValue(((float) alpha) / denominator)
20701 # .build());
20702 # }
20703 # return resultBuilder.build();
20704 # }
20705 # // ...
20706 #
20707 # Example (iOS / Obj-C):
20708 #
20709 # // ...
20710 # static UIColor* fromProto(Color* protocolor) {
20711 # float red = [protocolor red];
20712 # float green = [protocolor green];
20713 # float blue = [protocolor blue];
20714 # FloatValue* alpha_wrapper = [protocolor alpha];
20715 # float alpha = 1.0;
20716 # if (alpha_wrapper != nil) {
20717 # alpha = [alpha_wrapper value];
20718 # }
20719 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20720 # }
20721 #
20722 # static Color* toProto(UIColor* color) {
20723 # CGFloat red, green, blue, alpha;
20724 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20725 # return nil;
20726 # }
20727 # Color* result = [Color alloc] init];
20728 # [result setRed:red];
20729 # [result setGreen:green];
20730 # [result setBlue:blue];
20731 # if (alpha <= 0.9999) {
20732 # [result setAlpha:floatWrapperWithValue(alpha)];
20733 # }
20734 # [result autorelease];
20735 # return result;
20736 # }
20737 # // ...
20738 #
20739 # Example (JavaScript):
20740 #
20741 # // ...
20742 #
20743 # var protoToCssColor = function(rgb_color) {
20744 # var redFrac = rgb_color.red || 0.0;
20745 # var greenFrac = rgb_color.green || 0.0;
20746 # var blueFrac = rgb_color.blue || 0.0;
20747 # var red = Math.floor(redFrac * 255);
20748 # var green = Math.floor(greenFrac * 255);
20749 # var blue = Math.floor(blueFrac * 255);
20750 #
20751 # if (!('alpha' in rgb_color)) {
20752 # return rgbToCssColor_(red, green, blue);
20753 # }
20754 #
20755 # var alphaFrac = rgb_color.alpha.value || 0.0;
20756 # var rgbParams = [red, green, blue].join(',');
20757 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20758 # };
20759 #
20760 # var rgbToCssColor_ = function(red, green, blue) {
20761 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20762 # var hexString = rgbNumber.toString(16);
20763 # var missingZeros = 6 - hexString.length;
20764 # var resultBuilder = ['#'];
20765 # for (var i = 0; i < missingZeros; i++) {
20766 # resultBuilder.push('0');
20767 # }
20768 # resultBuilder.push(hexString);
20769 # return resultBuilder.join('');
20770 # };
20771 #
20772 # // ...
20773 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20774 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20775 # the final pixel color is defined by the equation:
20776 #
20777 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20778 #
20779 # This means that a value of 1.0 corresponds to a solid color, whereas
20780 # a value of 0.0 corresponds to a completely transparent color. This
20781 # uses a wrapper message rather than a simple float scalar so that it is
20782 # possible to distinguish between a default value and the value being unset.
20783 # If omitted, this color object is to be rendered as a solid color
20784 # (as if the alpha value had been explicitly given with a value of 1.0).
20785 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20786 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20787 },
20788 "width": 42, # The width of the border, in pixels.
20789 # Deprecated; the width is determined by the "style" field.
20790 "style": "A String", # The style of the border.
20791 },
20792 "right": { # A border along a cell. # The right border of the cell.
20793 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20794 # for simplicity of conversion to/from color representations in various
20795 # languages over compactness; for example, the fields of this representation
20796 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20797 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20798 # method in iOS; and, with just a little work, it can be easily formatted into
20799 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20800 #
20801 # Example (Java):
20802 #
20803 # import com.google.type.Color;
20804 #
20805 # // ...
20806 # public static java.awt.Color fromProto(Color protocolor) {
20807 # float alpha = protocolor.hasAlpha()
20808 # ? protocolor.getAlpha().getValue()
20809 # : 1.0;
20810 #
20811 # return new java.awt.Color(
20812 # protocolor.getRed(),
20813 # protocolor.getGreen(),
20814 # protocolor.getBlue(),
20815 # alpha);
20816 # }
20817 #
20818 # public static Color toProto(java.awt.Color color) {
20819 # float red = (float) color.getRed();
20820 # float green = (float) color.getGreen();
20821 # float blue = (float) color.getBlue();
20822 # float denominator = 255.0;
20823 # Color.Builder resultBuilder =
20824 # Color
20825 # .newBuilder()
20826 # .setRed(red / denominator)
20827 # .setGreen(green / denominator)
20828 # .setBlue(blue / denominator);
20829 # int alpha = color.getAlpha();
20830 # if (alpha != 255) {
20831 # result.setAlpha(
20832 # FloatValue
20833 # .newBuilder()
20834 # .setValue(((float) alpha) / denominator)
20835 # .build());
20836 # }
20837 # return resultBuilder.build();
20838 # }
20839 # // ...
20840 #
20841 # Example (iOS / Obj-C):
20842 #
20843 # // ...
20844 # static UIColor* fromProto(Color* protocolor) {
20845 # float red = [protocolor red];
20846 # float green = [protocolor green];
20847 # float blue = [protocolor blue];
20848 # FloatValue* alpha_wrapper = [protocolor alpha];
20849 # float alpha = 1.0;
20850 # if (alpha_wrapper != nil) {
20851 # alpha = [alpha_wrapper value];
20852 # }
20853 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20854 # }
20855 #
20856 # static Color* toProto(UIColor* color) {
20857 # CGFloat red, green, blue, alpha;
20858 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20859 # return nil;
20860 # }
20861 # Color* result = [Color alloc] init];
20862 # [result setRed:red];
20863 # [result setGreen:green];
20864 # [result setBlue:blue];
20865 # if (alpha <= 0.9999) {
20866 # [result setAlpha:floatWrapperWithValue(alpha)];
20867 # }
20868 # [result autorelease];
20869 # return result;
20870 # }
20871 # // ...
20872 #
20873 # Example (JavaScript):
20874 #
20875 # // ...
20876 #
20877 # var protoToCssColor = function(rgb_color) {
20878 # var redFrac = rgb_color.red || 0.0;
20879 # var greenFrac = rgb_color.green || 0.0;
20880 # var blueFrac = rgb_color.blue || 0.0;
20881 # var red = Math.floor(redFrac * 255);
20882 # var green = Math.floor(greenFrac * 255);
20883 # var blue = Math.floor(blueFrac * 255);
20884 #
20885 # if (!('alpha' in rgb_color)) {
20886 # return rgbToCssColor_(red, green, blue);
20887 # }
20888 #
20889 # var alphaFrac = rgb_color.alpha.value || 0.0;
20890 # var rgbParams = [red, green, blue].join(',');
20891 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
20892 # };
20893 #
20894 # var rgbToCssColor_ = function(red, green, blue) {
20895 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
20896 # var hexString = rgbNumber.toString(16);
20897 # var missingZeros = 6 - hexString.length;
20898 # var resultBuilder = ['#'];
20899 # for (var i = 0; i < missingZeros; i++) {
20900 # resultBuilder.push('0');
20901 # }
20902 # resultBuilder.push(hexString);
20903 # return resultBuilder.join('');
20904 # };
20905 #
20906 # // ...
20907 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
20908 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
20909 # the final pixel color is defined by the equation:
20910 #
20911 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
20912 #
20913 # This means that a value of 1.0 corresponds to a solid color, whereas
20914 # a value of 0.0 corresponds to a completely transparent color. This
20915 # uses a wrapper message rather than a simple float scalar so that it is
20916 # possible to distinguish between a default value and the value being unset.
20917 # If omitted, this color object is to be rendered as a solid color
20918 # (as if the alpha value had been explicitly given with a value of 1.0).
20919 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
20920 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
20921 },
20922 "width": 42, # The width of the border, in pixels.
20923 # Deprecated; the width is determined by the "style" field.
20924 "style": "A String", # The style of the border.
20925 },
20926 "bottom": { # A border along a cell. # The bottom border of the cell.
20927 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
20928 # for simplicity of conversion to/from color representations in various
20929 # languages over compactness; for example, the fields of this representation
20930 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
20931 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
20932 # method in iOS; and, with just a little work, it can be easily formatted into
20933 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
20934 #
20935 # Example (Java):
20936 #
20937 # import com.google.type.Color;
20938 #
20939 # // ...
20940 # public static java.awt.Color fromProto(Color protocolor) {
20941 # float alpha = protocolor.hasAlpha()
20942 # ? protocolor.getAlpha().getValue()
20943 # : 1.0;
20944 #
20945 # return new java.awt.Color(
20946 # protocolor.getRed(),
20947 # protocolor.getGreen(),
20948 # protocolor.getBlue(),
20949 # alpha);
20950 # }
20951 #
20952 # public static Color toProto(java.awt.Color color) {
20953 # float red = (float) color.getRed();
20954 # float green = (float) color.getGreen();
20955 # float blue = (float) color.getBlue();
20956 # float denominator = 255.0;
20957 # Color.Builder resultBuilder =
20958 # Color
20959 # .newBuilder()
20960 # .setRed(red / denominator)
20961 # .setGreen(green / denominator)
20962 # .setBlue(blue / denominator);
20963 # int alpha = color.getAlpha();
20964 # if (alpha != 255) {
20965 # result.setAlpha(
20966 # FloatValue
20967 # .newBuilder()
20968 # .setValue(((float) alpha) / denominator)
20969 # .build());
20970 # }
20971 # return resultBuilder.build();
20972 # }
20973 # // ...
20974 #
20975 # Example (iOS / Obj-C):
20976 #
20977 # // ...
20978 # static UIColor* fromProto(Color* protocolor) {
20979 # float red = [protocolor red];
20980 # float green = [protocolor green];
20981 # float blue = [protocolor blue];
20982 # FloatValue* alpha_wrapper = [protocolor alpha];
20983 # float alpha = 1.0;
20984 # if (alpha_wrapper != nil) {
20985 # alpha = [alpha_wrapper value];
20986 # }
20987 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
20988 # }
20989 #
20990 # static Color* toProto(UIColor* color) {
20991 # CGFloat red, green, blue, alpha;
20992 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
20993 # return nil;
20994 # }
20995 # Color* result = [Color alloc] init];
20996 # [result setRed:red];
20997 # [result setGreen:green];
20998 # [result setBlue:blue];
20999 # if (alpha <= 0.9999) {
21000 # [result setAlpha:floatWrapperWithValue(alpha)];
21001 # }
21002 # [result autorelease];
21003 # return result;
21004 # }
21005 # // ...
21006 #
21007 # Example (JavaScript):
21008 #
21009 # // ...
21010 #
21011 # var protoToCssColor = function(rgb_color) {
21012 # var redFrac = rgb_color.red || 0.0;
21013 # var greenFrac = rgb_color.green || 0.0;
21014 # var blueFrac = rgb_color.blue || 0.0;
21015 # var red = Math.floor(redFrac * 255);
21016 # var green = Math.floor(greenFrac * 255);
21017 # var blue = Math.floor(blueFrac * 255);
21018 #
21019 # if (!('alpha' in rgb_color)) {
21020 # return rgbToCssColor_(red, green, blue);
21021 # }
21022 #
21023 # var alphaFrac = rgb_color.alpha.value || 0.0;
21024 # var rgbParams = [red, green, blue].join(',');
21025 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21026 # };
21027 #
21028 # var rgbToCssColor_ = function(red, green, blue) {
21029 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21030 # var hexString = rgbNumber.toString(16);
21031 # var missingZeros = 6 - hexString.length;
21032 # var resultBuilder = ['#'];
21033 # for (var i = 0; i < missingZeros; i++) {
21034 # resultBuilder.push('0');
21035 # }
21036 # resultBuilder.push(hexString);
21037 # return resultBuilder.join('');
21038 # };
21039 #
21040 # // ...
21041 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21042 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21043 # the final pixel color is defined by the equation:
21044 #
21045 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21046 #
21047 # This means that a value of 1.0 corresponds to a solid color, whereas
21048 # a value of 0.0 corresponds to a completely transparent color. This
21049 # uses a wrapper message rather than a simple float scalar so that it is
21050 # possible to distinguish between a default value and the value being unset.
21051 # If omitted, this color object is to be rendered as a solid color
21052 # (as if the alpha value had been explicitly given with a value of 1.0).
21053 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21054 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21055 },
21056 "width": 42, # The width of the border, in pixels.
21057 # Deprecated; the width is determined by the "style" field.
21058 "style": "A String", # The style of the border.
21059 },
21060 "left": { # A border along a cell. # The left border of the cell.
21061 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21062 # for simplicity of conversion to/from color representations in various
21063 # languages over compactness; for example, the fields of this representation
21064 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21065 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21066 # method in iOS; and, with just a little work, it can be easily formatted into
21067 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21068 #
21069 # Example (Java):
21070 #
21071 # import com.google.type.Color;
21072 #
21073 # // ...
21074 # public static java.awt.Color fromProto(Color protocolor) {
21075 # float alpha = protocolor.hasAlpha()
21076 # ? protocolor.getAlpha().getValue()
21077 # : 1.0;
21078 #
21079 # return new java.awt.Color(
21080 # protocolor.getRed(),
21081 # protocolor.getGreen(),
21082 # protocolor.getBlue(),
21083 # alpha);
21084 # }
21085 #
21086 # public static Color toProto(java.awt.Color color) {
21087 # float red = (float) color.getRed();
21088 # float green = (float) color.getGreen();
21089 # float blue = (float) color.getBlue();
21090 # float denominator = 255.0;
21091 # Color.Builder resultBuilder =
21092 # Color
21093 # .newBuilder()
21094 # .setRed(red / denominator)
21095 # .setGreen(green / denominator)
21096 # .setBlue(blue / denominator);
21097 # int alpha = color.getAlpha();
21098 # if (alpha != 255) {
21099 # result.setAlpha(
21100 # FloatValue
21101 # .newBuilder()
21102 # .setValue(((float) alpha) / denominator)
21103 # .build());
21104 # }
21105 # return resultBuilder.build();
21106 # }
21107 # // ...
21108 #
21109 # Example (iOS / Obj-C):
21110 #
21111 # // ...
21112 # static UIColor* fromProto(Color* protocolor) {
21113 # float red = [protocolor red];
21114 # float green = [protocolor green];
21115 # float blue = [protocolor blue];
21116 # FloatValue* alpha_wrapper = [protocolor alpha];
21117 # float alpha = 1.0;
21118 # if (alpha_wrapper != nil) {
21119 # alpha = [alpha_wrapper value];
21120 # }
21121 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21122 # }
21123 #
21124 # static Color* toProto(UIColor* color) {
21125 # CGFloat red, green, blue, alpha;
21126 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21127 # return nil;
21128 # }
21129 # Color* result = [Color alloc] init];
21130 # [result setRed:red];
21131 # [result setGreen:green];
21132 # [result setBlue:blue];
21133 # if (alpha <= 0.9999) {
21134 # [result setAlpha:floatWrapperWithValue(alpha)];
21135 # }
21136 # [result autorelease];
21137 # return result;
21138 # }
21139 # // ...
21140 #
21141 # Example (JavaScript):
21142 #
21143 # // ...
21144 #
21145 # var protoToCssColor = function(rgb_color) {
21146 # var redFrac = rgb_color.red || 0.0;
21147 # var greenFrac = rgb_color.green || 0.0;
21148 # var blueFrac = rgb_color.blue || 0.0;
21149 # var red = Math.floor(redFrac * 255);
21150 # var green = Math.floor(greenFrac * 255);
21151 # var blue = Math.floor(blueFrac * 255);
21152 #
21153 # if (!('alpha' in rgb_color)) {
21154 # return rgbToCssColor_(red, green, blue);
21155 # }
21156 #
21157 # var alphaFrac = rgb_color.alpha.value || 0.0;
21158 # var rgbParams = [red, green, blue].join(',');
21159 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21160 # };
21161 #
21162 # var rgbToCssColor_ = function(red, green, blue) {
21163 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21164 # var hexString = rgbNumber.toString(16);
21165 # var missingZeros = 6 - hexString.length;
21166 # var resultBuilder = ['#'];
21167 # for (var i = 0; i < missingZeros; i++) {
21168 # resultBuilder.push('0');
21169 # }
21170 # resultBuilder.push(hexString);
21171 # return resultBuilder.join('');
21172 # };
21173 #
21174 # // ...
21175 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21176 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21177 # the final pixel color is defined by the equation:
21178 #
21179 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21180 #
21181 # This means that a value of 1.0 corresponds to a solid color, whereas
21182 # a value of 0.0 corresponds to a completely transparent color. This
21183 # uses a wrapper message rather than a simple float scalar so that it is
21184 # possible to distinguish between a default value and the value being unset.
21185 # If omitted, this color object is to be rendered as a solid color
21186 # (as if the alpha value had been explicitly given with a value of 1.0).
21187 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21188 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21189 },
21190 "width": 42, # The width of the border, in pixels.
21191 # Deprecated; the width is determined by the "style" field.
21192 "style": "A String", # The style of the border.
21193 },
21194 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021195 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
21196 "angle": 42, # The angle between the standard orientation and the desired orientation.
21197 # Measured in degrees. Valid values are between -90 and 90. Positive
21198 # angles are angled upwards, negative are angled downwards.
21199 #
21200 # Note: For LTR text direction positive angles are in the counterclockwise
21201 # direction, whereas for RTL they are in the clockwise direction
21202 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
21203 # characters is unchanged.
21204 # For example:
21205 #
21206 # | V |
21207 # | e |
21208 # | r |
21209 # | t |
21210 # | i |
21211 # | c |
21212 # | a |
21213 # | l |
21214 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021215 },
21216 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
21217 #
21218 # When writing, the new format will be merged with the existing format.
21219 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
21220 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
21221 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021222 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021223 # information about the supported patterns.
21224 "type": "A String", # The type of the number format.
21225 # When writing, this field must be set.
21226 },
21227 "textDirection": "A String", # The direction of the text in the cell.
21228 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
21229 # When updating padding, every field must be specified.
21230 "top": 42, # The top padding of the cell.
21231 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021232 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021233 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021234 },
21235 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
21236 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
21237 # for simplicity of conversion to/from color representations in various
21238 # languages over compactness; for example, the fields of this representation
21239 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21240 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21241 # method in iOS; and, with just a little work, it can be easily formatted into
21242 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21243 #
21244 # Example (Java):
21245 #
21246 # import com.google.type.Color;
21247 #
21248 # // ...
21249 # public static java.awt.Color fromProto(Color protocolor) {
21250 # float alpha = protocolor.hasAlpha()
21251 # ? protocolor.getAlpha().getValue()
21252 # : 1.0;
21253 #
21254 # return new java.awt.Color(
21255 # protocolor.getRed(),
21256 # protocolor.getGreen(),
21257 # protocolor.getBlue(),
21258 # alpha);
21259 # }
21260 #
21261 # public static Color toProto(java.awt.Color color) {
21262 # float red = (float) color.getRed();
21263 # float green = (float) color.getGreen();
21264 # float blue = (float) color.getBlue();
21265 # float denominator = 255.0;
21266 # Color.Builder resultBuilder =
21267 # Color
21268 # .newBuilder()
21269 # .setRed(red / denominator)
21270 # .setGreen(green / denominator)
21271 # .setBlue(blue / denominator);
21272 # int alpha = color.getAlpha();
21273 # if (alpha != 255) {
21274 # result.setAlpha(
21275 # FloatValue
21276 # .newBuilder()
21277 # .setValue(((float) alpha) / denominator)
21278 # .build());
21279 # }
21280 # return resultBuilder.build();
21281 # }
21282 # // ...
21283 #
21284 # Example (iOS / Obj-C):
21285 #
21286 # // ...
21287 # static UIColor* fromProto(Color* protocolor) {
21288 # float red = [protocolor red];
21289 # float green = [protocolor green];
21290 # float blue = [protocolor blue];
21291 # FloatValue* alpha_wrapper = [protocolor alpha];
21292 # float alpha = 1.0;
21293 # if (alpha_wrapper != nil) {
21294 # alpha = [alpha_wrapper value];
21295 # }
21296 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21297 # }
21298 #
21299 # static Color* toProto(UIColor* color) {
21300 # CGFloat red, green, blue, alpha;
21301 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21302 # return nil;
21303 # }
21304 # Color* result = [Color alloc] init];
21305 # [result setRed:red];
21306 # [result setGreen:green];
21307 # [result setBlue:blue];
21308 # if (alpha <= 0.9999) {
21309 # [result setAlpha:floatWrapperWithValue(alpha)];
21310 # }
21311 # [result autorelease];
21312 # return result;
21313 # }
21314 # // ...
21315 #
21316 # Example (JavaScript):
21317 #
21318 # // ...
21319 #
21320 # var protoToCssColor = function(rgb_color) {
21321 # var redFrac = rgb_color.red || 0.0;
21322 # var greenFrac = rgb_color.green || 0.0;
21323 # var blueFrac = rgb_color.blue || 0.0;
21324 # var red = Math.floor(redFrac * 255);
21325 # var green = Math.floor(greenFrac * 255);
21326 # var blue = Math.floor(blueFrac * 255);
21327 #
21328 # if (!('alpha' in rgb_color)) {
21329 # return rgbToCssColor_(red, green, blue);
21330 # }
21331 #
21332 # var alphaFrac = rgb_color.alpha.value || 0.0;
21333 # var rgbParams = [red, green, blue].join(',');
21334 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21335 # };
21336 #
21337 # var rgbToCssColor_ = function(red, green, blue) {
21338 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21339 # var hexString = rgbNumber.toString(16);
21340 # var missingZeros = 6 - hexString.length;
21341 # var resultBuilder = ['#'];
21342 # for (var i = 0; i < missingZeros; i++) {
21343 # resultBuilder.push('0');
21344 # }
21345 # resultBuilder.push(hexString);
21346 # return resultBuilder.join('');
21347 # };
21348 #
21349 # // ...
21350 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21351 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21352 # the final pixel color is defined by the equation:
21353 #
21354 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21355 #
21356 # This means that a value of 1.0 corresponds to a solid color, whereas
21357 # a value of 0.0 corresponds to a completely transparent color. This
21358 # uses a wrapper message rather than a simple float scalar so that it is
21359 # possible to distinguish between a default value and the value being unset.
21360 # If omitted, this color object is to be rendered as a solid color
21361 # (as if the alpha value had been explicitly given with a value of 1.0).
21362 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21363 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21364 },
21365 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
21366 "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).
21367 # Absent values indicate that the field isn't specified.
21368 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
21369 # for simplicity of conversion to/from color representations in various
21370 # languages over compactness; for example, the fields of this representation
21371 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21372 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21373 # method in iOS; and, with just a little work, it can be easily formatted into
21374 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21375 #
21376 # Example (Java):
21377 #
21378 # import com.google.type.Color;
21379 #
21380 # // ...
21381 # public static java.awt.Color fromProto(Color protocolor) {
21382 # float alpha = protocolor.hasAlpha()
21383 # ? protocolor.getAlpha().getValue()
21384 # : 1.0;
21385 #
21386 # return new java.awt.Color(
21387 # protocolor.getRed(),
21388 # protocolor.getGreen(),
21389 # protocolor.getBlue(),
21390 # alpha);
21391 # }
21392 #
21393 # public static Color toProto(java.awt.Color color) {
21394 # float red = (float) color.getRed();
21395 # float green = (float) color.getGreen();
21396 # float blue = (float) color.getBlue();
21397 # float denominator = 255.0;
21398 # Color.Builder resultBuilder =
21399 # Color
21400 # .newBuilder()
21401 # .setRed(red / denominator)
21402 # .setGreen(green / denominator)
21403 # .setBlue(blue / denominator);
21404 # int alpha = color.getAlpha();
21405 # if (alpha != 255) {
21406 # result.setAlpha(
21407 # FloatValue
21408 # .newBuilder()
21409 # .setValue(((float) alpha) / denominator)
21410 # .build());
21411 # }
21412 # return resultBuilder.build();
21413 # }
21414 # // ...
21415 #
21416 # Example (iOS / Obj-C):
21417 #
21418 # // ...
21419 # static UIColor* fromProto(Color* protocolor) {
21420 # float red = [protocolor red];
21421 # float green = [protocolor green];
21422 # float blue = [protocolor blue];
21423 # FloatValue* alpha_wrapper = [protocolor alpha];
21424 # float alpha = 1.0;
21425 # if (alpha_wrapper != nil) {
21426 # alpha = [alpha_wrapper value];
21427 # }
21428 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21429 # }
21430 #
21431 # static Color* toProto(UIColor* color) {
21432 # CGFloat red, green, blue, alpha;
21433 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21434 # return nil;
21435 # }
21436 # Color* result = [Color alloc] init];
21437 # [result setRed:red];
21438 # [result setGreen:green];
21439 # [result setBlue:blue];
21440 # if (alpha <= 0.9999) {
21441 # [result setAlpha:floatWrapperWithValue(alpha)];
21442 # }
21443 # [result autorelease];
21444 # return result;
21445 # }
21446 # // ...
21447 #
21448 # Example (JavaScript):
21449 #
21450 # // ...
21451 #
21452 # var protoToCssColor = function(rgb_color) {
21453 # var redFrac = rgb_color.red || 0.0;
21454 # var greenFrac = rgb_color.green || 0.0;
21455 # var blueFrac = rgb_color.blue || 0.0;
21456 # var red = Math.floor(redFrac * 255);
21457 # var green = Math.floor(greenFrac * 255);
21458 # var blue = Math.floor(blueFrac * 255);
21459 #
21460 # if (!('alpha' in rgb_color)) {
21461 # return rgbToCssColor_(red, green, blue);
21462 # }
21463 #
21464 # var alphaFrac = rgb_color.alpha.value || 0.0;
21465 # var rgbParams = [red, green, blue].join(',');
21466 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21467 # };
21468 #
21469 # var rgbToCssColor_ = function(red, green, blue) {
21470 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21471 # var hexString = rgbNumber.toString(16);
21472 # var missingZeros = 6 - hexString.length;
21473 # var resultBuilder = ['#'];
21474 # for (var i = 0; i < missingZeros; i++) {
21475 # resultBuilder.push('0');
21476 # }
21477 # resultBuilder.push(hexString);
21478 # return resultBuilder.join('');
21479 # };
21480 #
21481 # // ...
21482 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21483 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21484 # the final pixel color is defined by the equation:
21485 #
21486 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21487 #
21488 # This means that a value of 1.0 corresponds to a solid color, whereas
21489 # a value of 0.0 corresponds to a completely transparent color. This
21490 # uses a wrapper message rather than a simple float scalar so that it is
21491 # possible to distinguish between a default value and the value being unset.
21492 # If omitted, this color object is to be rendered as a solid color
21493 # (as if the alpha value had been explicitly given with a value of 1.0).
21494 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21495 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21496 },
21497 "bold": True or False, # True if the text is bold.
21498 "strikethrough": True or False, # True if the text has a strikethrough.
21499 "fontFamily": "A String", # The font family.
21500 "fontSize": 42, # The size of the font.
21501 "italic": True or False, # True if the text is italicized.
21502 "underline": True or False, # True if the text is underlined.
21503 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040021504 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080021505 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
21506 "borders": { # The borders of the cell. # The borders of the cell.
21507 "top": { # A border along a cell. # The top border of the cell.
21508 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21509 # for simplicity of conversion to/from color representations in various
21510 # languages over compactness; for example, the fields of this representation
21511 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21512 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21513 # method in iOS; and, with just a little work, it can be easily formatted into
21514 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21515 #
21516 # Example (Java):
21517 #
21518 # import com.google.type.Color;
21519 #
21520 # // ...
21521 # public static java.awt.Color fromProto(Color protocolor) {
21522 # float alpha = protocolor.hasAlpha()
21523 # ? protocolor.getAlpha().getValue()
21524 # : 1.0;
21525 #
21526 # return new java.awt.Color(
21527 # protocolor.getRed(),
21528 # protocolor.getGreen(),
21529 # protocolor.getBlue(),
21530 # alpha);
21531 # }
21532 #
21533 # public static Color toProto(java.awt.Color color) {
21534 # float red = (float) color.getRed();
21535 # float green = (float) color.getGreen();
21536 # float blue = (float) color.getBlue();
21537 # float denominator = 255.0;
21538 # Color.Builder resultBuilder =
21539 # Color
21540 # .newBuilder()
21541 # .setRed(red / denominator)
21542 # .setGreen(green / denominator)
21543 # .setBlue(blue / denominator);
21544 # int alpha = color.getAlpha();
21545 # if (alpha != 255) {
21546 # result.setAlpha(
21547 # FloatValue
21548 # .newBuilder()
21549 # .setValue(((float) alpha) / denominator)
21550 # .build());
21551 # }
21552 # return resultBuilder.build();
21553 # }
21554 # // ...
21555 #
21556 # Example (iOS / Obj-C):
21557 #
21558 # // ...
21559 # static UIColor* fromProto(Color* protocolor) {
21560 # float red = [protocolor red];
21561 # float green = [protocolor green];
21562 # float blue = [protocolor blue];
21563 # FloatValue* alpha_wrapper = [protocolor alpha];
21564 # float alpha = 1.0;
21565 # if (alpha_wrapper != nil) {
21566 # alpha = [alpha_wrapper value];
21567 # }
21568 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21569 # }
21570 #
21571 # static Color* toProto(UIColor* color) {
21572 # CGFloat red, green, blue, alpha;
21573 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21574 # return nil;
21575 # }
21576 # Color* result = [Color alloc] init];
21577 # [result setRed:red];
21578 # [result setGreen:green];
21579 # [result setBlue:blue];
21580 # if (alpha <= 0.9999) {
21581 # [result setAlpha:floatWrapperWithValue(alpha)];
21582 # }
21583 # [result autorelease];
21584 # return result;
21585 # }
21586 # // ...
21587 #
21588 # Example (JavaScript):
21589 #
21590 # // ...
21591 #
21592 # var protoToCssColor = function(rgb_color) {
21593 # var redFrac = rgb_color.red || 0.0;
21594 # var greenFrac = rgb_color.green || 0.0;
21595 # var blueFrac = rgb_color.blue || 0.0;
21596 # var red = Math.floor(redFrac * 255);
21597 # var green = Math.floor(greenFrac * 255);
21598 # var blue = Math.floor(blueFrac * 255);
21599 #
21600 # if (!('alpha' in rgb_color)) {
21601 # return rgbToCssColor_(red, green, blue);
21602 # }
21603 #
21604 # var alphaFrac = rgb_color.alpha.value || 0.0;
21605 # var rgbParams = [red, green, blue].join(',');
21606 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21607 # };
21608 #
21609 # var rgbToCssColor_ = function(red, green, blue) {
21610 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21611 # var hexString = rgbNumber.toString(16);
21612 # var missingZeros = 6 - hexString.length;
21613 # var resultBuilder = ['#'];
21614 # for (var i = 0; i < missingZeros; i++) {
21615 # resultBuilder.push('0');
21616 # }
21617 # resultBuilder.push(hexString);
21618 # return resultBuilder.join('');
21619 # };
21620 #
21621 # // ...
21622 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21623 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21624 # the final pixel color is defined by the equation:
21625 #
21626 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21627 #
21628 # This means that a value of 1.0 corresponds to a solid color, whereas
21629 # a value of 0.0 corresponds to a completely transparent color. This
21630 # uses a wrapper message rather than a simple float scalar so that it is
21631 # possible to distinguish between a default value and the value being unset.
21632 # If omitted, this color object is to be rendered as a solid color
21633 # (as if the alpha value had been explicitly given with a value of 1.0).
21634 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21635 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21636 },
21637 "width": 42, # The width of the border, in pixels.
21638 # Deprecated; the width is determined by the "style" field.
21639 "style": "A String", # The style of the border.
21640 },
21641 "right": { # A border along a cell. # The right border of the cell.
21642 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21643 # for simplicity of conversion to/from color representations in various
21644 # languages over compactness; for example, the fields of this representation
21645 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21646 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21647 # method in iOS; and, with just a little work, it can be easily formatted into
21648 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21649 #
21650 # Example (Java):
21651 #
21652 # import com.google.type.Color;
21653 #
21654 # // ...
21655 # public static java.awt.Color fromProto(Color protocolor) {
21656 # float alpha = protocolor.hasAlpha()
21657 # ? protocolor.getAlpha().getValue()
21658 # : 1.0;
21659 #
21660 # return new java.awt.Color(
21661 # protocolor.getRed(),
21662 # protocolor.getGreen(),
21663 # protocolor.getBlue(),
21664 # alpha);
21665 # }
21666 #
21667 # public static Color toProto(java.awt.Color color) {
21668 # float red = (float) color.getRed();
21669 # float green = (float) color.getGreen();
21670 # float blue = (float) color.getBlue();
21671 # float denominator = 255.0;
21672 # Color.Builder resultBuilder =
21673 # Color
21674 # .newBuilder()
21675 # .setRed(red / denominator)
21676 # .setGreen(green / denominator)
21677 # .setBlue(blue / denominator);
21678 # int alpha = color.getAlpha();
21679 # if (alpha != 255) {
21680 # result.setAlpha(
21681 # FloatValue
21682 # .newBuilder()
21683 # .setValue(((float) alpha) / denominator)
21684 # .build());
21685 # }
21686 # return resultBuilder.build();
21687 # }
21688 # // ...
21689 #
21690 # Example (iOS / Obj-C):
21691 #
21692 # // ...
21693 # static UIColor* fromProto(Color* protocolor) {
21694 # float red = [protocolor red];
21695 # float green = [protocolor green];
21696 # float blue = [protocolor blue];
21697 # FloatValue* alpha_wrapper = [protocolor alpha];
21698 # float alpha = 1.0;
21699 # if (alpha_wrapper != nil) {
21700 # alpha = [alpha_wrapper value];
21701 # }
21702 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21703 # }
21704 #
21705 # static Color* toProto(UIColor* color) {
21706 # CGFloat red, green, blue, alpha;
21707 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21708 # return nil;
21709 # }
21710 # Color* result = [Color alloc] init];
21711 # [result setRed:red];
21712 # [result setGreen:green];
21713 # [result setBlue:blue];
21714 # if (alpha <= 0.9999) {
21715 # [result setAlpha:floatWrapperWithValue(alpha)];
21716 # }
21717 # [result autorelease];
21718 # return result;
21719 # }
21720 # // ...
21721 #
21722 # Example (JavaScript):
21723 #
21724 # // ...
21725 #
21726 # var protoToCssColor = function(rgb_color) {
21727 # var redFrac = rgb_color.red || 0.0;
21728 # var greenFrac = rgb_color.green || 0.0;
21729 # var blueFrac = rgb_color.blue || 0.0;
21730 # var red = Math.floor(redFrac * 255);
21731 # var green = Math.floor(greenFrac * 255);
21732 # var blue = Math.floor(blueFrac * 255);
21733 #
21734 # if (!('alpha' in rgb_color)) {
21735 # return rgbToCssColor_(red, green, blue);
21736 # }
21737 #
21738 # var alphaFrac = rgb_color.alpha.value || 0.0;
21739 # var rgbParams = [red, green, blue].join(',');
21740 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21741 # };
21742 #
21743 # var rgbToCssColor_ = function(red, green, blue) {
21744 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21745 # var hexString = rgbNumber.toString(16);
21746 # var missingZeros = 6 - hexString.length;
21747 # var resultBuilder = ['#'];
21748 # for (var i = 0; i < missingZeros; i++) {
21749 # resultBuilder.push('0');
21750 # }
21751 # resultBuilder.push(hexString);
21752 # return resultBuilder.join('');
21753 # };
21754 #
21755 # // ...
21756 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21757 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21758 # the final pixel color is defined by the equation:
21759 #
21760 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21761 #
21762 # This means that a value of 1.0 corresponds to a solid color, whereas
21763 # a value of 0.0 corresponds to a completely transparent color. This
21764 # uses a wrapper message rather than a simple float scalar so that it is
21765 # possible to distinguish between a default value and the value being unset.
21766 # If omitted, this color object is to be rendered as a solid color
21767 # (as if the alpha value had been explicitly given with a value of 1.0).
21768 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21769 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21770 },
21771 "width": 42, # The width of the border, in pixels.
21772 # Deprecated; the width is determined by the "style" field.
21773 "style": "A String", # The style of the border.
21774 },
21775 "bottom": { # A border along a cell. # The bottom border of the cell.
21776 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21777 # for simplicity of conversion to/from color representations in various
21778 # languages over compactness; for example, the fields of this representation
21779 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21780 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21781 # method in iOS; and, with just a little work, it can be easily formatted into
21782 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21783 #
21784 # Example (Java):
21785 #
21786 # import com.google.type.Color;
21787 #
21788 # // ...
21789 # public static java.awt.Color fromProto(Color protocolor) {
21790 # float alpha = protocolor.hasAlpha()
21791 # ? protocolor.getAlpha().getValue()
21792 # : 1.0;
21793 #
21794 # return new java.awt.Color(
21795 # protocolor.getRed(),
21796 # protocolor.getGreen(),
21797 # protocolor.getBlue(),
21798 # alpha);
21799 # }
21800 #
21801 # public static Color toProto(java.awt.Color color) {
21802 # float red = (float) color.getRed();
21803 # float green = (float) color.getGreen();
21804 # float blue = (float) color.getBlue();
21805 # float denominator = 255.0;
21806 # Color.Builder resultBuilder =
21807 # Color
21808 # .newBuilder()
21809 # .setRed(red / denominator)
21810 # .setGreen(green / denominator)
21811 # .setBlue(blue / denominator);
21812 # int alpha = color.getAlpha();
21813 # if (alpha != 255) {
21814 # result.setAlpha(
21815 # FloatValue
21816 # .newBuilder()
21817 # .setValue(((float) alpha) / denominator)
21818 # .build());
21819 # }
21820 # return resultBuilder.build();
21821 # }
21822 # // ...
21823 #
21824 # Example (iOS / Obj-C):
21825 #
21826 # // ...
21827 # static UIColor* fromProto(Color* protocolor) {
21828 # float red = [protocolor red];
21829 # float green = [protocolor green];
21830 # float blue = [protocolor blue];
21831 # FloatValue* alpha_wrapper = [protocolor alpha];
21832 # float alpha = 1.0;
21833 # if (alpha_wrapper != nil) {
21834 # alpha = [alpha_wrapper value];
21835 # }
21836 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21837 # }
21838 #
21839 # static Color* toProto(UIColor* color) {
21840 # CGFloat red, green, blue, alpha;
21841 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21842 # return nil;
21843 # }
21844 # Color* result = [Color alloc] init];
21845 # [result setRed:red];
21846 # [result setGreen:green];
21847 # [result setBlue:blue];
21848 # if (alpha <= 0.9999) {
21849 # [result setAlpha:floatWrapperWithValue(alpha)];
21850 # }
21851 # [result autorelease];
21852 # return result;
21853 # }
21854 # // ...
21855 #
21856 # Example (JavaScript):
21857 #
21858 # // ...
21859 #
21860 # var protoToCssColor = function(rgb_color) {
21861 # var redFrac = rgb_color.red || 0.0;
21862 # var greenFrac = rgb_color.green || 0.0;
21863 # var blueFrac = rgb_color.blue || 0.0;
21864 # var red = Math.floor(redFrac * 255);
21865 # var green = Math.floor(greenFrac * 255);
21866 # var blue = Math.floor(blueFrac * 255);
21867 #
21868 # if (!('alpha' in rgb_color)) {
21869 # return rgbToCssColor_(red, green, blue);
21870 # }
21871 #
21872 # var alphaFrac = rgb_color.alpha.value || 0.0;
21873 # var rgbParams = [red, green, blue].join(',');
21874 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
21875 # };
21876 #
21877 # var rgbToCssColor_ = function(red, green, blue) {
21878 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
21879 # var hexString = rgbNumber.toString(16);
21880 # var missingZeros = 6 - hexString.length;
21881 # var resultBuilder = ['#'];
21882 # for (var i = 0; i < missingZeros; i++) {
21883 # resultBuilder.push('0');
21884 # }
21885 # resultBuilder.push(hexString);
21886 # return resultBuilder.join('');
21887 # };
21888 #
21889 # // ...
21890 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
21891 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
21892 # the final pixel color is defined by the equation:
21893 #
21894 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
21895 #
21896 # This means that a value of 1.0 corresponds to a solid color, whereas
21897 # a value of 0.0 corresponds to a completely transparent color. This
21898 # uses a wrapper message rather than a simple float scalar so that it is
21899 # possible to distinguish between a default value and the value being unset.
21900 # If omitted, this color object is to be rendered as a solid color
21901 # (as if the alpha value had been explicitly given with a value of 1.0).
21902 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
21903 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
21904 },
21905 "width": 42, # The width of the border, in pixels.
21906 # Deprecated; the width is determined by the "style" field.
21907 "style": "A String", # The style of the border.
21908 },
21909 "left": { # A border along a cell. # The left border of the cell.
21910 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
21911 # for simplicity of conversion to/from color representations in various
21912 # languages over compactness; for example, the fields of this representation
21913 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
21914 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
21915 # method in iOS; and, with just a little work, it can be easily formatted into
21916 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
21917 #
21918 # Example (Java):
21919 #
21920 # import com.google.type.Color;
21921 #
21922 # // ...
21923 # public static java.awt.Color fromProto(Color protocolor) {
21924 # float alpha = protocolor.hasAlpha()
21925 # ? protocolor.getAlpha().getValue()
21926 # : 1.0;
21927 #
21928 # return new java.awt.Color(
21929 # protocolor.getRed(),
21930 # protocolor.getGreen(),
21931 # protocolor.getBlue(),
21932 # alpha);
21933 # }
21934 #
21935 # public static Color toProto(java.awt.Color color) {
21936 # float red = (float) color.getRed();
21937 # float green = (float) color.getGreen();
21938 # float blue = (float) color.getBlue();
21939 # float denominator = 255.0;
21940 # Color.Builder resultBuilder =
21941 # Color
21942 # .newBuilder()
21943 # .setRed(red / denominator)
21944 # .setGreen(green / denominator)
21945 # .setBlue(blue / denominator);
21946 # int alpha = color.getAlpha();
21947 # if (alpha != 255) {
21948 # result.setAlpha(
21949 # FloatValue
21950 # .newBuilder()
21951 # .setValue(((float) alpha) / denominator)
21952 # .build());
21953 # }
21954 # return resultBuilder.build();
21955 # }
21956 # // ...
21957 #
21958 # Example (iOS / Obj-C):
21959 #
21960 # // ...
21961 # static UIColor* fromProto(Color* protocolor) {
21962 # float red = [protocolor red];
21963 # float green = [protocolor green];
21964 # float blue = [protocolor blue];
21965 # FloatValue* alpha_wrapper = [protocolor alpha];
21966 # float alpha = 1.0;
21967 # if (alpha_wrapper != nil) {
21968 # alpha = [alpha_wrapper value];
21969 # }
21970 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
21971 # }
21972 #
21973 # static Color* toProto(UIColor* color) {
21974 # CGFloat red, green, blue, alpha;
21975 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
21976 # return nil;
21977 # }
21978 # Color* result = [Color alloc] init];
21979 # [result setRed:red];
21980 # [result setGreen:green];
21981 # [result setBlue:blue];
21982 # if (alpha <= 0.9999) {
21983 # [result setAlpha:floatWrapperWithValue(alpha)];
21984 # }
21985 # [result autorelease];
21986 # return result;
21987 # }
21988 # // ...
21989 #
21990 # Example (JavaScript):
21991 #
21992 # // ...
21993 #
21994 # var protoToCssColor = function(rgb_color) {
21995 # var redFrac = rgb_color.red || 0.0;
21996 # var greenFrac = rgb_color.green || 0.0;
21997 # var blueFrac = rgb_color.blue || 0.0;
21998 # var red = Math.floor(redFrac * 255);
21999 # var green = Math.floor(greenFrac * 255);
22000 # var blue = Math.floor(blueFrac * 255);
22001 #
22002 # if (!('alpha' in rgb_color)) {
22003 # return rgbToCssColor_(red, green, blue);
22004 # }
22005 #
22006 # var alphaFrac = rgb_color.alpha.value || 0.0;
22007 # var rgbParams = [red, green, blue].join(',');
22008 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22009 # };
22010 #
22011 # var rgbToCssColor_ = function(red, green, blue) {
22012 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22013 # var hexString = rgbNumber.toString(16);
22014 # var missingZeros = 6 - hexString.length;
22015 # var resultBuilder = ['#'];
22016 # for (var i = 0; i < missingZeros; i++) {
22017 # resultBuilder.push('0');
22018 # }
22019 # resultBuilder.push(hexString);
22020 # return resultBuilder.join('');
22021 # };
22022 #
22023 # // ...
22024 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22025 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22026 # the final pixel color is defined by the equation:
22027 #
22028 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22029 #
22030 # This means that a value of 1.0 corresponds to a solid color, whereas
22031 # a value of 0.0 corresponds to a completely transparent color. This
22032 # uses a wrapper message rather than a simple float scalar so that it is
22033 # possible to distinguish between a default value and the value being unset.
22034 # If omitted, this color object is to be rendered as a solid color
22035 # (as if the alpha value had been explicitly given with a value of 1.0).
22036 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22037 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22038 },
22039 "width": 42, # The width of the border, in pixels.
22040 # Deprecated; the width is determined by the "style" field.
22041 "style": "A String", # The style of the border.
22042 },
22043 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022044 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
22045 "angle": 42, # The angle between the standard orientation and the desired orientation.
22046 # Measured in degrees. Valid values are between -90 and 90. Positive
22047 # angles are angled upwards, negative are angled downwards.
22048 #
22049 # Note: For LTR text direction positive angles are in the counterclockwise
22050 # direction, whereas for RTL they are in the clockwise direction
22051 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
22052 # characters is unchanged.
22053 # For example:
22054 #
22055 # | V |
22056 # | e |
22057 # | r |
22058 # | t |
22059 # | i |
22060 # | c |
22061 # | a |
22062 # | l |
22063 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022064 },
22065 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
22066 #
22067 # When writing, the new data validation rule will overwrite any prior rule.
22068 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
22069 # If true, "List" conditions will show a dropdown.
22070 "strict": True or False, # True if invalid data should be rejected.
22071 "inputMessage": "A String", # A message to show the user when adding data to the cell.
22072 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
22073 # BooleanConditions are used by conditional formatting,
22074 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022075 "values": [ # The values of the condition. The number of supported values depends
22076 # on the condition type. Some support zero values,
22077 # others one or two values,
22078 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
22079 { # The value of the condition.
22080 "relativeDate": "A String", # A relative date (based on the current date).
22081 # Valid only if the type is
22082 # DATE_BEFORE,
22083 # DATE_AFTER,
22084 # DATE_ON_OR_BEFORE or
22085 # DATE_ON_OR_AFTER.
22086 #
22087 # Relative dates are not supported in data validation.
22088 # They are supported only in conditional formatting and
22089 # conditional filters.
22090 "userEnteredValue": "A String", # A value the condition is based on.
22091 # The value will be parsed as if the user typed into a cell.
22092 # Formulas are supported (and must begin with an `=`).
22093 },
22094 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022095 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022096 },
22097 },
22098 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
22099 # on user entered strings, not formulas, bools, or numbers.
22100 # Runs start at specific indexes in the text and continue until the next
22101 # run. Properties of a run will continue unless explicitly changed
22102 # in a subsequent run (and properties of the first run will continue
22103 # the properties of the cell unless explicitly changed).
22104 #
22105 # When writing, the new runs will overwrite any prior runs. When writing a
22106 # new user_entered_value, previous runs will be erased.
22107 { # A run of a text format. The format of this run continues until the start
22108 # index of the next run.
22109 # When updating, all fields must be set.
22110 "startIndex": 42, # The character index where this run starts.
22111 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
22112 # Absent values indicate that the field isn't specified.
22113 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
22114 # for simplicity of conversion to/from color representations in various
22115 # languages over compactness; for example, the fields of this representation
22116 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
22117 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
22118 # method in iOS; and, with just a little work, it can be easily formatted into
22119 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
22120 #
22121 # Example (Java):
22122 #
22123 # import com.google.type.Color;
22124 #
22125 # // ...
22126 # public static java.awt.Color fromProto(Color protocolor) {
22127 # float alpha = protocolor.hasAlpha()
22128 # ? protocolor.getAlpha().getValue()
22129 # : 1.0;
22130 #
22131 # return new java.awt.Color(
22132 # protocolor.getRed(),
22133 # protocolor.getGreen(),
22134 # protocolor.getBlue(),
22135 # alpha);
22136 # }
22137 #
22138 # public static Color toProto(java.awt.Color color) {
22139 # float red = (float) color.getRed();
22140 # float green = (float) color.getGreen();
22141 # float blue = (float) color.getBlue();
22142 # float denominator = 255.0;
22143 # Color.Builder resultBuilder =
22144 # Color
22145 # .newBuilder()
22146 # .setRed(red / denominator)
22147 # .setGreen(green / denominator)
22148 # .setBlue(blue / denominator);
22149 # int alpha = color.getAlpha();
22150 # if (alpha != 255) {
22151 # result.setAlpha(
22152 # FloatValue
22153 # .newBuilder()
22154 # .setValue(((float) alpha) / denominator)
22155 # .build());
22156 # }
22157 # return resultBuilder.build();
22158 # }
22159 # // ...
22160 #
22161 # Example (iOS / Obj-C):
22162 #
22163 # // ...
22164 # static UIColor* fromProto(Color* protocolor) {
22165 # float red = [protocolor red];
22166 # float green = [protocolor green];
22167 # float blue = [protocolor blue];
22168 # FloatValue* alpha_wrapper = [protocolor alpha];
22169 # float alpha = 1.0;
22170 # if (alpha_wrapper != nil) {
22171 # alpha = [alpha_wrapper value];
22172 # }
22173 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
22174 # }
22175 #
22176 # static Color* toProto(UIColor* color) {
22177 # CGFloat red, green, blue, alpha;
22178 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
22179 # return nil;
22180 # }
22181 # Color* result = [Color alloc] init];
22182 # [result setRed:red];
22183 # [result setGreen:green];
22184 # [result setBlue:blue];
22185 # if (alpha <= 0.9999) {
22186 # [result setAlpha:floatWrapperWithValue(alpha)];
22187 # }
22188 # [result autorelease];
22189 # return result;
22190 # }
22191 # // ...
22192 #
22193 # Example (JavaScript):
22194 #
22195 # // ...
22196 #
22197 # var protoToCssColor = function(rgb_color) {
22198 # var redFrac = rgb_color.red || 0.0;
22199 # var greenFrac = rgb_color.green || 0.0;
22200 # var blueFrac = rgb_color.blue || 0.0;
22201 # var red = Math.floor(redFrac * 255);
22202 # var green = Math.floor(greenFrac * 255);
22203 # var blue = Math.floor(blueFrac * 255);
22204 #
22205 # if (!('alpha' in rgb_color)) {
22206 # return rgbToCssColor_(red, green, blue);
22207 # }
22208 #
22209 # var alphaFrac = rgb_color.alpha.value || 0.0;
22210 # var rgbParams = [red, green, blue].join(',');
22211 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
22212 # };
22213 #
22214 # var rgbToCssColor_ = function(red, green, blue) {
22215 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
22216 # var hexString = rgbNumber.toString(16);
22217 # var missingZeros = 6 - hexString.length;
22218 # var resultBuilder = ['#'];
22219 # for (var i = 0; i < missingZeros; i++) {
22220 # resultBuilder.push('0');
22221 # }
22222 # resultBuilder.push(hexString);
22223 # return resultBuilder.join('');
22224 # };
22225 #
22226 # // ...
22227 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
22228 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
22229 # the final pixel color is defined by the equation:
22230 #
22231 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
22232 #
22233 # This means that a value of 1.0 corresponds to a solid color, whereas
22234 # a value of 0.0 corresponds to a completely transparent color. This
22235 # uses a wrapper message rather than a simple float scalar so that it is
22236 # possible to distinguish between a default value and the value being unset.
22237 # If omitted, this color object is to be rendered as a solid color
22238 # (as if the alpha value had been explicitly given with a value of 1.0).
22239 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
22240 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
22241 },
22242 "bold": True or False, # True if the text is bold.
22243 "strikethrough": True or False, # True if the text has a strikethrough.
22244 "fontFamily": "A String", # The font family.
22245 "fontSize": 42, # The size of the font.
22246 "italic": True or False, # True if the text is italicized.
22247 "underline": True or False, # True if the text is underlined.
22248 },
22249 },
22250 ],
22251 },
22252 ],
22253 },
22254 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040022255 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
22256 # in start_column.
22257 { # Properties about a dimension.
22258 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
22259 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
22260 "hiddenByFilter": True or False, # True if this dimension is being filtered.
22261 # This field is read-only.
22262 },
22263 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080022264 },
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 },
22696 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22697 # from the anchor cell.
22698 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
22699 "offsetXPixels": 42, # The horizontal offset, in pixels, that the object is offset
22700 # from the anchor cell.
22701 "heightPixels": 42, # The height of the object, in pixels. Defaults to 371.
22702 },
22703 },
22704 },
22705 "addChart": { # The result of adding a chart to a spreadsheet. # A reply from adding a chart.
22706 "chart": { # A chart embedded in a sheet. # The newly added chart.
22707 "chartId": 42, # The ID of the chart.
22708 "position": { # The position of an embedded object such as a chart. # The position of the chart.
22709 "newSheet": True or False, # If true, the embedded object will be put on a new sheet whose ID
22710 # is chosen for you. Used only when writing.
22711 "sheetId": 42, # The sheet this is on. Set only if the embedded object
22712 # is on its own sheet. Must be non-negative.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070022713 "overlayPosition": { # The location an object is overlaid on top of a grid. # The position at which the object is overlaid on top of a grid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070022714 "anchorCell": { # A coordinate in a sheet. # The cell the object is anchored to.
22715 # All indexes are zero-based.
22716 "rowIndex": 42, # The row index of the coordinate.
22717 "columnIndex": 42, # The column index of the coordinate.
22718 "sheetId": 42, # The sheet this coordinate is on.
22719 },
22720 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
22721 # from the anchor cell.
22722 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
22723 "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.
23006 "format": { # The format of a run of text in a cell. # The format of the title.
23007 # Only valid if the axis is not associated with the domain.
23008 # Absent values indicate that the field isn't specified.
23009 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23010 # for simplicity of conversion to/from color representations in various
23011 # languages over compactness; for example, the fields of this representation
23012 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23013 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23014 # method in iOS; and, with just a little work, it can be easily formatted into
23015 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23016 #
23017 # Example (Java):
23018 #
23019 # import com.google.type.Color;
23020 #
23021 # // ...
23022 # public static java.awt.Color fromProto(Color protocolor) {
23023 # float alpha = protocolor.hasAlpha()
23024 # ? protocolor.getAlpha().getValue()
23025 # : 1.0;
23026 #
23027 # return new java.awt.Color(
23028 # protocolor.getRed(),
23029 # protocolor.getGreen(),
23030 # protocolor.getBlue(),
23031 # alpha);
23032 # }
23033 #
23034 # public static Color toProto(java.awt.Color color) {
23035 # float red = (float) color.getRed();
23036 # float green = (float) color.getGreen();
23037 # float blue = (float) color.getBlue();
23038 # float denominator = 255.0;
23039 # Color.Builder resultBuilder =
23040 # Color
23041 # .newBuilder()
23042 # .setRed(red / denominator)
23043 # .setGreen(green / denominator)
23044 # .setBlue(blue / denominator);
23045 # int alpha = color.getAlpha();
23046 # if (alpha != 255) {
23047 # result.setAlpha(
23048 # FloatValue
23049 # .newBuilder()
23050 # .setValue(((float) alpha) / denominator)
23051 # .build());
23052 # }
23053 # return resultBuilder.build();
23054 # }
23055 # // ...
23056 #
23057 # Example (iOS / Obj-C):
23058 #
23059 # // ...
23060 # static UIColor* fromProto(Color* protocolor) {
23061 # float red = [protocolor red];
23062 # float green = [protocolor green];
23063 # float blue = [protocolor blue];
23064 # FloatValue* alpha_wrapper = [protocolor alpha];
23065 # float alpha = 1.0;
23066 # if (alpha_wrapper != nil) {
23067 # alpha = [alpha_wrapper value];
23068 # }
23069 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23070 # }
23071 #
23072 # static Color* toProto(UIColor* color) {
23073 # CGFloat red, green, blue, alpha;
23074 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23075 # return nil;
23076 # }
23077 # Color* result = [Color alloc] init];
23078 # [result setRed:red];
23079 # [result setGreen:green];
23080 # [result setBlue:blue];
23081 # if (alpha <= 0.9999) {
23082 # [result setAlpha:floatWrapperWithValue(alpha)];
23083 # }
23084 # [result autorelease];
23085 # return result;
23086 # }
23087 # // ...
23088 #
23089 # Example (JavaScript):
23090 #
23091 # // ...
23092 #
23093 # var protoToCssColor = function(rgb_color) {
23094 # var redFrac = rgb_color.red || 0.0;
23095 # var greenFrac = rgb_color.green || 0.0;
23096 # var blueFrac = rgb_color.blue || 0.0;
23097 # var red = Math.floor(redFrac * 255);
23098 # var green = Math.floor(greenFrac * 255);
23099 # var blue = Math.floor(blueFrac * 255);
23100 #
23101 # if (!('alpha' in rgb_color)) {
23102 # return rgbToCssColor_(red, green, blue);
23103 # }
23104 #
23105 # var alphaFrac = rgb_color.alpha.value || 0.0;
23106 # var rgbParams = [red, green, blue].join(',');
23107 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23108 # };
23109 #
23110 # var rgbToCssColor_ = function(red, green, blue) {
23111 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23112 # var hexString = rgbNumber.toString(16);
23113 # var missingZeros = 6 - hexString.length;
23114 # var resultBuilder = ['#'];
23115 # for (var i = 0; i < missingZeros; i++) {
23116 # resultBuilder.push('0');
23117 # }
23118 # resultBuilder.push(hexString);
23119 # return resultBuilder.join('');
23120 # };
23121 #
23122 # // ...
23123 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23124 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23125 # the final pixel color is defined by the equation:
23126 #
23127 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23128 #
23129 # This means that a value of 1.0 corresponds to a solid color, whereas
23130 # a value of 0.0 corresponds to a completely transparent color. This
23131 # uses a wrapper message rather than a simple float scalar so that it is
23132 # possible to distinguish between a default value and the value being unset.
23133 # If omitted, this color object is to be rendered as a solid color
23134 # (as if the alpha value had been explicitly given with a value of 1.0).
23135 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23136 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23137 },
23138 "bold": True or False, # True if the text is bold.
23139 "strikethrough": True or False, # True if the text has a strikethrough.
23140 "fontFamily": "A String", # The font family.
23141 "fontSize": 42, # The size of the font.
23142 "italic": True or False, # True if the text is italicized.
23143 "underline": True or False, # True if the text is underlined.
23144 },
23145 "title": "A String", # The title of this axis. If set, this overrides any title inferred
23146 # from headers of the data.
23147 },
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 "newIndex": 42, # The index of the new rule.
23158 "oldRule": { # A rule describing a conditional format. # The old (deleted) rule. Not set if a rule was moved
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023159 # (because it is the same as new_rule).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023160 "ranges": [ # The ranges that will be formatted if the condition is true.
23161 # All the ranges must be on the same grid.
23162 { # A range on a sheet.
23163 # All indexes are zero-based.
23164 # Indexes are half open, e.g the start index is inclusive
23165 # and the end index is exclusive -- [start_index, end_index).
23166 # Missing indexes indicate the range is unbounded on that side.
23167 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023168 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023169 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023170 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023171 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023172 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023173 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023174 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023175 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023176 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023177 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023178 # `Sheet1!A:B == sheet_id: 0,
23179 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023180 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023181 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023182 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023183 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023184 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023185 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023186 #
23187 # The start index must always be less than or equal to the end index.
23188 # If the start index equals the end index, then the range is empty.
23189 # Empty ranges are typically not meaningful and are usually rendered in the
23190 # UI as `#REF!`.
23191 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023192 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023193 "sheetId": 42, # The sheet this range is on.
23194 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023195 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023196 },
23197 ],
23198 "booleanRule": { # A rule that may or may not match, depending on the condition. # The formatting is either "on" or "off" according to the rule.
23199 "condition": { # A condition that can evaluate to true or false. # The condition of the rule. If the condition evaluates to true,
23200 # the format will be applied.
23201 # BooleanConditions are used by conditional formatting,
23202 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023203 "values": [ # The values of the condition. The number of supported values depends
23204 # on the condition type. Some support zero values,
23205 # others one or two values,
23206 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
23207 { # The value of the condition.
23208 "relativeDate": "A String", # A relative date (based on the current date).
23209 # Valid only if the type is
23210 # DATE_BEFORE,
23211 # DATE_AFTER,
23212 # DATE_ON_OR_BEFORE or
23213 # DATE_ON_OR_AFTER.
23214 #
23215 # Relative dates are not supported in data validation.
23216 # They are supported only in conditional formatting and
23217 # conditional filters.
23218 "userEnteredValue": "A String", # A value the condition is based on.
23219 # The value will be parsed as if the user typed into a cell.
23220 # Formulas are supported (and must begin with an `=`).
23221 },
23222 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023223 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023224 },
23225 "format": { # The format of a cell. # The format to apply.
23226 # Conditional formatting can only apply a subset of formatting:
23227 # bold, italic,
23228 # strikethrough,
23229 # foreground color &
23230 # background color.
23231 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023232 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
23233 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023234 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070023235 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023236 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023237 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023238 },
23239 "textDirection": "A String", # The direction of the text in the cell.
23240 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
23241 # When updating padding, every field must be specified.
23242 "top": 42, # The top padding of the cell.
23243 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023244 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023245 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023246 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023247 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023248 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
23249 # for simplicity of conversion to/from color representations in various
23250 # languages over compactness; for example, the fields of this representation
23251 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23252 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23253 # method in iOS; and, with just a little work, it can be easily formatted into
23254 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23255 #
23256 # Example (Java):
23257 #
23258 # import com.google.type.Color;
23259 #
23260 # // ...
23261 # public static java.awt.Color fromProto(Color protocolor) {
23262 # float alpha = protocolor.hasAlpha()
23263 # ? protocolor.getAlpha().getValue()
23264 # : 1.0;
23265 #
23266 # return new java.awt.Color(
23267 # protocolor.getRed(),
23268 # protocolor.getGreen(),
23269 # protocolor.getBlue(),
23270 # alpha);
23271 # }
23272 #
23273 # public static Color toProto(java.awt.Color color) {
23274 # float red = (float) color.getRed();
23275 # float green = (float) color.getGreen();
23276 # float blue = (float) color.getBlue();
23277 # float denominator = 255.0;
23278 # Color.Builder resultBuilder =
23279 # Color
23280 # .newBuilder()
23281 # .setRed(red / denominator)
23282 # .setGreen(green / denominator)
23283 # .setBlue(blue / denominator);
23284 # int alpha = color.getAlpha();
23285 # if (alpha != 255) {
23286 # result.setAlpha(
23287 # FloatValue
23288 # .newBuilder()
23289 # .setValue(((float) alpha) / denominator)
23290 # .build());
23291 # }
23292 # return resultBuilder.build();
23293 # }
23294 # // ...
23295 #
23296 # Example (iOS / Obj-C):
23297 #
23298 # // ...
23299 # static UIColor* fromProto(Color* protocolor) {
23300 # float red = [protocolor red];
23301 # float green = [protocolor green];
23302 # float blue = [protocolor blue];
23303 # FloatValue* alpha_wrapper = [protocolor alpha];
23304 # float alpha = 1.0;
23305 # if (alpha_wrapper != nil) {
23306 # alpha = [alpha_wrapper value];
23307 # }
23308 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23309 # }
23310 #
23311 # static Color* toProto(UIColor* color) {
23312 # CGFloat red, green, blue, alpha;
23313 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23314 # return nil;
23315 # }
23316 # Color* result = [Color alloc] init];
23317 # [result setRed:red];
23318 # [result setGreen:green];
23319 # [result setBlue:blue];
23320 # if (alpha <= 0.9999) {
23321 # [result setAlpha:floatWrapperWithValue(alpha)];
23322 # }
23323 # [result autorelease];
23324 # return result;
23325 # }
23326 # // ...
23327 #
23328 # Example (JavaScript):
23329 #
23330 # // ...
23331 #
23332 # var protoToCssColor = function(rgb_color) {
23333 # var redFrac = rgb_color.red || 0.0;
23334 # var greenFrac = rgb_color.green || 0.0;
23335 # var blueFrac = rgb_color.blue || 0.0;
23336 # var red = Math.floor(redFrac * 255);
23337 # var green = Math.floor(greenFrac * 255);
23338 # var blue = Math.floor(blueFrac * 255);
23339 #
23340 # if (!('alpha' in rgb_color)) {
23341 # return rgbToCssColor_(red, green, blue);
23342 # }
23343 #
23344 # var alphaFrac = rgb_color.alpha.value || 0.0;
23345 # var rgbParams = [red, green, blue].join(',');
23346 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23347 # };
23348 #
23349 # var rgbToCssColor_ = function(red, green, blue) {
23350 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23351 # var hexString = rgbNumber.toString(16);
23352 # var missingZeros = 6 - hexString.length;
23353 # var resultBuilder = ['#'];
23354 # for (var i = 0; i < missingZeros; i++) {
23355 # resultBuilder.push('0');
23356 # }
23357 # resultBuilder.push(hexString);
23358 # return resultBuilder.join('');
23359 # };
23360 #
23361 # // ...
23362 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23363 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23364 # the final pixel color is defined by the equation:
23365 #
23366 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23367 #
23368 # This means that a value of 1.0 corresponds to a solid color, whereas
23369 # a value of 0.0 corresponds to a completely transparent color. This
23370 # uses a wrapper message rather than a simple float scalar so that it is
23371 # possible to distinguish between a default value and the value being unset.
23372 # If omitted, this color object is to be rendered as a solid color
23373 # (as if the alpha value had been explicitly given with a value of 1.0).
23374 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23375 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23376 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070023377 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023378 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
23379 # Absent values indicate that the field isn't specified.
23380 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
23381 # for simplicity of conversion to/from color representations in various
23382 # languages over compactness; for example, the fields of this representation
23383 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23384 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23385 # method in iOS; and, with just a little work, it can be easily formatted into
23386 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23387 #
23388 # Example (Java):
23389 #
23390 # import com.google.type.Color;
23391 #
23392 # // ...
23393 # public static java.awt.Color fromProto(Color protocolor) {
23394 # float alpha = protocolor.hasAlpha()
23395 # ? protocolor.getAlpha().getValue()
23396 # : 1.0;
23397 #
23398 # return new java.awt.Color(
23399 # protocolor.getRed(),
23400 # protocolor.getGreen(),
23401 # protocolor.getBlue(),
23402 # alpha);
23403 # }
23404 #
23405 # public static Color toProto(java.awt.Color color) {
23406 # float red = (float) color.getRed();
23407 # float green = (float) color.getGreen();
23408 # float blue = (float) color.getBlue();
23409 # float denominator = 255.0;
23410 # Color.Builder resultBuilder =
23411 # Color
23412 # .newBuilder()
23413 # .setRed(red / denominator)
23414 # .setGreen(green / denominator)
23415 # .setBlue(blue / denominator);
23416 # int alpha = color.getAlpha();
23417 # if (alpha != 255) {
23418 # result.setAlpha(
23419 # FloatValue
23420 # .newBuilder()
23421 # .setValue(((float) alpha) / denominator)
23422 # .build());
23423 # }
23424 # return resultBuilder.build();
23425 # }
23426 # // ...
23427 #
23428 # Example (iOS / Obj-C):
23429 #
23430 # // ...
23431 # static UIColor* fromProto(Color* protocolor) {
23432 # float red = [protocolor red];
23433 # float green = [protocolor green];
23434 # float blue = [protocolor blue];
23435 # FloatValue* alpha_wrapper = [protocolor alpha];
23436 # float alpha = 1.0;
23437 # if (alpha_wrapper != nil) {
23438 # alpha = [alpha_wrapper value];
23439 # }
23440 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23441 # }
23442 #
23443 # static Color* toProto(UIColor* color) {
23444 # CGFloat red, green, blue, alpha;
23445 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23446 # return nil;
23447 # }
23448 # Color* result = [Color alloc] init];
23449 # [result setRed:red];
23450 # [result setGreen:green];
23451 # [result setBlue:blue];
23452 # if (alpha <= 0.9999) {
23453 # [result setAlpha:floatWrapperWithValue(alpha)];
23454 # }
23455 # [result autorelease];
23456 # return result;
23457 # }
23458 # // ...
23459 #
23460 # Example (JavaScript):
23461 #
23462 # // ...
23463 #
23464 # var protoToCssColor = function(rgb_color) {
23465 # var redFrac = rgb_color.red || 0.0;
23466 # var greenFrac = rgb_color.green || 0.0;
23467 # var blueFrac = rgb_color.blue || 0.0;
23468 # var red = Math.floor(redFrac * 255);
23469 # var green = Math.floor(greenFrac * 255);
23470 # var blue = Math.floor(blueFrac * 255);
23471 #
23472 # if (!('alpha' in rgb_color)) {
23473 # return rgbToCssColor_(red, green, blue);
23474 # }
23475 #
23476 # var alphaFrac = rgb_color.alpha.value || 0.0;
23477 # var rgbParams = [red, green, blue].join(',');
23478 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23479 # };
23480 #
23481 # var rgbToCssColor_ = function(red, green, blue) {
23482 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23483 # var hexString = rgbNumber.toString(16);
23484 # var missingZeros = 6 - hexString.length;
23485 # var resultBuilder = ['#'];
23486 # for (var i = 0; i < missingZeros; i++) {
23487 # resultBuilder.push('0');
23488 # }
23489 # resultBuilder.push(hexString);
23490 # return resultBuilder.join('');
23491 # };
23492 #
23493 # // ...
23494 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23495 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23496 # the final pixel color is defined by the equation:
23497 #
23498 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23499 #
23500 # This means that a value of 1.0 corresponds to a solid color, whereas
23501 # a value of 0.0 corresponds to a completely transparent color. This
23502 # uses a wrapper message rather than a simple float scalar so that it is
23503 # possible to distinguish between a default value and the value being unset.
23504 # If omitted, this color object is to be rendered as a solid color
23505 # (as if the alpha value had been explicitly given with a value of 1.0).
23506 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23507 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23508 },
23509 "bold": True or False, # True if the text is bold.
23510 "strikethrough": True or False, # True if the text has a strikethrough.
23511 "fontFamily": "A String", # The font family.
23512 "fontSize": 42, # The size of the font.
23513 "italic": True or False, # True if the text is italicized.
23514 "underline": True or False, # True if the text is underlined.
23515 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040023516 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023517 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
23518 "borders": { # The borders of the cell. # The borders of the cell.
23519 "top": { # A border along a cell. # The top border of the cell.
23520 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23521 # for simplicity of conversion to/from color representations in various
23522 # languages over compactness; for example, the fields of this representation
23523 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23524 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23525 # method in iOS; and, with just a little work, it can be easily formatted into
23526 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23527 #
23528 # Example (Java):
23529 #
23530 # import com.google.type.Color;
23531 #
23532 # // ...
23533 # public static java.awt.Color fromProto(Color protocolor) {
23534 # float alpha = protocolor.hasAlpha()
23535 # ? protocolor.getAlpha().getValue()
23536 # : 1.0;
23537 #
23538 # return new java.awt.Color(
23539 # protocolor.getRed(),
23540 # protocolor.getGreen(),
23541 # protocolor.getBlue(),
23542 # alpha);
23543 # }
23544 #
23545 # public static Color toProto(java.awt.Color color) {
23546 # float red = (float) color.getRed();
23547 # float green = (float) color.getGreen();
23548 # float blue = (float) color.getBlue();
23549 # float denominator = 255.0;
23550 # Color.Builder resultBuilder =
23551 # Color
23552 # .newBuilder()
23553 # .setRed(red / denominator)
23554 # .setGreen(green / denominator)
23555 # .setBlue(blue / denominator);
23556 # int alpha = color.getAlpha();
23557 # if (alpha != 255) {
23558 # result.setAlpha(
23559 # FloatValue
23560 # .newBuilder()
23561 # .setValue(((float) alpha) / denominator)
23562 # .build());
23563 # }
23564 # return resultBuilder.build();
23565 # }
23566 # // ...
23567 #
23568 # Example (iOS / Obj-C):
23569 #
23570 # // ...
23571 # static UIColor* fromProto(Color* protocolor) {
23572 # float red = [protocolor red];
23573 # float green = [protocolor green];
23574 # float blue = [protocolor blue];
23575 # FloatValue* alpha_wrapper = [protocolor alpha];
23576 # float alpha = 1.0;
23577 # if (alpha_wrapper != nil) {
23578 # alpha = [alpha_wrapper value];
23579 # }
23580 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23581 # }
23582 #
23583 # static Color* toProto(UIColor* color) {
23584 # CGFloat red, green, blue, alpha;
23585 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23586 # return nil;
23587 # }
23588 # Color* result = [Color alloc] init];
23589 # [result setRed:red];
23590 # [result setGreen:green];
23591 # [result setBlue:blue];
23592 # if (alpha <= 0.9999) {
23593 # [result setAlpha:floatWrapperWithValue(alpha)];
23594 # }
23595 # [result autorelease];
23596 # return result;
23597 # }
23598 # // ...
23599 #
23600 # Example (JavaScript):
23601 #
23602 # // ...
23603 #
23604 # var protoToCssColor = function(rgb_color) {
23605 # var redFrac = rgb_color.red || 0.0;
23606 # var greenFrac = rgb_color.green || 0.0;
23607 # var blueFrac = rgb_color.blue || 0.0;
23608 # var red = Math.floor(redFrac * 255);
23609 # var green = Math.floor(greenFrac * 255);
23610 # var blue = Math.floor(blueFrac * 255);
23611 #
23612 # if (!('alpha' in rgb_color)) {
23613 # return rgbToCssColor_(red, green, blue);
23614 # }
23615 #
23616 # var alphaFrac = rgb_color.alpha.value || 0.0;
23617 # var rgbParams = [red, green, blue].join(',');
23618 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23619 # };
23620 #
23621 # var rgbToCssColor_ = function(red, green, blue) {
23622 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23623 # var hexString = rgbNumber.toString(16);
23624 # var missingZeros = 6 - hexString.length;
23625 # var resultBuilder = ['#'];
23626 # for (var i = 0; i < missingZeros; i++) {
23627 # resultBuilder.push('0');
23628 # }
23629 # resultBuilder.push(hexString);
23630 # return resultBuilder.join('');
23631 # };
23632 #
23633 # // ...
23634 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23635 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23636 # the final pixel color is defined by the equation:
23637 #
23638 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23639 #
23640 # This means that a value of 1.0 corresponds to a solid color, whereas
23641 # a value of 0.0 corresponds to a completely transparent color. This
23642 # uses a wrapper message rather than a simple float scalar so that it is
23643 # possible to distinguish between a default value and the value being unset.
23644 # If omitted, this color object is to be rendered as a solid color
23645 # (as if the alpha value had been explicitly given with a value of 1.0).
23646 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23647 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23648 },
23649 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023650 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023651 "style": "A String", # The style of the border.
23652 },
23653 "right": { # A border along a cell. # The right border of the cell.
23654 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23655 # for simplicity of conversion to/from color representations in various
23656 # languages over compactness; for example, the fields of this representation
23657 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23658 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23659 # method in iOS; and, with just a little work, it can be easily formatted into
23660 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23661 #
23662 # Example (Java):
23663 #
23664 # import com.google.type.Color;
23665 #
23666 # // ...
23667 # public static java.awt.Color fromProto(Color protocolor) {
23668 # float alpha = protocolor.hasAlpha()
23669 # ? protocolor.getAlpha().getValue()
23670 # : 1.0;
23671 #
23672 # return new java.awt.Color(
23673 # protocolor.getRed(),
23674 # protocolor.getGreen(),
23675 # protocolor.getBlue(),
23676 # alpha);
23677 # }
23678 #
23679 # public static Color toProto(java.awt.Color color) {
23680 # float red = (float) color.getRed();
23681 # float green = (float) color.getGreen();
23682 # float blue = (float) color.getBlue();
23683 # float denominator = 255.0;
23684 # Color.Builder resultBuilder =
23685 # Color
23686 # .newBuilder()
23687 # .setRed(red / denominator)
23688 # .setGreen(green / denominator)
23689 # .setBlue(blue / denominator);
23690 # int alpha = color.getAlpha();
23691 # if (alpha != 255) {
23692 # result.setAlpha(
23693 # FloatValue
23694 # .newBuilder()
23695 # .setValue(((float) alpha) / denominator)
23696 # .build());
23697 # }
23698 # return resultBuilder.build();
23699 # }
23700 # // ...
23701 #
23702 # Example (iOS / Obj-C):
23703 #
23704 # // ...
23705 # static UIColor* fromProto(Color* protocolor) {
23706 # float red = [protocolor red];
23707 # float green = [protocolor green];
23708 # float blue = [protocolor blue];
23709 # FloatValue* alpha_wrapper = [protocolor alpha];
23710 # float alpha = 1.0;
23711 # if (alpha_wrapper != nil) {
23712 # alpha = [alpha_wrapper value];
23713 # }
23714 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23715 # }
23716 #
23717 # static Color* toProto(UIColor* color) {
23718 # CGFloat red, green, blue, alpha;
23719 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23720 # return nil;
23721 # }
23722 # Color* result = [Color alloc] init];
23723 # [result setRed:red];
23724 # [result setGreen:green];
23725 # [result setBlue:blue];
23726 # if (alpha <= 0.9999) {
23727 # [result setAlpha:floatWrapperWithValue(alpha)];
23728 # }
23729 # [result autorelease];
23730 # return result;
23731 # }
23732 # // ...
23733 #
23734 # Example (JavaScript):
23735 #
23736 # // ...
23737 #
23738 # var protoToCssColor = function(rgb_color) {
23739 # var redFrac = rgb_color.red || 0.0;
23740 # var greenFrac = rgb_color.green || 0.0;
23741 # var blueFrac = rgb_color.blue || 0.0;
23742 # var red = Math.floor(redFrac * 255);
23743 # var green = Math.floor(greenFrac * 255);
23744 # var blue = Math.floor(blueFrac * 255);
23745 #
23746 # if (!('alpha' in rgb_color)) {
23747 # return rgbToCssColor_(red, green, blue);
23748 # }
23749 #
23750 # var alphaFrac = rgb_color.alpha.value || 0.0;
23751 # var rgbParams = [red, green, blue].join(',');
23752 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23753 # };
23754 #
23755 # var rgbToCssColor_ = function(red, green, blue) {
23756 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23757 # var hexString = rgbNumber.toString(16);
23758 # var missingZeros = 6 - hexString.length;
23759 # var resultBuilder = ['#'];
23760 # for (var i = 0; i < missingZeros; i++) {
23761 # resultBuilder.push('0');
23762 # }
23763 # resultBuilder.push(hexString);
23764 # return resultBuilder.join('');
23765 # };
23766 #
23767 # // ...
23768 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23769 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23770 # the final pixel color is defined by the equation:
23771 #
23772 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23773 #
23774 # This means that a value of 1.0 corresponds to a solid color, whereas
23775 # a value of 0.0 corresponds to a completely transparent color. This
23776 # uses a wrapper message rather than a simple float scalar so that it is
23777 # possible to distinguish between a default value and the value being unset.
23778 # If omitted, this color object is to be rendered as a solid color
23779 # (as if the alpha value had been explicitly given with a value of 1.0).
23780 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23781 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23782 },
23783 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023784 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023785 "style": "A String", # The style of the border.
23786 },
23787 "bottom": { # A border along a cell. # The bottom border of the cell.
23788 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23789 # for simplicity of conversion to/from color representations in various
23790 # languages over compactness; for example, the fields of this representation
23791 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23792 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23793 # method in iOS; and, with just a little work, it can be easily formatted into
23794 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23795 #
23796 # Example (Java):
23797 #
23798 # import com.google.type.Color;
23799 #
23800 # // ...
23801 # public static java.awt.Color fromProto(Color protocolor) {
23802 # float alpha = protocolor.hasAlpha()
23803 # ? protocolor.getAlpha().getValue()
23804 # : 1.0;
23805 #
23806 # return new java.awt.Color(
23807 # protocolor.getRed(),
23808 # protocolor.getGreen(),
23809 # protocolor.getBlue(),
23810 # alpha);
23811 # }
23812 #
23813 # public static Color toProto(java.awt.Color color) {
23814 # float red = (float) color.getRed();
23815 # float green = (float) color.getGreen();
23816 # float blue = (float) color.getBlue();
23817 # float denominator = 255.0;
23818 # Color.Builder resultBuilder =
23819 # Color
23820 # .newBuilder()
23821 # .setRed(red / denominator)
23822 # .setGreen(green / denominator)
23823 # .setBlue(blue / denominator);
23824 # int alpha = color.getAlpha();
23825 # if (alpha != 255) {
23826 # result.setAlpha(
23827 # FloatValue
23828 # .newBuilder()
23829 # .setValue(((float) alpha) / denominator)
23830 # .build());
23831 # }
23832 # return resultBuilder.build();
23833 # }
23834 # // ...
23835 #
23836 # Example (iOS / Obj-C):
23837 #
23838 # // ...
23839 # static UIColor* fromProto(Color* protocolor) {
23840 # float red = [protocolor red];
23841 # float green = [protocolor green];
23842 # float blue = [protocolor blue];
23843 # FloatValue* alpha_wrapper = [protocolor alpha];
23844 # float alpha = 1.0;
23845 # if (alpha_wrapper != nil) {
23846 # alpha = [alpha_wrapper value];
23847 # }
23848 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23849 # }
23850 #
23851 # static Color* toProto(UIColor* color) {
23852 # CGFloat red, green, blue, alpha;
23853 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23854 # return nil;
23855 # }
23856 # Color* result = [Color alloc] init];
23857 # [result setRed:red];
23858 # [result setGreen:green];
23859 # [result setBlue:blue];
23860 # if (alpha <= 0.9999) {
23861 # [result setAlpha:floatWrapperWithValue(alpha)];
23862 # }
23863 # [result autorelease];
23864 # return result;
23865 # }
23866 # // ...
23867 #
23868 # Example (JavaScript):
23869 #
23870 # // ...
23871 #
23872 # var protoToCssColor = function(rgb_color) {
23873 # var redFrac = rgb_color.red || 0.0;
23874 # var greenFrac = rgb_color.green || 0.0;
23875 # var blueFrac = rgb_color.blue || 0.0;
23876 # var red = Math.floor(redFrac * 255);
23877 # var green = Math.floor(greenFrac * 255);
23878 # var blue = Math.floor(blueFrac * 255);
23879 #
23880 # if (!('alpha' in rgb_color)) {
23881 # return rgbToCssColor_(red, green, blue);
23882 # }
23883 #
23884 # var alphaFrac = rgb_color.alpha.value || 0.0;
23885 # var rgbParams = [red, green, blue].join(',');
23886 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
23887 # };
23888 #
23889 # var rgbToCssColor_ = function(red, green, blue) {
23890 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
23891 # var hexString = rgbNumber.toString(16);
23892 # var missingZeros = 6 - hexString.length;
23893 # var resultBuilder = ['#'];
23894 # for (var i = 0; i < missingZeros; i++) {
23895 # resultBuilder.push('0');
23896 # }
23897 # resultBuilder.push(hexString);
23898 # return resultBuilder.join('');
23899 # };
23900 #
23901 # // ...
23902 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
23903 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
23904 # the final pixel color is defined by the equation:
23905 #
23906 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
23907 #
23908 # This means that a value of 1.0 corresponds to a solid color, whereas
23909 # a value of 0.0 corresponds to a completely transparent color. This
23910 # uses a wrapper message rather than a simple float scalar so that it is
23911 # possible to distinguish between a default value and the value being unset.
23912 # If omitted, this color object is to be rendered as a solid color
23913 # (as if the alpha value had been explicitly given with a value of 1.0).
23914 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
23915 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
23916 },
23917 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070023918 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070023919 "style": "A String", # The style of the border.
23920 },
23921 "left": { # A border along a cell. # The left border of the cell.
23922 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
23923 # for simplicity of conversion to/from color representations in various
23924 # languages over compactness; for example, the fields of this representation
23925 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
23926 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
23927 # method in iOS; and, with just a little work, it can be easily formatted into
23928 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
23929 #
23930 # Example (Java):
23931 #
23932 # import com.google.type.Color;
23933 #
23934 # // ...
23935 # public static java.awt.Color fromProto(Color protocolor) {
23936 # float alpha = protocolor.hasAlpha()
23937 # ? protocolor.getAlpha().getValue()
23938 # : 1.0;
23939 #
23940 # return new java.awt.Color(
23941 # protocolor.getRed(),
23942 # protocolor.getGreen(),
23943 # protocolor.getBlue(),
23944 # alpha);
23945 # }
23946 #
23947 # public static Color toProto(java.awt.Color color) {
23948 # float red = (float) color.getRed();
23949 # float green = (float) color.getGreen();
23950 # float blue = (float) color.getBlue();
23951 # float denominator = 255.0;
23952 # Color.Builder resultBuilder =
23953 # Color
23954 # .newBuilder()
23955 # .setRed(red / denominator)
23956 # .setGreen(green / denominator)
23957 # .setBlue(blue / denominator);
23958 # int alpha = color.getAlpha();
23959 # if (alpha != 255) {
23960 # result.setAlpha(
23961 # FloatValue
23962 # .newBuilder()
23963 # .setValue(((float) alpha) / denominator)
23964 # .build());
23965 # }
23966 # return resultBuilder.build();
23967 # }
23968 # // ...
23969 #
23970 # Example (iOS / Obj-C):
23971 #
23972 # // ...
23973 # static UIColor* fromProto(Color* protocolor) {
23974 # float red = [protocolor red];
23975 # float green = [protocolor green];
23976 # float blue = [protocolor blue];
23977 # FloatValue* alpha_wrapper = [protocolor alpha];
23978 # float alpha = 1.0;
23979 # if (alpha_wrapper != nil) {
23980 # alpha = [alpha_wrapper value];
23981 # }
23982 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
23983 # }
23984 #
23985 # static Color* toProto(UIColor* color) {
23986 # CGFloat red, green, blue, alpha;
23987 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
23988 # return nil;
23989 # }
23990 # Color* result = [Color alloc] init];
23991 # [result setRed:red];
23992 # [result setGreen:green];
23993 # [result setBlue:blue];
23994 # if (alpha <= 0.9999) {
23995 # [result setAlpha:floatWrapperWithValue(alpha)];
23996 # }
23997 # [result autorelease];
23998 # return result;
23999 # }
24000 # // ...
24001 #
24002 # Example (JavaScript):
24003 #
24004 # // ...
24005 #
24006 # var protoToCssColor = function(rgb_color) {
24007 # var redFrac = rgb_color.red || 0.0;
24008 # var greenFrac = rgb_color.green || 0.0;
24009 # var blueFrac = rgb_color.blue || 0.0;
24010 # var red = Math.floor(redFrac * 255);
24011 # var green = Math.floor(greenFrac * 255);
24012 # var blue = Math.floor(blueFrac * 255);
24013 #
24014 # if (!('alpha' in rgb_color)) {
24015 # return rgbToCssColor_(red, green, blue);
24016 # }
24017 #
24018 # var alphaFrac = rgb_color.alpha.value || 0.0;
24019 # var rgbParams = [red, green, blue].join(',');
24020 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24021 # };
24022 #
24023 # var rgbToCssColor_ = function(red, green, blue) {
24024 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24025 # var hexString = rgbNumber.toString(16);
24026 # var missingZeros = 6 - hexString.length;
24027 # var resultBuilder = ['#'];
24028 # for (var i = 0; i < missingZeros; i++) {
24029 # resultBuilder.push('0');
24030 # }
24031 # resultBuilder.push(hexString);
24032 # return resultBuilder.join('');
24033 # };
24034 #
24035 # // ...
24036 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24037 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24038 # the final pixel color is defined by the equation:
24039 #
24040 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24041 #
24042 # This means that a value of 1.0 corresponds to a solid color, whereas
24043 # a value of 0.0 corresponds to a completely transparent color. This
24044 # uses a wrapper message rather than a simple float scalar so that it is
24045 # possible to distinguish between a default value and the value being unset.
24046 # If omitted, this color object is to be rendered as a solid color
24047 # (as if the alpha value had been explicitly given with a value of 1.0).
24048 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24049 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24050 },
24051 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070024052 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024053 "style": "A String", # The style of the border.
24054 },
24055 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040024056 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
24057 "angle": 42, # The angle between the standard orientation and the desired orientation.
24058 # Measured in degrees. Valid values are between -90 and 90. Positive
24059 # angles are angled upwards, negative are angled downwards.
24060 #
24061 # Note: For LTR text direction positive angles are in the counterclockwise
24062 # direction, whereas for RTL they are in the clockwise direction
24063 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
24064 # characters is unchanged.
24065 # For example:
24066 #
24067 # | V |
24068 # | e |
24069 # | r |
24070 # | t |
24071 # | i |
24072 # | c |
24073 # | a |
24074 # | l |
24075 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024076 },
24077 },
24078 "gradientRule": { # A rule that applies a gradient color scale format, based on # The formatting will vary based on the gradients in the rule.
24079 # the interpolation points listed. The format of a cell will vary
24080 # based on its contents as compared to the values of the interpolation
24081 # points.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024082 "maxpoint": { # A single interpolation point on a gradient conditional format. # The final interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024083 # These pin the gradient color scale according to the color,
24084 # type and value chosen.
24085 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24086 # for simplicity of conversion to/from color representations in various
24087 # languages over compactness; for example, the fields of this representation
24088 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24089 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24090 # method in iOS; and, with just a little work, it can be easily formatted into
24091 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24092 #
24093 # Example (Java):
24094 #
24095 # import com.google.type.Color;
24096 #
24097 # // ...
24098 # public static java.awt.Color fromProto(Color protocolor) {
24099 # float alpha = protocolor.hasAlpha()
24100 # ? protocolor.getAlpha().getValue()
24101 # : 1.0;
24102 #
24103 # return new java.awt.Color(
24104 # protocolor.getRed(),
24105 # protocolor.getGreen(),
24106 # protocolor.getBlue(),
24107 # alpha);
24108 # }
24109 #
24110 # public static Color toProto(java.awt.Color color) {
24111 # float red = (float) color.getRed();
24112 # float green = (float) color.getGreen();
24113 # float blue = (float) color.getBlue();
24114 # float denominator = 255.0;
24115 # Color.Builder resultBuilder =
24116 # Color
24117 # .newBuilder()
24118 # .setRed(red / denominator)
24119 # .setGreen(green / denominator)
24120 # .setBlue(blue / denominator);
24121 # int alpha = color.getAlpha();
24122 # if (alpha != 255) {
24123 # result.setAlpha(
24124 # FloatValue
24125 # .newBuilder()
24126 # .setValue(((float) alpha) / denominator)
24127 # .build());
24128 # }
24129 # return resultBuilder.build();
24130 # }
24131 # // ...
24132 #
24133 # Example (iOS / Obj-C):
24134 #
24135 # // ...
24136 # static UIColor* fromProto(Color* protocolor) {
24137 # float red = [protocolor red];
24138 # float green = [protocolor green];
24139 # float blue = [protocolor blue];
24140 # FloatValue* alpha_wrapper = [protocolor alpha];
24141 # float alpha = 1.0;
24142 # if (alpha_wrapper != nil) {
24143 # alpha = [alpha_wrapper value];
24144 # }
24145 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24146 # }
24147 #
24148 # static Color* toProto(UIColor* color) {
24149 # CGFloat red, green, blue, alpha;
24150 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24151 # return nil;
24152 # }
24153 # Color* result = [Color alloc] init];
24154 # [result setRed:red];
24155 # [result setGreen:green];
24156 # [result setBlue:blue];
24157 # if (alpha <= 0.9999) {
24158 # [result setAlpha:floatWrapperWithValue(alpha)];
24159 # }
24160 # [result autorelease];
24161 # return result;
24162 # }
24163 # // ...
24164 #
24165 # Example (JavaScript):
24166 #
24167 # // ...
24168 #
24169 # var protoToCssColor = function(rgb_color) {
24170 # var redFrac = rgb_color.red || 0.0;
24171 # var greenFrac = rgb_color.green || 0.0;
24172 # var blueFrac = rgb_color.blue || 0.0;
24173 # var red = Math.floor(redFrac * 255);
24174 # var green = Math.floor(greenFrac * 255);
24175 # var blue = Math.floor(blueFrac * 255);
24176 #
24177 # if (!('alpha' in rgb_color)) {
24178 # return rgbToCssColor_(red, green, blue);
24179 # }
24180 #
24181 # var alphaFrac = rgb_color.alpha.value || 0.0;
24182 # var rgbParams = [red, green, blue].join(',');
24183 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24184 # };
24185 #
24186 # var rgbToCssColor_ = function(red, green, blue) {
24187 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24188 # var hexString = rgbNumber.toString(16);
24189 # var missingZeros = 6 - hexString.length;
24190 # var resultBuilder = ['#'];
24191 # for (var i = 0; i < missingZeros; i++) {
24192 # resultBuilder.push('0');
24193 # }
24194 # resultBuilder.push(hexString);
24195 # return resultBuilder.join('');
24196 # };
24197 #
24198 # // ...
24199 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24200 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24201 # the final pixel color is defined by the equation:
24202 #
24203 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24204 #
24205 # This means that a value of 1.0 corresponds to a solid color, whereas
24206 # a value of 0.0 corresponds to a completely transparent color. This
24207 # uses a wrapper message rather than a simple float scalar so that it is
24208 # possible to distinguish between a default value and the value being unset.
24209 # If omitted, this color object is to be rendered as a solid color
24210 # (as if the alpha value had been explicitly given with a value of 1.0).
24211 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24212 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24213 },
24214 "type": "A String", # How the value should be interpreted.
24215 "value": "A String", # The value this interpolation point uses. May be a formula.
24216 # Unused if type is MIN or
24217 # MAX.
24218 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024219 "midpoint": { # A single interpolation point on a gradient conditional format. # An optional midway interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024220 # These pin the gradient color scale according to the color,
24221 # type and value chosen.
24222 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24223 # for simplicity of conversion to/from color representations in various
24224 # languages over compactness; for example, the fields of this representation
24225 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24226 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24227 # method in iOS; and, with just a little work, it can be easily formatted into
24228 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24229 #
24230 # Example (Java):
24231 #
24232 # import com.google.type.Color;
24233 #
24234 # // ...
24235 # public static java.awt.Color fromProto(Color protocolor) {
24236 # float alpha = protocolor.hasAlpha()
24237 # ? protocolor.getAlpha().getValue()
24238 # : 1.0;
24239 #
24240 # return new java.awt.Color(
24241 # protocolor.getRed(),
24242 # protocolor.getGreen(),
24243 # protocolor.getBlue(),
24244 # alpha);
24245 # }
24246 #
24247 # public static Color toProto(java.awt.Color color) {
24248 # float red = (float) color.getRed();
24249 # float green = (float) color.getGreen();
24250 # float blue = (float) color.getBlue();
24251 # float denominator = 255.0;
24252 # Color.Builder resultBuilder =
24253 # Color
24254 # .newBuilder()
24255 # .setRed(red / denominator)
24256 # .setGreen(green / denominator)
24257 # .setBlue(blue / denominator);
24258 # int alpha = color.getAlpha();
24259 # if (alpha != 255) {
24260 # result.setAlpha(
24261 # FloatValue
24262 # .newBuilder()
24263 # .setValue(((float) alpha) / denominator)
24264 # .build());
24265 # }
24266 # return resultBuilder.build();
24267 # }
24268 # // ...
24269 #
24270 # Example (iOS / Obj-C):
24271 #
24272 # // ...
24273 # static UIColor* fromProto(Color* protocolor) {
24274 # float red = [protocolor red];
24275 # float green = [protocolor green];
24276 # float blue = [protocolor blue];
24277 # FloatValue* alpha_wrapper = [protocolor alpha];
24278 # float alpha = 1.0;
24279 # if (alpha_wrapper != nil) {
24280 # alpha = [alpha_wrapper value];
24281 # }
24282 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24283 # }
24284 #
24285 # static Color* toProto(UIColor* color) {
24286 # CGFloat red, green, blue, alpha;
24287 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24288 # return nil;
24289 # }
24290 # Color* result = [Color alloc] init];
24291 # [result setRed:red];
24292 # [result setGreen:green];
24293 # [result setBlue:blue];
24294 # if (alpha <= 0.9999) {
24295 # [result setAlpha:floatWrapperWithValue(alpha)];
24296 # }
24297 # [result autorelease];
24298 # return result;
24299 # }
24300 # // ...
24301 #
24302 # Example (JavaScript):
24303 #
24304 # // ...
24305 #
24306 # var protoToCssColor = function(rgb_color) {
24307 # var redFrac = rgb_color.red || 0.0;
24308 # var greenFrac = rgb_color.green || 0.0;
24309 # var blueFrac = rgb_color.blue || 0.0;
24310 # var red = Math.floor(redFrac * 255);
24311 # var green = Math.floor(greenFrac * 255);
24312 # var blue = Math.floor(blueFrac * 255);
24313 #
24314 # if (!('alpha' in rgb_color)) {
24315 # return rgbToCssColor_(red, green, blue);
24316 # }
24317 #
24318 # var alphaFrac = rgb_color.alpha.value || 0.0;
24319 # var rgbParams = [red, green, blue].join(',');
24320 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24321 # };
24322 #
24323 # var rgbToCssColor_ = function(red, green, blue) {
24324 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24325 # var hexString = rgbNumber.toString(16);
24326 # var missingZeros = 6 - hexString.length;
24327 # var resultBuilder = ['#'];
24328 # for (var i = 0; i < missingZeros; i++) {
24329 # resultBuilder.push('0');
24330 # }
24331 # resultBuilder.push(hexString);
24332 # return resultBuilder.join('');
24333 # };
24334 #
24335 # // ...
24336 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24337 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24338 # the final pixel color is defined by the equation:
24339 #
24340 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24341 #
24342 # This means that a value of 1.0 corresponds to a solid color, whereas
24343 # a value of 0.0 corresponds to a completely transparent color. This
24344 # uses a wrapper message rather than a simple float scalar so that it is
24345 # possible to distinguish between a default value and the value being unset.
24346 # If omitted, this color object is to be rendered as a solid color
24347 # (as if the alpha value had been explicitly given with a value of 1.0).
24348 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24349 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24350 },
24351 "type": "A String", # How the value should be interpreted.
24352 "value": "A String", # The value this interpolation point uses. May be a formula.
24353 # Unused if type is MIN or
24354 # MAX.
24355 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024356 "minpoint": { # A single interpolation point on a gradient conditional format. # The starting interpolation point.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024357 # These pin the gradient color scale according to the color,
24358 # type and value chosen.
24359 "color": { # Represents a color in the RGBA color space. This representation is designed # The color this interpolation point should use.
24360 # for simplicity of conversion to/from color representations in various
24361 # languages over compactness; for example, the fields of this representation
24362 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24363 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24364 # method in iOS; and, with just a little work, it can be easily formatted into
24365 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24366 #
24367 # Example (Java):
24368 #
24369 # import com.google.type.Color;
24370 #
24371 # // ...
24372 # public static java.awt.Color fromProto(Color protocolor) {
24373 # float alpha = protocolor.hasAlpha()
24374 # ? protocolor.getAlpha().getValue()
24375 # : 1.0;
24376 #
24377 # return new java.awt.Color(
24378 # protocolor.getRed(),
24379 # protocolor.getGreen(),
24380 # protocolor.getBlue(),
24381 # alpha);
24382 # }
24383 #
24384 # public static Color toProto(java.awt.Color color) {
24385 # float red = (float) color.getRed();
24386 # float green = (float) color.getGreen();
24387 # float blue = (float) color.getBlue();
24388 # float denominator = 255.0;
24389 # Color.Builder resultBuilder =
24390 # Color
24391 # .newBuilder()
24392 # .setRed(red / denominator)
24393 # .setGreen(green / denominator)
24394 # .setBlue(blue / denominator);
24395 # int alpha = color.getAlpha();
24396 # if (alpha != 255) {
24397 # result.setAlpha(
24398 # FloatValue
24399 # .newBuilder()
24400 # .setValue(((float) alpha) / denominator)
24401 # .build());
24402 # }
24403 # return resultBuilder.build();
24404 # }
24405 # // ...
24406 #
24407 # Example (iOS / Obj-C):
24408 #
24409 # // ...
24410 # static UIColor* fromProto(Color* protocolor) {
24411 # float red = [protocolor red];
24412 # float green = [protocolor green];
24413 # float blue = [protocolor blue];
24414 # FloatValue* alpha_wrapper = [protocolor alpha];
24415 # float alpha = 1.0;
24416 # if (alpha_wrapper != nil) {
24417 # alpha = [alpha_wrapper value];
24418 # }
24419 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24420 # }
24421 #
24422 # static Color* toProto(UIColor* color) {
24423 # CGFloat red, green, blue, alpha;
24424 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24425 # return nil;
24426 # }
24427 # Color* result = [Color alloc] init];
24428 # [result setRed:red];
24429 # [result setGreen:green];
24430 # [result setBlue:blue];
24431 # if (alpha <= 0.9999) {
24432 # [result setAlpha:floatWrapperWithValue(alpha)];
24433 # }
24434 # [result autorelease];
24435 # return result;
24436 # }
24437 # // ...
24438 #
24439 # Example (JavaScript):
24440 #
24441 # // ...
24442 #
24443 # var protoToCssColor = function(rgb_color) {
24444 # var redFrac = rgb_color.red || 0.0;
24445 # var greenFrac = rgb_color.green || 0.0;
24446 # var blueFrac = rgb_color.blue || 0.0;
24447 # var red = Math.floor(redFrac * 255);
24448 # var green = Math.floor(greenFrac * 255);
24449 # var blue = Math.floor(blueFrac * 255);
24450 #
24451 # if (!('alpha' in rgb_color)) {
24452 # return rgbToCssColor_(red, green, blue);
24453 # }
24454 #
24455 # var alphaFrac = rgb_color.alpha.value || 0.0;
24456 # var rgbParams = [red, green, blue].join(',');
24457 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24458 # };
24459 #
24460 # var rgbToCssColor_ = function(red, green, blue) {
24461 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24462 # var hexString = rgbNumber.toString(16);
24463 # var missingZeros = 6 - hexString.length;
24464 # var resultBuilder = ['#'];
24465 # for (var i = 0; i < missingZeros; i++) {
24466 # resultBuilder.push('0');
24467 # }
24468 # resultBuilder.push(hexString);
24469 # return resultBuilder.join('');
24470 # };
24471 #
24472 # // ...
24473 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24474 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24475 # the final pixel color is defined by the equation:
24476 #
24477 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24478 #
24479 # This means that a value of 1.0 corresponds to a solid color, whereas
24480 # a value of 0.0 corresponds to a completely transparent color. This
24481 # uses a wrapper message rather than a simple float scalar so that it is
24482 # possible to distinguish between a default value and the value being unset.
24483 # If omitted, this color object is to be rendered as a solid color
24484 # (as if the alpha value had been explicitly given with a value of 1.0).
24485 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24486 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24487 },
24488 "type": "A String", # How the value should be interpreted.
24489 "value": "A String", # The value this interpolation point uses. May be a formula.
24490 # Unused if type is MIN or
24491 # MAX.
24492 },
24493 },
24494 },
24495 "newRule": { # A rule describing a conditional format. # The new rule that replaced the old rule (if replacing),
24496 # or the rule that was moved (if moved)
24497 "ranges": [ # The ranges that will be formatted if the condition is true.
24498 # All the ranges must be on the same grid.
24499 { # A range on a sheet.
24500 # All indexes are zero-based.
24501 # Indexes are half open, e.g the start index is inclusive
24502 # and the end index is exclusive -- [start_index, end_index).
24503 # Missing indexes indicate the range is unbounded on that side.
24504 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024505 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024506 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024507 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024508 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024509 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024510 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024511 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024512 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024513 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024514 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024515 # `Sheet1!A:B == sheet_id: 0,
24516 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024517 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024518 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024519 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024520 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024521 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070024522 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024523 #
24524 # The start index must always be less than or equal to the end index.
24525 # If the start index equals the end index, then the range is empty.
24526 # Empty ranges are typically not meaningful and are usually rendered in the
24527 # UI as `#REF!`.
24528 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040024853 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024854 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
24855 "borders": { # The borders of the cell. # The borders of the cell.
24856 "top": { # A border along a cell. # The top border of the cell.
24857 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24858 # for simplicity of conversion to/from color representations in various
24859 # languages over compactness; for example, the fields of this representation
24860 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24861 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24862 # method in iOS; and, with just a little work, it can be easily formatted into
24863 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24864 #
24865 # Example (Java):
24866 #
24867 # import com.google.type.Color;
24868 #
24869 # // ...
24870 # public static java.awt.Color fromProto(Color protocolor) {
24871 # float alpha = protocolor.hasAlpha()
24872 # ? protocolor.getAlpha().getValue()
24873 # : 1.0;
24874 #
24875 # return new java.awt.Color(
24876 # protocolor.getRed(),
24877 # protocolor.getGreen(),
24878 # protocolor.getBlue(),
24879 # alpha);
24880 # }
24881 #
24882 # public static Color toProto(java.awt.Color color) {
24883 # float red = (float) color.getRed();
24884 # float green = (float) color.getGreen();
24885 # float blue = (float) color.getBlue();
24886 # float denominator = 255.0;
24887 # Color.Builder resultBuilder =
24888 # Color
24889 # .newBuilder()
24890 # .setRed(red / denominator)
24891 # .setGreen(green / denominator)
24892 # .setBlue(blue / denominator);
24893 # int alpha = color.getAlpha();
24894 # if (alpha != 255) {
24895 # result.setAlpha(
24896 # FloatValue
24897 # .newBuilder()
24898 # .setValue(((float) alpha) / denominator)
24899 # .build());
24900 # }
24901 # return resultBuilder.build();
24902 # }
24903 # // ...
24904 #
24905 # Example (iOS / Obj-C):
24906 #
24907 # // ...
24908 # static UIColor* fromProto(Color* protocolor) {
24909 # float red = [protocolor red];
24910 # float green = [protocolor green];
24911 # float blue = [protocolor blue];
24912 # FloatValue* alpha_wrapper = [protocolor alpha];
24913 # float alpha = 1.0;
24914 # if (alpha_wrapper != nil) {
24915 # alpha = [alpha_wrapper value];
24916 # }
24917 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
24918 # }
24919 #
24920 # static Color* toProto(UIColor* color) {
24921 # CGFloat red, green, blue, alpha;
24922 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
24923 # return nil;
24924 # }
24925 # Color* result = [Color alloc] init];
24926 # [result setRed:red];
24927 # [result setGreen:green];
24928 # [result setBlue:blue];
24929 # if (alpha <= 0.9999) {
24930 # [result setAlpha:floatWrapperWithValue(alpha)];
24931 # }
24932 # [result autorelease];
24933 # return result;
24934 # }
24935 # // ...
24936 #
24937 # Example (JavaScript):
24938 #
24939 # // ...
24940 #
24941 # var protoToCssColor = function(rgb_color) {
24942 # var redFrac = rgb_color.red || 0.0;
24943 # var greenFrac = rgb_color.green || 0.0;
24944 # var blueFrac = rgb_color.blue || 0.0;
24945 # var red = Math.floor(redFrac * 255);
24946 # var green = Math.floor(greenFrac * 255);
24947 # var blue = Math.floor(blueFrac * 255);
24948 #
24949 # if (!('alpha' in rgb_color)) {
24950 # return rgbToCssColor_(red, green, blue);
24951 # }
24952 #
24953 # var alphaFrac = rgb_color.alpha.value || 0.0;
24954 # var rgbParams = [red, green, blue].join(',');
24955 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
24956 # };
24957 #
24958 # var rgbToCssColor_ = function(red, green, blue) {
24959 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
24960 # var hexString = rgbNumber.toString(16);
24961 # var missingZeros = 6 - hexString.length;
24962 # var resultBuilder = ['#'];
24963 # for (var i = 0; i < missingZeros; i++) {
24964 # resultBuilder.push('0');
24965 # }
24966 # resultBuilder.push(hexString);
24967 # return resultBuilder.join('');
24968 # };
24969 #
24970 # // ...
24971 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
24972 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
24973 # the final pixel color is defined by the equation:
24974 #
24975 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
24976 #
24977 # This means that a value of 1.0 corresponds to a solid color, whereas
24978 # a value of 0.0 corresponds to a completely transparent color. This
24979 # uses a wrapper message rather than a simple float scalar so that it is
24980 # possible to distinguish between a default value and the value being unset.
24981 # If omitted, this color object is to be rendered as a solid color
24982 # (as if the alpha value had been explicitly given with a value of 1.0).
24983 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
24984 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
24985 },
24986 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070024987 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070024988 "style": "A String", # The style of the border.
24989 },
24990 "right": { # A border along a cell. # The right border of the cell.
24991 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
24992 # for simplicity of conversion to/from color representations in various
24993 # languages over compactness; for example, the fields of this representation
24994 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
24995 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
24996 # method in iOS; and, with just a little work, it can be easily formatted into
24997 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
24998 #
24999 # Example (Java):
25000 #
25001 # import com.google.type.Color;
25002 #
25003 # // ...
25004 # public static java.awt.Color fromProto(Color protocolor) {
25005 # float alpha = protocolor.hasAlpha()
25006 # ? protocolor.getAlpha().getValue()
25007 # : 1.0;
25008 #
25009 # return new java.awt.Color(
25010 # protocolor.getRed(),
25011 # protocolor.getGreen(),
25012 # protocolor.getBlue(),
25013 # alpha);
25014 # }
25015 #
25016 # public static Color toProto(java.awt.Color color) {
25017 # float red = (float) color.getRed();
25018 # float green = (float) color.getGreen();
25019 # float blue = (float) color.getBlue();
25020 # float denominator = 255.0;
25021 # Color.Builder resultBuilder =
25022 # Color
25023 # .newBuilder()
25024 # .setRed(red / denominator)
25025 # .setGreen(green / denominator)
25026 # .setBlue(blue / denominator);
25027 # int alpha = color.getAlpha();
25028 # if (alpha != 255) {
25029 # result.setAlpha(
25030 # FloatValue
25031 # .newBuilder()
25032 # .setValue(((float) alpha) / denominator)
25033 # .build());
25034 # }
25035 # return resultBuilder.build();
25036 # }
25037 # // ...
25038 #
25039 # Example (iOS / Obj-C):
25040 #
25041 # // ...
25042 # static UIColor* fromProto(Color* protocolor) {
25043 # float red = [protocolor red];
25044 # float green = [protocolor green];
25045 # float blue = [protocolor blue];
25046 # FloatValue* alpha_wrapper = [protocolor alpha];
25047 # float alpha = 1.0;
25048 # if (alpha_wrapper != nil) {
25049 # alpha = [alpha_wrapper value];
25050 # }
25051 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25052 # }
25053 #
25054 # static Color* toProto(UIColor* color) {
25055 # CGFloat red, green, blue, alpha;
25056 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25057 # return nil;
25058 # }
25059 # Color* result = [Color alloc] init];
25060 # [result setRed:red];
25061 # [result setGreen:green];
25062 # [result setBlue:blue];
25063 # if (alpha <= 0.9999) {
25064 # [result setAlpha:floatWrapperWithValue(alpha)];
25065 # }
25066 # [result autorelease];
25067 # return result;
25068 # }
25069 # // ...
25070 #
25071 # Example (JavaScript):
25072 #
25073 # // ...
25074 #
25075 # var protoToCssColor = function(rgb_color) {
25076 # var redFrac = rgb_color.red || 0.0;
25077 # var greenFrac = rgb_color.green || 0.0;
25078 # var blueFrac = rgb_color.blue || 0.0;
25079 # var red = Math.floor(redFrac * 255);
25080 # var green = Math.floor(greenFrac * 255);
25081 # var blue = Math.floor(blueFrac * 255);
25082 #
25083 # if (!('alpha' in rgb_color)) {
25084 # return rgbToCssColor_(red, green, blue);
25085 # }
25086 #
25087 # var alphaFrac = rgb_color.alpha.value || 0.0;
25088 # var rgbParams = [red, green, blue].join(',');
25089 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25090 # };
25091 #
25092 # var rgbToCssColor_ = function(red, green, blue) {
25093 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25094 # var hexString = rgbNumber.toString(16);
25095 # var missingZeros = 6 - hexString.length;
25096 # var resultBuilder = ['#'];
25097 # for (var i = 0; i < missingZeros; i++) {
25098 # resultBuilder.push('0');
25099 # }
25100 # resultBuilder.push(hexString);
25101 # return resultBuilder.join('');
25102 # };
25103 #
25104 # // ...
25105 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25106 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25107 # the final pixel color is defined by the equation:
25108 #
25109 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25110 #
25111 # This means that a value of 1.0 corresponds to a solid color, whereas
25112 # a value of 0.0 corresponds to a completely transparent color. This
25113 # uses a wrapper message rather than a simple float scalar so that it is
25114 # possible to distinguish between a default value and the value being unset.
25115 # If omitted, this color object is to be rendered as a solid color
25116 # (as if the alpha value had been explicitly given with a value of 1.0).
25117 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25118 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25119 },
25120 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025121 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025122 "style": "A String", # The style of the border.
25123 },
25124 "bottom": { # A border along a cell. # The bottom border of the cell.
25125 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25126 # for simplicity of conversion to/from color representations in various
25127 # languages over compactness; for example, the fields of this representation
25128 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25129 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25130 # method in iOS; and, with just a little work, it can be easily formatted into
25131 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25132 #
25133 # Example (Java):
25134 #
25135 # import com.google.type.Color;
25136 #
25137 # // ...
25138 # public static java.awt.Color fromProto(Color protocolor) {
25139 # float alpha = protocolor.hasAlpha()
25140 # ? protocolor.getAlpha().getValue()
25141 # : 1.0;
25142 #
25143 # return new java.awt.Color(
25144 # protocolor.getRed(),
25145 # protocolor.getGreen(),
25146 # protocolor.getBlue(),
25147 # alpha);
25148 # }
25149 #
25150 # public static Color toProto(java.awt.Color color) {
25151 # float red = (float) color.getRed();
25152 # float green = (float) color.getGreen();
25153 # float blue = (float) color.getBlue();
25154 # float denominator = 255.0;
25155 # Color.Builder resultBuilder =
25156 # Color
25157 # .newBuilder()
25158 # .setRed(red / denominator)
25159 # .setGreen(green / denominator)
25160 # .setBlue(blue / denominator);
25161 # int alpha = color.getAlpha();
25162 # if (alpha != 255) {
25163 # result.setAlpha(
25164 # FloatValue
25165 # .newBuilder()
25166 # .setValue(((float) alpha) / denominator)
25167 # .build());
25168 # }
25169 # return resultBuilder.build();
25170 # }
25171 # // ...
25172 #
25173 # Example (iOS / Obj-C):
25174 #
25175 # // ...
25176 # static UIColor* fromProto(Color* protocolor) {
25177 # float red = [protocolor red];
25178 # float green = [protocolor green];
25179 # float blue = [protocolor blue];
25180 # FloatValue* alpha_wrapper = [protocolor alpha];
25181 # float alpha = 1.0;
25182 # if (alpha_wrapper != nil) {
25183 # alpha = [alpha_wrapper value];
25184 # }
25185 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25186 # }
25187 #
25188 # static Color* toProto(UIColor* color) {
25189 # CGFloat red, green, blue, alpha;
25190 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25191 # return nil;
25192 # }
25193 # Color* result = [Color alloc] init];
25194 # [result setRed:red];
25195 # [result setGreen:green];
25196 # [result setBlue:blue];
25197 # if (alpha <= 0.9999) {
25198 # [result setAlpha:floatWrapperWithValue(alpha)];
25199 # }
25200 # [result autorelease];
25201 # return result;
25202 # }
25203 # // ...
25204 #
25205 # Example (JavaScript):
25206 #
25207 # // ...
25208 #
25209 # var protoToCssColor = function(rgb_color) {
25210 # var redFrac = rgb_color.red || 0.0;
25211 # var greenFrac = rgb_color.green || 0.0;
25212 # var blueFrac = rgb_color.blue || 0.0;
25213 # var red = Math.floor(redFrac * 255);
25214 # var green = Math.floor(greenFrac * 255);
25215 # var blue = Math.floor(blueFrac * 255);
25216 #
25217 # if (!('alpha' in rgb_color)) {
25218 # return rgbToCssColor_(red, green, blue);
25219 # }
25220 #
25221 # var alphaFrac = rgb_color.alpha.value || 0.0;
25222 # var rgbParams = [red, green, blue].join(',');
25223 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25224 # };
25225 #
25226 # var rgbToCssColor_ = function(red, green, blue) {
25227 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25228 # var hexString = rgbNumber.toString(16);
25229 # var missingZeros = 6 - hexString.length;
25230 # var resultBuilder = ['#'];
25231 # for (var i = 0; i < missingZeros; i++) {
25232 # resultBuilder.push('0');
25233 # }
25234 # resultBuilder.push(hexString);
25235 # return resultBuilder.join('');
25236 # };
25237 #
25238 # // ...
25239 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25240 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25241 # the final pixel color is defined by the equation:
25242 #
25243 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25244 #
25245 # This means that a value of 1.0 corresponds to a solid color, whereas
25246 # a value of 0.0 corresponds to a completely transparent color. This
25247 # uses a wrapper message rather than a simple float scalar so that it is
25248 # possible to distinguish between a default value and the value being unset.
25249 # If omitted, this color object is to be rendered as a solid color
25250 # (as if the alpha value had been explicitly given with a value of 1.0).
25251 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25252 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25253 },
25254 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025255 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025256 "style": "A String", # The style of the border.
25257 },
25258 "left": { # A border along a cell. # The left border of the cell.
25259 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
25260 # for simplicity of conversion to/from color representations in various
25261 # languages over compactness; for example, the fields of this representation
25262 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
25263 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
25264 # method in iOS; and, with just a little work, it can be easily formatted into
25265 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
25266 #
25267 # Example (Java):
25268 #
25269 # import com.google.type.Color;
25270 #
25271 # // ...
25272 # public static java.awt.Color fromProto(Color protocolor) {
25273 # float alpha = protocolor.hasAlpha()
25274 # ? protocolor.getAlpha().getValue()
25275 # : 1.0;
25276 #
25277 # return new java.awt.Color(
25278 # protocolor.getRed(),
25279 # protocolor.getGreen(),
25280 # protocolor.getBlue(),
25281 # alpha);
25282 # }
25283 #
25284 # public static Color toProto(java.awt.Color color) {
25285 # float red = (float) color.getRed();
25286 # float green = (float) color.getGreen();
25287 # float blue = (float) color.getBlue();
25288 # float denominator = 255.0;
25289 # Color.Builder resultBuilder =
25290 # Color
25291 # .newBuilder()
25292 # .setRed(red / denominator)
25293 # .setGreen(green / denominator)
25294 # .setBlue(blue / denominator);
25295 # int alpha = color.getAlpha();
25296 # if (alpha != 255) {
25297 # result.setAlpha(
25298 # FloatValue
25299 # .newBuilder()
25300 # .setValue(((float) alpha) / denominator)
25301 # .build());
25302 # }
25303 # return resultBuilder.build();
25304 # }
25305 # // ...
25306 #
25307 # Example (iOS / Obj-C):
25308 #
25309 # // ...
25310 # static UIColor* fromProto(Color* protocolor) {
25311 # float red = [protocolor red];
25312 # float green = [protocolor green];
25313 # float blue = [protocolor blue];
25314 # FloatValue* alpha_wrapper = [protocolor alpha];
25315 # float alpha = 1.0;
25316 # if (alpha_wrapper != nil) {
25317 # alpha = [alpha_wrapper value];
25318 # }
25319 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
25320 # }
25321 #
25322 # static Color* toProto(UIColor* color) {
25323 # CGFloat red, green, blue, alpha;
25324 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
25325 # return nil;
25326 # }
25327 # Color* result = [Color alloc] init];
25328 # [result setRed:red];
25329 # [result setGreen:green];
25330 # [result setBlue:blue];
25331 # if (alpha <= 0.9999) {
25332 # [result setAlpha:floatWrapperWithValue(alpha)];
25333 # }
25334 # [result autorelease];
25335 # return result;
25336 # }
25337 # // ...
25338 #
25339 # Example (JavaScript):
25340 #
25341 # // ...
25342 #
25343 # var protoToCssColor = function(rgb_color) {
25344 # var redFrac = rgb_color.red || 0.0;
25345 # var greenFrac = rgb_color.green || 0.0;
25346 # var blueFrac = rgb_color.blue || 0.0;
25347 # var red = Math.floor(redFrac * 255);
25348 # var green = Math.floor(greenFrac * 255);
25349 # var blue = Math.floor(blueFrac * 255);
25350 #
25351 # if (!('alpha' in rgb_color)) {
25352 # return rgbToCssColor_(red, green, blue);
25353 # }
25354 #
25355 # var alphaFrac = rgb_color.alpha.value || 0.0;
25356 # var rgbParams = [red, green, blue].join(',');
25357 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
25358 # };
25359 #
25360 # var rgbToCssColor_ = function(red, green, blue) {
25361 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
25362 # var hexString = rgbNumber.toString(16);
25363 # var missingZeros = 6 - hexString.length;
25364 # var resultBuilder = ['#'];
25365 # for (var i = 0; i < missingZeros; i++) {
25366 # resultBuilder.push('0');
25367 # }
25368 # resultBuilder.push(hexString);
25369 # return resultBuilder.join('');
25370 # };
25371 #
25372 # // ...
25373 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
25374 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
25375 # the final pixel color is defined by the equation:
25376 #
25377 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
25378 #
25379 # This means that a value of 1.0 corresponds to a solid color, whereas
25380 # a value of 0.0 corresponds to a completely transparent color. This
25381 # uses a wrapper message rather than a simple float scalar so that it is
25382 # possible to distinguish between a default value and the value being unset.
25383 # If omitted, this color object is to be rendered as a solid color
25384 # (as if the alpha value had been explicitly given with a value of 1.0).
25385 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
25386 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
25387 },
25388 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070025389 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070025390 "style": "A String", # The style of the border.
25391 },
25392 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040025393 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
25394 "angle": 42, # The angle between the standard orientation and the desired orientation.
25395 # Measured in degrees. Valid values are between -90 and 90. Positive
25396 # angles are angled upwards, negative are angled downwards.
25397 #
25398 # Note: For LTR text direction positive angles are in the counterclockwise
25399 # direction, whereas for RTL they are in the clockwise direction
25400 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
25401 # characters is unchanged.
25402 # For example:
25403 #
25404 # | V |
25405 # | e |
25406 # | r |
25407 # | t |
25408 # | i |
25409 # | c |
25410 # | a |
25411 # | l |
25412 },
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040026515 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026516 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
26517 "borders": { # The borders of the cell. # The borders of the cell.
26518 "top": { # A border along a cell. # The top border of the cell.
26519 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26520 # for simplicity of conversion to/from color representations in various
26521 # languages over compactness; for example, the fields of this representation
26522 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26523 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26524 # method in iOS; and, with just a little work, it can be easily formatted into
26525 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26526 #
26527 # Example (Java):
26528 #
26529 # import com.google.type.Color;
26530 #
26531 # // ...
26532 # public static java.awt.Color fromProto(Color protocolor) {
26533 # float alpha = protocolor.hasAlpha()
26534 # ? protocolor.getAlpha().getValue()
26535 # : 1.0;
26536 #
26537 # return new java.awt.Color(
26538 # protocolor.getRed(),
26539 # protocolor.getGreen(),
26540 # protocolor.getBlue(),
26541 # alpha);
26542 # }
26543 #
26544 # public static Color toProto(java.awt.Color color) {
26545 # float red = (float) color.getRed();
26546 # float green = (float) color.getGreen();
26547 # float blue = (float) color.getBlue();
26548 # float denominator = 255.0;
26549 # Color.Builder resultBuilder =
26550 # Color
26551 # .newBuilder()
26552 # .setRed(red / denominator)
26553 # .setGreen(green / denominator)
26554 # .setBlue(blue / denominator);
26555 # int alpha = color.getAlpha();
26556 # if (alpha != 255) {
26557 # result.setAlpha(
26558 # FloatValue
26559 # .newBuilder()
26560 # .setValue(((float) alpha) / denominator)
26561 # .build());
26562 # }
26563 # return resultBuilder.build();
26564 # }
26565 # // ...
26566 #
26567 # Example (iOS / Obj-C):
26568 #
26569 # // ...
26570 # static UIColor* fromProto(Color* protocolor) {
26571 # float red = [protocolor red];
26572 # float green = [protocolor green];
26573 # float blue = [protocolor blue];
26574 # FloatValue* alpha_wrapper = [protocolor alpha];
26575 # float alpha = 1.0;
26576 # if (alpha_wrapper != nil) {
26577 # alpha = [alpha_wrapper value];
26578 # }
26579 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26580 # }
26581 #
26582 # static Color* toProto(UIColor* color) {
26583 # CGFloat red, green, blue, alpha;
26584 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26585 # return nil;
26586 # }
26587 # Color* result = [Color alloc] init];
26588 # [result setRed:red];
26589 # [result setGreen:green];
26590 # [result setBlue:blue];
26591 # if (alpha <= 0.9999) {
26592 # [result setAlpha:floatWrapperWithValue(alpha)];
26593 # }
26594 # [result autorelease];
26595 # return result;
26596 # }
26597 # // ...
26598 #
26599 # Example (JavaScript):
26600 #
26601 # // ...
26602 #
26603 # var protoToCssColor = function(rgb_color) {
26604 # var redFrac = rgb_color.red || 0.0;
26605 # var greenFrac = rgb_color.green || 0.0;
26606 # var blueFrac = rgb_color.blue || 0.0;
26607 # var red = Math.floor(redFrac * 255);
26608 # var green = Math.floor(greenFrac * 255);
26609 # var blue = Math.floor(blueFrac * 255);
26610 #
26611 # if (!('alpha' in rgb_color)) {
26612 # return rgbToCssColor_(red, green, blue);
26613 # }
26614 #
26615 # var alphaFrac = rgb_color.alpha.value || 0.0;
26616 # var rgbParams = [red, green, blue].join(',');
26617 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26618 # };
26619 #
26620 # var rgbToCssColor_ = function(red, green, blue) {
26621 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26622 # var hexString = rgbNumber.toString(16);
26623 # var missingZeros = 6 - hexString.length;
26624 # var resultBuilder = ['#'];
26625 # for (var i = 0; i < missingZeros; i++) {
26626 # resultBuilder.push('0');
26627 # }
26628 # resultBuilder.push(hexString);
26629 # return resultBuilder.join('');
26630 # };
26631 #
26632 # // ...
26633 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26634 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26635 # the final pixel color is defined by the equation:
26636 #
26637 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26638 #
26639 # This means that a value of 1.0 corresponds to a solid color, whereas
26640 # a value of 0.0 corresponds to a completely transparent color. This
26641 # uses a wrapper message rather than a simple float scalar so that it is
26642 # possible to distinguish between a default value and the value being unset.
26643 # If omitted, this color object is to be rendered as a solid color
26644 # (as if the alpha value had been explicitly given with a value of 1.0).
26645 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26646 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26647 },
26648 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026649 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026650 "style": "A String", # The style of the border.
26651 },
26652 "right": { # A border along a cell. # The right border of the cell.
26653 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26654 # for simplicity of conversion to/from color representations in various
26655 # languages over compactness; for example, the fields of this representation
26656 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26657 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26658 # method in iOS; and, with just a little work, it can be easily formatted into
26659 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26660 #
26661 # Example (Java):
26662 #
26663 # import com.google.type.Color;
26664 #
26665 # // ...
26666 # public static java.awt.Color fromProto(Color protocolor) {
26667 # float alpha = protocolor.hasAlpha()
26668 # ? protocolor.getAlpha().getValue()
26669 # : 1.0;
26670 #
26671 # return new java.awt.Color(
26672 # protocolor.getRed(),
26673 # protocolor.getGreen(),
26674 # protocolor.getBlue(),
26675 # alpha);
26676 # }
26677 #
26678 # public static Color toProto(java.awt.Color color) {
26679 # float red = (float) color.getRed();
26680 # float green = (float) color.getGreen();
26681 # float blue = (float) color.getBlue();
26682 # float denominator = 255.0;
26683 # Color.Builder resultBuilder =
26684 # Color
26685 # .newBuilder()
26686 # .setRed(red / denominator)
26687 # .setGreen(green / denominator)
26688 # .setBlue(blue / denominator);
26689 # int alpha = color.getAlpha();
26690 # if (alpha != 255) {
26691 # result.setAlpha(
26692 # FloatValue
26693 # .newBuilder()
26694 # .setValue(((float) alpha) / denominator)
26695 # .build());
26696 # }
26697 # return resultBuilder.build();
26698 # }
26699 # // ...
26700 #
26701 # Example (iOS / Obj-C):
26702 #
26703 # // ...
26704 # static UIColor* fromProto(Color* protocolor) {
26705 # float red = [protocolor red];
26706 # float green = [protocolor green];
26707 # float blue = [protocolor blue];
26708 # FloatValue* alpha_wrapper = [protocolor alpha];
26709 # float alpha = 1.0;
26710 # if (alpha_wrapper != nil) {
26711 # alpha = [alpha_wrapper value];
26712 # }
26713 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26714 # }
26715 #
26716 # static Color* toProto(UIColor* color) {
26717 # CGFloat red, green, blue, alpha;
26718 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26719 # return nil;
26720 # }
26721 # Color* result = [Color alloc] init];
26722 # [result setRed:red];
26723 # [result setGreen:green];
26724 # [result setBlue:blue];
26725 # if (alpha <= 0.9999) {
26726 # [result setAlpha:floatWrapperWithValue(alpha)];
26727 # }
26728 # [result autorelease];
26729 # return result;
26730 # }
26731 # // ...
26732 #
26733 # Example (JavaScript):
26734 #
26735 # // ...
26736 #
26737 # var protoToCssColor = function(rgb_color) {
26738 # var redFrac = rgb_color.red || 0.0;
26739 # var greenFrac = rgb_color.green || 0.0;
26740 # var blueFrac = rgb_color.blue || 0.0;
26741 # var red = Math.floor(redFrac * 255);
26742 # var green = Math.floor(greenFrac * 255);
26743 # var blue = Math.floor(blueFrac * 255);
26744 #
26745 # if (!('alpha' in rgb_color)) {
26746 # return rgbToCssColor_(red, green, blue);
26747 # }
26748 #
26749 # var alphaFrac = rgb_color.alpha.value || 0.0;
26750 # var rgbParams = [red, green, blue].join(',');
26751 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26752 # };
26753 #
26754 # var rgbToCssColor_ = function(red, green, blue) {
26755 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26756 # var hexString = rgbNumber.toString(16);
26757 # var missingZeros = 6 - hexString.length;
26758 # var resultBuilder = ['#'];
26759 # for (var i = 0; i < missingZeros; i++) {
26760 # resultBuilder.push('0');
26761 # }
26762 # resultBuilder.push(hexString);
26763 # return resultBuilder.join('');
26764 # };
26765 #
26766 # // ...
26767 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26768 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26769 # the final pixel color is defined by the equation:
26770 #
26771 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26772 #
26773 # This means that a value of 1.0 corresponds to a solid color, whereas
26774 # a value of 0.0 corresponds to a completely transparent color. This
26775 # uses a wrapper message rather than a simple float scalar so that it is
26776 # possible to distinguish between a default value and the value being unset.
26777 # If omitted, this color object is to be rendered as a solid color
26778 # (as if the alpha value had been explicitly given with a value of 1.0).
26779 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26780 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26781 },
26782 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026783 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026784 "style": "A String", # The style of the border.
26785 },
26786 "bottom": { # A border along a cell. # The bottom border of the cell.
26787 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26788 # for simplicity of conversion to/from color representations in various
26789 # languages over compactness; for example, the fields of this representation
26790 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26791 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26792 # method in iOS; and, with just a little work, it can be easily formatted into
26793 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26794 #
26795 # Example (Java):
26796 #
26797 # import com.google.type.Color;
26798 #
26799 # // ...
26800 # public static java.awt.Color fromProto(Color protocolor) {
26801 # float alpha = protocolor.hasAlpha()
26802 # ? protocolor.getAlpha().getValue()
26803 # : 1.0;
26804 #
26805 # return new java.awt.Color(
26806 # protocolor.getRed(),
26807 # protocolor.getGreen(),
26808 # protocolor.getBlue(),
26809 # alpha);
26810 # }
26811 #
26812 # public static Color toProto(java.awt.Color color) {
26813 # float red = (float) color.getRed();
26814 # float green = (float) color.getGreen();
26815 # float blue = (float) color.getBlue();
26816 # float denominator = 255.0;
26817 # Color.Builder resultBuilder =
26818 # Color
26819 # .newBuilder()
26820 # .setRed(red / denominator)
26821 # .setGreen(green / denominator)
26822 # .setBlue(blue / denominator);
26823 # int alpha = color.getAlpha();
26824 # if (alpha != 255) {
26825 # result.setAlpha(
26826 # FloatValue
26827 # .newBuilder()
26828 # .setValue(((float) alpha) / denominator)
26829 # .build());
26830 # }
26831 # return resultBuilder.build();
26832 # }
26833 # // ...
26834 #
26835 # Example (iOS / Obj-C):
26836 #
26837 # // ...
26838 # static UIColor* fromProto(Color* protocolor) {
26839 # float red = [protocolor red];
26840 # float green = [protocolor green];
26841 # float blue = [protocolor blue];
26842 # FloatValue* alpha_wrapper = [protocolor alpha];
26843 # float alpha = 1.0;
26844 # if (alpha_wrapper != nil) {
26845 # alpha = [alpha_wrapper value];
26846 # }
26847 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26848 # }
26849 #
26850 # static Color* toProto(UIColor* color) {
26851 # CGFloat red, green, blue, alpha;
26852 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26853 # return nil;
26854 # }
26855 # Color* result = [Color alloc] init];
26856 # [result setRed:red];
26857 # [result setGreen:green];
26858 # [result setBlue:blue];
26859 # if (alpha <= 0.9999) {
26860 # [result setAlpha:floatWrapperWithValue(alpha)];
26861 # }
26862 # [result autorelease];
26863 # return result;
26864 # }
26865 # // ...
26866 #
26867 # Example (JavaScript):
26868 #
26869 # // ...
26870 #
26871 # var protoToCssColor = function(rgb_color) {
26872 # var redFrac = rgb_color.red || 0.0;
26873 # var greenFrac = rgb_color.green || 0.0;
26874 # var blueFrac = rgb_color.blue || 0.0;
26875 # var red = Math.floor(redFrac * 255);
26876 # var green = Math.floor(greenFrac * 255);
26877 # var blue = Math.floor(blueFrac * 255);
26878 #
26879 # if (!('alpha' in rgb_color)) {
26880 # return rgbToCssColor_(red, green, blue);
26881 # }
26882 #
26883 # var alphaFrac = rgb_color.alpha.value || 0.0;
26884 # var rgbParams = [red, green, blue].join(',');
26885 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
26886 # };
26887 #
26888 # var rgbToCssColor_ = function(red, green, blue) {
26889 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
26890 # var hexString = rgbNumber.toString(16);
26891 # var missingZeros = 6 - hexString.length;
26892 # var resultBuilder = ['#'];
26893 # for (var i = 0; i < missingZeros; i++) {
26894 # resultBuilder.push('0');
26895 # }
26896 # resultBuilder.push(hexString);
26897 # return resultBuilder.join('');
26898 # };
26899 #
26900 # // ...
26901 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
26902 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
26903 # the final pixel color is defined by the equation:
26904 #
26905 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
26906 #
26907 # This means that a value of 1.0 corresponds to a solid color, whereas
26908 # a value of 0.0 corresponds to a completely transparent color. This
26909 # uses a wrapper message rather than a simple float scalar so that it is
26910 # possible to distinguish between a default value and the value being unset.
26911 # If omitted, this color object is to be rendered as a solid color
26912 # (as if the alpha value had been explicitly given with a value of 1.0).
26913 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
26914 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
26915 },
26916 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070026917 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070026918 "style": "A String", # The style of the border.
26919 },
26920 "left": { # A border along a cell. # The left border of the cell.
26921 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
26922 # for simplicity of conversion to/from color representations in various
26923 # languages over compactness; for example, the fields of this representation
26924 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
26925 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
26926 # method in iOS; and, with just a little work, it can be easily formatted into
26927 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
26928 #
26929 # Example (Java):
26930 #
26931 # import com.google.type.Color;
26932 #
26933 # // ...
26934 # public static java.awt.Color fromProto(Color protocolor) {
26935 # float alpha = protocolor.hasAlpha()
26936 # ? protocolor.getAlpha().getValue()
26937 # : 1.0;
26938 #
26939 # return new java.awt.Color(
26940 # protocolor.getRed(),
26941 # protocolor.getGreen(),
26942 # protocolor.getBlue(),
26943 # alpha);
26944 # }
26945 #
26946 # public static Color toProto(java.awt.Color color) {
26947 # float red = (float) color.getRed();
26948 # float green = (float) color.getGreen();
26949 # float blue = (float) color.getBlue();
26950 # float denominator = 255.0;
26951 # Color.Builder resultBuilder =
26952 # Color
26953 # .newBuilder()
26954 # .setRed(red / denominator)
26955 # .setGreen(green / denominator)
26956 # .setBlue(blue / denominator);
26957 # int alpha = color.getAlpha();
26958 # if (alpha != 255) {
26959 # result.setAlpha(
26960 # FloatValue
26961 # .newBuilder()
26962 # .setValue(((float) alpha) / denominator)
26963 # .build());
26964 # }
26965 # return resultBuilder.build();
26966 # }
26967 # // ...
26968 #
26969 # Example (iOS / Obj-C):
26970 #
26971 # // ...
26972 # static UIColor* fromProto(Color* protocolor) {
26973 # float red = [protocolor red];
26974 # float green = [protocolor green];
26975 # float blue = [protocolor blue];
26976 # FloatValue* alpha_wrapper = [protocolor alpha];
26977 # float alpha = 1.0;
26978 # if (alpha_wrapper != nil) {
26979 # alpha = [alpha_wrapper value];
26980 # }
26981 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
26982 # }
26983 #
26984 # static Color* toProto(UIColor* color) {
26985 # CGFloat red, green, blue, alpha;
26986 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
26987 # return nil;
26988 # }
26989 # Color* result = [Color alloc] init];
26990 # [result setRed:red];
26991 # [result setGreen:green];
26992 # [result setBlue:blue];
26993 # if (alpha <= 0.9999) {
26994 # [result setAlpha:floatWrapperWithValue(alpha)];
26995 # }
26996 # [result autorelease];
26997 # return result;
26998 # }
26999 # // ...
27000 #
27001 # Example (JavaScript):
27002 #
27003 # // ...
27004 #
27005 # var protoToCssColor = function(rgb_color) {
27006 # var redFrac = rgb_color.red || 0.0;
27007 # var greenFrac = rgb_color.green || 0.0;
27008 # var blueFrac = rgb_color.blue || 0.0;
27009 # var red = Math.floor(redFrac * 255);
27010 # var green = Math.floor(greenFrac * 255);
27011 # var blue = Math.floor(blueFrac * 255);
27012 #
27013 # if (!('alpha' in rgb_color)) {
27014 # return rgbToCssColor_(red, green, blue);
27015 # }
27016 #
27017 # var alphaFrac = rgb_color.alpha.value || 0.0;
27018 # var rgbParams = [red, green, blue].join(',');
27019 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
27020 # };
27021 #
27022 # var rgbToCssColor_ = function(red, green, blue) {
27023 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
27024 # var hexString = rgbNumber.toString(16);
27025 # var missingZeros = 6 - hexString.length;
27026 # var resultBuilder = ['#'];
27027 # for (var i = 0; i < missingZeros; i++) {
27028 # resultBuilder.push('0');
27029 # }
27030 # resultBuilder.push(hexString);
27031 # return resultBuilder.join('');
27032 # };
27033 #
27034 # // ...
27035 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
27036 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
27037 # the final pixel color is defined by the equation:
27038 #
27039 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
27040 #
27041 # This means that a value of 1.0 corresponds to a solid color, whereas
27042 # a value of 0.0 corresponds to a completely transparent color. This
27043 # uses a wrapper message rather than a simple float scalar so that it is
27044 # possible to distinguish between a default value and the value being unset.
27045 # If omitted, this color object is to be rendered as a solid color
27046 # (as if the alpha value had been explicitly given with a value of 1.0).
27047 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
27048 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
27049 },
27050 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070027051 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070027052 "style": "A String", # The style of the border.
27053 },
27054 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040027055 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
27056 "angle": 42, # The angle between the standard orientation and the desired orientation.
27057 # Measured in degrees. Valid values are between -90 and 90. Positive
27058 # angles are angled upwards, negative are angled downwards.
27059 #
27060 # Note: For LTR text direction positive angles are in the counterclockwise
27061 # direction, whereas for RTL they are in the clockwise direction
27062 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
27063 # characters is unchanged.
27064 # For example:
27065 #
27066 # | V |
27067 # | e |
27068 # | r |
27069 # | t |
27070 # | i |
27071 # | c |
27072 # | a |
27073 # | l |
27074 },
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 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
28775 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
28776 # CellData.effectiveFormat will not be set if the
28777 # cell's format is equal to this default format.
28778 # This field is read-only.
28779 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
28780 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
28781 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028782 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028783 # information about the supported patterns.
28784 "type": "A String", # The type of the number format.
28785 # When writing, this field must be set.
28786 },
28787 "textDirection": "A String", # The direction of the text in the cell.
28788 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
28789 # When updating padding, every field must be specified.
28790 "top": 42, # The top padding of the cell.
28791 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028792 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040028793 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080028794 },
28795 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
28796 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
28797 # for simplicity of conversion to/from color representations in various
28798 # languages over compactness; for example, the fields of this representation
28799 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28800 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28801 # method in iOS; and, with just a little work, it can be easily formatted into
28802 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28803 #
28804 # Example (Java):
28805 #
28806 # import com.google.type.Color;
28807 #
28808 # // ...
28809 # public static java.awt.Color fromProto(Color protocolor) {
28810 # float alpha = protocolor.hasAlpha()
28811 # ? protocolor.getAlpha().getValue()
28812 # : 1.0;
28813 #
28814 # return new java.awt.Color(
28815 # protocolor.getRed(),
28816 # protocolor.getGreen(),
28817 # protocolor.getBlue(),
28818 # alpha);
28819 # }
28820 #
28821 # public static Color toProto(java.awt.Color color) {
28822 # float red = (float) color.getRed();
28823 # float green = (float) color.getGreen();
28824 # float blue = (float) color.getBlue();
28825 # float denominator = 255.0;
28826 # Color.Builder resultBuilder =
28827 # Color
28828 # .newBuilder()
28829 # .setRed(red / denominator)
28830 # .setGreen(green / denominator)
28831 # .setBlue(blue / denominator);
28832 # int alpha = color.getAlpha();
28833 # if (alpha != 255) {
28834 # result.setAlpha(
28835 # FloatValue
28836 # .newBuilder()
28837 # .setValue(((float) alpha) / denominator)
28838 # .build());
28839 # }
28840 # return resultBuilder.build();
28841 # }
28842 # // ...
28843 #
28844 # Example (iOS / Obj-C):
28845 #
28846 # // ...
28847 # static UIColor* fromProto(Color* protocolor) {
28848 # float red = [protocolor red];
28849 # float green = [protocolor green];
28850 # float blue = [protocolor blue];
28851 # FloatValue* alpha_wrapper = [protocolor alpha];
28852 # float alpha = 1.0;
28853 # if (alpha_wrapper != nil) {
28854 # alpha = [alpha_wrapper value];
28855 # }
28856 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28857 # }
28858 #
28859 # static Color* toProto(UIColor* color) {
28860 # CGFloat red, green, blue, alpha;
28861 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28862 # return nil;
28863 # }
28864 # Color* result = [Color alloc] init];
28865 # [result setRed:red];
28866 # [result setGreen:green];
28867 # [result setBlue:blue];
28868 # if (alpha <= 0.9999) {
28869 # [result setAlpha:floatWrapperWithValue(alpha)];
28870 # }
28871 # [result autorelease];
28872 # return result;
28873 # }
28874 # // ...
28875 #
28876 # Example (JavaScript):
28877 #
28878 # // ...
28879 #
28880 # var protoToCssColor = function(rgb_color) {
28881 # var redFrac = rgb_color.red || 0.0;
28882 # var greenFrac = rgb_color.green || 0.0;
28883 # var blueFrac = rgb_color.blue || 0.0;
28884 # var red = Math.floor(redFrac * 255);
28885 # var green = Math.floor(greenFrac * 255);
28886 # var blue = Math.floor(blueFrac * 255);
28887 #
28888 # if (!('alpha' in rgb_color)) {
28889 # return rgbToCssColor_(red, green, blue);
28890 # }
28891 #
28892 # var alphaFrac = rgb_color.alpha.value || 0.0;
28893 # var rgbParams = [red, green, blue].join(',');
28894 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
28895 # };
28896 #
28897 # var rgbToCssColor_ = function(red, green, blue) {
28898 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
28899 # var hexString = rgbNumber.toString(16);
28900 # var missingZeros = 6 - hexString.length;
28901 # var resultBuilder = ['#'];
28902 # for (var i = 0; i < missingZeros; i++) {
28903 # resultBuilder.push('0');
28904 # }
28905 # resultBuilder.push(hexString);
28906 # return resultBuilder.join('');
28907 # };
28908 #
28909 # // ...
28910 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
28911 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
28912 # the final pixel color is defined by the equation:
28913 #
28914 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
28915 #
28916 # This means that a value of 1.0 corresponds to a solid color, whereas
28917 # a value of 0.0 corresponds to a completely transparent color. This
28918 # uses a wrapper message rather than a simple float scalar so that it is
28919 # possible to distinguish between a default value and the value being unset.
28920 # If omitted, this color object is to be rendered as a solid color
28921 # (as if the alpha value had been explicitly given with a value of 1.0).
28922 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
28923 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
28924 },
28925 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
28926 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
28927 # Absent values indicate that the field isn't specified.
28928 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
28929 # for simplicity of conversion to/from color representations in various
28930 # languages over compactness; for example, the fields of this representation
28931 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
28932 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
28933 # method in iOS; and, with just a little work, it can be easily formatted into
28934 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
28935 #
28936 # Example (Java):
28937 #
28938 # import com.google.type.Color;
28939 #
28940 # // ...
28941 # public static java.awt.Color fromProto(Color protocolor) {
28942 # float alpha = protocolor.hasAlpha()
28943 # ? protocolor.getAlpha().getValue()
28944 # : 1.0;
28945 #
28946 # return new java.awt.Color(
28947 # protocolor.getRed(),
28948 # protocolor.getGreen(),
28949 # protocolor.getBlue(),
28950 # alpha);
28951 # }
28952 #
28953 # public static Color toProto(java.awt.Color color) {
28954 # float red = (float) color.getRed();
28955 # float green = (float) color.getGreen();
28956 # float blue = (float) color.getBlue();
28957 # float denominator = 255.0;
28958 # Color.Builder resultBuilder =
28959 # Color
28960 # .newBuilder()
28961 # .setRed(red / denominator)
28962 # .setGreen(green / denominator)
28963 # .setBlue(blue / denominator);
28964 # int alpha = color.getAlpha();
28965 # if (alpha != 255) {
28966 # result.setAlpha(
28967 # FloatValue
28968 # .newBuilder()
28969 # .setValue(((float) alpha) / denominator)
28970 # .build());
28971 # }
28972 # return resultBuilder.build();
28973 # }
28974 # // ...
28975 #
28976 # Example (iOS / Obj-C):
28977 #
28978 # // ...
28979 # static UIColor* fromProto(Color* protocolor) {
28980 # float red = [protocolor red];
28981 # float green = [protocolor green];
28982 # float blue = [protocolor blue];
28983 # FloatValue* alpha_wrapper = [protocolor alpha];
28984 # float alpha = 1.0;
28985 # if (alpha_wrapper != nil) {
28986 # alpha = [alpha_wrapper value];
28987 # }
28988 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
28989 # }
28990 #
28991 # static Color* toProto(UIColor* color) {
28992 # CGFloat red, green, blue, alpha;
28993 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
28994 # return nil;
28995 # }
28996 # Color* result = [Color alloc] init];
28997 # [result setRed:red];
28998 # [result setGreen:green];
28999 # [result setBlue:blue];
29000 # if (alpha <= 0.9999) {
29001 # [result setAlpha:floatWrapperWithValue(alpha)];
29002 # }
29003 # [result autorelease];
29004 # return result;
29005 # }
29006 # // ...
29007 #
29008 # Example (JavaScript):
29009 #
29010 # // ...
29011 #
29012 # var protoToCssColor = function(rgb_color) {
29013 # var redFrac = rgb_color.red || 0.0;
29014 # var greenFrac = rgb_color.green || 0.0;
29015 # var blueFrac = rgb_color.blue || 0.0;
29016 # var red = Math.floor(redFrac * 255);
29017 # var green = Math.floor(greenFrac * 255);
29018 # var blue = Math.floor(blueFrac * 255);
29019 #
29020 # if (!('alpha' in rgb_color)) {
29021 # return rgbToCssColor_(red, green, blue);
29022 # }
29023 #
29024 # var alphaFrac = rgb_color.alpha.value || 0.0;
29025 # var rgbParams = [red, green, blue].join(',');
29026 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29027 # };
29028 #
29029 # var rgbToCssColor_ = function(red, green, blue) {
29030 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29031 # var hexString = rgbNumber.toString(16);
29032 # var missingZeros = 6 - hexString.length;
29033 # var resultBuilder = ['#'];
29034 # for (var i = 0; i < missingZeros; i++) {
29035 # resultBuilder.push('0');
29036 # }
29037 # resultBuilder.push(hexString);
29038 # return resultBuilder.join('');
29039 # };
29040 #
29041 # // ...
29042 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29043 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29044 # the final pixel color is defined by the equation:
29045 #
29046 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29047 #
29048 # This means that a value of 1.0 corresponds to a solid color, whereas
29049 # a value of 0.0 corresponds to a completely transparent color. This
29050 # uses a wrapper message rather than a simple float scalar so that it is
29051 # possible to distinguish between a default value and the value being unset.
29052 # If omitted, this color object is to be rendered as a solid color
29053 # (as if the alpha value had been explicitly given with a value of 1.0).
29054 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29055 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29056 },
29057 "bold": True or False, # True if the text is bold.
29058 "strikethrough": True or False, # True if the text has a strikethrough.
29059 "fontFamily": "A String", # The font family.
29060 "fontSize": 42, # The size of the font.
29061 "italic": True or False, # True if the text is italicized.
29062 "underline": True or False, # True if the text is underlined.
29063 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029064 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029065 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
29066 "borders": { # The borders of the cell. # The borders of the cell.
29067 "top": { # A border along a cell. # The top border of the cell.
29068 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29069 # for simplicity of conversion to/from color representations in various
29070 # languages over compactness; for example, the fields of this representation
29071 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29072 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29073 # method in iOS; and, with just a little work, it can be easily formatted into
29074 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29075 #
29076 # Example (Java):
29077 #
29078 # import com.google.type.Color;
29079 #
29080 # // ...
29081 # public static java.awt.Color fromProto(Color protocolor) {
29082 # float alpha = protocolor.hasAlpha()
29083 # ? protocolor.getAlpha().getValue()
29084 # : 1.0;
29085 #
29086 # return new java.awt.Color(
29087 # protocolor.getRed(),
29088 # protocolor.getGreen(),
29089 # protocolor.getBlue(),
29090 # alpha);
29091 # }
29092 #
29093 # public static Color toProto(java.awt.Color color) {
29094 # float red = (float) color.getRed();
29095 # float green = (float) color.getGreen();
29096 # float blue = (float) color.getBlue();
29097 # float denominator = 255.0;
29098 # Color.Builder resultBuilder =
29099 # Color
29100 # .newBuilder()
29101 # .setRed(red / denominator)
29102 # .setGreen(green / denominator)
29103 # .setBlue(blue / denominator);
29104 # int alpha = color.getAlpha();
29105 # if (alpha != 255) {
29106 # result.setAlpha(
29107 # FloatValue
29108 # .newBuilder()
29109 # .setValue(((float) alpha) / denominator)
29110 # .build());
29111 # }
29112 # return resultBuilder.build();
29113 # }
29114 # // ...
29115 #
29116 # Example (iOS / Obj-C):
29117 #
29118 # // ...
29119 # static UIColor* fromProto(Color* protocolor) {
29120 # float red = [protocolor red];
29121 # float green = [protocolor green];
29122 # float blue = [protocolor blue];
29123 # FloatValue* alpha_wrapper = [protocolor alpha];
29124 # float alpha = 1.0;
29125 # if (alpha_wrapper != nil) {
29126 # alpha = [alpha_wrapper value];
29127 # }
29128 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29129 # }
29130 #
29131 # static Color* toProto(UIColor* color) {
29132 # CGFloat red, green, blue, alpha;
29133 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29134 # return nil;
29135 # }
29136 # Color* result = [Color alloc] init];
29137 # [result setRed:red];
29138 # [result setGreen:green];
29139 # [result setBlue:blue];
29140 # if (alpha <= 0.9999) {
29141 # [result setAlpha:floatWrapperWithValue(alpha)];
29142 # }
29143 # [result autorelease];
29144 # return result;
29145 # }
29146 # // ...
29147 #
29148 # Example (JavaScript):
29149 #
29150 # // ...
29151 #
29152 # var protoToCssColor = function(rgb_color) {
29153 # var redFrac = rgb_color.red || 0.0;
29154 # var greenFrac = rgb_color.green || 0.0;
29155 # var blueFrac = rgb_color.blue || 0.0;
29156 # var red = Math.floor(redFrac * 255);
29157 # var green = Math.floor(greenFrac * 255);
29158 # var blue = Math.floor(blueFrac * 255);
29159 #
29160 # if (!('alpha' in rgb_color)) {
29161 # return rgbToCssColor_(red, green, blue);
29162 # }
29163 #
29164 # var alphaFrac = rgb_color.alpha.value || 0.0;
29165 # var rgbParams = [red, green, blue].join(',');
29166 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29167 # };
29168 #
29169 # var rgbToCssColor_ = function(red, green, blue) {
29170 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29171 # var hexString = rgbNumber.toString(16);
29172 # var missingZeros = 6 - hexString.length;
29173 # var resultBuilder = ['#'];
29174 # for (var i = 0; i < missingZeros; i++) {
29175 # resultBuilder.push('0');
29176 # }
29177 # resultBuilder.push(hexString);
29178 # return resultBuilder.join('');
29179 # };
29180 #
29181 # // ...
29182 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29183 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29184 # the final pixel color is defined by the equation:
29185 #
29186 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29187 #
29188 # This means that a value of 1.0 corresponds to a solid color, whereas
29189 # a value of 0.0 corresponds to a completely transparent color. This
29190 # uses a wrapper message rather than a simple float scalar so that it is
29191 # possible to distinguish between a default value and the value being unset.
29192 # If omitted, this color object is to be rendered as a solid color
29193 # (as if the alpha value had been explicitly given with a value of 1.0).
29194 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29195 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29196 },
29197 "width": 42, # The width of the border, in pixels.
29198 # Deprecated; the width is determined by the "style" field.
29199 "style": "A String", # The style of the border.
29200 },
29201 "right": { # A border along a cell. # The right border of the cell.
29202 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29203 # for simplicity of conversion to/from color representations in various
29204 # languages over compactness; for example, the fields of this representation
29205 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29206 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29207 # method in iOS; and, with just a little work, it can be easily formatted into
29208 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29209 #
29210 # Example (Java):
29211 #
29212 # import com.google.type.Color;
29213 #
29214 # // ...
29215 # public static java.awt.Color fromProto(Color protocolor) {
29216 # float alpha = protocolor.hasAlpha()
29217 # ? protocolor.getAlpha().getValue()
29218 # : 1.0;
29219 #
29220 # return new java.awt.Color(
29221 # protocolor.getRed(),
29222 # protocolor.getGreen(),
29223 # protocolor.getBlue(),
29224 # alpha);
29225 # }
29226 #
29227 # public static Color toProto(java.awt.Color color) {
29228 # float red = (float) color.getRed();
29229 # float green = (float) color.getGreen();
29230 # float blue = (float) color.getBlue();
29231 # float denominator = 255.0;
29232 # Color.Builder resultBuilder =
29233 # Color
29234 # .newBuilder()
29235 # .setRed(red / denominator)
29236 # .setGreen(green / denominator)
29237 # .setBlue(blue / denominator);
29238 # int alpha = color.getAlpha();
29239 # if (alpha != 255) {
29240 # result.setAlpha(
29241 # FloatValue
29242 # .newBuilder()
29243 # .setValue(((float) alpha) / denominator)
29244 # .build());
29245 # }
29246 # return resultBuilder.build();
29247 # }
29248 # // ...
29249 #
29250 # Example (iOS / Obj-C):
29251 #
29252 # // ...
29253 # static UIColor* fromProto(Color* protocolor) {
29254 # float red = [protocolor red];
29255 # float green = [protocolor green];
29256 # float blue = [protocolor blue];
29257 # FloatValue* alpha_wrapper = [protocolor alpha];
29258 # float alpha = 1.0;
29259 # if (alpha_wrapper != nil) {
29260 # alpha = [alpha_wrapper value];
29261 # }
29262 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29263 # }
29264 #
29265 # static Color* toProto(UIColor* color) {
29266 # CGFloat red, green, blue, alpha;
29267 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29268 # return nil;
29269 # }
29270 # Color* result = [Color alloc] init];
29271 # [result setRed:red];
29272 # [result setGreen:green];
29273 # [result setBlue:blue];
29274 # if (alpha <= 0.9999) {
29275 # [result setAlpha:floatWrapperWithValue(alpha)];
29276 # }
29277 # [result autorelease];
29278 # return result;
29279 # }
29280 # // ...
29281 #
29282 # Example (JavaScript):
29283 #
29284 # // ...
29285 #
29286 # var protoToCssColor = function(rgb_color) {
29287 # var redFrac = rgb_color.red || 0.0;
29288 # var greenFrac = rgb_color.green || 0.0;
29289 # var blueFrac = rgb_color.blue || 0.0;
29290 # var red = Math.floor(redFrac * 255);
29291 # var green = Math.floor(greenFrac * 255);
29292 # var blue = Math.floor(blueFrac * 255);
29293 #
29294 # if (!('alpha' in rgb_color)) {
29295 # return rgbToCssColor_(red, green, blue);
29296 # }
29297 #
29298 # var alphaFrac = rgb_color.alpha.value || 0.0;
29299 # var rgbParams = [red, green, blue].join(',');
29300 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29301 # };
29302 #
29303 # var rgbToCssColor_ = function(red, green, blue) {
29304 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29305 # var hexString = rgbNumber.toString(16);
29306 # var missingZeros = 6 - hexString.length;
29307 # var resultBuilder = ['#'];
29308 # for (var i = 0; i < missingZeros; i++) {
29309 # resultBuilder.push('0');
29310 # }
29311 # resultBuilder.push(hexString);
29312 # return resultBuilder.join('');
29313 # };
29314 #
29315 # // ...
29316 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29317 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29318 # the final pixel color is defined by the equation:
29319 #
29320 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29321 #
29322 # This means that a value of 1.0 corresponds to a solid color, whereas
29323 # a value of 0.0 corresponds to a completely transparent color. This
29324 # uses a wrapper message rather than a simple float scalar so that it is
29325 # possible to distinguish between a default value and the value being unset.
29326 # If omitted, this color object is to be rendered as a solid color
29327 # (as if the alpha value had been explicitly given with a value of 1.0).
29328 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29329 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29330 },
29331 "width": 42, # The width of the border, in pixels.
29332 # Deprecated; the width is determined by the "style" field.
29333 "style": "A String", # The style of the border.
29334 },
29335 "bottom": { # A border along a cell. # The bottom border of the cell.
29336 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29337 # for simplicity of conversion to/from color representations in various
29338 # languages over compactness; for example, the fields of this representation
29339 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29340 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29341 # method in iOS; and, with just a little work, it can be easily formatted into
29342 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29343 #
29344 # Example (Java):
29345 #
29346 # import com.google.type.Color;
29347 #
29348 # // ...
29349 # public static java.awt.Color fromProto(Color protocolor) {
29350 # float alpha = protocolor.hasAlpha()
29351 # ? protocolor.getAlpha().getValue()
29352 # : 1.0;
29353 #
29354 # return new java.awt.Color(
29355 # protocolor.getRed(),
29356 # protocolor.getGreen(),
29357 # protocolor.getBlue(),
29358 # alpha);
29359 # }
29360 #
29361 # public static Color toProto(java.awt.Color color) {
29362 # float red = (float) color.getRed();
29363 # float green = (float) color.getGreen();
29364 # float blue = (float) color.getBlue();
29365 # float denominator = 255.0;
29366 # Color.Builder resultBuilder =
29367 # Color
29368 # .newBuilder()
29369 # .setRed(red / denominator)
29370 # .setGreen(green / denominator)
29371 # .setBlue(blue / denominator);
29372 # int alpha = color.getAlpha();
29373 # if (alpha != 255) {
29374 # result.setAlpha(
29375 # FloatValue
29376 # .newBuilder()
29377 # .setValue(((float) alpha) / denominator)
29378 # .build());
29379 # }
29380 # return resultBuilder.build();
29381 # }
29382 # // ...
29383 #
29384 # Example (iOS / Obj-C):
29385 #
29386 # // ...
29387 # static UIColor* fromProto(Color* protocolor) {
29388 # float red = [protocolor red];
29389 # float green = [protocolor green];
29390 # float blue = [protocolor blue];
29391 # FloatValue* alpha_wrapper = [protocolor alpha];
29392 # float alpha = 1.0;
29393 # if (alpha_wrapper != nil) {
29394 # alpha = [alpha_wrapper value];
29395 # }
29396 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29397 # }
29398 #
29399 # static Color* toProto(UIColor* color) {
29400 # CGFloat red, green, blue, alpha;
29401 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29402 # return nil;
29403 # }
29404 # Color* result = [Color alloc] init];
29405 # [result setRed:red];
29406 # [result setGreen:green];
29407 # [result setBlue:blue];
29408 # if (alpha <= 0.9999) {
29409 # [result setAlpha:floatWrapperWithValue(alpha)];
29410 # }
29411 # [result autorelease];
29412 # return result;
29413 # }
29414 # // ...
29415 #
29416 # Example (JavaScript):
29417 #
29418 # // ...
29419 #
29420 # var protoToCssColor = function(rgb_color) {
29421 # var redFrac = rgb_color.red || 0.0;
29422 # var greenFrac = rgb_color.green || 0.0;
29423 # var blueFrac = rgb_color.blue || 0.0;
29424 # var red = Math.floor(redFrac * 255);
29425 # var green = Math.floor(greenFrac * 255);
29426 # var blue = Math.floor(blueFrac * 255);
29427 #
29428 # if (!('alpha' in rgb_color)) {
29429 # return rgbToCssColor_(red, green, blue);
29430 # }
29431 #
29432 # var alphaFrac = rgb_color.alpha.value || 0.0;
29433 # var rgbParams = [red, green, blue].join(',');
29434 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29435 # };
29436 #
29437 # var rgbToCssColor_ = function(red, green, blue) {
29438 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29439 # var hexString = rgbNumber.toString(16);
29440 # var missingZeros = 6 - hexString.length;
29441 # var resultBuilder = ['#'];
29442 # for (var i = 0; i < missingZeros; i++) {
29443 # resultBuilder.push('0');
29444 # }
29445 # resultBuilder.push(hexString);
29446 # return resultBuilder.join('');
29447 # };
29448 #
29449 # // ...
29450 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29451 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29452 # the final pixel color is defined by the equation:
29453 #
29454 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29455 #
29456 # This means that a value of 1.0 corresponds to a solid color, whereas
29457 # a value of 0.0 corresponds to a completely transparent color. This
29458 # uses a wrapper message rather than a simple float scalar so that it is
29459 # possible to distinguish between a default value and the value being unset.
29460 # If omitted, this color object is to be rendered as a solid color
29461 # (as if the alpha value had been explicitly given with a value of 1.0).
29462 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29463 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29464 },
29465 "width": 42, # The width of the border, in pixels.
29466 # Deprecated; the width is determined by the "style" field.
29467 "style": "A String", # The style of the border.
29468 },
29469 "left": { # A border along a cell. # The left border of the cell.
29470 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
29471 # for simplicity of conversion to/from color representations in various
29472 # languages over compactness; for example, the fields of this representation
29473 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29474 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
29475 # method in iOS; and, with just a little work, it can be easily formatted into
29476 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
29477 #
29478 # Example (Java):
29479 #
29480 # import com.google.type.Color;
29481 #
29482 # // ...
29483 # public static java.awt.Color fromProto(Color protocolor) {
29484 # float alpha = protocolor.hasAlpha()
29485 # ? protocolor.getAlpha().getValue()
29486 # : 1.0;
29487 #
29488 # return new java.awt.Color(
29489 # protocolor.getRed(),
29490 # protocolor.getGreen(),
29491 # protocolor.getBlue(),
29492 # alpha);
29493 # }
29494 #
29495 # public static Color toProto(java.awt.Color color) {
29496 # float red = (float) color.getRed();
29497 # float green = (float) color.getGreen();
29498 # float blue = (float) color.getBlue();
29499 # float denominator = 255.0;
29500 # Color.Builder resultBuilder =
29501 # Color
29502 # .newBuilder()
29503 # .setRed(red / denominator)
29504 # .setGreen(green / denominator)
29505 # .setBlue(blue / denominator);
29506 # int alpha = color.getAlpha();
29507 # if (alpha != 255) {
29508 # result.setAlpha(
29509 # FloatValue
29510 # .newBuilder()
29511 # .setValue(((float) alpha) / denominator)
29512 # .build());
29513 # }
29514 # return resultBuilder.build();
29515 # }
29516 # // ...
29517 #
29518 # Example (iOS / Obj-C):
29519 #
29520 # // ...
29521 # static UIColor* fromProto(Color* protocolor) {
29522 # float red = [protocolor red];
29523 # float green = [protocolor green];
29524 # float blue = [protocolor blue];
29525 # FloatValue* alpha_wrapper = [protocolor alpha];
29526 # float alpha = 1.0;
29527 # if (alpha_wrapper != nil) {
29528 # alpha = [alpha_wrapper value];
29529 # }
29530 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
29531 # }
29532 #
29533 # static Color* toProto(UIColor* color) {
29534 # CGFloat red, green, blue, alpha;
29535 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
29536 # return nil;
29537 # }
29538 # Color* result = [Color alloc] init];
29539 # [result setRed:red];
29540 # [result setGreen:green];
29541 # [result setBlue:blue];
29542 # if (alpha <= 0.9999) {
29543 # [result setAlpha:floatWrapperWithValue(alpha)];
29544 # }
29545 # [result autorelease];
29546 # return result;
29547 # }
29548 # // ...
29549 #
29550 # Example (JavaScript):
29551 #
29552 # // ...
29553 #
29554 # var protoToCssColor = function(rgb_color) {
29555 # var redFrac = rgb_color.red || 0.0;
29556 # var greenFrac = rgb_color.green || 0.0;
29557 # var blueFrac = rgb_color.blue || 0.0;
29558 # var red = Math.floor(redFrac * 255);
29559 # var green = Math.floor(greenFrac * 255);
29560 # var blue = Math.floor(blueFrac * 255);
29561 #
29562 # if (!('alpha' in rgb_color)) {
29563 # return rgbToCssColor_(red, green, blue);
29564 # }
29565 #
29566 # var alphaFrac = rgb_color.alpha.value || 0.0;
29567 # var rgbParams = [red, green, blue].join(',');
29568 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
29569 # };
29570 #
29571 # var rgbToCssColor_ = function(red, green, blue) {
29572 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
29573 # var hexString = rgbNumber.toString(16);
29574 # var missingZeros = 6 - hexString.length;
29575 # var resultBuilder = ['#'];
29576 # for (var i = 0; i < missingZeros; i++) {
29577 # resultBuilder.push('0');
29578 # }
29579 # resultBuilder.push(hexString);
29580 # return resultBuilder.join('');
29581 # };
29582 #
29583 # // ...
29584 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
29585 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
29586 # the final pixel color is defined by the equation:
29587 #
29588 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
29589 #
29590 # This means that a value of 1.0 corresponds to a solid color, whereas
29591 # a value of 0.0 corresponds to a completely transparent color. This
29592 # uses a wrapper message rather than a simple float scalar so that it is
29593 # possible to distinguish between a default value and the value being unset.
29594 # If omitted, this color object is to be rendered as a solid color
29595 # (as if the alpha value had been explicitly given with a value of 1.0).
29596 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
29597 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
29598 },
29599 "width": 42, # The width of the border, in pixels.
29600 # Deprecated; the width is determined by the "style" field.
29601 "style": "A String", # The style of the border.
29602 },
29603 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029604 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
29605 "angle": 42, # The angle between the standard orientation and the desired orientation.
29606 # Measured in degrees. Valid values are between -90 and 90. Positive
29607 # angles are angled upwards, negative are angled downwards.
29608 #
29609 # Note: For LTR text direction positive angles are in the counterclockwise
29610 # direction, whereas for RTL they are in the clockwise direction
29611 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
29612 # characters is unchanged.
29613 # For example:
29614 #
29615 # | V |
29616 # | e |
29617 # | r |
29618 # | t |
29619 # | i |
29620 # | c |
29621 # | a |
29622 # | l |
29623 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029624 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040029625 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
29626 # calculation. Absence of this field means that circular references will
29627 # result in calculation errors.
29628 # calculation.
29629 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
29630 # less than this threshold value, the calculation rounds stop.
29631 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
29632 # rounds to perform.
29633 },
29634 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
29635 # `America/New_York`. If the time zone isn't recognized, this may
29636 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029637 },
29638 "sheets": [ # The sheets that are part of a spreadsheet.
29639 { # A sheet in a spreadsheet.
29640 "conditionalFormats": [ # The conditional format rules in this sheet.
29641 { # A rule describing a conditional format.
29642 "ranges": [ # The ranges that will be formatted if the condition is true.
29643 # All the ranges must be on the same grid.
29644 { # A range on a sheet.
29645 # All indexes are zero-based.
29646 # Indexes are half open, e.g the start index is inclusive
29647 # and the end index is exclusive -- [start_index, end_index).
29648 # Missing indexes indicate the range is unbounded on that side.
29649 #
29650 # For example, if `"Sheet1"` is sheet ID 0, then:
29651 #
29652 # `Sheet1!A1:A1 == sheet_id: 0,
29653 # start_row_index: 0, end_row_index: 1,
29654 # start_column_index: 0, end_column_index: 1`
29655 #
29656 # `Sheet1!A3:B4 == sheet_id: 0,
29657 # start_row_index: 2, end_row_index: 4,
29658 # start_column_index: 0, end_column_index: 2`
29659 #
29660 # `Sheet1!A:B == sheet_id: 0,
29661 # start_column_index: 0, end_column_index: 2`
29662 #
29663 # `Sheet1!A5:B == sheet_id: 0,
29664 # start_row_index: 4,
29665 # start_column_index: 0, end_column_index: 2`
29666 #
29667 # `Sheet1 == sheet_id:0`
29668 #
29669 # The start index must always be less than or equal to the end index.
29670 # If the start index equals the end index, then the range is empty.
29671 # Empty ranges are typically not meaningful and are usually rendered in the
29672 # UI as `#REF!`.
29673 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040029998 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080029999 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
30000 "borders": { # The borders of the cell. # The borders of the cell.
30001 "top": { # A border along a cell. # The top border of the cell.
30002 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30003 # for simplicity of conversion to/from color representations in various
30004 # languages over compactness; for example, the fields of this representation
30005 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30006 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30007 # method in iOS; and, with just a little work, it can be easily formatted into
30008 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30009 #
30010 # Example (Java):
30011 #
30012 # import com.google.type.Color;
30013 #
30014 # // ...
30015 # public static java.awt.Color fromProto(Color protocolor) {
30016 # float alpha = protocolor.hasAlpha()
30017 # ? protocolor.getAlpha().getValue()
30018 # : 1.0;
30019 #
30020 # return new java.awt.Color(
30021 # protocolor.getRed(),
30022 # protocolor.getGreen(),
30023 # protocolor.getBlue(),
30024 # alpha);
30025 # }
30026 #
30027 # public static Color toProto(java.awt.Color color) {
30028 # float red = (float) color.getRed();
30029 # float green = (float) color.getGreen();
30030 # float blue = (float) color.getBlue();
30031 # float denominator = 255.0;
30032 # Color.Builder resultBuilder =
30033 # Color
30034 # .newBuilder()
30035 # .setRed(red / denominator)
30036 # .setGreen(green / denominator)
30037 # .setBlue(blue / denominator);
30038 # int alpha = color.getAlpha();
30039 # if (alpha != 255) {
30040 # result.setAlpha(
30041 # FloatValue
30042 # .newBuilder()
30043 # .setValue(((float) alpha) / denominator)
30044 # .build());
30045 # }
30046 # return resultBuilder.build();
30047 # }
30048 # // ...
30049 #
30050 # Example (iOS / Obj-C):
30051 #
30052 # // ...
30053 # static UIColor* fromProto(Color* protocolor) {
30054 # float red = [protocolor red];
30055 # float green = [protocolor green];
30056 # float blue = [protocolor blue];
30057 # FloatValue* alpha_wrapper = [protocolor alpha];
30058 # float alpha = 1.0;
30059 # if (alpha_wrapper != nil) {
30060 # alpha = [alpha_wrapper value];
30061 # }
30062 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30063 # }
30064 #
30065 # static Color* toProto(UIColor* color) {
30066 # CGFloat red, green, blue, alpha;
30067 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30068 # return nil;
30069 # }
30070 # Color* result = [Color alloc] init];
30071 # [result setRed:red];
30072 # [result setGreen:green];
30073 # [result setBlue:blue];
30074 # if (alpha <= 0.9999) {
30075 # [result setAlpha:floatWrapperWithValue(alpha)];
30076 # }
30077 # [result autorelease];
30078 # return result;
30079 # }
30080 # // ...
30081 #
30082 # Example (JavaScript):
30083 #
30084 # // ...
30085 #
30086 # var protoToCssColor = function(rgb_color) {
30087 # var redFrac = rgb_color.red || 0.0;
30088 # var greenFrac = rgb_color.green || 0.0;
30089 # var blueFrac = rgb_color.blue || 0.0;
30090 # var red = Math.floor(redFrac * 255);
30091 # var green = Math.floor(greenFrac * 255);
30092 # var blue = Math.floor(blueFrac * 255);
30093 #
30094 # if (!('alpha' in rgb_color)) {
30095 # return rgbToCssColor_(red, green, blue);
30096 # }
30097 #
30098 # var alphaFrac = rgb_color.alpha.value || 0.0;
30099 # var rgbParams = [red, green, blue].join(',');
30100 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30101 # };
30102 #
30103 # var rgbToCssColor_ = function(red, green, blue) {
30104 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30105 # var hexString = rgbNumber.toString(16);
30106 # var missingZeros = 6 - hexString.length;
30107 # var resultBuilder = ['#'];
30108 # for (var i = 0; i < missingZeros; i++) {
30109 # resultBuilder.push('0');
30110 # }
30111 # resultBuilder.push(hexString);
30112 # return resultBuilder.join('');
30113 # };
30114 #
30115 # // ...
30116 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30117 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30118 # the final pixel color is defined by the equation:
30119 #
30120 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30121 #
30122 # This means that a value of 1.0 corresponds to a solid color, whereas
30123 # a value of 0.0 corresponds to a completely transparent color. This
30124 # uses a wrapper message rather than a simple float scalar so that it is
30125 # possible to distinguish between a default value and the value being unset.
30126 # If omitted, this color object is to be rendered as a solid color
30127 # (as if the alpha value had been explicitly given with a value of 1.0).
30128 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30129 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30130 },
30131 "width": 42, # The width of the border, in pixels.
30132 # Deprecated; the width is determined by the "style" field.
30133 "style": "A String", # The style of the border.
30134 },
30135 "right": { # A border along a cell. # The right border of the cell.
30136 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30137 # for simplicity of conversion to/from color representations in various
30138 # languages over compactness; for example, the fields of this representation
30139 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30140 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30141 # method in iOS; and, with just a little work, it can be easily formatted into
30142 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30143 #
30144 # Example (Java):
30145 #
30146 # import com.google.type.Color;
30147 #
30148 # // ...
30149 # public static java.awt.Color fromProto(Color protocolor) {
30150 # float alpha = protocolor.hasAlpha()
30151 # ? protocolor.getAlpha().getValue()
30152 # : 1.0;
30153 #
30154 # return new java.awt.Color(
30155 # protocolor.getRed(),
30156 # protocolor.getGreen(),
30157 # protocolor.getBlue(),
30158 # alpha);
30159 # }
30160 #
30161 # public static Color toProto(java.awt.Color color) {
30162 # float red = (float) color.getRed();
30163 # float green = (float) color.getGreen();
30164 # float blue = (float) color.getBlue();
30165 # float denominator = 255.0;
30166 # Color.Builder resultBuilder =
30167 # Color
30168 # .newBuilder()
30169 # .setRed(red / denominator)
30170 # .setGreen(green / denominator)
30171 # .setBlue(blue / denominator);
30172 # int alpha = color.getAlpha();
30173 # if (alpha != 255) {
30174 # result.setAlpha(
30175 # FloatValue
30176 # .newBuilder()
30177 # .setValue(((float) alpha) / denominator)
30178 # .build());
30179 # }
30180 # return resultBuilder.build();
30181 # }
30182 # // ...
30183 #
30184 # Example (iOS / Obj-C):
30185 #
30186 # // ...
30187 # static UIColor* fromProto(Color* protocolor) {
30188 # float red = [protocolor red];
30189 # float green = [protocolor green];
30190 # float blue = [protocolor blue];
30191 # FloatValue* alpha_wrapper = [protocolor alpha];
30192 # float alpha = 1.0;
30193 # if (alpha_wrapper != nil) {
30194 # alpha = [alpha_wrapper value];
30195 # }
30196 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30197 # }
30198 #
30199 # static Color* toProto(UIColor* color) {
30200 # CGFloat red, green, blue, alpha;
30201 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30202 # return nil;
30203 # }
30204 # Color* result = [Color alloc] init];
30205 # [result setRed:red];
30206 # [result setGreen:green];
30207 # [result setBlue:blue];
30208 # if (alpha <= 0.9999) {
30209 # [result setAlpha:floatWrapperWithValue(alpha)];
30210 # }
30211 # [result autorelease];
30212 # return result;
30213 # }
30214 # // ...
30215 #
30216 # Example (JavaScript):
30217 #
30218 # // ...
30219 #
30220 # var protoToCssColor = function(rgb_color) {
30221 # var redFrac = rgb_color.red || 0.0;
30222 # var greenFrac = rgb_color.green || 0.0;
30223 # var blueFrac = rgb_color.blue || 0.0;
30224 # var red = Math.floor(redFrac * 255);
30225 # var green = Math.floor(greenFrac * 255);
30226 # var blue = Math.floor(blueFrac * 255);
30227 #
30228 # if (!('alpha' in rgb_color)) {
30229 # return rgbToCssColor_(red, green, blue);
30230 # }
30231 #
30232 # var alphaFrac = rgb_color.alpha.value || 0.0;
30233 # var rgbParams = [red, green, blue].join(',');
30234 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30235 # };
30236 #
30237 # var rgbToCssColor_ = function(red, green, blue) {
30238 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30239 # var hexString = rgbNumber.toString(16);
30240 # var missingZeros = 6 - hexString.length;
30241 # var resultBuilder = ['#'];
30242 # for (var i = 0; i < missingZeros; i++) {
30243 # resultBuilder.push('0');
30244 # }
30245 # resultBuilder.push(hexString);
30246 # return resultBuilder.join('');
30247 # };
30248 #
30249 # // ...
30250 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30251 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30252 # the final pixel color is defined by the equation:
30253 #
30254 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30255 #
30256 # This means that a value of 1.0 corresponds to a solid color, whereas
30257 # a value of 0.0 corresponds to a completely transparent color. This
30258 # uses a wrapper message rather than a simple float scalar so that it is
30259 # possible to distinguish between a default value and the value being unset.
30260 # If omitted, this color object is to be rendered as a solid color
30261 # (as if the alpha value had been explicitly given with a value of 1.0).
30262 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30263 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30264 },
30265 "width": 42, # The width of the border, in pixels.
30266 # Deprecated; the width is determined by the "style" field.
30267 "style": "A String", # The style of the border.
30268 },
30269 "bottom": { # A border along a cell. # The bottom border of the cell.
30270 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30271 # for simplicity of conversion to/from color representations in various
30272 # languages over compactness; for example, the fields of this representation
30273 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30274 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30275 # method in iOS; and, with just a little work, it can be easily formatted into
30276 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30277 #
30278 # Example (Java):
30279 #
30280 # import com.google.type.Color;
30281 #
30282 # // ...
30283 # public static java.awt.Color fromProto(Color protocolor) {
30284 # float alpha = protocolor.hasAlpha()
30285 # ? protocolor.getAlpha().getValue()
30286 # : 1.0;
30287 #
30288 # return new java.awt.Color(
30289 # protocolor.getRed(),
30290 # protocolor.getGreen(),
30291 # protocolor.getBlue(),
30292 # alpha);
30293 # }
30294 #
30295 # public static Color toProto(java.awt.Color color) {
30296 # float red = (float) color.getRed();
30297 # float green = (float) color.getGreen();
30298 # float blue = (float) color.getBlue();
30299 # float denominator = 255.0;
30300 # Color.Builder resultBuilder =
30301 # Color
30302 # .newBuilder()
30303 # .setRed(red / denominator)
30304 # .setGreen(green / denominator)
30305 # .setBlue(blue / denominator);
30306 # int alpha = color.getAlpha();
30307 # if (alpha != 255) {
30308 # result.setAlpha(
30309 # FloatValue
30310 # .newBuilder()
30311 # .setValue(((float) alpha) / denominator)
30312 # .build());
30313 # }
30314 # return resultBuilder.build();
30315 # }
30316 # // ...
30317 #
30318 # Example (iOS / Obj-C):
30319 #
30320 # // ...
30321 # static UIColor* fromProto(Color* protocolor) {
30322 # float red = [protocolor red];
30323 # float green = [protocolor green];
30324 # float blue = [protocolor blue];
30325 # FloatValue* alpha_wrapper = [protocolor alpha];
30326 # float alpha = 1.0;
30327 # if (alpha_wrapper != nil) {
30328 # alpha = [alpha_wrapper value];
30329 # }
30330 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30331 # }
30332 #
30333 # static Color* toProto(UIColor* color) {
30334 # CGFloat red, green, blue, alpha;
30335 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30336 # return nil;
30337 # }
30338 # Color* result = [Color alloc] init];
30339 # [result setRed:red];
30340 # [result setGreen:green];
30341 # [result setBlue:blue];
30342 # if (alpha <= 0.9999) {
30343 # [result setAlpha:floatWrapperWithValue(alpha)];
30344 # }
30345 # [result autorelease];
30346 # return result;
30347 # }
30348 # // ...
30349 #
30350 # Example (JavaScript):
30351 #
30352 # // ...
30353 #
30354 # var protoToCssColor = function(rgb_color) {
30355 # var redFrac = rgb_color.red || 0.0;
30356 # var greenFrac = rgb_color.green || 0.0;
30357 # var blueFrac = rgb_color.blue || 0.0;
30358 # var red = Math.floor(redFrac * 255);
30359 # var green = Math.floor(greenFrac * 255);
30360 # var blue = Math.floor(blueFrac * 255);
30361 #
30362 # if (!('alpha' in rgb_color)) {
30363 # return rgbToCssColor_(red, green, blue);
30364 # }
30365 #
30366 # var alphaFrac = rgb_color.alpha.value || 0.0;
30367 # var rgbParams = [red, green, blue].join(',');
30368 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30369 # };
30370 #
30371 # var rgbToCssColor_ = function(red, green, blue) {
30372 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30373 # var hexString = rgbNumber.toString(16);
30374 # var missingZeros = 6 - hexString.length;
30375 # var resultBuilder = ['#'];
30376 # for (var i = 0; i < missingZeros; i++) {
30377 # resultBuilder.push('0');
30378 # }
30379 # resultBuilder.push(hexString);
30380 # return resultBuilder.join('');
30381 # };
30382 #
30383 # // ...
30384 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30385 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30386 # the final pixel color is defined by the equation:
30387 #
30388 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30389 #
30390 # This means that a value of 1.0 corresponds to a solid color, whereas
30391 # a value of 0.0 corresponds to a completely transparent color. This
30392 # uses a wrapper message rather than a simple float scalar so that it is
30393 # possible to distinguish between a default value and the value being unset.
30394 # If omitted, this color object is to be rendered as a solid color
30395 # (as if the alpha value had been explicitly given with a value of 1.0).
30396 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30397 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30398 },
30399 "width": 42, # The width of the border, in pixels.
30400 # Deprecated; the width is determined by the "style" field.
30401 "style": "A String", # The style of the border.
30402 },
30403 "left": { # A border along a cell. # The left border of the cell.
30404 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
30405 # for simplicity of conversion to/from color representations in various
30406 # languages over compactness; for example, the fields of this representation
30407 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
30408 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30409 # method in iOS; and, with just a little work, it can be easily formatted into
30410 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
30411 #
30412 # Example (Java):
30413 #
30414 # import com.google.type.Color;
30415 #
30416 # // ...
30417 # public static java.awt.Color fromProto(Color protocolor) {
30418 # float alpha = protocolor.hasAlpha()
30419 # ? protocolor.getAlpha().getValue()
30420 # : 1.0;
30421 #
30422 # return new java.awt.Color(
30423 # protocolor.getRed(),
30424 # protocolor.getGreen(),
30425 # protocolor.getBlue(),
30426 # alpha);
30427 # }
30428 #
30429 # public static Color toProto(java.awt.Color color) {
30430 # float red = (float) color.getRed();
30431 # float green = (float) color.getGreen();
30432 # float blue = (float) color.getBlue();
30433 # float denominator = 255.0;
30434 # Color.Builder resultBuilder =
30435 # Color
30436 # .newBuilder()
30437 # .setRed(red / denominator)
30438 # .setGreen(green / denominator)
30439 # .setBlue(blue / denominator);
30440 # int alpha = color.getAlpha();
30441 # if (alpha != 255) {
30442 # result.setAlpha(
30443 # FloatValue
30444 # .newBuilder()
30445 # .setValue(((float) alpha) / denominator)
30446 # .build());
30447 # }
30448 # return resultBuilder.build();
30449 # }
30450 # // ...
30451 #
30452 # Example (iOS / Obj-C):
30453 #
30454 # // ...
30455 # static UIColor* fromProto(Color* protocolor) {
30456 # float red = [protocolor red];
30457 # float green = [protocolor green];
30458 # float blue = [protocolor blue];
30459 # FloatValue* alpha_wrapper = [protocolor alpha];
30460 # float alpha = 1.0;
30461 # if (alpha_wrapper != nil) {
30462 # alpha = [alpha_wrapper value];
30463 # }
30464 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
30465 # }
30466 #
30467 # static Color* toProto(UIColor* color) {
30468 # CGFloat red, green, blue, alpha;
30469 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
30470 # return nil;
30471 # }
30472 # Color* result = [Color alloc] init];
30473 # [result setRed:red];
30474 # [result setGreen:green];
30475 # [result setBlue:blue];
30476 # if (alpha <= 0.9999) {
30477 # [result setAlpha:floatWrapperWithValue(alpha)];
30478 # }
30479 # [result autorelease];
30480 # return result;
30481 # }
30482 # // ...
30483 #
30484 # Example (JavaScript):
30485 #
30486 # // ...
30487 #
30488 # var protoToCssColor = function(rgb_color) {
30489 # var redFrac = rgb_color.red || 0.0;
30490 # var greenFrac = rgb_color.green || 0.0;
30491 # var blueFrac = rgb_color.blue || 0.0;
30492 # var red = Math.floor(redFrac * 255);
30493 # var green = Math.floor(greenFrac * 255);
30494 # var blue = Math.floor(blueFrac * 255);
30495 #
30496 # if (!('alpha' in rgb_color)) {
30497 # return rgbToCssColor_(red, green, blue);
30498 # }
30499 #
30500 # var alphaFrac = rgb_color.alpha.value || 0.0;
30501 # var rgbParams = [red, green, blue].join(',');
30502 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
30503 # };
30504 #
30505 # var rgbToCssColor_ = function(red, green, blue) {
30506 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
30507 # var hexString = rgbNumber.toString(16);
30508 # var missingZeros = 6 - hexString.length;
30509 # var resultBuilder = ['#'];
30510 # for (var i = 0; i < missingZeros; i++) {
30511 # resultBuilder.push('0');
30512 # }
30513 # resultBuilder.push(hexString);
30514 # return resultBuilder.join('');
30515 # };
30516 #
30517 # // ...
30518 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
30519 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
30520 # the final pixel color is defined by the equation:
30521 #
30522 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
30523 #
30524 # This means that a value of 1.0 corresponds to a solid color, whereas
30525 # a value of 0.0 corresponds to a completely transparent color. This
30526 # uses a wrapper message rather than a simple float scalar so that it is
30527 # possible to distinguish between a default value and the value being unset.
30528 # If omitted, this color object is to be rendered as a solid color
30529 # (as if the alpha value had been explicitly given with a value of 1.0).
30530 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
30531 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
30532 },
30533 "width": 42, # The width of the border, in pixels.
30534 # Deprecated; the width is determined by the "style" field.
30535 "style": "A String", # The style of the border.
30536 },
30537 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040030538 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
30539 "angle": 42, # The angle between the standard orientation and the desired orientation.
30540 # Measured in degrees. Valid values are between -90 and 90. Positive
30541 # angles are angled upwards, negative are angled downwards.
30542 #
30543 # Note: For LTR text direction positive angles are in the counterclockwise
30544 # direction, whereas for RTL they are in the clockwise direction
30545 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
30546 # characters is unchanged.
30547 # For example:
30548 #
30549 # | V |
30550 # | e |
30551 # | r |
30552 # | t |
30553 # | i |
30554 # | c |
30555 # | a |
30556 # | l |
30557 },
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 },
32230 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
32231 # from the anchor cell.
32232 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
32233 "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.
32516 "format": { # The format of a run of text in a cell. # The format of the title.
32517 # Only valid if the axis is not associated with the domain.
32518 # Absent values indicate that the field isn't specified.
32519 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
32520 # for simplicity of conversion to/from color representations in various
32521 # languages over compactness; for example, the fields of this representation
32522 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
32523 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
32524 # method in iOS; and, with just a little work, it can be easily formatted into
32525 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32526 #
32527 # Example (Java):
32528 #
32529 # import com.google.type.Color;
32530 #
32531 # // ...
32532 # public static java.awt.Color fromProto(Color protocolor) {
32533 # float alpha = protocolor.hasAlpha()
32534 # ? protocolor.getAlpha().getValue()
32535 # : 1.0;
32536 #
32537 # return new java.awt.Color(
32538 # protocolor.getRed(),
32539 # protocolor.getGreen(),
32540 # protocolor.getBlue(),
32541 # alpha);
32542 # }
32543 #
32544 # public static Color toProto(java.awt.Color color) {
32545 # float red = (float) color.getRed();
32546 # float green = (float) color.getGreen();
32547 # float blue = (float) color.getBlue();
32548 # float denominator = 255.0;
32549 # Color.Builder resultBuilder =
32550 # Color
32551 # .newBuilder()
32552 # .setRed(red / denominator)
32553 # .setGreen(green / denominator)
32554 # .setBlue(blue / denominator);
32555 # int alpha = color.getAlpha();
32556 # if (alpha != 255) {
32557 # result.setAlpha(
32558 # FloatValue
32559 # .newBuilder()
32560 # .setValue(((float) alpha) / denominator)
32561 # .build());
32562 # }
32563 # return resultBuilder.build();
32564 # }
32565 # // ...
32566 #
32567 # Example (iOS / Obj-C):
32568 #
32569 # // ...
32570 # static UIColor* fromProto(Color* protocolor) {
32571 # float red = [protocolor red];
32572 # float green = [protocolor green];
32573 # float blue = [protocolor blue];
32574 # FloatValue* alpha_wrapper = [protocolor alpha];
32575 # float alpha = 1.0;
32576 # if (alpha_wrapper != nil) {
32577 # alpha = [alpha_wrapper value];
32578 # }
32579 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
32580 # }
32581 #
32582 # static Color* toProto(UIColor* color) {
32583 # CGFloat red, green, blue, alpha;
32584 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
32585 # return nil;
32586 # }
32587 # Color* result = [Color alloc] init];
32588 # [result setRed:red];
32589 # [result setGreen:green];
32590 # [result setBlue:blue];
32591 # if (alpha <= 0.9999) {
32592 # [result setAlpha:floatWrapperWithValue(alpha)];
32593 # }
32594 # [result autorelease];
32595 # return result;
32596 # }
32597 # // ...
32598 #
32599 # Example (JavaScript):
32600 #
32601 # // ...
32602 #
32603 # var protoToCssColor = function(rgb_color) {
32604 # var redFrac = rgb_color.red || 0.0;
32605 # var greenFrac = rgb_color.green || 0.0;
32606 # var blueFrac = rgb_color.blue || 0.0;
32607 # var red = Math.floor(redFrac * 255);
32608 # var green = Math.floor(greenFrac * 255);
32609 # var blue = Math.floor(blueFrac * 255);
32610 #
32611 # if (!('alpha' in rgb_color)) {
32612 # return rgbToCssColor_(red, green, blue);
32613 # }
32614 #
32615 # var alphaFrac = rgb_color.alpha.value || 0.0;
32616 # var rgbParams = [red, green, blue].join(',');
32617 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
32618 # };
32619 #
32620 # var rgbToCssColor_ = function(red, green, blue) {
32621 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
32622 # var hexString = rgbNumber.toString(16);
32623 # var missingZeros = 6 - hexString.length;
32624 # var resultBuilder = ['#'];
32625 # for (var i = 0; i < missingZeros; i++) {
32626 # resultBuilder.push('0');
32627 # }
32628 # resultBuilder.push(hexString);
32629 # return resultBuilder.join('');
32630 # };
32631 #
32632 # // ...
32633 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
32634 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
32635 # the final pixel color is defined by the equation:
32636 #
32637 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
32638 #
32639 # This means that a value of 1.0 corresponds to a solid color, whereas
32640 # a value of 0.0 corresponds to a completely transparent color. This
32641 # uses a wrapper message rather than a simple float scalar so that it is
32642 # possible to distinguish between a default value and the value being unset.
32643 # If omitted, this color object is to be rendered as a solid color
32644 # (as if the alpha value had been explicitly given with a value of 1.0).
32645 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
32646 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
32647 },
32648 "bold": True or False, # True if the text is bold.
32649 "strikethrough": True or False, # True if the text has a strikethrough.
32650 "fontFamily": "A String", # The font family.
32651 "fontSize": 42, # The size of the font.
32652 "italic": True or False, # True if the text is italicized.
32653 "underline": True or False, # True if the text is underlined.
32654 },
32655 "title": "A String", # The title of this axis. If set, this overrides any title inferred
32656 # from headers of the data.
32657 },
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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032878 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
32879 # in start_row.
32880 { # Properties about a dimension.
32881 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
32882 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
32883 "hiddenByFilter": True or False, # True if this dimension is being filtered.
32884 # This field is read-only.
32885 },
32886 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040032887 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032888 "startColumn": 42, # The first column this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080032889 "rowData": [ # The data in the grid, one entry per row,
32890 # starting with the row in startRow.
32891 # The values in RowData will correspond to columns starting
32892 # at start_column.
32893 { # Data about each cell in a row.
32894 "values": [ # The values in the row, one per column.
32895 { # Data about a specific cell.
32896 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
32897 # is computed dynamically based on its data, grouping, filters, values,
32898 # etc. Only the top-left cell of the pivot table contains the pivot table
32899 # definition. The other cells will contain the calculated values of the
32900 # results of the pivot in their effective_value fields.
32901 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
32902 # or vertically (as rows).
32903 "rows": [ # Each row grouping in the pivot table.
32904 { # A single grouping (either row or column) in a pivot table.
32905 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
32906 "valueMetadata": [ # Metadata about values in the grouping.
32907 { # Metadata about a value in a pivot grouping.
32908 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
32909 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
32910 # (Note that formulaValue is not valid,
32911 # because the values will be calculated.)
32912 "numberValue": 3.14, # Represents a double value.
32913 # Note: Dates, Times and DateTimes are represented as doubles in
32914 # "serial number" format.
32915 "boolValue": True or False, # Represents a boolean value.
32916 "formulaValue": "A String", # Represents a formula.
32917 "stringValue": "A String", # Represents a string value.
32918 # Leading single quotes are not included. For example, if the user typed
32919 # `'123` into the UI, this would be represented as a `stringValue` of
32920 # `"123"`.
32921 "errorValue": { # An error in a cell. # Represents an error.
32922 # This field is read-only.
32923 "message": "A String", # A message with more information about the error
32924 # (in the spreadsheet's locale).
32925 "type": "A String", # The type of error.
32926 },
32927 },
32928 },
32929 ],
32930 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
32931 # If not specified, sorting is alphabetical by this group's values.
32932 "buckets": [ # Determines the bucket from which values are chosen to sort.
32933 #
32934 # For example, in a pivot table with one row group & two column groups,
32935 # the row group can list up to two values. The first value corresponds
32936 # to a value within the first column group, and the second value
32937 # corresponds to a value in the second column group. If no values
32938 # are listed, this would indicate that the row should be sorted according
32939 # to the "Grand Total" over the column groups. If a single value is listed,
32940 # this would correspond to using the "Total" of that bucket.
32941 { # The kinds of value that a cell in a spreadsheet can have.
32942 "numberValue": 3.14, # Represents a double value.
32943 # Note: Dates, Times and DateTimes are represented as doubles in
32944 # "serial number" format.
32945 "boolValue": True or False, # Represents a boolean value.
32946 "formulaValue": "A String", # Represents a formula.
32947 "stringValue": "A String", # Represents a string value.
32948 # Leading single quotes are not included. For example, if the user typed
32949 # `'123` into the UI, this would be represented as a `stringValue` of
32950 # `"123"`.
32951 "errorValue": { # An error in a cell. # Represents an error.
32952 # This field is read-only.
32953 "message": "A String", # A message with more information about the error
32954 # (in the spreadsheet's locale).
32955 "type": "A String", # The type of error.
32956 },
32957 },
32958 ],
32959 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
32960 # grouping should be sorted by.
32961 },
32962 "sortOrder": "A String", # The order the values in this group should be sorted.
32963 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
32964 #
32965 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
32966 # means this group refers to column `C`, whereas the offset `1` would refer
32967 # to column `D`.
32968 },
32969 ],
32970 "source": { # A range on a sheet. # The range the pivot table is reading data from.
32971 # All indexes are zero-based.
32972 # Indexes are half open, e.g the start index is inclusive
32973 # and the end index is exclusive -- [start_index, end_index).
32974 # Missing indexes indicate the range is unbounded on that side.
32975 #
32976 # For example, if `"Sheet1"` is sheet ID 0, then:
32977 #
32978 # `Sheet1!A1:A1 == sheet_id: 0,
32979 # start_row_index: 0, end_row_index: 1,
32980 # start_column_index: 0, end_column_index: 1`
32981 #
32982 # `Sheet1!A3:B4 == sheet_id: 0,
32983 # start_row_index: 2, end_row_index: 4,
32984 # start_column_index: 0, end_column_index: 2`
32985 #
32986 # `Sheet1!A:B == sheet_id: 0,
32987 # start_column_index: 0, end_column_index: 2`
32988 #
32989 # `Sheet1!A5:B == sheet_id: 0,
32990 # start_row_index: 4,
32991 # start_column_index: 0, end_column_index: 2`
32992 #
32993 # `Sheet1 == sheet_id:0`
32994 #
32995 # The start index must always be less than or equal to the end index.
32996 # If the start index equals the end index, then the range is empty.
32997 # Empty ranges are typically not meaningful and are usually rendered in the
32998 # UI as `#REF!`.
32999 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033000 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033001 "sheetId": 42, # The sheet this range is on.
33002 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033003 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033004 },
33005 "values": [ # A list of values to include in the pivot table.
33006 { # The definition of how a value in a pivot table should be calculated.
33007 "formula": "A String", # A custom formula to calculate the value. The formula must start
33008 # with an `=` character.
33009 "summarizeFunction": "A String", # A function to summarize the value.
33010 # If formula is set, the only supported values are
33011 # SUM and
33012 # CUSTOM.
33013 # If sourceColumnOffset is set, then `CUSTOM`
33014 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033015 "name": "A String", # A name to use for the value. This is only used if formula was set.
33016 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033017 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
33018 #
33019 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
33020 # means this value refers to column `C`, whereas the offset `1` would
33021 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033022 },
33023 ],
33024 "criteria": { # An optional mapping of filters per source column offset.
33025 #
33026 # The filters will be applied before aggregating data into the pivot table.
33027 # The map's key is the column offset of the source range that you want to
33028 # filter, and the value is the criteria for that column.
33029 #
33030 # For example, if the source was `C10:E15`, a key of `0` will have the filter
33031 # for column `C`, whereas the key `1` is for column `D`.
33032 "a_key": { # Criteria for showing/hiding rows in a pivot table.
33033 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
33034 "A String",
33035 ],
33036 },
33037 },
33038 "columns": [ # Each column grouping in the pivot table.
33039 { # A single grouping (either row or column) in a pivot table.
33040 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
33041 "valueMetadata": [ # Metadata about values in the grouping.
33042 { # Metadata about a value in a pivot grouping.
33043 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
33044 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
33045 # (Note that formulaValue is not valid,
33046 # because the values will be calculated.)
33047 "numberValue": 3.14, # Represents a double value.
33048 # Note: Dates, Times and DateTimes are represented as doubles in
33049 # "serial number" format.
33050 "boolValue": True or False, # Represents a boolean value.
33051 "formulaValue": "A String", # Represents a formula.
33052 "stringValue": "A String", # Represents a string value.
33053 # Leading single quotes are not included. For example, if the user typed
33054 # `'123` into the UI, this would be represented as a `stringValue` of
33055 # `"123"`.
33056 "errorValue": { # An error in a cell. # Represents an error.
33057 # This field is read-only.
33058 "message": "A String", # A message with more information about the error
33059 # (in the spreadsheet's locale).
33060 "type": "A String", # The type of error.
33061 },
33062 },
33063 },
33064 ],
33065 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
33066 # If not specified, sorting is alphabetical by this group's values.
33067 "buckets": [ # Determines the bucket from which values are chosen to sort.
33068 #
33069 # For example, in a pivot table with one row group & two column groups,
33070 # the row group can list up to two values. The first value corresponds
33071 # to a value within the first column group, and the second value
33072 # corresponds to a value in the second column group. If no values
33073 # are listed, this would indicate that the row should be sorted according
33074 # to the "Grand Total" over the column groups. If a single value is listed,
33075 # this would correspond to using the "Total" of that bucket.
33076 { # The kinds of value that a cell in a spreadsheet can have.
33077 "numberValue": 3.14, # Represents a double value.
33078 # Note: Dates, Times and DateTimes are represented as doubles in
33079 # "serial number" format.
33080 "boolValue": True or False, # Represents a boolean value.
33081 "formulaValue": "A String", # Represents a formula.
33082 "stringValue": "A String", # Represents a string value.
33083 # Leading single quotes are not included. For example, if the user typed
33084 # `'123` into the UI, this would be represented as a `stringValue` of
33085 # `"123"`.
33086 "errorValue": { # An error in a cell. # Represents an error.
33087 # This field is read-only.
33088 "message": "A String", # A message with more information about the error
33089 # (in the spreadsheet's locale).
33090 "type": "A String", # The type of error.
33091 },
33092 },
33093 ],
33094 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
33095 # grouping should be sorted by.
33096 },
33097 "sortOrder": "A String", # The order the values in this group should be sorted.
33098 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
33099 #
33100 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
33101 # means this group refers to column `C`, whereas the offset `1` would refer
33102 # to column `D`.
33103 },
33104 ],
33105 },
33106 "hyperlink": "A String", # A hyperlink this cell points to, if any.
33107 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
33108 "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
33109 # the calculated value. For cells with literals, this will be
33110 # the same as the user_entered_value.
33111 # This field is read-only.
33112 "numberValue": 3.14, # Represents a double value.
33113 # Note: Dates, Times and DateTimes are represented as doubles in
33114 # "serial number" format.
33115 "boolValue": True or False, # Represents a boolean value.
33116 "formulaValue": "A String", # Represents a formula.
33117 "stringValue": "A String", # Represents a string value.
33118 # Leading single quotes are not included. For example, if the user typed
33119 # `'123` into the UI, this would be represented as a `stringValue` of
33120 # `"123"`.
33121 "errorValue": { # An error in a cell. # Represents an error.
33122 # This field is read-only.
33123 "message": "A String", # A message with more information about the error
33124 # (in the spreadsheet's locale).
33125 "type": "A String", # The type of error.
33126 },
33127 },
33128 "formattedValue": "A String", # The formatted value of the cell.
33129 # This is the value as it's shown to the user.
33130 # This field is read-only.
33131 "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()`
33132 # Note: Dates, Times and DateTimes are represented as doubles in
33133 # serial number format.
33134 "numberValue": 3.14, # Represents a double value.
33135 # Note: Dates, Times and DateTimes are represented as doubles in
33136 # "serial number" format.
33137 "boolValue": True or False, # Represents a boolean value.
33138 "formulaValue": "A String", # Represents a formula.
33139 "stringValue": "A String", # Represents a string value.
33140 # Leading single quotes are not included. For example, if the user typed
33141 # `'123` into the UI, this would be represented as a `stringValue` of
33142 # `"123"`.
33143 "errorValue": { # An error in a cell. # Represents an error.
33144 # This field is read-only.
33145 "message": "A String", # A message with more information about the error
33146 # (in the spreadsheet's locale).
33147 "type": "A String", # The type of error.
33148 },
33149 },
33150 "note": "A String", # Any note on the cell.
33151 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
33152 # This includes the results of applying any conditional formatting and,
33153 # if the cell contains a formula, the computed number format.
33154 # If the effective format is the default format, effective format will
33155 # not be written.
33156 # This field is read-only.
33157 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
33158 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
33159 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033160 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033161 # information about the supported patterns.
33162 "type": "A String", # The type of the number format.
33163 # When writing, this field must be set.
33164 },
33165 "textDirection": "A String", # The direction of the text in the cell.
33166 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
33167 # When updating padding, every field must be specified.
33168 "top": 42, # The top padding of the cell.
33169 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033170 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033171 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033172 },
33173 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
33174 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
33175 # for simplicity of conversion to/from color representations in various
33176 # languages over compactness; for example, the fields of this representation
33177 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33178 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33179 # method in iOS; and, with just a little work, it can be easily formatted into
33180 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33181 #
33182 # Example (Java):
33183 #
33184 # import com.google.type.Color;
33185 #
33186 # // ...
33187 # public static java.awt.Color fromProto(Color protocolor) {
33188 # float alpha = protocolor.hasAlpha()
33189 # ? protocolor.getAlpha().getValue()
33190 # : 1.0;
33191 #
33192 # return new java.awt.Color(
33193 # protocolor.getRed(),
33194 # protocolor.getGreen(),
33195 # protocolor.getBlue(),
33196 # alpha);
33197 # }
33198 #
33199 # public static Color toProto(java.awt.Color color) {
33200 # float red = (float) color.getRed();
33201 # float green = (float) color.getGreen();
33202 # float blue = (float) color.getBlue();
33203 # float denominator = 255.0;
33204 # Color.Builder resultBuilder =
33205 # Color
33206 # .newBuilder()
33207 # .setRed(red / denominator)
33208 # .setGreen(green / denominator)
33209 # .setBlue(blue / denominator);
33210 # int alpha = color.getAlpha();
33211 # if (alpha != 255) {
33212 # result.setAlpha(
33213 # FloatValue
33214 # .newBuilder()
33215 # .setValue(((float) alpha) / denominator)
33216 # .build());
33217 # }
33218 # return resultBuilder.build();
33219 # }
33220 # // ...
33221 #
33222 # Example (iOS / Obj-C):
33223 #
33224 # // ...
33225 # static UIColor* fromProto(Color* protocolor) {
33226 # float red = [protocolor red];
33227 # float green = [protocolor green];
33228 # float blue = [protocolor blue];
33229 # FloatValue* alpha_wrapper = [protocolor alpha];
33230 # float alpha = 1.0;
33231 # if (alpha_wrapper != nil) {
33232 # alpha = [alpha_wrapper value];
33233 # }
33234 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33235 # }
33236 #
33237 # static Color* toProto(UIColor* color) {
33238 # CGFloat red, green, blue, alpha;
33239 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33240 # return nil;
33241 # }
33242 # Color* result = [Color alloc] init];
33243 # [result setRed:red];
33244 # [result setGreen:green];
33245 # [result setBlue:blue];
33246 # if (alpha <= 0.9999) {
33247 # [result setAlpha:floatWrapperWithValue(alpha)];
33248 # }
33249 # [result autorelease];
33250 # return result;
33251 # }
33252 # // ...
33253 #
33254 # Example (JavaScript):
33255 #
33256 # // ...
33257 #
33258 # var protoToCssColor = function(rgb_color) {
33259 # var redFrac = rgb_color.red || 0.0;
33260 # var greenFrac = rgb_color.green || 0.0;
33261 # var blueFrac = rgb_color.blue || 0.0;
33262 # var red = Math.floor(redFrac * 255);
33263 # var green = Math.floor(greenFrac * 255);
33264 # var blue = Math.floor(blueFrac * 255);
33265 #
33266 # if (!('alpha' in rgb_color)) {
33267 # return rgbToCssColor_(red, green, blue);
33268 # }
33269 #
33270 # var alphaFrac = rgb_color.alpha.value || 0.0;
33271 # var rgbParams = [red, green, blue].join(',');
33272 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33273 # };
33274 #
33275 # var rgbToCssColor_ = function(red, green, blue) {
33276 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33277 # var hexString = rgbNumber.toString(16);
33278 # var missingZeros = 6 - hexString.length;
33279 # var resultBuilder = ['#'];
33280 # for (var i = 0; i < missingZeros; i++) {
33281 # resultBuilder.push('0');
33282 # }
33283 # resultBuilder.push(hexString);
33284 # return resultBuilder.join('');
33285 # };
33286 #
33287 # // ...
33288 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33289 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33290 # the final pixel color is defined by the equation:
33291 #
33292 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33293 #
33294 # This means that a value of 1.0 corresponds to a solid color, whereas
33295 # a value of 0.0 corresponds to a completely transparent color. This
33296 # uses a wrapper message rather than a simple float scalar so that it is
33297 # possible to distinguish between a default value and the value being unset.
33298 # If omitted, this color object is to be rendered as a solid color
33299 # (as if the alpha value had been explicitly given with a value of 1.0).
33300 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33301 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33302 },
33303 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
33304 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
33305 # Absent values indicate that the field isn't specified.
33306 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
33307 # for simplicity of conversion to/from color representations in various
33308 # languages over compactness; for example, the fields of this representation
33309 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33310 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33311 # method in iOS; and, with just a little work, it can be easily formatted into
33312 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33313 #
33314 # Example (Java):
33315 #
33316 # import com.google.type.Color;
33317 #
33318 # // ...
33319 # public static java.awt.Color fromProto(Color protocolor) {
33320 # float alpha = protocolor.hasAlpha()
33321 # ? protocolor.getAlpha().getValue()
33322 # : 1.0;
33323 #
33324 # return new java.awt.Color(
33325 # protocolor.getRed(),
33326 # protocolor.getGreen(),
33327 # protocolor.getBlue(),
33328 # alpha);
33329 # }
33330 #
33331 # public static Color toProto(java.awt.Color color) {
33332 # float red = (float) color.getRed();
33333 # float green = (float) color.getGreen();
33334 # float blue = (float) color.getBlue();
33335 # float denominator = 255.0;
33336 # Color.Builder resultBuilder =
33337 # Color
33338 # .newBuilder()
33339 # .setRed(red / denominator)
33340 # .setGreen(green / denominator)
33341 # .setBlue(blue / denominator);
33342 # int alpha = color.getAlpha();
33343 # if (alpha != 255) {
33344 # result.setAlpha(
33345 # FloatValue
33346 # .newBuilder()
33347 # .setValue(((float) alpha) / denominator)
33348 # .build());
33349 # }
33350 # return resultBuilder.build();
33351 # }
33352 # // ...
33353 #
33354 # Example (iOS / Obj-C):
33355 #
33356 # // ...
33357 # static UIColor* fromProto(Color* protocolor) {
33358 # float red = [protocolor red];
33359 # float green = [protocolor green];
33360 # float blue = [protocolor blue];
33361 # FloatValue* alpha_wrapper = [protocolor alpha];
33362 # float alpha = 1.0;
33363 # if (alpha_wrapper != nil) {
33364 # alpha = [alpha_wrapper value];
33365 # }
33366 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33367 # }
33368 #
33369 # static Color* toProto(UIColor* color) {
33370 # CGFloat red, green, blue, alpha;
33371 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33372 # return nil;
33373 # }
33374 # Color* result = [Color alloc] init];
33375 # [result setRed:red];
33376 # [result setGreen:green];
33377 # [result setBlue:blue];
33378 # if (alpha <= 0.9999) {
33379 # [result setAlpha:floatWrapperWithValue(alpha)];
33380 # }
33381 # [result autorelease];
33382 # return result;
33383 # }
33384 # // ...
33385 #
33386 # Example (JavaScript):
33387 #
33388 # // ...
33389 #
33390 # var protoToCssColor = function(rgb_color) {
33391 # var redFrac = rgb_color.red || 0.0;
33392 # var greenFrac = rgb_color.green || 0.0;
33393 # var blueFrac = rgb_color.blue || 0.0;
33394 # var red = Math.floor(redFrac * 255);
33395 # var green = Math.floor(greenFrac * 255);
33396 # var blue = Math.floor(blueFrac * 255);
33397 #
33398 # if (!('alpha' in rgb_color)) {
33399 # return rgbToCssColor_(red, green, blue);
33400 # }
33401 #
33402 # var alphaFrac = rgb_color.alpha.value || 0.0;
33403 # var rgbParams = [red, green, blue].join(',');
33404 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33405 # };
33406 #
33407 # var rgbToCssColor_ = function(red, green, blue) {
33408 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33409 # var hexString = rgbNumber.toString(16);
33410 # var missingZeros = 6 - hexString.length;
33411 # var resultBuilder = ['#'];
33412 # for (var i = 0; i < missingZeros; i++) {
33413 # resultBuilder.push('0');
33414 # }
33415 # resultBuilder.push(hexString);
33416 # return resultBuilder.join('');
33417 # };
33418 #
33419 # // ...
33420 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33421 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33422 # the final pixel color is defined by the equation:
33423 #
33424 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33425 #
33426 # This means that a value of 1.0 corresponds to a solid color, whereas
33427 # a value of 0.0 corresponds to a completely transparent color. This
33428 # uses a wrapper message rather than a simple float scalar so that it is
33429 # possible to distinguish between a default value and the value being unset.
33430 # If omitted, this color object is to be rendered as a solid color
33431 # (as if the alpha value had been explicitly given with a value of 1.0).
33432 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33433 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33434 },
33435 "bold": True or False, # True if the text is bold.
33436 "strikethrough": True or False, # True if the text has a strikethrough.
33437 "fontFamily": "A String", # The font family.
33438 "fontSize": 42, # The size of the font.
33439 "italic": True or False, # True if the text is italicized.
33440 "underline": True or False, # True if the text is underlined.
33441 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033442 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080033443 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
33444 "borders": { # The borders of the cell. # The borders of the cell.
33445 "top": { # A border along a cell. # The top border of the cell.
33446 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33447 # for simplicity of conversion to/from color representations in various
33448 # languages over compactness; for example, the fields of this representation
33449 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33450 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33451 # method in iOS; and, with just a little work, it can be easily formatted into
33452 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33453 #
33454 # Example (Java):
33455 #
33456 # import com.google.type.Color;
33457 #
33458 # // ...
33459 # public static java.awt.Color fromProto(Color protocolor) {
33460 # float alpha = protocolor.hasAlpha()
33461 # ? protocolor.getAlpha().getValue()
33462 # : 1.0;
33463 #
33464 # return new java.awt.Color(
33465 # protocolor.getRed(),
33466 # protocolor.getGreen(),
33467 # protocolor.getBlue(),
33468 # alpha);
33469 # }
33470 #
33471 # public static Color toProto(java.awt.Color color) {
33472 # float red = (float) color.getRed();
33473 # float green = (float) color.getGreen();
33474 # float blue = (float) color.getBlue();
33475 # float denominator = 255.0;
33476 # Color.Builder resultBuilder =
33477 # Color
33478 # .newBuilder()
33479 # .setRed(red / denominator)
33480 # .setGreen(green / denominator)
33481 # .setBlue(blue / denominator);
33482 # int alpha = color.getAlpha();
33483 # if (alpha != 255) {
33484 # result.setAlpha(
33485 # FloatValue
33486 # .newBuilder()
33487 # .setValue(((float) alpha) / denominator)
33488 # .build());
33489 # }
33490 # return resultBuilder.build();
33491 # }
33492 # // ...
33493 #
33494 # Example (iOS / Obj-C):
33495 #
33496 # // ...
33497 # static UIColor* fromProto(Color* protocolor) {
33498 # float red = [protocolor red];
33499 # float green = [protocolor green];
33500 # float blue = [protocolor blue];
33501 # FloatValue* alpha_wrapper = [protocolor alpha];
33502 # float alpha = 1.0;
33503 # if (alpha_wrapper != nil) {
33504 # alpha = [alpha_wrapper value];
33505 # }
33506 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33507 # }
33508 #
33509 # static Color* toProto(UIColor* color) {
33510 # CGFloat red, green, blue, alpha;
33511 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33512 # return nil;
33513 # }
33514 # Color* result = [Color alloc] init];
33515 # [result setRed:red];
33516 # [result setGreen:green];
33517 # [result setBlue:blue];
33518 # if (alpha <= 0.9999) {
33519 # [result setAlpha:floatWrapperWithValue(alpha)];
33520 # }
33521 # [result autorelease];
33522 # return result;
33523 # }
33524 # // ...
33525 #
33526 # Example (JavaScript):
33527 #
33528 # // ...
33529 #
33530 # var protoToCssColor = function(rgb_color) {
33531 # var redFrac = rgb_color.red || 0.0;
33532 # var greenFrac = rgb_color.green || 0.0;
33533 # var blueFrac = rgb_color.blue || 0.0;
33534 # var red = Math.floor(redFrac * 255);
33535 # var green = Math.floor(greenFrac * 255);
33536 # var blue = Math.floor(blueFrac * 255);
33537 #
33538 # if (!('alpha' in rgb_color)) {
33539 # return rgbToCssColor_(red, green, blue);
33540 # }
33541 #
33542 # var alphaFrac = rgb_color.alpha.value || 0.0;
33543 # var rgbParams = [red, green, blue].join(',');
33544 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33545 # };
33546 #
33547 # var rgbToCssColor_ = function(red, green, blue) {
33548 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33549 # var hexString = rgbNumber.toString(16);
33550 # var missingZeros = 6 - hexString.length;
33551 # var resultBuilder = ['#'];
33552 # for (var i = 0; i < missingZeros; i++) {
33553 # resultBuilder.push('0');
33554 # }
33555 # resultBuilder.push(hexString);
33556 # return resultBuilder.join('');
33557 # };
33558 #
33559 # // ...
33560 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33561 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33562 # the final pixel color is defined by the equation:
33563 #
33564 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33565 #
33566 # This means that a value of 1.0 corresponds to a solid color, whereas
33567 # a value of 0.0 corresponds to a completely transparent color. This
33568 # uses a wrapper message rather than a simple float scalar so that it is
33569 # possible to distinguish between a default value and the value being unset.
33570 # If omitted, this color object is to be rendered as a solid color
33571 # (as if the alpha value had been explicitly given with a value of 1.0).
33572 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33573 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33574 },
33575 "width": 42, # The width of the border, in pixels.
33576 # Deprecated; the width is determined by the "style" field.
33577 "style": "A String", # The style of the border.
33578 },
33579 "right": { # A border along a cell. # The right border of the cell.
33580 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33581 # for simplicity of conversion to/from color representations in various
33582 # languages over compactness; for example, the fields of this representation
33583 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33584 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33585 # method in iOS; and, with just a little work, it can be easily formatted into
33586 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33587 #
33588 # Example (Java):
33589 #
33590 # import com.google.type.Color;
33591 #
33592 # // ...
33593 # public static java.awt.Color fromProto(Color protocolor) {
33594 # float alpha = protocolor.hasAlpha()
33595 # ? protocolor.getAlpha().getValue()
33596 # : 1.0;
33597 #
33598 # return new java.awt.Color(
33599 # protocolor.getRed(),
33600 # protocolor.getGreen(),
33601 # protocolor.getBlue(),
33602 # alpha);
33603 # }
33604 #
33605 # public static Color toProto(java.awt.Color color) {
33606 # float red = (float) color.getRed();
33607 # float green = (float) color.getGreen();
33608 # float blue = (float) color.getBlue();
33609 # float denominator = 255.0;
33610 # Color.Builder resultBuilder =
33611 # Color
33612 # .newBuilder()
33613 # .setRed(red / denominator)
33614 # .setGreen(green / denominator)
33615 # .setBlue(blue / denominator);
33616 # int alpha = color.getAlpha();
33617 # if (alpha != 255) {
33618 # result.setAlpha(
33619 # FloatValue
33620 # .newBuilder()
33621 # .setValue(((float) alpha) / denominator)
33622 # .build());
33623 # }
33624 # return resultBuilder.build();
33625 # }
33626 # // ...
33627 #
33628 # Example (iOS / Obj-C):
33629 #
33630 # // ...
33631 # static UIColor* fromProto(Color* protocolor) {
33632 # float red = [protocolor red];
33633 # float green = [protocolor green];
33634 # float blue = [protocolor blue];
33635 # FloatValue* alpha_wrapper = [protocolor alpha];
33636 # float alpha = 1.0;
33637 # if (alpha_wrapper != nil) {
33638 # alpha = [alpha_wrapper value];
33639 # }
33640 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33641 # }
33642 #
33643 # static Color* toProto(UIColor* color) {
33644 # CGFloat red, green, blue, alpha;
33645 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33646 # return nil;
33647 # }
33648 # Color* result = [Color alloc] init];
33649 # [result setRed:red];
33650 # [result setGreen:green];
33651 # [result setBlue:blue];
33652 # if (alpha <= 0.9999) {
33653 # [result setAlpha:floatWrapperWithValue(alpha)];
33654 # }
33655 # [result autorelease];
33656 # return result;
33657 # }
33658 # // ...
33659 #
33660 # Example (JavaScript):
33661 #
33662 # // ...
33663 #
33664 # var protoToCssColor = function(rgb_color) {
33665 # var redFrac = rgb_color.red || 0.0;
33666 # var greenFrac = rgb_color.green || 0.0;
33667 # var blueFrac = rgb_color.blue || 0.0;
33668 # var red = Math.floor(redFrac * 255);
33669 # var green = Math.floor(greenFrac * 255);
33670 # var blue = Math.floor(blueFrac * 255);
33671 #
33672 # if (!('alpha' in rgb_color)) {
33673 # return rgbToCssColor_(red, green, blue);
33674 # }
33675 #
33676 # var alphaFrac = rgb_color.alpha.value || 0.0;
33677 # var rgbParams = [red, green, blue].join(',');
33678 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33679 # };
33680 #
33681 # var rgbToCssColor_ = function(red, green, blue) {
33682 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33683 # var hexString = rgbNumber.toString(16);
33684 # var missingZeros = 6 - hexString.length;
33685 # var resultBuilder = ['#'];
33686 # for (var i = 0; i < missingZeros; i++) {
33687 # resultBuilder.push('0');
33688 # }
33689 # resultBuilder.push(hexString);
33690 # return resultBuilder.join('');
33691 # };
33692 #
33693 # // ...
33694 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33695 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33696 # the final pixel color is defined by the equation:
33697 #
33698 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33699 #
33700 # This means that a value of 1.0 corresponds to a solid color, whereas
33701 # a value of 0.0 corresponds to a completely transparent color. This
33702 # uses a wrapper message rather than a simple float scalar so that it is
33703 # possible to distinguish between a default value and the value being unset.
33704 # If omitted, this color object is to be rendered as a solid color
33705 # (as if the alpha value had been explicitly given with a value of 1.0).
33706 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33707 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33708 },
33709 "width": 42, # The width of the border, in pixels.
33710 # Deprecated; the width is determined by the "style" field.
33711 "style": "A String", # The style of the border.
33712 },
33713 "bottom": { # A border along a cell. # The bottom border of the cell.
33714 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33715 # for simplicity of conversion to/from color representations in various
33716 # languages over compactness; for example, the fields of this representation
33717 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33718 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33719 # method in iOS; and, with just a little work, it can be easily formatted into
33720 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33721 #
33722 # Example (Java):
33723 #
33724 # import com.google.type.Color;
33725 #
33726 # // ...
33727 # public static java.awt.Color fromProto(Color protocolor) {
33728 # float alpha = protocolor.hasAlpha()
33729 # ? protocolor.getAlpha().getValue()
33730 # : 1.0;
33731 #
33732 # return new java.awt.Color(
33733 # protocolor.getRed(),
33734 # protocolor.getGreen(),
33735 # protocolor.getBlue(),
33736 # alpha);
33737 # }
33738 #
33739 # public static Color toProto(java.awt.Color color) {
33740 # float red = (float) color.getRed();
33741 # float green = (float) color.getGreen();
33742 # float blue = (float) color.getBlue();
33743 # float denominator = 255.0;
33744 # Color.Builder resultBuilder =
33745 # Color
33746 # .newBuilder()
33747 # .setRed(red / denominator)
33748 # .setGreen(green / denominator)
33749 # .setBlue(blue / denominator);
33750 # int alpha = color.getAlpha();
33751 # if (alpha != 255) {
33752 # result.setAlpha(
33753 # FloatValue
33754 # .newBuilder()
33755 # .setValue(((float) alpha) / denominator)
33756 # .build());
33757 # }
33758 # return resultBuilder.build();
33759 # }
33760 # // ...
33761 #
33762 # Example (iOS / Obj-C):
33763 #
33764 # // ...
33765 # static UIColor* fromProto(Color* protocolor) {
33766 # float red = [protocolor red];
33767 # float green = [protocolor green];
33768 # float blue = [protocolor blue];
33769 # FloatValue* alpha_wrapper = [protocolor alpha];
33770 # float alpha = 1.0;
33771 # if (alpha_wrapper != nil) {
33772 # alpha = [alpha_wrapper value];
33773 # }
33774 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33775 # }
33776 #
33777 # static Color* toProto(UIColor* color) {
33778 # CGFloat red, green, blue, alpha;
33779 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33780 # return nil;
33781 # }
33782 # Color* result = [Color alloc] init];
33783 # [result setRed:red];
33784 # [result setGreen:green];
33785 # [result setBlue:blue];
33786 # if (alpha <= 0.9999) {
33787 # [result setAlpha:floatWrapperWithValue(alpha)];
33788 # }
33789 # [result autorelease];
33790 # return result;
33791 # }
33792 # // ...
33793 #
33794 # Example (JavaScript):
33795 #
33796 # // ...
33797 #
33798 # var protoToCssColor = function(rgb_color) {
33799 # var redFrac = rgb_color.red || 0.0;
33800 # var greenFrac = rgb_color.green || 0.0;
33801 # var blueFrac = rgb_color.blue || 0.0;
33802 # var red = Math.floor(redFrac * 255);
33803 # var green = Math.floor(greenFrac * 255);
33804 # var blue = Math.floor(blueFrac * 255);
33805 #
33806 # if (!('alpha' in rgb_color)) {
33807 # return rgbToCssColor_(red, green, blue);
33808 # }
33809 #
33810 # var alphaFrac = rgb_color.alpha.value || 0.0;
33811 # var rgbParams = [red, green, blue].join(',');
33812 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33813 # };
33814 #
33815 # var rgbToCssColor_ = function(red, green, blue) {
33816 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33817 # var hexString = rgbNumber.toString(16);
33818 # var missingZeros = 6 - hexString.length;
33819 # var resultBuilder = ['#'];
33820 # for (var i = 0; i < missingZeros; i++) {
33821 # resultBuilder.push('0');
33822 # }
33823 # resultBuilder.push(hexString);
33824 # return resultBuilder.join('');
33825 # };
33826 #
33827 # // ...
33828 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33829 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33830 # the final pixel color is defined by the equation:
33831 #
33832 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33833 #
33834 # This means that a value of 1.0 corresponds to a solid color, whereas
33835 # a value of 0.0 corresponds to a completely transparent color. This
33836 # uses a wrapper message rather than a simple float scalar so that it is
33837 # possible to distinguish between a default value and the value being unset.
33838 # If omitted, this color object is to be rendered as a solid color
33839 # (as if the alpha value had been explicitly given with a value of 1.0).
33840 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33841 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33842 },
33843 "width": 42, # The width of the border, in pixels.
33844 # Deprecated; the width is determined by the "style" field.
33845 "style": "A String", # The style of the border.
33846 },
33847 "left": { # A border along a cell. # The left border of the cell.
33848 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
33849 # for simplicity of conversion to/from color representations in various
33850 # languages over compactness; for example, the fields of this representation
33851 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
33852 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
33853 # method in iOS; and, with just a little work, it can be easily formatted into
33854 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
33855 #
33856 # Example (Java):
33857 #
33858 # import com.google.type.Color;
33859 #
33860 # // ...
33861 # public static java.awt.Color fromProto(Color protocolor) {
33862 # float alpha = protocolor.hasAlpha()
33863 # ? protocolor.getAlpha().getValue()
33864 # : 1.0;
33865 #
33866 # return new java.awt.Color(
33867 # protocolor.getRed(),
33868 # protocolor.getGreen(),
33869 # protocolor.getBlue(),
33870 # alpha);
33871 # }
33872 #
33873 # public static Color toProto(java.awt.Color color) {
33874 # float red = (float) color.getRed();
33875 # float green = (float) color.getGreen();
33876 # float blue = (float) color.getBlue();
33877 # float denominator = 255.0;
33878 # Color.Builder resultBuilder =
33879 # Color
33880 # .newBuilder()
33881 # .setRed(red / denominator)
33882 # .setGreen(green / denominator)
33883 # .setBlue(blue / denominator);
33884 # int alpha = color.getAlpha();
33885 # if (alpha != 255) {
33886 # result.setAlpha(
33887 # FloatValue
33888 # .newBuilder()
33889 # .setValue(((float) alpha) / denominator)
33890 # .build());
33891 # }
33892 # return resultBuilder.build();
33893 # }
33894 # // ...
33895 #
33896 # Example (iOS / Obj-C):
33897 #
33898 # // ...
33899 # static UIColor* fromProto(Color* protocolor) {
33900 # float red = [protocolor red];
33901 # float green = [protocolor green];
33902 # float blue = [protocolor blue];
33903 # FloatValue* alpha_wrapper = [protocolor alpha];
33904 # float alpha = 1.0;
33905 # if (alpha_wrapper != nil) {
33906 # alpha = [alpha_wrapper value];
33907 # }
33908 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
33909 # }
33910 #
33911 # static Color* toProto(UIColor* color) {
33912 # CGFloat red, green, blue, alpha;
33913 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
33914 # return nil;
33915 # }
33916 # Color* result = [Color alloc] init];
33917 # [result setRed:red];
33918 # [result setGreen:green];
33919 # [result setBlue:blue];
33920 # if (alpha <= 0.9999) {
33921 # [result setAlpha:floatWrapperWithValue(alpha)];
33922 # }
33923 # [result autorelease];
33924 # return result;
33925 # }
33926 # // ...
33927 #
33928 # Example (JavaScript):
33929 #
33930 # // ...
33931 #
33932 # var protoToCssColor = function(rgb_color) {
33933 # var redFrac = rgb_color.red || 0.0;
33934 # var greenFrac = rgb_color.green || 0.0;
33935 # var blueFrac = rgb_color.blue || 0.0;
33936 # var red = Math.floor(redFrac * 255);
33937 # var green = Math.floor(greenFrac * 255);
33938 # var blue = Math.floor(blueFrac * 255);
33939 #
33940 # if (!('alpha' in rgb_color)) {
33941 # return rgbToCssColor_(red, green, blue);
33942 # }
33943 #
33944 # var alphaFrac = rgb_color.alpha.value || 0.0;
33945 # var rgbParams = [red, green, blue].join(',');
33946 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
33947 # };
33948 #
33949 # var rgbToCssColor_ = function(red, green, blue) {
33950 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
33951 # var hexString = rgbNumber.toString(16);
33952 # var missingZeros = 6 - hexString.length;
33953 # var resultBuilder = ['#'];
33954 # for (var i = 0; i < missingZeros; i++) {
33955 # resultBuilder.push('0');
33956 # }
33957 # resultBuilder.push(hexString);
33958 # return resultBuilder.join('');
33959 # };
33960 #
33961 # // ...
33962 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
33963 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
33964 # the final pixel color is defined by the equation:
33965 #
33966 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
33967 #
33968 # This means that a value of 1.0 corresponds to a solid color, whereas
33969 # a value of 0.0 corresponds to a completely transparent color. This
33970 # uses a wrapper message rather than a simple float scalar so that it is
33971 # possible to distinguish between a default value and the value being unset.
33972 # If omitted, this color object is to be rendered as a solid color
33973 # (as if the alpha value had been explicitly given with a value of 1.0).
33974 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
33975 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
33976 },
33977 "width": 42, # The width of the border, in pixels.
33978 # Deprecated; the width is determined by the "style" field.
33979 "style": "A String", # The style of the border.
33980 },
33981 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040033982 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
33983 "angle": 42, # The angle between the standard orientation and the desired orientation.
33984 # Measured in degrees. Valid values are between -90 and 90. Positive
33985 # angles are angled upwards, negative are angled downwards.
33986 #
33987 # Note: For LTR text direction positive angles are in the counterclockwise
33988 # direction, whereas for RTL they are in the clockwise direction
33989 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
33990 # characters is unchanged.
33991 # For example:
33992 #
33993 # | V |
33994 # | e |
33995 # | r |
33996 # | t |
33997 # | i |
33998 # | c |
33999 # | a |
34000 # | l |
34001 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034002 },
34003 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
34004 #
34005 # When writing, the new format will be merged with the existing format.
34006 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
34007 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
34008 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034009 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034010 # information about the supported patterns.
34011 "type": "A String", # The type of the number format.
34012 # When writing, this field must be set.
34013 },
34014 "textDirection": "A String", # The direction of the text in the cell.
34015 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
34016 # When updating padding, every field must be specified.
34017 "top": 42, # The top padding of the cell.
34018 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034019 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034020 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034021 },
34022 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
34023 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
34024 # for simplicity of conversion to/from color representations in various
34025 # languages over compactness; for example, the fields of this representation
34026 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34027 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34028 # method in iOS; and, with just a little work, it can be easily formatted into
34029 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34030 #
34031 # Example (Java):
34032 #
34033 # import com.google.type.Color;
34034 #
34035 # // ...
34036 # public static java.awt.Color fromProto(Color protocolor) {
34037 # float alpha = protocolor.hasAlpha()
34038 # ? protocolor.getAlpha().getValue()
34039 # : 1.0;
34040 #
34041 # return new java.awt.Color(
34042 # protocolor.getRed(),
34043 # protocolor.getGreen(),
34044 # protocolor.getBlue(),
34045 # alpha);
34046 # }
34047 #
34048 # public static Color toProto(java.awt.Color color) {
34049 # float red = (float) color.getRed();
34050 # float green = (float) color.getGreen();
34051 # float blue = (float) color.getBlue();
34052 # float denominator = 255.0;
34053 # Color.Builder resultBuilder =
34054 # Color
34055 # .newBuilder()
34056 # .setRed(red / denominator)
34057 # .setGreen(green / denominator)
34058 # .setBlue(blue / denominator);
34059 # int alpha = color.getAlpha();
34060 # if (alpha != 255) {
34061 # result.setAlpha(
34062 # FloatValue
34063 # .newBuilder()
34064 # .setValue(((float) alpha) / denominator)
34065 # .build());
34066 # }
34067 # return resultBuilder.build();
34068 # }
34069 # // ...
34070 #
34071 # Example (iOS / Obj-C):
34072 #
34073 # // ...
34074 # static UIColor* fromProto(Color* protocolor) {
34075 # float red = [protocolor red];
34076 # float green = [protocolor green];
34077 # float blue = [protocolor blue];
34078 # FloatValue* alpha_wrapper = [protocolor alpha];
34079 # float alpha = 1.0;
34080 # if (alpha_wrapper != nil) {
34081 # alpha = [alpha_wrapper value];
34082 # }
34083 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34084 # }
34085 #
34086 # static Color* toProto(UIColor* color) {
34087 # CGFloat red, green, blue, alpha;
34088 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34089 # return nil;
34090 # }
34091 # Color* result = [Color alloc] init];
34092 # [result setRed:red];
34093 # [result setGreen:green];
34094 # [result setBlue:blue];
34095 # if (alpha <= 0.9999) {
34096 # [result setAlpha:floatWrapperWithValue(alpha)];
34097 # }
34098 # [result autorelease];
34099 # return result;
34100 # }
34101 # // ...
34102 #
34103 # Example (JavaScript):
34104 #
34105 # // ...
34106 #
34107 # var protoToCssColor = function(rgb_color) {
34108 # var redFrac = rgb_color.red || 0.0;
34109 # var greenFrac = rgb_color.green || 0.0;
34110 # var blueFrac = rgb_color.blue || 0.0;
34111 # var red = Math.floor(redFrac * 255);
34112 # var green = Math.floor(greenFrac * 255);
34113 # var blue = Math.floor(blueFrac * 255);
34114 #
34115 # if (!('alpha' in rgb_color)) {
34116 # return rgbToCssColor_(red, green, blue);
34117 # }
34118 #
34119 # var alphaFrac = rgb_color.alpha.value || 0.0;
34120 # var rgbParams = [red, green, blue].join(',');
34121 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34122 # };
34123 #
34124 # var rgbToCssColor_ = function(red, green, blue) {
34125 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34126 # var hexString = rgbNumber.toString(16);
34127 # var missingZeros = 6 - hexString.length;
34128 # var resultBuilder = ['#'];
34129 # for (var i = 0; i < missingZeros; i++) {
34130 # resultBuilder.push('0');
34131 # }
34132 # resultBuilder.push(hexString);
34133 # return resultBuilder.join('');
34134 # };
34135 #
34136 # // ...
34137 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34138 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34139 # the final pixel color is defined by the equation:
34140 #
34141 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34142 #
34143 # This means that a value of 1.0 corresponds to a solid color, whereas
34144 # a value of 0.0 corresponds to a completely transparent color. This
34145 # uses a wrapper message rather than a simple float scalar so that it is
34146 # possible to distinguish between a default value and the value being unset.
34147 # If omitted, this color object is to be rendered as a solid color
34148 # (as if the alpha value had been explicitly given with a value of 1.0).
34149 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34150 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34151 },
34152 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
34153 "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).
34154 # Absent values indicate that the field isn't specified.
34155 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34156 # for simplicity of conversion to/from color representations in various
34157 # languages over compactness; for example, the fields of this representation
34158 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34159 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34160 # method in iOS; and, with just a little work, it can be easily formatted into
34161 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34162 #
34163 # Example (Java):
34164 #
34165 # import com.google.type.Color;
34166 #
34167 # // ...
34168 # public static java.awt.Color fromProto(Color protocolor) {
34169 # float alpha = protocolor.hasAlpha()
34170 # ? protocolor.getAlpha().getValue()
34171 # : 1.0;
34172 #
34173 # return new java.awt.Color(
34174 # protocolor.getRed(),
34175 # protocolor.getGreen(),
34176 # protocolor.getBlue(),
34177 # alpha);
34178 # }
34179 #
34180 # public static Color toProto(java.awt.Color color) {
34181 # float red = (float) color.getRed();
34182 # float green = (float) color.getGreen();
34183 # float blue = (float) color.getBlue();
34184 # float denominator = 255.0;
34185 # Color.Builder resultBuilder =
34186 # Color
34187 # .newBuilder()
34188 # .setRed(red / denominator)
34189 # .setGreen(green / denominator)
34190 # .setBlue(blue / denominator);
34191 # int alpha = color.getAlpha();
34192 # if (alpha != 255) {
34193 # result.setAlpha(
34194 # FloatValue
34195 # .newBuilder()
34196 # .setValue(((float) alpha) / denominator)
34197 # .build());
34198 # }
34199 # return resultBuilder.build();
34200 # }
34201 # // ...
34202 #
34203 # Example (iOS / Obj-C):
34204 #
34205 # // ...
34206 # static UIColor* fromProto(Color* protocolor) {
34207 # float red = [protocolor red];
34208 # float green = [protocolor green];
34209 # float blue = [protocolor blue];
34210 # FloatValue* alpha_wrapper = [protocolor alpha];
34211 # float alpha = 1.0;
34212 # if (alpha_wrapper != nil) {
34213 # alpha = [alpha_wrapper value];
34214 # }
34215 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34216 # }
34217 #
34218 # static Color* toProto(UIColor* color) {
34219 # CGFloat red, green, blue, alpha;
34220 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34221 # return nil;
34222 # }
34223 # Color* result = [Color alloc] init];
34224 # [result setRed:red];
34225 # [result setGreen:green];
34226 # [result setBlue:blue];
34227 # if (alpha <= 0.9999) {
34228 # [result setAlpha:floatWrapperWithValue(alpha)];
34229 # }
34230 # [result autorelease];
34231 # return result;
34232 # }
34233 # // ...
34234 #
34235 # Example (JavaScript):
34236 #
34237 # // ...
34238 #
34239 # var protoToCssColor = function(rgb_color) {
34240 # var redFrac = rgb_color.red || 0.0;
34241 # var greenFrac = rgb_color.green || 0.0;
34242 # var blueFrac = rgb_color.blue || 0.0;
34243 # var red = Math.floor(redFrac * 255);
34244 # var green = Math.floor(greenFrac * 255);
34245 # var blue = Math.floor(blueFrac * 255);
34246 #
34247 # if (!('alpha' in rgb_color)) {
34248 # return rgbToCssColor_(red, green, blue);
34249 # }
34250 #
34251 # var alphaFrac = rgb_color.alpha.value || 0.0;
34252 # var rgbParams = [red, green, blue].join(',');
34253 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34254 # };
34255 #
34256 # var rgbToCssColor_ = function(red, green, blue) {
34257 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34258 # var hexString = rgbNumber.toString(16);
34259 # var missingZeros = 6 - hexString.length;
34260 # var resultBuilder = ['#'];
34261 # for (var i = 0; i < missingZeros; i++) {
34262 # resultBuilder.push('0');
34263 # }
34264 # resultBuilder.push(hexString);
34265 # return resultBuilder.join('');
34266 # };
34267 #
34268 # // ...
34269 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34270 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34271 # the final pixel color is defined by the equation:
34272 #
34273 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34274 #
34275 # This means that a value of 1.0 corresponds to a solid color, whereas
34276 # a value of 0.0 corresponds to a completely transparent color. This
34277 # uses a wrapper message rather than a simple float scalar so that it is
34278 # possible to distinguish between a default value and the value being unset.
34279 # If omitted, this color object is to be rendered as a solid color
34280 # (as if the alpha value had been explicitly given with a value of 1.0).
34281 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34282 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34283 },
34284 "bold": True or False, # True if the text is bold.
34285 "strikethrough": True or False, # True if the text has a strikethrough.
34286 "fontFamily": "A String", # The font family.
34287 "fontSize": 42, # The size of the font.
34288 "italic": True or False, # True if the text is italicized.
34289 "underline": True or False, # True if the text is underlined.
34290 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034291 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034292 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
34293 "borders": { # The borders of the cell. # The borders of the cell.
34294 "top": { # A border along a cell. # The top border of the cell.
34295 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34296 # for simplicity of conversion to/from color representations in various
34297 # languages over compactness; for example, the fields of this representation
34298 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34299 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34300 # method in iOS; and, with just a little work, it can be easily formatted into
34301 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34302 #
34303 # Example (Java):
34304 #
34305 # import com.google.type.Color;
34306 #
34307 # // ...
34308 # public static java.awt.Color fromProto(Color protocolor) {
34309 # float alpha = protocolor.hasAlpha()
34310 # ? protocolor.getAlpha().getValue()
34311 # : 1.0;
34312 #
34313 # return new java.awt.Color(
34314 # protocolor.getRed(),
34315 # protocolor.getGreen(),
34316 # protocolor.getBlue(),
34317 # alpha);
34318 # }
34319 #
34320 # public static Color toProto(java.awt.Color color) {
34321 # float red = (float) color.getRed();
34322 # float green = (float) color.getGreen();
34323 # float blue = (float) color.getBlue();
34324 # float denominator = 255.0;
34325 # Color.Builder resultBuilder =
34326 # Color
34327 # .newBuilder()
34328 # .setRed(red / denominator)
34329 # .setGreen(green / denominator)
34330 # .setBlue(blue / denominator);
34331 # int alpha = color.getAlpha();
34332 # if (alpha != 255) {
34333 # result.setAlpha(
34334 # FloatValue
34335 # .newBuilder()
34336 # .setValue(((float) alpha) / denominator)
34337 # .build());
34338 # }
34339 # return resultBuilder.build();
34340 # }
34341 # // ...
34342 #
34343 # Example (iOS / Obj-C):
34344 #
34345 # // ...
34346 # static UIColor* fromProto(Color* protocolor) {
34347 # float red = [protocolor red];
34348 # float green = [protocolor green];
34349 # float blue = [protocolor blue];
34350 # FloatValue* alpha_wrapper = [protocolor alpha];
34351 # float alpha = 1.0;
34352 # if (alpha_wrapper != nil) {
34353 # alpha = [alpha_wrapper value];
34354 # }
34355 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34356 # }
34357 #
34358 # static Color* toProto(UIColor* color) {
34359 # CGFloat red, green, blue, alpha;
34360 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34361 # return nil;
34362 # }
34363 # Color* result = [Color alloc] init];
34364 # [result setRed:red];
34365 # [result setGreen:green];
34366 # [result setBlue:blue];
34367 # if (alpha <= 0.9999) {
34368 # [result setAlpha:floatWrapperWithValue(alpha)];
34369 # }
34370 # [result autorelease];
34371 # return result;
34372 # }
34373 # // ...
34374 #
34375 # Example (JavaScript):
34376 #
34377 # // ...
34378 #
34379 # var protoToCssColor = function(rgb_color) {
34380 # var redFrac = rgb_color.red || 0.0;
34381 # var greenFrac = rgb_color.green || 0.0;
34382 # var blueFrac = rgb_color.blue || 0.0;
34383 # var red = Math.floor(redFrac * 255);
34384 # var green = Math.floor(greenFrac * 255);
34385 # var blue = Math.floor(blueFrac * 255);
34386 #
34387 # if (!('alpha' in rgb_color)) {
34388 # return rgbToCssColor_(red, green, blue);
34389 # }
34390 #
34391 # var alphaFrac = rgb_color.alpha.value || 0.0;
34392 # var rgbParams = [red, green, blue].join(',');
34393 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34394 # };
34395 #
34396 # var rgbToCssColor_ = function(red, green, blue) {
34397 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34398 # var hexString = rgbNumber.toString(16);
34399 # var missingZeros = 6 - hexString.length;
34400 # var resultBuilder = ['#'];
34401 # for (var i = 0; i < missingZeros; i++) {
34402 # resultBuilder.push('0');
34403 # }
34404 # resultBuilder.push(hexString);
34405 # return resultBuilder.join('');
34406 # };
34407 #
34408 # // ...
34409 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34410 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34411 # the final pixel color is defined by the equation:
34412 #
34413 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34414 #
34415 # This means that a value of 1.0 corresponds to a solid color, whereas
34416 # a value of 0.0 corresponds to a completely transparent color. This
34417 # uses a wrapper message rather than a simple float scalar so that it is
34418 # possible to distinguish between a default value and the value being unset.
34419 # If omitted, this color object is to be rendered as a solid color
34420 # (as if the alpha value had been explicitly given with a value of 1.0).
34421 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34422 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34423 },
34424 "width": 42, # The width of the border, in pixels.
34425 # Deprecated; the width is determined by the "style" field.
34426 "style": "A String", # The style of the border.
34427 },
34428 "right": { # A border along a cell. # The right border of the cell.
34429 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34430 # for simplicity of conversion to/from color representations in various
34431 # languages over compactness; for example, the fields of this representation
34432 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34433 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34434 # method in iOS; and, with just a little work, it can be easily formatted into
34435 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34436 #
34437 # Example (Java):
34438 #
34439 # import com.google.type.Color;
34440 #
34441 # // ...
34442 # public static java.awt.Color fromProto(Color protocolor) {
34443 # float alpha = protocolor.hasAlpha()
34444 # ? protocolor.getAlpha().getValue()
34445 # : 1.0;
34446 #
34447 # return new java.awt.Color(
34448 # protocolor.getRed(),
34449 # protocolor.getGreen(),
34450 # protocolor.getBlue(),
34451 # alpha);
34452 # }
34453 #
34454 # public static Color toProto(java.awt.Color color) {
34455 # float red = (float) color.getRed();
34456 # float green = (float) color.getGreen();
34457 # float blue = (float) color.getBlue();
34458 # float denominator = 255.0;
34459 # Color.Builder resultBuilder =
34460 # Color
34461 # .newBuilder()
34462 # .setRed(red / denominator)
34463 # .setGreen(green / denominator)
34464 # .setBlue(blue / denominator);
34465 # int alpha = color.getAlpha();
34466 # if (alpha != 255) {
34467 # result.setAlpha(
34468 # FloatValue
34469 # .newBuilder()
34470 # .setValue(((float) alpha) / denominator)
34471 # .build());
34472 # }
34473 # return resultBuilder.build();
34474 # }
34475 # // ...
34476 #
34477 # Example (iOS / Obj-C):
34478 #
34479 # // ...
34480 # static UIColor* fromProto(Color* protocolor) {
34481 # float red = [protocolor red];
34482 # float green = [protocolor green];
34483 # float blue = [protocolor blue];
34484 # FloatValue* alpha_wrapper = [protocolor alpha];
34485 # float alpha = 1.0;
34486 # if (alpha_wrapper != nil) {
34487 # alpha = [alpha_wrapper value];
34488 # }
34489 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34490 # }
34491 #
34492 # static Color* toProto(UIColor* color) {
34493 # CGFloat red, green, blue, alpha;
34494 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34495 # return nil;
34496 # }
34497 # Color* result = [Color alloc] init];
34498 # [result setRed:red];
34499 # [result setGreen:green];
34500 # [result setBlue:blue];
34501 # if (alpha <= 0.9999) {
34502 # [result setAlpha:floatWrapperWithValue(alpha)];
34503 # }
34504 # [result autorelease];
34505 # return result;
34506 # }
34507 # // ...
34508 #
34509 # Example (JavaScript):
34510 #
34511 # // ...
34512 #
34513 # var protoToCssColor = function(rgb_color) {
34514 # var redFrac = rgb_color.red || 0.0;
34515 # var greenFrac = rgb_color.green || 0.0;
34516 # var blueFrac = rgb_color.blue || 0.0;
34517 # var red = Math.floor(redFrac * 255);
34518 # var green = Math.floor(greenFrac * 255);
34519 # var blue = Math.floor(blueFrac * 255);
34520 #
34521 # if (!('alpha' in rgb_color)) {
34522 # return rgbToCssColor_(red, green, blue);
34523 # }
34524 #
34525 # var alphaFrac = rgb_color.alpha.value || 0.0;
34526 # var rgbParams = [red, green, blue].join(',');
34527 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34528 # };
34529 #
34530 # var rgbToCssColor_ = function(red, green, blue) {
34531 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34532 # var hexString = rgbNumber.toString(16);
34533 # var missingZeros = 6 - hexString.length;
34534 # var resultBuilder = ['#'];
34535 # for (var i = 0; i < missingZeros; i++) {
34536 # resultBuilder.push('0');
34537 # }
34538 # resultBuilder.push(hexString);
34539 # return resultBuilder.join('');
34540 # };
34541 #
34542 # // ...
34543 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34544 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34545 # the final pixel color is defined by the equation:
34546 #
34547 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34548 #
34549 # This means that a value of 1.0 corresponds to a solid color, whereas
34550 # a value of 0.0 corresponds to a completely transparent color. This
34551 # uses a wrapper message rather than a simple float scalar so that it is
34552 # possible to distinguish between a default value and the value being unset.
34553 # If omitted, this color object is to be rendered as a solid color
34554 # (as if the alpha value had been explicitly given with a value of 1.0).
34555 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34556 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34557 },
34558 "width": 42, # The width of the border, in pixels.
34559 # Deprecated; the width is determined by the "style" field.
34560 "style": "A String", # The style of the border.
34561 },
34562 "bottom": { # A border along a cell. # The bottom border of the cell.
34563 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34564 # for simplicity of conversion to/from color representations in various
34565 # languages over compactness; for example, the fields of this representation
34566 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34567 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34568 # method in iOS; and, with just a little work, it can be easily formatted into
34569 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34570 #
34571 # Example (Java):
34572 #
34573 # import com.google.type.Color;
34574 #
34575 # // ...
34576 # public static java.awt.Color fromProto(Color protocolor) {
34577 # float alpha = protocolor.hasAlpha()
34578 # ? protocolor.getAlpha().getValue()
34579 # : 1.0;
34580 #
34581 # return new java.awt.Color(
34582 # protocolor.getRed(),
34583 # protocolor.getGreen(),
34584 # protocolor.getBlue(),
34585 # alpha);
34586 # }
34587 #
34588 # public static Color toProto(java.awt.Color color) {
34589 # float red = (float) color.getRed();
34590 # float green = (float) color.getGreen();
34591 # float blue = (float) color.getBlue();
34592 # float denominator = 255.0;
34593 # Color.Builder resultBuilder =
34594 # Color
34595 # .newBuilder()
34596 # .setRed(red / denominator)
34597 # .setGreen(green / denominator)
34598 # .setBlue(blue / denominator);
34599 # int alpha = color.getAlpha();
34600 # if (alpha != 255) {
34601 # result.setAlpha(
34602 # FloatValue
34603 # .newBuilder()
34604 # .setValue(((float) alpha) / denominator)
34605 # .build());
34606 # }
34607 # return resultBuilder.build();
34608 # }
34609 # // ...
34610 #
34611 # Example (iOS / Obj-C):
34612 #
34613 # // ...
34614 # static UIColor* fromProto(Color* protocolor) {
34615 # float red = [protocolor red];
34616 # float green = [protocolor green];
34617 # float blue = [protocolor blue];
34618 # FloatValue* alpha_wrapper = [protocolor alpha];
34619 # float alpha = 1.0;
34620 # if (alpha_wrapper != nil) {
34621 # alpha = [alpha_wrapper value];
34622 # }
34623 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34624 # }
34625 #
34626 # static Color* toProto(UIColor* color) {
34627 # CGFloat red, green, blue, alpha;
34628 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34629 # return nil;
34630 # }
34631 # Color* result = [Color alloc] init];
34632 # [result setRed:red];
34633 # [result setGreen:green];
34634 # [result setBlue:blue];
34635 # if (alpha <= 0.9999) {
34636 # [result setAlpha:floatWrapperWithValue(alpha)];
34637 # }
34638 # [result autorelease];
34639 # return result;
34640 # }
34641 # // ...
34642 #
34643 # Example (JavaScript):
34644 #
34645 # // ...
34646 #
34647 # var protoToCssColor = function(rgb_color) {
34648 # var redFrac = rgb_color.red || 0.0;
34649 # var greenFrac = rgb_color.green || 0.0;
34650 # var blueFrac = rgb_color.blue || 0.0;
34651 # var red = Math.floor(redFrac * 255);
34652 # var green = Math.floor(greenFrac * 255);
34653 # var blue = Math.floor(blueFrac * 255);
34654 #
34655 # if (!('alpha' in rgb_color)) {
34656 # return rgbToCssColor_(red, green, blue);
34657 # }
34658 #
34659 # var alphaFrac = rgb_color.alpha.value || 0.0;
34660 # var rgbParams = [red, green, blue].join(',');
34661 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34662 # };
34663 #
34664 # var rgbToCssColor_ = function(red, green, blue) {
34665 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34666 # var hexString = rgbNumber.toString(16);
34667 # var missingZeros = 6 - hexString.length;
34668 # var resultBuilder = ['#'];
34669 # for (var i = 0; i < missingZeros; i++) {
34670 # resultBuilder.push('0');
34671 # }
34672 # resultBuilder.push(hexString);
34673 # return resultBuilder.join('');
34674 # };
34675 #
34676 # // ...
34677 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34678 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34679 # the final pixel color is defined by the equation:
34680 #
34681 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34682 #
34683 # This means that a value of 1.0 corresponds to a solid color, whereas
34684 # a value of 0.0 corresponds to a completely transparent color. This
34685 # uses a wrapper message rather than a simple float scalar so that it is
34686 # possible to distinguish between a default value and the value being unset.
34687 # If omitted, this color object is to be rendered as a solid color
34688 # (as if the alpha value had been explicitly given with a value of 1.0).
34689 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34690 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34691 },
34692 "width": 42, # The width of the border, in pixels.
34693 # Deprecated; the width is determined by the "style" field.
34694 "style": "A String", # The style of the border.
34695 },
34696 "left": { # A border along a cell. # The left border of the cell.
34697 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
34698 # for simplicity of conversion to/from color representations in various
34699 # languages over compactness; for example, the fields of this representation
34700 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34701 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34702 # method in iOS; and, with just a little work, it can be easily formatted into
34703 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34704 #
34705 # Example (Java):
34706 #
34707 # import com.google.type.Color;
34708 #
34709 # // ...
34710 # public static java.awt.Color fromProto(Color protocolor) {
34711 # float alpha = protocolor.hasAlpha()
34712 # ? protocolor.getAlpha().getValue()
34713 # : 1.0;
34714 #
34715 # return new java.awt.Color(
34716 # protocolor.getRed(),
34717 # protocolor.getGreen(),
34718 # protocolor.getBlue(),
34719 # alpha);
34720 # }
34721 #
34722 # public static Color toProto(java.awt.Color color) {
34723 # float red = (float) color.getRed();
34724 # float green = (float) color.getGreen();
34725 # float blue = (float) color.getBlue();
34726 # float denominator = 255.0;
34727 # Color.Builder resultBuilder =
34728 # Color
34729 # .newBuilder()
34730 # .setRed(red / denominator)
34731 # .setGreen(green / denominator)
34732 # .setBlue(blue / denominator);
34733 # int alpha = color.getAlpha();
34734 # if (alpha != 255) {
34735 # result.setAlpha(
34736 # FloatValue
34737 # .newBuilder()
34738 # .setValue(((float) alpha) / denominator)
34739 # .build());
34740 # }
34741 # return resultBuilder.build();
34742 # }
34743 # // ...
34744 #
34745 # Example (iOS / Obj-C):
34746 #
34747 # // ...
34748 # static UIColor* fromProto(Color* protocolor) {
34749 # float red = [protocolor red];
34750 # float green = [protocolor green];
34751 # float blue = [protocolor blue];
34752 # FloatValue* alpha_wrapper = [protocolor alpha];
34753 # float alpha = 1.0;
34754 # if (alpha_wrapper != nil) {
34755 # alpha = [alpha_wrapper value];
34756 # }
34757 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34758 # }
34759 #
34760 # static Color* toProto(UIColor* color) {
34761 # CGFloat red, green, blue, alpha;
34762 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34763 # return nil;
34764 # }
34765 # Color* result = [Color alloc] init];
34766 # [result setRed:red];
34767 # [result setGreen:green];
34768 # [result setBlue:blue];
34769 # if (alpha <= 0.9999) {
34770 # [result setAlpha:floatWrapperWithValue(alpha)];
34771 # }
34772 # [result autorelease];
34773 # return result;
34774 # }
34775 # // ...
34776 #
34777 # Example (JavaScript):
34778 #
34779 # // ...
34780 #
34781 # var protoToCssColor = function(rgb_color) {
34782 # var redFrac = rgb_color.red || 0.0;
34783 # var greenFrac = rgb_color.green || 0.0;
34784 # var blueFrac = rgb_color.blue || 0.0;
34785 # var red = Math.floor(redFrac * 255);
34786 # var green = Math.floor(greenFrac * 255);
34787 # var blue = Math.floor(blueFrac * 255);
34788 #
34789 # if (!('alpha' in rgb_color)) {
34790 # return rgbToCssColor_(red, green, blue);
34791 # }
34792 #
34793 # var alphaFrac = rgb_color.alpha.value || 0.0;
34794 # var rgbParams = [red, green, blue].join(',');
34795 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34796 # };
34797 #
34798 # var rgbToCssColor_ = function(red, green, blue) {
34799 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
34800 # var hexString = rgbNumber.toString(16);
34801 # var missingZeros = 6 - hexString.length;
34802 # var resultBuilder = ['#'];
34803 # for (var i = 0; i < missingZeros; i++) {
34804 # resultBuilder.push('0');
34805 # }
34806 # resultBuilder.push(hexString);
34807 # return resultBuilder.join('');
34808 # };
34809 #
34810 # // ...
34811 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
34812 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
34813 # the final pixel color is defined by the equation:
34814 #
34815 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
34816 #
34817 # This means that a value of 1.0 corresponds to a solid color, whereas
34818 # a value of 0.0 corresponds to a completely transparent color. This
34819 # uses a wrapper message rather than a simple float scalar so that it is
34820 # possible to distinguish between a default value and the value being unset.
34821 # If omitted, this color object is to be rendered as a solid color
34822 # (as if the alpha value had been explicitly given with a value of 1.0).
34823 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
34824 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
34825 },
34826 "width": 42, # The width of the border, in pixels.
34827 # Deprecated; the width is determined by the "style" field.
34828 "style": "A String", # The style of the border.
34829 },
34830 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034831 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
34832 "angle": 42, # The angle between the standard orientation and the desired orientation.
34833 # Measured in degrees. Valid values are between -90 and 90. Positive
34834 # angles are angled upwards, negative are angled downwards.
34835 #
34836 # Note: For LTR text direction positive angles are in the counterclockwise
34837 # direction, whereas for RTL they are in the clockwise direction
34838 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
34839 # characters is unchanged.
34840 # For example:
34841 #
34842 # | V |
34843 # | e |
34844 # | r |
34845 # | t |
34846 # | i |
34847 # | c |
34848 # | a |
34849 # | l |
34850 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034851 },
34852 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
34853 #
34854 # When writing, the new data validation rule will overwrite any prior rule.
34855 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
34856 # If true, "List" conditions will show a dropdown.
34857 "strict": True or False, # True if invalid data should be rejected.
34858 "inputMessage": "A String", # A message to show the user when adding data to the cell.
34859 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
34860 # BooleanConditions are used by conditional formatting,
34861 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034862 "values": [ # The values of the condition. The number of supported values depends
34863 # on the condition type. Some support zero values,
34864 # others one or two values,
34865 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
34866 { # The value of the condition.
34867 "relativeDate": "A String", # A relative date (based on the current date).
34868 # Valid only if the type is
34869 # DATE_BEFORE,
34870 # DATE_AFTER,
34871 # DATE_ON_OR_BEFORE or
34872 # DATE_ON_OR_AFTER.
34873 #
34874 # Relative dates are not supported in data validation.
34875 # They are supported only in conditional formatting and
34876 # conditional filters.
34877 "userEnteredValue": "A String", # A value the condition is based on.
34878 # The value will be parsed as if the user typed into a cell.
34879 # Formulas are supported (and must begin with an `=`).
34880 },
34881 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040034882 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080034883 },
34884 },
34885 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
34886 # on user entered strings, not formulas, bools, or numbers.
34887 # Runs start at specific indexes in the text and continue until the next
34888 # run. Properties of a run will continue unless explicitly changed
34889 # in a subsequent run (and properties of the first run will continue
34890 # the properties of the cell unless explicitly changed).
34891 #
34892 # When writing, the new runs will overwrite any prior runs. When writing a
34893 # new user_entered_value, previous runs will be erased.
34894 { # A run of a text format. The format of this run continues until the start
34895 # index of the next run.
34896 # When updating, all fields must be set.
34897 "startIndex": 42, # The character index where this run starts.
34898 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
34899 # Absent values indicate that the field isn't specified.
34900 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
34901 # for simplicity of conversion to/from color representations in various
34902 # languages over compactness; for example, the fields of this representation
34903 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
34904 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
34905 # method in iOS; and, with just a little work, it can be easily formatted into
34906 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
34907 #
34908 # Example (Java):
34909 #
34910 # import com.google.type.Color;
34911 #
34912 # // ...
34913 # public static java.awt.Color fromProto(Color protocolor) {
34914 # float alpha = protocolor.hasAlpha()
34915 # ? protocolor.getAlpha().getValue()
34916 # : 1.0;
34917 #
34918 # return new java.awt.Color(
34919 # protocolor.getRed(),
34920 # protocolor.getGreen(),
34921 # protocolor.getBlue(),
34922 # alpha);
34923 # }
34924 #
34925 # public static Color toProto(java.awt.Color color) {
34926 # float red = (float) color.getRed();
34927 # float green = (float) color.getGreen();
34928 # float blue = (float) color.getBlue();
34929 # float denominator = 255.0;
34930 # Color.Builder resultBuilder =
34931 # Color
34932 # .newBuilder()
34933 # .setRed(red / denominator)
34934 # .setGreen(green / denominator)
34935 # .setBlue(blue / denominator);
34936 # int alpha = color.getAlpha();
34937 # if (alpha != 255) {
34938 # result.setAlpha(
34939 # FloatValue
34940 # .newBuilder()
34941 # .setValue(((float) alpha) / denominator)
34942 # .build());
34943 # }
34944 # return resultBuilder.build();
34945 # }
34946 # // ...
34947 #
34948 # Example (iOS / Obj-C):
34949 #
34950 # // ...
34951 # static UIColor* fromProto(Color* protocolor) {
34952 # float red = [protocolor red];
34953 # float green = [protocolor green];
34954 # float blue = [protocolor blue];
34955 # FloatValue* alpha_wrapper = [protocolor alpha];
34956 # float alpha = 1.0;
34957 # if (alpha_wrapper != nil) {
34958 # alpha = [alpha_wrapper value];
34959 # }
34960 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
34961 # }
34962 #
34963 # static Color* toProto(UIColor* color) {
34964 # CGFloat red, green, blue, alpha;
34965 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
34966 # return nil;
34967 # }
34968 # Color* result = [Color alloc] init];
34969 # [result setRed:red];
34970 # [result setGreen:green];
34971 # [result setBlue:blue];
34972 # if (alpha <= 0.9999) {
34973 # [result setAlpha:floatWrapperWithValue(alpha)];
34974 # }
34975 # [result autorelease];
34976 # return result;
34977 # }
34978 # // ...
34979 #
34980 # Example (JavaScript):
34981 #
34982 # // ...
34983 #
34984 # var protoToCssColor = function(rgb_color) {
34985 # var redFrac = rgb_color.red || 0.0;
34986 # var greenFrac = rgb_color.green || 0.0;
34987 # var blueFrac = rgb_color.blue || 0.0;
34988 # var red = Math.floor(redFrac * 255);
34989 # var green = Math.floor(greenFrac * 255);
34990 # var blue = Math.floor(blueFrac * 255);
34991 #
34992 # if (!('alpha' in rgb_color)) {
34993 # return rgbToCssColor_(red, green, blue);
34994 # }
34995 #
34996 # var alphaFrac = rgb_color.alpha.value || 0.0;
34997 # var rgbParams = [red, green, blue].join(',');
34998 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
34999 # };
35000 #
35001 # var rgbToCssColor_ = function(red, green, blue) {
35002 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35003 # var hexString = rgbNumber.toString(16);
35004 # var missingZeros = 6 - hexString.length;
35005 # var resultBuilder = ['#'];
35006 # for (var i = 0; i < missingZeros; i++) {
35007 # resultBuilder.push('0');
35008 # }
35009 # resultBuilder.push(hexString);
35010 # return resultBuilder.join('');
35011 # };
35012 #
35013 # // ...
35014 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35015 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35016 # the final pixel color is defined by the equation:
35017 #
35018 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35019 #
35020 # This means that a value of 1.0 corresponds to a solid color, whereas
35021 # a value of 0.0 corresponds to a completely transparent color. This
35022 # uses a wrapper message rather than a simple float scalar so that it is
35023 # possible to distinguish between a default value and the value being unset.
35024 # If omitted, this color object is to be rendered as a solid color
35025 # (as if the alpha value had been explicitly given with a value of 1.0).
35026 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35027 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35028 },
35029 "bold": True or False, # True if the text is bold.
35030 "strikethrough": True or False, # True if the text has a strikethrough.
35031 "fontFamily": "A String", # The font family.
35032 "fontSize": 42, # The size of the font.
35033 "italic": True or False, # True if the text is italicized.
35034 "underline": True or False, # True if the text is underlined.
35035 },
35036 },
35037 ],
35038 },
35039 ],
35040 },
35041 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035042 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
35043 # in start_column.
35044 { # Properties about a dimension.
35045 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
35046 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
35047 "hiddenByFilter": True or False, # True if this dimension is being filtered.
35048 # This field is read-only.
35049 },
35050 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080035051 },
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 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
35281 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035282 # CellData.effectiveFormat will not be set if the
35283 # cell's format is equal to this default format.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035284 # This field is read-only.
35285 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035286 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
35287 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035288 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070035289 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035290 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035291 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035292 },
35293 "textDirection": "A String", # The direction of the text in the cell.
35294 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
35295 # When updating padding, every field must be specified.
35296 "top": 42, # The top padding of the cell.
35297 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035298 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035299 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035300 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035301 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035302 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
35303 # for simplicity of conversion to/from color representations in various
35304 # languages over compactness; for example, the fields of this representation
35305 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35306 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35307 # method in iOS; and, with just a little work, it can be easily formatted into
35308 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35309 #
35310 # Example (Java):
35311 #
35312 # import com.google.type.Color;
35313 #
35314 # // ...
35315 # public static java.awt.Color fromProto(Color protocolor) {
35316 # float alpha = protocolor.hasAlpha()
35317 # ? protocolor.getAlpha().getValue()
35318 # : 1.0;
35319 #
35320 # return new java.awt.Color(
35321 # protocolor.getRed(),
35322 # protocolor.getGreen(),
35323 # protocolor.getBlue(),
35324 # alpha);
35325 # }
35326 #
35327 # public static Color toProto(java.awt.Color color) {
35328 # float red = (float) color.getRed();
35329 # float green = (float) color.getGreen();
35330 # float blue = (float) color.getBlue();
35331 # float denominator = 255.0;
35332 # Color.Builder resultBuilder =
35333 # Color
35334 # .newBuilder()
35335 # .setRed(red / denominator)
35336 # .setGreen(green / denominator)
35337 # .setBlue(blue / denominator);
35338 # int alpha = color.getAlpha();
35339 # if (alpha != 255) {
35340 # result.setAlpha(
35341 # FloatValue
35342 # .newBuilder()
35343 # .setValue(((float) alpha) / denominator)
35344 # .build());
35345 # }
35346 # return resultBuilder.build();
35347 # }
35348 # // ...
35349 #
35350 # Example (iOS / Obj-C):
35351 #
35352 # // ...
35353 # static UIColor* fromProto(Color* protocolor) {
35354 # float red = [protocolor red];
35355 # float green = [protocolor green];
35356 # float blue = [protocolor blue];
35357 # FloatValue* alpha_wrapper = [protocolor alpha];
35358 # float alpha = 1.0;
35359 # if (alpha_wrapper != nil) {
35360 # alpha = [alpha_wrapper value];
35361 # }
35362 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35363 # }
35364 #
35365 # static Color* toProto(UIColor* color) {
35366 # CGFloat red, green, blue, alpha;
35367 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35368 # return nil;
35369 # }
35370 # Color* result = [Color alloc] init];
35371 # [result setRed:red];
35372 # [result setGreen:green];
35373 # [result setBlue:blue];
35374 # if (alpha <= 0.9999) {
35375 # [result setAlpha:floatWrapperWithValue(alpha)];
35376 # }
35377 # [result autorelease];
35378 # return result;
35379 # }
35380 # // ...
35381 #
35382 # Example (JavaScript):
35383 #
35384 # // ...
35385 #
35386 # var protoToCssColor = function(rgb_color) {
35387 # var redFrac = rgb_color.red || 0.0;
35388 # var greenFrac = rgb_color.green || 0.0;
35389 # var blueFrac = rgb_color.blue || 0.0;
35390 # var red = Math.floor(redFrac * 255);
35391 # var green = Math.floor(greenFrac * 255);
35392 # var blue = Math.floor(blueFrac * 255);
35393 #
35394 # if (!('alpha' in rgb_color)) {
35395 # return rgbToCssColor_(red, green, blue);
35396 # }
35397 #
35398 # var alphaFrac = rgb_color.alpha.value || 0.0;
35399 # var rgbParams = [red, green, blue].join(',');
35400 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35401 # };
35402 #
35403 # var rgbToCssColor_ = function(red, green, blue) {
35404 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35405 # var hexString = rgbNumber.toString(16);
35406 # var missingZeros = 6 - hexString.length;
35407 # var resultBuilder = ['#'];
35408 # for (var i = 0; i < missingZeros; i++) {
35409 # resultBuilder.push('0');
35410 # }
35411 # resultBuilder.push(hexString);
35412 # return resultBuilder.join('');
35413 # };
35414 #
35415 # // ...
35416 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35417 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35418 # the final pixel color is defined by the equation:
35419 #
35420 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35421 #
35422 # This means that a value of 1.0 corresponds to a solid color, whereas
35423 # a value of 0.0 corresponds to a completely transparent color. This
35424 # uses a wrapper message rather than a simple float scalar so that it is
35425 # possible to distinguish between a default value and the value being unset.
35426 # If omitted, this color object is to be rendered as a solid color
35427 # (as if the alpha value had been explicitly given with a value of 1.0).
35428 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35429 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35430 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070035431 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035432 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
35433 # Absent values indicate that the field isn't specified.
35434 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
35435 # for simplicity of conversion to/from color representations in various
35436 # languages over compactness; for example, the fields of this representation
35437 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35438 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35439 # method in iOS; and, with just a little work, it can be easily formatted into
35440 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35441 #
35442 # Example (Java):
35443 #
35444 # import com.google.type.Color;
35445 #
35446 # // ...
35447 # public static java.awt.Color fromProto(Color protocolor) {
35448 # float alpha = protocolor.hasAlpha()
35449 # ? protocolor.getAlpha().getValue()
35450 # : 1.0;
35451 #
35452 # return new java.awt.Color(
35453 # protocolor.getRed(),
35454 # protocolor.getGreen(),
35455 # protocolor.getBlue(),
35456 # alpha);
35457 # }
35458 #
35459 # public static Color toProto(java.awt.Color color) {
35460 # float red = (float) color.getRed();
35461 # float green = (float) color.getGreen();
35462 # float blue = (float) color.getBlue();
35463 # float denominator = 255.0;
35464 # Color.Builder resultBuilder =
35465 # Color
35466 # .newBuilder()
35467 # .setRed(red / denominator)
35468 # .setGreen(green / denominator)
35469 # .setBlue(blue / denominator);
35470 # int alpha = color.getAlpha();
35471 # if (alpha != 255) {
35472 # result.setAlpha(
35473 # FloatValue
35474 # .newBuilder()
35475 # .setValue(((float) alpha) / denominator)
35476 # .build());
35477 # }
35478 # return resultBuilder.build();
35479 # }
35480 # // ...
35481 #
35482 # Example (iOS / Obj-C):
35483 #
35484 # // ...
35485 # static UIColor* fromProto(Color* protocolor) {
35486 # float red = [protocolor red];
35487 # float green = [protocolor green];
35488 # float blue = [protocolor blue];
35489 # FloatValue* alpha_wrapper = [protocolor alpha];
35490 # float alpha = 1.0;
35491 # if (alpha_wrapper != nil) {
35492 # alpha = [alpha_wrapper value];
35493 # }
35494 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35495 # }
35496 #
35497 # static Color* toProto(UIColor* color) {
35498 # CGFloat red, green, blue, alpha;
35499 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35500 # return nil;
35501 # }
35502 # Color* result = [Color alloc] init];
35503 # [result setRed:red];
35504 # [result setGreen:green];
35505 # [result setBlue:blue];
35506 # if (alpha <= 0.9999) {
35507 # [result setAlpha:floatWrapperWithValue(alpha)];
35508 # }
35509 # [result autorelease];
35510 # return result;
35511 # }
35512 # // ...
35513 #
35514 # Example (JavaScript):
35515 #
35516 # // ...
35517 #
35518 # var protoToCssColor = function(rgb_color) {
35519 # var redFrac = rgb_color.red || 0.0;
35520 # var greenFrac = rgb_color.green || 0.0;
35521 # var blueFrac = rgb_color.blue || 0.0;
35522 # var red = Math.floor(redFrac * 255);
35523 # var green = Math.floor(greenFrac * 255);
35524 # var blue = Math.floor(blueFrac * 255);
35525 #
35526 # if (!('alpha' in rgb_color)) {
35527 # return rgbToCssColor_(red, green, blue);
35528 # }
35529 #
35530 # var alphaFrac = rgb_color.alpha.value || 0.0;
35531 # var rgbParams = [red, green, blue].join(',');
35532 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35533 # };
35534 #
35535 # var rgbToCssColor_ = function(red, green, blue) {
35536 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35537 # var hexString = rgbNumber.toString(16);
35538 # var missingZeros = 6 - hexString.length;
35539 # var resultBuilder = ['#'];
35540 # for (var i = 0; i < missingZeros; i++) {
35541 # resultBuilder.push('0');
35542 # }
35543 # resultBuilder.push(hexString);
35544 # return resultBuilder.join('');
35545 # };
35546 #
35547 # // ...
35548 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35549 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35550 # the final pixel color is defined by the equation:
35551 #
35552 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35553 #
35554 # This means that a value of 1.0 corresponds to a solid color, whereas
35555 # a value of 0.0 corresponds to a completely transparent color. This
35556 # uses a wrapper message rather than a simple float scalar so that it is
35557 # possible to distinguish between a default value and the value being unset.
35558 # If omitted, this color object is to be rendered as a solid color
35559 # (as if the alpha value had been explicitly given with a value of 1.0).
35560 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35561 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35562 },
35563 "bold": True or False, # True if the text is bold.
35564 "strikethrough": True or False, # True if the text has a strikethrough.
35565 "fontFamily": "A String", # The font family.
35566 "fontSize": 42, # The size of the font.
35567 "italic": True or False, # True if the text is italicized.
35568 "underline": True or False, # True if the text is underlined.
35569 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040035570 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035571 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
35572 "borders": { # The borders of the cell. # The borders of the cell.
35573 "top": { # A border along a cell. # The top border of the cell.
35574 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35575 # for simplicity of conversion to/from color representations in various
35576 # languages over compactness; for example, the fields of this representation
35577 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35578 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35579 # method in iOS; and, with just a little work, it can be easily formatted into
35580 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35581 #
35582 # Example (Java):
35583 #
35584 # import com.google.type.Color;
35585 #
35586 # // ...
35587 # public static java.awt.Color fromProto(Color protocolor) {
35588 # float alpha = protocolor.hasAlpha()
35589 # ? protocolor.getAlpha().getValue()
35590 # : 1.0;
35591 #
35592 # return new java.awt.Color(
35593 # protocolor.getRed(),
35594 # protocolor.getGreen(),
35595 # protocolor.getBlue(),
35596 # alpha);
35597 # }
35598 #
35599 # public static Color toProto(java.awt.Color color) {
35600 # float red = (float) color.getRed();
35601 # float green = (float) color.getGreen();
35602 # float blue = (float) color.getBlue();
35603 # float denominator = 255.0;
35604 # Color.Builder resultBuilder =
35605 # Color
35606 # .newBuilder()
35607 # .setRed(red / denominator)
35608 # .setGreen(green / denominator)
35609 # .setBlue(blue / denominator);
35610 # int alpha = color.getAlpha();
35611 # if (alpha != 255) {
35612 # result.setAlpha(
35613 # FloatValue
35614 # .newBuilder()
35615 # .setValue(((float) alpha) / denominator)
35616 # .build());
35617 # }
35618 # return resultBuilder.build();
35619 # }
35620 # // ...
35621 #
35622 # Example (iOS / Obj-C):
35623 #
35624 # // ...
35625 # static UIColor* fromProto(Color* protocolor) {
35626 # float red = [protocolor red];
35627 # float green = [protocolor green];
35628 # float blue = [protocolor blue];
35629 # FloatValue* alpha_wrapper = [protocolor alpha];
35630 # float alpha = 1.0;
35631 # if (alpha_wrapper != nil) {
35632 # alpha = [alpha_wrapper value];
35633 # }
35634 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35635 # }
35636 #
35637 # static Color* toProto(UIColor* color) {
35638 # CGFloat red, green, blue, alpha;
35639 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35640 # return nil;
35641 # }
35642 # Color* result = [Color alloc] init];
35643 # [result setRed:red];
35644 # [result setGreen:green];
35645 # [result setBlue:blue];
35646 # if (alpha <= 0.9999) {
35647 # [result setAlpha:floatWrapperWithValue(alpha)];
35648 # }
35649 # [result autorelease];
35650 # return result;
35651 # }
35652 # // ...
35653 #
35654 # Example (JavaScript):
35655 #
35656 # // ...
35657 #
35658 # var protoToCssColor = function(rgb_color) {
35659 # var redFrac = rgb_color.red || 0.0;
35660 # var greenFrac = rgb_color.green || 0.0;
35661 # var blueFrac = rgb_color.blue || 0.0;
35662 # var red = Math.floor(redFrac * 255);
35663 # var green = Math.floor(greenFrac * 255);
35664 # var blue = Math.floor(blueFrac * 255);
35665 #
35666 # if (!('alpha' in rgb_color)) {
35667 # return rgbToCssColor_(red, green, blue);
35668 # }
35669 #
35670 # var alphaFrac = rgb_color.alpha.value || 0.0;
35671 # var rgbParams = [red, green, blue].join(',');
35672 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35673 # };
35674 #
35675 # var rgbToCssColor_ = function(red, green, blue) {
35676 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35677 # var hexString = rgbNumber.toString(16);
35678 # var missingZeros = 6 - hexString.length;
35679 # var resultBuilder = ['#'];
35680 # for (var i = 0; i < missingZeros; i++) {
35681 # resultBuilder.push('0');
35682 # }
35683 # resultBuilder.push(hexString);
35684 # return resultBuilder.join('');
35685 # };
35686 #
35687 # // ...
35688 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35689 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35690 # the final pixel color is defined by the equation:
35691 #
35692 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35693 #
35694 # This means that a value of 1.0 corresponds to a solid color, whereas
35695 # a value of 0.0 corresponds to a completely transparent color. This
35696 # uses a wrapper message rather than a simple float scalar so that it is
35697 # possible to distinguish between a default value and the value being unset.
35698 # If omitted, this color object is to be rendered as a solid color
35699 # (as if the alpha value had been explicitly given with a value of 1.0).
35700 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35701 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35702 },
35703 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035704 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035705 "style": "A String", # The style of the border.
35706 },
35707 "right": { # A border along a cell. # The right border of the cell.
35708 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35709 # for simplicity of conversion to/from color representations in various
35710 # languages over compactness; for example, the fields of this representation
35711 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35712 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35713 # method in iOS; and, with just a little work, it can be easily formatted into
35714 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35715 #
35716 # Example (Java):
35717 #
35718 # import com.google.type.Color;
35719 #
35720 # // ...
35721 # public static java.awt.Color fromProto(Color protocolor) {
35722 # float alpha = protocolor.hasAlpha()
35723 # ? protocolor.getAlpha().getValue()
35724 # : 1.0;
35725 #
35726 # return new java.awt.Color(
35727 # protocolor.getRed(),
35728 # protocolor.getGreen(),
35729 # protocolor.getBlue(),
35730 # alpha);
35731 # }
35732 #
35733 # public static Color toProto(java.awt.Color color) {
35734 # float red = (float) color.getRed();
35735 # float green = (float) color.getGreen();
35736 # float blue = (float) color.getBlue();
35737 # float denominator = 255.0;
35738 # Color.Builder resultBuilder =
35739 # Color
35740 # .newBuilder()
35741 # .setRed(red / denominator)
35742 # .setGreen(green / denominator)
35743 # .setBlue(blue / denominator);
35744 # int alpha = color.getAlpha();
35745 # if (alpha != 255) {
35746 # result.setAlpha(
35747 # FloatValue
35748 # .newBuilder()
35749 # .setValue(((float) alpha) / denominator)
35750 # .build());
35751 # }
35752 # return resultBuilder.build();
35753 # }
35754 # // ...
35755 #
35756 # Example (iOS / Obj-C):
35757 #
35758 # // ...
35759 # static UIColor* fromProto(Color* protocolor) {
35760 # float red = [protocolor red];
35761 # float green = [protocolor green];
35762 # float blue = [protocolor blue];
35763 # FloatValue* alpha_wrapper = [protocolor alpha];
35764 # float alpha = 1.0;
35765 # if (alpha_wrapper != nil) {
35766 # alpha = [alpha_wrapper value];
35767 # }
35768 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35769 # }
35770 #
35771 # static Color* toProto(UIColor* color) {
35772 # CGFloat red, green, blue, alpha;
35773 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35774 # return nil;
35775 # }
35776 # Color* result = [Color alloc] init];
35777 # [result setRed:red];
35778 # [result setGreen:green];
35779 # [result setBlue:blue];
35780 # if (alpha <= 0.9999) {
35781 # [result setAlpha:floatWrapperWithValue(alpha)];
35782 # }
35783 # [result autorelease];
35784 # return result;
35785 # }
35786 # // ...
35787 #
35788 # Example (JavaScript):
35789 #
35790 # // ...
35791 #
35792 # var protoToCssColor = function(rgb_color) {
35793 # var redFrac = rgb_color.red || 0.0;
35794 # var greenFrac = rgb_color.green || 0.0;
35795 # var blueFrac = rgb_color.blue || 0.0;
35796 # var red = Math.floor(redFrac * 255);
35797 # var green = Math.floor(greenFrac * 255);
35798 # var blue = Math.floor(blueFrac * 255);
35799 #
35800 # if (!('alpha' in rgb_color)) {
35801 # return rgbToCssColor_(red, green, blue);
35802 # }
35803 #
35804 # var alphaFrac = rgb_color.alpha.value || 0.0;
35805 # var rgbParams = [red, green, blue].join(',');
35806 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35807 # };
35808 #
35809 # var rgbToCssColor_ = function(red, green, blue) {
35810 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35811 # var hexString = rgbNumber.toString(16);
35812 # var missingZeros = 6 - hexString.length;
35813 # var resultBuilder = ['#'];
35814 # for (var i = 0; i < missingZeros; i++) {
35815 # resultBuilder.push('0');
35816 # }
35817 # resultBuilder.push(hexString);
35818 # return resultBuilder.join('');
35819 # };
35820 #
35821 # // ...
35822 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35823 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35824 # the final pixel color is defined by the equation:
35825 #
35826 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35827 #
35828 # This means that a value of 1.0 corresponds to a solid color, whereas
35829 # a value of 0.0 corresponds to a completely transparent color. This
35830 # uses a wrapper message rather than a simple float scalar so that it is
35831 # possible to distinguish between a default value and the value being unset.
35832 # If omitted, this color object is to be rendered as a solid color
35833 # (as if the alpha value had been explicitly given with a value of 1.0).
35834 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35835 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35836 },
35837 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035838 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035839 "style": "A String", # The style of the border.
35840 },
35841 "bottom": { # A border along a cell. # The bottom border of the cell.
35842 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35843 # for simplicity of conversion to/from color representations in various
35844 # languages over compactness; for example, the fields of this representation
35845 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35846 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35847 # method in iOS; and, with just a little work, it can be easily formatted into
35848 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35849 #
35850 # Example (Java):
35851 #
35852 # import com.google.type.Color;
35853 #
35854 # // ...
35855 # public static java.awt.Color fromProto(Color protocolor) {
35856 # float alpha = protocolor.hasAlpha()
35857 # ? protocolor.getAlpha().getValue()
35858 # : 1.0;
35859 #
35860 # return new java.awt.Color(
35861 # protocolor.getRed(),
35862 # protocolor.getGreen(),
35863 # protocolor.getBlue(),
35864 # alpha);
35865 # }
35866 #
35867 # public static Color toProto(java.awt.Color color) {
35868 # float red = (float) color.getRed();
35869 # float green = (float) color.getGreen();
35870 # float blue = (float) color.getBlue();
35871 # float denominator = 255.0;
35872 # Color.Builder resultBuilder =
35873 # Color
35874 # .newBuilder()
35875 # .setRed(red / denominator)
35876 # .setGreen(green / denominator)
35877 # .setBlue(blue / denominator);
35878 # int alpha = color.getAlpha();
35879 # if (alpha != 255) {
35880 # result.setAlpha(
35881 # FloatValue
35882 # .newBuilder()
35883 # .setValue(((float) alpha) / denominator)
35884 # .build());
35885 # }
35886 # return resultBuilder.build();
35887 # }
35888 # // ...
35889 #
35890 # Example (iOS / Obj-C):
35891 #
35892 # // ...
35893 # static UIColor* fromProto(Color* protocolor) {
35894 # float red = [protocolor red];
35895 # float green = [protocolor green];
35896 # float blue = [protocolor blue];
35897 # FloatValue* alpha_wrapper = [protocolor alpha];
35898 # float alpha = 1.0;
35899 # if (alpha_wrapper != nil) {
35900 # alpha = [alpha_wrapper value];
35901 # }
35902 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
35903 # }
35904 #
35905 # static Color* toProto(UIColor* color) {
35906 # CGFloat red, green, blue, alpha;
35907 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
35908 # return nil;
35909 # }
35910 # Color* result = [Color alloc] init];
35911 # [result setRed:red];
35912 # [result setGreen:green];
35913 # [result setBlue:blue];
35914 # if (alpha <= 0.9999) {
35915 # [result setAlpha:floatWrapperWithValue(alpha)];
35916 # }
35917 # [result autorelease];
35918 # return result;
35919 # }
35920 # // ...
35921 #
35922 # Example (JavaScript):
35923 #
35924 # // ...
35925 #
35926 # var protoToCssColor = function(rgb_color) {
35927 # var redFrac = rgb_color.red || 0.0;
35928 # var greenFrac = rgb_color.green || 0.0;
35929 # var blueFrac = rgb_color.blue || 0.0;
35930 # var red = Math.floor(redFrac * 255);
35931 # var green = Math.floor(greenFrac * 255);
35932 # var blue = Math.floor(blueFrac * 255);
35933 #
35934 # if (!('alpha' in rgb_color)) {
35935 # return rgbToCssColor_(red, green, blue);
35936 # }
35937 #
35938 # var alphaFrac = rgb_color.alpha.value || 0.0;
35939 # var rgbParams = [red, green, blue].join(',');
35940 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
35941 # };
35942 #
35943 # var rgbToCssColor_ = function(red, green, blue) {
35944 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
35945 # var hexString = rgbNumber.toString(16);
35946 # var missingZeros = 6 - hexString.length;
35947 # var resultBuilder = ['#'];
35948 # for (var i = 0; i < missingZeros; i++) {
35949 # resultBuilder.push('0');
35950 # }
35951 # resultBuilder.push(hexString);
35952 # return resultBuilder.join('');
35953 # };
35954 #
35955 # // ...
35956 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
35957 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
35958 # the final pixel color is defined by the equation:
35959 #
35960 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
35961 #
35962 # This means that a value of 1.0 corresponds to a solid color, whereas
35963 # a value of 0.0 corresponds to a completely transparent color. This
35964 # uses a wrapper message rather than a simple float scalar so that it is
35965 # possible to distinguish between a default value and the value being unset.
35966 # If omitted, this color object is to be rendered as a solid color
35967 # (as if the alpha value had been explicitly given with a value of 1.0).
35968 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
35969 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
35970 },
35971 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070035972 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070035973 "style": "A String", # The style of the border.
35974 },
35975 "left": { # A border along a cell. # The left border of the cell.
35976 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
35977 # for simplicity of conversion to/from color representations in various
35978 # languages over compactness; for example, the fields of this representation
35979 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
35980 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
35981 # method in iOS; and, with just a little work, it can be easily formatted into
35982 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
35983 #
35984 # Example (Java):
35985 #
35986 # import com.google.type.Color;
35987 #
35988 # // ...
35989 # public static java.awt.Color fromProto(Color protocolor) {
35990 # float alpha = protocolor.hasAlpha()
35991 # ? protocolor.getAlpha().getValue()
35992 # : 1.0;
35993 #
35994 # return new java.awt.Color(
35995 # protocolor.getRed(),
35996 # protocolor.getGreen(),
35997 # protocolor.getBlue(),
35998 # alpha);
35999 # }
36000 #
36001 # public static Color toProto(java.awt.Color color) {
36002 # float red = (float) color.getRed();
36003 # float green = (float) color.getGreen();
36004 # float blue = (float) color.getBlue();
36005 # float denominator = 255.0;
36006 # Color.Builder resultBuilder =
36007 # Color
36008 # .newBuilder()
36009 # .setRed(red / denominator)
36010 # .setGreen(green / denominator)
36011 # .setBlue(blue / denominator);
36012 # int alpha = color.getAlpha();
36013 # if (alpha != 255) {
36014 # result.setAlpha(
36015 # FloatValue
36016 # .newBuilder()
36017 # .setValue(((float) alpha) / denominator)
36018 # .build());
36019 # }
36020 # return resultBuilder.build();
36021 # }
36022 # // ...
36023 #
36024 # Example (iOS / Obj-C):
36025 #
36026 # // ...
36027 # static UIColor* fromProto(Color* protocolor) {
36028 # float red = [protocolor red];
36029 # float green = [protocolor green];
36030 # float blue = [protocolor blue];
36031 # FloatValue* alpha_wrapper = [protocolor alpha];
36032 # float alpha = 1.0;
36033 # if (alpha_wrapper != nil) {
36034 # alpha = [alpha_wrapper value];
36035 # }
36036 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36037 # }
36038 #
36039 # static Color* toProto(UIColor* color) {
36040 # CGFloat red, green, blue, alpha;
36041 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36042 # return nil;
36043 # }
36044 # Color* result = [Color alloc] init];
36045 # [result setRed:red];
36046 # [result setGreen:green];
36047 # [result setBlue:blue];
36048 # if (alpha <= 0.9999) {
36049 # [result setAlpha:floatWrapperWithValue(alpha)];
36050 # }
36051 # [result autorelease];
36052 # return result;
36053 # }
36054 # // ...
36055 #
36056 # Example (JavaScript):
36057 #
36058 # // ...
36059 #
36060 # var protoToCssColor = function(rgb_color) {
36061 # var redFrac = rgb_color.red || 0.0;
36062 # var greenFrac = rgb_color.green || 0.0;
36063 # var blueFrac = rgb_color.blue || 0.0;
36064 # var red = Math.floor(redFrac * 255);
36065 # var green = Math.floor(greenFrac * 255);
36066 # var blue = Math.floor(blueFrac * 255);
36067 #
36068 # if (!('alpha' in rgb_color)) {
36069 # return rgbToCssColor_(red, green, blue);
36070 # }
36071 #
36072 # var alphaFrac = rgb_color.alpha.value || 0.0;
36073 # var rgbParams = [red, green, blue].join(',');
36074 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36075 # };
36076 #
36077 # var rgbToCssColor_ = function(red, green, blue) {
36078 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36079 # var hexString = rgbNumber.toString(16);
36080 # var missingZeros = 6 - hexString.length;
36081 # var resultBuilder = ['#'];
36082 # for (var i = 0; i < missingZeros; i++) {
36083 # resultBuilder.push('0');
36084 # }
36085 # resultBuilder.push(hexString);
36086 # return resultBuilder.join('');
36087 # };
36088 #
36089 # // ...
36090 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36091 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36092 # the final pixel color is defined by the equation:
36093 #
36094 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36095 #
36096 # This means that a value of 1.0 corresponds to a solid color, whereas
36097 # a value of 0.0 corresponds to a completely transparent color. This
36098 # uses a wrapper message rather than a simple float scalar so that it is
36099 # possible to distinguish between a default value and the value being unset.
36100 # If omitted, this color object is to be rendered as a solid color
36101 # (as if the alpha value had been explicitly given with a value of 1.0).
36102 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36103 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36104 },
36105 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036106 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036107 "style": "A String", # The style of the border.
36108 },
36109 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036110 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
36111 "angle": 42, # The angle between the standard orientation and the desired orientation.
36112 # Measured in degrees. Valid values are between -90 and 90. Positive
36113 # angles are angled upwards, negative are angled downwards.
36114 #
36115 # Note: For LTR text direction positive angles are in the counterclockwise
36116 # direction, whereas for RTL they are in the clockwise direction
36117 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
36118 # characters is unchanged.
36119 # For example:
36120 #
36121 # | V |
36122 # | e |
36123 # | r |
36124 # | t |
36125 # | i |
36126 # | c |
36127 # | a |
36128 # | l |
36129 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036130 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040036131 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
36132 # calculation. Absence of this field means that circular references will
36133 # result in calculation errors.
36134 # calculation.
36135 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
36136 # less than this threshold value, the calculation rounds stop.
36137 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
36138 # rounds to perform.
36139 },
36140 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
36141 # `America/New_York`. If the time zone isn't recognized, this may
36142 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036143 },
36144 "sheets": [ # The sheets that are part of a spreadsheet.
36145 { # A sheet in a spreadsheet.
36146 "conditionalFormats": [ # The conditional format rules in this sheet.
36147 { # A rule describing a conditional format.
36148 "ranges": [ # The ranges that will be formatted if the condition is true.
36149 # All the ranges must be on the same grid.
36150 { # A range on a sheet.
36151 # All indexes are zero-based.
36152 # Indexes are half open, e.g the start index is inclusive
36153 # and the end index is exclusive -- [start_index, end_index).
36154 # Missing indexes indicate the range is unbounded on that side.
36155 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036156 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036157 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036158 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036159 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036160 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036161 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036162 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036163 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036164 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036165 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036166 # `Sheet1!A:B == sheet_id: 0,
36167 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036168 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036169 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036170 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036171 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036172 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070036173 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036174 #
36175 # The start index must always be less than or equal to the end index.
36176 # If the start index equals the end index, then the range is empty.
36177 # Empty ranges are typically not meaningful and are usually rendered in the
36178 # UI as `#REF!`.
36179 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040036504 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036505 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
36506 "borders": { # The borders of the cell. # The borders of the cell.
36507 "top": { # A border along a cell. # The top border of the cell.
36508 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36509 # for simplicity of conversion to/from color representations in various
36510 # languages over compactness; for example, the fields of this representation
36511 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36512 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36513 # method in iOS; and, with just a little work, it can be easily formatted into
36514 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36515 #
36516 # Example (Java):
36517 #
36518 # import com.google.type.Color;
36519 #
36520 # // ...
36521 # public static java.awt.Color fromProto(Color protocolor) {
36522 # float alpha = protocolor.hasAlpha()
36523 # ? protocolor.getAlpha().getValue()
36524 # : 1.0;
36525 #
36526 # return new java.awt.Color(
36527 # protocolor.getRed(),
36528 # protocolor.getGreen(),
36529 # protocolor.getBlue(),
36530 # alpha);
36531 # }
36532 #
36533 # public static Color toProto(java.awt.Color color) {
36534 # float red = (float) color.getRed();
36535 # float green = (float) color.getGreen();
36536 # float blue = (float) color.getBlue();
36537 # float denominator = 255.0;
36538 # Color.Builder resultBuilder =
36539 # Color
36540 # .newBuilder()
36541 # .setRed(red / denominator)
36542 # .setGreen(green / denominator)
36543 # .setBlue(blue / denominator);
36544 # int alpha = color.getAlpha();
36545 # if (alpha != 255) {
36546 # result.setAlpha(
36547 # FloatValue
36548 # .newBuilder()
36549 # .setValue(((float) alpha) / denominator)
36550 # .build());
36551 # }
36552 # return resultBuilder.build();
36553 # }
36554 # // ...
36555 #
36556 # Example (iOS / Obj-C):
36557 #
36558 # // ...
36559 # static UIColor* fromProto(Color* protocolor) {
36560 # float red = [protocolor red];
36561 # float green = [protocolor green];
36562 # float blue = [protocolor blue];
36563 # FloatValue* alpha_wrapper = [protocolor alpha];
36564 # float alpha = 1.0;
36565 # if (alpha_wrapper != nil) {
36566 # alpha = [alpha_wrapper value];
36567 # }
36568 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36569 # }
36570 #
36571 # static Color* toProto(UIColor* color) {
36572 # CGFloat red, green, blue, alpha;
36573 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36574 # return nil;
36575 # }
36576 # Color* result = [Color alloc] init];
36577 # [result setRed:red];
36578 # [result setGreen:green];
36579 # [result setBlue:blue];
36580 # if (alpha <= 0.9999) {
36581 # [result setAlpha:floatWrapperWithValue(alpha)];
36582 # }
36583 # [result autorelease];
36584 # return result;
36585 # }
36586 # // ...
36587 #
36588 # Example (JavaScript):
36589 #
36590 # // ...
36591 #
36592 # var protoToCssColor = function(rgb_color) {
36593 # var redFrac = rgb_color.red || 0.0;
36594 # var greenFrac = rgb_color.green || 0.0;
36595 # var blueFrac = rgb_color.blue || 0.0;
36596 # var red = Math.floor(redFrac * 255);
36597 # var green = Math.floor(greenFrac * 255);
36598 # var blue = Math.floor(blueFrac * 255);
36599 #
36600 # if (!('alpha' in rgb_color)) {
36601 # return rgbToCssColor_(red, green, blue);
36602 # }
36603 #
36604 # var alphaFrac = rgb_color.alpha.value || 0.0;
36605 # var rgbParams = [red, green, blue].join(',');
36606 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36607 # };
36608 #
36609 # var rgbToCssColor_ = function(red, green, blue) {
36610 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36611 # var hexString = rgbNumber.toString(16);
36612 # var missingZeros = 6 - hexString.length;
36613 # var resultBuilder = ['#'];
36614 # for (var i = 0; i < missingZeros; i++) {
36615 # resultBuilder.push('0');
36616 # }
36617 # resultBuilder.push(hexString);
36618 # return resultBuilder.join('');
36619 # };
36620 #
36621 # // ...
36622 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36623 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36624 # the final pixel color is defined by the equation:
36625 #
36626 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36627 #
36628 # This means that a value of 1.0 corresponds to a solid color, whereas
36629 # a value of 0.0 corresponds to a completely transparent color. This
36630 # uses a wrapper message rather than a simple float scalar so that it is
36631 # possible to distinguish between a default value and the value being unset.
36632 # If omitted, this color object is to be rendered as a solid color
36633 # (as if the alpha value had been explicitly given with a value of 1.0).
36634 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36635 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36636 },
36637 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036638 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036639 "style": "A String", # The style of the border.
36640 },
36641 "right": { # A border along a cell. # The right border of the cell.
36642 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36643 # for simplicity of conversion to/from color representations in various
36644 # languages over compactness; for example, the fields of this representation
36645 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36646 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36647 # method in iOS; and, with just a little work, it can be easily formatted into
36648 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36649 #
36650 # Example (Java):
36651 #
36652 # import com.google.type.Color;
36653 #
36654 # // ...
36655 # public static java.awt.Color fromProto(Color protocolor) {
36656 # float alpha = protocolor.hasAlpha()
36657 # ? protocolor.getAlpha().getValue()
36658 # : 1.0;
36659 #
36660 # return new java.awt.Color(
36661 # protocolor.getRed(),
36662 # protocolor.getGreen(),
36663 # protocolor.getBlue(),
36664 # alpha);
36665 # }
36666 #
36667 # public static Color toProto(java.awt.Color color) {
36668 # float red = (float) color.getRed();
36669 # float green = (float) color.getGreen();
36670 # float blue = (float) color.getBlue();
36671 # float denominator = 255.0;
36672 # Color.Builder resultBuilder =
36673 # Color
36674 # .newBuilder()
36675 # .setRed(red / denominator)
36676 # .setGreen(green / denominator)
36677 # .setBlue(blue / denominator);
36678 # int alpha = color.getAlpha();
36679 # if (alpha != 255) {
36680 # result.setAlpha(
36681 # FloatValue
36682 # .newBuilder()
36683 # .setValue(((float) alpha) / denominator)
36684 # .build());
36685 # }
36686 # return resultBuilder.build();
36687 # }
36688 # // ...
36689 #
36690 # Example (iOS / Obj-C):
36691 #
36692 # // ...
36693 # static UIColor* fromProto(Color* protocolor) {
36694 # float red = [protocolor red];
36695 # float green = [protocolor green];
36696 # float blue = [protocolor blue];
36697 # FloatValue* alpha_wrapper = [protocolor alpha];
36698 # float alpha = 1.0;
36699 # if (alpha_wrapper != nil) {
36700 # alpha = [alpha_wrapper value];
36701 # }
36702 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36703 # }
36704 #
36705 # static Color* toProto(UIColor* color) {
36706 # CGFloat red, green, blue, alpha;
36707 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36708 # return nil;
36709 # }
36710 # Color* result = [Color alloc] init];
36711 # [result setRed:red];
36712 # [result setGreen:green];
36713 # [result setBlue:blue];
36714 # if (alpha <= 0.9999) {
36715 # [result setAlpha:floatWrapperWithValue(alpha)];
36716 # }
36717 # [result autorelease];
36718 # return result;
36719 # }
36720 # // ...
36721 #
36722 # Example (JavaScript):
36723 #
36724 # // ...
36725 #
36726 # var protoToCssColor = function(rgb_color) {
36727 # var redFrac = rgb_color.red || 0.0;
36728 # var greenFrac = rgb_color.green || 0.0;
36729 # var blueFrac = rgb_color.blue || 0.0;
36730 # var red = Math.floor(redFrac * 255);
36731 # var green = Math.floor(greenFrac * 255);
36732 # var blue = Math.floor(blueFrac * 255);
36733 #
36734 # if (!('alpha' in rgb_color)) {
36735 # return rgbToCssColor_(red, green, blue);
36736 # }
36737 #
36738 # var alphaFrac = rgb_color.alpha.value || 0.0;
36739 # var rgbParams = [red, green, blue].join(',');
36740 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36741 # };
36742 #
36743 # var rgbToCssColor_ = function(red, green, blue) {
36744 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36745 # var hexString = rgbNumber.toString(16);
36746 # var missingZeros = 6 - hexString.length;
36747 # var resultBuilder = ['#'];
36748 # for (var i = 0; i < missingZeros; i++) {
36749 # resultBuilder.push('0');
36750 # }
36751 # resultBuilder.push(hexString);
36752 # return resultBuilder.join('');
36753 # };
36754 #
36755 # // ...
36756 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36757 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36758 # the final pixel color is defined by the equation:
36759 #
36760 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36761 #
36762 # This means that a value of 1.0 corresponds to a solid color, whereas
36763 # a value of 0.0 corresponds to a completely transparent color. This
36764 # uses a wrapper message rather than a simple float scalar so that it is
36765 # possible to distinguish between a default value and the value being unset.
36766 # If omitted, this color object is to be rendered as a solid color
36767 # (as if the alpha value had been explicitly given with a value of 1.0).
36768 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36769 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36770 },
36771 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036772 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036773 "style": "A String", # The style of the border.
36774 },
36775 "bottom": { # A border along a cell. # The bottom border of the cell.
36776 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36777 # for simplicity of conversion to/from color representations in various
36778 # languages over compactness; for example, the fields of this representation
36779 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36780 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36781 # method in iOS; and, with just a little work, it can be easily formatted into
36782 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36783 #
36784 # Example (Java):
36785 #
36786 # import com.google.type.Color;
36787 #
36788 # // ...
36789 # public static java.awt.Color fromProto(Color protocolor) {
36790 # float alpha = protocolor.hasAlpha()
36791 # ? protocolor.getAlpha().getValue()
36792 # : 1.0;
36793 #
36794 # return new java.awt.Color(
36795 # protocolor.getRed(),
36796 # protocolor.getGreen(),
36797 # protocolor.getBlue(),
36798 # alpha);
36799 # }
36800 #
36801 # public static Color toProto(java.awt.Color color) {
36802 # float red = (float) color.getRed();
36803 # float green = (float) color.getGreen();
36804 # float blue = (float) color.getBlue();
36805 # float denominator = 255.0;
36806 # Color.Builder resultBuilder =
36807 # Color
36808 # .newBuilder()
36809 # .setRed(red / denominator)
36810 # .setGreen(green / denominator)
36811 # .setBlue(blue / denominator);
36812 # int alpha = color.getAlpha();
36813 # if (alpha != 255) {
36814 # result.setAlpha(
36815 # FloatValue
36816 # .newBuilder()
36817 # .setValue(((float) alpha) / denominator)
36818 # .build());
36819 # }
36820 # return resultBuilder.build();
36821 # }
36822 # // ...
36823 #
36824 # Example (iOS / Obj-C):
36825 #
36826 # // ...
36827 # static UIColor* fromProto(Color* protocolor) {
36828 # float red = [protocolor red];
36829 # float green = [protocolor green];
36830 # float blue = [protocolor blue];
36831 # FloatValue* alpha_wrapper = [protocolor alpha];
36832 # float alpha = 1.0;
36833 # if (alpha_wrapper != nil) {
36834 # alpha = [alpha_wrapper value];
36835 # }
36836 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36837 # }
36838 #
36839 # static Color* toProto(UIColor* color) {
36840 # CGFloat red, green, blue, alpha;
36841 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36842 # return nil;
36843 # }
36844 # Color* result = [Color alloc] init];
36845 # [result setRed:red];
36846 # [result setGreen:green];
36847 # [result setBlue:blue];
36848 # if (alpha <= 0.9999) {
36849 # [result setAlpha:floatWrapperWithValue(alpha)];
36850 # }
36851 # [result autorelease];
36852 # return result;
36853 # }
36854 # // ...
36855 #
36856 # Example (JavaScript):
36857 #
36858 # // ...
36859 #
36860 # var protoToCssColor = function(rgb_color) {
36861 # var redFrac = rgb_color.red || 0.0;
36862 # var greenFrac = rgb_color.green || 0.0;
36863 # var blueFrac = rgb_color.blue || 0.0;
36864 # var red = Math.floor(redFrac * 255);
36865 # var green = Math.floor(greenFrac * 255);
36866 # var blue = Math.floor(blueFrac * 255);
36867 #
36868 # if (!('alpha' in rgb_color)) {
36869 # return rgbToCssColor_(red, green, blue);
36870 # }
36871 #
36872 # var alphaFrac = rgb_color.alpha.value || 0.0;
36873 # var rgbParams = [red, green, blue].join(',');
36874 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
36875 # };
36876 #
36877 # var rgbToCssColor_ = function(red, green, blue) {
36878 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
36879 # var hexString = rgbNumber.toString(16);
36880 # var missingZeros = 6 - hexString.length;
36881 # var resultBuilder = ['#'];
36882 # for (var i = 0; i < missingZeros; i++) {
36883 # resultBuilder.push('0');
36884 # }
36885 # resultBuilder.push(hexString);
36886 # return resultBuilder.join('');
36887 # };
36888 #
36889 # // ...
36890 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
36891 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
36892 # the final pixel color is defined by the equation:
36893 #
36894 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
36895 #
36896 # This means that a value of 1.0 corresponds to a solid color, whereas
36897 # a value of 0.0 corresponds to a completely transparent color. This
36898 # uses a wrapper message rather than a simple float scalar so that it is
36899 # possible to distinguish between a default value and the value being unset.
36900 # If omitted, this color object is to be rendered as a solid color
36901 # (as if the alpha value had been explicitly given with a value of 1.0).
36902 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
36903 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
36904 },
36905 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070036906 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070036907 "style": "A String", # The style of the border.
36908 },
36909 "left": { # A border along a cell. # The left border of the cell.
36910 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
36911 # for simplicity of conversion to/from color representations in various
36912 # languages over compactness; for example, the fields of this representation
36913 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
36914 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
36915 # method in iOS; and, with just a little work, it can be easily formatted into
36916 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
36917 #
36918 # Example (Java):
36919 #
36920 # import com.google.type.Color;
36921 #
36922 # // ...
36923 # public static java.awt.Color fromProto(Color protocolor) {
36924 # float alpha = protocolor.hasAlpha()
36925 # ? protocolor.getAlpha().getValue()
36926 # : 1.0;
36927 #
36928 # return new java.awt.Color(
36929 # protocolor.getRed(),
36930 # protocolor.getGreen(),
36931 # protocolor.getBlue(),
36932 # alpha);
36933 # }
36934 #
36935 # public static Color toProto(java.awt.Color color) {
36936 # float red = (float) color.getRed();
36937 # float green = (float) color.getGreen();
36938 # float blue = (float) color.getBlue();
36939 # float denominator = 255.0;
36940 # Color.Builder resultBuilder =
36941 # Color
36942 # .newBuilder()
36943 # .setRed(red / denominator)
36944 # .setGreen(green / denominator)
36945 # .setBlue(blue / denominator);
36946 # int alpha = color.getAlpha();
36947 # if (alpha != 255) {
36948 # result.setAlpha(
36949 # FloatValue
36950 # .newBuilder()
36951 # .setValue(((float) alpha) / denominator)
36952 # .build());
36953 # }
36954 # return resultBuilder.build();
36955 # }
36956 # // ...
36957 #
36958 # Example (iOS / Obj-C):
36959 #
36960 # // ...
36961 # static UIColor* fromProto(Color* protocolor) {
36962 # float red = [protocolor red];
36963 # float green = [protocolor green];
36964 # float blue = [protocolor blue];
36965 # FloatValue* alpha_wrapper = [protocolor alpha];
36966 # float alpha = 1.0;
36967 # if (alpha_wrapper != nil) {
36968 # alpha = [alpha_wrapper value];
36969 # }
36970 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
36971 # }
36972 #
36973 # static Color* toProto(UIColor* color) {
36974 # CGFloat red, green, blue, alpha;
36975 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
36976 # return nil;
36977 # }
36978 # Color* result = [Color alloc] init];
36979 # [result setRed:red];
36980 # [result setGreen:green];
36981 # [result setBlue:blue];
36982 # if (alpha <= 0.9999) {
36983 # [result setAlpha:floatWrapperWithValue(alpha)];
36984 # }
36985 # [result autorelease];
36986 # return result;
36987 # }
36988 # // ...
36989 #
36990 # Example (JavaScript):
36991 #
36992 # // ...
36993 #
36994 # var protoToCssColor = function(rgb_color) {
36995 # var redFrac = rgb_color.red || 0.0;
36996 # var greenFrac = rgb_color.green || 0.0;
36997 # var blueFrac = rgb_color.blue || 0.0;
36998 # var red = Math.floor(redFrac * 255);
36999 # var green = Math.floor(greenFrac * 255);
37000 # var blue = Math.floor(blueFrac * 255);
37001 #
37002 # if (!('alpha' in rgb_color)) {
37003 # return rgbToCssColor_(red, green, blue);
37004 # }
37005 #
37006 # var alphaFrac = rgb_color.alpha.value || 0.0;
37007 # var rgbParams = [red, green, blue].join(',');
37008 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
37009 # };
37010 #
37011 # var rgbToCssColor_ = function(red, green, blue) {
37012 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
37013 # var hexString = rgbNumber.toString(16);
37014 # var missingZeros = 6 - hexString.length;
37015 # var resultBuilder = ['#'];
37016 # for (var i = 0; i < missingZeros; i++) {
37017 # resultBuilder.push('0');
37018 # }
37019 # resultBuilder.push(hexString);
37020 # return resultBuilder.join('');
37021 # };
37022 #
37023 # // ...
37024 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
37025 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
37026 # the final pixel color is defined by the equation:
37027 #
37028 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
37029 #
37030 # This means that a value of 1.0 corresponds to a solid color, whereas
37031 # a value of 0.0 corresponds to a completely transparent color. This
37032 # uses a wrapper message rather than a simple float scalar so that it is
37033 # possible to distinguish between a default value and the value being unset.
37034 # If omitted, this color object is to be rendered as a solid color
37035 # (as if the alpha value had been explicitly given with a value of 1.0).
37036 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
37037 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
37038 },
37039 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070037040 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070037041 "style": "A String", # The style of the border.
37042 },
37043 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040037044 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
37045 "angle": 42, # The angle between the standard orientation and the desired orientation.
37046 # Measured in degrees. Valid values are between -90 and 90. Positive
37047 # angles are angled upwards, negative are angled downwards.
37048 #
37049 # Note: For LTR text direction positive angles are in the counterclockwise
37050 # direction, whereas for RTL they are in the clockwise direction
37051 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
37052 # characters is unchanged.
37053 # For example:
37054 #
37055 # | V |
37056 # | e |
37057 # | r |
37058 # | t |
37059 # | i |
37060 # | c |
37061 # | a |
37062 # | l |
37063 },
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 },
38736 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
38737 # from the anchor cell.
38738 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
38739 "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.
39022 "format": { # The format of a run of text in a cell. # The format of the title.
39023 # Only valid if the axis is not associated with the domain.
39024 # Absent values indicate that the field isn't specified.
39025 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39026 # for simplicity of conversion to/from color representations in various
39027 # languages over compactness; for example, the fields of this representation
39028 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39029 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39030 # method in iOS; and, with just a little work, it can be easily formatted into
39031 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39032 #
39033 # Example (Java):
39034 #
39035 # import com.google.type.Color;
39036 #
39037 # // ...
39038 # public static java.awt.Color fromProto(Color protocolor) {
39039 # float alpha = protocolor.hasAlpha()
39040 # ? protocolor.getAlpha().getValue()
39041 # : 1.0;
39042 #
39043 # return new java.awt.Color(
39044 # protocolor.getRed(),
39045 # protocolor.getGreen(),
39046 # protocolor.getBlue(),
39047 # alpha);
39048 # }
39049 #
39050 # public static Color toProto(java.awt.Color color) {
39051 # float red = (float) color.getRed();
39052 # float green = (float) color.getGreen();
39053 # float blue = (float) color.getBlue();
39054 # float denominator = 255.0;
39055 # Color.Builder resultBuilder =
39056 # Color
39057 # .newBuilder()
39058 # .setRed(red / denominator)
39059 # .setGreen(green / denominator)
39060 # .setBlue(blue / denominator);
39061 # int alpha = color.getAlpha();
39062 # if (alpha != 255) {
39063 # result.setAlpha(
39064 # FloatValue
39065 # .newBuilder()
39066 # .setValue(((float) alpha) / denominator)
39067 # .build());
39068 # }
39069 # return resultBuilder.build();
39070 # }
39071 # // ...
39072 #
39073 # Example (iOS / Obj-C):
39074 #
39075 # // ...
39076 # static UIColor* fromProto(Color* protocolor) {
39077 # float red = [protocolor red];
39078 # float green = [protocolor green];
39079 # float blue = [protocolor blue];
39080 # FloatValue* alpha_wrapper = [protocolor alpha];
39081 # float alpha = 1.0;
39082 # if (alpha_wrapper != nil) {
39083 # alpha = [alpha_wrapper value];
39084 # }
39085 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39086 # }
39087 #
39088 # static Color* toProto(UIColor* color) {
39089 # CGFloat red, green, blue, alpha;
39090 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39091 # return nil;
39092 # }
39093 # Color* result = [Color alloc] init];
39094 # [result setRed:red];
39095 # [result setGreen:green];
39096 # [result setBlue:blue];
39097 # if (alpha <= 0.9999) {
39098 # [result setAlpha:floatWrapperWithValue(alpha)];
39099 # }
39100 # [result autorelease];
39101 # return result;
39102 # }
39103 # // ...
39104 #
39105 # Example (JavaScript):
39106 #
39107 # // ...
39108 #
39109 # var protoToCssColor = function(rgb_color) {
39110 # var redFrac = rgb_color.red || 0.0;
39111 # var greenFrac = rgb_color.green || 0.0;
39112 # var blueFrac = rgb_color.blue || 0.0;
39113 # var red = Math.floor(redFrac * 255);
39114 # var green = Math.floor(greenFrac * 255);
39115 # var blue = Math.floor(blueFrac * 255);
39116 #
39117 # if (!('alpha' in rgb_color)) {
39118 # return rgbToCssColor_(red, green, blue);
39119 # }
39120 #
39121 # var alphaFrac = rgb_color.alpha.value || 0.0;
39122 # var rgbParams = [red, green, blue].join(',');
39123 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39124 # };
39125 #
39126 # var rgbToCssColor_ = function(red, green, blue) {
39127 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39128 # var hexString = rgbNumber.toString(16);
39129 # var missingZeros = 6 - hexString.length;
39130 # var resultBuilder = ['#'];
39131 # for (var i = 0; i < missingZeros; i++) {
39132 # resultBuilder.push('0');
39133 # }
39134 # resultBuilder.push(hexString);
39135 # return resultBuilder.join('');
39136 # };
39137 #
39138 # // ...
39139 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39140 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39141 # the final pixel color is defined by the equation:
39142 #
39143 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39144 #
39145 # This means that a value of 1.0 corresponds to a solid color, whereas
39146 # a value of 0.0 corresponds to a completely transparent color. This
39147 # uses a wrapper message rather than a simple float scalar so that it is
39148 # possible to distinguish between a default value and the value being unset.
39149 # If omitted, this color object is to be rendered as a solid color
39150 # (as if the alpha value had been explicitly given with a value of 1.0).
39151 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39152 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39153 },
39154 "bold": True or False, # True if the text is bold.
39155 "strikethrough": True or False, # True if the text has a strikethrough.
39156 "fontFamily": "A String", # The font family.
39157 "fontSize": 42, # The size of the font.
39158 "italic": True or False, # True if the text is italicized.
39159 "underline": True or False, # True if the text is underlined.
39160 },
39161 "title": "A String", # The title of this axis. If set, this overrides any title inferred
39162 # from headers of the data.
39163 },
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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039384 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039385 # in start_row.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039386 { # Properties about a dimension.
39387 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
39388 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
39389 "hiddenByFilter": True or False, # True if this dimension is being filtered.
39390 # This field is read-only.
39391 },
39392 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039393 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039394 "startColumn": 42, # The first column this GridData refers to, zero-based.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039395 "rowData": [ # The data in the grid, one entry per row,
39396 # starting with the row in startRow.
39397 # The values in RowData will correspond to columns starting
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039398 # at start_column.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039399 { # Data about each cell in a row.
39400 "values": [ # The values in the row, one per column.
39401 { # Data about a specific cell.
39402 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
39403 # is computed dynamically based on its data, grouping, filters, values,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039404 # etc. Only the top-left cell of the pivot table contains the pivot table
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039405 # definition. The other cells will contain the calculated values of the
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039406 # results of the pivot in their effective_value fields.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039407 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
39408 # or vertically (as rows).
39409 "rows": [ # Each row grouping in the pivot table.
39410 { # A single grouping (either row or column) in a pivot table.
39411 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
39412 "valueMetadata": [ # Metadata about values in the grouping.
39413 { # Metadata about a value in a pivot grouping.
39414 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
39415 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
39416 # (Note that formulaValue is not valid,
39417 # because the values will be calculated.)
39418 "numberValue": 3.14, # Represents a double value.
39419 # Note: Dates, Times and DateTimes are represented as doubles in
39420 # "serial number" format.
39421 "boolValue": True or False, # Represents a boolean value.
39422 "formulaValue": "A String", # Represents a formula.
39423 "stringValue": "A String", # Represents a string value.
39424 # Leading single quotes are not included. For example, if the user typed
39425 # `'123` into the UI, this would be represented as a `stringValue` of
39426 # `"123"`.
39427 "errorValue": { # An error in a cell. # Represents an error.
39428 # This field is read-only.
39429 "message": "A String", # A message with more information about the error
39430 # (in the spreadsheet's locale).
39431 "type": "A String", # The type of error.
39432 },
39433 },
39434 },
39435 ],
39436 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
39437 # If not specified, sorting is alphabetical by this group's values.
39438 "buckets": [ # Determines the bucket from which values are chosen to sort.
39439 #
39440 # For example, in a pivot table with one row group & two column groups,
39441 # the row group can list up to two values. The first value corresponds
39442 # to a value within the first column group, and the second value
39443 # corresponds to a value in the second column group. If no values
39444 # are listed, this would indicate that the row should be sorted according
39445 # to the "Grand Total" over the column groups. If a single value is listed,
39446 # this would correspond to using the "Total" of that bucket.
39447 { # The kinds of value that a cell in a spreadsheet can have.
39448 "numberValue": 3.14, # Represents a double value.
39449 # Note: Dates, Times and DateTimes are represented as doubles in
39450 # "serial number" format.
39451 "boolValue": True or False, # Represents a boolean value.
39452 "formulaValue": "A String", # Represents a formula.
39453 "stringValue": "A String", # Represents a string value.
39454 # Leading single quotes are not included. For example, if the user typed
39455 # `'123` into the UI, this would be represented as a `stringValue` of
39456 # `"123"`.
39457 "errorValue": { # An error in a cell. # Represents an error.
39458 # This field is read-only.
39459 "message": "A String", # A message with more information about the error
39460 # (in the spreadsheet's locale).
39461 "type": "A String", # The type of error.
39462 },
39463 },
39464 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039465 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039466 # grouping should be sorted by.
39467 },
39468 "sortOrder": "A String", # The order the values in this group should be sorted.
39469 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
39470 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039471 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039472 # means this group refers to column `C`, whereas the offset `1` would refer
39473 # to column `D`.
39474 },
39475 ],
39476 "source": { # A range on a sheet. # The range the pivot table is reading data from.
39477 # All indexes are zero-based.
39478 # Indexes are half open, e.g the start index is inclusive
39479 # and the end index is exclusive -- [start_index, end_index).
39480 # Missing indexes indicate the range is unbounded on that side.
39481 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039482 # For example, if `"Sheet1"` is sheet ID 0, then:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039483 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039484 # `Sheet1!A1:A1 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039485 # start_row_index: 0, end_row_index: 1,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039486 # start_column_index: 0, end_column_index: 1`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039487 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039488 # `Sheet1!A3:B4 == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039489 # start_row_index: 2, end_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039490 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039491 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039492 # `Sheet1!A:B == sheet_id: 0,
39493 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039494 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039495 # `Sheet1!A5:B == sheet_id: 0,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039496 # start_row_index: 4,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039497 # start_column_index: 0, end_column_index: 2`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039498 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039499 # `Sheet1 == sheet_id:0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039500 #
39501 # The start index must always be less than or equal to the end index.
39502 # If the start index equals the end index, then the range is empty.
39503 # Empty ranges are typically not meaningful and are usually rendered in the
39504 # UI as `#REF!`.
39505 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039506 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039507 "sheetId": 42, # The sheet this range is on.
39508 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039509 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039510 },
39511 "values": [ # A list of values to include in the pivot table.
39512 { # The definition of how a value in a pivot table should be calculated.
39513 "formula": "A String", # A custom formula to calculate the value. The formula must start
39514 # with an `=` character.
39515 "summarizeFunction": "A String", # A function to summarize the value.
39516 # If formula is set, the only supported values are
39517 # SUM and
39518 # CUSTOM.
39519 # If sourceColumnOffset is set, then `CUSTOM`
39520 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039521 "name": "A String", # A name to use for the value. This is only used if formula was set.
39522 # Otherwise, the column name is used.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039523 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
39524 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039525 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039526 # means this value refers to column `C`, whereas the offset `1` would
39527 # refer to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039528 },
39529 ],
39530 "criteria": { # An optional mapping of filters per source column offset.
39531 #
39532 # The filters will be applied before aggregating data into the pivot table.
39533 # The map's key is the column offset of the source range that you want to
39534 # filter, and the value is the criteria for that column.
39535 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039536 # For example, if the source was `C10:E15`, a key of `0` will have the filter
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039537 # for column `C`, whereas the key `1` is for column `D`.
39538 "a_key": { # Criteria for showing/hiding rows in a pivot table.
39539 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
39540 "A String",
39541 ],
39542 },
39543 },
39544 "columns": [ # Each column grouping in the pivot table.
39545 { # A single grouping (either row or column) in a pivot table.
39546 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
39547 "valueMetadata": [ # Metadata about values in the grouping.
39548 { # Metadata about a value in a pivot grouping.
39549 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
39550 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
39551 # (Note that formulaValue is not valid,
39552 # because the values will be calculated.)
39553 "numberValue": 3.14, # Represents a double value.
39554 # Note: Dates, Times and DateTimes are represented as doubles in
39555 # "serial number" format.
39556 "boolValue": True or False, # Represents a boolean value.
39557 "formulaValue": "A String", # Represents a formula.
39558 "stringValue": "A String", # Represents a string value.
39559 # Leading single quotes are not included. For example, if the user typed
39560 # `'123` into the UI, this would be represented as a `stringValue` of
39561 # `"123"`.
39562 "errorValue": { # An error in a cell. # Represents an error.
39563 # This field is read-only.
39564 "message": "A String", # A message with more information about the error
39565 # (in the spreadsheet's locale).
39566 "type": "A String", # The type of error.
39567 },
39568 },
39569 },
39570 ],
39571 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
39572 # If not specified, sorting is alphabetical by this group's values.
39573 "buckets": [ # Determines the bucket from which values are chosen to sort.
39574 #
39575 # For example, in a pivot table with one row group & two column groups,
39576 # the row group can list up to two values. The first value corresponds
39577 # to a value within the first column group, and the second value
39578 # corresponds to a value in the second column group. If no values
39579 # are listed, this would indicate that the row should be sorted according
39580 # to the "Grand Total" over the column groups. If a single value is listed,
39581 # this would correspond to using the "Total" of that bucket.
39582 { # The kinds of value that a cell in a spreadsheet can have.
39583 "numberValue": 3.14, # Represents a double value.
39584 # Note: Dates, Times and DateTimes are represented as doubles in
39585 # "serial number" format.
39586 "boolValue": True or False, # Represents a boolean value.
39587 "formulaValue": "A String", # Represents a formula.
39588 "stringValue": "A String", # Represents a string value.
39589 # Leading single quotes are not included. For example, if the user typed
39590 # `'123` into the UI, this would be represented as a `stringValue` of
39591 # `"123"`.
39592 "errorValue": { # An error in a cell. # Represents an error.
39593 # This field is read-only.
39594 "message": "A String", # A message with more information about the error
39595 # (in the spreadsheet's locale).
39596 "type": "A String", # The type of error.
39597 },
39598 },
39599 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039600 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039601 # grouping should be sorted by.
39602 },
39603 "sortOrder": "A String", # The order the values in this group should be sorted.
39604 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
39605 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039606 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039607 # means this group refers to column `C`, whereas the offset `1` would refer
39608 # to column `D`.
39609 },
39610 ],
39611 },
39612 "hyperlink": "A String", # A hyperlink this cell points to, if any.
39613 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
39614 "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
39615 # the calculated value. For cells with literals, this will be
39616 # the same as the user_entered_value.
39617 # This field is read-only.
39618 "numberValue": 3.14, # Represents a double value.
39619 # Note: Dates, Times and DateTimes are represented as doubles in
39620 # "serial number" format.
39621 "boolValue": True or False, # Represents a boolean value.
39622 "formulaValue": "A String", # Represents a formula.
39623 "stringValue": "A String", # Represents a string value.
39624 # Leading single quotes are not included. For example, if the user typed
39625 # `'123` into the UI, this would be represented as a `stringValue` of
39626 # `"123"`.
39627 "errorValue": { # An error in a cell. # Represents an error.
39628 # This field is read-only.
39629 "message": "A String", # A message with more information about the error
39630 # (in the spreadsheet's locale).
39631 "type": "A String", # The type of error.
39632 },
39633 },
39634 "formattedValue": "A String", # The formatted value of the cell.
39635 # This is the value as it's shown to the user.
39636 # This field is read-only.
39637 "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()`
39638 # Note: Dates, Times and DateTimes are represented as doubles in
39639 # serial number format.
39640 "numberValue": 3.14, # Represents a double value.
39641 # Note: Dates, Times and DateTimes are represented as doubles in
39642 # "serial number" format.
39643 "boolValue": True or False, # Represents a boolean value.
39644 "formulaValue": "A String", # Represents a formula.
39645 "stringValue": "A String", # Represents a string value.
39646 # Leading single quotes are not included. For example, if the user typed
39647 # `'123` into the UI, this would be represented as a `stringValue` of
39648 # `"123"`.
39649 "errorValue": { # An error in a cell. # Represents an error.
39650 # This field is read-only.
39651 "message": "A String", # A message with more information about the error
39652 # (in the spreadsheet's locale).
39653 "type": "A String", # The type of error.
39654 },
39655 },
39656 "note": "A String", # Any note on the cell.
39657 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
39658 # This includes the results of applying any conditional formatting and,
39659 # if the cell contains a formula, the computed number format.
39660 # If the effective format is the default format, effective format will
39661 # not be written.
39662 # This field is read-only.
39663 "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 -070039664 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
39665 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039666 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070039667 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039668 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039669 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039670 },
39671 "textDirection": "A String", # The direction of the text in the cell.
39672 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
39673 # When updating padding, every field must be specified.
39674 "top": 42, # The top padding of the cell.
39675 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039676 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039677 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039678 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039679 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039680 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
39681 # for simplicity of conversion to/from color representations in various
39682 # languages over compactness; for example, the fields of this representation
39683 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39684 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39685 # method in iOS; and, with just a little work, it can be easily formatted into
39686 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39687 #
39688 # Example (Java):
39689 #
39690 # import com.google.type.Color;
39691 #
39692 # // ...
39693 # public static java.awt.Color fromProto(Color protocolor) {
39694 # float alpha = protocolor.hasAlpha()
39695 # ? protocolor.getAlpha().getValue()
39696 # : 1.0;
39697 #
39698 # return new java.awt.Color(
39699 # protocolor.getRed(),
39700 # protocolor.getGreen(),
39701 # protocolor.getBlue(),
39702 # alpha);
39703 # }
39704 #
39705 # public static Color toProto(java.awt.Color color) {
39706 # float red = (float) color.getRed();
39707 # float green = (float) color.getGreen();
39708 # float blue = (float) color.getBlue();
39709 # float denominator = 255.0;
39710 # Color.Builder resultBuilder =
39711 # Color
39712 # .newBuilder()
39713 # .setRed(red / denominator)
39714 # .setGreen(green / denominator)
39715 # .setBlue(blue / denominator);
39716 # int alpha = color.getAlpha();
39717 # if (alpha != 255) {
39718 # result.setAlpha(
39719 # FloatValue
39720 # .newBuilder()
39721 # .setValue(((float) alpha) / denominator)
39722 # .build());
39723 # }
39724 # return resultBuilder.build();
39725 # }
39726 # // ...
39727 #
39728 # Example (iOS / Obj-C):
39729 #
39730 # // ...
39731 # static UIColor* fromProto(Color* protocolor) {
39732 # float red = [protocolor red];
39733 # float green = [protocolor green];
39734 # float blue = [protocolor blue];
39735 # FloatValue* alpha_wrapper = [protocolor alpha];
39736 # float alpha = 1.0;
39737 # if (alpha_wrapper != nil) {
39738 # alpha = [alpha_wrapper value];
39739 # }
39740 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39741 # }
39742 #
39743 # static Color* toProto(UIColor* color) {
39744 # CGFloat red, green, blue, alpha;
39745 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39746 # return nil;
39747 # }
39748 # Color* result = [Color alloc] init];
39749 # [result setRed:red];
39750 # [result setGreen:green];
39751 # [result setBlue:blue];
39752 # if (alpha <= 0.9999) {
39753 # [result setAlpha:floatWrapperWithValue(alpha)];
39754 # }
39755 # [result autorelease];
39756 # return result;
39757 # }
39758 # // ...
39759 #
39760 # Example (JavaScript):
39761 #
39762 # // ...
39763 #
39764 # var protoToCssColor = function(rgb_color) {
39765 # var redFrac = rgb_color.red || 0.0;
39766 # var greenFrac = rgb_color.green || 0.0;
39767 # var blueFrac = rgb_color.blue || 0.0;
39768 # var red = Math.floor(redFrac * 255);
39769 # var green = Math.floor(greenFrac * 255);
39770 # var blue = Math.floor(blueFrac * 255);
39771 #
39772 # if (!('alpha' in rgb_color)) {
39773 # return rgbToCssColor_(red, green, blue);
39774 # }
39775 #
39776 # var alphaFrac = rgb_color.alpha.value || 0.0;
39777 # var rgbParams = [red, green, blue].join(',');
39778 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39779 # };
39780 #
39781 # var rgbToCssColor_ = function(red, green, blue) {
39782 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39783 # var hexString = rgbNumber.toString(16);
39784 # var missingZeros = 6 - hexString.length;
39785 # var resultBuilder = ['#'];
39786 # for (var i = 0; i < missingZeros; i++) {
39787 # resultBuilder.push('0');
39788 # }
39789 # resultBuilder.push(hexString);
39790 # return resultBuilder.join('');
39791 # };
39792 #
39793 # // ...
39794 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39795 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39796 # the final pixel color is defined by the equation:
39797 #
39798 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39799 #
39800 # This means that a value of 1.0 corresponds to a solid color, whereas
39801 # a value of 0.0 corresponds to a completely transparent color. This
39802 # uses a wrapper message rather than a simple float scalar so that it is
39803 # possible to distinguish between a default value and the value being unset.
39804 # If omitted, this color object is to be rendered as a solid color
39805 # (as if the alpha value had been explicitly given with a value of 1.0).
39806 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39807 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39808 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070039809 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039810 "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).
39811 # Absent values indicate that the field isn't specified.
39812 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
39813 # for simplicity of conversion to/from color representations in various
39814 # languages over compactness; for example, the fields of this representation
39815 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39816 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39817 # method in iOS; and, with just a little work, it can be easily formatted into
39818 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39819 #
39820 # Example (Java):
39821 #
39822 # import com.google.type.Color;
39823 #
39824 # // ...
39825 # public static java.awt.Color fromProto(Color protocolor) {
39826 # float alpha = protocolor.hasAlpha()
39827 # ? protocolor.getAlpha().getValue()
39828 # : 1.0;
39829 #
39830 # return new java.awt.Color(
39831 # protocolor.getRed(),
39832 # protocolor.getGreen(),
39833 # protocolor.getBlue(),
39834 # alpha);
39835 # }
39836 #
39837 # public static Color toProto(java.awt.Color color) {
39838 # float red = (float) color.getRed();
39839 # float green = (float) color.getGreen();
39840 # float blue = (float) color.getBlue();
39841 # float denominator = 255.0;
39842 # Color.Builder resultBuilder =
39843 # Color
39844 # .newBuilder()
39845 # .setRed(red / denominator)
39846 # .setGreen(green / denominator)
39847 # .setBlue(blue / denominator);
39848 # int alpha = color.getAlpha();
39849 # if (alpha != 255) {
39850 # result.setAlpha(
39851 # FloatValue
39852 # .newBuilder()
39853 # .setValue(((float) alpha) / denominator)
39854 # .build());
39855 # }
39856 # return resultBuilder.build();
39857 # }
39858 # // ...
39859 #
39860 # Example (iOS / Obj-C):
39861 #
39862 # // ...
39863 # static UIColor* fromProto(Color* protocolor) {
39864 # float red = [protocolor red];
39865 # float green = [protocolor green];
39866 # float blue = [protocolor blue];
39867 # FloatValue* alpha_wrapper = [protocolor alpha];
39868 # float alpha = 1.0;
39869 # if (alpha_wrapper != nil) {
39870 # alpha = [alpha_wrapper value];
39871 # }
39872 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
39873 # }
39874 #
39875 # static Color* toProto(UIColor* color) {
39876 # CGFloat red, green, blue, alpha;
39877 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
39878 # return nil;
39879 # }
39880 # Color* result = [Color alloc] init];
39881 # [result setRed:red];
39882 # [result setGreen:green];
39883 # [result setBlue:blue];
39884 # if (alpha <= 0.9999) {
39885 # [result setAlpha:floatWrapperWithValue(alpha)];
39886 # }
39887 # [result autorelease];
39888 # return result;
39889 # }
39890 # // ...
39891 #
39892 # Example (JavaScript):
39893 #
39894 # // ...
39895 #
39896 # var protoToCssColor = function(rgb_color) {
39897 # var redFrac = rgb_color.red || 0.0;
39898 # var greenFrac = rgb_color.green || 0.0;
39899 # var blueFrac = rgb_color.blue || 0.0;
39900 # var red = Math.floor(redFrac * 255);
39901 # var green = Math.floor(greenFrac * 255);
39902 # var blue = Math.floor(blueFrac * 255);
39903 #
39904 # if (!('alpha' in rgb_color)) {
39905 # return rgbToCssColor_(red, green, blue);
39906 # }
39907 #
39908 # var alphaFrac = rgb_color.alpha.value || 0.0;
39909 # var rgbParams = [red, green, blue].join(',');
39910 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
39911 # };
39912 #
39913 # var rgbToCssColor_ = function(red, green, blue) {
39914 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
39915 # var hexString = rgbNumber.toString(16);
39916 # var missingZeros = 6 - hexString.length;
39917 # var resultBuilder = ['#'];
39918 # for (var i = 0; i < missingZeros; i++) {
39919 # resultBuilder.push('0');
39920 # }
39921 # resultBuilder.push(hexString);
39922 # return resultBuilder.join('');
39923 # };
39924 #
39925 # // ...
39926 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
39927 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
39928 # the final pixel color is defined by the equation:
39929 #
39930 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
39931 #
39932 # This means that a value of 1.0 corresponds to a solid color, whereas
39933 # a value of 0.0 corresponds to a completely transparent color. This
39934 # uses a wrapper message rather than a simple float scalar so that it is
39935 # possible to distinguish between a default value and the value being unset.
39936 # If omitted, this color object is to be rendered as a solid color
39937 # (as if the alpha value had been explicitly given with a value of 1.0).
39938 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
39939 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
39940 },
39941 "bold": True or False, # True if the text is bold.
39942 "strikethrough": True or False, # True if the text has a strikethrough.
39943 "fontFamily": "A String", # The font family.
39944 "fontSize": 42, # The size of the font.
39945 "italic": True or False, # True if the text is italicized.
39946 "underline": True or False, # True if the text is underlined.
39947 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040039948 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070039949 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
39950 "borders": { # The borders of the cell. # The borders of the cell.
39951 "top": { # A border along a cell. # The top border of the cell.
39952 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
39953 # for simplicity of conversion to/from color representations in various
39954 # languages over compactness; for example, the fields of this representation
39955 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
39956 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
39957 # method in iOS; and, with just a little work, it can be easily formatted into
39958 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
39959 #
39960 # Example (Java):
39961 #
39962 # import com.google.type.Color;
39963 #
39964 # // ...
39965 # public static java.awt.Color fromProto(Color protocolor) {
39966 # float alpha = protocolor.hasAlpha()
39967 # ? protocolor.getAlpha().getValue()
39968 # : 1.0;
39969 #
39970 # return new java.awt.Color(
39971 # protocolor.getRed(),
39972 # protocolor.getGreen(),
39973 # protocolor.getBlue(),
39974 # alpha);
39975 # }
39976 #
39977 # public static Color toProto(java.awt.Color color) {
39978 # float red = (float) color.getRed();
39979 # float green = (float) color.getGreen();
39980 # float blue = (float) color.getBlue();
39981 # float denominator = 255.0;
39982 # Color.Builder resultBuilder =
39983 # Color
39984 # .newBuilder()
39985 # .setRed(red / denominator)
39986 # .setGreen(green / denominator)
39987 # .setBlue(blue / denominator);
39988 # int alpha = color.getAlpha();
39989 # if (alpha != 255) {
39990 # result.setAlpha(
39991 # FloatValue
39992 # .newBuilder()
39993 # .setValue(((float) alpha) / denominator)
39994 # .build());
39995 # }
39996 # return resultBuilder.build();
39997 # }
39998 # // ...
39999 #
40000 # Example (iOS / Obj-C):
40001 #
40002 # // ...
40003 # static UIColor* fromProto(Color* protocolor) {
40004 # float red = [protocolor red];
40005 # float green = [protocolor green];
40006 # float blue = [protocolor blue];
40007 # FloatValue* alpha_wrapper = [protocolor alpha];
40008 # float alpha = 1.0;
40009 # if (alpha_wrapper != nil) {
40010 # alpha = [alpha_wrapper value];
40011 # }
40012 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40013 # }
40014 #
40015 # static Color* toProto(UIColor* color) {
40016 # CGFloat red, green, blue, alpha;
40017 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40018 # return nil;
40019 # }
40020 # Color* result = [Color alloc] init];
40021 # [result setRed:red];
40022 # [result setGreen:green];
40023 # [result setBlue:blue];
40024 # if (alpha <= 0.9999) {
40025 # [result setAlpha:floatWrapperWithValue(alpha)];
40026 # }
40027 # [result autorelease];
40028 # return result;
40029 # }
40030 # // ...
40031 #
40032 # Example (JavaScript):
40033 #
40034 # // ...
40035 #
40036 # var protoToCssColor = function(rgb_color) {
40037 # var redFrac = rgb_color.red || 0.0;
40038 # var greenFrac = rgb_color.green || 0.0;
40039 # var blueFrac = rgb_color.blue || 0.0;
40040 # var red = Math.floor(redFrac * 255);
40041 # var green = Math.floor(greenFrac * 255);
40042 # var blue = Math.floor(blueFrac * 255);
40043 #
40044 # if (!('alpha' in rgb_color)) {
40045 # return rgbToCssColor_(red, green, blue);
40046 # }
40047 #
40048 # var alphaFrac = rgb_color.alpha.value || 0.0;
40049 # var rgbParams = [red, green, blue].join(',');
40050 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40051 # };
40052 #
40053 # var rgbToCssColor_ = function(red, green, blue) {
40054 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40055 # var hexString = rgbNumber.toString(16);
40056 # var missingZeros = 6 - hexString.length;
40057 # var resultBuilder = ['#'];
40058 # for (var i = 0; i < missingZeros; i++) {
40059 # resultBuilder.push('0');
40060 # }
40061 # resultBuilder.push(hexString);
40062 # return resultBuilder.join('');
40063 # };
40064 #
40065 # // ...
40066 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40067 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40068 # the final pixel color is defined by the equation:
40069 #
40070 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40071 #
40072 # This means that a value of 1.0 corresponds to a solid color, whereas
40073 # a value of 0.0 corresponds to a completely transparent color. This
40074 # uses a wrapper message rather than a simple float scalar so that it is
40075 # possible to distinguish between a default value and the value being unset.
40076 # If omitted, this color object is to be rendered as a solid color
40077 # (as if the alpha value had been explicitly given with a value of 1.0).
40078 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40079 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40080 },
40081 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040082 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040083 "style": "A String", # The style of the border.
40084 },
40085 "right": { # A border along a cell. # The right border of the cell.
40086 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40087 # for simplicity of conversion to/from color representations in various
40088 # languages over compactness; for example, the fields of this representation
40089 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40090 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40091 # method in iOS; and, with just a little work, it can be easily formatted into
40092 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40093 #
40094 # Example (Java):
40095 #
40096 # import com.google.type.Color;
40097 #
40098 # // ...
40099 # public static java.awt.Color fromProto(Color protocolor) {
40100 # float alpha = protocolor.hasAlpha()
40101 # ? protocolor.getAlpha().getValue()
40102 # : 1.0;
40103 #
40104 # return new java.awt.Color(
40105 # protocolor.getRed(),
40106 # protocolor.getGreen(),
40107 # protocolor.getBlue(),
40108 # alpha);
40109 # }
40110 #
40111 # public static Color toProto(java.awt.Color color) {
40112 # float red = (float) color.getRed();
40113 # float green = (float) color.getGreen();
40114 # float blue = (float) color.getBlue();
40115 # float denominator = 255.0;
40116 # Color.Builder resultBuilder =
40117 # Color
40118 # .newBuilder()
40119 # .setRed(red / denominator)
40120 # .setGreen(green / denominator)
40121 # .setBlue(blue / denominator);
40122 # int alpha = color.getAlpha();
40123 # if (alpha != 255) {
40124 # result.setAlpha(
40125 # FloatValue
40126 # .newBuilder()
40127 # .setValue(((float) alpha) / denominator)
40128 # .build());
40129 # }
40130 # return resultBuilder.build();
40131 # }
40132 # // ...
40133 #
40134 # Example (iOS / Obj-C):
40135 #
40136 # // ...
40137 # static UIColor* fromProto(Color* protocolor) {
40138 # float red = [protocolor red];
40139 # float green = [protocolor green];
40140 # float blue = [protocolor blue];
40141 # FloatValue* alpha_wrapper = [protocolor alpha];
40142 # float alpha = 1.0;
40143 # if (alpha_wrapper != nil) {
40144 # alpha = [alpha_wrapper value];
40145 # }
40146 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40147 # }
40148 #
40149 # static Color* toProto(UIColor* color) {
40150 # CGFloat red, green, blue, alpha;
40151 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40152 # return nil;
40153 # }
40154 # Color* result = [Color alloc] init];
40155 # [result setRed:red];
40156 # [result setGreen:green];
40157 # [result setBlue:blue];
40158 # if (alpha <= 0.9999) {
40159 # [result setAlpha:floatWrapperWithValue(alpha)];
40160 # }
40161 # [result autorelease];
40162 # return result;
40163 # }
40164 # // ...
40165 #
40166 # Example (JavaScript):
40167 #
40168 # // ...
40169 #
40170 # var protoToCssColor = function(rgb_color) {
40171 # var redFrac = rgb_color.red || 0.0;
40172 # var greenFrac = rgb_color.green || 0.0;
40173 # var blueFrac = rgb_color.blue || 0.0;
40174 # var red = Math.floor(redFrac * 255);
40175 # var green = Math.floor(greenFrac * 255);
40176 # var blue = Math.floor(blueFrac * 255);
40177 #
40178 # if (!('alpha' in rgb_color)) {
40179 # return rgbToCssColor_(red, green, blue);
40180 # }
40181 #
40182 # var alphaFrac = rgb_color.alpha.value || 0.0;
40183 # var rgbParams = [red, green, blue].join(',');
40184 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40185 # };
40186 #
40187 # var rgbToCssColor_ = function(red, green, blue) {
40188 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40189 # var hexString = rgbNumber.toString(16);
40190 # var missingZeros = 6 - hexString.length;
40191 # var resultBuilder = ['#'];
40192 # for (var i = 0; i < missingZeros; i++) {
40193 # resultBuilder.push('0');
40194 # }
40195 # resultBuilder.push(hexString);
40196 # return resultBuilder.join('');
40197 # };
40198 #
40199 # // ...
40200 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40201 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40202 # the final pixel color is defined by the equation:
40203 #
40204 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40205 #
40206 # This means that a value of 1.0 corresponds to a solid color, whereas
40207 # a value of 0.0 corresponds to a completely transparent color. This
40208 # uses a wrapper message rather than a simple float scalar so that it is
40209 # possible to distinguish between a default value and the value being unset.
40210 # If omitted, this color object is to be rendered as a solid color
40211 # (as if the alpha value had been explicitly given with a value of 1.0).
40212 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40213 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40214 },
40215 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040216 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040217 "style": "A String", # The style of the border.
40218 },
40219 "bottom": { # A border along a cell. # The bottom border of the cell.
40220 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40221 # for simplicity of conversion to/from color representations in various
40222 # languages over compactness; for example, the fields of this representation
40223 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40224 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40225 # method in iOS; and, with just a little work, it can be easily formatted into
40226 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40227 #
40228 # Example (Java):
40229 #
40230 # import com.google.type.Color;
40231 #
40232 # // ...
40233 # public static java.awt.Color fromProto(Color protocolor) {
40234 # float alpha = protocolor.hasAlpha()
40235 # ? protocolor.getAlpha().getValue()
40236 # : 1.0;
40237 #
40238 # return new java.awt.Color(
40239 # protocolor.getRed(),
40240 # protocolor.getGreen(),
40241 # protocolor.getBlue(),
40242 # alpha);
40243 # }
40244 #
40245 # public static Color toProto(java.awt.Color color) {
40246 # float red = (float) color.getRed();
40247 # float green = (float) color.getGreen();
40248 # float blue = (float) color.getBlue();
40249 # float denominator = 255.0;
40250 # Color.Builder resultBuilder =
40251 # Color
40252 # .newBuilder()
40253 # .setRed(red / denominator)
40254 # .setGreen(green / denominator)
40255 # .setBlue(blue / denominator);
40256 # int alpha = color.getAlpha();
40257 # if (alpha != 255) {
40258 # result.setAlpha(
40259 # FloatValue
40260 # .newBuilder()
40261 # .setValue(((float) alpha) / denominator)
40262 # .build());
40263 # }
40264 # return resultBuilder.build();
40265 # }
40266 # // ...
40267 #
40268 # Example (iOS / Obj-C):
40269 #
40270 # // ...
40271 # static UIColor* fromProto(Color* protocolor) {
40272 # float red = [protocolor red];
40273 # float green = [protocolor green];
40274 # float blue = [protocolor blue];
40275 # FloatValue* alpha_wrapper = [protocolor alpha];
40276 # float alpha = 1.0;
40277 # if (alpha_wrapper != nil) {
40278 # alpha = [alpha_wrapper value];
40279 # }
40280 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40281 # }
40282 #
40283 # static Color* toProto(UIColor* color) {
40284 # CGFloat red, green, blue, alpha;
40285 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40286 # return nil;
40287 # }
40288 # Color* result = [Color alloc] init];
40289 # [result setRed:red];
40290 # [result setGreen:green];
40291 # [result setBlue:blue];
40292 # if (alpha <= 0.9999) {
40293 # [result setAlpha:floatWrapperWithValue(alpha)];
40294 # }
40295 # [result autorelease];
40296 # return result;
40297 # }
40298 # // ...
40299 #
40300 # Example (JavaScript):
40301 #
40302 # // ...
40303 #
40304 # var protoToCssColor = function(rgb_color) {
40305 # var redFrac = rgb_color.red || 0.0;
40306 # var greenFrac = rgb_color.green || 0.0;
40307 # var blueFrac = rgb_color.blue || 0.0;
40308 # var red = Math.floor(redFrac * 255);
40309 # var green = Math.floor(greenFrac * 255);
40310 # var blue = Math.floor(blueFrac * 255);
40311 #
40312 # if (!('alpha' in rgb_color)) {
40313 # return rgbToCssColor_(red, green, blue);
40314 # }
40315 #
40316 # var alphaFrac = rgb_color.alpha.value || 0.0;
40317 # var rgbParams = [red, green, blue].join(',');
40318 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40319 # };
40320 #
40321 # var rgbToCssColor_ = function(red, green, blue) {
40322 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40323 # var hexString = rgbNumber.toString(16);
40324 # var missingZeros = 6 - hexString.length;
40325 # var resultBuilder = ['#'];
40326 # for (var i = 0; i < missingZeros; i++) {
40327 # resultBuilder.push('0');
40328 # }
40329 # resultBuilder.push(hexString);
40330 # return resultBuilder.join('');
40331 # };
40332 #
40333 # // ...
40334 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40335 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40336 # the final pixel color is defined by the equation:
40337 #
40338 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40339 #
40340 # This means that a value of 1.0 corresponds to a solid color, whereas
40341 # a value of 0.0 corresponds to a completely transparent color. This
40342 # uses a wrapper message rather than a simple float scalar so that it is
40343 # possible to distinguish between a default value and the value being unset.
40344 # If omitted, this color object is to be rendered as a solid color
40345 # (as if the alpha value had been explicitly given with a value of 1.0).
40346 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40347 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40348 },
40349 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040350 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040351 "style": "A String", # The style of the border.
40352 },
40353 "left": { # A border along a cell. # The left border of the cell.
40354 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40355 # for simplicity of conversion to/from color representations in various
40356 # languages over compactness; for example, the fields of this representation
40357 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40358 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40359 # method in iOS; and, with just a little work, it can be easily formatted into
40360 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40361 #
40362 # Example (Java):
40363 #
40364 # import com.google.type.Color;
40365 #
40366 # // ...
40367 # public static java.awt.Color fromProto(Color protocolor) {
40368 # float alpha = protocolor.hasAlpha()
40369 # ? protocolor.getAlpha().getValue()
40370 # : 1.0;
40371 #
40372 # return new java.awt.Color(
40373 # protocolor.getRed(),
40374 # protocolor.getGreen(),
40375 # protocolor.getBlue(),
40376 # alpha);
40377 # }
40378 #
40379 # public static Color toProto(java.awt.Color color) {
40380 # float red = (float) color.getRed();
40381 # float green = (float) color.getGreen();
40382 # float blue = (float) color.getBlue();
40383 # float denominator = 255.0;
40384 # Color.Builder resultBuilder =
40385 # Color
40386 # .newBuilder()
40387 # .setRed(red / denominator)
40388 # .setGreen(green / denominator)
40389 # .setBlue(blue / denominator);
40390 # int alpha = color.getAlpha();
40391 # if (alpha != 255) {
40392 # result.setAlpha(
40393 # FloatValue
40394 # .newBuilder()
40395 # .setValue(((float) alpha) / denominator)
40396 # .build());
40397 # }
40398 # return resultBuilder.build();
40399 # }
40400 # // ...
40401 #
40402 # Example (iOS / Obj-C):
40403 #
40404 # // ...
40405 # static UIColor* fromProto(Color* protocolor) {
40406 # float red = [protocolor red];
40407 # float green = [protocolor green];
40408 # float blue = [protocolor blue];
40409 # FloatValue* alpha_wrapper = [protocolor alpha];
40410 # float alpha = 1.0;
40411 # if (alpha_wrapper != nil) {
40412 # alpha = [alpha_wrapper value];
40413 # }
40414 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40415 # }
40416 #
40417 # static Color* toProto(UIColor* color) {
40418 # CGFloat red, green, blue, alpha;
40419 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40420 # return nil;
40421 # }
40422 # Color* result = [Color alloc] init];
40423 # [result setRed:red];
40424 # [result setGreen:green];
40425 # [result setBlue:blue];
40426 # if (alpha <= 0.9999) {
40427 # [result setAlpha:floatWrapperWithValue(alpha)];
40428 # }
40429 # [result autorelease];
40430 # return result;
40431 # }
40432 # // ...
40433 #
40434 # Example (JavaScript):
40435 #
40436 # // ...
40437 #
40438 # var protoToCssColor = function(rgb_color) {
40439 # var redFrac = rgb_color.red || 0.0;
40440 # var greenFrac = rgb_color.green || 0.0;
40441 # var blueFrac = rgb_color.blue || 0.0;
40442 # var red = Math.floor(redFrac * 255);
40443 # var green = Math.floor(greenFrac * 255);
40444 # var blue = Math.floor(blueFrac * 255);
40445 #
40446 # if (!('alpha' in rgb_color)) {
40447 # return rgbToCssColor_(red, green, blue);
40448 # }
40449 #
40450 # var alphaFrac = rgb_color.alpha.value || 0.0;
40451 # var rgbParams = [red, green, blue].join(',');
40452 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40453 # };
40454 #
40455 # var rgbToCssColor_ = function(red, green, blue) {
40456 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40457 # var hexString = rgbNumber.toString(16);
40458 # var missingZeros = 6 - hexString.length;
40459 # var resultBuilder = ['#'];
40460 # for (var i = 0; i < missingZeros; i++) {
40461 # resultBuilder.push('0');
40462 # }
40463 # resultBuilder.push(hexString);
40464 # return resultBuilder.join('');
40465 # };
40466 #
40467 # // ...
40468 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40469 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40470 # the final pixel color is defined by the equation:
40471 #
40472 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40473 #
40474 # This means that a value of 1.0 corresponds to a solid color, whereas
40475 # a value of 0.0 corresponds to a completely transparent color. This
40476 # uses a wrapper message rather than a simple float scalar so that it is
40477 # possible to distinguish between a default value and the value being unset.
40478 # If omitted, this color object is to be rendered as a solid color
40479 # (as if the alpha value had been explicitly given with a value of 1.0).
40480 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40481 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40482 },
40483 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040484 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040485 "style": "A String", # The style of the border.
40486 },
40487 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040488 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
40489 "angle": 42, # The angle between the standard orientation and the desired orientation.
40490 # Measured in degrees. Valid values are between -90 and 90. Positive
40491 # angles are angled upwards, negative are angled downwards.
40492 #
40493 # Note: For LTR text direction positive angles are in the counterclockwise
40494 # direction, whereas for RTL they are in the clockwise direction
40495 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
40496 # characters is unchanged.
40497 # For example:
40498 #
40499 # | V |
40500 # | e |
40501 # | r |
40502 # | t |
40503 # | i |
40504 # | c |
40505 # | a |
40506 # | l |
40507 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040508 },
40509 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
40510 #
40511 # When writing, the new format will be merged with the existing format.
40512 "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 -070040513 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
40514 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040515 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070040516 # information about the supported patterns.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040517 "type": "A String", # The type of the number format.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040518 # When writing, this field must be set.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040519 },
40520 "textDirection": "A String", # The direction of the text in the cell.
40521 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
40522 # When updating padding, every field must be specified.
40523 "top": 42, # The top padding of the cell.
40524 "right": 42, # The right padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040525 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040526 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040527 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040528 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040529 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
40530 # for simplicity of conversion to/from color representations in various
40531 # languages over compactness; for example, the fields of this representation
40532 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40533 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40534 # method in iOS; and, with just a little work, it can be easily formatted into
40535 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40536 #
40537 # Example (Java):
40538 #
40539 # import com.google.type.Color;
40540 #
40541 # // ...
40542 # public static java.awt.Color fromProto(Color protocolor) {
40543 # float alpha = protocolor.hasAlpha()
40544 # ? protocolor.getAlpha().getValue()
40545 # : 1.0;
40546 #
40547 # return new java.awt.Color(
40548 # protocolor.getRed(),
40549 # protocolor.getGreen(),
40550 # protocolor.getBlue(),
40551 # alpha);
40552 # }
40553 #
40554 # public static Color toProto(java.awt.Color color) {
40555 # float red = (float) color.getRed();
40556 # float green = (float) color.getGreen();
40557 # float blue = (float) color.getBlue();
40558 # float denominator = 255.0;
40559 # Color.Builder resultBuilder =
40560 # Color
40561 # .newBuilder()
40562 # .setRed(red / denominator)
40563 # .setGreen(green / denominator)
40564 # .setBlue(blue / denominator);
40565 # int alpha = color.getAlpha();
40566 # if (alpha != 255) {
40567 # result.setAlpha(
40568 # FloatValue
40569 # .newBuilder()
40570 # .setValue(((float) alpha) / denominator)
40571 # .build());
40572 # }
40573 # return resultBuilder.build();
40574 # }
40575 # // ...
40576 #
40577 # Example (iOS / Obj-C):
40578 #
40579 # // ...
40580 # static UIColor* fromProto(Color* protocolor) {
40581 # float red = [protocolor red];
40582 # float green = [protocolor green];
40583 # float blue = [protocolor blue];
40584 # FloatValue* alpha_wrapper = [protocolor alpha];
40585 # float alpha = 1.0;
40586 # if (alpha_wrapper != nil) {
40587 # alpha = [alpha_wrapper value];
40588 # }
40589 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40590 # }
40591 #
40592 # static Color* toProto(UIColor* color) {
40593 # CGFloat red, green, blue, alpha;
40594 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40595 # return nil;
40596 # }
40597 # Color* result = [Color alloc] init];
40598 # [result setRed:red];
40599 # [result setGreen:green];
40600 # [result setBlue:blue];
40601 # if (alpha <= 0.9999) {
40602 # [result setAlpha:floatWrapperWithValue(alpha)];
40603 # }
40604 # [result autorelease];
40605 # return result;
40606 # }
40607 # // ...
40608 #
40609 # Example (JavaScript):
40610 #
40611 # // ...
40612 #
40613 # var protoToCssColor = function(rgb_color) {
40614 # var redFrac = rgb_color.red || 0.0;
40615 # var greenFrac = rgb_color.green || 0.0;
40616 # var blueFrac = rgb_color.blue || 0.0;
40617 # var red = Math.floor(redFrac * 255);
40618 # var green = Math.floor(greenFrac * 255);
40619 # var blue = Math.floor(blueFrac * 255);
40620 #
40621 # if (!('alpha' in rgb_color)) {
40622 # return rgbToCssColor_(red, green, blue);
40623 # }
40624 #
40625 # var alphaFrac = rgb_color.alpha.value || 0.0;
40626 # var rgbParams = [red, green, blue].join(',');
40627 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40628 # };
40629 #
40630 # var rgbToCssColor_ = function(red, green, blue) {
40631 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40632 # var hexString = rgbNumber.toString(16);
40633 # var missingZeros = 6 - hexString.length;
40634 # var resultBuilder = ['#'];
40635 # for (var i = 0; i < missingZeros; i++) {
40636 # resultBuilder.push('0');
40637 # }
40638 # resultBuilder.push(hexString);
40639 # return resultBuilder.join('');
40640 # };
40641 #
40642 # // ...
40643 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40644 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40645 # the final pixel color is defined by the equation:
40646 #
40647 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40648 #
40649 # This means that a value of 1.0 corresponds to a solid color, whereas
40650 # a value of 0.0 corresponds to a completely transparent color. This
40651 # uses a wrapper message rather than a simple float scalar so that it is
40652 # possible to distinguish between a default value and the value being unset.
40653 # If omitted, this color object is to be rendered as a solid color
40654 # (as if the alpha value had been explicitly given with a value of 1.0).
40655 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40656 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40657 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070040658 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040659 "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).
40660 # Absent values indicate that the field isn't specified.
40661 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
40662 # for simplicity of conversion to/from color representations in various
40663 # languages over compactness; for example, the fields of this representation
40664 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40665 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40666 # method in iOS; and, with just a little work, it can be easily formatted into
40667 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40668 #
40669 # Example (Java):
40670 #
40671 # import com.google.type.Color;
40672 #
40673 # // ...
40674 # public static java.awt.Color fromProto(Color protocolor) {
40675 # float alpha = protocolor.hasAlpha()
40676 # ? protocolor.getAlpha().getValue()
40677 # : 1.0;
40678 #
40679 # return new java.awt.Color(
40680 # protocolor.getRed(),
40681 # protocolor.getGreen(),
40682 # protocolor.getBlue(),
40683 # alpha);
40684 # }
40685 #
40686 # public static Color toProto(java.awt.Color color) {
40687 # float red = (float) color.getRed();
40688 # float green = (float) color.getGreen();
40689 # float blue = (float) color.getBlue();
40690 # float denominator = 255.0;
40691 # Color.Builder resultBuilder =
40692 # Color
40693 # .newBuilder()
40694 # .setRed(red / denominator)
40695 # .setGreen(green / denominator)
40696 # .setBlue(blue / denominator);
40697 # int alpha = color.getAlpha();
40698 # if (alpha != 255) {
40699 # result.setAlpha(
40700 # FloatValue
40701 # .newBuilder()
40702 # .setValue(((float) alpha) / denominator)
40703 # .build());
40704 # }
40705 # return resultBuilder.build();
40706 # }
40707 # // ...
40708 #
40709 # Example (iOS / Obj-C):
40710 #
40711 # // ...
40712 # static UIColor* fromProto(Color* protocolor) {
40713 # float red = [protocolor red];
40714 # float green = [protocolor green];
40715 # float blue = [protocolor blue];
40716 # FloatValue* alpha_wrapper = [protocolor alpha];
40717 # float alpha = 1.0;
40718 # if (alpha_wrapper != nil) {
40719 # alpha = [alpha_wrapper value];
40720 # }
40721 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40722 # }
40723 #
40724 # static Color* toProto(UIColor* color) {
40725 # CGFloat red, green, blue, alpha;
40726 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40727 # return nil;
40728 # }
40729 # Color* result = [Color alloc] init];
40730 # [result setRed:red];
40731 # [result setGreen:green];
40732 # [result setBlue:blue];
40733 # if (alpha <= 0.9999) {
40734 # [result setAlpha:floatWrapperWithValue(alpha)];
40735 # }
40736 # [result autorelease];
40737 # return result;
40738 # }
40739 # // ...
40740 #
40741 # Example (JavaScript):
40742 #
40743 # // ...
40744 #
40745 # var protoToCssColor = function(rgb_color) {
40746 # var redFrac = rgb_color.red || 0.0;
40747 # var greenFrac = rgb_color.green || 0.0;
40748 # var blueFrac = rgb_color.blue || 0.0;
40749 # var red = Math.floor(redFrac * 255);
40750 # var green = Math.floor(greenFrac * 255);
40751 # var blue = Math.floor(blueFrac * 255);
40752 #
40753 # if (!('alpha' in rgb_color)) {
40754 # return rgbToCssColor_(red, green, blue);
40755 # }
40756 #
40757 # var alphaFrac = rgb_color.alpha.value || 0.0;
40758 # var rgbParams = [red, green, blue].join(',');
40759 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40760 # };
40761 #
40762 # var rgbToCssColor_ = function(red, green, blue) {
40763 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40764 # var hexString = rgbNumber.toString(16);
40765 # var missingZeros = 6 - hexString.length;
40766 # var resultBuilder = ['#'];
40767 # for (var i = 0; i < missingZeros; i++) {
40768 # resultBuilder.push('0');
40769 # }
40770 # resultBuilder.push(hexString);
40771 # return resultBuilder.join('');
40772 # };
40773 #
40774 # // ...
40775 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40776 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40777 # the final pixel color is defined by the equation:
40778 #
40779 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40780 #
40781 # This means that a value of 1.0 corresponds to a solid color, whereas
40782 # a value of 0.0 corresponds to a completely transparent color. This
40783 # uses a wrapper message rather than a simple float scalar so that it is
40784 # possible to distinguish between a default value and the value being unset.
40785 # If omitted, this color object is to be rendered as a solid color
40786 # (as if the alpha value had been explicitly given with a value of 1.0).
40787 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40788 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40789 },
40790 "bold": True or False, # True if the text is bold.
40791 "strikethrough": True or False, # True if the text has a strikethrough.
40792 "fontFamily": "A String", # The font family.
40793 "fontSize": 42, # The size of the font.
40794 "italic": True or False, # True if the text is italicized.
40795 "underline": True or False, # True if the text is underlined.
40796 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040040797 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040798 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
40799 "borders": { # The borders of the cell. # The borders of the cell.
40800 "top": { # A border along a cell. # The top border of the cell.
40801 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40802 # for simplicity of conversion to/from color representations in various
40803 # languages over compactness; for example, the fields of this representation
40804 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40805 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40806 # method in iOS; and, with just a little work, it can be easily formatted into
40807 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40808 #
40809 # Example (Java):
40810 #
40811 # import com.google.type.Color;
40812 #
40813 # // ...
40814 # public static java.awt.Color fromProto(Color protocolor) {
40815 # float alpha = protocolor.hasAlpha()
40816 # ? protocolor.getAlpha().getValue()
40817 # : 1.0;
40818 #
40819 # return new java.awt.Color(
40820 # protocolor.getRed(),
40821 # protocolor.getGreen(),
40822 # protocolor.getBlue(),
40823 # alpha);
40824 # }
40825 #
40826 # public static Color toProto(java.awt.Color color) {
40827 # float red = (float) color.getRed();
40828 # float green = (float) color.getGreen();
40829 # float blue = (float) color.getBlue();
40830 # float denominator = 255.0;
40831 # Color.Builder resultBuilder =
40832 # Color
40833 # .newBuilder()
40834 # .setRed(red / denominator)
40835 # .setGreen(green / denominator)
40836 # .setBlue(blue / denominator);
40837 # int alpha = color.getAlpha();
40838 # if (alpha != 255) {
40839 # result.setAlpha(
40840 # FloatValue
40841 # .newBuilder()
40842 # .setValue(((float) alpha) / denominator)
40843 # .build());
40844 # }
40845 # return resultBuilder.build();
40846 # }
40847 # // ...
40848 #
40849 # Example (iOS / Obj-C):
40850 #
40851 # // ...
40852 # static UIColor* fromProto(Color* protocolor) {
40853 # float red = [protocolor red];
40854 # float green = [protocolor green];
40855 # float blue = [protocolor blue];
40856 # FloatValue* alpha_wrapper = [protocolor alpha];
40857 # float alpha = 1.0;
40858 # if (alpha_wrapper != nil) {
40859 # alpha = [alpha_wrapper value];
40860 # }
40861 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40862 # }
40863 #
40864 # static Color* toProto(UIColor* color) {
40865 # CGFloat red, green, blue, alpha;
40866 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
40867 # return nil;
40868 # }
40869 # Color* result = [Color alloc] init];
40870 # [result setRed:red];
40871 # [result setGreen:green];
40872 # [result setBlue:blue];
40873 # if (alpha <= 0.9999) {
40874 # [result setAlpha:floatWrapperWithValue(alpha)];
40875 # }
40876 # [result autorelease];
40877 # return result;
40878 # }
40879 # // ...
40880 #
40881 # Example (JavaScript):
40882 #
40883 # // ...
40884 #
40885 # var protoToCssColor = function(rgb_color) {
40886 # var redFrac = rgb_color.red || 0.0;
40887 # var greenFrac = rgb_color.green || 0.0;
40888 # var blueFrac = rgb_color.blue || 0.0;
40889 # var red = Math.floor(redFrac * 255);
40890 # var green = Math.floor(greenFrac * 255);
40891 # var blue = Math.floor(blueFrac * 255);
40892 #
40893 # if (!('alpha' in rgb_color)) {
40894 # return rgbToCssColor_(red, green, blue);
40895 # }
40896 #
40897 # var alphaFrac = rgb_color.alpha.value || 0.0;
40898 # var rgbParams = [red, green, blue].join(',');
40899 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
40900 # };
40901 #
40902 # var rgbToCssColor_ = function(red, green, blue) {
40903 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
40904 # var hexString = rgbNumber.toString(16);
40905 # var missingZeros = 6 - hexString.length;
40906 # var resultBuilder = ['#'];
40907 # for (var i = 0; i < missingZeros; i++) {
40908 # resultBuilder.push('0');
40909 # }
40910 # resultBuilder.push(hexString);
40911 # return resultBuilder.join('');
40912 # };
40913 #
40914 # // ...
40915 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
40916 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
40917 # the final pixel color is defined by the equation:
40918 #
40919 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
40920 #
40921 # This means that a value of 1.0 corresponds to a solid color, whereas
40922 # a value of 0.0 corresponds to a completely transparent color. This
40923 # uses a wrapper message rather than a simple float scalar so that it is
40924 # possible to distinguish between a default value and the value being unset.
40925 # If omitted, this color object is to be rendered as a solid color
40926 # (as if the alpha value had been explicitly given with a value of 1.0).
40927 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
40928 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
40929 },
40930 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070040931 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070040932 "style": "A String", # The style of the border.
40933 },
40934 "right": { # A border along a cell. # The right border of the cell.
40935 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
40936 # for simplicity of conversion to/from color representations in various
40937 # languages over compactness; for example, the fields of this representation
40938 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
40939 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
40940 # method in iOS; and, with just a little work, it can be easily formatted into
40941 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
40942 #
40943 # Example (Java):
40944 #
40945 # import com.google.type.Color;
40946 #
40947 # // ...
40948 # public static java.awt.Color fromProto(Color protocolor) {
40949 # float alpha = protocolor.hasAlpha()
40950 # ? protocolor.getAlpha().getValue()
40951 # : 1.0;
40952 #
40953 # return new java.awt.Color(
40954 # protocolor.getRed(),
40955 # protocolor.getGreen(),
40956 # protocolor.getBlue(),
40957 # alpha);
40958 # }
40959 #
40960 # public static Color toProto(java.awt.Color color) {
40961 # float red = (float) color.getRed();
40962 # float green = (float) color.getGreen();
40963 # float blue = (float) color.getBlue();
40964 # float denominator = 255.0;
40965 # Color.Builder resultBuilder =
40966 # Color
40967 # .newBuilder()
40968 # .setRed(red / denominator)
40969 # .setGreen(green / denominator)
40970 # .setBlue(blue / denominator);
40971 # int alpha = color.getAlpha();
40972 # if (alpha != 255) {
40973 # result.setAlpha(
40974 # FloatValue
40975 # .newBuilder()
40976 # .setValue(((float) alpha) / denominator)
40977 # .build());
40978 # }
40979 # return resultBuilder.build();
40980 # }
40981 # // ...
40982 #
40983 # Example (iOS / Obj-C):
40984 #
40985 # // ...
40986 # static UIColor* fromProto(Color* protocolor) {
40987 # float red = [protocolor red];
40988 # float green = [protocolor green];
40989 # float blue = [protocolor blue];
40990 # FloatValue* alpha_wrapper = [protocolor alpha];
40991 # float alpha = 1.0;
40992 # if (alpha_wrapper != nil) {
40993 # alpha = [alpha_wrapper value];
40994 # }
40995 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
40996 # }
40997 #
40998 # static Color* toProto(UIColor* color) {
40999 # CGFloat red, green, blue, alpha;
41000 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41001 # return nil;
41002 # }
41003 # Color* result = [Color alloc] init];
41004 # [result setRed:red];
41005 # [result setGreen:green];
41006 # [result setBlue:blue];
41007 # if (alpha <= 0.9999) {
41008 # [result setAlpha:floatWrapperWithValue(alpha)];
41009 # }
41010 # [result autorelease];
41011 # return result;
41012 # }
41013 # // ...
41014 #
41015 # Example (JavaScript):
41016 #
41017 # // ...
41018 #
41019 # var protoToCssColor = function(rgb_color) {
41020 # var redFrac = rgb_color.red || 0.0;
41021 # var greenFrac = rgb_color.green || 0.0;
41022 # var blueFrac = rgb_color.blue || 0.0;
41023 # var red = Math.floor(redFrac * 255);
41024 # var green = Math.floor(greenFrac * 255);
41025 # var blue = Math.floor(blueFrac * 255);
41026 #
41027 # if (!('alpha' in rgb_color)) {
41028 # return rgbToCssColor_(red, green, blue);
41029 # }
41030 #
41031 # var alphaFrac = rgb_color.alpha.value || 0.0;
41032 # var rgbParams = [red, green, blue].join(',');
41033 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41034 # };
41035 #
41036 # var rgbToCssColor_ = function(red, green, blue) {
41037 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41038 # var hexString = rgbNumber.toString(16);
41039 # var missingZeros = 6 - hexString.length;
41040 # var resultBuilder = ['#'];
41041 # for (var i = 0; i < missingZeros; i++) {
41042 # resultBuilder.push('0');
41043 # }
41044 # resultBuilder.push(hexString);
41045 # return resultBuilder.join('');
41046 # };
41047 #
41048 # // ...
41049 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41050 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41051 # the final pixel color is defined by the equation:
41052 #
41053 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41054 #
41055 # This means that a value of 1.0 corresponds to a solid color, whereas
41056 # a value of 0.0 corresponds to a completely transparent color. This
41057 # uses a wrapper message rather than a simple float scalar so that it is
41058 # possible to distinguish between a default value and the value being unset.
41059 # If omitted, this color object is to be rendered as a solid color
41060 # (as if the alpha value had been explicitly given with a value of 1.0).
41061 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41062 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41063 },
41064 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070041065 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041066 "style": "A String", # The style of the border.
41067 },
41068 "bottom": { # A border along a cell. # The bottom border of the cell.
41069 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41070 # for simplicity of conversion to/from color representations in various
41071 # languages over compactness; for example, the fields of this representation
41072 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41073 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41074 # method in iOS; and, with just a little work, it can be easily formatted into
41075 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41076 #
41077 # Example (Java):
41078 #
41079 # import com.google.type.Color;
41080 #
41081 # // ...
41082 # public static java.awt.Color fromProto(Color protocolor) {
41083 # float alpha = protocolor.hasAlpha()
41084 # ? protocolor.getAlpha().getValue()
41085 # : 1.0;
41086 #
41087 # return new java.awt.Color(
41088 # protocolor.getRed(),
41089 # protocolor.getGreen(),
41090 # protocolor.getBlue(),
41091 # alpha);
41092 # }
41093 #
41094 # public static Color toProto(java.awt.Color color) {
41095 # float red = (float) color.getRed();
41096 # float green = (float) color.getGreen();
41097 # float blue = (float) color.getBlue();
41098 # float denominator = 255.0;
41099 # Color.Builder resultBuilder =
41100 # Color
41101 # .newBuilder()
41102 # .setRed(red / denominator)
41103 # .setGreen(green / denominator)
41104 # .setBlue(blue / denominator);
41105 # int alpha = color.getAlpha();
41106 # if (alpha != 255) {
41107 # result.setAlpha(
41108 # FloatValue
41109 # .newBuilder()
41110 # .setValue(((float) alpha) / denominator)
41111 # .build());
41112 # }
41113 # return resultBuilder.build();
41114 # }
41115 # // ...
41116 #
41117 # Example (iOS / Obj-C):
41118 #
41119 # // ...
41120 # static UIColor* fromProto(Color* protocolor) {
41121 # float red = [protocolor red];
41122 # float green = [protocolor green];
41123 # float blue = [protocolor blue];
41124 # FloatValue* alpha_wrapper = [protocolor alpha];
41125 # float alpha = 1.0;
41126 # if (alpha_wrapper != nil) {
41127 # alpha = [alpha_wrapper value];
41128 # }
41129 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41130 # }
41131 #
41132 # static Color* toProto(UIColor* color) {
41133 # CGFloat red, green, blue, alpha;
41134 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41135 # return nil;
41136 # }
41137 # Color* result = [Color alloc] init];
41138 # [result setRed:red];
41139 # [result setGreen:green];
41140 # [result setBlue:blue];
41141 # if (alpha <= 0.9999) {
41142 # [result setAlpha:floatWrapperWithValue(alpha)];
41143 # }
41144 # [result autorelease];
41145 # return result;
41146 # }
41147 # // ...
41148 #
41149 # Example (JavaScript):
41150 #
41151 # // ...
41152 #
41153 # var protoToCssColor = function(rgb_color) {
41154 # var redFrac = rgb_color.red || 0.0;
41155 # var greenFrac = rgb_color.green || 0.0;
41156 # var blueFrac = rgb_color.blue || 0.0;
41157 # var red = Math.floor(redFrac * 255);
41158 # var green = Math.floor(greenFrac * 255);
41159 # var blue = Math.floor(blueFrac * 255);
41160 #
41161 # if (!('alpha' in rgb_color)) {
41162 # return rgbToCssColor_(red, green, blue);
41163 # }
41164 #
41165 # var alphaFrac = rgb_color.alpha.value || 0.0;
41166 # var rgbParams = [red, green, blue].join(',');
41167 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41168 # };
41169 #
41170 # var rgbToCssColor_ = function(red, green, blue) {
41171 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41172 # var hexString = rgbNumber.toString(16);
41173 # var missingZeros = 6 - hexString.length;
41174 # var resultBuilder = ['#'];
41175 # for (var i = 0; i < missingZeros; i++) {
41176 # resultBuilder.push('0');
41177 # }
41178 # resultBuilder.push(hexString);
41179 # return resultBuilder.join('');
41180 # };
41181 #
41182 # // ...
41183 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41184 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41185 # the final pixel color is defined by the equation:
41186 #
41187 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41188 #
41189 # This means that a value of 1.0 corresponds to a solid color, whereas
41190 # a value of 0.0 corresponds to a completely transparent color. This
41191 # uses a wrapper message rather than a simple float scalar so that it is
41192 # possible to distinguish between a default value and the value being unset.
41193 # If omitted, this color object is to be rendered as a solid color
41194 # (as if the alpha value had been explicitly given with a value of 1.0).
41195 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41196 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41197 },
41198 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070041199 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041200 "style": "A String", # The style of the border.
41201 },
41202 "left": { # A border along a cell. # The left border of the cell.
41203 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
41204 # for simplicity of conversion to/from color representations in various
41205 # languages over compactness; for example, the fields of this representation
41206 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41207 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41208 # method in iOS; and, with just a little work, it can be easily formatted into
41209 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41210 #
41211 # Example (Java):
41212 #
41213 # import com.google.type.Color;
41214 #
41215 # // ...
41216 # public static java.awt.Color fromProto(Color protocolor) {
41217 # float alpha = protocolor.hasAlpha()
41218 # ? protocolor.getAlpha().getValue()
41219 # : 1.0;
41220 #
41221 # return new java.awt.Color(
41222 # protocolor.getRed(),
41223 # protocolor.getGreen(),
41224 # protocolor.getBlue(),
41225 # alpha);
41226 # }
41227 #
41228 # public static Color toProto(java.awt.Color color) {
41229 # float red = (float) color.getRed();
41230 # float green = (float) color.getGreen();
41231 # float blue = (float) color.getBlue();
41232 # float denominator = 255.0;
41233 # Color.Builder resultBuilder =
41234 # Color
41235 # .newBuilder()
41236 # .setRed(red / denominator)
41237 # .setGreen(green / denominator)
41238 # .setBlue(blue / denominator);
41239 # int alpha = color.getAlpha();
41240 # if (alpha != 255) {
41241 # result.setAlpha(
41242 # FloatValue
41243 # .newBuilder()
41244 # .setValue(((float) alpha) / denominator)
41245 # .build());
41246 # }
41247 # return resultBuilder.build();
41248 # }
41249 # // ...
41250 #
41251 # Example (iOS / Obj-C):
41252 #
41253 # // ...
41254 # static UIColor* fromProto(Color* protocolor) {
41255 # float red = [protocolor red];
41256 # float green = [protocolor green];
41257 # float blue = [protocolor blue];
41258 # FloatValue* alpha_wrapper = [protocolor alpha];
41259 # float alpha = 1.0;
41260 # if (alpha_wrapper != nil) {
41261 # alpha = [alpha_wrapper value];
41262 # }
41263 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41264 # }
41265 #
41266 # static Color* toProto(UIColor* color) {
41267 # CGFloat red, green, blue, alpha;
41268 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41269 # return nil;
41270 # }
41271 # Color* result = [Color alloc] init];
41272 # [result setRed:red];
41273 # [result setGreen:green];
41274 # [result setBlue:blue];
41275 # if (alpha <= 0.9999) {
41276 # [result setAlpha:floatWrapperWithValue(alpha)];
41277 # }
41278 # [result autorelease];
41279 # return result;
41280 # }
41281 # // ...
41282 #
41283 # Example (JavaScript):
41284 #
41285 # // ...
41286 #
41287 # var protoToCssColor = function(rgb_color) {
41288 # var redFrac = rgb_color.red || 0.0;
41289 # var greenFrac = rgb_color.green || 0.0;
41290 # var blueFrac = rgb_color.blue || 0.0;
41291 # var red = Math.floor(redFrac * 255);
41292 # var green = Math.floor(greenFrac * 255);
41293 # var blue = Math.floor(blueFrac * 255);
41294 #
41295 # if (!('alpha' in rgb_color)) {
41296 # return rgbToCssColor_(red, green, blue);
41297 # }
41298 #
41299 # var alphaFrac = rgb_color.alpha.value || 0.0;
41300 # var rgbParams = [red, green, blue].join(',');
41301 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41302 # };
41303 #
41304 # var rgbToCssColor_ = function(red, green, blue) {
41305 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41306 # var hexString = rgbNumber.toString(16);
41307 # var missingZeros = 6 - hexString.length;
41308 # var resultBuilder = ['#'];
41309 # for (var i = 0; i < missingZeros; i++) {
41310 # resultBuilder.push('0');
41311 # }
41312 # resultBuilder.push(hexString);
41313 # return resultBuilder.join('');
41314 # };
41315 #
41316 # // ...
41317 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41318 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41319 # the final pixel color is defined by the equation:
41320 #
41321 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41322 #
41323 # This means that a value of 1.0 corresponds to a solid color, whereas
41324 # a value of 0.0 corresponds to a completely transparent color. This
41325 # uses a wrapper message rather than a simple float scalar so that it is
41326 # possible to distinguish between a default value and the value being unset.
41327 # If omitted, this color object is to be rendered as a solid color
41328 # (as if the alpha value had been explicitly given with a value of 1.0).
41329 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41330 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41331 },
41332 "width": 42, # The width of the border, in pixels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070041333 # Deprecated; the width is determined by the "style" field.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041334 "style": "A String", # The style of the border.
41335 },
41336 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041337 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
41338 "angle": 42, # The angle between the standard orientation and the desired orientation.
41339 # Measured in degrees. Valid values are between -90 and 90. Positive
41340 # angles are angled upwards, negative are angled downwards.
41341 #
41342 # Note: For LTR text direction positive angles are in the counterclockwise
41343 # direction, whereas for RTL they are in the clockwise direction
41344 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
41345 # characters is unchanged.
41346 # For example:
41347 #
41348 # | V |
41349 # | e |
41350 # | r |
41351 # | t |
41352 # | i |
41353 # | c |
41354 # | a |
41355 # | l |
41356 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041357 },
41358 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
41359 #
41360 # When writing, the new data validation rule will overwrite any prior rule.
41361 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
41362 # If true, "List" conditions will show a dropdown.
41363 "strict": True or False, # True if invalid data should be rejected.
41364 "inputMessage": "A String", # A message to show the user when adding data to the cell.
41365 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
41366 # BooleanConditions are used by conditional formatting,
41367 # data validation, and the criteria in filters.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041368 "values": [ # The values of the condition. The number of supported values depends
41369 # on the condition type. Some support zero values,
41370 # others one or two values,
41371 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
41372 { # The value of the condition.
41373 "relativeDate": "A String", # A relative date (based on the current date).
41374 # Valid only if the type is
41375 # DATE_BEFORE,
41376 # DATE_AFTER,
41377 # DATE_ON_OR_BEFORE or
41378 # DATE_ON_OR_AFTER.
41379 #
41380 # Relative dates are not supported in data validation.
41381 # They are supported only in conditional formatting and
41382 # conditional filters.
41383 "userEnteredValue": "A String", # A value the condition is based on.
41384 # The value will be parsed as if the user typed into a cell.
41385 # Formulas are supported (and must begin with an `=`).
41386 },
41387 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041388 "type": "A String", # The type of condition.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041389 },
41390 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041391 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
41392 # on user entered strings, not formulas, bools, or numbers.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041393 # Runs start at specific indexes in the text and continue until the next
41394 # run. Properties of a run will continue unless explicitly changed
41395 # in a subsequent run (and properties of the first run will continue
41396 # the properties of the cell unless explicitly changed).
41397 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041398 # When writing, the new runs will overwrite any prior runs. When writing a
41399 # new user_entered_value, previous runs will be erased.
41400 { # A run of a text format. The format of this run continues until the start
41401 # index of the next run.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041402 # When updating, all fields must be set.
41403 "startIndex": 42, # The character index where this run starts.
41404 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
41405 # Absent values indicate that the field isn't specified.
41406 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
41407 # for simplicity of conversion to/from color representations in various
41408 # languages over compactness; for example, the fields of this representation
41409 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41410 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41411 # method in iOS; and, with just a little work, it can be easily formatted into
41412 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41413 #
41414 # Example (Java):
41415 #
41416 # import com.google.type.Color;
41417 #
41418 # // ...
41419 # public static java.awt.Color fromProto(Color protocolor) {
41420 # float alpha = protocolor.hasAlpha()
41421 # ? protocolor.getAlpha().getValue()
41422 # : 1.0;
41423 #
41424 # return new java.awt.Color(
41425 # protocolor.getRed(),
41426 # protocolor.getGreen(),
41427 # protocolor.getBlue(),
41428 # alpha);
41429 # }
41430 #
41431 # public static Color toProto(java.awt.Color color) {
41432 # float red = (float) color.getRed();
41433 # float green = (float) color.getGreen();
41434 # float blue = (float) color.getBlue();
41435 # float denominator = 255.0;
41436 # Color.Builder resultBuilder =
41437 # Color
41438 # .newBuilder()
41439 # .setRed(red / denominator)
41440 # .setGreen(green / denominator)
41441 # .setBlue(blue / denominator);
41442 # int alpha = color.getAlpha();
41443 # if (alpha != 255) {
41444 # result.setAlpha(
41445 # FloatValue
41446 # .newBuilder()
41447 # .setValue(((float) alpha) / denominator)
41448 # .build());
41449 # }
41450 # return resultBuilder.build();
41451 # }
41452 # // ...
41453 #
41454 # Example (iOS / Obj-C):
41455 #
41456 # // ...
41457 # static UIColor* fromProto(Color* protocolor) {
41458 # float red = [protocolor red];
41459 # float green = [protocolor green];
41460 # float blue = [protocolor blue];
41461 # FloatValue* alpha_wrapper = [protocolor alpha];
41462 # float alpha = 1.0;
41463 # if (alpha_wrapper != nil) {
41464 # alpha = [alpha_wrapper value];
41465 # }
41466 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41467 # }
41468 #
41469 # static Color* toProto(UIColor* color) {
41470 # CGFloat red, green, blue, alpha;
41471 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41472 # return nil;
41473 # }
41474 # Color* result = [Color alloc] init];
41475 # [result setRed:red];
41476 # [result setGreen:green];
41477 # [result setBlue:blue];
41478 # if (alpha <= 0.9999) {
41479 # [result setAlpha:floatWrapperWithValue(alpha)];
41480 # }
41481 # [result autorelease];
41482 # return result;
41483 # }
41484 # // ...
41485 #
41486 # Example (JavaScript):
41487 #
41488 # // ...
41489 #
41490 # var protoToCssColor = function(rgb_color) {
41491 # var redFrac = rgb_color.red || 0.0;
41492 # var greenFrac = rgb_color.green || 0.0;
41493 # var blueFrac = rgb_color.blue || 0.0;
41494 # var red = Math.floor(redFrac * 255);
41495 # var green = Math.floor(greenFrac * 255);
41496 # var blue = Math.floor(blueFrac * 255);
41497 #
41498 # if (!('alpha' in rgb_color)) {
41499 # return rgbToCssColor_(red, green, blue);
41500 # }
41501 #
41502 # var alphaFrac = rgb_color.alpha.value || 0.0;
41503 # var rgbParams = [red, green, blue].join(',');
41504 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41505 # };
41506 #
41507 # var rgbToCssColor_ = function(red, green, blue) {
41508 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41509 # var hexString = rgbNumber.toString(16);
41510 # var missingZeros = 6 - hexString.length;
41511 # var resultBuilder = ['#'];
41512 # for (var i = 0; i < missingZeros; i++) {
41513 # resultBuilder.push('0');
41514 # }
41515 # resultBuilder.push(hexString);
41516 # return resultBuilder.join('');
41517 # };
41518 #
41519 # // ...
41520 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41521 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41522 # the final pixel color is defined by the equation:
41523 #
41524 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41525 #
41526 # This means that a value of 1.0 corresponds to a solid color, whereas
41527 # a value of 0.0 corresponds to a completely transparent color. This
41528 # uses a wrapper message rather than a simple float scalar so that it is
41529 # possible to distinguish between a default value and the value being unset.
41530 # If omitted, this color object is to be rendered as a solid color
41531 # (as if the alpha value had been explicitly given with a value of 1.0).
41532 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41533 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41534 },
41535 "bold": True or False, # True if the text is bold.
41536 "strikethrough": True or False, # True if the text has a strikethrough.
41537 "fontFamily": "A String", # The font family.
41538 "fontSize": 42, # The size of the font.
41539 "italic": True or False, # True if the text is italicized.
41540 "underline": True or False, # True if the text is underlined.
41541 },
41542 },
41543 ],
41544 },
41545 ],
41546 },
41547 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041548 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
41549 # in start_column.
41550 { # Properties about a dimension.
41551 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
41552 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
41553 "hiddenByFilter": True or False, # True if this dimension is being filtered.
41554 # This field is read-only.
41555 },
41556 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041557 },
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 "autoRecalc": "A String", # The amount of time to wait before volatile functions are recalculated.
41817 "defaultFormat": { # The format of a cell. # The default format of all cells in the spreadsheet.
41818 # CellData.effectiveFormat will not be set if the
41819 # cell's format is equal to this default format.
41820 # This field is read-only.
41821 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
41822 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
41823 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041824 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041825 # information about the supported patterns.
41826 "type": "A String", # The type of the number format.
41827 # When writing, this field must be set.
41828 },
41829 "textDirection": "A String", # The direction of the text in the cell.
41830 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
41831 # When updating padding, every field must be specified.
41832 "top": 42, # The top padding of the cell.
41833 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041834 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040041835 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041836 },
41837 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
41838 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
41839 # for simplicity of conversion to/from color representations in various
41840 # languages over compactness; for example, the fields of this representation
41841 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41842 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41843 # method in iOS; and, with just a little work, it can be easily formatted into
41844 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041845 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041846 # Example (Java):
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041847 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041848 # import com.google.type.Color;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041849 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041850 # // ...
41851 # public static java.awt.Color fromProto(Color protocolor) {
41852 # float alpha = protocolor.hasAlpha()
41853 # ? protocolor.getAlpha().getValue()
41854 # : 1.0;
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070041855 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080041856 # return new java.awt.Color(
41857 # protocolor.getRed(),
41858 # protocolor.getGreen(),
41859 # protocolor.getBlue(),
41860 # alpha);
41861 # }
41862 #
41863 # public static Color toProto(java.awt.Color color) {
41864 # float red = (float) color.getRed();
41865 # float green = (float) color.getGreen();
41866 # float blue = (float) color.getBlue();
41867 # float denominator = 255.0;
41868 # Color.Builder resultBuilder =
41869 # Color
41870 # .newBuilder()
41871 # .setRed(red / denominator)
41872 # .setGreen(green / denominator)
41873 # .setBlue(blue / denominator);
41874 # int alpha = color.getAlpha();
41875 # if (alpha != 255) {
41876 # result.setAlpha(
41877 # FloatValue
41878 # .newBuilder()
41879 # .setValue(((float) alpha) / denominator)
41880 # .build());
41881 # }
41882 # return resultBuilder.build();
41883 # }
41884 # // ...
41885 #
41886 # Example (iOS / Obj-C):
41887 #
41888 # // ...
41889 # static UIColor* fromProto(Color* protocolor) {
41890 # float red = [protocolor red];
41891 # float green = [protocolor green];
41892 # float blue = [protocolor blue];
41893 # FloatValue* alpha_wrapper = [protocolor alpha];
41894 # float alpha = 1.0;
41895 # if (alpha_wrapper != nil) {
41896 # alpha = [alpha_wrapper value];
41897 # }
41898 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
41899 # }
41900 #
41901 # static Color* toProto(UIColor* color) {
41902 # CGFloat red, green, blue, alpha;
41903 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
41904 # return nil;
41905 # }
41906 # Color* result = [Color alloc] init];
41907 # [result setRed:red];
41908 # [result setGreen:green];
41909 # [result setBlue:blue];
41910 # if (alpha <= 0.9999) {
41911 # [result setAlpha:floatWrapperWithValue(alpha)];
41912 # }
41913 # [result autorelease];
41914 # return result;
41915 # }
41916 # // ...
41917 #
41918 # Example (JavaScript):
41919 #
41920 # // ...
41921 #
41922 # var protoToCssColor = function(rgb_color) {
41923 # var redFrac = rgb_color.red || 0.0;
41924 # var greenFrac = rgb_color.green || 0.0;
41925 # var blueFrac = rgb_color.blue || 0.0;
41926 # var red = Math.floor(redFrac * 255);
41927 # var green = Math.floor(greenFrac * 255);
41928 # var blue = Math.floor(blueFrac * 255);
41929 #
41930 # if (!('alpha' in rgb_color)) {
41931 # return rgbToCssColor_(red, green, blue);
41932 # }
41933 #
41934 # var alphaFrac = rgb_color.alpha.value || 0.0;
41935 # var rgbParams = [red, green, blue].join(',');
41936 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
41937 # };
41938 #
41939 # var rgbToCssColor_ = function(red, green, blue) {
41940 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
41941 # var hexString = rgbNumber.toString(16);
41942 # var missingZeros = 6 - hexString.length;
41943 # var resultBuilder = ['#'];
41944 # for (var i = 0; i < missingZeros; i++) {
41945 # resultBuilder.push('0');
41946 # }
41947 # resultBuilder.push(hexString);
41948 # return resultBuilder.join('');
41949 # };
41950 #
41951 # // ...
41952 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
41953 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
41954 # the final pixel color is defined by the equation:
41955 #
41956 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
41957 #
41958 # This means that a value of 1.0 corresponds to a solid color, whereas
41959 # a value of 0.0 corresponds to a completely transparent color. This
41960 # uses a wrapper message rather than a simple float scalar so that it is
41961 # possible to distinguish between a default value and the value being unset.
41962 # If omitted, this color object is to be rendered as a solid color
41963 # (as if the alpha value had been explicitly given with a value of 1.0).
41964 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
41965 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
41966 },
41967 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
41968 "textFormat": { # The format of a run of text in a cell. # The format of the text in the cell (unless overridden by a format run).
41969 # Absent values indicate that the field isn't specified.
41970 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070041971 # for simplicity of conversion to/from color representations in various
41972 # languages over compactness; for example, the fields of this representation
41973 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
41974 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
41975 # method in iOS; and, with just a little work, it can be easily formatted into
41976 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
41977 #
41978 # Example (Java):
41979 #
41980 # import com.google.type.Color;
41981 #
41982 # // ...
41983 # public static java.awt.Color fromProto(Color protocolor) {
41984 # float alpha = protocolor.hasAlpha()
41985 # ? protocolor.getAlpha().getValue()
41986 # : 1.0;
41987 #
41988 # return new java.awt.Color(
41989 # protocolor.getRed(),
41990 # protocolor.getGreen(),
41991 # protocolor.getBlue(),
41992 # alpha);
41993 # }
41994 #
41995 # public static Color toProto(java.awt.Color color) {
41996 # float red = (float) color.getRed();
41997 # float green = (float) color.getGreen();
41998 # float blue = (float) color.getBlue();
41999 # float denominator = 255.0;
42000 # Color.Builder resultBuilder =
42001 # Color
42002 # .newBuilder()
42003 # .setRed(red / denominator)
42004 # .setGreen(green / denominator)
42005 # .setBlue(blue / denominator);
42006 # int alpha = color.getAlpha();
42007 # if (alpha != 255) {
42008 # result.setAlpha(
42009 # FloatValue
42010 # .newBuilder()
42011 # .setValue(((float) alpha) / denominator)
42012 # .build());
42013 # }
42014 # return resultBuilder.build();
42015 # }
42016 # // ...
42017 #
42018 # Example (iOS / Obj-C):
42019 #
42020 # // ...
42021 # static UIColor* fromProto(Color* protocolor) {
42022 # float red = [protocolor red];
42023 # float green = [protocolor green];
42024 # float blue = [protocolor blue];
42025 # FloatValue* alpha_wrapper = [protocolor alpha];
42026 # float alpha = 1.0;
42027 # if (alpha_wrapper != nil) {
42028 # alpha = [alpha_wrapper value];
42029 # }
42030 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42031 # }
42032 #
42033 # static Color* toProto(UIColor* color) {
42034 # CGFloat red, green, blue, alpha;
42035 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42036 # return nil;
42037 # }
42038 # Color* result = [Color alloc] init];
42039 # [result setRed:red];
42040 # [result setGreen:green];
42041 # [result setBlue:blue];
42042 # if (alpha <= 0.9999) {
42043 # [result setAlpha:floatWrapperWithValue(alpha)];
42044 # }
42045 # [result autorelease];
42046 # return result;
42047 # }
42048 # // ...
42049 #
42050 # Example (JavaScript):
42051 #
42052 # // ...
42053 #
42054 # var protoToCssColor = function(rgb_color) {
42055 # var redFrac = rgb_color.red || 0.0;
42056 # var greenFrac = rgb_color.green || 0.0;
42057 # var blueFrac = rgb_color.blue || 0.0;
42058 # var red = Math.floor(redFrac * 255);
42059 # var green = Math.floor(greenFrac * 255);
42060 # var blue = Math.floor(blueFrac * 255);
42061 #
42062 # if (!('alpha' in rgb_color)) {
42063 # return rgbToCssColor_(red, green, blue);
42064 # }
42065 #
42066 # var alphaFrac = rgb_color.alpha.value || 0.0;
42067 # var rgbParams = [red, green, blue].join(',');
42068 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42069 # };
42070 #
42071 # var rgbToCssColor_ = function(red, green, blue) {
42072 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42073 # var hexString = rgbNumber.toString(16);
42074 # var missingZeros = 6 - hexString.length;
42075 # var resultBuilder = ['#'];
42076 # for (var i = 0; i < missingZeros; i++) {
42077 # resultBuilder.push('0');
42078 # }
42079 # resultBuilder.push(hexString);
42080 # return resultBuilder.join('');
42081 # };
42082 #
42083 # // ...
42084 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42085 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42086 # the final pixel color is defined by the equation:
42087 #
42088 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42089 #
42090 # This means that a value of 1.0 corresponds to a solid color, whereas
42091 # a value of 0.0 corresponds to a completely transparent color. This
42092 # uses a wrapper message rather than a simple float scalar so that it is
42093 # possible to distinguish between a default value and the value being unset.
42094 # If omitted, this color object is to be rendered as a solid color
42095 # (as if the alpha value had been explicitly given with a value of 1.0).
42096 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42097 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42098 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042099 "bold": True or False, # True if the text is bold.
42100 "strikethrough": True or False, # True if the text has a strikethrough.
42101 "fontFamily": "A String", # The font family.
42102 "fontSize": 42, # The size of the font.
42103 "italic": True or False, # True if the text is italicized.
42104 "underline": True or False, # True if the text is underlined.
42105 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042106 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042107 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
42108 "borders": { # The borders of the cell. # The borders of the cell.
42109 "top": { # A border along a cell. # The top border of the cell.
42110 "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 -070042111 # for simplicity of conversion to/from color representations in various
42112 # languages over compactness; for example, the fields of this representation
42113 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42114 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42115 # method in iOS; and, with just a little work, it can be easily formatted into
42116 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42117 #
42118 # Example (Java):
42119 #
42120 # import com.google.type.Color;
42121 #
42122 # // ...
42123 # public static java.awt.Color fromProto(Color protocolor) {
42124 # float alpha = protocolor.hasAlpha()
42125 # ? protocolor.getAlpha().getValue()
42126 # : 1.0;
42127 #
42128 # return new java.awt.Color(
42129 # protocolor.getRed(),
42130 # protocolor.getGreen(),
42131 # protocolor.getBlue(),
42132 # alpha);
42133 # }
42134 #
42135 # public static Color toProto(java.awt.Color color) {
42136 # float red = (float) color.getRed();
42137 # float green = (float) color.getGreen();
42138 # float blue = (float) color.getBlue();
42139 # float denominator = 255.0;
42140 # Color.Builder resultBuilder =
42141 # Color
42142 # .newBuilder()
42143 # .setRed(red / denominator)
42144 # .setGreen(green / denominator)
42145 # .setBlue(blue / denominator);
42146 # int alpha = color.getAlpha();
42147 # if (alpha != 255) {
42148 # result.setAlpha(
42149 # FloatValue
42150 # .newBuilder()
42151 # .setValue(((float) alpha) / denominator)
42152 # .build());
42153 # }
42154 # return resultBuilder.build();
42155 # }
42156 # // ...
42157 #
42158 # Example (iOS / Obj-C):
42159 #
42160 # // ...
42161 # static UIColor* fromProto(Color* protocolor) {
42162 # float red = [protocolor red];
42163 # float green = [protocolor green];
42164 # float blue = [protocolor blue];
42165 # FloatValue* alpha_wrapper = [protocolor alpha];
42166 # float alpha = 1.0;
42167 # if (alpha_wrapper != nil) {
42168 # alpha = [alpha_wrapper value];
42169 # }
42170 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42171 # }
42172 #
42173 # static Color* toProto(UIColor* color) {
42174 # CGFloat red, green, blue, alpha;
42175 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42176 # return nil;
42177 # }
42178 # Color* result = [Color alloc] init];
42179 # [result setRed:red];
42180 # [result setGreen:green];
42181 # [result setBlue:blue];
42182 # if (alpha <= 0.9999) {
42183 # [result setAlpha:floatWrapperWithValue(alpha)];
42184 # }
42185 # [result autorelease];
42186 # return result;
42187 # }
42188 # // ...
42189 #
42190 # Example (JavaScript):
42191 #
42192 # // ...
42193 #
42194 # var protoToCssColor = function(rgb_color) {
42195 # var redFrac = rgb_color.red || 0.0;
42196 # var greenFrac = rgb_color.green || 0.0;
42197 # var blueFrac = rgb_color.blue || 0.0;
42198 # var red = Math.floor(redFrac * 255);
42199 # var green = Math.floor(greenFrac * 255);
42200 # var blue = Math.floor(blueFrac * 255);
42201 #
42202 # if (!('alpha' in rgb_color)) {
42203 # return rgbToCssColor_(red, green, blue);
42204 # }
42205 #
42206 # var alphaFrac = rgb_color.alpha.value || 0.0;
42207 # var rgbParams = [red, green, blue].join(',');
42208 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42209 # };
42210 #
42211 # var rgbToCssColor_ = function(red, green, blue) {
42212 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42213 # var hexString = rgbNumber.toString(16);
42214 # var missingZeros = 6 - hexString.length;
42215 # var resultBuilder = ['#'];
42216 # for (var i = 0; i < missingZeros; i++) {
42217 # resultBuilder.push('0');
42218 # }
42219 # resultBuilder.push(hexString);
42220 # return resultBuilder.join('');
42221 # };
42222 #
42223 # // ...
42224 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42225 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42226 # the final pixel color is defined by the equation:
42227 #
42228 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42229 #
42230 # This means that a value of 1.0 corresponds to a solid color, whereas
42231 # a value of 0.0 corresponds to a completely transparent color. This
42232 # uses a wrapper message rather than a simple float scalar so that it is
42233 # possible to distinguish between a default value and the value being unset.
42234 # If omitted, this color object is to be rendered as a solid color
42235 # (as if the alpha value had been explicitly given with a value of 1.0).
42236 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42237 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42238 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042239 "width": 42, # The width of the border, in pixels.
42240 # Deprecated; the width is determined by the "style" field.
42241 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042242 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042243 "right": { # A border along a cell. # The right border of the cell.
42244 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42245 # for simplicity of conversion to/from color representations in various
42246 # languages over compactness; for example, the fields of this representation
42247 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42248 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42249 # method in iOS; and, with just a little work, it can be easily formatted into
42250 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42251 #
42252 # Example (Java):
42253 #
42254 # import com.google.type.Color;
42255 #
42256 # // ...
42257 # public static java.awt.Color fromProto(Color protocolor) {
42258 # float alpha = protocolor.hasAlpha()
42259 # ? protocolor.getAlpha().getValue()
42260 # : 1.0;
42261 #
42262 # return new java.awt.Color(
42263 # protocolor.getRed(),
42264 # protocolor.getGreen(),
42265 # protocolor.getBlue(),
42266 # alpha);
42267 # }
42268 #
42269 # public static Color toProto(java.awt.Color color) {
42270 # float red = (float) color.getRed();
42271 # float green = (float) color.getGreen();
42272 # float blue = (float) color.getBlue();
42273 # float denominator = 255.0;
42274 # Color.Builder resultBuilder =
42275 # Color
42276 # .newBuilder()
42277 # .setRed(red / denominator)
42278 # .setGreen(green / denominator)
42279 # .setBlue(blue / denominator);
42280 # int alpha = color.getAlpha();
42281 # if (alpha != 255) {
42282 # result.setAlpha(
42283 # FloatValue
42284 # .newBuilder()
42285 # .setValue(((float) alpha) / denominator)
42286 # .build());
42287 # }
42288 # return resultBuilder.build();
42289 # }
42290 # // ...
42291 #
42292 # Example (iOS / Obj-C):
42293 #
42294 # // ...
42295 # static UIColor* fromProto(Color* protocolor) {
42296 # float red = [protocolor red];
42297 # float green = [protocolor green];
42298 # float blue = [protocolor blue];
42299 # FloatValue* alpha_wrapper = [protocolor alpha];
42300 # float alpha = 1.0;
42301 # if (alpha_wrapper != nil) {
42302 # alpha = [alpha_wrapper value];
42303 # }
42304 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42305 # }
42306 #
42307 # static Color* toProto(UIColor* color) {
42308 # CGFloat red, green, blue, alpha;
42309 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42310 # return nil;
42311 # }
42312 # Color* result = [Color alloc] init];
42313 # [result setRed:red];
42314 # [result setGreen:green];
42315 # [result setBlue:blue];
42316 # if (alpha <= 0.9999) {
42317 # [result setAlpha:floatWrapperWithValue(alpha)];
42318 # }
42319 # [result autorelease];
42320 # return result;
42321 # }
42322 # // ...
42323 #
42324 # Example (JavaScript):
42325 #
42326 # // ...
42327 #
42328 # var protoToCssColor = function(rgb_color) {
42329 # var redFrac = rgb_color.red || 0.0;
42330 # var greenFrac = rgb_color.green || 0.0;
42331 # var blueFrac = rgb_color.blue || 0.0;
42332 # var red = Math.floor(redFrac * 255);
42333 # var green = Math.floor(greenFrac * 255);
42334 # var blue = Math.floor(blueFrac * 255);
42335 #
42336 # if (!('alpha' in rgb_color)) {
42337 # return rgbToCssColor_(red, green, blue);
42338 # }
42339 #
42340 # var alphaFrac = rgb_color.alpha.value || 0.0;
42341 # var rgbParams = [red, green, blue].join(',');
42342 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42343 # };
42344 #
42345 # var rgbToCssColor_ = function(red, green, blue) {
42346 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42347 # var hexString = rgbNumber.toString(16);
42348 # var missingZeros = 6 - hexString.length;
42349 # var resultBuilder = ['#'];
42350 # for (var i = 0; i < missingZeros; i++) {
42351 # resultBuilder.push('0');
42352 # }
42353 # resultBuilder.push(hexString);
42354 # return resultBuilder.join('');
42355 # };
42356 #
42357 # // ...
42358 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42359 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42360 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042361 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042362 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042363 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042364 # This means that a value of 1.0 corresponds to a solid color, whereas
42365 # a value of 0.0 corresponds to a completely transparent color. This
42366 # uses a wrapper message rather than a simple float scalar so that it is
42367 # possible to distinguish between a default value and the value being unset.
42368 # If omitted, this color object is to be rendered as a solid color
42369 # (as if the alpha value had been explicitly given with a value of 1.0).
42370 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42371 "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 -070042372 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042373 "width": 42, # The width of the border, in pixels.
42374 # Deprecated; the width is determined by the "style" field.
42375 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042376 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042377 "bottom": { # A border along a cell. # The bottom border of the cell.
42378 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42379 # for simplicity of conversion to/from color representations in various
42380 # languages over compactness; for example, the fields of this representation
42381 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42382 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42383 # method in iOS; and, with just a little work, it can be easily formatted into
42384 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42385 #
42386 # Example (Java):
42387 #
42388 # import com.google.type.Color;
42389 #
42390 # // ...
42391 # public static java.awt.Color fromProto(Color protocolor) {
42392 # float alpha = protocolor.hasAlpha()
42393 # ? protocolor.getAlpha().getValue()
42394 # : 1.0;
42395 #
42396 # return new java.awt.Color(
42397 # protocolor.getRed(),
42398 # protocolor.getGreen(),
42399 # protocolor.getBlue(),
42400 # alpha);
42401 # }
42402 #
42403 # public static Color toProto(java.awt.Color color) {
42404 # float red = (float) color.getRed();
42405 # float green = (float) color.getGreen();
42406 # float blue = (float) color.getBlue();
42407 # float denominator = 255.0;
42408 # Color.Builder resultBuilder =
42409 # Color
42410 # .newBuilder()
42411 # .setRed(red / denominator)
42412 # .setGreen(green / denominator)
42413 # .setBlue(blue / denominator);
42414 # int alpha = color.getAlpha();
42415 # if (alpha != 255) {
42416 # result.setAlpha(
42417 # FloatValue
42418 # .newBuilder()
42419 # .setValue(((float) alpha) / denominator)
42420 # .build());
42421 # }
42422 # return resultBuilder.build();
42423 # }
42424 # // ...
42425 #
42426 # Example (iOS / Obj-C):
42427 #
42428 # // ...
42429 # static UIColor* fromProto(Color* protocolor) {
42430 # float red = [protocolor red];
42431 # float green = [protocolor green];
42432 # float blue = [protocolor blue];
42433 # FloatValue* alpha_wrapper = [protocolor alpha];
42434 # float alpha = 1.0;
42435 # if (alpha_wrapper != nil) {
42436 # alpha = [alpha_wrapper value];
42437 # }
42438 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42439 # }
42440 #
42441 # static Color* toProto(UIColor* color) {
42442 # CGFloat red, green, blue, alpha;
42443 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42444 # return nil;
42445 # }
42446 # Color* result = [Color alloc] init];
42447 # [result setRed:red];
42448 # [result setGreen:green];
42449 # [result setBlue:blue];
42450 # if (alpha <= 0.9999) {
42451 # [result setAlpha:floatWrapperWithValue(alpha)];
42452 # }
42453 # [result autorelease];
42454 # return result;
42455 # }
42456 # // ...
42457 #
42458 # Example (JavaScript):
42459 #
42460 # // ...
42461 #
42462 # var protoToCssColor = function(rgb_color) {
42463 # var redFrac = rgb_color.red || 0.0;
42464 # var greenFrac = rgb_color.green || 0.0;
42465 # var blueFrac = rgb_color.blue || 0.0;
42466 # var red = Math.floor(redFrac * 255);
42467 # var green = Math.floor(greenFrac * 255);
42468 # var blue = Math.floor(blueFrac * 255);
42469 #
42470 # if (!('alpha' in rgb_color)) {
42471 # return rgbToCssColor_(red, green, blue);
42472 # }
42473 #
42474 # var alphaFrac = rgb_color.alpha.value || 0.0;
42475 # var rgbParams = [red, green, blue].join(',');
42476 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42477 # };
42478 #
42479 # var rgbToCssColor_ = function(red, green, blue) {
42480 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42481 # var hexString = rgbNumber.toString(16);
42482 # var missingZeros = 6 - hexString.length;
42483 # var resultBuilder = ['#'];
42484 # for (var i = 0; i < missingZeros; i++) {
42485 # resultBuilder.push('0');
42486 # }
42487 # resultBuilder.push(hexString);
42488 # return resultBuilder.join('');
42489 # };
42490 #
42491 # // ...
42492 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42493 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42494 # the final pixel color is defined by the equation:
42495 #
42496 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42497 #
42498 # This means that a value of 1.0 corresponds to a solid color, whereas
42499 # a value of 0.0 corresponds to a completely transparent color. This
42500 # uses a wrapper message rather than a simple float scalar so that it is
42501 # possible to distinguish between a default value and the value being unset.
42502 # If omitted, this color object is to be rendered as a solid color
42503 # (as if the alpha value had been explicitly given with a value of 1.0).
42504 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42505 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42506 },
42507 "width": 42, # The width of the border, in pixels.
42508 # Deprecated; the width is determined by the "style" field.
42509 "style": "A String", # The style of the border.
42510 },
42511 "left": { # A border along a cell. # The left border of the cell.
42512 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
42513 # for simplicity of conversion to/from color representations in various
42514 # languages over compactness; for example, the fields of this representation
42515 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
42516 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
42517 # method in iOS; and, with just a little work, it can be easily formatted into
42518 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
42519 #
42520 # Example (Java):
42521 #
42522 # import com.google.type.Color;
42523 #
42524 # // ...
42525 # public static java.awt.Color fromProto(Color protocolor) {
42526 # float alpha = protocolor.hasAlpha()
42527 # ? protocolor.getAlpha().getValue()
42528 # : 1.0;
42529 #
42530 # return new java.awt.Color(
42531 # protocolor.getRed(),
42532 # protocolor.getGreen(),
42533 # protocolor.getBlue(),
42534 # alpha);
42535 # }
42536 #
42537 # public static Color toProto(java.awt.Color color) {
42538 # float red = (float) color.getRed();
42539 # float green = (float) color.getGreen();
42540 # float blue = (float) color.getBlue();
42541 # float denominator = 255.0;
42542 # Color.Builder resultBuilder =
42543 # Color
42544 # .newBuilder()
42545 # .setRed(red / denominator)
42546 # .setGreen(green / denominator)
42547 # .setBlue(blue / denominator);
42548 # int alpha = color.getAlpha();
42549 # if (alpha != 255) {
42550 # result.setAlpha(
42551 # FloatValue
42552 # .newBuilder()
42553 # .setValue(((float) alpha) / denominator)
42554 # .build());
42555 # }
42556 # return resultBuilder.build();
42557 # }
42558 # // ...
42559 #
42560 # Example (iOS / Obj-C):
42561 #
42562 # // ...
42563 # static UIColor* fromProto(Color* protocolor) {
42564 # float red = [protocolor red];
42565 # float green = [protocolor green];
42566 # float blue = [protocolor blue];
42567 # FloatValue* alpha_wrapper = [protocolor alpha];
42568 # float alpha = 1.0;
42569 # if (alpha_wrapper != nil) {
42570 # alpha = [alpha_wrapper value];
42571 # }
42572 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
42573 # }
42574 #
42575 # static Color* toProto(UIColor* color) {
42576 # CGFloat red, green, blue, alpha;
42577 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
42578 # return nil;
42579 # }
42580 # Color* result = [Color alloc] init];
42581 # [result setRed:red];
42582 # [result setGreen:green];
42583 # [result setBlue:blue];
42584 # if (alpha <= 0.9999) {
42585 # [result setAlpha:floatWrapperWithValue(alpha)];
42586 # }
42587 # [result autorelease];
42588 # return result;
42589 # }
42590 # // ...
42591 #
42592 # Example (JavaScript):
42593 #
42594 # // ...
42595 #
42596 # var protoToCssColor = function(rgb_color) {
42597 # var redFrac = rgb_color.red || 0.0;
42598 # var greenFrac = rgb_color.green || 0.0;
42599 # var blueFrac = rgb_color.blue || 0.0;
42600 # var red = Math.floor(redFrac * 255);
42601 # var green = Math.floor(greenFrac * 255);
42602 # var blue = Math.floor(blueFrac * 255);
42603 #
42604 # if (!('alpha' in rgb_color)) {
42605 # return rgbToCssColor_(red, green, blue);
42606 # }
42607 #
42608 # var alphaFrac = rgb_color.alpha.value || 0.0;
42609 # var rgbParams = [red, green, blue].join(',');
42610 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
42611 # };
42612 #
42613 # var rgbToCssColor_ = function(red, green, blue) {
42614 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
42615 # var hexString = rgbNumber.toString(16);
42616 # var missingZeros = 6 - hexString.length;
42617 # var resultBuilder = ['#'];
42618 # for (var i = 0; i < missingZeros; i++) {
42619 # resultBuilder.push('0');
42620 # }
42621 # resultBuilder.push(hexString);
42622 # return resultBuilder.join('');
42623 # };
42624 #
42625 # // ...
42626 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
42627 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
42628 # the final pixel color is defined by the equation:
42629 #
42630 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
42631 #
42632 # This means that a value of 1.0 corresponds to a solid color, whereas
42633 # a value of 0.0 corresponds to a completely transparent color. This
42634 # uses a wrapper message rather than a simple float scalar so that it is
42635 # possible to distinguish between a default value and the value being unset.
42636 # If omitted, this color object is to be rendered as a solid color
42637 # (as if the alpha value had been explicitly given with a value of 1.0).
42638 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
42639 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
42640 },
42641 "width": 42, # The width of the border, in pixels.
42642 # Deprecated; the width is determined by the "style" field.
42643 "style": "A String", # The style of the border.
42644 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042645 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042646 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
42647 "angle": 42, # The angle between the standard orientation and the desired orientation.
42648 # Measured in degrees. Valid values are between -90 and 90. Positive
42649 # angles are angled upwards, negative are angled downwards.
42650 #
42651 # Note: For LTR text direction positive angles are in the counterclockwise
42652 # direction, whereas for RTL they are in the clockwise direction
42653 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
42654 # characters is unchanged.
42655 # For example:
42656 #
42657 # | V |
42658 # | e |
42659 # | r |
42660 # | t |
42661 # | i |
42662 # | c |
42663 # | a |
42664 # | l |
42665 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070042666 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040042667 "iterativeCalculationSettings": { # Settings to control how circular dependencies are resolved with iterative # Determines whether and how circular references are resolved with iterative
42668 # calculation. Absence of this field means that circular references will
42669 # result in calculation errors.
42670 # calculation.
42671 "convergenceThreshold": 3.14, # When iterative calculation is enabled and successive results differ by
42672 # less than this threshold value, the calculation rounds stop.
42673 "maxIterations": 42, # When iterative calculation is enabled, the maximum number of calculation
42674 # rounds to perform.
42675 },
42676 "timeZone": "A String", # The time zone of the spreadsheet, in CLDR format such as
42677 # `America/New_York`. If the time zone isn't recognized, this may
42678 # be a custom time zone such as `GMT-07:00`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080042679 },
42680 "sheets": [ # The sheets that are part of a spreadsheet.
42681 { # A sheet in a spreadsheet.
42682 "conditionalFormats": [ # The conditional format rules in this sheet.
42683 { # A rule describing a conditional format.
42684 "ranges": [ # The ranges that will be formatted if the condition is true.
42685 # All the ranges must be on the same grid.
42686 { # A range on a sheet.
42687 # All indexes are zero-based.
42688 # Indexes are half open, e.g the start index is inclusive
42689 # and the end index is exclusive -- [start_index, end_index).
42690 # Missing indexes indicate the range is unbounded on that side.
42691 #
42692 # For example, if `"Sheet1"` is sheet ID 0, then:
42693 #
42694 # `Sheet1!A1:A1 == sheet_id: 0,
42695 # start_row_index: 0, end_row_index: 1,
42696 # start_column_index: 0, end_column_index: 1`
42697 #
42698 # `Sheet1!A3:B4 == sheet_id: 0,
42699 # start_row_index: 2, end_row_index: 4,
42700 # start_column_index: 0, end_column_index: 2`
42701 #
42702 # `Sheet1!A:B == sheet_id: 0,
42703 # start_column_index: 0, end_column_index: 2`
42704 #
42705 # `Sheet1!A5:B == sheet_id: 0,
42706 # start_row_index: 4,
42707 # start_column_index: 0, end_column_index: 2`
42708 #
42709 # `Sheet1 == sheet_id:0`
42710 #
42711 # The start index must always be less than or equal to the end index.
42712 # If the start index equals the end index, then the range is empty.
42713 # Empty ranges are typically not meaningful and are usually rendered in the
42714 # UI as `#REF!`.
42715 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
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 Cheemalapatic30d2b52017-03-13 12:12:03 -040043040 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043041 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
43042 "borders": { # The borders of the cell. # The borders of the cell.
43043 "top": { # A border along a cell. # The top border of the cell.
43044 "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 -070043045 # for simplicity of conversion to/from color representations in various
43046 # languages over compactness; for example, the fields of this representation
43047 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43048 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43049 # method in iOS; and, with just a little work, it can be easily formatted into
43050 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43051 #
43052 # Example (Java):
43053 #
43054 # import com.google.type.Color;
43055 #
43056 # // ...
43057 # public static java.awt.Color fromProto(Color protocolor) {
43058 # float alpha = protocolor.hasAlpha()
43059 # ? protocolor.getAlpha().getValue()
43060 # : 1.0;
43061 #
43062 # return new java.awt.Color(
43063 # protocolor.getRed(),
43064 # protocolor.getGreen(),
43065 # protocolor.getBlue(),
43066 # alpha);
43067 # }
43068 #
43069 # public static Color toProto(java.awt.Color color) {
43070 # float red = (float) color.getRed();
43071 # float green = (float) color.getGreen();
43072 # float blue = (float) color.getBlue();
43073 # float denominator = 255.0;
43074 # Color.Builder resultBuilder =
43075 # Color
43076 # .newBuilder()
43077 # .setRed(red / denominator)
43078 # .setGreen(green / denominator)
43079 # .setBlue(blue / denominator);
43080 # int alpha = color.getAlpha();
43081 # if (alpha != 255) {
43082 # result.setAlpha(
43083 # FloatValue
43084 # .newBuilder()
43085 # .setValue(((float) alpha) / denominator)
43086 # .build());
43087 # }
43088 # return resultBuilder.build();
43089 # }
43090 # // ...
43091 #
43092 # Example (iOS / Obj-C):
43093 #
43094 # // ...
43095 # static UIColor* fromProto(Color* protocolor) {
43096 # float red = [protocolor red];
43097 # float green = [protocolor green];
43098 # float blue = [protocolor blue];
43099 # FloatValue* alpha_wrapper = [protocolor alpha];
43100 # float alpha = 1.0;
43101 # if (alpha_wrapper != nil) {
43102 # alpha = [alpha_wrapper value];
43103 # }
43104 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43105 # }
43106 #
43107 # static Color* toProto(UIColor* color) {
43108 # CGFloat red, green, blue, alpha;
43109 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43110 # return nil;
43111 # }
43112 # Color* result = [Color alloc] init];
43113 # [result setRed:red];
43114 # [result setGreen:green];
43115 # [result setBlue:blue];
43116 # if (alpha <= 0.9999) {
43117 # [result setAlpha:floatWrapperWithValue(alpha)];
43118 # }
43119 # [result autorelease];
43120 # return result;
43121 # }
43122 # // ...
43123 #
43124 # Example (JavaScript):
43125 #
43126 # // ...
43127 #
43128 # var protoToCssColor = function(rgb_color) {
43129 # var redFrac = rgb_color.red || 0.0;
43130 # var greenFrac = rgb_color.green || 0.0;
43131 # var blueFrac = rgb_color.blue || 0.0;
43132 # var red = Math.floor(redFrac * 255);
43133 # var green = Math.floor(greenFrac * 255);
43134 # var blue = Math.floor(blueFrac * 255);
43135 #
43136 # if (!('alpha' in rgb_color)) {
43137 # return rgbToCssColor_(red, green, blue);
43138 # }
43139 #
43140 # var alphaFrac = rgb_color.alpha.value || 0.0;
43141 # var rgbParams = [red, green, blue].join(',');
43142 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43143 # };
43144 #
43145 # var rgbToCssColor_ = function(red, green, blue) {
43146 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43147 # var hexString = rgbNumber.toString(16);
43148 # var missingZeros = 6 - hexString.length;
43149 # var resultBuilder = ['#'];
43150 # for (var i = 0; i < missingZeros; i++) {
43151 # resultBuilder.push('0');
43152 # }
43153 # resultBuilder.push(hexString);
43154 # return resultBuilder.join('');
43155 # };
43156 #
43157 # // ...
43158 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43159 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43160 # the final pixel color is defined by the equation:
43161 #
43162 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
43163 #
43164 # This means that a value of 1.0 corresponds to a solid color, whereas
43165 # a value of 0.0 corresponds to a completely transparent color. This
43166 # uses a wrapper message rather than a simple float scalar so that it is
43167 # possible to distinguish between a default value and the value being unset.
43168 # If omitted, this color object is to be rendered as a solid color
43169 # (as if the alpha value had been explicitly given with a value of 1.0).
43170 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43171 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
43172 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043173 "width": 42, # The width of the border, in pixels.
43174 # Deprecated; the width is determined by the "style" field.
43175 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043176 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043177 "right": { # A border along a cell. # The right border of the cell.
43178 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43179 # for simplicity of conversion to/from color representations in various
43180 # languages over compactness; for example, the fields of this representation
43181 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43182 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43183 # method in iOS; and, with just a little work, it can be easily formatted into
43184 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43185 #
43186 # Example (Java):
43187 #
43188 # import com.google.type.Color;
43189 #
43190 # // ...
43191 # public static java.awt.Color fromProto(Color protocolor) {
43192 # float alpha = protocolor.hasAlpha()
43193 # ? protocolor.getAlpha().getValue()
43194 # : 1.0;
43195 #
43196 # return new java.awt.Color(
43197 # protocolor.getRed(),
43198 # protocolor.getGreen(),
43199 # protocolor.getBlue(),
43200 # alpha);
43201 # }
43202 #
43203 # public static Color toProto(java.awt.Color color) {
43204 # float red = (float) color.getRed();
43205 # float green = (float) color.getGreen();
43206 # float blue = (float) color.getBlue();
43207 # float denominator = 255.0;
43208 # Color.Builder resultBuilder =
43209 # Color
43210 # .newBuilder()
43211 # .setRed(red / denominator)
43212 # .setGreen(green / denominator)
43213 # .setBlue(blue / denominator);
43214 # int alpha = color.getAlpha();
43215 # if (alpha != 255) {
43216 # result.setAlpha(
43217 # FloatValue
43218 # .newBuilder()
43219 # .setValue(((float) alpha) / denominator)
43220 # .build());
43221 # }
43222 # return resultBuilder.build();
43223 # }
43224 # // ...
43225 #
43226 # Example (iOS / Obj-C):
43227 #
43228 # // ...
43229 # static UIColor* fromProto(Color* protocolor) {
43230 # float red = [protocolor red];
43231 # float green = [protocolor green];
43232 # float blue = [protocolor blue];
43233 # FloatValue* alpha_wrapper = [protocolor alpha];
43234 # float alpha = 1.0;
43235 # if (alpha_wrapper != nil) {
43236 # alpha = [alpha_wrapper value];
43237 # }
43238 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43239 # }
43240 #
43241 # static Color* toProto(UIColor* color) {
43242 # CGFloat red, green, blue, alpha;
43243 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43244 # return nil;
43245 # }
43246 # Color* result = [Color alloc] init];
43247 # [result setRed:red];
43248 # [result setGreen:green];
43249 # [result setBlue:blue];
43250 # if (alpha <= 0.9999) {
43251 # [result setAlpha:floatWrapperWithValue(alpha)];
43252 # }
43253 # [result autorelease];
43254 # return result;
43255 # }
43256 # // ...
43257 #
43258 # Example (JavaScript):
43259 #
43260 # // ...
43261 #
43262 # var protoToCssColor = function(rgb_color) {
43263 # var redFrac = rgb_color.red || 0.0;
43264 # var greenFrac = rgb_color.green || 0.0;
43265 # var blueFrac = rgb_color.blue || 0.0;
43266 # var red = Math.floor(redFrac * 255);
43267 # var green = Math.floor(greenFrac * 255);
43268 # var blue = Math.floor(blueFrac * 255);
43269 #
43270 # if (!('alpha' in rgb_color)) {
43271 # return rgbToCssColor_(red, green, blue);
43272 # }
43273 #
43274 # var alphaFrac = rgb_color.alpha.value || 0.0;
43275 # var rgbParams = [red, green, blue].join(',');
43276 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43277 # };
43278 #
43279 # var rgbToCssColor_ = function(red, green, blue) {
43280 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43281 # var hexString = rgbNumber.toString(16);
43282 # var missingZeros = 6 - hexString.length;
43283 # var resultBuilder = ['#'];
43284 # for (var i = 0; i < missingZeros; i++) {
43285 # resultBuilder.push('0');
43286 # }
43287 # resultBuilder.push(hexString);
43288 # return resultBuilder.join('');
43289 # };
43290 #
43291 # // ...
43292 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43293 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43294 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043295 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043296 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043297 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043298 # This means that a value of 1.0 corresponds to a solid color, whereas
43299 # a value of 0.0 corresponds to a completely transparent color. This
43300 # uses a wrapper message rather than a simple float scalar so that it is
43301 # possible to distinguish between a default value and the value being unset.
43302 # If omitted, this color object is to be rendered as a solid color
43303 # (as if the alpha value had been explicitly given with a value of 1.0).
43304 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43305 "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 -070043306 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043307 "width": 42, # The width of the border, in pixels.
43308 # Deprecated; the width is determined by the "style" field.
43309 "style": "A String", # The style of the border.
43310 },
43311 "bottom": { # A border along a cell. # The bottom border of the cell.
43312 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43313 # for simplicity of conversion to/from color representations in various
43314 # languages over compactness; for example, the fields of this representation
43315 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43316 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43317 # method in iOS; and, with just a little work, it can be easily formatted into
43318 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43319 #
43320 # Example (Java):
43321 #
43322 # import com.google.type.Color;
43323 #
43324 # // ...
43325 # public static java.awt.Color fromProto(Color protocolor) {
43326 # float alpha = protocolor.hasAlpha()
43327 # ? protocolor.getAlpha().getValue()
43328 # : 1.0;
43329 #
43330 # return new java.awt.Color(
43331 # protocolor.getRed(),
43332 # protocolor.getGreen(),
43333 # protocolor.getBlue(),
43334 # alpha);
43335 # }
43336 #
43337 # public static Color toProto(java.awt.Color color) {
43338 # float red = (float) color.getRed();
43339 # float green = (float) color.getGreen();
43340 # float blue = (float) color.getBlue();
43341 # float denominator = 255.0;
43342 # Color.Builder resultBuilder =
43343 # Color
43344 # .newBuilder()
43345 # .setRed(red / denominator)
43346 # .setGreen(green / denominator)
43347 # .setBlue(blue / denominator);
43348 # int alpha = color.getAlpha();
43349 # if (alpha != 255) {
43350 # result.setAlpha(
43351 # FloatValue
43352 # .newBuilder()
43353 # .setValue(((float) alpha) / denominator)
43354 # .build());
43355 # }
43356 # return resultBuilder.build();
43357 # }
43358 # // ...
43359 #
43360 # Example (iOS / Obj-C):
43361 #
43362 # // ...
43363 # static UIColor* fromProto(Color* protocolor) {
43364 # float red = [protocolor red];
43365 # float green = [protocolor green];
43366 # float blue = [protocolor blue];
43367 # FloatValue* alpha_wrapper = [protocolor alpha];
43368 # float alpha = 1.0;
43369 # if (alpha_wrapper != nil) {
43370 # alpha = [alpha_wrapper value];
43371 # }
43372 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43373 # }
43374 #
43375 # static Color* toProto(UIColor* color) {
43376 # CGFloat red, green, blue, alpha;
43377 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43378 # return nil;
43379 # }
43380 # Color* result = [Color alloc] init];
43381 # [result setRed:red];
43382 # [result setGreen:green];
43383 # [result setBlue:blue];
43384 # if (alpha <= 0.9999) {
43385 # [result setAlpha:floatWrapperWithValue(alpha)];
43386 # }
43387 # [result autorelease];
43388 # return result;
43389 # }
43390 # // ...
43391 #
43392 # Example (JavaScript):
43393 #
43394 # // ...
43395 #
43396 # var protoToCssColor = function(rgb_color) {
43397 # var redFrac = rgb_color.red || 0.0;
43398 # var greenFrac = rgb_color.green || 0.0;
43399 # var blueFrac = rgb_color.blue || 0.0;
43400 # var red = Math.floor(redFrac * 255);
43401 # var green = Math.floor(greenFrac * 255);
43402 # var blue = Math.floor(blueFrac * 255);
43403 #
43404 # if (!('alpha' in rgb_color)) {
43405 # return rgbToCssColor_(red, green, blue);
43406 # }
43407 #
43408 # var alphaFrac = rgb_color.alpha.value || 0.0;
43409 # var rgbParams = [red, green, blue].join(',');
43410 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43411 # };
43412 #
43413 # var rgbToCssColor_ = function(red, green, blue) {
43414 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43415 # var hexString = rgbNumber.toString(16);
43416 # var missingZeros = 6 - hexString.length;
43417 # var resultBuilder = ['#'];
43418 # for (var i = 0; i < missingZeros; i++) {
43419 # resultBuilder.push('0');
43420 # }
43421 # resultBuilder.push(hexString);
43422 # return resultBuilder.join('');
43423 # };
43424 #
43425 # // ...
43426 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43427 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43428 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043429 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043430 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043431 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043432 # This means that a value of 1.0 corresponds to a solid color, whereas
43433 # a value of 0.0 corresponds to a completely transparent color. This
43434 # uses a wrapper message rather than a simple float scalar so that it is
43435 # possible to distinguish between a default value and the value being unset.
43436 # If omitted, this color object is to be rendered as a solid color
43437 # (as if the alpha value had been explicitly given with a value of 1.0).
43438 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43439 "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 -070043440 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043441 "width": 42, # The width of the border, in pixels.
43442 # Deprecated; the width is determined by the "style" field.
43443 "style": "A String", # The style of the border.
43444 },
43445 "left": { # A border along a cell. # The left border of the cell.
43446 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
43447 # for simplicity of conversion to/from color representations in various
43448 # languages over compactness; for example, the fields of this representation
43449 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
43450 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
43451 # method in iOS; and, with just a little work, it can be easily formatted into
43452 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
43453 #
43454 # Example (Java):
43455 #
43456 # import com.google.type.Color;
43457 #
43458 # // ...
43459 # public static java.awt.Color fromProto(Color protocolor) {
43460 # float alpha = protocolor.hasAlpha()
43461 # ? protocolor.getAlpha().getValue()
43462 # : 1.0;
43463 #
43464 # return new java.awt.Color(
43465 # protocolor.getRed(),
43466 # protocolor.getGreen(),
43467 # protocolor.getBlue(),
43468 # alpha);
43469 # }
43470 #
43471 # public static Color toProto(java.awt.Color color) {
43472 # float red = (float) color.getRed();
43473 # float green = (float) color.getGreen();
43474 # float blue = (float) color.getBlue();
43475 # float denominator = 255.0;
43476 # Color.Builder resultBuilder =
43477 # Color
43478 # .newBuilder()
43479 # .setRed(red / denominator)
43480 # .setGreen(green / denominator)
43481 # .setBlue(blue / denominator);
43482 # int alpha = color.getAlpha();
43483 # if (alpha != 255) {
43484 # result.setAlpha(
43485 # FloatValue
43486 # .newBuilder()
43487 # .setValue(((float) alpha) / denominator)
43488 # .build());
43489 # }
43490 # return resultBuilder.build();
43491 # }
43492 # // ...
43493 #
43494 # Example (iOS / Obj-C):
43495 #
43496 # // ...
43497 # static UIColor* fromProto(Color* protocolor) {
43498 # float red = [protocolor red];
43499 # float green = [protocolor green];
43500 # float blue = [protocolor blue];
43501 # FloatValue* alpha_wrapper = [protocolor alpha];
43502 # float alpha = 1.0;
43503 # if (alpha_wrapper != nil) {
43504 # alpha = [alpha_wrapper value];
43505 # }
43506 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
43507 # }
43508 #
43509 # static Color* toProto(UIColor* color) {
43510 # CGFloat red, green, blue, alpha;
43511 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
43512 # return nil;
43513 # }
43514 # Color* result = [Color alloc] init];
43515 # [result setRed:red];
43516 # [result setGreen:green];
43517 # [result setBlue:blue];
43518 # if (alpha <= 0.9999) {
43519 # [result setAlpha:floatWrapperWithValue(alpha)];
43520 # }
43521 # [result autorelease];
43522 # return result;
43523 # }
43524 # // ...
43525 #
43526 # Example (JavaScript):
43527 #
43528 # // ...
43529 #
43530 # var protoToCssColor = function(rgb_color) {
43531 # var redFrac = rgb_color.red || 0.0;
43532 # var greenFrac = rgb_color.green || 0.0;
43533 # var blueFrac = rgb_color.blue || 0.0;
43534 # var red = Math.floor(redFrac * 255);
43535 # var green = Math.floor(greenFrac * 255);
43536 # var blue = Math.floor(blueFrac * 255);
43537 #
43538 # if (!('alpha' in rgb_color)) {
43539 # return rgbToCssColor_(red, green, blue);
43540 # }
43541 #
43542 # var alphaFrac = rgb_color.alpha.value || 0.0;
43543 # var rgbParams = [red, green, blue].join(',');
43544 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
43545 # };
43546 #
43547 # var rgbToCssColor_ = function(red, green, blue) {
43548 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
43549 # var hexString = rgbNumber.toString(16);
43550 # var missingZeros = 6 - hexString.length;
43551 # var resultBuilder = ['#'];
43552 # for (var i = 0; i < missingZeros; i++) {
43553 # resultBuilder.push('0');
43554 # }
43555 # resultBuilder.push(hexString);
43556 # return resultBuilder.join('');
43557 # };
43558 #
43559 # // ...
43560 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
43561 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
43562 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043563 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043564 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043565 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043566 # This means that a value of 1.0 corresponds to a solid color, whereas
43567 # a value of 0.0 corresponds to a completely transparent color. This
43568 # uses a wrapper message rather than a simple float scalar so that it is
43569 # possible to distinguish between a default value and the value being unset.
43570 # If omitted, this color object is to be rendered as a solid color
43571 # (as if the alpha value had been explicitly given with a value of 1.0).
43572 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
43573 "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 -070043574 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080043575 "width": 42, # The width of the border, in pixels.
43576 # Deprecated; the width is determined by the "style" field.
43577 "style": "A String", # The style of the border.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043578 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070043579 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040043580 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
43581 "angle": 42, # The angle between the standard orientation and the desired orientation.
43582 # Measured in degrees. Valid values are between -90 and 90. Positive
43583 # angles are angled upwards, negative are angled downwards.
43584 #
43585 # Note: For LTR text direction positive angles are in the counterclockwise
43586 # direction, whereas for RTL they are in the clockwise direction
43587 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
43588 # characters is unchanged.
43589 # For example:
43590 #
43591 # | V |
43592 # | e |
43593 # | r |
43594 # | t |
43595 # | i |
43596 # | c |
43597 # | a |
43598 # | l |
43599 },
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 },
45272 "offsetYPixels": 42, # The vertical offset, in pixels, that the object is offset
45273 # from the anchor cell.
45274 "widthPixels": 42, # The width of the object, in pixels. Defaults to 600.
45275 "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.
45558 "format": { # The format of a run of text in a cell. # The format of the title.
45559 # Only valid if the axis is not associated with the domain.
45560 # Absent values indicate that the field isn't specified.
45561 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
45562 # for simplicity of conversion to/from color representations in various
45563 # languages over compactness; for example, the fields of this representation
45564 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
45565 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
45566 # method in iOS; and, with just a little work, it can be easily formatted into
45567 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
45568 #
45569 # Example (Java):
45570 #
45571 # import com.google.type.Color;
45572 #
45573 # // ...
45574 # public static java.awt.Color fromProto(Color protocolor) {
45575 # float alpha = protocolor.hasAlpha()
45576 # ? protocolor.getAlpha().getValue()
45577 # : 1.0;
45578 #
45579 # return new java.awt.Color(
45580 # protocolor.getRed(),
45581 # protocolor.getGreen(),
45582 # protocolor.getBlue(),
45583 # alpha);
45584 # }
45585 #
45586 # public static Color toProto(java.awt.Color color) {
45587 # float red = (float) color.getRed();
45588 # float green = (float) color.getGreen();
45589 # float blue = (float) color.getBlue();
45590 # float denominator = 255.0;
45591 # Color.Builder resultBuilder =
45592 # Color
45593 # .newBuilder()
45594 # .setRed(red / denominator)
45595 # .setGreen(green / denominator)
45596 # .setBlue(blue / denominator);
45597 # int alpha = color.getAlpha();
45598 # if (alpha != 255) {
45599 # result.setAlpha(
45600 # FloatValue
45601 # .newBuilder()
45602 # .setValue(((float) alpha) / denominator)
45603 # .build());
45604 # }
45605 # return resultBuilder.build();
45606 # }
45607 # // ...
45608 #
45609 # Example (iOS / Obj-C):
45610 #
45611 # // ...
45612 # static UIColor* fromProto(Color* protocolor) {
45613 # float red = [protocolor red];
45614 # float green = [protocolor green];
45615 # float blue = [protocolor blue];
45616 # FloatValue* alpha_wrapper = [protocolor alpha];
45617 # float alpha = 1.0;
45618 # if (alpha_wrapper != nil) {
45619 # alpha = [alpha_wrapper value];
45620 # }
45621 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
45622 # }
45623 #
45624 # static Color* toProto(UIColor* color) {
45625 # CGFloat red, green, blue, alpha;
45626 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
45627 # return nil;
45628 # }
45629 # Color* result = [Color alloc] init];
45630 # [result setRed:red];
45631 # [result setGreen:green];
45632 # [result setBlue:blue];
45633 # if (alpha <= 0.9999) {
45634 # [result setAlpha:floatWrapperWithValue(alpha)];
45635 # }
45636 # [result autorelease];
45637 # return result;
45638 # }
45639 # // ...
45640 #
45641 # Example (JavaScript):
45642 #
45643 # // ...
45644 #
45645 # var protoToCssColor = function(rgb_color) {
45646 # var redFrac = rgb_color.red || 0.0;
45647 # var greenFrac = rgb_color.green || 0.0;
45648 # var blueFrac = rgb_color.blue || 0.0;
45649 # var red = Math.floor(redFrac * 255);
45650 # var green = Math.floor(greenFrac * 255);
45651 # var blue = Math.floor(blueFrac * 255);
45652 #
45653 # if (!('alpha' in rgb_color)) {
45654 # return rgbToCssColor_(red, green, blue);
45655 # }
45656 #
45657 # var alphaFrac = rgb_color.alpha.value || 0.0;
45658 # var rgbParams = [red, green, blue].join(',');
45659 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
45660 # };
45661 #
45662 # var rgbToCssColor_ = function(red, green, blue) {
45663 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
45664 # var hexString = rgbNumber.toString(16);
45665 # var missingZeros = 6 - hexString.length;
45666 # var resultBuilder = ['#'];
45667 # for (var i = 0; i < missingZeros; i++) {
45668 # resultBuilder.push('0');
45669 # }
45670 # resultBuilder.push(hexString);
45671 # return resultBuilder.join('');
45672 # };
45673 #
45674 # // ...
45675 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
45676 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
45677 # the final pixel color is defined by the equation:
45678 #
45679 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
45680 #
45681 # This means that a value of 1.0 corresponds to a solid color, whereas
45682 # a value of 0.0 corresponds to a completely transparent color. This
45683 # uses a wrapper message rather than a simple float scalar so that it is
45684 # possible to distinguish between a default value and the value being unset.
45685 # If omitted, this color object is to be rendered as a solid color
45686 # (as if the alpha value had been explicitly given with a value of 1.0).
45687 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
45688 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
45689 },
45690 "bold": True or False, # True if the text is bold.
45691 "strikethrough": True or False, # True if the text has a strikethrough.
45692 "fontFamily": "A String", # The font family.
45693 "fontSize": 42, # The size of the font.
45694 "italic": True or False, # True if the text is italicized.
45695 "underline": True or False, # True if the text is underlined.
45696 },
45697 "title": "A String", # The title of this axis. If set, this overrides any title inferred
45698 # from headers of the data.
45699 },
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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045920 "rowMetadata": [ # Metadata about the requested rows in the grid, starting with the row
45921 # in start_row.
45922 { # Properties about a dimension.
45923 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
45924 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
45925 "hiddenByFilter": True or False, # True if this dimension is being filtered.
45926 # This field is read-only.
45927 },
45928 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040045929 "startRow": 42, # The first row this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045930 "startColumn": 42, # The first column this GridData refers to, zero-based.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045931 "rowData": [ # The data in the grid, one entry per row,
45932 # starting with the row in startRow.
45933 # The values in RowData will correspond to columns starting
45934 # at start_column.
45935 { # Data about each cell in a row.
45936 "values": [ # The values in the row, one per column.
45937 { # Data about a specific cell.
45938 "pivotTable": { # A pivot table. # A pivot table anchored at this cell. The size of pivot table itself
45939 # is computed dynamically based on its data, grouping, filters, values,
45940 # etc. Only the top-left cell of the pivot table contains the pivot table
45941 # definition. The other cells will contain the calculated values of the
45942 # results of the pivot in their effective_value fields.
45943 "valueLayout": "A String", # Whether values should be listed horizontally (as columns)
45944 # or vertically (as rows).
45945 "rows": [ # Each row grouping in the pivot table.
45946 { # A single grouping (either row or column) in a pivot table.
45947 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
45948 "valueMetadata": [ # Metadata about values in the grouping.
45949 { # Metadata about a value in a pivot grouping.
45950 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
45951 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
45952 # (Note that formulaValue is not valid,
45953 # because the values will be calculated.)
45954 "numberValue": 3.14, # Represents a double value.
45955 # Note: Dates, Times and DateTimes are represented as doubles in
45956 # "serial number" format.
45957 "boolValue": True or False, # Represents a boolean value.
45958 "formulaValue": "A String", # Represents a formula.
45959 "stringValue": "A String", # Represents a string value.
45960 # Leading single quotes are not included. For example, if the user typed
45961 # `'123` into the UI, this would be represented as a `stringValue` of
45962 # `"123"`.
45963 "errorValue": { # An error in a cell. # Represents an error.
45964 # This field is read-only.
45965 "message": "A String", # A message with more information about the error
45966 # (in the spreadsheet's locale).
45967 "type": "A String", # The type of error.
45968 },
45969 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070045970 },
45971 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080045972 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
45973 # If not specified, sorting is alphabetical by this group's values.
45974 "buckets": [ # Determines the bucket from which values are chosen to sort.
45975 #
45976 # For example, in a pivot table with one row group & two column groups,
45977 # the row group can list up to two values. The first value corresponds
45978 # to a value within the first column group, and the second value
45979 # corresponds to a value in the second column group. If no values
45980 # are listed, this would indicate that the row should be sorted according
45981 # to the "Grand Total" over the column groups. If a single value is listed,
45982 # this would correspond to using the "Total" of that bucket.
45983 { # The kinds of value that a cell in a spreadsheet can have.
45984 "numberValue": 3.14, # Represents a double value.
45985 # Note: Dates, Times and DateTimes are represented as doubles in
45986 # "serial number" format.
45987 "boolValue": True or False, # Represents a boolean value.
45988 "formulaValue": "A String", # Represents a formula.
45989 "stringValue": "A String", # Represents a string value.
45990 # Leading single quotes are not included. For example, if the user typed
45991 # `'123` into the UI, this would be represented as a `stringValue` of
45992 # `"123"`.
45993 "errorValue": { # An error in a cell. # Represents an error.
45994 # This field is read-only.
45995 "message": "A String", # A message with more information about the error
45996 # (in the spreadsheet's locale).
45997 "type": "A String", # The type of error.
45998 },
45999 },
46000 ],
46001 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
46002 # grouping should be sorted by.
46003 },
46004 "sortOrder": "A String", # The order the values in this group should be sorted.
46005 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
46006 #
46007 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46008 # means this group refers to column `C`, whereas the offset `1` would refer
46009 # to column `D`.
46010 },
46011 ],
46012 "source": { # A range on a sheet. # The range the pivot table is reading data from.
46013 # All indexes are zero-based.
46014 # Indexes are half open, e.g the start index is inclusive
46015 # and the end index is exclusive -- [start_index, end_index).
46016 # Missing indexes indicate the range is unbounded on that side.
46017 #
46018 # For example, if `"Sheet1"` is sheet ID 0, then:
46019 #
46020 # `Sheet1!A1:A1 == sheet_id: 0,
46021 # start_row_index: 0, end_row_index: 1,
46022 # start_column_index: 0, end_column_index: 1`
46023 #
46024 # `Sheet1!A3:B4 == sheet_id: 0,
46025 # start_row_index: 2, end_row_index: 4,
46026 # start_column_index: 0, end_column_index: 2`
46027 #
46028 # `Sheet1!A:B == sheet_id: 0,
46029 # start_column_index: 0, end_column_index: 2`
46030 #
46031 # `Sheet1!A5:B == sheet_id: 0,
46032 # start_row_index: 4,
46033 # start_column_index: 0, end_column_index: 2`
46034 #
46035 # `Sheet1 == sheet_id:0`
46036 #
46037 # The start index must always be less than or equal to the end index.
46038 # If the start index equals the end index, then the range is empty.
46039 # Empty ranges are typically not meaningful and are usually rendered in the
46040 # UI as `#REF!`.
46041 "endRowIndex": 42, # The end row (exclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046042 "endColumnIndex": 42, # The end column (exclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046043 "sheetId": 42, # The sheet this range is on.
46044 "startColumnIndex": 42, # The start column (inclusive) of the range, or not set if unbounded.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046045 "startRowIndex": 42, # The start row (inclusive) of the range, or not set if unbounded.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046046 },
46047 "values": [ # A list of values to include in the pivot table.
46048 { # The definition of how a value in a pivot table should be calculated.
46049 "formula": "A String", # A custom formula to calculate the value. The formula must start
46050 # with an `=` character.
46051 "summarizeFunction": "A String", # A function to summarize the value.
46052 # If formula is set, the only supported values are
46053 # SUM and
46054 # CUSTOM.
46055 # If sourceColumnOffset is set, then `CUSTOM`
46056 # is not supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046057 "name": "A String", # A name to use for the value. This is only used if formula was set.
46058 # Otherwise, the column name is used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046059 "sourceColumnOffset": 42, # The column offset of the source range that this value reads from.
46060 #
46061 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46062 # means this value refers to column `C`, whereas the offset `1` would
46063 # refer to column `D`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046064 },
46065 ],
46066 "criteria": { # An optional mapping of filters per source column offset.
46067 #
46068 # The filters will be applied before aggregating data into the pivot table.
46069 # The map's key is the column offset of the source range that you want to
46070 # filter, and the value is the criteria for that column.
46071 #
46072 # For example, if the source was `C10:E15`, a key of `0` will have the filter
46073 # for column `C`, whereas the key `1` is for column `D`.
46074 "a_key": { # Criteria for showing/hiding rows in a pivot table.
46075 "visibleValues": [ # Values that should be included. Values not listed here are excluded.
46076 "A String",
46077 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046078 },
46079 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046080 "columns": [ # Each column grouping in the pivot table.
46081 { # A single grouping (either row or column) in a pivot table.
46082 "showTotals": True or False, # True if the pivot table should include the totals for this grouping.
46083 "valueMetadata": [ # Metadata about values in the grouping.
46084 { # Metadata about a value in a pivot grouping.
46085 "collapsed": True or False, # True if the data corresponding to the value is collapsed.
46086 "value": { # The kinds of value that a cell in a spreadsheet can have. # The calculated value the metadata corresponds to.
46087 # (Note that formulaValue is not valid,
46088 # because the values will be calculated.)
46089 "numberValue": 3.14, # Represents a double value.
46090 # Note: Dates, Times and DateTimes are represented as doubles in
46091 # "serial number" format.
46092 "boolValue": True or False, # Represents a boolean value.
46093 "formulaValue": "A String", # Represents a formula.
46094 "stringValue": "A String", # Represents a string value.
46095 # Leading single quotes are not included. For example, if the user typed
46096 # `'123` into the UI, this would be represented as a `stringValue` of
46097 # `"123"`.
46098 "errorValue": { # An error in a cell. # Represents an error.
46099 # This field is read-only.
46100 "message": "A String", # A message with more information about the error
46101 # (in the spreadsheet's locale).
46102 "type": "A String", # The type of error.
46103 },
46104 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046105 },
46106 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046107 "valueBucket": { # Information about which values in a pivot group should be used for sorting. # The bucket of the opposite pivot group to sort by.
46108 # If not specified, sorting is alphabetical by this group's values.
46109 "buckets": [ # Determines the bucket from which values are chosen to sort.
46110 #
46111 # For example, in a pivot table with one row group & two column groups,
46112 # the row group can list up to two values. The first value corresponds
46113 # to a value within the first column group, and the second value
46114 # corresponds to a value in the second column group. If no values
46115 # are listed, this would indicate that the row should be sorted according
46116 # to the "Grand Total" over the column groups. If a single value is listed,
46117 # this would correspond to using the "Total" of that bucket.
46118 { # The kinds of value that a cell in a spreadsheet can have.
46119 "numberValue": 3.14, # Represents a double value.
46120 # Note: Dates, Times and DateTimes are represented as doubles in
46121 # "serial number" format.
46122 "boolValue": True or False, # Represents a boolean value.
46123 "formulaValue": "A String", # Represents a formula.
46124 "stringValue": "A String", # Represents a string value.
46125 # Leading single quotes are not included. For example, if the user typed
46126 # `'123` into the UI, this would be represented as a `stringValue` of
46127 # `"123"`.
46128 "errorValue": { # An error in a cell. # Represents an error.
46129 # This field is read-only.
46130 "message": "A String", # A message with more information about the error
46131 # (in the spreadsheet's locale).
46132 "type": "A String", # The type of error.
46133 },
46134 },
46135 ],
46136 "valuesIndex": 42, # The offset in the PivotTable.values list which the values in this
46137 # grouping should be sorted by.
46138 },
46139 "sortOrder": "A String", # The order the values in this group should be sorted.
46140 "sourceColumnOffset": 42, # The column offset of the source range that this grouping is based on.
46141 #
46142 # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`
46143 # means this group refers to column `C`, whereas the offset `1` would refer
46144 # to column `D`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046145 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046146 ],
46147 },
46148 "hyperlink": "A String", # A hyperlink this cell points to, if any.
46149 # This field is read-only. (To set it, use a `=HYPERLINK` formula.)
46150 "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
46151 # the calculated value. For cells with literals, this will be
46152 # the same as the user_entered_value.
46153 # This field is read-only.
46154 "numberValue": 3.14, # Represents a double value.
46155 # Note: Dates, Times and DateTimes are represented as doubles in
46156 # "serial number" format.
46157 "boolValue": True or False, # Represents a boolean value.
46158 "formulaValue": "A String", # Represents a formula.
46159 "stringValue": "A String", # Represents a string value.
46160 # Leading single quotes are not included. For example, if the user typed
46161 # `'123` into the UI, this would be represented as a `stringValue` of
46162 # `"123"`.
46163 "errorValue": { # An error in a cell. # Represents an error.
46164 # This field is read-only.
46165 "message": "A String", # A message with more information about the error
46166 # (in the spreadsheet's locale).
46167 "type": "A String", # The type of error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070046168 },
46169 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046170 "formattedValue": "A String", # The formatted value of the cell.
46171 # This is the value as it's shown to the user.
46172 # This field is read-only.
46173 "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()`
46174 # Note: Dates, Times and DateTimes are represented as doubles in
46175 # serial number format.
46176 "numberValue": 3.14, # Represents a double value.
46177 # Note: Dates, Times and DateTimes are represented as doubles in
46178 # "serial number" format.
46179 "boolValue": True or False, # Represents a boolean value.
46180 "formulaValue": "A String", # Represents a formula.
46181 "stringValue": "A String", # Represents a string value.
46182 # Leading single quotes are not included. For example, if the user typed
46183 # `'123` into the UI, this would be represented as a `stringValue` of
46184 # `"123"`.
46185 "errorValue": { # An error in a cell. # Represents an error.
46186 # This field is read-only.
46187 "message": "A String", # A message with more information about the error
46188 # (in the spreadsheet's locale).
46189 "type": "A String", # The type of error.
46190 },
46191 },
46192 "note": "A String", # Any note on the cell.
46193 "effectiveFormat": { # The format of a cell. # The effective format being used by the cell.
46194 # This includes the results of applying any conditional formatting and,
46195 # if the cell contains a formula, the computed number format.
46196 # If the effective format is the default format, effective format will
46197 # not be written.
46198 # This field is read-only.
46199 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
46200 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
46201 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046202 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046203 # information about the supported patterns.
46204 "type": "A String", # The type of the number format.
46205 # When writing, this field must be set.
46206 },
46207 "textDirection": "A String", # The direction of the text in the cell.
46208 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
46209 # When updating padding, every field must be specified.
46210 "top": 42, # The top padding of the cell.
46211 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046212 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046213 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046214 },
46215 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
46216 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
46217 # for simplicity of conversion to/from color representations in various
46218 # languages over compactness; for example, the fields of this representation
46219 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46220 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46221 # method in iOS; and, with just a little work, it can be easily formatted into
46222 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46223 #
46224 # Example (Java):
46225 #
46226 # import com.google.type.Color;
46227 #
46228 # // ...
46229 # public static java.awt.Color fromProto(Color protocolor) {
46230 # float alpha = protocolor.hasAlpha()
46231 # ? protocolor.getAlpha().getValue()
46232 # : 1.0;
46233 #
46234 # return new java.awt.Color(
46235 # protocolor.getRed(),
46236 # protocolor.getGreen(),
46237 # protocolor.getBlue(),
46238 # alpha);
46239 # }
46240 #
46241 # public static Color toProto(java.awt.Color color) {
46242 # float red = (float) color.getRed();
46243 # float green = (float) color.getGreen();
46244 # float blue = (float) color.getBlue();
46245 # float denominator = 255.0;
46246 # Color.Builder resultBuilder =
46247 # Color
46248 # .newBuilder()
46249 # .setRed(red / denominator)
46250 # .setGreen(green / denominator)
46251 # .setBlue(blue / denominator);
46252 # int alpha = color.getAlpha();
46253 # if (alpha != 255) {
46254 # result.setAlpha(
46255 # FloatValue
46256 # .newBuilder()
46257 # .setValue(((float) alpha) / denominator)
46258 # .build());
46259 # }
46260 # return resultBuilder.build();
46261 # }
46262 # // ...
46263 #
46264 # Example (iOS / Obj-C):
46265 #
46266 # // ...
46267 # static UIColor* fromProto(Color* protocolor) {
46268 # float red = [protocolor red];
46269 # float green = [protocolor green];
46270 # float blue = [protocolor blue];
46271 # FloatValue* alpha_wrapper = [protocolor alpha];
46272 # float alpha = 1.0;
46273 # if (alpha_wrapper != nil) {
46274 # alpha = [alpha_wrapper value];
46275 # }
46276 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46277 # }
46278 #
46279 # static Color* toProto(UIColor* color) {
46280 # CGFloat red, green, blue, alpha;
46281 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46282 # return nil;
46283 # }
46284 # Color* result = [Color alloc] init];
46285 # [result setRed:red];
46286 # [result setGreen:green];
46287 # [result setBlue:blue];
46288 # if (alpha <= 0.9999) {
46289 # [result setAlpha:floatWrapperWithValue(alpha)];
46290 # }
46291 # [result autorelease];
46292 # return result;
46293 # }
46294 # // ...
46295 #
46296 # Example (JavaScript):
46297 #
46298 # // ...
46299 #
46300 # var protoToCssColor = function(rgb_color) {
46301 # var redFrac = rgb_color.red || 0.0;
46302 # var greenFrac = rgb_color.green || 0.0;
46303 # var blueFrac = rgb_color.blue || 0.0;
46304 # var red = Math.floor(redFrac * 255);
46305 # var green = Math.floor(greenFrac * 255);
46306 # var blue = Math.floor(blueFrac * 255);
46307 #
46308 # if (!('alpha' in rgb_color)) {
46309 # return rgbToCssColor_(red, green, blue);
46310 # }
46311 #
46312 # var alphaFrac = rgb_color.alpha.value || 0.0;
46313 # var rgbParams = [red, green, blue].join(',');
46314 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46315 # };
46316 #
46317 # var rgbToCssColor_ = function(red, green, blue) {
46318 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46319 # var hexString = rgbNumber.toString(16);
46320 # var missingZeros = 6 - hexString.length;
46321 # var resultBuilder = ['#'];
46322 # for (var i = 0; i < missingZeros; i++) {
46323 # resultBuilder.push('0');
46324 # }
46325 # resultBuilder.push(hexString);
46326 # return resultBuilder.join('');
46327 # };
46328 #
46329 # // ...
46330 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46331 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46332 # the final pixel color is defined by the equation:
46333 #
46334 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46335 #
46336 # This means that a value of 1.0 corresponds to a solid color, whereas
46337 # a value of 0.0 corresponds to a completely transparent color. This
46338 # uses a wrapper message rather than a simple float scalar so that it is
46339 # possible to distinguish between a default value and the value being unset.
46340 # If omitted, this color object is to be rendered as a solid color
46341 # (as if the alpha value had been explicitly given with a value of 1.0).
46342 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46343 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46344 },
46345 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
46346 "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 -070046347 # Absent values indicate that the field isn't specified.
46348 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
46349 # for simplicity of conversion to/from color representations in various
46350 # languages over compactness; for example, the fields of this representation
46351 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46352 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46353 # method in iOS; and, with just a little work, it can be easily formatted into
46354 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46355 #
46356 # Example (Java):
46357 #
46358 # import com.google.type.Color;
46359 #
46360 # // ...
46361 # public static java.awt.Color fromProto(Color protocolor) {
46362 # float alpha = protocolor.hasAlpha()
46363 # ? protocolor.getAlpha().getValue()
46364 # : 1.0;
46365 #
46366 # return new java.awt.Color(
46367 # protocolor.getRed(),
46368 # protocolor.getGreen(),
46369 # protocolor.getBlue(),
46370 # alpha);
46371 # }
46372 #
46373 # public static Color toProto(java.awt.Color color) {
46374 # float red = (float) color.getRed();
46375 # float green = (float) color.getGreen();
46376 # float blue = (float) color.getBlue();
46377 # float denominator = 255.0;
46378 # Color.Builder resultBuilder =
46379 # Color
46380 # .newBuilder()
46381 # .setRed(red / denominator)
46382 # .setGreen(green / denominator)
46383 # .setBlue(blue / denominator);
46384 # int alpha = color.getAlpha();
46385 # if (alpha != 255) {
46386 # result.setAlpha(
46387 # FloatValue
46388 # .newBuilder()
46389 # .setValue(((float) alpha) / denominator)
46390 # .build());
46391 # }
46392 # return resultBuilder.build();
46393 # }
46394 # // ...
46395 #
46396 # Example (iOS / Obj-C):
46397 #
46398 # // ...
46399 # static UIColor* fromProto(Color* protocolor) {
46400 # float red = [protocolor red];
46401 # float green = [protocolor green];
46402 # float blue = [protocolor blue];
46403 # FloatValue* alpha_wrapper = [protocolor alpha];
46404 # float alpha = 1.0;
46405 # if (alpha_wrapper != nil) {
46406 # alpha = [alpha_wrapper value];
46407 # }
46408 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46409 # }
46410 #
46411 # static Color* toProto(UIColor* color) {
46412 # CGFloat red, green, blue, alpha;
46413 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46414 # return nil;
46415 # }
46416 # Color* result = [Color alloc] init];
46417 # [result setRed:red];
46418 # [result setGreen:green];
46419 # [result setBlue:blue];
46420 # if (alpha <= 0.9999) {
46421 # [result setAlpha:floatWrapperWithValue(alpha)];
46422 # }
46423 # [result autorelease];
46424 # return result;
46425 # }
46426 # // ...
46427 #
46428 # Example (JavaScript):
46429 #
46430 # // ...
46431 #
46432 # var protoToCssColor = function(rgb_color) {
46433 # var redFrac = rgb_color.red || 0.0;
46434 # var greenFrac = rgb_color.green || 0.0;
46435 # var blueFrac = rgb_color.blue || 0.0;
46436 # var red = Math.floor(redFrac * 255);
46437 # var green = Math.floor(greenFrac * 255);
46438 # var blue = Math.floor(blueFrac * 255);
46439 #
46440 # if (!('alpha' in rgb_color)) {
46441 # return rgbToCssColor_(red, green, blue);
46442 # }
46443 #
46444 # var alphaFrac = rgb_color.alpha.value || 0.0;
46445 # var rgbParams = [red, green, blue].join(',');
46446 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46447 # };
46448 #
46449 # var rgbToCssColor_ = function(red, green, blue) {
46450 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46451 # var hexString = rgbNumber.toString(16);
46452 # var missingZeros = 6 - hexString.length;
46453 # var resultBuilder = ['#'];
46454 # for (var i = 0; i < missingZeros; i++) {
46455 # resultBuilder.push('0');
46456 # }
46457 # resultBuilder.push(hexString);
46458 # return resultBuilder.join('');
46459 # };
46460 #
46461 # // ...
46462 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46463 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46464 # the final pixel color is defined by the equation:
46465 #
46466 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46467 #
46468 # This means that a value of 1.0 corresponds to a solid color, whereas
46469 # a value of 0.0 corresponds to a completely transparent color. This
46470 # uses a wrapper message rather than a simple float scalar so that it is
46471 # possible to distinguish between a default value and the value being unset.
46472 # If omitted, this color object is to be rendered as a solid color
46473 # (as if the alpha value had been explicitly given with a value of 1.0).
46474 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46475 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46476 },
46477 "bold": True or False, # True if the text is bold.
46478 "strikethrough": True or False, # True if the text has a strikethrough.
46479 "fontFamily": "A String", # The font family.
46480 "fontSize": 42, # The size of the font.
46481 "italic": True or False, # True if the text is italicized.
46482 "underline": True or False, # True if the text is underlined.
46483 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040046484 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080046485 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
46486 "borders": { # The borders of the cell. # The borders of the cell.
46487 "top": { # A border along a cell. # The top border of the cell.
46488 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46489 # for simplicity of conversion to/from color representations in various
46490 # languages over compactness; for example, the fields of this representation
46491 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46492 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46493 # method in iOS; and, with just a little work, it can be easily formatted into
46494 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46495 #
46496 # Example (Java):
46497 #
46498 # import com.google.type.Color;
46499 #
46500 # // ...
46501 # public static java.awt.Color fromProto(Color protocolor) {
46502 # float alpha = protocolor.hasAlpha()
46503 # ? protocolor.getAlpha().getValue()
46504 # : 1.0;
46505 #
46506 # return new java.awt.Color(
46507 # protocolor.getRed(),
46508 # protocolor.getGreen(),
46509 # protocolor.getBlue(),
46510 # alpha);
46511 # }
46512 #
46513 # public static Color toProto(java.awt.Color color) {
46514 # float red = (float) color.getRed();
46515 # float green = (float) color.getGreen();
46516 # float blue = (float) color.getBlue();
46517 # float denominator = 255.0;
46518 # Color.Builder resultBuilder =
46519 # Color
46520 # .newBuilder()
46521 # .setRed(red / denominator)
46522 # .setGreen(green / denominator)
46523 # .setBlue(blue / denominator);
46524 # int alpha = color.getAlpha();
46525 # if (alpha != 255) {
46526 # result.setAlpha(
46527 # FloatValue
46528 # .newBuilder()
46529 # .setValue(((float) alpha) / denominator)
46530 # .build());
46531 # }
46532 # return resultBuilder.build();
46533 # }
46534 # // ...
46535 #
46536 # Example (iOS / Obj-C):
46537 #
46538 # // ...
46539 # static UIColor* fromProto(Color* protocolor) {
46540 # float red = [protocolor red];
46541 # float green = [protocolor green];
46542 # float blue = [protocolor blue];
46543 # FloatValue* alpha_wrapper = [protocolor alpha];
46544 # float alpha = 1.0;
46545 # if (alpha_wrapper != nil) {
46546 # alpha = [alpha_wrapper value];
46547 # }
46548 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46549 # }
46550 #
46551 # static Color* toProto(UIColor* color) {
46552 # CGFloat red, green, blue, alpha;
46553 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46554 # return nil;
46555 # }
46556 # Color* result = [Color alloc] init];
46557 # [result setRed:red];
46558 # [result setGreen:green];
46559 # [result setBlue:blue];
46560 # if (alpha <= 0.9999) {
46561 # [result setAlpha:floatWrapperWithValue(alpha)];
46562 # }
46563 # [result autorelease];
46564 # return result;
46565 # }
46566 # // ...
46567 #
46568 # Example (JavaScript):
46569 #
46570 # // ...
46571 #
46572 # var protoToCssColor = function(rgb_color) {
46573 # var redFrac = rgb_color.red || 0.0;
46574 # var greenFrac = rgb_color.green || 0.0;
46575 # var blueFrac = rgb_color.blue || 0.0;
46576 # var red = Math.floor(redFrac * 255);
46577 # var green = Math.floor(greenFrac * 255);
46578 # var blue = Math.floor(blueFrac * 255);
46579 #
46580 # if (!('alpha' in rgb_color)) {
46581 # return rgbToCssColor_(red, green, blue);
46582 # }
46583 #
46584 # var alphaFrac = rgb_color.alpha.value || 0.0;
46585 # var rgbParams = [red, green, blue].join(',');
46586 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46587 # };
46588 #
46589 # var rgbToCssColor_ = function(red, green, blue) {
46590 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46591 # var hexString = rgbNumber.toString(16);
46592 # var missingZeros = 6 - hexString.length;
46593 # var resultBuilder = ['#'];
46594 # for (var i = 0; i < missingZeros; i++) {
46595 # resultBuilder.push('0');
46596 # }
46597 # resultBuilder.push(hexString);
46598 # return resultBuilder.join('');
46599 # };
46600 #
46601 # // ...
46602 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46603 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46604 # the final pixel color is defined by the equation:
46605 #
46606 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46607 #
46608 # This means that a value of 1.0 corresponds to a solid color, whereas
46609 # a value of 0.0 corresponds to a completely transparent color. This
46610 # uses a wrapper message rather than a simple float scalar so that it is
46611 # possible to distinguish between a default value and the value being unset.
46612 # If omitted, this color object is to be rendered as a solid color
46613 # (as if the alpha value had been explicitly given with a value of 1.0).
46614 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46615 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46616 },
46617 "width": 42, # The width of the border, in pixels.
46618 # Deprecated; the width is determined by the "style" field.
46619 "style": "A String", # The style of the border.
46620 },
46621 "right": { # A border along a cell. # The right border of the cell.
46622 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46623 # for simplicity of conversion to/from color representations in various
46624 # languages over compactness; for example, the fields of this representation
46625 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46626 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46627 # method in iOS; and, with just a little work, it can be easily formatted into
46628 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46629 #
46630 # Example (Java):
46631 #
46632 # import com.google.type.Color;
46633 #
46634 # // ...
46635 # public static java.awt.Color fromProto(Color protocolor) {
46636 # float alpha = protocolor.hasAlpha()
46637 # ? protocolor.getAlpha().getValue()
46638 # : 1.0;
46639 #
46640 # return new java.awt.Color(
46641 # protocolor.getRed(),
46642 # protocolor.getGreen(),
46643 # protocolor.getBlue(),
46644 # alpha);
46645 # }
46646 #
46647 # public static Color toProto(java.awt.Color color) {
46648 # float red = (float) color.getRed();
46649 # float green = (float) color.getGreen();
46650 # float blue = (float) color.getBlue();
46651 # float denominator = 255.0;
46652 # Color.Builder resultBuilder =
46653 # Color
46654 # .newBuilder()
46655 # .setRed(red / denominator)
46656 # .setGreen(green / denominator)
46657 # .setBlue(blue / denominator);
46658 # int alpha = color.getAlpha();
46659 # if (alpha != 255) {
46660 # result.setAlpha(
46661 # FloatValue
46662 # .newBuilder()
46663 # .setValue(((float) alpha) / denominator)
46664 # .build());
46665 # }
46666 # return resultBuilder.build();
46667 # }
46668 # // ...
46669 #
46670 # Example (iOS / Obj-C):
46671 #
46672 # // ...
46673 # static UIColor* fromProto(Color* protocolor) {
46674 # float red = [protocolor red];
46675 # float green = [protocolor green];
46676 # float blue = [protocolor blue];
46677 # FloatValue* alpha_wrapper = [protocolor alpha];
46678 # float alpha = 1.0;
46679 # if (alpha_wrapper != nil) {
46680 # alpha = [alpha_wrapper value];
46681 # }
46682 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46683 # }
46684 #
46685 # static Color* toProto(UIColor* color) {
46686 # CGFloat red, green, blue, alpha;
46687 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46688 # return nil;
46689 # }
46690 # Color* result = [Color alloc] init];
46691 # [result setRed:red];
46692 # [result setGreen:green];
46693 # [result setBlue:blue];
46694 # if (alpha <= 0.9999) {
46695 # [result setAlpha:floatWrapperWithValue(alpha)];
46696 # }
46697 # [result autorelease];
46698 # return result;
46699 # }
46700 # // ...
46701 #
46702 # Example (JavaScript):
46703 #
46704 # // ...
46705 #
46706 # var protoToCssColor = function(rgb_color) {
46707 # var redFrac = rgb_color.red || 0.0;
46708 # var greenFrac = rgb_color.green || 0.0;
46709 # var blueFrac = rgb_color.blue || 0.0;
46710 # var red = Math.floor(redFrac * 255);
46711 # var green = Math.floor(greenFrac * 255);
46712 # var blue = Math.floor(blueFrac * 255);
46713 #
46714 # if (!('alpha' in rgb_color)) {
46715 # return rgbToCssColor_(red, green, blue);
46716 # }
46717 #
46718 # var alphaFrac = rgb_color.alpha.value || 0.0;
46719 # var rgbParams = [red, green, blue].join(',');
46720 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46721 # };
46722 #
46723 # var rgbToCssColor_ = function(red, green, blue) {
46724 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46725 # var hexString = rgbNumber.toString(16);
46726 # var missingZeros = 6 - hexString.length;
46727 # var resultBuilder = ['#'];
46728 # for (var i = 0; i < missingZeros; i++) {
46729 # resultBuilder.push('0');
46730 # }
46731 # resultBuilder.push(hexString);
46732 # return resultBuilder.join('');
46733 # };
46734 #
46735 # // ...
46736 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46737 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46738 # the final pixel color is defined by the equation:
46739 #
46740 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46741 #
46742 # This means that a value of 1.0 corresponds to a solid color, whereas
46743 # a value of 0.0 corresponds to a completely transparent color. This
46744 # uses a wrapper message rather than a simple float scalar so that it is
46745 # possible to distinguish between a default value and the value being unset.
46746 # If omitted, this color object is to be rendered as a solid color
46747 # (as if the alpha value had been explicitly given with a value of 1.0).
46748 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46749 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46750 },
46751 "width": 42, # The width of the border, in pixels.
46752 # Deprecated; the width is determined by the "style" field.
46753 "style": "A String", # The style of the border.
46754 },
46755 "bottom": { # A border along a cell. # The bottom border of the cell.
46756 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46757 # for simplicity of conversion to/from color representations in various
46758 # languages over compactness; for example, the fields of this representation
46759 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46760 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46761 # method in iOS; and, with just a little work, it can be easily formatted into
46762 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46763 #
46764 # Example (Java):
46765 #
46766 # import com.google.type.Color;
46767 #
46768 # // ...
46769 # public static java.awt.Color fromProto(Color protocolor) {
46770 # float alpha = protocolor.hasAlpha()
46771 # ? protocolor.getAlpha().getValue()
46772 # : 1.0;
46773 #
46774 # return new java.awt.Color(
46775 # protocolor.getRed(),
46776 # protocolor.getGreen(),
46777 # protocolor.getBlue(),
46778 # alpha);
46779 # }
46780 #
46781 # public static Color toProto(java.awt.Color color) {
46782 # float red = (float) color.getRed();
46783 # float green = (float) color.getGreen();
46784 # float blue = (float) color.getBlue();
46785 # float denominator = 255.0;
46786 # Color.Builder resultBuilder =
46787 # Color
46788 # .newBuilder()
46789 # .setRed(red / denominator)
46790 # .setGreen(green / denominator)
46791 # .setBlue(blue / denominator);
46792 # int alpha = color.getAlpha();
46793 # if (alpha != 255) {
46794 # result.setAlpha(
46795 # FloatValue
46796 # .newBuilder()
46797 # .setValue(((float) alpha) / denominator)
46798 # .build());
46799 # }
46800 # return resultBuilder.build();
46801 # }
46802 # // ...
46803 #
46804 # Example (iOS / Obj-C):
46805 #
46806 # // ...
46807 # static UIColor* fromProto(Color* protocolor) {
46808 # float red = [protocolor red];
46809 # float green = [protocolor green];
46810 # float blue = [protocolor blue];
46811 # FloatValue* alpha_wrapper = [protocolor alpha];
46812 # float alpha = 1.0;
46813 # if (alpha_wrapper != nil) {
46814 # alpha = [alpha_wrapper value];
46815 # }
46816 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46817 # }
46818 #
46819 # static Color* toProto(UIColor* color) {
46820 # CGFloat red, green, blue, alpha;
46821 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46822 # return nil;
46823 # }
46824 # Color* result = [Color alloc] init];
46825 # [result setRed:red];
46826 # [result setGreen:green];
46827 # [result setBlue:blue];
46828 # if (alpha <= 0.9999) {
46829 # [result setAlpha:floatWrapperWithValue(alpha)];
46830 # }
46831 # [result autorelease];
46832 # return result;
46833 # }
46834 # // ...
46835 #
46836 # Example (JavaScript):
46837 #
46838 # // ...
46839 #
46840 # var protoToCssColor = function(rgb_color) {
46841 # var redFrac = rgb_color.red || 0.0;
46842 # var greenFrac = rgb_color.green || 0.0;
46843 # var blueFrac = rgb_color.blue || 0.0;
46844 # var red = Math.floor(redFrac * 255);
46845 # var green = Math.floor(greenFrac * 255);
46846 # var blue = Math.floor(blueFrac * 255);
46847 #
46848 # if (!('alpha' in rgb_color)) {
46849 # return rgbToCssColor_(red, green, blue);
46850 # }
46851 #
46852 # var alphaFrac = rgb_color.alpha.value || 0.0;
46853 # var rgbParams = [red, green, blue].join(',');
46854 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46855 # };
46856 #
46857 # var rgbToCssColor_ = function(red, green, blue) {
46858 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46859 # var hexString = rgbNumber.toString(16);
46860 # var missingZeros = 6 - hexString.length;
46861 # var resultBuilder = ['#'];
46862 # for (var i = 0; i < missingZeros; i++) {
46863 # resultBuilder.push('0');
46864 # }
46865 # resultBuilder.push(hexString);
46866 # return resultBuilder.join('');
46867 # };
46868 #
46869 # // ...
46870 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
46871 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
46872 # the final pixel color is defined by the equation:
46873 #
46874 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
46875 #
46876 # This means that a value of 1.0 corresponds to a solid color, whereas
46877 # a value of 0.0 corresponds to a completely transparent color. This
46878 # uses a wrapper message rather than a simple float scalar so that it is
46879 # possible to distinguish between a default value and the value being unset.
46880 # If omitted, this color object is to be rendered as a solid color
46881 # (as if the alpha value had been explicitly given with a value of 1.0).
46882 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
46883 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
46884 },
46885 "width": 42, # The width of the border, in pixels.
46886 # Deprecated; the width is determined by the "style" field.
46887 "style": "A String", # The style of the border.
46888 },
46889 "left": { # A border along a cell. # The left border of the cell.
46890 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
46891 # for simplicity of conversion to/from color representations in various
46892 # languages over compactness; for example, the fields of this representation
46893 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
46894 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
46895 # method in iOS; and, with just a little work, it can be easily formatted into
46896 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
46897 #
46898 # Example (Java):
46899 #
46900 # import com.google.type.Color;
46901 #
46902 # // ...
46903 # public static java.awt.Color fromProto(Color protocolor) {
46904 # float alpha = protocolor.hasAlpha()
46905 # ? protocolor.getAlpha().getValue()
46906 # : 1.0;
46907 #
46908 # return new java.awt.Color(
46909 # protocolor.getRed(),
46910 # protocolor.getGreen(),
46911 # protocolor.getBlue(),
46912 # alpha);
46913 # }
46914 #
46915 # public static Color toProto(java.awt.Color color) {
46916 # float red = (float) color.getRed();
46917 # float green = (float) color.getGreen();
46918 # float blue = (float) color.getBlue();
46919 # float denominator = 255.0;
46920 # Color.Builder resultBuilder =
46921 # Color
46922 # .newBuilder()
46923 # .setRed(red / denominator)
46924 # .setGreen(green / denominator)
46925 # .setBlue(blue / denominator);
46926 # int alpha = color.getAlpha();
46927 # if (alpha != 255) {
46928 # result.setAlpha(
46929 # FloatValue
46930 # .newBuilder()
46931 # .setValue(((float) alpha) / denominator)
46932 # .build());
46933 # }
46934 # return resultBuilder.build();
46935 # }
46936 # // ...
46937 #
46938 # Example (iOS / Obj-C):
46939 #
46940 # // ...
46941 # static UIColor* fromProto(Color* protocolor) {
46942 # float red = [protocolor red];
46943 # float green = [protocolor green];
46944 # float blue = [protocolor blue];
46945 # FloatValue* alpha_wrapper = [protocolor alpha];
46946 # float alpha = 1.0;
46947 # if (alpha_wrapper != nil) {
46948 # alpha = [alpha_wrapper value];
46949 # }
46950 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
46951 # }
46952 #
46953 # static Color* toProto(UIColor* color) {
46954 # CGFloat red, green, blue, alpha;
46955 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
46956 # return nil;
46957 # }
46958 # Color* result = [Color alloc] init];
46959 # [result setRed:red];
46960 # [result setGreen:green];
46961 # [result setBlue:blue];
46962 # if (alpha <= 0.9999) {
46963 # [result setAlpha:floatWrapperWithValue(alpha)];
46964 # }
46965 # [result autorelease];
46966 # return result;
46967 # }
46968 # // ...
46969 #
46970 # Example (JavaScript):
46971 #
46972 # // ...
46973 #
46974 # var protoToCssColor = function(rgb_color) {
46975 # var redFrac = rgb_color.red || 0.0;
46976 # var greenFrac = rgb_color.green || 0.0;
46977 # var blueFrac = rgb_color.blue || 0.0;
46978 # var red = Math.floor(redFrac * 255);
46979 # var green = Math.floor(greenFrac * 255);
46980 # var blue = Math.floor(blueFrac * 255);
46981 #
46982 # if (!('alpha' in rgb_color)) {
46983 # return rgbToCssColor_(red, green, blue);
46984 # }
46985 #
46986 # var alphaFrac = rgb_color.alpha.value || 0.0;
46987 # var rgbParams = [red, green, blue].join(',');
46988 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
46989 # };
46990 #
46991 # var rgbToCssColor_ = function(red, green, blue) {
46992 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
46993 # var hexString = rgbNumber.toString(16);
46994 # var missingZeros = 6 - hexString.length;
46995 # var resultBuilder = ['#'];
46996 # for (var i = 0; i < missingZeros; i++) {
46997 # resultBuilder.push('0');
46998 # }
46999 # resultBuilder.push(hexString);
47000 # return resultBuilder.join('');
47001 # };
47002 #
47003 # // ...
47004 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47005 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47006 # the final pixel color is defined by the equation:
47007 #
47008 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47009 #
47010 # This means that a value of 1.0 corresponds to a solid color, whereas
47011 # a value of 0.0 corresponds to a completely transparent color. This
47012 # uses a wrapper message rather than a simple float scalar so that it is
47013 # possible to distinguish between a default value and the value being unset.
47014 # If omitted, this color object is to be rendered as a solid color
47015 # (as if the alpha value had been explicitly given with a value of 1.0).
47016 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47017 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47018 },
47019 "width": 42, # The width of the border, in pixels.
47020 # Deprecated; the width is determined by the "style" field.
47021 "style": "A String", # The style of the border.
47022 },
47023 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047024 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
47025 "angle": 42, # The angle between the standard orientation and the desired orientation.
47026 # Measured in degrees. Valid values are between -90 and 90. Positive
47027 # angles are angled upwards, negative are angled downwards.
47028 #
47029 # Note: For LTR text direction positive angles are in the counterclockwise
47030 # direction, whereas for RTL they are in the clockwise direction
47031 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
47032 # characters is unchanged.
47033 # For example:
47034 #
47035 # | V |
47036 # | e |
47037 # | r |
47038 # | t |
47039 # | i |
47040 # | c |
47041 # | a |
47042 # | l |
47043 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047044 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047045 "userEnteredFormat": { # The format of a cell. # The format the user entered for the cell.
47046 #
47047 # When writing, the new format will be merged with the existing format.
47048 "numberFormat": { # The number format of a cell. # A format describing how number values should be represented to the user.
47049 "pattern": "A String", # Pattern string used for formatting. If not set, a default pattern based on
47050 # the user's locale will be used if necessary for the given type.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047051 # See the [Date and Number Formats guide](/sheets/api/guides/formats) for more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047052 # information about the supported patterns.
47053 "type": "A String", # The type of the number format.
47054 # When writing, this field must be set.
47055 },
47056 "textDirection": "A String", # The direction of the text in the cell.
47057 "padding": { # The amount of padding around the cell, in pixels. # The padding of the cell.
47058 # When updating padding, every field must be specified.
47059 "top": 42, # The top padding of the cell.
47060 "right": 42, # The right padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047061 "left": 42, # The left padding of the cell.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047062 "bottom": 42, # The bottom padding of the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047063 },
47064 "horizontalAlignment": "A String", # The horizontal alignment of the value in the cell.
47065 "backgroundColor": { # Represents a color in the RGBA color space. This representation is designed # The background color of the cell.
47066 # for simplicity of conversion to/from color representations in various
47067 # languages over compactness; for example, the fields of this representation
47068 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47069 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47070 # method in iOS; and, with just a little work, it can be easily formatted into
47071 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47072 #
47073 # Example (Java):
47074 #
47075 # import com.google.type.Color;
47076 #
47077 # // ...
47078 # public static java.awt.Color fromProto(Color protocolor) {
47079 # float alpha = protocolor.hasAlpha()
47080 # ? protocolor.getAlpha().getValue()
47081 # : 1.0;
47082 #
47083 # return new java.awt.Color(
47084 # protocolor.getRed(),
47085 # protocolor.getGreen(),
47086 # protocolor.getBlue(),
47087 # alpha);
47088 # }
47089 #
47090 # public static Color toProto(java.awt.Color color) {
47091 # float red = (float) color.getRed();
47092 # float green = (float) color.getGreen();
47093 # float blue = (float) color.getBlue();
47094 # float denominator = 255.0;
47095 # Color.Builder resultBuilder =
47096 # Color
47097 # .newBuilder()
47098 # .setRed(red / denominator)
47099 # .setGreen(green / denominator)
47100 # .setBlue(blue / denominator);
47101 # int alpha = color.getAlpha();
47102 # if (alpha != 255) {
47103 # result.setAlpha(
47104 # FloatValue
47105 # .newBuilder()
47106 # .setValue(((float) alpha) / denominator)
47107 # .build());
47108 # }
47109 # return resultBuilder.build();
47110 # }
47111 # // ...
47112 #
47113 # Example (iOS / Obj-C):
47114 #
47115 # // ...
47116 # static UIColor* fromProto(Color* protocolor) {
47117 # float red = [protocolor red];
47118 # float green = [protocolor green];
47119 # float blue = [protocolor blue];
47120 # FloatValue* alpha_wrapper = [protocolor alpha];
47121 # float alpha = 1.0;
47122 # if (alpha_wrapper != nil) {
47123 # alpha = [alpha_wrapper value];
47124 # }
47125 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47126 # }
47127 #
47128 # static Color* toProto(UIColor* color) {
47129 # CGFloat red, green, blue, alpha;
47130 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47131 # return nil;
47132 # }
47133 # Color* result = [Color alloc] init];
47134 # [result setRed:red];
47135 # [result setGreen:green];
47136 # [result setBlue:blue];
47137 # if (alpha <= 0.9999) {
47138 # [result setAlpha:floatWrapperWithValue(alpha)];
47139 # }
47140 # [result autorelease];
47141 # return result;
47142 # }
47143 # // ...
47144 #
47145 # Example (JavaScript):
47146 #
47147 # // ...
47148 #
47149 # var protoToCssColor = function(rgb_color) {
47150 # var redFrac = rgb_color.red || 0.0;
47151 # var greenFrac = rgb_color.green || 0.0;
47152 # var blueFrac = rgb_color.blue || 0.0;
47153 # var red = Math.floor(redFrac * 255);
47154 # var green = Math.floor(greenFrac * 255);
47155 # var blue = Math.floor(blueFrac * 255);
47156 #
47157 # if (!('alpha' in rgb_color)) {
47158 # return rgbToCssColor_(red, green, blue);
47159 # }
47160 #
47161 # var alphaFrac = rgb_color.alpha.value || 0.0;
47162 # var rgbParams = [red, green, blue].join(',');
47163 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47164 # };
47165 #
47166 # var rgbToCssColor_ = function(red, green, blue) {
47167 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47168 # var hexString = rgbNumber.toString(16);
47169 # var missingZeros = 6 - hexString.length;
47170 # var resultBuilder = ['#'];
47171 # for (var i = 0; i < missingZeros; i++) {
47172 # resultBuilder.push('0');
47173 # }
47174 # resultBuilder.push(hexString);
47175 # return resultBuilder.join('');
47176 # };
47177 #
47178 # // ...
47179 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47180 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47181 # the final pixel color is defined by the equation:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070047182 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047183 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47184 #
47185 # This means that a value of 1.0 corresponds to a solid color, whereas
47186 # a value of 0.0 corresponds to a completely transparent color. This
47187 # uses a wrapper message rather than a simple float scalar so that it is
47188 # possible to distinguish between a default value and the value being unset.
47189 # If omitted, this color object is to be rendered as a solid color
47190 # (as if the alpha value had been explicitly given with a value of 1.0).
47191 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47192 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47193 },
47194 "verticalAlignment": "A String", # The vertical alignment of the value in the cell.
47195 "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).
47196 # Absent values indicate that the field isn't specified.
47197 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
47198 # for simplicity of conversion to/from color representations in various
47199 # languages over compactness; for example, the fields of this representation
47200 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47201 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47202 # method in iOS; and, with just a little work, it can be easily formatted into
47203 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47204 #
47205 # Example (Java):
47206 #
47207 # import com.google.type.Color;
47208 #
47209 # // ...
47210 # public static java.awt.Color fromProto(Color protocolor) {
47211 # float alpha = protocolor.hasAlpha()
47212 # ? protocolor.getAlpha().getValue()
47213 # : 1.0;
47214 #
47215 # return new java.awt.Color(
47216 # protocolor.getRed(),
47217 # protocolor.getGreen(),
47218 # protocolor.getBlue(),
47219 # alpha);
47220 # }
47221 #
47222 # public static Color toProto(java.awt.Color color) {
47223 # float red = (float) color.getRed();
47224 # float green = (float) color.getGreen();
47225 # float blue = (float) color.getBlue();
47226 # float denominator = 255.0;
47227 # Color.Builder resultBuilder =
47228 # Color
47229 # .newBuilder()
47230 # .setRed(red / denominator)
47231 # .setGreen(green / denominator)
47232 # .setBlue(blue / denominator);
47233 # int alpha = color.getAlpha();
47234 # if (alpha != 255) {
47235 # result.setAlpha(
47236 # FloatValue
47237 # .newBuilder()
47238 # .setValue(((float) alpha) / denominator)
47239 # .build());
47240 # }
47241 # return resultBuilder.build();
47242 # }
47243 # // ...
47244 #
47245 # Example (iOS / Obj-C):
47246 #
47247 # // ...
47248 # static UIColor* fromProto(Color* protocolor) {
47249 # float red = [protocolor red];
47250 # float green = [protocolor green];
47251 # float blue = [protocolor blue];
47252 # FloatValue* alpha_wrapper = [protocolor alpha];
47253 # float alpha = 1.0;
47254 # if (alpha_wrapper != nil) {
47255 # alpha = [alpha_wrapper value];
47256 # }
47257 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47258 # }
47259 #
47260 # static Color* toProto(UIColor* color) {
47261 # CGFloat red, green, blue, alpha;
47262 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47263 # return nil;
47264 # }
47265 # Color* result = [Color alloc] init];
47266 # [result setRed:red];
47267 # [result setGreen:green];
47268 # [result setBlue:blue];
47269 # if (alpha <= 0.9999) {
47270 # [result setAlpha:floatWrapperWithValue(alpha)];
47271 # }
47272 # [result autorelease];
47273 # return result;
47274 # }
47275 # // ...
47276 #
47277 # Example (JavaScript):
47278 #
47279 # // ...
47280 #
47281 # var protoToCssColor = function(rgb_color) {
47282 # var redFrac = rgb_color.red || 0.0;
47283 # var greenFrac = rgb_color.green || 0.0;
47284 # var blueFrac = rgb_color.blue || 0.0;
47285 # var red = Math.floor(redFrac * 255);
47286 # var green = Math.floor(greenFrac * 255);
47287 # var blue = Math.floor(blueFrac * 255);
47288 #
47289 # if (!('alpha' in rgb_color)) {
47290 # return rgbToCssColor_(red, green, blue);
47291 # }
47292 #
47293 # var alphaFrac = rgb_color.alpha.value || 0.0;
47294 # var rgbParams = [red, green, blue].join(',');
47295 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47296 # };
47297 #
47298 # var rgbToCssColor_ = function(red, green, blue) {
47299 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47300 # var hexString = rgbNumber.toString(16);
47301 # var missingZeros = 6 - hexString.length;
47302 # var resultBuilder = ['#'];
47303 # for (var i = 0; i < missingZeros; i++) {
47304 # resultBuilder.push('0');
47305 # }
47306 # resultBuilder.push(hexString);
47307 # return resultBuilder.join('');
47308 # };
47309 #
47310 # // ...
47311 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47312 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47313 # the final pixel color is defined by the equation:
47314 #
47315 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47316 #
47317 # This means that a value of 1.0 corresponds to a solid color, whereas
47318 # a value of 0.0 corresponds to a completely transparent color. This
47319 # uses a wrapper message rather than a simple float scalar so that it is
47320 # possible to distinguish between a default value and the value being unset.
47321 # If omitted, this color object is to be rendered as a solid color
47322 # (as if the alpha value had been explicitly given with a value of 1.0).
47323 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47324 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47325 },
47326 "bold": True or False, # True if the text is bold.
47327 "strikethrough": True or False, # True if the text has a strikethrough.
47328 "fontFamily": "A String", # The font family.
47329 "fontSize": 42, # The size of the font.
47330 "italic": True or False, # True if the text is italicized.
47331 "underline": True or False, # True if the text is underlined.
47332 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047333 "wrapStrategy": "A String", # The wrap strategy for the value in the cell.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047334 "hyperlinkDisplayType": "A String", # How a hyperlink, if it exists, should be displayed in the cell.
47335 "borders": { # The borders of the cell. # The borders of the cell.
47336 "top": { # A border along a cell. # The top border of the cell.
47337 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47338 # for simplicity of conversion to/from color representations in various
47339 # languages over compactness; for example, the fields of this representation
47340 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47341 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47342 # method in iOS; and, with just a little work, it can be easily formatted into
47343 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47344 #
47345 # Example (Java):
47346 #
47347 # import com.google.type.Color;
47348 #
47349 # // ...
47350 # public static java.awt.Color fromProto(Color protocolor) {
47351 # float alpha = protocolor.hasAlpha()
47352 # ? protocolor.getAlpha().getValue()
47353 # : 1.0;
47354 #
47355 # return new java.awt.Color(
47356 # protocolor.getRed(),
47357 # protocolor.getGreen(),
47358 # protocolor.getBlue(),
47359 # alpha);
47360 # }
47361 #
47362 # public static Color toProto(java.awt.Color color) {
47363 # float red = (float) color.getRed();
47364 # float green = (float) color.getGreen();
47365 # float blue = (float) color.getBlue();
47366 # float denominator = 255.0;
47367 # Color.Builder resultBuilder =
47368 # Color
47369 # .newBuilder()
47370 # .setRed(red / denominator)
47371 # .setGreen(green / denominator)
47372 # .setBlue(blue / denominator);
47373 # int alpha = color.getAlpha();
47374 # if (alpha != 255) {
47375 # result.setAlpha(
47376 # FloatValue
47377 # .newBuilder()
47378 # .setValue(((float) alpha) / denominator)
47379 # .build());
47380 # }
47381 # return resultBuilder.build();
47382 # }
47383 # // ...
47384 #
47385 # Example (iOS / Obj-C):
47386 #
47387 # // ...
47388 # static UIColor* fromProto(Color* protocolor) {
47389 # float red = [protocolor red];
47390 # float green = [protocolor green];
47391 # float blue = [protocolor blue];
47392 # FloatValue* alpha_wrapper = [protocolor alpha];
47393 # float alpha = 1.0;
47394 # if (alpha_wrapper != nil) {
47395 # alpha = [alpha_wrapper value];
47396 # }
47397 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47398 # }
47399 #
47400 # static Color* toProto(UIColor* color) {
47401 # CGFloat red, green, blue, alpha;
47402 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47403 # return nil;
47404 # }
47405 # Color* result = [Color alloc] init];
47406 # [result setRed:red];
47407 # [result setGreen:green];
47408 # [result setBlue:blue];
47409 # if (alpha <= 0.9999) {
47410 # [result setAlpha:floatWrapperWithValue(alpha)];
47411 # }
47412 # [result autorelease];
47413 # return result;
47414 # }
47415 # // ...
47416 #
47417 # Example (JavaScript):
47418 #
47419 # // ...
47420 #
47421 # var protoToCssColor = function(rgb_color) {
47422 # var redFrac = rgb_color.red || 0.0;
47423 # var greenFrac = rgb_color.green || 0.0;
47424 # var blueFrac = rgb_color.blue || 0.0;
47425 # var red = Math.floor(redFrac * 255);
47426 # var green = Math.floor(greenFrac * 255);
47427 # var blue = Math.floor(blueFrac * 255);
47428 #
47429 # if (!('alpha' in rgb_color)) {
47430 # return rgbToCssColor_(red, green, blue);
47431 # }
47432 #
47433 # var alphaFrac = rgb_color.alpha.value || 0.0;
47434 # var rgbParams = [red, green, blue].join(',');
47435 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47436 # };
47437 #
47438 # var rgbToCssColor_ = function(red, green, blue) {
47439 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47440 # var hexString = rgbNumber.toString(16);
47441 # var missingZeros = 6 - hexString.length;
47442 # var resultBuilder = ['#'];
47443 # for (var i = 0; i < missingZeros; i++) {
47444 # resultBuilder.push('0');
47445 # }
47446 # resultBuilder.push(hexString);
47447 # return resultBuilder.join('');
47448 # };
47449 #
47450 # // ...
47451 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47452 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47453 # the final pixel color is defined by the equation:
47454 #
47455 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47456 #
47457 # This means that a value of 1.0 corresponds to a solid color, whereas
47458 # a value of 0.0 corresponds to a completely transparent color. This
47459 # uses a wrapper message rather than a simple float scalar so that it is
47460 # possible to distinguish between a default value and the value being unset.
47461 # If omitted, this color object is to be rendered as a solid color
47462 # (as if the alpha value had been explicitly given with a value of 1.0).
47463 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47464 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47465 },
47466 "width": 42, # The width of the border, in pixels.
47467 # Deprecated; the width is determined by the "style" field.
47468 "style": "A String", # The style of the border.
47469 },
47470 "right": { # A border along a cell. # The right border of the cell.
47471 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47472 # for simplicity of conversion to/from color representations in various
47473 # languages over compactness; for example, the fields of this representation
47474 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47475 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47476 # method in iOS; and, with just a little work, it can be easily formatted into
47477 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47478 #
47479 # Example (Java):
47480 #
47481 # import com.google.type.Color;
47482 #
47483 # // ...
47484 # public static java.awt.Color fromProto(Color protocolor) {
47485 # float alpha = protocolor.hasAlpha()
47486 # ? protocolor.getAlpha().getValue()
47487 # : 1.0;
47488 #
47489 # return new java.awt.Color(
47490 # protocolor.getRed(),
47491 # protocolor.getGreen(),
47492 # protocolor.getBlue(),
47493 # alpha);
47494 # }
47495 #
47496 # public static Color toProto(java.awt.Color color) {
47497 # float red = (float) color.getRed();
47498 # float green = (float) color.getGreen();
47499 # float blue = (float) color.getBlue();
47500 # float denominator = 255.0;
47501 # Color.Builder resultBuilder =
47502 # Color
47503 # .newBuilder()
47504 # .setRed(red / denominator)
47505 # .setGreen(green / denominator)
47506 # .setBlue(blue / denominator);
47507 # int alpha = color.getAlpha();
47508 # if (alpha != 255) {
47509 # result.setAlpha(
47510 # FloatValue
47511 # .newBuilder()
47512 # .setValue(((float) alpha) / denominator)
47513 # .build());
47514 # }
47515 # return resultBuilder.build();
47516 # }
47517 # // ...
47518 #
47519 # Example (iOS / Obj-C):
47520 #
47521 # // ...
47522 # static UIColor* fromProto(Color* protocolor) {
47523 # float red = [protocolor red];
47524 # float green = [protocolor green];
47525 # float blue = [protocolor blue];
47526 # FloatValue* alpha_wrapper = [protocolor alpha];
47527 # float alpha = 1.0;
47528 # if (alpha_wrapper != nil) {
47529 # alpha = [alpha_wrapper value];
47530 # }
47531 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47532 # }
47533 #
47534 # static Color* toProto(UIColor* color) {
47535 # CGFloat red, green, blue, alpha;
47536 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47537 # return nil;
47538 # }
47539 # Color* result = [Color alloc] init];
47540 # [result setRed:red];
47541 # [result setGreen:green];
47542 # [result setBlue:blue];
47543 # if (alpha <= 0.9999) {
47544 # [result setAlpha:floatWrapperWithValue(alpha)];
47545 # }
47546 # [result autorelease];
47547 # return result;
47548 # }
47549 # // ...
47550 #
47551 # Example (JavaScript):
47552 #
47553 # // ...
47554 #
47555 # var protoToCssColor = function(rgb_color) {
47556 # var redFrac = rgb_color.red || 0.0;
47557 # var greenFrac = rgb_color.green || 0.0;
47558 # var blueFrac = rgb_color.blue || 0.0;
47559 # var red = Math.floor(redFrac * 255);
47560 # var green = Math.floor(greenFrac * 255);
47561 # var blue = Math.floor(blueFrac * 255);
47562 #
47563 # if (!('alpha' in rgb_color)) {
47564 # return rgbToCssColor_(red, green, blue);
47565 # }
47566 #
47567 # var alphaFrac = rgb_color.alpha.value || 0.0;
47568 # var rgbParams = [red, green, blue].join(',');
47569 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47570 # };
47571 #
47572 # var rgbToCssColor_ = function(red, green, blue) {
47573 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47574 # var hexString = rgbNumber.toString(16);
47575 # var missingZeros = 6 - hexString.length;
47576 # var resultBuilder = ['#'];
47577 # for (var i = 0; i < missingZeros; i++) {
47578 # resultBuilder.push('0');
47579 # }
47580 # resultBuilder.push(hexString);
47581 # return resultBuilder.join('');
47582 # };
47583 #
47584 # // ...
47585 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47586 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47587 # the final pixel color is defined by the equation:
47588 #
47589 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47590 #
47591 # This means that a value of 1.0 corresponds to a solid color, whereas
47592 # a value of 0.0 corresponds to a completely transparent color. This
47593 # uses a wrapper message rather than a simple float scalar so that it is
47594 # possible to distinguish between a default value and the value being unset.
47595 # If omitted, this color object is to be rendered as a solid color
47596 # (as if the alpha value had been explicitly given with a value of 1.0).
47597 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47598 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47599 },
47600 "width": 42, # The width of the border, in pixels.
47601 # Deprecated; the width is determined by the "style" field.
47602 "style": "A String", # The style of the border.
47603 },
47604 "bottom": { # A border along a cell. # The bottom border of the cell.
47605 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47606 # for simplicity of conversion to/from color representations in various
47607 # languages over compactness; for example, the fields of this representation
47608 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47609 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47610 # method in iOS; and, with just a little work, it can be easily formatted into
47611 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47612 #
47613 # Example (Java):
47614 #
47615 # import com.google.type.Color;
47616 #
47617 # // ...
47618 # public static java.awt.Color fromProto(Color protocolor) {
47619 # float alpha = protocolor.hasAlpha()
47620 # ? protocolor.getAlpha().getValue()
47621 # : 1.0;
47622 #
47623 # return new java.awt.Color(
47624 # protocolor.getRed(),
47625 # protocolor.getGreen(),
47626 # protocolor.getBlue(),
47627 # alpha);
47628 # }
47629 #
47630 # public static Color toProto(java.awt.Color color) {
47631 # float red = (float) color.getRed();
47632 # float green = (float) color.getGreen();
47633 # float blue = (float) color.getBlue();
47634 # float denominator = 255.0;
47635 # Color.Builder resultBuilder =
47636 # Color
47637 # .newBuilder()
47638 # .setRed(red / denominator)
47639 # .setGreen(green / denominator)
47640 # .setBlue(blue / denominator);
47641 # int alpha = color.getAlpha();
47642 # if (alpha != 255) {
47643 # result.setAlpha(
47644 # FloatValue
47645 # .newBuilder()
47646 # .setValue(((float) alpha) / denominator)
47647 # .build());
47648 # }
47649 # return resultBuilder.build();
47650 # }
47651 # // ...
47652 #
47653 # Example (iOS / Obj-C):
47654 #
47655 # // ...
47656 # static UIColor* fromProto(Color* protocolor) {
47657 # float red = [protocolor red];
47658 # float green = [protocolor green];
47659 # float blue = [protocolor blue];
47660 # FloatValue* alpha_wrapper = [protocolor alpha];
47661 # float alpha = 1.0;
47662 # if (alpha_wrapper != nil) {
47663 # alpha = [alpha_wrapper value];
47664 # }
47665 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47666 # }
47667 #
47668 # static Color* toProto(UIColor* color) {
47669 # CGFloat red, green, blue, alpha;
47670 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47671 # return nil;
47672 # }
47673 # Color* result = [Color alloc] init];
47674 # [result setRed:red];
47675 # [result setGreen:green];
47676 # [result setBlue:blue];
47677 # if (alpha <= 0.9999) {
47678 # [result setAlpha:floatWrapperWithValue(alpha)];
47679 # }
47680 # [result autorelease];
47681 # return result;
47682 # }
47683 # // ...
47684 #
47685 # Example (JavaScript):
47686 #
47687 # // ...
47688 #
47689 # var protoToCssColor = function(rgb_color) {
47690 # var redFrac = rgb_color.red || 0.0;
47691 # var greenFrac = rgb_color.green || 0.0;
47692 # var blueFrac = rgb_color.blue || 0.0;
47693 # var red = Math.floor(redFrac * 255);
47694 # var green = Math.floor(greenFrac * 255);
47695 # var blue = Math.floor(blueFrac * 255);
47696 #
47697 # if (!('alpha' in rgb_color)) {
47698 # return rgbToCssColor_(red, green, blue);
47699 # }
47700 #
47701 # var alphaFrac = rgb_color.alpha.value || 0.0;
47702 # var rgbParams = [red, green, blue].join(',');
47703 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47704 # };
47705 #
47706 # var rgbToCssColor_ = function(red, green, blue) {
47707 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47708 # var hexString = rgbNumber.toString(16);
47709 # var missingZeros = 6 - hexString.length;
47710 # var resultBuilder = ['#'];
47711 # for (var i = 0; i < missingZeros; i++) {
47712 # resultBuilder.push('0');
47713 # }
47714 # resultBuilder.push(hexString);
47715 # return resultBuilder.join('');
47716 # };
47717 #
47718 # // ...
47719 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47720 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47721 # the final pixel color is defined by the equation:
47722 #
47723 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47724 #
47725 # This means that a value of 1.0 corresponds to a solid color, whereas
47726 # a value of 0.0 corresponds to a completely transparent color. This
47727 # uses a wrapper message rather than a simple float scalar so that it is
47728 # possible to distinguish between a default value and the value being unset.
47729 # If omitted, this color object is to be rendered as a solid color
47730 # (as if the alpha value had been explicitly given with a value of 1.0).
47731 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47732 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47733 },
47734 "width": 42, # The width of the border, in pixels.
47735 # Deprecated; the width is determined by the "style" field.
47736 "style": "A String", # The style of the border.
47737 },
47738 "left": { # A border along a cell. # The left border of the cell.
47739 "color": { # Represents a color in the RGBA color space. This representation is designed # The color of the border.
47740 # for simplicity of conversion to/from color representations in various
47741 # languages over compactness; for example, the fields of this representation
47742 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47743 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47744 # method in iOS; and, with just a little work, it can be easily formatted into
47745 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47746 #
47747 # Example (Java):
47748 #
47749 # import com.google.type.Color;
47750 #
47751 # // ...
47752 # public static java.awt.Color fromProto(Color protocolor) {
47753 # float alpha = protocolor.hasAlpha()
47754 # ? protocolor.getAlpha().getValue()
47755 # : 1.0;
47756 #
47757 # return new java.awt.Color(
47758 # protocolor.getRed(),
47759 # protocolor.getGreen(),
47760 # protocolor.getBlue(),
47761 # alpha);
47762 # }
47763 #
47764 # public static Color toProto(java.awt.Color color) {
47765 # float red = (float) color.getRed();
47766 # float green = (float) color.getGreen();
47767 # float blue = (float) color.getBlue();
47768 # float denominator = 255.0;
47769 # Color.Builder resultBuilder =
47770 # Color
47771 # .newBuilder()
47772 # .setRed(red / denominator)
47773 # .setGreen(green / denominator)
47774 # .setBlue(blue / denominator);
47775 # int alpha = color.getAlpha();
47776 # if (alpha != 255) {
47777 # result.setAlpha(
47778 # FloatValue
47779 # .newBuilder()
47780 # .setValue(((float) alpha) / denominator)
47781 # .build());
47782 # }
47783 # return resultBuilder.build();
47784 # }
47785 # // ...
47786 #
47787 # Example (iOS / Obj-C):
47788 #
47789 # // ...
47790 # static UIColor* fromProto(Color* protocolor) {
47791 # float red = [protocolor red];
47792 # float green = [protocolor green];
47793 # float blue = [protocolor blue];
47794 # FloatValue* alpha_wrapper = [protocolor alpha];
47795 # float alpha = 1.0;
47796 # if (alpha_wrapper != nil) {
47797 # alpha = [alpha_wrapper value];
47798 # }
47799 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
47800 # }
47801 #
47802 # static Color* toProto(UIColor* color) {
47803 # CGFloat red, green, blue, alpha;
47804 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
47805 # return nil;
47806 # }
47807 # Color* result = [Color alloc] init];
47808 # [result setRed:red];
47809 # [result setGreen:green];
47810 # [result setBlue:blue];
47811 # if (alpha <= 0.9999) {
47812 # [result setAlpha:floatWrapperWithValue(alpha)];
47813 # }
47814 # [result autorelease];
47815 # return result;
47816 # }
47817 # // ...
47818 #
47819 # Example (JavaScript):
47820 #
47821 # // ...
47822 #
47823 # var protoToCssColor = function(rgb_color) {
47824 # var redFrac = rgb_color.red || 0.0;
47825 # var greenFrac = rgb_color.green || 0.0;
47826 # var blueFrac = rgb_color.blue || 0.0;
47827 # var red = Math.floor(redFrac * 255);
47828 # var green = Math.floor(greenFrac * 255);
47829 # var blue = Math.floor(blueFrac * 255);
47830 #
47831 # if (!('alpha' in rgb_color)) {
47832 # return rgbToCssColor_(red, green, blue);
47833 # }
47834 #
47835 # var alphaFrac = rgb_color.alpha.value || 0.0;
47836 # var rgbParams = [red, green, blue].join(',');
47837 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
47838 # };
47839 #
47840 # var rgbToCssColor_ = function(red, green, blue) {
47841 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
47842 # var hexString = rgbNumber.toString(16);
47843 # var missingZeros = 6 - hexString.length;
47844 # var resultBuilder = ['#'];
47845 # for (var i = 0; i < missingZeros; i++) {
47846 # resultBuilder.push('0');
47847 # }
47848 # resultBuilder.push(hexString);
47849 # return resultBuilder.join('');
47850 # };
47851 #
47852 # // ...
47853 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
47854 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
47855 # the final pixel color is defined by the equation:
47856 #
47857 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
47858 #
47859 # This means that a value of 1.0 corresponds to a solid color, whereas
47860 # a value of 0.0 corresponds to a completely transparent color. This
47861 # uses a wrapper message rather than a simple float scalar so that it is
47862 # possible to distinguish between a default value and the value being unset.
47863 # If omitted, this color object is to be rendered as a solid color
47864 # (as if the alpha value had been explicitly given with a value of 1.0).
47865 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
47866 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
47867 },
47868 "width": 42, # The width of the border, in pixels.
47869 # Deprecated; the width is determined by the "style" field.
47870 "style": "A String", # The style of the border.
47871 },
47872 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047873 "textRotation": { # The rotation applied to text in a cell. # The rotation applied to text in a cell
47874 "angle": 42, # The angle between the standard orientation and the desired orientation.
47875 # Measured in degrees. Valid values are between -90 and 90. Positive
47876 # angles are angled upwards, negative are angled downwards.
47877 #
47878 # Note: For LTR text direction positive angles are in the counterclockwise
47879 # direction, whereas for RTL they are in the clockwise direction
47880 "vertical": True or False, # If true, text reads top to bottom, but the orientation of individual
47881 # characters is unchanged.
47882 # For example:
47883 #
47884 # | V |
47885 # | e |
47886 # | r |
47887 # | t |
47888 # | i |
47889 # | c |
47890 # | a |
47891 # | l |
47892 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047893 },
47894 "dataValidation": { # A data validation rule. # A data validation rule on the cell, if any.
47895 #
47896 # When writing, the new data validation rule will overwrite any prior rule.
47897 "showCustomUi": True or False, # True if the UI should be customized based on the kind of condition.
47898 # If true, "List" conditions will show a dropdown.
47899 "strict": True or False, # True if invalid data should be rejected.
47900 "inputMessage": "A String", # A message to show the user when adding data to the cell.
47901 "condition": { # A condition that can evaluate to true or false. # The condition that data in the cell must match.
47902 # BooleanConditions are used by conditional formatting,
47903 # data validation, and the criteria in filters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047904 "values": [ # The values of the condition. The number of supported values depends
47905 # on the condition type. Some support zero values,
47906 # others one or two values,
47907 # and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
47908 { # The value of the condition.
47909 "relativeDate": "A String", # A relative date (based on the current date).
47910 # Valid only if the type is
47911 # DATE_BEFORE,
47912 # DATE_AFTER,
47913 # DATE_ON_OR_BEFORE or
47914 # DATE_ON_OR_AFTER.
47915 #
47916 # Relative dates are not supported in data validation.
47917 # They are supported only in conditional formatting and
47918 # conditional filters.
47919 "userEnteredValue": "A String", # A value the condition is based on.
47920 # The value will be parsed as if the user typed into a cell.
47921 # Formulas are supported (and must begin with an `=`).
47922 },
47923 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040047924 "type": "A String", # The type of condition.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080047925 },
47926 },
47927 "textFormatRuns": [ # Runs of rich text applied to subsections of the cell. Runs are only valid
47928 # on user entered strings, not formulas, bools, or numbers.
47929 # Runs start at specific indexes in the text and continue until the next
47930 # run. Properties of a run will continue unless explicitly changed
47931 # in a subsequent run (and properties of the first run will continue
47932 # the properties of the cell unless explicitly changed).
47933 #
47934 # When writing, the new runs will overwrite any prior runs. When writing a
47935 # new user_entered_value, previous runs will be erased.
47936 { # A run of a text format. The format of this run continues until the start
47937 # index of the next run.
47938 # When updating, all fields must be set.
47939 "startIndex": 42, # The character index where this run starts.
47940 "format": { # The format of a run of text in a cell. # The format of this run. Absent values inherit the cell's format.
47941 # Absent values indicate that the field isn't specified.
47942 "foregroundColor": { # Represents a color in the RGBA color space. This representation is designed # The foreground color of the text.
47943 # for simplicity of conversion to/from color representations in various
47944 # languages over compactness; for example, the fields of this representation
47945 # can be trivially provided to the constructor of "java.awt.Color" in Java; it
47946 # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
47947 # method in iOS; and, with just a little work, it can be easily formatted into
47948 # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
47949 #
47950 # Example (Java):
47951 #
47952 # import com.google.type.Color;
47953 #
47954 # // ...
47955 # public static java.awt.Color fromProto(Color protocolor) {
47956 # float alpha = protocolor.hasAlpha()
47957 # ? protocolor.getAlpha().getValue()
47958 # : 1.0;
47959 #
47960 # return new java.awt.Color(
47961 # protocolor.getRed(),
47962 # protocolor.getGreen(),
47963 # protocolor.getBlue(),
47964 # alpha);
47965 # }
47966 #
47967 # public static Color toProto(java.awt.Color color) {
47968 # float red = (float) color.getRed();
47969 # float green = (float) color.getGreen();
47970 # float blue = (float) color.getBlue();
47971 # float denominator = 255.0;
47972 # Color.Builder resultBuilder =
47973 # Color
47974 # .newBuilder()
47975 # .setRed(red / denominator)
47976 # .setGreen(green / denominator)
47977 # .setBlue(blue / denominator);
47978 # int alpha = color.getAlpha();
47979 # if (alpha != 255) {
47980 # result.setAlpha(
47981 # FloatValue
47982 # .newBuilder()
47983 # .setValue(((float) alpha) / denominator)
47984 # .build());
47985 # }
47986 # return resultBuilder.build();
47987 # }
47988 # // ...
47989 #
47990 # Example (iOS / Obj-C):
47991 #
47992 # // ...
47993 # static UIColor* fromProto(Color* protocolor) {
47994 # float red = [protocolor red];
47995 # float green = [protocolor green];
47996 # float blue = [protocolor blue];
47997 # FloatValue* alpha_wrapper = [protocolor alpha];
47998 # float alpha = 1.0;
47999 # if (alpha_wrapper != nil) {
48000 # alpha = [alpha_wrapper value];
48001 # }
48002 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
48003 # }
48004 #
48005 # static Color* toProto(UIColor* color) {
48006 # CGFloat red, green, blue, alpha;
48007 # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
48008 # return nil;
48009 # }
48010 # Color* result = [Color alloc] init];
48011 # [result setRed:red];
48012 # [result setGreen:green];
48013 # [result setBlue:blue];
48014 # if (alpha <= 0.9999) {
48015 # [result setAlpha:floatWrapperWithValue(alpha)];
48016 # }
48017 # [result autorelease];
48018 # return result;
48019 # }
48020 # // ...
48021 #
48022 # Example (JavaScript):
48023 #
48024 # // ...
48025 #
48026 # var protoToCssColor = function(rgb_color) {
48027 # var redFrac = rgb_color.red || 0.0;
48028 # var greenFrac = rgb_color.green || 0.0;
48029 # var blueFrac = rgb_color.blue || 0.0;
48030 # var red = Math.floor(redFrac * 255);
48031 # var green = Math.floor(greenFrac * 255);
48032 # var blue = Math.floor(blueFrac * 255);
48033 #
48034 # if (!('alpha' in rgb_color)) {
48035 # return rgbToCssColor_(red, green, blue);
48036 # }
48037 #
48038 # var alphaFrac = rgb_color.alpha.value || 0.0;
48039 # var rgbParams = [red, green, blue].join(',');
48040 # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
48041 # };
48042 #
48043 # var rgbToCssColor_ = function(red, green, blue) {
48044 # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
48045 # var hexString = rgbNumber.toString(16);
48046 # var missingZeros = 6 - hexString.length;
48047 # var resultBuilder = ['#'];
48048 # for (var i = 0; i < missingZeros; i++) {
48049 # resultBuilder.push('0');
48050 # }
48051 # resultBuilder.push(hexString);
48052 # return resultBuilder.join('');
48053 # };
48054 #
48055 # // ...
48056 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1].
48057 "alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is,
48058 # the final pixel color is defined by the equation:
48059 #
48060 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
48061 #
48062 # This means that a value of 1.0 corresponds to a solid color, whereas
48063 # a value of 0.0 corresponds to a completely transparent color. This
48064 # uses a wrapper message rather than a simple float scalar so that it is
48065 # possible to distinguish between a default value and the value being unset.
48066 # If omitted, this color object is to be rendered as a solid color
48067 # (as if the alpha value had been explicitly given with a value of 1.0).
48068 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1].
48069 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1].
48070 },
48071 "bold": True or False, # True if the text is bold.
48072 "strikethrough": True or False, # True if the text has a strikethrough.
48073 "fontFamily": "A String", # The font family.
48074 "fontSize": 42, # The size of the font.
48075 "italic": True or False, # True if the text is italicized.
48076 "underline": True or False, # True if the text is underlined.
48077 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048078 },
48079 ],
48080 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070048081 ],
48082 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080048083 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040048084 "columnMetadata": [ # Metadata about the requested columns in the grid, starting with the column
48085 # in start_column.
48086 { # Properties about a dimension.
48087 "pixelSize": 42, # The height (if a row) or width (if a column) of the dimension in pixels.
48088 "hiddenByUser": True or False, # True if this dimension is explicitly hidden.
48089 "hiddenByFilter": True or False, # True if this dimension is being filtered.
48090 # This field is read-only.
48091 },
48092 ],
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>