Package com.google.type
Interface DateTimeOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
DateTime,DateTime.Builder
public interface DateTimeOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetDay()Required.intgetHours()Required.intgetMinutes()Required.intgetMonth()Required.intgetNanos()Required.intgetSeconds()Required.DateTime.TimeOffsetCasegetTimeOffsetCase()TimeZonegetTimeZone()Time zone.TimeZoneOrBuildergetTimeZoneOrBuilder()Time zone.com.google.protobuf.DurationgetUtcOffset()UTC offset.com.google.protobuf.DurationOrBuildergetUtcOffsetOrBuilder()UTC offset.intgetYear()Optional.booleanhasTimeZone()Time zone.booleanhasUtcOffset()UTC offset.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getYear
int getYear()
Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
int32 year = 1;- Returns:
- The year.
-
getMonth
int getMonth()
Required. Month of year. Must be from 1 to 12.
int32 month = 2;- Returns:
- The month.
-
getDay
int getDay()
Required. Day of month. Must be from 1 to 31 and valid for the year and month.
int32 day = 3;- Returns:
- The day.
-
getHours
int 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.
int32 hours = 4;- Returns:
- The hours.
-
getMinutes
int getMinutes()
Required. Minutes of hour of day. Must be from 0 to 59.
int32 minutes = 5;- Returns:
- The minutes.
-
getSeconds
int 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.
int32 seconds = 6;- Returns:
- The seconds.
-
getNanos
int getNanos()
Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
int32 nanos = 7;- Returns:
- The nanos.
-
hasUtcOffset
boolean hasUtcOffset()
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 }..google.protobuf.Duration utc_offset = 8;- Returns:
- Whether the utcOffset field is set.
-
getUtcOffset
com.google.protobuf.Duration 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 }..google.protobuf.Duration utc_offset = 8;- Returns:
- The utcOffset.
-
getUtcOffsetOrBuilder
com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder()
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 }..google.protobuf.Duration utc_offset = 8;
-
hasTimeZone
boolean hasTimeZone()
Time zone.
.google.type.TimeZone time_zone = 9;- Returns:
- Whether the timeZone field is set.
-
getTimeZone
TimeZone getTimeZone()
Time zone.
.google.type.TimeZone time_zone = 9;- Returns:
- The timeZone.
-
getTimeZoneOrBuilder
TimeZoneOrBuilder getTimeZoneOrBuilder()
Time zone.
.google.type.TimeZone time_zone = 9;
-
getTimeOffsetCase
DateTime.TimeOffsetCase getTimeOffsetCase()
-
-