Package com.google.type
Class Date.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Date,Date.Builder>
com.google.type.Date.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,DateOrBuilder
,Cloneable
- Enclosing class:
- Date
public static final class Date.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Date,Date.Builder>
implements DateOrBuilder
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 value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.Protobuf type
google.type.Date
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getYear
public int getYear()Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
int32 year = 1 [json_name = "year"];
- Specified by:
getYear
in interfaceDateOrBuilder
- Returns:
- The year.
-
setYear
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
int32 year = 1 [json_name = "year"];
- Parameters:
value
- The year to set.- Returns:
- This builder for chaining.
-
clearYear
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
int32 year = 1 [json_name = "year"];
- Returns:
- This builder for chaining.
-
getMonth
public int getMonth()Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
int32 month = 2 [json_name = "month"];
- Specified by:
getMonth
in interfaceDateOrBuilder
- Returns:
- The month.
-
setMonth
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
int32 month = 2 [json_name = "month"];
- Parameters:
value
- The month to set.- Returns:
- This builder for chaining.
-
clearMonth
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
int32 month = 2 [json_name = "month"];
- Returns:
- This builder for chaining.
-
getDay
public int 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.
int32 day = 3 [json_name = "day"];
- Specified by:
getDay
in interfaceDateOrBuilder
- Returns:
- The day.
-
setDay
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.
int32 day = 3 [json_name = "day"];
- Parameters:
value
- The day to set.- Returns:
- This builder for chaining.
-
clearDay
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.
int32 day = 3 [json_name = "day"];
- Returns:
- This builder for chaining.
-