diff --git a/java-essential-contacts/README.md b/java-essential-contacts/README.md
index bfa3d36782a6..0c466996484e 100644
--- a/java-essential-contacts/README.md
+++ b/java-essential-contacts/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
com.google.cloud
google-cloud-essential-contacts
- 2.3.4
+ 2.3.5
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-essential-contacts:2.3.4'
+implementation 'com.google.cloud:google-cloud-essential-contacts:2.3.5'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-essential-contacts" % "2.3.4"
+libraryDependencies += "com.google.cloud" % "google-cloud-essential-contacts" % "2.3.5"
```
## Authentication
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequest.java
index f1ce21d73c5c..76269b741280 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequest.java
@@ -54,93 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ComputeContactsRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- 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();
-
- parent_ = s;
- break;
- }
- case 24:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- case 48:
- {
- int rawValue = input.readEnum();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategories_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- notificationCategories_.add(rawValue);
- break;
- }
- case 50:
- {
- int length = input.readRawVarint32();
- int oldLimit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- int rawValue = input.readEnum();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategories_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- notificationCategories_.add(rawValue);
- }
- input.popLimit(oldLimit);
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategories_ = java.util.Collections.unmodifiableList(notificationCategories_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_ComputeContactsRequest_descriptor;
@@ -441,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < notificationCategories_.size(); i++) {
output.writeEnumNoTag(notificationCategories_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -473,7 +386,7 @@ public int getSerializedSize() {
}
notificationCategoriesMemoizedSerializedSize = dataSize;
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -493,7 +406,7 @@ public boolean equals(final java.lang.Object obj) {
if (!notificationCategories_.equals(other.notificationCategories_)) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -514,7 +427,7 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -644,17 +557,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.ComputeContactsRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -777,7 +683,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.ComputeContactsRe
pageToken_ = other.pageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -792,18 +698,68 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.ComputeContactsRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 24:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 24
+ case 34:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ case 48:
+ {
+ int tmpRaw = input.readEnum();
+ ensureNotificationCategoriesIsMutable();
+ notificationCategories_.add(tmpRaw);
+ break;
+ } // case 48
+ case 50:
+ {
+ int length = input.readRawVarint32();
+ int oldLimit = input.pushLimit(length);
+ while (input.getBytesUntilLimit() > 0) {
+ int tmpRaw = input.readEnum();
+ ensureNotificationCategoriesIsMutable();
+ notificationCategories_.add(tmpRaw);
+ }
+ input.popLimit(oldLimit);
+ break;
+ } // case 50
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.ComputeContactsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1426,7 +1382,18 @@ public ComputeContactsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ComputeContactsRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponse.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponse.java
index 237c51ba6f2a..ad9e7be0b705 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponse.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponse.java
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ComputeContactsResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- 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:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ =
- new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- contacts_.add(
- input.readMessage(
- com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ = java.util.Collections.unmodifiableList(contacts_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_ComputeContactsResponse_descriptor;
@@ -284,7 +222,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -299,7 +237,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -317,7 +255,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getContactsList().equals(other.getContactsList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -334,7 +272,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -464,19 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.ComputeContactsResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getContactsFieldBuilder();
- }
}
@java.lang.Override
@@ -484,10 +413,11 @@ public Builder clear() {
super.clear();
if (contactsBuilder_ == null) {
contacts_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ contacts_ = null;
contactsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -611,7 +541,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.ComputeContactsRe
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -626,19 +556,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.ComputeContactsResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.essentialcontacts.v1.Contact m =
+ input.readMessage(
+ com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry);
+ if (contactsBuilder_ == null) {
+ ensureContactsIsMutable();
+ contacts_.add(m);
+ } else {
+ contactsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.ComputeContactsResponse)
- e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1185,7 +1146,18 @@ public ComputeContactsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ComputeContactsResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Contact.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Contact.java
index de8c9fd703c0..e1a1b81fc1ab 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Contact.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Contact.java
@@ -56,118 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Contact(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- 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();
-
- name_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- email_ = s;
- break;
- }
- case 24:
- {
- int rawValue = input.readEnum();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategorySubscriptions_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- notificationCategorySubscriptions_.add(rawValue);
- break;
- }
- case 26:
- {
- int length = input.readRawVarint32();
- int oldLimit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- int rawValue = input.readEnum();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategorySubscriptions_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- notificationCategorySubscriptions_.add(rawValue);
- }
- input.popLimit(oldLimit);
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- languageTag_ = s;
- break;
- }
- case 64:
- {
- int rawValue = input.readEnum();
-
- validationState_ = rawValue;
- break;
- }
- case 74:
- {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (validateTime_ != null) {
- subBuilder = validateTime_.toBuilder();
- }
- validateTime_ =
- input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(validateTime_);
- validateTime_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- notificationCategorySubscriptions_ =
- java.util.Collections.unmodifiableList(notificationCategorySubscriptions_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_Contact_descriptor;
@@ -592,7 +480,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (validateTime_ != null) {
output.writeMessage(9, getValidateTime());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -632,7 +520,7 @@ public int getSerializedSize() {
if (validateTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getValidateTime());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -658,7 +546,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasValidateTime()) {
if (!getValidateTime().equals(other.getValidateTime())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -685,7 +573,7 @@ public int hashCode() {
hash = (37 * hash) + VALIDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getValidateTime().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -814,17 +702,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.Contact.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -966,7 +847,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.Contact other) {
if (other.hasValidateTime()) {
mergeValidateTime(other.getValidateTime());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -981,17 +862,80 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.Contact parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ email_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 24:
+ {
+ int tmpRaw = input.readEnum();
+ ensureNotificationCategorySubscriptionsIsMutable();
+ notificationCategorySubscriptions_.add(tmpRaw);
+ break;
+ } // case 24
+ case 26:
+ {
+ int length = input.readRawVarint32();
+ int oldLimit = input.pushLimit(length);
+ while (input.getBytesUntilLimit() > 0) {
+ int tmpRaw = input.readEnum();
+ ensureNotificationCategorySubscriptionsIsMutable();
+ notificationCategorySubscriptions_.add(tmpRaw);
+ }
+ input.popLimit(oldLimit);
+ break;
+ } // case 26
+ case 34:
+ {
+ languageTag_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ case 64:
+ {
+ validationState_ = input.readEnum();
+
+ break;
+ } // case 64
+ case 74:
+ {
+ input.readMessage(getValidateTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 74
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.essentialcontacts.v1.Contact) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1942,7 +1886,18 @@ public Contact parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Contact(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequest.java
index 28f6b2e9c258..424ad9e2ca41 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequest.java
@@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private CreateContactRequest(
- 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();
-
- parent_ = s;
- break;
- }
- case 18:
- {
- com.google.cloud.essentialcontacts.v1.Contact.Builder subBuilder = null;
- if (contact_ != null) {
- subBuilder = contact_.toBuilder();
- }
- contact_ =
- input.readMessage(
- com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(contact_);
- contact_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().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.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_CreateContactRequest_descriptor;
@@ -263,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (contact_ != null) {
output.writeMessage(2, getContact());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -278,7 +216,7 @@ public int getSerializedSize() {
if (contact_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContact());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -299,7 +237,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasContact()) {
if (!getContact().equals(other.getContact())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -316,7 +254,7 @@ public int hashCode() {
hash = (37 * hash) + CONTACT_FIELD_NUMBER;
hash = (53 * hash) + getContact().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -446,17 +384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.CreateContactRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -560,7 +491,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.CreateContactRequ
if (other.hasContact()) {
mergeContact(other.getContact());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -575,18 +506,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.CreateContactRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getContactFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.CreateContactRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -961,7 +917,18 @@ public CreateContactRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateContactRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequest.java
index e2419df1d38c..7d85ce80bdb2 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequest.java
@@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private DeleteContactRequest(
- 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();
-
- name_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().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.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_DeleteContactRequest_descriptor;
@@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -201,7 +155,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.essentialcontacts.v1.DeleteContactRequest) obj;
if (!getName().equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -231,7 +185,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.DeleteContactRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.DeleteContactRequ
name_ = other.name_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -476,18 +423,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.DeleteContactRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.DeleteContactRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -654,7 +620,18 @@ public DeleteContactRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new DeleteContactRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequest.java
index cdfb63c5df3f..800ebeaf1118 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequest.java
@@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private GetContactRequest(
- 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();
-
- name_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().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.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_GetContactRequest_descriptor;
@@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -201,7 +155,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.essentialcontacts.v1.GetContactRequest) obj;
if (!getName().equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -231,7 +185,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.GetContactRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.GetContactRequest
name_ = other.name_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -476,18 +423,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.GetContactRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.GetContactRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -654,7 +620,18 @@ public GetContactRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetContactRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequest.java
index d6d5004125f3..e33ccb4d9be7 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequest.java
@@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListContactsRequest(
- 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();
-
- parent_ = s;
- break;
- }
- case 16:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().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.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_ListContactsRequest_descriptor;
@@ -282,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -300,7 +242,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -319,7 +261,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getParent().equals(other.getParent())) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -336,7 +278,7 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -466,17 +408,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.ListContactsRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -579,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.ListContactsReque
pageToken_ = other.pageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -594,18 +529,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.ListContactsRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 16:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 16
+ case 26:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.ListContactsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -949,7 +915,18 @@ public ListContactsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListContactsRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponse.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponse.java
index 3b742b5ec7f6..302e7484f78d 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponse.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponse.java
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListContactsResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- 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:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ =
- new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- contacts_.add(
- input.readMessage(
- com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ = java.util.Collections.unmodifiableList(contacts_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_ListContactsResponse_descriptor;
@@ -274,7 +212,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -289,7 +227,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -307,7 +245,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getContactsList().equals(other.getContactsList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -324,7 +262,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -454,19 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.ListContactsResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getContactsFieldBuilder();
- }
}
@java.lang.Override
@@ -474,10 +403,11 @@ public Builder clear() {
super.clear();
if (contactsBuilder_ == null) {
contacts_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ contacts_ = null;
contactsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -599,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.ListContactsRespo
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -614,18 +544,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.ListContactsResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.essentialcontacts.v1.Contact m =
+ input.readMessage(
+ com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry);
+ if (contactsBuilder_ == null) {
+ ensureContactsIsMutable();
+ contacts_.add(m);
+ } else {
+ contactsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.ListContactsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1135,7 +1097,18 @@ public ListContactsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListContactsResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequest.java
index c99bfb2f0a62..25d435e20bd0 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequest.java
@@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private SendTestMessageRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- 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();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- contacts_.add(s);
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- resource_ = s;
- break;
- }
- case 24:
- {
- int rawValue = input.readEnum();
-
- notificationCategory_ = rawValue;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- contacts_ = contacts_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_SendTestMessageRequest_descriptor;
@@ -348,7 +281,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.getNumber()) {
output.writeEnum(3, notificationCategory_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -374,7 +307,7 @@ public int getSerializedSize() {
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, notificationCategory_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -393,7 +326,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getContactsList().equals(other.getContactsList())) return false;
if (!getResource().equals(other.getResource())) return false;
if (notificationCategory_ != other.notificationCategory_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -412,7 +345,7 @@ public int hashCode() {
hash = (53 * hash) + getResource().hashCode();
hash = (37 * hash) + NOTIFICATION_CATEGORY_FIELD_NUMBER;
hash = (53 * hash) + notificationCategory_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.SendTestMessageRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -668,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.SendTestMessageRe
if (other.notificationCategory_ != 0) {
setNotificationCategoryValue(other.getNotificationCategoryValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -683,18 +609,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.SendTestMessageRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureContactsIsMutable();
+ contacts_.add(s);
+ break;
+ } // case 10
+ case 18:
+ {
+ resource_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 24:
+ {
+ notificationCategory_ = input.readEnum();
+
+ break;
+ } // case 24
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.SendTestMessageRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1191,7 +1149,18 @@ public SendTestMessageRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SendTestMessageRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequest.java b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequest.java
index 168ec6dadc70..b371490c85e6 100644
--- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequest.java
+++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequest.java
@@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private UpdateContactRequest(
- 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 18:
- {
- com.google.cloud.essentialcontacts.v1.Contact.Builder subBuilder = null;
- if (contact_ != null) {
- subBuilder = contact_.toBuilder();
- }
- contact_ =
- input.readMessage(
- com.google.cloud.essentialcontacts.v1.Contact.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(contact_);
- contact_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26:
- {
- com.google.protobuf.FieldMask.Builder subBuilder = null;
- if (updateMask_ != null) {
- subBuilder = updateMask_.toBuilder();
- }
- updateMask_ =
- input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(updateMask_);
- updateMask_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().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.cloud.essentialcontacts.v1.Service
.internal_static_google_cloud_essentialcontacts_v1_UpdateContactRequest_descriptor;
@@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (updateMask_ != null) {
output.writeMessage(3, getUpdateMask());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -282,7 +212,7 @@ public int getSerializedSize() {
if (updateMask_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasUpdateMask()) {
if (!getUpdateMask().equals(other.getUpdateMask())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -325,7 +255,7 @@ public int hashCode() {
hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
hash = (53 * hash) + getUpdateMask().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -455,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.essentialcontacts.v1.UpdateContactRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -576,7 +499,7 @@ public Builder mergeFrom(com.google.cloud.essentialcontacts.v1.UpdateContactRequ
if (other.hasUpdateMask()) {
mergeUpdateMask(other.getUpdateMask());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -591,18 +514,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.essentialcontacts.v1.UpdateContactRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 18:
+ {
+ input.readMessage(getContactFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.essentialcontacts.v1.UpdateContactRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1061,7 +1009,18 @@ public UpdateContactRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UpdateContactRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};