File: TreemapChartSpec.java

package info (click to toggle)
google-api-services-sheets-java 1.32.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,008 kB
  • sloc: java: 12,826; xml: 161; makefile: 2
file content (417 lines) | stat: -rw-r--r-- 15,203 bytes parent folder | download
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
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
/*
 * 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;

/**
 * A Treemap chart.
 *
 * <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 TreemapChartSpec extends com.google.api.client.json.GenericJson {

  /**
   * The data that determines the background color of each treemap data cell. This field is
   * optional. If not specified, size_data is used to determine background colors. If specified, the
   * data is expected to be numeric. color_scale will determine how the values in this data map to
   * data cell background colors.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ChartData colorData;

  /**
   * The color scale for data cells in the treemap chart. Data cells are assigned colors based on
   * their color values. These color values come from color_data, or from size_data if color_data is
   * not specified. Cells with color values less than or equal to min_value will have minValueColor
   * as their background color. Cells with color values greater than or equal to max_value will have
   * maxValueColor as their background color. Cells with color values between min_value and
   * max_value will have background colors on a gradient between minValueColor and maxValueColor,
   * the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color
   * values will have noDataColor as their background color.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TreemapChartColorScale colorScale;

  /**
   * The background color for header cells.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Color headerColor;

  /**
   * The background color for header cells. If header_color is also set, this field takes
   * precedence.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ColorStyle headerColorStyle;

  /**
   * True to hide tooltips.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean hideTooltips;

  /**
   * The number of additional data levels beyond the labeled levels to be shown on the treemap
   * chart. These levels are not interactive and are shown without their labels. Defaults to 0 if
   * not specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer hintedLevels;

  /**
   * The data that contains the treemap cell labels.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ChartData labels;

  /**
   * The number of data levels to show on the treemap chart. These levels are interactive and are
   * shown with their labels. Defaults to 2 if not specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer levels;

  /**
   * The maximum possible data value. Cells with values greater than this will have the same color
   * as cells with this value. If not specified, defaults to the actual maximum value from
   * color_data, or the maximum value from size_data if color_data is not specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double maxValue;

  /**
   * The minimum possible data value. Cells with values less than this will have the same color as
   * cells with this value. If not specified, defaults to the actual minimum value from color_data,
   * or the minimum value from size_data if color_data is not specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double minValue;

  /**
   * The data the contains the treemap cells' parent labels.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ChartData parentLabels;

  /**
   * The data that determines the size of each treemap data cell. This data is expected to be
   * numeric. The cells corresponding to non-numeric or missing data will not be rendered. If
   * color_data is not specified, this data is used to determine data cell background colors as
   * well.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ChartData sizeData;

  /**
   * The text format for all labels on the chart. The link field is not supported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TextFormat textFormat;

  /**
   * The data that determines the background color of each treemap data cell. This field is
   * optional. If not specified, size_data is used to determine background colors. If specified, the
   * data is expected to be numeric. color_scale will determine how the values in this data map to
   * data cell background colors.
   * @return value or {@code null} for none
   */
  public ChartData getColorData() {
    return colorData;
  }

  /**
   * The data that determines the background color of each treemap data cell. This field is
   * optional. If not specified, size_data is used to determine background colors. If specified, the
   * data is expected to be numeric. color_scale will determine how the values in this data map to
   * data cell background colors.
   * @param colorData colorData or {@code null} for none
   */
  public TreemapChartSpec setColorData(ChartData colorData) {
    this.colorData = colorData;
    return this;
  }

  /**
   * The color scale for data cells in the treemap chart. Data cells are assigned colors based on
   * their color values. These color values come from color_data, or from size_data if color_data is
   * not specified. Cells with color values less than or equal to min_value will have minValueColor
   * as their background color. Cells with color values greater than or equal to max_value will have
   * maxValueColor as their background color. Cells with color values between min_value and
   * max_value will have background colors on a gradient between minValueColor and maxValueColor,
   * the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color
   * values will have noDataColor as their background color.
   * @return value or {@code null} for none
   */
  public TreemapChartColorScale getColorScale() {
    return colorScale;
  }

  /**
   * The color scale for data cells in the treemap chart. Data cells are assigned colors based on
   * their color values. These color values come from color_data, or from size_data if color_data is
   * not specified. Cells with color values less than or equal to min_value will have minValueColor
   * as their background color. Cells with color values greater than or equal to max_value will have
   * maxValueColor as their background color. Cells with color values between min_value and
   * max_value will have background colors on a gradient between minValueColor and maxValueColor,
   * the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color
   * values will have noDataColor as their background color.
   * @param colorScale colorScale or {@code null} for none
   */
  public TreemapChartSpec setColorScale(TreemapChartColorScale colorScale) {
    this.colorScale = colorScale;
    return this;
  }

  /**
   * The background color for header cells.
   * @return value or {@code null} for none
   */
  public Color getHeaderColor() {
    return headerColor;
  }

  /**
   * The background color for header cells.
   * @param headerColor headerColor or {@code null} for none
   */
  public TreemapChartSpec setHeaderColor(Color headerColor) {
    this.headerColor = headerColor;
    return this;
  }

  /**
   * The background color for header cells. If header_color is also set, this field takes
   * precedence.
   * @return value or {@code null} for none
   */
  public ColorStyle getHeaderColorStyle() {
    return headerColorStyle;
  }

  /**
   * The background color for header cells. If header_color is also set, this field takes
   * precedence.
   * @param headerColorStyle headerColorStyle or {@code null} for none
   */
  public TreemapChartSpec setHeaderColorStyle(ColorStyle headerColorStyle) {
    this.headerColorStyle = headerColorStyle;
    return this;
  }

  /**
   * True to hide tooltips.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getHideTooltips() {
    return hideTooltips;
  }

  /**
   * True to hide tooltips.
   * @param hideTooltips hideTooltips or {@code null} for none
   */
  public TreemapChartSpec setHideTooltips(java.lang.Boolean hideTooltips) {
    this.hideTooltips = hideTooltips;
    return this;
  }

  /**
   * The number of additional data levels beyond the labeled levels to be shown on the treemap
   * chart. These levels are not interactive and are shown without their labels. Defaults to 0 if
   * not specified.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getHintedLevels() {
    return hintedLevels;
  }

  /**
   * The number of additional data levels beyond the labeled levels to be shown on the treemap
   * chart. These levels are not interactive and are shown without their labels. Defaults to 0 if
   * not specified.
   * @param hintedLevels hintedLevels or {@code null} for none
   */
  public TreemapChartSpec setHintedLevels(java.lang.Integer hintedLevels) {
    this.hintedLevels = hintedLevels;
    return this;
  }

  /**
   * The data that contains the treemap cell labels.
   * @return value or {@code null} for none
   */
  public ChartData getLabels() {
    return labels;
  }

  /**
   * The data that contains the treemap cell labels.
   * @param labels labels or {@code null} for none
   */
  public TreemapChartSpec setLabels(ChartData labels) {
    this.labels = labels;
    return this;
  }

  /**
   * The number of data levels to show on the treemap chart. These levels are interactive and are
   * shown with their labels. Defaults to 2 if not specified.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getLevels() {
    return levels;
  }

  /**
   * The number of data levels to show on the treemap chart. These levels are interactive and are
   * shown with their labels. Defaults to 2 if not specified.
   * @param levels levels or {@code null} for none
   */
  public TreemapChartSpec setLevels(java.lang.Integer levels) {
    this.levels = levels;
    return this;
  }

  /**
   * The maximum possible data value. Cells with values greater than this will have the same color
   * as cells with this value. If not specified, defaults to the actual maximum value from
   * color_data, or the maximum value from size_data if color_data is not specified.
   * @return value or {@code null} for none
   */
  public java.lang.Double getMaxValue() {
    return maxValue;
  }

  /**
   * The maximum possible data value. Cells with values greater than this will have the same color
   * as cells with this value. If not specified, defaults to the actual maximum value from
   * color_data, or the maximum value from size_data if color_data is not specified.
   * @param maxValue maxValue or {@code null} for none
   */
  public TreemapChartSpec setMaxValue(java.lang.Double maxValue) {
    this.maxValue = maxValue;
    return this;
  }

  /**
   * The minimum possible data value. Cells with values less than this will have the same color as
   * cells with this value. If not specified, defaults to the actual minimum value from color_data,
   * or the minimum value from size_data if color_data is not specified.
   * @return value or {@code null} for none
   */
  public java.lang.Double getMinValue() {
    return minValue;
  }

  /**
   * The minimum possible data value. Cells with values less than this will have the same color as
   * cells with this value. If not specified, defaults to the actual minimum value from color_data,
   * or the minimum value from size_data if color_data is not specified.
   * @param minValue minValue or {@code null} for none
   */
  public TreemapChartSpec setMinValue(java.lang.Double minValue) {
    this.minValue = minValue;
    return this;
  }

  /**
   * The data the contains the treemap cells' parent labels.
   * @return value or {@code null} for none
   */
  public ChartData getParentLabels() {
    return parentLabels;
  }

  /**
   * The data the contains the treemap cells' parent labels.
   * @param parentLabels parentLabels or {@code null} for none
   */
  public TreemapChartSpec setParentLabels(ChartData parentLabels) {
    this.parentLabels = parentLabels;
    return this;
  }

  /**
   * The data that determines the size of each treemap data cell. This data is expected to be
   * numeric. The cells corresponding to non-numeric or missing data will not be rendered. If
   * color_data is not specified, this data is used to determine data cell background colors as
   * well.
   * @return value or {@code null} for none
   */
  public ChartData getSizeData() {
    return sizeData;
  }

  /**
   * The data that determines the size of each treemap data cell. This data is expected to be
   * numeric. The cells corresponding to non-numeric or missing data will not be rendered. If
   * color_data is not specified, this data is used to determine data cell background colors as
   * well.
   * @param sizeData sizeData or {@code null} for none
   */
  public TreemapChartSpec setSizeData(ChartData sizeData) {
    this.sizeData = sizeData;
    return this;
  }

  /**
   * The text format for all labels on the chart. The link field is not supported.
   * @return value or {@code null} for none
   */
  public TextFormat getTextFormat() {
    return textFormat;
  }

  /**
   * The text format for all labels on the chart. The link field is not supported.
   * @param textFormat textFormat or {@code null} for none
   */
  public TreemapChartSpec setTextFormat(TextFormat textFormat) {
    this.textFormat = textFormat;
    return this;
  }

  @Override
  public TreemapChartSpec set(String fieldName, Object value) {
    return (TreemapChartSpec) super.set(fieldName, value);
  }

  @Override
  public TreemapChartSpec clone() {
    return (TreemapChartSpec) super.clone();
  }

}