From 155419c46a105b3c0ac8cbdf3472f0eb5a87b73f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 19:42:14 +0000 Subject: [PATCH] chore(bazel): update protobuf to v3.21.7 (#897) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 --- .../cloudtrace/v1/GetTraceRequest.java | 126 +- .../cloudtrace/v1/ListTracesRequest.java | 218 +-- .../cloudtrace/v1/ListTracesResponse.java | 146 +- .../cloudtrace/v1/PatchTracesRequest.java | 135 +- .../google/devtools/cloudtrace/v1/Trace.java | 158 +- .../devtools/cloudtrace/v1/TraceSpan.java | 214 +-- .../google/devtools/cloudtrace/v1/Traces.java | 132 +- .../cloudtrace/v2/AttributeValue.java | 150 +- .../cloudtrace/v2/BatchWriteSpansRequest.java | 146 +- .../google/devtools/cloudtrace/v2/Module.java | 145 +- .../google/devtools/cloudtrace/v2/Span.java | 1459 +++++++---------- .../devtools/cloudtrace/v2/StackTrace.java | 520 +++--- .../cloudtrace/v2/TruncatableString.java | 124 +- 13 files changed, 1429 insertions(+), 2244 deletions(-) diff --git a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/GetTraceRequest.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/GetTraceRequest.java index b635756e0fed..3322eba181ce 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/GetTraceRequest.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/GetTraceRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTraceRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - traceId_ = 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.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_GetTraceRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, traceId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, traceId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getTraceId().equals(other.getTraceId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; hash = (53 * hash) + getTraceId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.GetTraceRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.GetTraceRequest other traceId_ = other.traceId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.GetTraceRequest 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: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + traceId_ = 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.devtools.cloudtrace.v1.GetTraceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetTraceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTraceRequest(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesRequest.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesRequest.java index a55ba47f1080..73b07765a0c5 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesRequest.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesRequest.java @@ -57,115 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTracesRequest( - 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(); - - projectId_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - view_ = rawValue; - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - 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 50: - { - 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; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = 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.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_ListTracesRequest_descriptor; @@ -842,7 +733,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -877,7 +768,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -907,7 +798,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -938,7 +829,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1068,17 +959,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.ListTracesRequest.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 @@ -1229,7 +1113,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.ListTracesRequest oth orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1244,18 +1128,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.ListTracesRequest 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: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 66 + 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.devtools.cloudtrace.v1.ListTracesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2442,7 +2387,18 @@ public ListTracesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTracesRequest(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesResponse.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesResponse.java index 3ec4634f2737..48a0c84cf579 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesResponse.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/ListTracesResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTracesResponse( - 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)) { - traces_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - traces_.add( - input.readMessage( - com.google.devtools.cloudtrace.v1.Trace.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)) { - traces_ = java.util.Collections.unmodifiableList(traces_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_ListTracesResponse_descriptor; @@ -271,7 +210,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 @@ -286,7 +225,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; } @@ -304,7 +243,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTracesList().equals(other.getTracesList())) 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; } @@ -321,7 +260,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; } @@ -450,19 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.ListTracesResponse.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) { - getTracesFieldBuilder(); - } } @java.lang.Override @@ -470,10 +400,11 @@ public Builder clear() { super.clear(); if (tracesBuilder_ == null) { traces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + traces_ = null; tracesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -595,7 +526,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.ListTracesResponse ot nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,18 +541,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.ListTracesResponse 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.devtools.cloudtrace.v1.Trace m = + input.readMessage( + com.google.devtools.cloudtrace.v1.Trace.parser(), extensionRegistry); + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(m); + } else { + tracesBuilder_.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.devtools.cloudtrace.v1.ListTracesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1123,7 +1086,18 @@ public ListTracesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTracesResponse(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/PatchTracesRequest.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/PatchTracesRequest.java index 246d81a11320..3d0f7ce40bfe 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/PatchTracesRequest.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/PatchTracesRequest.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchTracesRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - com.google.devtools.cloudtrace.v1.Traces.Builder subBuilder = null; - if (traces_ != null) { - subBuilder = traces_.toBuilder(); - } - traces_ = - input.readMessage( - com.google.devtools.cloudtrace.v1.Traces.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(traces_); - traces_ = 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.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_PatchTracesRequest_descriptor; @@ -252,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (traces_ != null) { output.writeMessage(2, getTraces()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -267,7 +205,7 @@ public int getSerializedSize() { if (traces_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTraces()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -288,7 +226,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTraces()) { if (!getTraces().equals(other.getTraces())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -305,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + TRACES_FIELD_NUMBER; hash = (53 * hash) + getTraces().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.PatchTracesRequest.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 @@ -548,7 +479,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.PatchTracesRequest ot if (other.hasTraces()) { mergeTraces(other.getTraces()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,18 +494,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.PatchTracesRequest 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: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getTracesFieldBuilder().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.devtools.cloudtrace.v1.PatchTracesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -919,7 +875,18 @@ public PatchTracesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchTracesRequest(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Trace.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Trace.java index f54a81fbca18..77d94411d711 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Trace.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Trace.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Trace( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - traceId_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - spans_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - spans_.add( - input.readMessage( - com.google.devtools.cloudtrace.v1.TraceSpan.parser(), extensionRegistry)); - 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)) { - spans_ = java.util.Collections.unmodifiableList(spans_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_Trace_descriptor; @@ -333,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < spans_.size(); i++) { output.writeMessage(3, spans_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +283,7 @@ public int getSerializedSize() { for (int i = 0; i < spans_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, spans_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -369,7 +301,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getTraceId().equals(other.getTraceId())) return false; if (!getSpansList().equals(other.getSpansList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -388,7 +320,7 @@ public int hashCode() { hash = (37 * hash) + SPANS_FIELD_NUMBER; hash = (53 * hash) + getSpansList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -519,19 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.Trace.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) { - getSpansFieldBuilder(); - } } @java.lang.Override @@ -543,10 +466,11 @@ public Builder clear() { if (spansBuilder_ == null) { spans_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + spans_ = null; spansBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -670,7 +594,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.Trace other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,17 +609,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.Trace 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: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + traceId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.devtools.cloudtrace.v1.TraceSpan m = + input.readMessage( + com.google.devtools.cloudtrace.v1.TraceSpan.parser(), extensionRegistry); + if (spansBuilder_ == null) { + ensureSpansIsMutable(); + spans_.add(m); + } else { + spansBuilder_.addMessage(m); + } + 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.devtools.cloudtrace.v1.Trace) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1304,7 +1267,18 @@ public Trace parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Trace(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/TraceSpan.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/TraceSpan.java index 508e3c3da983..67d26e859a7e 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/TraceSpan.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/TraceSpan.java @@ -57,113 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TraceSpan( - 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 9: - { - spanId_ = input.readFixed64(); - break; - } - case 16: - { - int rawValue = input.readEnum(); - - kind_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 34: - { - 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 42: - { - 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; - } - case 49: - { - parentSpanId_ = input.readFixed64(); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_TraceSpan_descriptor; @@ -837,7 +730,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -875,7 +768,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -904,7 +797,7 @@ public boolean equals(final java.lang.Object obj) { } if (getParentSpanId() != other.getParentSpanId()) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -935,7 +828,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1088,17 +981,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.devtools.cloudtrace.v1.TraceSpan.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 @@ -1238,7 +1124,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.TraceSpan other) { setParentSpanId(other.getParentSpanId()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1253,17 +1139,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.TraceSpan 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 9: + { + spanId_ = input.readFixed64(); + + break; + } // case 9 + case 16: + { + kind_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 49: + { + parentSpanId_ = input.readFixed64(); + + break; + } // case 49 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 58 + 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.devtools.cloudtrace.v1.TraceSpan) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2373,7 +2320,18 @@ public TraceSpan parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TraceSpan(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-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Traces.java b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Traces.java index df6802d62840..fe4c79812987 100644 --- a/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Traces.java +++ b/java-trace/proto-google-cloud-trace-v1/src/main/java/com/google/devtools/cloudtrace/v1/Traces.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Traces( - 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)) { - traces_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - traces_.add( - input.readMessage( - com.google.devtools.cloudtrace.v1.Trace.parser(), extensionRegistry)); - 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)) { - traces_ = java.util.Collections.unmodifiableList(traces_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v1.TraceProto .internal_static_google_devtools_cloudtrace_v1_Traces_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < traces_.size(); i++) { output.writeMessage(1, traces_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < traces_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, traces_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -235,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { com.google.devtools.cloudtrace.v1.Traces other = (com.google.devtools.cloudtrace.v1.Traces) obj; if (!getTracesList().equals(other.getTracesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -250,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + TRACES_FIELD_NUMBER; hash = (53 * hash) + getTracesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -379,19 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v1.Traces.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) { - getTracesFieldBuilder(); - } } @java.lang.Override @@ -399,10 +336,11 @@ public Builder clear() { super.clear(); if (tracesBuilder_ == null) { traces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + traces_ = null; tracesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -516,7 +454,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v1.Traces other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -531,17 +469,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v1.Traces 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.devtools.cloudtrace.v1.Trace m = + input.readMessage( + com.google.devtools.cloudtrace.v1.Trace.parser(), extensionRegistry); + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(m); + } else { + tracesBuilder_.addMessage(m); + } + 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.devtools.cloudtrace.v1.Traces) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -927,7 +892,18 @@ public Traces parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Traces(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/AttributeValue.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/AttributeValue.java index 11f55904e127..fa9069097ba2 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/AttributeValue.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/AttributeValue.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttributeValue( - 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.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (valueCase_ == 1) { - subBuilder = - ((com.google.devtools.cloudtrace.v2.TruncatableString) value_).toBuilder(); - } - value_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.devtools.cloudtrace.v2.TruncatableString) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 1; - break; - } - case 16: - { - value_ = input.readInt64(); - valueCase_ = 2; - break; - } - case 24: - { - value_ = input.readBool(); - valueCase_ = 3; - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_AttributeValue_descriptor; @@ -328,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (valueCase_ == 3) { output.writeBool(3, (boolean) ((java.lang.Boolean) value_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 3, (boolean) ((java.lang.Boolean) value_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -382,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +340,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -538,22 +469,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.AttributeValue.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 public Builder clear() { super.clear(); + if (stringValueBuilder_ != null) { + stringValueBuilder_.clear(); + } valueCase_ = 0; value_ = null; return this; @@ -668,7 +595,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.AttributeValue other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,17 +610,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.AttributeValue 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: + { + input.readMessage(getStringValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 1; + break; + } // case 10 + case 16: + { + value_ = input.readInt64(); + valueCase_ = 2; + break; + } // case 16 + case 24: + { + value_ = input.readBool(); + valueCase_ = 3; + 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.devtools.cloudtrace.v2.AttributeValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1091,7 +1050,18 @@ public AttributeValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttributeValue(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/BatchWriteSpansRequest.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/BatchWriteSpansRequest.java index ae6574173959..8e0f9901cb3a 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/BatchWriteSpansRequest.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/BatchWriteSpansRequest.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchWriteSpansRequest( - 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: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - spans_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - spans_.add( - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.parser(), extensionRegistry)); - 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)) { - spans_ = java.util.Collections.unmodifiableList(spans_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v2.TracingProto .internal_static_google_devtools_cloudtrace_v2_BatchWriteSpansRequest_descriptor; @@ -288,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < spans_.size(); i++) { output.writeMessage(2, spans_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +242,7 @@ public int getSerializedSize() { for (int i = 0; i < spans_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spans_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -321,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getSpansList().equals(other.getSpansList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -338,7 +277,7 @@ public int hashCode() { hash = (37 * hash) + SPANS_FIELD_NUMBER; hash = (53 * hash) + getSpansList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -468,19 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.BatchWriteSpansRequest.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) { - getSpansFieldBuilder(); - } } @java.lang.Override @@ -490,10 +420,11 @@ public Builder clear() { if (spansBuilder_ == null) { spans_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + spans_ = null; spansBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -613,7 +544,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.BatchWriteSpansReques } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -628,18 +559,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.BatchWriteSpansRequest 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: + { + com.google.devtools.cloudtrace.v2.Span m = + input.readMessage( + com.google.devtools.cloudtrace.v2.Span.parser(), extensionRegistry); + if (spansBuilder_ == null) { + ensureSpansIsMutable(); + spans_.add(m); + } else { + spansBuilder_.addMessage(m); + } + 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.devtools.cloudtrace.v2.BatchWriteSpansRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1200,7 +1163,18 @@ public BatchWriteSpansRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchWriteSpansRequest(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Module.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Module.java index 9fbde2c082c6..b262ce1684b7 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Module.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Module.java @@ -50,79 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Module( - 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.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (module_ != null) { - subBuilder = module_.toBuilder(); - } - module_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(module_); - module_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (buildId_ != null) { - subBuilder = buildId_.toBuilder(); - } - buildId_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(buildId_); - buildId_ = 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Module_descriptor; @@ -260,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (buildId_ != null) { output.writeMessage(2, getBuildId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -275,7 +202,7 @@ public int getSerializedSize() { if (buildId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBuildId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -298,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBuildId()) { if (!getBuildId().equals(other.getBuildId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + BUILD_ID_FIELD_NUMBER; hash = (53 * hash) + getBuildId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Module.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 @@ -566,7 +486,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Module other) { if (other.hasBuildId()) { mergeBuildId(other.getBuildId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -581,17 +501,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Module 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: + { + input.readMessage(getModuleFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getBuildIdFieldBuilder().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.devtools.cloudtrace.v2.Module) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1017,7 +963,18 @@ public Module parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Module(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java index 033e3e2f1560..aca09f330a69 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java @@ -60,230 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Span( - 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; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - spanId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - parentSpanId_ = s; - break; - } - case 34: - { - com.google.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (displayName_ != null) { - subBuilder = displayName_.toBuilder(); - } - displayName_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(displayName_); - displayName_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - 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 50: - { - 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; - } - case 58: - { - com.google.devtools.cloudtrace.v2.Span.Attributes.Builder subBuilder = null; - if (attributes_ != null) { - subBuilder = attributes_.toBuilder(); - } - attributes_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.Attributes.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributes_); - attributes_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.devtools.cloudtrace.v2.StackTrace.Builder subBuilder = null; - if (stackTrace_ != null) { - subBuilder = stackTrace_.toBuilder(); - } - stackTrace_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.StackTrace.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stackTrace_); - stackTrace_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.devtools.cloudtrace.v2.Span.TimeEvents.Builder subBuilder = null; - if (timeEvents_ != null) { - subBuilder = timeEvents_.toBuilder(); - } - timeEvents_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.TimeEvents.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeEvents_); - timeEvents_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.devtools.cloudtrace.v2.Span.Links.Builder subBuilder = null; - if (links_ != null) { - subBuilder = links_.toBuilder(); - } - links_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.Links.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(links_); - links_ = subBuilder.buildPartial(); - } - - break; - } - case 90: - { - com.google.rpc.Status.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (sameProcessAsParentSpan_ != null) { - subBuilder = sameProcessAsParentSpan_.toBuilder(); - } - sameProcessAsParentSpan_ = - input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sameProcessAsParentSpan_); - sameProcessAsParentSpan_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (childSpanCount_ != null) { - subBuilder = childSpanCount_.toBuilder(); - } - childSpanCount_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(childSpanCount_); - childSpanCount_ = subBuilder.buildPartial(); - } - - break; - } - case 112: - { - int rawValue = input.readEnum(); - - spanKind_ = 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_descriptor; @@ -684,70 +460,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Attributes( - 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)) { - attributeMap_ = - com.google.protobuf.MapField.newMapField( - AttributeMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.devtools.cloudtrace.v2.AttributeValue> - attributeMap__ = - input.readMessage( - AttributeMapDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributeMap_ - .getMutableMap() - .put(attributeMap__.getKey(), attributeMap__.getValue()); - break; - } - case 16: - { - droppedAttributesCount_ = input.readInt32(); - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_Attributes_descriptor; @@ -950,7 +662,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (droppedAttributesCount_ != 0) { output.writeInt32(2, droppedAttributesCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -974,7 +686,7 @@ public int getSerializedSize() { if (droppedAttributesCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, droppedAttributesCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -992,7 +704,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetAttributeMap().equals(other.internalGetAttributeMap())) return false; if (getDroppedAttributesCount() != other.getDroppedAttributesCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1009,7 +721,7 @@ public int hashCode() { } hash = (37 * hash) + DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER; hash = (53 * hash) + getDroppedAttributesCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1160,17 +872,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.devtools.cloudtrace.v2.Span.Attributes.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 @@ -1266,7 +971,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span.Attributes other if (other.getDroppedAttributesCount() != 0) { setDroppedAttributesCount(other.getDroppedAttributesCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1281,18 +986,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.Attributes 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.protobuf.MapEntry< + java.lang.String, com.google.devtools.cloudtrace.v2.AttributeValue> + attributeMap__ = + input.readMessage( + AttributeMapDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributeMap() + .getMutableMap() + .put(attributeMap__.getKey(), attributeMap__.getValue()); + break; + } // case 10 + case 16: + { + droppedAttributesCount_ = input.readInt32(); + + break; + } // case 16 + 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.devtools.cloudtrace.v2.Span.Attributes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1605,7 +1342,19 @@ public Attributes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Attributes(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(); } }; @@ -1769,102 +1518,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeEvent( - 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 (time_ != null) { - subBuilder = time_.toBuilder(); - } - time_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(time_); - time_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.Builder subBuilder = - null; - if (valueCase_ == 2) { - subBuilder = - ((com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation) value_) - .toBuilder(); - } - value_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 2; - break; - } - case 26: - { - com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Builder subBuilder = - null; - if (valueCase_ == 3) { - subBuilder = - ((com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent) value_) - .toBuilder(); - } - value_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 3; - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_TimeEvent_descriptor; @@ -1993,80 +1646,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Annotation( - 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.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (description_ != null) { - subBuilder = description_.toBuilder(); - } - description_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(description_); - description_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.devtools.cloudtrace.v2.Span.Attributes.Builder subBuilder = null; - if (attributes_ != null) { - subBuilder = attributes_.toBuilder(); - } - attributes_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.Attributes.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributes_); - attributes_ = 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_TimeEvent_Annotation_descriptor; @@ -2205,7 +1784,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attributes_ != null) { output.writeMessage(2, getAttributes()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2220,7 +1799,7 @@ public int getSerializedSize() { if (attributes_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAttributes()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2244,7 +1823,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttributes()) { if (!getAttributes().equals(other.getAttributes())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2263,7 +1842,7 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2395,17 +1974,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.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 @@ -2521,7 +2093,7 @@ public Builder mergeFrom( if (other.hasAttributes()) { mergeAttributes(other.getAttributes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2536,19 +2108,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation 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: + { + input.readMessage(getDescriptionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getAttributesFieldBuilder().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.devtools.cloudtrace.v2.Span.TimeEvent.Annotation) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2978,7 +2574,19 @@ public Annotation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Annotation(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(); } }; @@ -3106,68 +2714,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MessageEvent( - 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 8: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: - { - id_ = input.readInt64(); - break; - } - case 24: - { - uncompressedSizeBytes_ = input.readInt64(); - break; - } - case 32: - { - compressedSizeBytes_ = input.readInt64(); - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_TimeEvent_MessageEvent_descriptor; @@ -3468,7 +3014,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (compressedSizeBytes_ != 0L) { output.writeInt64(4, compressedSizeBytes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3491,7 +3037,7 @@ public int getSerializedSize() { if (compressedSizeBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, compressedSizeBytes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3511,7 +3057,7 @@ public boolean equals(final java.lang.Object obj) { if (getId() != other.getId()) return false; if (getUncompressedSizeBytes() != other.getUncompressedSizeBytes()) return false; if (getCompressedSizeBytes() != other.getCompressedSizeBytes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3530,7 +3076,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUncompressedSizeBytes()); hash = (37 * hash) + COMPRESSED_SIZE_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCompressedSizeBytes()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3665,17 +3211,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.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 @@ -3787,7 +3326,7 @@ public Builder mergeFrom( if (other.getCompressedSizeBytes() != 0L) { setCompressedSizeBytes(other.getCompressedSizeBytes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3802,19 +3341,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent 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 8: + { + type_ = input.readEnum(); + + break; + } // case 8 + case 16: + { + id_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + uncompressedSizeBytes_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + compressedSizeBytes_ = input.readInt64(); + + break; + } // case 32 + 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.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4117,7 +3692,19 @@ public MessageEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MessageEvent(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(); } }; @@ -4359,7 +3946,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 3, (com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent) value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4381,7 +3968,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent) value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4412,7 +3999,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4439,7 +4026,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4570,17 +4157,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.TimeEvent.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 @@ -4592,6 +4172,12 @@ public Builder clear() { time_ = null; timeBuilder_ = null; } + if (annotationBuilder_ != null) { + annotationBuilder_.clear(); + } + if (messageEventBuilder_ != null) { + messageEventBuilder_.clear(); + } valueCase_ = 0; value_ = null; return this; @@ -4712,7 +4298,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span.TimeEvent other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4727,18 +4313,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.TimeEvent 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: + { + input.readMessage(getTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getMessageEventFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 3; + 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.devtools.cloudtrace.v2.Span.TimeEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5401,7 +5018,19 @@ public TimeEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeEvent(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(); } }; @@ -5541,72 +5170,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeEvents( - 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)) { - timeEvent_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - timeEvent_.add( - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.TimeEvent.parser(), - extensionRegistry)); - break; - } - case 16: - { - droppedAnnotationsCount_ = input.readInt32(); - break; - } - case 24: - { - droppedMessageEventsCount_ = input.readInt32(); - 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)) { - timeEvent_ = java.util.Collections.unmodifiableList(timeEvent_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_TimeEvents_descriptor; @@ -5753,7 +5316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (droppedMessageEventsCount_ != 0) { output.writeInt32(3, droppedMessageEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5772,7 +5335,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, droppedMessageEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5791,7 +5354,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTimeEventList().equals(other.getTimeEventList())) return false; if (getDroppedAnnotationsCount() != other.getDroppedAnnotationsCount()) return false; if (getDroppedMessageEventsCount() != other.getDroppedMessageEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5810,7 +5373,7 @@ public int hashCode() { hash = (53 * hash) + getDroppedAnnotationsCount(); hash = (37 * hash) + DROPPED_MESSAGE_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + getDroppedMessageEventsCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5943,19 +5506,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.TimeEvents.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) { - getTimeEventFieldBuilder(); - } } @java.lang.Override @@ -5963,10 +5517,11 @@ public Builder clear() { super.clear(); if (timeEventBuilder_ == null) { timeEvent_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + timeEvent_ = null; timeEventBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); droppedAnnotationsCount_ = 0; droppedMessageEventsCount_ = 0; @@ -6095,7 +5650,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span.TimeEvents other if (other.getDroppedMessageEventsCount() != 0) { setDroppedMessageEventsCount(other.getDroppedMessageEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6110,18 +5665,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.TimeEvents 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.devtools.cloudtrace.v2.Span.TimeEvent m = + input.readMessage( + com.google.devtools.cloudtrace.v2.Span.TimeEvent.parser(), + extensionRegistry); + if (timeEventBuilder_ == null) { + ensureTimeEventIsMutable(); + timeEvent_.add(m); + } else { + timeEventBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + droppedAnnotationsCount_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + droppedMessageEventsCount_ = input.readInt32(); + + 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.devtools.cloudtrace.v2.Span.TimeEvents) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6627,7 +6221,19 @@ public TimeEvents parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeEvents(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(); } }; @@ -6803,83 +6409,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Link( - 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(); - - traceId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - spanId_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: - { - com.google.devtools.cloudtrace.v2.Span.Attributes.Builder subBuilder = null; - if (attributes_ != null) { - subBuilder = attributes_.toBuilder(); - } - attributes_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.Attributes.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributes_); - attributes_ = 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_Link_descriptor; @@ -7266,7 +6795,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attributes_ != null) { output.writeMessage(4, getAttributes()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7287,7 +6816,7 @@ public int getSerializedSize() { if (attributes_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7310,7 +6839,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttributes()) { if (!getAttributes().equals(other.getAttributes())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7331,7 +6860,7 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7465,17 +6994,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.Link.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 @@ -7593,7 +7115,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span.Link other) { if (other.hasAttributes()) { mergeAttributes(other.getAttributes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7608,17 +7130,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.Link 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: + { + traceId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + spanId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + 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.devtools.cloudtrace.v2.Span.Link) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8155,7 +7715,19 @@ public Link parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Link(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(); } }; @@ -8280,65 +7852,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Links( - 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)) { - link_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - link_.add( - input.readMessage( - com.google.devtools.cloudtrace.v2.Span.Link.parser(), extensionRegistry)); - break; - } - case 16: - { - droppedLinksCount_ = input.readInt32(); - 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)) { - link_ = java.util.Collections.unmodifiableList(link_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_Span_Links_descriptor; @@ -8462,7 +7975,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (droppedLinksCount_ != 0) { output.writeInt32(2, droppedLinksCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8477,7 +7990,7 @@ public int getSerializedSize() { if (droppedLinksCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, droppedLinksCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8495,7 +8008,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLinkList().equals(other.getLinkList())) return false; if (getDroppedLinksCount() != other.getDroppedLinksCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8512,7 +8025,7 @@ public int hashCode() { } hash = (37 * hash) + DROPPED_LINKS_COUNT_FIELD_NUMBER; hash = (53 * hash) + getDroppedLinksCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8644,19 +8157,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.Links.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) { - getLinkFieldBuilder(); - } } @java.lang.Override @@ -8664,10 +8168,11 @@ public Builder clear() { super.clear(); if (linkBuilder_ == null) { link_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + link_ = null; linkBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); droppedLinksCount_ = 0; return this; @@ -8789,7 +8294,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span.Links other) { if (other.getDroppedLinksCount() != 0) { setDroppedLinksCount(other.getDroppedLinksCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8804,17 +8309,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span.Links 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.devtools.cloudtrace.v2.Span.Link m = + input.readMessage( + com.google.devtools.cloudtrace.v2.Span.Link.parser(), extensionRegistry); + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.add(m); + } else { + linkBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + droppedLinksCount_ = input.readInt32(); + + break; + } // case 16 + 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.devtools.cloudtrace.v2.Span.Links) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9257,7 +8795,19 @@ public Links parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Links(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(); } }; @@ -10079,7 +9629,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.devtools.cloudtrace.v2.Span.SpanKind.SPAN_KIND_UNSPECIFIED.getNumber()) { output.writeEnum(14, spanKind_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10133,7 +9683,7 @@ public int getSerializedSize() { != com.google.devtools.cloudtrace.v2.Span.SpanKind.SPAN_KIND_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, spanKind_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10192,7 +9742,7 @@ public boolean equals(final java.lang.Object obj) { if (!getChildSpanCount().equals(other.getChildSpanCount())) return false; } if (spanKind_ != other.spanKind_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10251,7 +9801,7 @@ public int hashCode() { } hash = (37 * hash) + SPAN_KIND_FIELD_NUMBER; hash = (53 * hash) + spanKind_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10385,17 +9935,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.Span.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 @@ -10644,7 +10187,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.Span other) { if (other.spanKind_ != 0) { setSpanKindValue(other.getSpanKindValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10659,17 +10202,116 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.Span 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: + { + spanId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + parentSpanId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getDisplayNameFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getStackTraceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getTimeEventsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + input.readMessage(getLinksFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 82 + case 90: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 98: + { + input.readMessage( + getSameProcessAsParentSpanFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 106: + { + input.readMessage(getChildSpanCountFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + case 112: + { + spanKind_ = input.readEnum(); + + break; + } // case 112 + 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.devtools.cloudtrace.v2.Span) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -13211,7 +12853,18 @@ public Span parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Span(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/StackTrace.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/StackTrace.java index 258670d3983c..107be24b549e 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/StackTrace.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/StackTrace.java @@ -50,67 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StackTrace( - 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.devtools.cloudtrace.v2.StackTrace.StackFrames.Builder subBuilder = null; - if (stackFrames_ != null) { - subBuilder = stackFrames_.toBuilder(); - } - stackFrames_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.StackTrace.StackFrames.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stackFrames_); - stackFrames_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - stackTraceHashId_ = input.readInt64(); - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_StackTrace_descriptor; @@ -377,139 +316,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StackFrame( - 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.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (functionName_ != null) { - subBuilder = functionName_.toBuilder(); - } - functionName_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(functionName_); - functionName_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (originalFunctionName_ != null) { - subBuilder = originalFunctionName_.toBuilder(); - } - originalFunctionName_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalFunctionName_); - originalFunctionName_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (fileName_ != null) { - subBuilder = fileName_.toBuilder(); - } - fileName_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fileName_); - fileName_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - lineNumber_ = input.readInt64(); - break; - } - case 40: - { - columnNumber_ = input.readInt64(); - break; - } - case 50: - { - com.google.devtools.cloudtrace.v2.Module.Builder subBuilder = null; - if (loadModule_ != null) { - subBuilder = loadModule_.toBuilder(); - } - loadModule_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.Module.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loadModule_); - loadModule_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.devtools.cloudtrace.v2.TruncatableString.Builder subBuilder = null; - if (sourceVersion_ != null) { - subBuilder = sourceVersion_.toBuilder(); - } - sourceVersion_ = - input.readMessage( - com.google.devtools.cloudtrace.v2.TruncatableString.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceVersion_); - sourceVersion_ = 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_StackTrace_StackFrame_descriptor; @@ -851,7 +657,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceVersion_ != null) { output.writeMessage(7, getSourceVersion()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -882,7 +688,7 @@ public int getSerializedSize() { if (sourceVersion_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSourceVersion()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -920,7 +726,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceVersion()) { if (!getSourceVersion().equals(other.getSourceVersion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -955,7 +761,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_VERSION_FIELD_NUMBER; hash = (53 * hash) + getSourceVersion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1087,17 +893,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.StackTrace.StackFrame.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 @@ -1264,7 +1063,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.StackTrace.StackFrame if (other.hasSourceVersion()) { mergeSourceVersion(other.getSourceVersion()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1279,18 +1078,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.StackTrace.StackFrame 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: + { + input.readMessage(getFunctionNameFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getOriginalFunctionNameFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFileNameFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + lineNumber_ = input.readInt64(); + + break; + } // case 32 + case 40: + { + columnNumber_ = input.readInt64(); + + break; + } // case 40 + case 50: + { + input.readMessage(getLoadModuleFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getSourceVersionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + 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.devtools.cloudtrace.v2.StackTrace.StackFrame) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2407,7 +2262,19 @@ public StackFrame parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StackFrame(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(); } }; @@ -2532,68 +2399,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StackFrames( - 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)) { - frame_ = - new java.util.ArrayList< - com.google.devtools.cloudtrace.v2.StackTrace.StackFrame>(); - mutable_bitField0_ |= 0x00000001; - } - frame_.add( - input.readMessage( - com.google.devtools.cloudtrace.v2.StackTrace.StackFrame.parser(), - extensionRegistry)); - break; - } - case 16: - { - droppedFramesCount_ = input.readInt32(); - 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)) { - frame_ = java.util.Collections.unmodifiableList(frame_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_StackTrace_StackFrames_descriptor; @@ -2720,7 +2525,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (droppedFramesCount_ != 0) { output.writeInt32(2, droppedFramesCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2735,7 +2540,7 @@ public int getSerializedSize() { if (droppedFramesCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, droppedFramesCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2753,7 +2558,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFrameList().equals(other.getFrameList())) return false; if (getDroppedFramesCount() != other.getDroppedFramesCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2770,7 +2575,7 @@ public int hashCode() { } hash = (37 * hash) + DROPPED_FRAMES_COUNT_FIELD_NUMBER; hash = (53 * hash) + getDroppedFramesCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2902,19 +2707,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.StackTrace.StackFrames.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) { - getFrameFieldBuilder(); - } } @java.lang.Override @@ -2922,10 +2718,11 @@ public Builder clear() { super.clear(); if (frameBuilder_ == null) { frame_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + frame_ = null; frameBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); droppedFramesCount_ = 0; return this; @@ -3048,7 +2845,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.StackTrace.StackFrame if (other.getDroppedFramesCount() != 0) { setDroppedFramesCount(other.getDroppedFramesCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3063,18 +2860,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.StackTrace.StackFrames 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.devtools.cloudtrace.v2.StackTrace.StackFrame m = + input.readMessage( + com.google.devtools.cloudtrace.v2.StackTrace.StackFrame.parser(), + extensionRegistry); + if (frameBuilder_ == null) { + ensureFrameIsMutable(); + frame_.add(m); + } else { + frameBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + droppedFramesCount_ = input.readInt32(); + + break; + } // case 16 + 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.devtools.cloudtrace.v2.StackTrace.StackFrames) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3536,7 +3366,19 @@ public StackFrames parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StackFrames(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(); } }; @@ -3648,7 +3490,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (stackTraceHashId_ != 0L) { output.writeInt64(2, stackTraceHashId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3663,7 +3505,7 @@ public int getSerializedSize() { if (stackTraceHashId_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, stackTraceHashId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3684,7 +3526,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStackFrames().equals(other.getStackFrames())) return false; } if (getStackTraceHashId() != other.getStackTraceHashId()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3701,7 +3543,7 @@ public int hashCode() { } hash = (37 * hash) + STACK_TRACE_HASH_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStackTraceHashId()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3830,17 +3672,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.StackTrace.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 @@ -3942,7 +3777,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.StackTrace other) { if (other.getStackTraceHashId() != 0L) { setStackTraceHashId(other.getStackTraceHashId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3957,17 +3792,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.StackTrace 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: + { + input.readMessage(getStackFramesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + stackTraceHashId_ = input.readInt64(); + + break; + } // case 16 + 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.devtools.cloudtrace.v2.StackTrace) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4262,7 +4123,18 @@ public StackTrace parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StackTrace(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-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/TruncatableString.java b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/TruncatableString.java index 7473bc57c30b..d3f96a3fc9cb 100644 --- a/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/TruncatableString.java +++ b/java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/TruncatableString.java @@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TruncatableString( - 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(); - - value_ = s; - break; - } - case 16: - { - truncatedByteCount_ = input.readInt32(); - 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.devtools.cloudtrace.v2.TraceProto .internal_static_google_devtools_cloudtrace_v2_TruncatableString_descriptor; @@ -216,7 +165,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (truncatedByteCount_ != 0) { output.writeInt32(2, truncatedByteCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +180,7 @@ public int getSerializedSize() { if (truncatedByteCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, truncatedByteCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -249,7 +198,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue().equals(other.getValue())) return false; if (getTruncatedByteCount() != other.getTruncatedByteCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +213,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + TRUNCATED_BYTE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getTruncatedByteCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -393,17 +342,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.devtools.cloudtrace.v2.TruncatableString.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 @@ -499,7 +441,7 @@ public Builder mergeFrom(com.google.devtools.cloudtrace.v2.TruncatableString oth if (other.getTruncatedByteCount() != 0) { setTruncatedByteCount(other.getTruncatedByteCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,18 +456,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.devtools.cloudtrace.v2.TruncatableString 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: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + truncatedByteCount_ = input.readInt32(); + + break; + } // case 16 + 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.devtools.cloudtrace.v2.TruncatableString) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -747,7 +714,18 @@ public TruncatableString parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TruncatableString(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(); } };