All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.content.model.DateTime.html Maven / Gradle / Ivy







DateTime (Content API for Shopping v2.1-rev20210715-1.32.1)












com.google.api.services.content.model

Class DateTime

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class DateTime
    extends GenericJson
    Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is considered not to have a specific year. month and day must have valid, non-zero values. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.

    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.
    • Constructor Detail

      • DateTime

        public DateTime()
    • Method Detail

      • getDay

        public Integer getDay()
        Required. Day of month. Must be from 1 to 31 and valid for the year and month.
        Returns:
        value or null for none
      • setDay

        public DateTime setDay(Integer day)
        Required. Day of month. Must be from 1 to 31 and valid for the year and month.
        Parameters:
        day - day or null for none
      • getHours

        public Integer getHours()
        Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        Returns:
        value or null for none
      • setHours

        public DateTime setHours(Integer hours)
        Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        Parameters:
        hours - hours or null for none
      • getMinutes

        public Integer getMinutes()
        Required. Minutes of hour of day. Must be from 0 to 59.
        Returns:
        value or null for none
      • setMinutes

        public DateTime setMinutes(Integer minutes)
        Required. Minutes of hour of day. Must be from 0 to 59.
        Parameters:
        minutes - minutes or null for none
      • getMonth

        public Integer getMonth()
        Required. Month of year. Must be from 1 to 12.
        Returns:
        value or null for none
      • setMonth

        public DateTime setMonth(Integer month)
        Required. Month of year. Must be from 1 to 12.
        Parameters:
        month - month or null for none
      • getNanos

        public Integer getNanos()
        Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
        Returns:
        value or null for none
      • setNanos

        public DateTime setNanos(Integer nanos)
        Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
        Parameters:
        nanos - nanos or null for none
      • getSeconds

        public Integer getSeconds()
        Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
        Returns:
        value or null for none
      • setSeconds

        public DateTime setSeconds(Integer seconds)
        Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
        Parameters:
        seconds - seconds or null for none
      • getTimeZone

        public TimeZone getTimeZone()
        Time zone.
        Returns:
        value or null for none
      • setTimeZone

        public DateTime setTimeZone(TimeZone timeZone)
        Time zone.
        Parameters:
        timeZone - timeZone or null for none
      • getUtcOffset

        public String getUtcOffset()
        UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        Returns:
        value or null for none
      • setUtcOffset

        public DateTime setUtcOffset(String utcOffset)
        UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        Parameters:
        utcOffset - utcOffset or null for none
      • getYear

        public Integer getYear()
        Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
        Returns:
        value or null for none
      • setYear

        public DateTime setYear(Integer year)
        Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
        Parameters:
        year - year or null for none

Copyright © 2011–2021 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy