target.apidocs.com.google.api.services.sheets.v4.model.PivotGroup.html Maven / Gradle / Ivy
PivotGroup (Google Sheets API v4-rev20240312-2.0.0)
com.google.api.services.sheets.v4.model
Class PivotGroup
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.sheets.v4.model.PivotGroup
-
public final class PivotGroup
extends com.google.api.client.json.GenericJson
A single grouping (either row or column) in a pivot table.
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:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
PivotGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
PivotGroup
clone()
DataSourceColumnReference
getDataSourceColumnReference()
The reference to the data source column this grouping is based on.
PivotGroupLimit
getGroupLimit()
The count limit on rows or columns to apply to this pivot group.
PivotGroupRule
getGroupRule()
The group rule to apply to this row/column group.
String
getLabel()
The labels to use for the row/column groups which can be customized.
Boolean
getRepeatHeadings()
True if the headings in this pivot group should be repeated.
Boolean
getShowTotals()
True if the pivot table should include the totals for this grouping.
String
getSortOrder()
The order the values in this group should be sorted.
Integer
getSourceColumnOffset()
The column offset of the source range that this grouping is based on.
PivotGroupSortValueBucket
getValueBucket()
The bucket of the opposite pivot group to sort by.
List<PivotGroupValueMetadata>
getValueMetadata()
Metadata about values in the grouping.
PivotGroup
set(String fieldName,
Object value)
PivotGroup
setDataSourceColumnReference(DataSourceColumnReference dataSourceColumnReference)
The reference to the data source column this grouping is based on.
PivotGroup
setGroupLimit(PivotGroupLimit groupLimit)
The count limit on rows or columns to apply to this pivot group.
PivotGroup
setGroupRule(PivotGroupRule groupRule)
The group rule to apply to this row/column group.
PivotGroup
setLabel(String label)
The labels to use for the row/column groups which can be customized.
PivotGroup
setRepeatHeadings(Boolean repeatHeadings)
True if the headings in this pivot group should be repeated.
PivotGroup
setShowTotals(Boolean showTotals)
True if the pivot table should include the totals for this grouping.
PivotGroup
setSortOrder(String sortOrder)
The order the values in this group should be sorted.
PivotGroup
setSourceColumnOffset(Integer sourceColumnOffset)
The column offset of the source range that this grouping is based on.
PivotGroup
setValueBucket(PivotGroupSortValueBucket valueBucket)
The bucket of the opposite pivot group to sort by.
PivotGroup
setValueMetadata(List<PivotGroupValueMetadata> valueMetadata)
Metadata about values in the grouping.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getDataSourceColumnReference
public DataSourceColumnReference getDataSourceColumnReference()
The reference to the data source column this grouping is based on.
- Returns:
- value or
null
for none
-
setDataSourceColumnReference
public PivotGroup setDataSourceColumnReference(DataSourceColumnReference dataSourceColumnReference)
The reference to the data source column this grouping is based on.
- Parameters:
dataSourceColumnReference
- dataSourceColumnReference or null
for none
-
getGroupLimit
public PivotGroupLimit getGroupLimit()
The count limit on rows or columns to apply to this pivot group.
- Returns:
- value or
null
for none
-
setGroupLimit
public PivotGroup setGroupLimit(PivotGroupLimit groupLimit)
The count limit on rows or columns to apply to this pivot group.
- Parameters:
groupLimit
- groupLimit or null
for none
-
getGroupRule
public PivotGroupRule getGroupRule()
The group rule to apply to this row/column group.
- Returns:
- value or
null
for none
-
setGroupRule
public PivotGroup setGroupRule(PivotGroupRule groupRule)
The group rule to apply to this row/column group.
- Parameters:
groupRule
- groupRule or null
for none
-
getLabel
public String getLabel()
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 |
+--------------+---------+-------+
- Returns:
- value or
null
for none
-
setLabel
public PivotGroup setLabel(String 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 |
+--------------+---------+-------+
- Parameters:
label
- label or null
for none
-
getRepeatHeadings
public Boolean getRepeatHeadings()
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 |
+--------------+
- Returns:
- value or
null
for none
-
setRepeatHeadings
public PivotGroup setRepeatHeadings(Boolean 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 |
+--------------+
- Parameters:
repeatHeadings
- repeatHeadings or null
for none
-
getShowTotals
public Boolean getShowTotals()
True if the pivot table should include the totals for this grouping.
- Returns:
- value or
null
for none
-
setShowTotals
public PivotGroup setShowTotals(Boolean showTotals)
True if the pivot table should include the totals for this grouping.
- Parameters:
showTotals
- showTotals or null
for none
-
getSortOrder
public String getSortOrder()
The order the values in this group should be sorted.
- Returns:
- value or
null
for none
-
setSortOrder
public PivotGroup setSortOrder(String sortOrder)
The order the values in this group should be sorted.
- Parameters:
sortOrder
- sortOrder or null
for none
-
getSourceColumnOffset
public Integer getSourceColumnOffset()
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`.
- Returns:
- value or
null
for none
-
setSourceColumnOffset
public PivotGroup setSourceColumnOffset(Integer 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`.
- Parameters:
sourceColumnOffset
- sourceColumnOffset or null
for none
-
getValueBucket
public PivotGroupSortValueBucket getValueBucket()
The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by
this group's values.
- Returns:
- value or
null
for none
-
setValueBucket
public PivotGroup setValueBucket(PivotGroupSortValueBucket valueBucket)
The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by
this group's values.
- Parameters:
valueBucket
- valueBucket or null
for none
-
getValueMetadata
public List<PivotGroupValueMetadata> getValueMetadata()
Metadata about values in the grouping.
- Returns:
- value or
null
for none
-
setValueMetadata
public PivotGroup setValueMetadata(List<PivotGroupValueMetadata> valueMetadata)
Metadata about values in the grouping.
- Parameters:
valueMetadata
- valueMetadata or null
for none
-
set
public PivotGroup set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public PivotGroup clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.