target.apidocs.com.google.api.services.content.model.Date.html Maven / Gradle / Ivy
Date (Content API for Shopping v2.1-rev20240609-2.0.0)
com.google.api.services.content.model
Class Date
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.content.model.Date
-
public final class Date
extends com.google.api.client.json.GenericJson
Represents a whole or partial calendar date, such as a birthday. The time of day and time zone
are either specified elsewhere or are insignificant. The date is relative to the Gregorian
Calendar. This can represent one of the following: * A full date, with non-zero year, month, and
day values. * A month and day, with a zero year (for example, an anniversary). * A year on its
own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit
card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime *
google.protobuf.Timestamp
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 Content API for Shopping. 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
Date()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Date
clone()
Integer
getDay()
Day of a month.
Integer
getMonth()
Month of a year.
Integer
getYear()
Year of the date.
Date
set(String fieldName,
Object value)
Date
setDay(Integer day)
Day of a month.
Date
setMonth(Integer month)
Month of a year.
Date
setYear(Integer year)
Year of the date.
-
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
-
getDay
public Integer getDay()
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year
by itself or a year and month where the day isn't significant.
- Returns:
- value or
null
for none
-
setDay
public Date setDay(Integer day)
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year
by itself or a year and month where the day isn't significant.
- Parameters:
day
- day or null
for none
-
getMonth
public Integer getMonth()
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
- Returns:
- value or
null
for none
-
setMonth
public Date setMonth(Integer month)
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
- Parameters:
month
- month or null
for none
-
getYear
public Integer getYear()
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
- Returns:
- value or
null
for none
-
setYear
public Date setYear(Integer year)
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
- Parameters:
year
- year or null
for none
-
set
public Date set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Date clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy