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
|
/*
* 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 single grouping (either row or column) in a pivot table.
*
* <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 PivotGroup extends com.google.api.client.json.GenericJson {
/**
* The reference to the data source column this grouping is based on.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DataSourceColumnReference dataSourceColumnReference;
/**
* The count limit on rows or columns to apply to this pivot group.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private PivotGroupLimit groupLimit;
/**
* The group rule to apply to this row/column group.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private PivotGroupRule groupRule;
/**
* The labels to use for the row/column groups which can be customized. For example, in the
* following pivot table, the row label is `Region` (which could be renamed to `State`) and the
* column label is `Product` (which could be renamed `Item`). Pivot tables created before December
* 2017 do not have header labels. If you'd like to add header labels to an existing pivot table,
* please delete the existing pivot table and then create a new pivot table with same parameters.
* +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper |
* +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee |
* 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 |
* +--------------+---------+-------+
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String label;
/**
* True if the headings in this pivot group should be repeated. This is only valid for row
* groupings and is ignored by columns. By default, we minimize repetition of headings by not
* showing higher level headings where they are the same. For example, even though the third row
* below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows.
* Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar".
* +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total |
* +--------------+
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean repeatHeadings;
/**
* True if the pivot table should include the totals for this grouping.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean showTotals;
/**
* The order the values in this group should be sorted.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sortOrder;
/**
* The column offset of the source range that this grouping is based on. For example, if the
* source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`,
* whereas the offset `1` would refer to column `D`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer sourceColumnOffset;
/**
* The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by
* this group's values.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private PivotGroupSortValueBucket valueBucket;
/**
* Metadata about values in the grouping.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<PivotGroupValueMetadata> valueMetadata;
/**
* The reference to the data source column this grouping is based on.
* @return value or {@code null} for none
*/
public DataSourceColumnReference getDataSourceColumnReference() {
return dataSourceColumnReference;
}
/**
* The reference to the data source column this grouping is based on.
* @param dataSourceColumnReference dataSourceColumnReference or {@code null} for none
*/
public PivotGroup setDataSourceColumnReference(DataSourceColumnReference dataSourceColumnReference) {
this.dataSourceColumnReference = dataSourceColumnReference;
return this;
}
/**
* The count limit on rows or columns to apply to this pivot group.
* @return value or {@code null} for none
*/
public PivotGroupLimit getGroupLimit() {
return groupLimit;
}
/**
* The count limit on rows or columns to apply to this pivot group.
* @param groupLimit groupLimit or {@code null} for none
*/
public PivotGroup setGroupLimit(PivotGroupLimit groupLimit) {
this.groupLimit = groupLimit;
return this;
}
/**
* The group rule to apply to this row/column group.
* @return value or {@code null} for none
*/
public PivotGroupRule getGroupRule() {
return groupRule;
}
/**
* The group rule to apply to this row/column group.
* @param groupRule groupRule or {@code null} for none
*/
public PivotGroup setGroupRule(PivotGroupRule groupRule) {
this.groupRule = groupRule;
return this;
}
/**
* The labels to use for the row/column groups which can be customized. For example, in the
* following pivot table, the row label is `Region` (which could be renamed to `State`) and the
* column label is `Product` (which could be renamed `Item`). Pivot tables created before December
* 2017 do not have header labels. If you'd like to add header labels to an existing pivot table,
* please delete the existing pivot table and then create a new pivot table with same parameters.
* +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper |
* +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee |
* 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 |
* +--------------+---------+-------+
* @return value or {@code null} for none
*/
public java.lang.String getLabel() {
return label;
}
/**
* The labels to use for the row/column groups which can be customized. For example, in the
* following pivot table, the row label is `Region` (which could be renamed to `State`) and the
* column label is `Product` (which could be renamed `Item`). Pivot tables created before December
* 2017 do not have header labels. If you'd like to add header labels to an existing pivot table,
* please delete the existing pivot table and then create a new pivot table with same parameters.
* +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper |
* +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee |
* 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 |
* +--------------+---------+-------+
* @param label label or {@code null} for none
*/
public PivotGroup setLabel(java.lang.String label) {
this.label = label;
return this;
}
/**
* True if the headings in this pivot group should be repeated. This is only valid for row
* groupings and is ignored by columns. By default, we minimize repetition of headings by not
* showing higher level headings where they are the same. For example, even though the third row
* below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows.
* Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar".
* +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total |
* +--------------+
* @return value or {@code null} for none
*/
public java.lang.Boolean getRepeatHeadings() {
return repeatHeadings;
}
/**
* True if the headings in this pivot group should be repeated. This is only valid for row
* groupings and is ignored by columns. By default, we minimize repetition of headings by not
* showing higher level headings where they are the same. For example, even though the third row
* below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows.
* Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar".
* +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total |
* +--------------+
* @param repeatHeadings repeatHeadings or {@code null} for none
*/
public PivotGroup setRepeatHeadings(java.lang.Boolean repeatHeadings) {
this.repeatHeadings = repeatHeadings;
return this;
}
/**
* True if the pivot table should include the totals for this grouping.
* @return value or {@code null} for none
*/
public java.lang.Boolean getShowTotals() {
return showTotals;
}
/**
* True if the pivot table should include the totals for this grouping.
* @param showTotals showTotals or {@code null} for none
*/
public PivotGroup setShowTotals(java.lang.Boolean showTotals) {
this.showTotals = showTotals;
return this;
}
/**
* The order the values in this group should be sorted.
* @return value or {@code null} for none
*/
public java.lang.String getSortOrder() {
return sortOrder;
}
/**
* The order the values in this group should be sorted.
* @param sortOrder sortOrder or {@code null} for none
*/
public PivotGroup setSortOrder(java.lang.String sortOrder) {
this.sortOrder = sortOrder;
return this;
}
/**
* The column offset of the source range that this grouping is based on. For example, if the
* source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`,
* whereas the offset `1` would refer to column `D`.
* @return value or {@code null} for none
*/
public java.lang.Integer getSourceColumnOffset() {
return sourceColumnOffset;
}
/**
* The column offset of the source range that this grouping is based on. For example, if the
* source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`,
* whereas the offset `1` would refer to column `D`.
* @param sourceColumnOffset sourceColumnOffset or {@code null} for none
*/
public PivotGroup setSourceColumnOffset(java.lang.Integer sourceColumnOffset) {
this.sourceColumnOffset = sourceColumnOffset;
return this;
}
/**
* The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by
* this group's values.
* @return value or {@code null} for none
*/
public PivotGroupSortValueBucket getValueBucket() {
return valueBucket;
}
/**
* The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by
* this group's values.
* @param valueBucket valueBucket or {@code null} for none
*/
public PivotGroup setValueBucket(PivotGroupSortValueBucket valueBucket) {
this.valueBucket = valueBucket;
return this;
}
/**
* Metadata about values in the grouping.
* @return value or {@code null} for none
*/
public java.util.List<PivotGroupValueMetadata> getValueMetadata() {
return valueMetadata;
}
/**
* Metadata about values in the grouping.
* @param valueMetadata valueMetadata or {@code null} for none
*/
public PivotGroup setValueMetadata(java.util.List<PivotGroupValueMetadata> valueMetadata) {
this.valueMetadata = valueMetadata;
return this;
}
@Override
public PivotGroup set(String fieldName, Object value) {
return (PivotGroup) super.set(fieldName, value);
}
@Override
public PivotGroup clone() {
return (PivotGroup) super.clone();
}
}
|