Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

feat: add Interval, Month, PhoneNumber type protos #80

Merged
merged 1 commit into from Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -22,7 +22,8 @@
*
*
* <pre>
* Represents civil time in one of a few possible ways:
* 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
Expand All @@ -32,6 +33,11 @@
* 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.
* </pre>
Expand Down Expand Up @@ -235,6 +241,7 @@ public TimeOffsetCase getTimeOffsetCase() {
*
* @return The year.
*/
@java.lang.Override
public int getYear() {
return year_;
}
Expand All @@ -252,6 +259,7 @@ public int getYear() {
*
* @return The month.
*/
@java.lang.Override
public int getMonth() {
return month_;
}
Expand All @@ -270,6 +278,7 @@ public int getMonth() {
*
* @return The day.
*/
@java.lang.Override
public int getDay() {
return day_;
}
Expand All @@ -289,6 +298,7 @@ public int getDay() {
*
* @return The hours.
*/
@java.lang.Override
public int getHours() {
return hours_;
}
Expand All @@ -306,6 +316,7 @@ public int getHours() {
*
* @return The minutes.
*/
@java.lang.Override
public int getMinutes() {
return minutes_;
}
Expand All @@ -324,6 +335,7 @@ public int getMinutes() {
*
* @return The seconds.
*/
@java.lang.Override
public int getSeconds() {
return seconds_;
}
Expand All @@ -342,6 +354,7 @@ public int getSeconds() {
*
* @return The nanos.
*/
@java.lang.Override
public int getNanos() {
return nanos_;
}
Expand All @@ -360,6 +373,7 @@ public int getNanos() {
*
* @return Whether the utcOffset field is set.
*/
@java.lang.Override
public boolean hasUtcOffset() {
return timeOffsetCase_ == 8;
}
Expand All @@ -376,6 +390,7 @@ public boolean hasUtcOffset() {
*
* @return The utcOffset.
*/
@java.lang.Override
public com.google.protobuf.Duration getUtcOffset() {
if (timeOffsetCase_ == 8) {
return (com.google.protobuf.Duration) timeOffset_;
Expand All @@ -393,6 +408,7 @@ public com.google.protobuf.Duration getUtcOffset() {
*
* <code>.google.protobuf.Duration utc_offset = 8;</code>
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
if (timeOffsetCase_ == 8) {
return (com.google.protobuf.Duration) timeOffset_;
Expand All @@ -412,6 +428,7 @@ public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
*
* @return Whether the timeZone field is set.
*/
@java.lang.Override
public boolean hasTimeZone() {
return timeOffsetCase_ == 9;
}
Expand All @@ -426,6 +443,7 @@ public boolean hasTimeZone() {
*
* @return The timeZone.
*/
@java.lang.Override
public com.google.type.TimeZone getTimeZone() {
if (timeOffsetCase_ == 9) {
return (com.google.type.TimeZone) timeOffset_;
Expand All @@ -441,6 +459,7 @@ public com.google.type.TimeZone getTimeZone() {
*
* <code>.google.type.TimeZone time_zone = 9;</code>
*/
@java.lang.Override
public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() {
if (timeOffsetCase_ == 9) {
return (com.google.type.TimeZone) timeOffset_;
Expand Down Expand Up @@ -702,7 +721,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* <pre>
* Represents civil time in one of a few possible ways:
* 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
Expand All @@ -712,6 +732,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* 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.
* </pre>
Expand Down Expand Up @@ -956,6 +981,7 @@ public Builder clearTimeOffset() {
*
* @return The year.
*/
@java.lang.Override
public int getYear() {
return year_;
}
Expand Down Expand Up @@ -1009,6 +1035,7 @@ public Builder clearYear() {
*
* @return The month.
*/
@java.lang.Override
public int getMonth() {
return month_;
}
Expand Down Expand Up @@ -1061,6 +1088,7 @@ public Builder clearMonth() {
*
* @return The day.
*/
@java.lang.Override
public int getDay() {
return day_;
}
Expand Down Expand Up @@ -1116,6 +1144,7 @@ public Builder clearDay() {
*
* @return The hours.
*/
@java.lang.Override
public int getHours() {
return hours_;
}
Expand Down Expand Up @@ -1171,6 +1200,7 @@ public Builder clearHours() {
*
* @return The minutes.
*/
@java.lang.Override
public int getMinutes() {
return minutes_;
}
Expand Down Expand Up @@ -1223,6 +1253,7 @@ public Builder clearMinutes() {
*
* @return The seconds.
*/
@java.lang.Override
public int getSeconds() {
return seconds_;
}
Expand Down Expand Up @@ -1277,6 +1308,7 @@ public Builder clearSeconds() {
*
* @return The nanos.
*/
@java.lang.Override
public int getNanos() {
return nanos_;
}
Expand Down Expand Up @@ -1336,6 +1368,7 @@ public Builder clearNanos() {
*
* @return Whether the utcOffset field is set.
*/
@java.lang.Override
public boolean hasUtcOffset() {
return timeOffsetCase_ == 8;
}
Expand All @@ -1352,6 +1385,7 @@ public boolean hasUtcOffset() {
*
* @return The utcOffset.
*/
@java.lang.Override
public com.google.protobuf.Duration getUtcOffset() {
if (utcOffsetBuilder_ == null) {
if (timeOffsetCase_ == 8) {
Expand Down Expand Up @@ -1494,6 +1528,7 @@ public com.google.protobuf.Duration.Builder getUtcOffsetBuilder() {
*
* <code>.google.protobuf.Duration utc_offset = 8;</code>
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
if ((timeOffsetCase_ == 8) && (utcOffsetBuilder_ != null)) {
return utcOffsetBuilder_.getMessageOrBuilder();
Expand Down Expand Up @@ -1554,6 +1589,7 @@ public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
*
* @return Whether the timeZone field is set.
*/
@java.lang.Override
public boolean hasTimeZone() {
return timeOffsetCase_ == 9;
}
Expand All @@ -1568,6 +1604,7 @@ public boolean hasTimeZone() {
*
* @return The timeZone.
*/
@java.lang.Override
public com.google.type.TimeZone getTimeZone() {
if (timeZoneBuilder_ == null) {
if (timeOffsetCase_ == 9) {
Expand Down Expand Up @@ -1697,6 +1734,7 @@ public com.google.type.TimeZone.Builder getTimeZoneBuilder() {
*
* <code>.google.type.TimeZone time_zone = 9;</code>
*/
@java.lang.Override
public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() {
if ((timeOffsetCase_ == 9) && (timeZoneBuilder_ != null)) {
return timeZoneBuilder_.getMessageOrBuilder();
Expand Down