diff --git a/proto-google-common-protos/src/main/java/com/google/type/DateTime.java b/proto-google-common-protos/src/main/java/com/google/type/DateTime.java index 2420ef79..e33ab876 100644 --- a/proto-google-common-protos/src/main/java/com/google/type/DateTime.java +++ b/proto-google-common-protos/src/main/java/com/google/type/DateTime.java @@ -22,7 +22,8 @@ * * *
- * 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 @@ -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. *@@ -235,6 +241,7 @@ public TimeOffsetCase getTimeOffsetCase() { * * @return The year. */ + @java.lang.Override public int getYear() { return year_; } @@ -252,6 +259,7 @@ public int getYear() { * * @return The month. */ + @java.lang.Override public int getMonth() { return month_; } @@ -270,6 +278,7 @@ public int getMonth() { * * @return The day. */ + @java.lang.Override public int getDay() { return day_; } @@ -289,6 +298,7 @@ public int getDay() { * * @return The hours. */ + @java.lang.Override public int getHours() { return hours_; } @@ -306,6 +316,7 @@ public int getHours() { * * @return The minutes. */ + @java.lang.Override public int getMinutes() { return minutes_; } @@ -324,6 +335,7 @@ public int getMinutes() { * * @return The seconds. */ + @java.lang.Override public int getSeconds() { return seconds_; } @@ -342,6 +354,7 @@ public int getSeconds() { * * @return The nanos. */ + @java.lang.Override public int getNanos() { return nanos_; } @@ -360,6 +373,7 @@ public int getNanos() { * * @return Whether the utcOffset field is set. */ + @java.lang.Override public boolean hasUtcOffset() { return timeOffsetCase_ == 8; } @@ -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_; @@ -393,6 +408,7 @@ public com.google.protobuf.Duration getUtcOffset() { * *
.google.protobuf.Duration utc_offset = 8;
*/
+ @java.lang.Override
public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
if (timeOffsetCase_ == 8) {
return (com.google.protobuf.Duration) timeOffset_;
@@ -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;
}
@@ -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_;
@@ -441,6 +459,7 @@ public com.google.type.TimeZone getTimeZone() {
*
* .google.type.TimeZone time_zone = 9;
*/
+ @java.lang.Override
public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() {
if (timeOffsetCase_ == 9) {
return (com.google.type.TimeZone) timeOffset_;
@@ -702,7 +721,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* - * 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 @@ -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. *@@ -956,6 +981,7 @@ public Builder clearTimeOffset() { * * @return The year. */ + @java.lang.Override public int getYear() { return year_; } @@ -1009,6 +1035,7 @@ public Builder clearYear() { * * @return The month. */ + @java.lang.Override public int getMonth() { return month_; } @@ -1061,6 +1088,7 @@ public Builder clearMonth() { * * @return The day. */ + @java.lang.Override public int getDay() { return day_; } @@ -1116,6 +1144,7 @@ public Builder clearDay() { * * @return The hours. */ + @java.lang.Override public int getHours() { return hours_; } @@ -1171,6 +1200,7 @@ public Builder clearHours() { * * @return The minutes. */ + @java.lang.Override public int getMinutes() { return minutes_; } @@ -1223,6 +1253,7 @@ public Builder clearMinutes() { * * @return The seconds. */ + @java.lang.Override public int getSeconds() { return seconds_; } @@ -1277,6 +1308,7 @@ public Builder clearSeconds() { * * @return The nanos. */ + @java.lang.Override public int getNanos() { return nanos_; } @@ -1336,6 +1368,7 @@ public Builder clearNanos() { * * @return Whether the utcOffset field is set. */ + @java.lang.Override public boolean hasUtcOffset() { return timeOffsetCase_ == 8; } @@ -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) { @@ -1494,6 +1528,7 @@ public com.google.protobuf.Duration.Builder getUtcOffsetBuilder() { * *
.google.protobuf.Duration utc_offset = 8;
*/
+ @java.lang.Override
public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() {
if ((timeOffsetCase_ == 8) && (utcOffsetBuilder_ != null)) {
return utcOffsetBuilder_.getMessageOrBuilder();
@@ -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;
}
@@ -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) {
@@ -1697,6 +1734,7 @@ public com.google.type.TimeZone.Builder getTimeZoneBuilder() {
*
* .google.type.TimeZone time_zone = 9;
*/
+ @java.lang.Override
public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() {
if ((timeOffsetCase_ == 9) && (timeZoneBuilder_ != null)) {
return timeZoneBuilder_.getMessageOrBuilder();
diff --git a/proto-google-common-protos/src/main/java/com/google/type/Interval.java b/proto-google-common-protos/src/main/java/com/google/type/Interval.java
new file mode 100644
index 00000000..ac92e596
--- /dev/null
+++ b/proto-google-common-protos/src/main/java/com/google/type/Interval.java
@@ -0,0 +1,1036 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/interval.proto
+
+package com.google.type;
+
+/**
+ *
+ *
+ * + * Represents a time interval, encoded as a Timestamp start (inclusive) and a + * Timestamp end (exclusive). + * The start must be less than or equal to the end. + * When the start equals the end, the interval is empty (matches no time). + * When both start and end are unspecified, the interval matches any time. + *+ * + * Protobuf type {@code google.type.Interval} + */ +public final class Interval extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.type.Interval) + IntervalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Interval.newBuilder() to construct. + private Interval(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Interval() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Interval(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Interval( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.type.IntervalProto.internal_static_google_type_Interval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.IntervalProto.internal_static_google_type_Interval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Interval.class, com.google.type.Interval.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+ * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return Whether the startTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartTime() {
+ return startTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return The startTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getStartTime() {
+ return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
+ return getStartTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return Whether the endTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return The endTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (startTime_ != null) {
+ output.writeMessage(1, getStartTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(2, getEndTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (startTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.type.Interval)) {
+ return super.equals(obj);
+ }
+ com.google.type.Interval other = (com.google.type.Interval) obj;
+
+ if (hasStartTime() != other.hasStartTime()) return false;
+ if (hasStartTime()) {
+ if (!getStartTime().equals(other.getStartTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStartTime()) {
+ hash = (37 * hash) + START_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getStartTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.type.Interval parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Interval parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Interval parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Interval parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Interval parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.Interval parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.Interval parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Interval parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.Interval parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Interval parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.Interval parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.Interval parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.type.Interval prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Represents a time interval, encoded as a Timestamp start (inclusive) and a + * Timestamp end (exclusive). + * The start must be less than or equal to the end. + * When the start equals the end, the interval is empty (matches no time). + * When both start and end are unspecified, the interval matches any time. + *+ * + * Protobuf type {@code google.type.Interval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return Whether the startTime field is set.
+ */
+ public boolean hasStartTime() {
+ return startTimeBuilder_ != null || startTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return The startTime.
+ */
+ public com.google.protobuf.Timestamp getStartTime() {
+ if (startTimeBuilder_ == null) {
+ return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
+ } else {
+ return startTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public Builder setStartTime(com.google.protobuf.Timestamp value) {
+ if (startTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ startTime_ = value;
+ onChanged();
+ } else {
+ startTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (startTimeBuilder_ == null) {
+ startTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ startTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public Builder mergeStartTime(com.google.protobuf.Timestamp value) {
+ if (startTimeBuilder_ == null) {
+ if (startTime_ != null) {
+ startTime_ =
+ com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial();
+ } else {
+ startTime_ = value;
+ }
+ onChanged();
+ } else {
+ startTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public Builder clearStartTime() {
+ if (startTimeBuilder_ == null) {
+ startTime_ = null;
+ onChanged();
+ } else {
+ startTime_ = null;
+ startTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() {
+
+ onChanged();
+ return getStartTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
+ if (startTimeBuilder_ != null) {
+ return startTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getStartTimeFieldBuilder() {
+ if (startTimeBuilder_ == null) {
+ startTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getStartTime(), getParentForChildren(), isClean());
+ startTime_ = null;
+ }
+ return startTimeBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return Whether the endTime field is set.
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return The endTime.
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.type.Interval)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.type.Interval)
+ private static final com.google.type.Interval DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.type.Interval();
+ }
+
+ public static com.google.type.Interval getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return Whether the startTime field is set.
+ */
+ boolean hasStartTime();
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ *
+ * @return The startTime.
+ */
+ com.google.protobuf.Timestamp getStartTime();
+ /**
+ *
+ *
+ * + * Optional. Inclusive start of the interval. + * If specified, a Timestamp matching this interval will have to be the same + * or after the start. + *+ * + *
.google.protobuf.Timestamp start_time = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return Whether the endTime field is set.
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ *
+ * @return The endTime.
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ * + * Optional. Exclusive end of the interval. + * If specified, a Timestamp matching this interval will have to be before the + * end. + *+ * + *
.google.protobuf.Timestamp end_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+}
diff --git a/proto-google-common-protos/src/main/java/com/google/type/IntervalProto.java b/proto-google-common-protos/src/main/java/com/google/type/IntervalProto.java
new file mode 100644
index 00000000..ca3a9527
--- /dev/null
+++ b/proto-google-common-protos/src/main/java/com/google/type/IntervalProto.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/interval.proto
+
+package com.google.type;
+
+public final class IntervalProto {
+ private IntervalProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_type_Interval_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_type_Interval_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\032google/type/interval.proto\022\013google.typ"
+ + "e\032\037google/protobuf/timestamp.proto\"h\n\010In"
+ + "terval\022.\n\nstart_time\030\001 \001(\0132\032.google.prot"
+ + "obuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.googl"
+ + "e.protobuf.TimestampBi\n\017com.google.typeB"
+ + "\rIntervalProtoP\001Z+ * The unspecifed month. + *+ * + *
MONTH_UNSPECIFIED = 0;
+ */
+ MONTH_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * The month of January. + *+ * + *
JANUARY = 1;
+ */
+ JANUARY(1),
+ /**
+ *
+ *
+ * + * The month of February. + *+ * + *
FEBRUARY = 2;
+ */
+ FEBRUARY(2),
+ /**
+ *
+ *
+ * + * The month of March. + *+ * + *
MARCH = 3;
+ */
+ MARCH(3),
+ /**
+ *
+ *
+ * + * The month of April. + *+ * + *
APRIL = 4;
+ */
+ APRIL(4),
+ /**
+ *
+ *
+ * + * The month of May. + *+ * + *
MAY = 5;
+ */
+ MAY(5),
+ /**
+ *
+ *
+ * + * The month of June. + *+ * + *
JUNE = 6;
+ */
+ JUNE(6),
+ /**
+ *
+ *
+ * + * The month of July. + *+ * + *
JULY = 7;
+ */
+ JULY(7),
+ /**
+ *
+ *
+ * + * The month of August. + *+ * + *
AUGUST = 8;
+ */
+ AUGUST(8),
+ /**
+ *
+ *
+ * + * The month of September. + *+ * + *
SEPTEMBER = 9;
+ */
+ SEPTEMBER(9),
+ /**
+ *
+ *
+ * + * The month of October. + *+ * + *
OCTOBER = 10;
+ */
+ OCTOBER(10),
+ /**
+ *
+ *
+ * + * The month of November. + *+ * + *
NOVEMBER = 11;
+ */
+ NOVEMBER(11),
+ /**
+ *
+ *
+ * + * The month of December. + *+ * + *
DECEMBER = 12;
+ */
+ DECEMBER(12),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * The unspecifed month. + *+ * + *
MONTH_UNSPECIFIED = 0;
+ */
+ public static final int MONTH_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * The month of January. + *+ * + *
JANUARY = 1;
+ */
+ public static final int JANUARY_VALUE = 1;
+ /**
+ *
+ *
+ * + * The month of February. + *+ * + *
FEBRUARY = 2;
+ */
+ public static final int FEBRUARY_VALUE = 2;
+ /**
+ *
+ *
+ * + * The month of March. + *+ * + *
MARCH = 3;
+ */
+ public static final int MARCH_VALUE = 3;
+ /**
+ *
+ *
+ * + * The month of April. + *+ * + *
APRIL = 4;
+ */
+ public static final int APRIL_VALUE = 4;
+ /**
+ *
+ *
+ * + * The month of May. + *+ * + *
MAY = 5;
+ */
+ public static final int MAY_VALUE = 5;
+ /**
+ *
+ *
+ * + * The month of June. + *+ * + *
JUNE = 6;
+ */
+ public static final int JUNE_VALUE = 6;
+ /**
+ *
+ *
+ * + * The month of July. + *+ * + *
JULY = 7;
+ */
+ public static final int JULY_VALUE = 7;
+ /**
+ *
+ *
+ * + * The month of August. + *+ * + *
AUGUST = 8;
+ */
+ public static final int AUGUST_VALUE = 8;
+ /**
+ *
+ *
+ * + * The month of September. + *+ * + *
SEPTEMBER = 9;
+ */
+ public static final int SEPTEMBER_VALUE = 9;
+ /**
+ *
+ *
+ * + * The month of October. + *+ * + *
OCTOBER = 10;
+ */
+ public static final int OCTOBER_VALUE = 10;
+ /**
+ *
+ *
+ * + * The month of November. + *+ * + *
NOVEMBER = 11;
+ */
+ public static final int NOVEMBER_VALUE = 11;
+ /**
+ *
+ *
+ * + * The month of December. + *+ * + *
DECEMBER = 12;
+ */
+ public static final int DECEMBER_VALUE = 12;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static Month valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static Month forNumber(int value) {
+ switch (value) {
+ case 0:
+ return MONTH_UNSPECIFIED;
+ case 1:
+ return JANUARY;
+ case 2:
+ return FEBRUARY;
+ case 3:
+ return MARCH;
+ case 4:
+ return APRIL;
+ case 5:
+ return MAY;
+ case 6:
+ return JUNE;
+ case 7:
+ return JULY;
+ case 8:
+ return AUGUST;
+ case 9:
+ return SEPTEMBER;
+ case 10:
+ return OCTOBER;
+ case 11:
+ return NOVEMBER;
+ case 12:
+ return DECEMBER;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * An object representing a phone number, suitable as an API wire format. + * This representation: + * - should not be used for locale-specific formatting of a phone number, such + * as "+1 (650) 253-0000 ext. 123" + * - is not designed for efficient storage + * - may not be suitable for dialing - specialized libraries (see references) + * should be used to parse the number for that purpose + * To do something meaningful with this number, such as format it for various + * use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + * For instance, in Java this would be: + * com.google.type.PhoneNumber wireProto = + * com.google.type.PhoneNumber.newBuilder().build(); + * com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + * PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + * if (!wireProto.getExtension().isEmpty()) { + * phoneNumber.setExtension(wireProto.getExtension()); + * } + * Reference(s): + * - https://github.com/google/libphonenumber + *+ * + * Protobuf type {@code google.type.PhoneNumber} + */ +public final class PhoneNumber extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.type.PhoneNumber) + PhoneNumberOrBuilder { + private static final long serialVersionUID = 0L; + // Use PhoneNumber.newBuilder() to construct. + private PhoneNumber(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private PhoneNumber() { + extension_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PhoneNumber(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PhoneNumber( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 1; + kind_ = s; + break; + } + case 18: + { + com.google.type.PhoneNumber.ShortCode.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((com.google.type.PhoneNumber.ShortCode) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.type.PhoneNumber.ShortCode.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.PhoneNumber.ShortCode) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + extension_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.type.PhoneNumberProto.internal_static_google_type_PhoneNumber_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.PhoneNumberProto + .internal_static_google_type_PhoneNumber_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.PhoneNumber.class, com.google.type.PhoneNumber.Builder.class); + } + + public interface ShortCodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.type.PhoneNumber.ShortCode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The regionCode.
+ */
+ java.lang.String getRegionCode();
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The bytes for regionCode.
+ */
+ com.google.protobuf.ByteString getRegionCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The number.
+ */
+ java.lang.String getNumber();
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The bytes for number.
+ */
+ com.google.protobuf.ByteString getNumberBytes();
+ }
+ /**
+ *
+ *
+ * + * An object representing a short code, which is a phone number that is + * typically much shorter than regular phone numbers and can be used to + * address messages in MMS and SMS systems, as well as for abbreviated dialing + * (e.g. "Text 611 to see how many minutes you have remaining on your plan."). + * Short codes are restricted to a region and are not internationally + * dialable, which means the same short code can exist in different regions, + * with different usage and pricing, even if those regions share the same + * country calling code (e.g. US and CA). + *+ * + * Protobuf type {@code google.type.PhoneNumber.ShortCode} + */ + public static final class ShortCode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.type.PhoneNumber.ShortCode) + ShortCodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShortCode.newBuilder() to construct. + private ShortCode(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ShortCode() { + regionCode_ = ""; + number_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShortCode(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ShortCode( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + number_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.type.PhoneNumberProto + .internal_static_google_type_PhoneNumber_ShortCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.PhoneNumberProto + .internal_static_google_type_PhoneNumber_ShortCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.PhoneNumber.ShortCode.class, + com.google.type.PhoneNumber.ShortCode.Builder.class); + } + + public static final int REGION_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object regionCode_; + /** + * + * + *
+ * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The regionCode.
+ */
+ @java.lang.Override
+ public java.lang.String getRegionCode() {
+ java.lang.Object ref = regionCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ regionCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The bytes for regionCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRegionCodeBytes() {
+ java.lang.Object ref = regionCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ regionCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NUMBER_FIELD_NUMBER = 2;
+ private volatile java.lang.Object number_;
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The number.
+ */
+ @java.lang.Override
+ public java.lang.String getNumber() {
+ java.lang.Object ref = number_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ number_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The bytes for number.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNumberBytes() {
+ java.lang.Object ref = number_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ number_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getRegionCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionCode_);
+ }
+ if (!getNumberBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, number_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getRegionCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionCode_);
+ }
+ if (!getNumberBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, number_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.type.PhoneNumber.ShortCode)) {
+ return super.equals(obj);
+ }
+ com.google.type.PhoneNumber.ShortCode other = (com.google.type.PhoneNumber.ShortCode) obj;
+
+ if (!getRegionCode().equals(other.getRegionCode())) return false;
+ if (!getNumber().equals(other.getNumber())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + REGION_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getRegionCode().hashCode();
+ hash = (37 * hash) + NUMBER_FIELD_NUMBER;
+ hash = (53 * hash) + getNumber().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.type.PhoneNumber.ShortCode prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * An object representing a short code, which is a phone number that is + * typically much shorter than regular phone numbers and can be used to + * address messages in MMS and SMS systems, as well as for abbreviated dialing + * (e.g. "Text 611 to see how many minutes you have remaining on your plan."). + * Short codes are restricted to a region and are not internationally + * dialable, which means the same short code can exist in different regions, + * with different usage and pricing, even if those regions share the same + * country calling code (e.g. US and CA). + *+ * + * Protobuf type {@code google.type.PhoneNumber.ShortCode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The regionCode.
+ */
+ public java.lang.String getRegionCode() {
+ java.lang.Object ref = regionCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ regionCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return The bytes for regionCode.
+ */
+ public com.google.protobuf.ByteString getRegionCodeBytes() {
+ java.lang.Object ref = regionCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ regionCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @param value The regionCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRegionCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ regionCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRegionCode() {
+
+ regionCode_ = getDefaultInstance().getRegionCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 region code of the location where calls to this + * short code can be made, such as "US" and "BB". + * Reference(s): + * - http://www.unicode.org/reports/tr35/#unicode_region_subtag + *+ * + *
string region_code = 1;
+ *
+ * @param value The bytes for regionCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ regionCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object number_ = "";
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The number.
+ */
+ public java.lang.String getNumber() {
+ java.lang.Object ref = number_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ number_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return The bytes for number.
+ */
+ public com.google.protobuf.ByteString getNumberBytes() {
+ java.lang.Object ref = number_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ number_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @param value The number to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNumber(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ number_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNumber() {
+
+ number_ = getDefaultInstance().getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The short code digits, without a leading plus ('+') or country + * calling code, e.g. "611". + *+ * + *
string number = 2;
+ *
+ * @param value The bytes for number to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNumberBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ number_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.type.PhoneNumber.ShortCode)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.type.PhoneNumber.ShortCode)
+ private static final com.google.type.PhoneNumber.ShortCode DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.type.PhoneNumber.ShortCode();
+ }
+
+ public static com.google.type.PhoneNumber.ShortCode getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The e164Number.
+ */
+ public java.lang.String getE164Number() {
+ java.lang.Object ref = "";
+ if (kindCase_ == 1) {
+ ref = kind_;
+ }
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (kindCase_ == 1) {
+ kind_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The bytes for e164Number.
+ */
+ public com.google.protobuf.ByteString getE164NumberBytes() {
+ java.lang.Object ref = "";
+ if (kindCase_ == 1) {
+ ref = kind_;
+ }
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (kindCase_ == 1) {
+ kind_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SHORT_CODE_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return Whether the shortCode field is set.
+ */
+ @java.lang.Override
+ public boolean hasShortCode() {
+ return kindCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return The shortCode.
+ */
+ @java.lang.Override
+ public com.google.type.PhoneNumber.ShortCode getShortCode() {
+ if (kindCase_ == 2) {
+ return (com.google.type.PhoneNumber.ShortCode) kind_;
+ }
+ return com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ @java.lang.Override
+ public com.google.type.PhoneNumber.ShortCodeOrBuilder getShortCodeOrBuilder() {
+ if (kindCase_ == 2) {
+ return (com.google.type.PhoneNumber.ShortCode) kind_;
+ }
+ return com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ }
+
+ public static final int EXTENSION_FIELD_NUMBER = 3;
+ private volatile java.lang.Object extension_;
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The extension.
+ */
+ @java.lang.Override
+ public java.lang.String getExtension() {
+ java.lang.Object ref = extension_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ extension_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The bytes for extension.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getExtensionBytes() {
+ java.lang.Object ref = extension_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ extension_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (kindCase_ == 1) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);
+ }
+ if (kindCase_ == 2) {
+ output.writeMessage(2, (com.google.type.PhoneNumber.ShortCode) kind_);
+ }
+ if (!getExtensionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extension_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (kindCase_ == 1) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_);
+ }
+ if (kindCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, (com.google.type.PhoneNumber.ShortCode) kind_);
+ }
+ if (!getExtensionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extension_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.type.PhoneNumber)) {
+ return super.equals(obj);
+ }
+ com.google.type.PhoneNumber other = (com.google.type.PhoneNumber) obj;
+
+ if (!getExtension().equals(other.getExtension())) return false;
+ if (!getKindCase().equals(other.getKindCase())) return false;
+ switch (kindCase_) {
+ case 1:
+ if (!getE164Number().equals(other.getE164Number())) return false;
+ break;
+ case 2:
+ if (!getShortCode().equals(other.getShortCode())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + EXTENSION_FIELD_NUMBER;
+ hash = (53 * hash) + getExtension().hashCode();
+ switch (kindCase_) {
+ case 1:
+ hash = (37 * hash) + E164_NUMBER_FIELD_NUMBER;
+ hash = (53 * hash) + getE164Number().hashCode();
+ break;
+ case 2:
+ hash = (37 * hash) + SHORT_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getShortCode().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.type.PhoneNumber parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.type.PhoneNumber prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * An object representing a phone number, suitable as an API wire format. + * This representation: + * - should not be used for locale-specific formatting of a phone number, such + * as "+1 (650) 253-0000 ext. 123" + * - is not designed for efficient storage + * - may not be suitable for dialing - specialized libraries (see references) + * should be used to parse the number for that purpose + * To do something meaningful with this number, such as format it for various + * use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + * For instance, in Java this would be: + * com.google.type.PhoneNumber wireProto = + * com.google.type.PhoneNumber.newBuilder().build(); + * com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + * PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + * if (!wireProto.getExtension().isEmpty()) { + * phoneNumber.setExtension(wireProto.getExtension()); + * } + * Reference(s): + * - https://github.com/google/libphonenumber + *+ * + * Protobuf type {@code google.type.PhoneNumber} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The e164Number.
+ */
+ @java.lang.Override
+ public java.lang.String getE164Number() {
+ java.lang.Object ref = "";
+ if (kindCase_ == 1) {
+ ref = kind_;
+ }
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (kindCase_ == 1) {
+ kind_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The bytes for e164Number.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getE164NumberBytes() {
+ java.lang.Object ref = "";
+ if (kindCase_ == 1) {
+ ref = kind_;
+ }
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (kindCase_ == 1) {
+ kind_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @param value The e164Number to set.
+ * @return This builder for chaining.
+ */
+ public Builder setE164Number(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ kindCase_ = 1;
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearE164Number() {
+ if (kindCase_ == 1) {
+ kindCase_ = 0;
+ kind_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @param value The bytes for e164Number to set.
+ * @return This builder for chaining.
+ */
+ public Builder setE164NumberBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ kindCase_ = 1;
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.PhoneNumber.ShortCode,
+ com.google.type.PhoneNumber.ShortCode.Builder,
+ com.google.type.PhoneNumber.ShortCodeOrBuilder>
+ shortCodeBuilder_;
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return Whether the shortCode field is set.
+ */
+ @java.lang.Override
+ public boolean hasShortCode() {
+ return kindCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return The shortCode.
+ */
+ @java.lang.Override
+ public com.google.type.PhoneNumber.ShortCode getShortCode() {
+ if (shortCodeBuilder_ == null) {
+ if (kindCase_ == 2) {
+ return (com.google.type.PhoneNumber.ShortCode) kind_;
+ }
+ return com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ } else {
+ if (kindCase_ == 2) {
+ return shortCodeBuilder_.getMessage();
+ }
+ return com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ public Builder setShortCode(com.google.type.PhoneNumber.ShortCode value) {
+ if (shortCodeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ kind_ = value;
+ onChanged();
+ } else {
+ shortCodeBuilder_.setMessage(value);
+ }
+ kindCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ public Builder setShortCode(com.google.type.PhoneNumber.ShortCode.Builder builderForValue) {
+ if (shortCodeBuilder_ == null) {
+ kind_ = builderForValue.build();
+ onChanged();
+ } else {
+ shortCodeBuilder_.setMessage(builderForValue.build());
+ }
+ kindCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ public Builder mergeShortCode(com.google.type.PhoneNumber.ShortCode value) {
+ if (shortCodeBuilder_ == null) {
+ if (kindCase_ == 2 && kind_ != com.google.type.PhoneNumber.ShortCode.getDefaultInstance()) {
+ kind_ =
+ com.google.type.PhoneNumber.ShortCode.newBuilder(
+ (com.google.type.PhoneNumber.ShortCode) kind_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ kind_ = value;
+ }
+ onChanged();
+ } else {
+ if (kindCase_ == 2) {
+ shortCodeBuilder_.mergeFrom(value);
+ }
+ shortCodeBuilder_.setMessage(value);
+ }
+ kindCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ public Builder clearShortCode() {
+ if (shortCodeBuilder_ == null) {
+ if (kindCase_ == 2) {
+ kindCase_ = 0;
+ kind_ = null;
+ onChanged();
+ }
+ } else {
+ if (kindCase_ == 2) {
+ kindCase_ = 0;
+ kind_ = null;
+ }
+ shortCodeBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ public com.google.type.PhoneNumber.ShortCode.Builder getShortCodeBuilder() {
+ return getShortCodeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ @java.lang.Override
+ public com.google.type.PhoneNumber.ShortCodeOrBuilder getShortCodeOrBuilder() {
+ if ((kindCase_ == 2) && (shortCodeBuilder_ != null)) {
+ return shortCodeBuilder_.getMessageOrBuilder();
+ } else {
+ if (kindCase_ == 2) {
+ return (com.google.type.PhoneNumber.ShortCode) kind_;
+ }
+ return com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.PhoneNumber.ShortCode,
+ com.google.type.PhoneNumber.ShortCode.Builder,
+ com.google.type.PhoneNumber.ShortCodeOrBuilder>
+ getShortCodeFieldBuilder() {
+ if (shortCodeBuilder_ == null) {
+ if (!(kindCase_ == 2)) {
+ kind_ = com.google.type.PhoneNumber.ShortCode.getDefaultInstance();
+ }
+ shortCodeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.PhoneNumber.ShortCode,
+ com.google.type.PhoneNumber.ShortCode.Builder,
+ com.google.type.PhoneNumber.ShortCodeOrBuilder>(
+ (com.google.type.PhoneNumber.ShortCode) kind_, getParentForChildren(), isClean());
+ kind_ = null;
+ }
+ kindCase_ = 2;
+ onChanged();
+ ;
+ return shortCodeBuilder_;
+ }
+
+ private java.lang.Object extension_ = "";
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The extension.
+ */
+ public java.lang.String getExtension() {
+ java.lang.Object ref = extension_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ extension_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The bytes for extension.
+ */
+ public com.google.protobuf.ByteString getExtensionBytes() {
+ java.lang.Object ref = extension_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ extension_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @param value The extension to set.
+ * @return This builder for chaining.
+ */
+ public Builder setExtension(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ extension_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearExtension() {
+
+ extension_ = getDefaultInstance().getExtension();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @param value The bytes for extension to set.
+ * @return This builder for chaining.
+ */
+ public Builder setExtensionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ extension_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.type.PhoneNumber)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.type.PhoneNumber)
+ private static final com.google.type.PhoneNumber DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.type.PhoneNumber();
+ }
+
+ public static com.google.type.PhoneNumber getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The e164Number.
+ */
+ java.lang.String getE164Number();
+ /**
+ *
+ *
+ * + * The phone number, represented as a leading plus sign ('+'), followed by a + * phone number that uses a relaxed ITU E.164 format consisting of the + * country calling code (1 to 3 digits) and the subscriber number, with no + * additional spaces or formatting, e.g.: + * - correct: "+15552220123" + * - incorrect: "+1 (555) 222-01234 x123". + * The ITU E.164 format limits the latter to 12 digits, but in practice not + * all countries respect that, so we relax that restriction here. + * National-only numbers are not allowed. + * References: + * - https://www.itu.int/rec/T-REC-E.164-201011-I + * - https://en.wikipedia.org/wiki/E.164. + * - https://en.wikipedia.org/wiki/List_of_country_calling_codes + *+ * + *
string e164_number = 1;
+ *
+ * @return The bytes for e164Number.
+ */
+ com.google.protobuf.ByteString getE164NumberBytes();
+
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return Whether the shortCode field is set.
+ */
+ boolean hasShortCode();
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ *
+ * @return The shortCode.
+ */
+ com.google.type.PhoneNumber.ShortCode getShortCode();
+ /**
+ *
+ *
+ * + * A short code. + * Reference(s): + * - https://en.wikipedia.org/wiki/Short_code + *+ * + *
.google.type.PhoneNumber.ShortCode short_code = 2;
+ */
+ com.google.type.PhoneNumber.ShortCodeOrBuilder getShortCodeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The extension.
+ */
+ java.lang.String getExtension();
+ /**
+ *
+ *
+ * + * The phone number's extension. The extension is not standardized in ITU + * recommendations, except for being defined as a series of numbers with a + * maximum length of 40 digits. Other than digits, some other dialing + * characters such as ',' (indicating a wait) or '#' may be stored here. + * Note that no regions currently use extensions with short codes, so this + * field is normally only set in conjunction with an E.164 number. It is held + * separately from the E.164 number to allow for short code extensions in the + * future. + *+ * + *
string extension = 3;
+ *
+ * @return The bytes for extension.
+ */
+ com.google.protobuf.ByteString getExtensionBytes();
+
+ public com.google.type.PhoneNumber.KindCase getKindCase();
+}
diff --git a/proto-google-common-protos/src/main/java/com/google/type/PhoneNumberProto.java b/proto-google-common-protos/src/main/java/com/google/type/PhoneNumberProto.java
new file mode 100644
index 00000000..f69641ee
--- /dev/null
+++ b/proto-google-common-protos/src/main/java/com/google/type/PhoneNumberProto.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/phone_number.proto
+
+package com.google.type;
+
+public final class PhoneNumberProto {
+ private PhoneNumberProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_type_PhoneNumber_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_type_PhoneNumber_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_type_PhoneNumber_ShortCode_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_type_PhoneNumber_ShortCode_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\036google/type/phone_number.proto\022\013google"
+ + ".type\"\253\001\n\013PhoneNumber\022\025\n\013e164_number\030\001 \001"
+ + "(\tH\000\0228\n\nshort_code\030\002 \001(\0132\".google.type.P"
+ + "honeNumber.ShortCodeH\000\022\021\n\textension\030\003 \001("
+ + "\t\0320\n\tShortCode\022\023\n\013region_code\030\001 \001(\t\022\016\n\006n"
+ + "umber\030\002 \001(\tB\006\n\004kindBt\n\017com.google.typeB\020"
+ + "PhoneNumberProtoP\001ZDgoogle.golang.org/ge"
+ + "nproto/googleapis/type/phone_number;phon"
+ + "e_number\370\001\001\242\002\003GTPb\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+ internal_static_google_type_PhoneNumber_descriptor = getDescriptor().getMessageTypes().get(0);
+ internal_static_google_type_PhoneNumber_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_type_PhoneNumber_descriptor,
+ new java.lang.String[] {
+ "E164Number", "ShortCode", "Extension", "Kind",
+ });
+ internal_static_google_type_PhoneNumber_ShortCode_descriptor =
+ internal_static_google_type_PhoneNumber_descriptor.getNestedTypes().get(0);
+ internal_static_google_type_PhoneNumber_ShortCode_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_type_PhoneNumber_ShortCode_descriptor,
+ new java.lang.String[] {
+ "RegionCode", "Number",
+ });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-common-protos/src/main/java/com/google/type/TimeZone.java b/proto-google-common-protos/src/main/java/com/google/type/TimeZone.java
index 8f1a200a..015da6de 100644
--- a/proto-google-common-protos/src/main/java/com/google/type/TimeZone.java
+++ b/proto-google-common-protos/src/main/java/com/google/type/TimeZone.java
@@ -130,6 +130,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
* @return The id.
*/
+ @java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getId() {
*
* @return The bytes for id.
*/
+ @java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
@@ -177,6 +179,7 @@ public com.google.protobuf.ByteString getIdBytes() {
*
* @return The version.
*/
+ @java.lang.Override
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
@@ -199,6 +202,7 @@ public java.lang.String getVersion() {
*
* @return The bytes for version.
*/
+ @java.lang.Override
public com.google.protobuf.ByteString getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
diff --git a/synth.metadata b/synth.metadata
index d9f6faec..928f23e2 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-common-protos.git",
- "sha": "1759fe7650869500e0d7b712fe8ef1bcc346d27a"
+ "sha": "fda2e7be4961ef27fc0908f5dffd63b6248f0507"
}
},
{
@@ -289,6 +289,9 @@
"proto-google-common-protos/src/main/java/com/google/type/Date.java",
"proto-google-common-protos/src/main/java/com/google/type/DateOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/DateProto.java",
+ "proto-google-common-protos/src/main/java/com/google/type/DateTime.java",
+ "proto-google-common-protos/src/main/java/com/google/type/DateTimeOrBuilder.java",
+ "proto-google-common-protos/src/main/java/com/google/type/DateTimeProto.java",
"proto-google-common-protos/src/main/java/com/google/type/DayOfWeek.java",
"proto-google-common-protos/src/main/java/com/google/type/DayOfWeekProto.java",
"proto-google-common-protos/src/main/java/com/google/type/Expr.java",
@@ -297,12 +300,20 @@
"proto-google-common-protos/src/main/java/com/google/type/Fraction.java",
"proto-google-common-protos/src/main/java/com/google/type/FractionOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/FractionProto.java",
+ "proto-google-common-protos/src/main/java/com/google/type/Interval.java",
+ "proto-google-common-protos/src/main/java/com/google/type/IntervalOrBuilder.java",
+ "proto-google-common-protos/src/main/java/com/google/type/IntervalProto.java",
"proto-google-common-protos/src/main/java/com/google/type/LatLng.java",
"proto-google-common-protos/src/main/java/com/google/type/LatLngOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/LatLngProto.java",
"proto-google-common-protos/src/main/java/com/google/type/Money.java",
"proto-google-common-protos/src/main/java/com/google/type/MoneyOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/MoneyProto.java",
+ "proto-google-common-protos/src/main/java/com/google/type/Month.java",
+ "proto-google-common-protos/src/main/java/com/google/type/MonthProto.java",
+ "proto-google-common-protos/src/main/java/com/google/type/PhoneNumber.java",
+ "proto-google-common-protos/src/main/java/com/google/type/PhoneNumberOrBuilder.java",
+ "proto-google-common-protos/src/main/java/com/google/type/PhoneNumberProto.java",
"proto-google-common-protos/src/main/java/com/google/type/PostalAddress.java",
"proto-google-common-protos/src/main/java/com/google/type/PostalAddressOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/PostalAddressProto.java",
@@ -312,6 +323,8 @@
"proto-google-common-protos/src/main/java/com/google/type/TimeOfDay.java",
"proto-google-common-protos/src/main/java/com/google/type/TimeOfDayOrBuilder.java",
"proto-google-common-protos/src/main/java/com/google/type/TimeOfDayProto.java",
+ "proto-google-common-protos/src/main/java/com/google/type/TimeZone.java",
+ "proto-google-common-protos/src/main/java/com/google/type/TimeZoneOrBuilder.java",
"renovate.json"
]
}
\ No newline at end of file