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

There is a newer version: v2.1-rev20240825-2.0.0
Show newest version






DateTime (Content API for Shopping v2.1-rev20240609-2.0.0)












com.google.api.services.content.model

Class DateTime

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


    public final class DateTime
    extends com.google.api.client.json.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, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. 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()
        Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        Returns:
        value or null for none
      • setDay

        public DateTime setDay(Integer day)
        Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        Parameters:
        day - day or null for none
      • getHours

        public Integer getHours()
        Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). 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)
        Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). 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()
        Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
        Returns:
        value or null for none
      • setMinutes

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

        public Integer getMonth()
        Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        Returns:
        value or null for none
      • setMonth

        public DateTime setMonth(Integer month)
        Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        Parameters:
        month - month or null for none
      • getNanos

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

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

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

        public DateTime setSeconds(Integer seconds)
        Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. 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
      • set

        public DateTime set(String fieldName,
                            Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public DateTime clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy