target.apidocs.com.google.api.services.sheets.v4.model.DateTimeRule.html Maven / Gradle / Ivy
DateTimeRule (Google Sheets API v4-rev20230526-2.0.0)
com.google.api.services.sheets.v4.model
Class DateTimeRule
- 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.DateTimeRule
-
public final class DateTimeRule
extends com.google.api.client.json.GenericJson
Allows you to organize the date-time values in a source data column into buckets based on
selected parts of their date or time values. For example, consider a pivot table showing sales
transactions by date: +----------+--------------+ | Date | SUM of Sales |
+----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 |
... +----------+--------------+ Applying a date-time group rule with a DateTimeRuleType of
YEAR_MONTH results in the following pivot table. +--------------+--------------+ | Grouped Date |
SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,731.78 | | 2017-Feb | $83,475.32
| | 2017-Mar | $94,385.05 | ... +--------------+--------------+
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
DateTimeRule()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
DateTimeRule
clone()
String
getType()
The type of date-time grouping to apply.
DateTimeRule
set(String fieldName,
Object value)
DateTimeRule
setType(String type)
The type of date-time grouping to apply.
-
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
-
getType
public String getType()
The type of date-time grouping to apply.
- Returns:
- value or
null
for none
-
setType
public DateTimeRule setType(String type)
The type of date-time grouping to apply.
- Parameters:
type
- type or null
for none
-
set
public DateTimeRule set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public DateTimeRule clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2023 Google. All rights reserved.