1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402
|
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.sheets.v4.model;
/**
* Data about a specific cell.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Google Sheets API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class CellData extends com.google.api.client.json.GenericJson {
/**
* Output only. Information about a data source formula on the cell. The field is set if
* user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g.
* `=SUM(DataSheet!Column)`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DataSourceFormula dataSourceFormula;
/**
* A data source table anchored at this cell. The size of data source table itself is computed
* dynamically based on its configuration. Only the first cell of the data source table contains
* the data source table definition. The other cells will contain the display values of the data
* source table result in their effective_value fields.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DataSourceTable dataSourceTable;
/**
* A data validation rule on the cell, if any. When writing, the new data validation rule will
* overwrite any prior rule.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DataValidationRule dataValidation;
/**
* The effective format being used by the cell. This includes the results of applying any
* conditional formatting and, if the cell contains a formula, the computed number format. If the
* effective format is the default format, effective format will not be written. This field is
* read-only.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private CellFormat effectiveFormat;
/**
* The effective value of the cell. For cells with formulas, this is the calculated value. For
* cells with literals, this is the same as the user_entered_value. This field is read-only.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ExtendedValue effectiveValue;
/**
* The formatted value of the cell. This is the value as it's shown to the user. This field is
* read-only.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String formattedValue;
/**
* A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field
* will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the
* userEnteredValue.formulaValue field. A cell-level link can also be set from the
* userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the
* textFormatRun.format.link field that spans the entire cell.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String hyperlink;
/**
* Any note on the cell.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String note;
/**
* A pivot table anchored at this cell. The size of pivot table itself is computed dynamically
* based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table
* contains the pivot table definition. The other cells will contain the calculated values of the
* results of the pivot in their effective_value fields.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private PivotTable pivotTable;
/**
* Runs of rich text applied to subsections of the cell. Runs are only valid on user entered
* strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the
* text and continue until the next run. Runs will inherit the properties of the cell unless
* explicitly changed. When writing, the new runs will overwrite any prior runs. When writing a
* new user_entered_value, previous runs are erased.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<TextFormatRun> textFormatRuns;
/**
* The format the user entered for the cell. When writing, the new format will be merged with the
* existing format.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private CellFormat userEnteredFormat;
/**
* The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times
* and DateTimes are represented as doubles in serial number format.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ExtendedValue userEnteredValue;
/**
* Output only. Information about a data source formula on the cell. The field is set if
* user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g.
* `=SUM(DataSheet!Column)`.
* @return value or {@code null} for none
*/
public DataSourceFormula getDataSourceFormula() {
return dataSourceFormula;
}
/**
* Output only. Information about a data source formula on the cell. The field is set if
* user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g.
* `=SUM(DataSheet!Column)`.
* @param dataSourceFormula dataSourceFormula or {@code null} for none
*/
public CellData setDataSourceFormula(DataSourceFormula dataSourceFormula) {
this.dataSourceFormula = dataSourceFormula;
return this;
}
/**
* A data source table anchored at this cell. The size of data source table itself is computed
* dynamically based on its configuration. Only the first cell of the data source table contains
* the data source table definition. The other cells will contain the display values of the data
* source table result in their effective_value fields.
* @return value or {@code null} for none
*/
public DataSourceTable getDataSourceTable() {
return dataSourceTable;
}
/**
* A data source table anchored at this cell. The size of data source table itself is computed
* dynamically based on its configuration. Only the first cell of the data source table contains
* the data source table definition. The other cells will contain the display values of the data
* source table result in their effective_value fields.
* @param dataSourceTable dataSourceTable or {@code null} for none
*/
public CellData setDataSourceTable(DataSourceTable dataSourceTable) {
this.dataSourceTable = dataSourceTable;
return this;
}
/**
* A data validation rule on the cell, if any. When writing, the new data validation rule will
* overwrite any prior rule.
* @return value or {@code null} for none
*/
public DataValidationRule getDataValidation() {
return dataValidation;
}
/**
* A data validation rule on the cell, if any. When writing, the new data validation rule will
* overwrite any prior rule.
* @param dataValidation dataValidation or {@code null} for none
*/
public CellData setDataValidation(DataValidationRule dataValidation) {
this.dataValidation = dataValidation;
return this;
}
/**
* The effective format being used by the cell. This includes the results of applying any
* conditional formatting and, if the cell contains a formula, the computed number format. If the
* effective format is the default format, effective format will not be written. This field is
* read-only.
* @return value or {@code null} for none
*/
public CellFormat getEffectiveFormat() {
return effectiveFormat;
}
/**
* The effective format being used by the cell. This includes the results of applying any
* conditional formatting and, if the cell contains a formula, the computed number format. If the
* effective format is the default format, effective format will not be written. This field is
* read-only.
* @param effectiveFormat effectiveFormat or {@code null} for none
*/
public CellData setEffectiveFormat(CellFormat effectiveFormat) {
this.effectiveFormat = effectiveFormat;
return this;
}
/**
* The effective value of the cell. For cells with formulas, this is the calculated value. For
* cells with literals, this is the same as the user_entered_value. This field is read-only.
* @return value or {@code null} for none
*/
public ExtendedValue getEffectiveValue() {
return effectiveValue;
}
/**
* The effective value of the cell. For cells with formulas, this is the calculated value. For
* cells with literals, this is the same as the user_entered_value. This field is read-only.
* @param effectiveValue effectiveValue or {@code null} for none
*/
public CellData setEffectiveValue(ExtendedValue effectiveValue) {
this.effectiveValue = effectiveValue;
return this;
}
/**
* The formatted value of the cell. This is the value as it's shown to the user. This field is
* read-only.
* @return value or {@code null} for none
*/
public java.lang.String getFormattedValue() {
return formattedValue;
}
/**
* The formatted value of the cell. This is the value as it's shown to the user. This field is
* read-only.
* @param formattedValue formattedValue or {@code null} for none
*/
public CellData setFormattedValue(java.lang.String formattedValue) {
this.formattedValue = formattedValue;
return this;
}
/**
* A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field
* will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the
* userEnteredValue.formulaValue field. A cell-level link can also be set from the
* userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the
* textFormatRun.format.link field that spans the entire cell.
* @return value or {@code null} for none
*/
public java.lang.String getHyperlink() {
return hyperlink;
}
/**
* A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field
* will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the
* userEnteredValue.formulaValue field. A cell-level link can also be set from the
* userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the
* textFormatRun.format.link field that spans the entire cell.
* @param hyperlink hyperlink or {@code null} for none
*/
public CellData setHyperlink(java.lang.String hyperlink) {
this.hyperlink = hyperlink;
return this;
}
/**
* Any note on the cell.
* @return value or {@code null} for none
*/
public java.lang.String getNote() {
return note;
}
/**
* Any note on the cell.
* @param note note or {@code null} for none
*/
public CellData setNote(java.lang.String note) {
this.note = note;
return this;
}
/**
* A pivot table anchored at this cell. The size of pivot table itself is computed dynamically
* based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table
* contains the pivot table definition. The other cells will contain the calculated values of the
* results of the pivot in their effective_value fields.
* @return value or {@code null} for none
*/
public PivotTable getPivotTable() {
return pivotTable;
}
/**
* A pivot table anchored at this cell. The size of pivot table itself is computed dynamically
* based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table
* contains the pivot table definition. The other cells will contain the calculated values of the
* results of the pivot in their effective_value fields.
* @param pivotTable pivotTable or {@code null} for none
*/
public CellData setPivotTable(PivotTable pivotTable) {
this.pivotTable = pivotTable;
return this;
}
/**
* Runs of rich text applied to subsections of the cell. Runs are only valid on user entered
* strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the
* text and continue until the next run. Runs will inherit the properties of the cell unless
* explicitly changed. When writing, the new runs will overwrite any prior runs. When writing a
* new user_entered_value, previous runs are erased.
* @return value or {@code null} for none
*/
public java.util.List<TextFormatRun> getTextFormatRuns() {
return textFormatRuns;
}
/**
* Runs of rich text applied to subsections of the cell. Runs are only valid on user entered
* strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the
* text and continue until the next run. Runs will inherit the properties of the cell unless
* explicitly changed. When writing, the new runs will overwrite any prior runs. When writing a
* new user_entered_value, previous runs are erased.
* @param textFormatRuns textFormatRuns or {@code null} for none
*/
public CellData setTextFormatRuns(java.util.List<TextFormatRun> textFormatRuns) {
this.textFormatRuns = textFormatRuns;
return this;
}
/**
* The format the user entered for the cell. When writing, the new format will be merged with the
* existing format.
* @return value or {@code null} for none
*/
public CellFormat getUserEnteredFormat() {
return userEnteredFormat;
}
/**
* The format the user entered for the cell. When writing, the new format will be merged with the
* existing format.
* @param userEnteredFormat userEnteredFormat or {@code null} for none
*/
public CellData setUserEnteredFormat(CellFormat userEnteredFormat) {
this.userEnteredFormat = userEnteredFormat;
return this;
}
/**
* The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times
* and DateTimes are represented as doubles in serial number format.
* @return value or {@code null} for none
*/
public ExtendedValue getUserEnteredValue() {
return userEnteredValue;
}
/**
* The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times
* and DateTimes are represented as doubles in serial number format.
* @param userEnteredValue userEnteredValue or {@code null} for none
*/
public CellData setUserEnteredValue(ExtendedValue userEnteredValue) {
this.userEnteredValue = userEnteredValue;
return this;
}
@Override
public CellData set(String fieldName, Object value) {
return (CellData) super.set(fieldName, value);
}
@Override
public CellData clone() {
return (CellData) super.clone();
}
}
|