diff --git a/.vscode/settings.json b/.vscode/settings.json index c5f3f6b..11231db 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,7 @@ -{ - "java.configuration.updateBuildConfiguration": "interactive" +{ + "java.configuration.updateBuildConfiguration": "interactive", + "java.project.sourcePaths": [ + "src" + ], + "java.compile.nullAnalysis.mode": "automatic" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 7fd9462..569d501 100644 --- a/build.gradle +++ b/build.gradle @@ -1,92 +1,94 @@ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13' - } -} - -plugins { - id 'java' - id 'com.google.protobuf' version '0.9.1' - id 'com.github.johnrengelman.shadow' version '6.0.0' -} - -group 'org.bdware' -version 'dev-221113' - -compileJava { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -def grpc_java_version = '1.41.0' -def junit_version = '5.7.0' - -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" -} - -sourceSets { - main { - proto { - // In addition to the default 'src/main/proto' - srcDir 'api/grpc/pb' - } - } -} - -test { - useJUnitPlatform() -// testLogging { -// events "passed", "skipped", "failed" -// } -} - -javadoc { - source = sourceSets.main.allJava - classpath = configurations.runtimeClasspath - options { - encoding 'UTF-8' - charSet 'UTF-8' - title "BDLedger Java SDK API" - } -} - -protobuf { - protoc { - artifact = "com.google.protobuf:protoc:3.13.0" - } - plugins { - grpc { - artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version - } - } - generatedFilesBaseDir = "$projectDir/src" - generateProtoTasks { - all()*.plugins { - grpc { - outputSubDir = 'java' - } - } - } -} - -repositories { - mavenCentral() -} - -dependencies { - implementation 'io.grpc:grpc-netty-shaded:' + grpc_java_version - implementation 'io.grpc:grpc-protobuf:' + grpc_java_version - implementation 'io.grpc:grpc-stub:' + grpc_java_version - if (JavaVersion.current().isJava9Compatible()) { - // Workaround for @javax.annotation.Generated - // see: https://github.com/grpc/grpc-java/issues/3633 - implementation 'javax.annotation:javax.annotation-api:1.3.2' - } - testImplementation 'org.junit.jupiter:junit-jupiter-api:' + junit_version - testImplementation 'org.junit.jupiter:junit-jupiter-params:' + junit_version - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:' + junit_version -} +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4' + } +} + +plugins { + id 'java' + id 'com.google.protobuf' version '0.9.4' + id 'com.github.johnrengelman.shadow' version '7.1.2' +} + +group = 'org.bdware' +version = 'dev-221113' + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +def protobuf_version = '3.25.6' +def grpc_java_version = '1.71.0' +def junit_version = '5.12.1' + +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +sourceSets { + main { + proto { + // In addition to the default 'src/main/proto' + srcDir 'api/grpc/pb' + } + } +} + +test { + useJUnitPlatform() +// testLogging { +// events "passed", "skipped", "failed" +// } +} + +javadoc { + source = sourceSets.main.allJava + classpath = configurations.compileClasspath + options { + encoding = 'UTF-8' + charSet = 'UTF-8' + title = "BDLedger Java SDK API" + } +} + +protobuf { + protoc { + artifact = "com.google.protobuf:protoc:" + protobuf_version + } + plugins { + grpc { + artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version + } + } + generatedFilesBaseDir = "$projectDir/src" + generateProtoTasks { + all().each { task -> + task.plugins { + grpc { + outputSubDir = 'java' + } + } + } + } +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'com.google.protobuf:protobuf-java:' + protobuf_version + runtimeOnly 'io.grpc:grpc-netty-shaded:' + grpc_java_version + implementation 'io.grpc:grpc-protobuf:' + grpc_java_version + implementation 'io.grpc:grpc-stub:' + grpc_java_version + if (JavaVersion.current().isJava9Compatible()) { + compileOnly 'org.apache.tomcat:annotations-api:6.0.53' + } + testImplementation 'org.junit.jupiter:junit-jupiter-api:' + junit_version + testImplementation 'org.junit.jupiter:junit-jupiter-params:' + junit_version + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:' + junit_version +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661..4986e82 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/src/main/java/com/google/api/AnnotationsProto.java b/src/main/java/com/google/api/AnnotationsProto.java index 5b0494a..cb49210 100644 --- a/src/main/java/com/google/api/AnnotationsProto.java +++ b/src/main/java/com/google/api/AnnotationsProto.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/api/annotations.proto +// Protobuf Java Version: 3.25.6 package com.google.api; public final class AnnotationsProto { diff --git a/src/main/java/com/google/api/CustomHttpPattern.java b/src/main/java/com/google/api/CustomHttpPattern.java index a2f9edb..4ec0337 100644 --- a/src/main/java/com/google/api/CustomHttpPattern.java +++ b/src/main/java/com/google/api/CustomHttpPattern.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/api/http.proto +// Protobuf Java Version: 3.25.6 package com.google.api; /** @@ -31,60 +32,6 @@ private static final long serialVersionUID = 0L; return new CustomHttpPattern(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CustomHttpPattern( - 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(); - - kind_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; @@ -99,7 +46,8 @@ private static final long serialVersionUID = 0L; } public static final int KIND_FIELD_NUMBER = 1; - private volatile java.lang.Object kind_; + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; /** *
* The name of this custom HTTP verb.
@@ -145,7 +93,8 @@ private static final long serialVersionUID = 0L;
}
public static final int PATH_FIELD_NUMBER = 2;
- private volatile java.lang.Object path_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object path_ = "";
/**
*
* The path matched by this custom verb.
@@ -204,13 +153,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getKindBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);
}
- if (!getPathBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -219,13 +168,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getKindBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_);
}
- if (!getPathBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -244,7 +193,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getKind())) return false;
if (!getPath()
.equals(other.getPath())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -259,7 +208,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getKind().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -308,11 +257,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.api.CustomHttpPattern parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -380,26 +331,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.api.CustomHttpPattern.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
kind_ = "";
-
path_ = "";
-
return this;
}
@@ -426,12 +371,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.api.CustomHttpPattern buildPartial() {
com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this);
- result.kind_ = kind_;
- result.path_ = path_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.api.CustomHttpPattern result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.kind_ = kind_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.path_ = path_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -478,13 +432,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this;
if (!other.getKind().isEmpty()) {
kind_ = other.kind_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -499,19 +455,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.api.CustomHttpPattern 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: {
+ kind_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ path_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.api.CustomHttpPattern) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object kind_ = "";
/**
@@ -566,11 +546,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setKind(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
kind_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -583,8 +561,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearKind() {
-
kind_ = getDefaultInstance().getKind();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -599,12 +577,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setKindBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
kind_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -662,11 +638,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPath(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
path_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -679,8 +653,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearPath() {
-
path_ = getDefaultInstance().getPath();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -695,12 +669,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
path_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -737,7 +709,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CustomHttpPattern(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/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java
index 542756d..ec5c364 100644
--- a/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java
+++ b/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public interface CustomHttpPatternOrBuilder extends
diff --git a/src/main/java/com/google/api/Http.java b/src/main/java/com/google/api/Http.java
index e8fdbac..b6ba42f 100644
--- a/src/main/java/com/google/api/Http.java
+++ b/src/main/java/com/google/api/Http.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
/**
@@ -32,66 +33,6 @@ private static final long serialVersionUID = 0L;
return new Http();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Http(
- 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)) {
- rules_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- rules_.add(
- input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry));
- break;
- }
- case 16: {
-
- fullyDecodeReservedExpansion_ = input.readBool();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- rules_ = java.util.Collections.unmodifiableList(rules_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.HttpProto.internal_static_google_api_Http_descriptor;
@@ -106,10 +47,12 @@ private static final long serialVersionUID = 0L;
}
public static final int RULES_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List rules_;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -122,6 +65,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -135,6 +79,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -147,6 +92,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -159,6 +105,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -171,12 +118,13 @@ private static final long serialVersionUID = 0L;
}
public static final int FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER = 2;
- private boolean fullyDecodeReservedExpansion_;
+ private boolean fullyDecodeReservedExpansion_ = false;
/**
*
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
+ *
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
@@ -209,7 +157,7 @@ private static final long serialVersionUID = 0L;
if (fullyDecodeReservedExpansion_ != false) {
output.writeBool(2, fullyDecodeReservedExpansion_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -226,7 +174,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, fullyDecodeReservedExpansion_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -245,7 +193,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getRulesList())) return false;
if (getFullyDecodeReservedExpansion()
!= other.getFullyDecodeReservedExpansion()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -263,7 +211,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFullyDecodeReservedExpansion());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -312,11 +260,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.api.Http parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -386,31 +336,26 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.api.Http.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getRulesFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ rules_ = null;
rulesBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
fullyDecodeReservedExpansion_ = false;
-
return this;
}
@@ -437,7 +382,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.api.Http buildPartial() {
com.google.api.Http result = new com.google.api.Http(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.api.Http result) {
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
@@ -447,9 +398,13 @@ private static final long serialVersionUID = 0L;
} else {
result.rules_ = rulesBuilder_.build();
}
- result.fullyDecodeReservedExpansion_ = fullyDecodeReservedExpansion_;
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.api.Http result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.fullyDecodeReservedExpansion_ = fullyDecodeReservedExpansion_;
+ }
}
@java.lang.Override
@@ -525,7 +480,7 @@ private static final long serialVersionUID = 0L;
if (other.getFullyDecodeReservedExpansion() != false) {
setFullyDecodeReservedExpansion(other.getFullyDecodeReservedExpansion());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -540,17 +495,48 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.api.Http 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.api.HttpRule m =
+ input.readMessage(
+ com.google.api.HttpRule.parser(),
+ extensionRegistry);
+ if (rulesBuilder_ == null) {
+ ensureRulesIsMutable();
+ rules_.add(m);
+ } else {
+ rulesBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 16: {
+ fullyDecodeReservedExpansion_ = input.readBool();
+ bitField0_ |= 0x00000002;
+ 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.api.Http) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -570,6 +556,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -585,6 +572,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -600,6 +588,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -615,6 +604,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -637,6 +627,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -656,6 +647,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -677,6 +669,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -699,6 +692,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -718,6 +712,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -737,6 +732,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -757,6 +753,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -775,6 +772,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -793,6 +791,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -805,6 +804,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -820,6 +820,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -836,6 +837,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -848,6 +850,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -861,6 +864,7 @@ private static final long serialVersionUID = 0L;
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -891,6 +895,7 @@ private static final long serialVersionUID = 0L;
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
+ *
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
@@ -907,6 +912,7 @@ private static final long serialVersionUID = 0L;
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
+ *
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
@@ -916,8 +922,9 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder setFullyDecodeReservedExpansion(boolean value) {
-
+
fullyDecodeReservedExpansion_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -926,6 +933,7 @@ private static final long serialVersionUID = 0L;
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
+ *
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
@@ -934,7 +942,7 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearFullyDecodeReservedExpansion() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
fullyDecodeReservedExpansion_ = false;
onChanged();
return this;
@@ -972,7 +980,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Http(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/src/main/java/com/google/api/HttpBody.java b/src/main/java/com/google/api/HttpBody.java
index 2cc37b9..7b4df1c 100644
--- a/src/main/java/com/google/api/HttpBody.java
+++ b/src/main/java/com/google/api/HttpBody.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/httpbody.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
/**
@@ -8,30 +9,40 @@ package com.google.api;
* Message that represents an arbitrary HTTP body. It should only be used for
* payload formats that can't be represented as JSON, such as raw binary or
* an HTML page.
+ *
+ *
* This message can be used both in streaming and non-streaming API methods in
* the request as well as the response.
+ *
* It can be used as a top-level request field, which is convenient if one
* wants to extract parameters from either the URL or HTTP template into the
* request fields and also want access to the raw HTTP body.
+ *
* Example:
+ *
* message GetResourceRequest {
* // A unique request id.
* string request_id = 1;
+ *
* // The raw HTTP body is bound to this field.
* google.api.HttpBody http_body = 2;
* }
+ *
* service ResourceService {
* rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody) returns
* (google.protobuf.Empty);
* }
+ *
* Example with streaming methods:
+ *
* service CaldavService {
* rpc GetCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* rpc UpdateCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* }
+ *
* Use of this type only changes how the request and response bodies are
* handled, all other features will continue to work unchanged.
*
@@ -60,72 +71,6 @@ private static final long serialVersionUID = 0L;
return new HttpBody();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HttpBody(
- 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();
-
- contentType_ = s;
- break;
- }
- case 18: {
-
- data_ = input.readBytes();
- break;
- }
- case 26: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- extensions_ = new java.util.ArrayList
* The HTTP Content-Type header value specifying the content type of the body.
@@ -186,7 +132,7 @@ private static final long serialVersionUID = 0L;
}
public static final int DATA_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString data_;
+ private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The HTTP request/response body as raw binary.
@@ -201,6 +147,7 @@ private static final long serialVersionUID = 0L;
}
public static final int EXTENSIONS_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
private java.util.List extensions_;
/**
*
@@ -279,7 +226,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getContentTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contentType_);
}
if (!data_.isEmpty()) {
@@ -288,7 +235,7 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < extensions_.size(); i++) {
output.writeMessage(3, extensions_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -297,7 +244,7 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getContentTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contentType_);
}
if (!data_.isEmpty()) {
@@ -308,7 +255,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, extensions_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -329,7 +276,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getData())) return false;
if (!getExtensionsList()
.equals(other.getExtensionsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -348,7 +295,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
hash = (53 * hash) + getExtensionsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -397,11 +344,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.api.HttpBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.api.HttpBody parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -448,30 +397,40 @@ private static final long serialVersionUID = 0L;
* Message that represents an arbitrary HTTP body. It should only be used for
* payload formats that can't be represented as JSON, such as raw binary or
* an HTML page.
+ *
+ *
* This message can be used both in streaming and non-streaming API methods in
* the request as well as the response.
+ *
* It can be used as a top-level request field, which is convenient if one
* wants to extract parameters from either the URL or HTTP template into the
* request fields and also want access to the raw HTTP body.
+ *
* Example:
+ *
* message GetResourceRequest {
* // A unique request id.
* string request_id = 1;
+ *
* // The raw HTTP body is bound to this field.
* google.api.HttpBody http_body = 2;
* }
+ *
* service ResourceService {
* rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody) returns
* (google.protobuf.Empty);
* }
+ *
* Example with streaming methods:
+ *
* service CaldavService {
* rpc GetCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* rpc UpdateCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* }
+ *
* Use of this type only changes how the request and response bodies are
* handled, all other features will continue to work unchanged.
*
@@ -497,33 +456,27 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.api.HttpBody.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getExtensionsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
contentType_ = "";
-
data_ = com.google.protobuf.ByteString.EMPTY;
-
if (extensionsBuilder_ == null) {
extensions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ extensions_ = null;
extensionsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@@ -550,20 +503,32 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.api.HttpBody buildPartial() {
com.google.api.HttpBody result = new com.google.api.HttpBody(this);
- int from_bitField0_ = bitField0_;
- result.contentType_ = contentType_;
- result.data_ = data_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.api.HttpBody result) {
if (extensionsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000004) != 0)) {
extensions_ = java.util.Collections.unmodifiableList(extensions_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
}
result.extensions_ = extensions_;
} else {
result.extensions_ = extensionsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.api.HttpBody result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.contentType_ = contentType_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.data_ = data_;
+ }
}
@java.lang.Override
@@ -612,6 +577,7 @@ private static final long serialVersionUID = 0L;
if (other == com.google.api.HttpBody.getDefaultInstance()) return this;
if (!other.getContentType().isEmpty()) {
contentType_ = other.contentType_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
@@ -621,7 +587,7 @@ private static final long serialVersionUID = 0L;
if (!other.extensions_.isEmpty()) {
if (extensions_.isEmpty()) {
extensions_ = other.extensions_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureExtensionsIsMutable();
extensions_.addAll(other.extensions_);
@@ -634,7 +600,7 @@ private static final long serialVersionUID = 0L;
extensionsBuilder_.dispose();
extensionsBuilder_ = null;
extensions_ = other.extensions_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
extensionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getExtensionsFieldBuilder() : null;
@@ -643,7 +609,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -658,17 +624,53 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.api.HttpBody 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: {
+ contentType_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ data_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ com.google.protobuf.Any m =
+ input.readMessage(
+ com.google.protobuf.Any.parser(),
+ extensionRegistry);
+ if (extensionsBuilder_ == null) {
+ ensureExtensionsIsMutable();
+ extensions_.add(m);
+ } else {
+ extensionsBuilder_.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.api.HttpBody) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -726,11 +728,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setContentType(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
contentType_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -743,8 +743,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearContentType() {
-
contentType_ = getDefaultInstance().getContentType();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -759,12 +759,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
contentType_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -792,11 +790,9 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
data_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -809,7 +805,7 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearData() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
data_ = getDefaultInstance().getData();
onChanged();
return this;
@@ -818,9 +814,9 @@ private static final long serialVersionUID = 0L;
private java.util.List extensions_ =
java.util.Collections.emptyList();
private void ensureExtensionsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!((bitField0_ & 0x00000004) != 0)) {
extensions_ = new java.util.ArrayList(extensions_);
- bitField0_ |= 0x00000001;
+ bitField0_ |= 0x00000004;
}
}
@@ -1025,7 +1021,7 @@ private static final long serialVersionUID = 0L;
public Builder clearExtensions() {
if (extensionsBuilder_ == null) {
extensions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
extensionsBuilder_.clear();
@@ -1137,7 +1133,7 @@ private static final long serialVersionUID = 0L;
extensionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
extensions_,
- ((bitField0_ & 0x00000001) != 0),
+ ((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
extensions_ = null;
@@ -1177,7 +1173,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new HttpBody(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/src/main/java/com/google/api/HttpBodyOrBuilder.java b/src/main/java/com/google/api/HttpBodyOrBuilder.java
index 3585042..fe2d55b 100644
--- a/src/main/java/com/google/api/HttpBodyOrBuilder.java
+++ b/src/main/java/com/google/api/HttpBodyOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/httpbody.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public interface HttpBodyOrBuilder extends
diff --git a/src/main/java/com/google/api/HttpBodyProto.java b/src/main/java/com/google/api/HttpBodyProto.java
index 9649c1b..d8ca3e9 100644
--- a/src/main/java/com/google/api/HttpBodyProto.java
+++ b/src/main/java/com/google/api/HttpBodyProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/httpbody.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public final class HttpBodyProto {
diff --git a/src/main/java/com/google/api/HttpOrBuilder.java b/src/main/java/com/google/api/HttpOrBuilder.java
index 20c49a5..1279480 100644
--- a/src/main/java/com/google/api/HttpOrBuilder.java
+++ b/src/main/java/com/google/api/HttpOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public interface HttpOrBuilder extends
@@ -10,6 +11,7 @@ public interface HttpOrBuilder extends
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -20,6 +22,7 @@ public interface HttpOrBuilder extends
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -29,6 +32,7 @@ public interface HttpOrBuilder extends
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -38,6 +42,7 @@ public interface HttpOrBuilder extends
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -48,6 +53,7 @@ public interface HttpOrBuilder extends
/**
*
* A list of HTTP configuration rules that apply to individual API methods.
+ *
* **NOTE:** All service configuration rules follow "last one wins" order.
*
*
@@ -61,6 +67,7 @@ public interface HttpOrBuilder extends
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
+ *
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
diff --git a/src/main/java/com/google/api/HttpProto.java b/src/main/java/com/google/api/HttpProto.java
index 834db94..83f6dac 100644
--- a/src/main/java/com/google/api/HttpProto.java
+++ b/src/main/java/com/google/api/HttpProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public final class HttpProto {
diff --git a/src/main/java/com/google/api/HttpRule.java b/src/main/java/com/google/api/HttpRule.java
index ce4b8fa..60152df 100644
--- a/src/main/java/com/google/api/HttpRule.java
+++ b/src/main/java/com/google/api/HttpRule.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
/**
@@ -11,10 +12,13 @@ package com.google.api;
* HTTP request body. The mapping is typically specified as an
* `google.api.http` annotation on the RPC method,
* see "google/api/annotations.proto" for details.
+ *
* The mapping consists of a field specifying the path template and
* method kind. The path template can refer to fields in the request
* message, as in the example below which describes a REST GET
* operation on a resource collection of messages:
+ *
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
@@ -30,23 +34,31 @@ package com.google.api;
* message Message {
* string text = 1; // content of the resource
* }
+ *
* The same http annotation can alternatively be expressed inside the
* `GRPC API Configuration` YAML file.
+ *
* http:
* rules:
* - selector: <proto_package_name>.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
+ *
* This definition enables an automatic, bidrectional mapping of HTTP
* JSON to RPC. Example:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
+ *
* In general, not only fields but also field paths can be referenced
* from a path pattern. Fields mapped to the path pattern cannot be
* repeated and must have a primitive (non-message) type.
+ *
* Any fields in the request message which are not bound by the path
* pattern automatically become (optional) HTTP query
* parameters. Assume the following definition of the request message:
+ *
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get = "/v1/messages/{message_id}";
@@ -60,17 +72,24 @@ package com.google.api;
* int64 revision = 2; // becomes a parameter
* SubMessage sub = 3; // `sub.subfield` becomes a parameter
* }
+ *
+ *
* This enables a HTTP JSON to RPC mapping as below:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
+ *
* Note that fields which are mapped to HTTP parameters must have a
* primitive type or a repeated primitive type. Message types are not
* allowed. In the case of a repeated type, the parameter can be
* repeated in the URL, as in `...?param=A¶m=B`.
+ *
* For HTTP method kinds which allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
+ *
+ *
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
@@ -83,16 +102,21 @@ package com.google.api;
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
+ *
+ *
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
+ *
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ *
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
+ *
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
@@ -105,17 +129,23 @@ package com.google.api;
* string message_id = 1;
* string text = 2;
* }
+ *
+ *
* The following HTTP JSON to RPC mapping is enabled:
+ *
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+ *
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice of
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
+ *
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
@@ -130,15 +160,21 @@ package com.google.api;
* string message_id = 1;
* string user_id = 2;
* }
+ *
+ *
* This enables the following two alternative HTTP JSON to RPC
* mappings:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+ *
* # Rules for HTTP mapping
+ *
* The rules for mapping HTTP path, query parameters, and body fields
* to the request message are as follows:
+ *
* 1. The `body` field specifies either `*` or a field path, or is
* omitted. If omitted, it indicates there is no HTTP request body.
* 2. Leaf fields (recursive expansion of nested messages in the
@@ -149,34 +185,42 @@ package com.google.api;
* (c) All other fields.
* 3. URL query parameters found in the HTTP request are mapped to (c) fields.
* 4. Any body sent with an HTTP request can contain only (b) fields.
+ *
* The syntax of the path template is as follows:
+ *
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
+ *
* The syntax `*` matches a single path segment. The syntax `**` matches zero
* or more path segments, which must be the last part of the path except the
* `Verb`. The syntax `LITERAL` matches literal text in the path.
+ *
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
+ *
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path, all characters
* except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
* Discovery Document as `{var}`.
+ *
* If a variable contains one or more path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path, all
* characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
* show up in the Discovery Document as `{+var}`.
+ *
* NOTE: While the single segment variable matches the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
* Simple String Expansion, the multi segment variable **does not** match
* RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs.
+ *
* NOTE: the field paths in variables and in the `body` must not refer to
* repeated fields or map fields.
*
@@ -206,123 +250,6 @@ private static final long serialVersionUID = 0L;
return new HttpRule();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HttpRule(
- 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();
-
- selector_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
- patternCase_ = 2;
- pattern_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
- patternCase_ = 3;
- pattern_ = s;
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
- patternCase_ = 4;
- pattern_ = s;
- break;
- }
- case 42: {
- java.lang.String s = input.readStringRequireUtf8();
- patternCase_ = 5;
- pattern_ = s;
- break;
- }
- case 50: {
- java.lang.String s = input.readStringRequireUtf8();
- patternCase_ = 6;
- pattern_ = s;
- break;
- }
- case 58: {
- java.lang.String s = input.readStringRequireUtf8();
-
- body_ = s;
- break;
- }
- case 66: {
- com.google.api.CustomHttpPattern.Builder subBuilder = null;
- if (patternCase_ == 8) {
- subBuilder = ((com.google.api.CustomHttpPattern) pattern_).toBuilder();
- }
- pattern_ =
- input.readMessage(com.google.api.CustomHttpPattern.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom((com.google.api.CustomHttpPattern) pattern_);
- pattern_ = subBuilder.buildPartial();
- }
- patternCase_ = 8;
- break;
- }
- case 90: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- additionalBindings_ = new java.util.ArrayList
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -412,6 +342,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -434,6 +365,17 @@ private static final long serialVersionUID = 0L;
}
public static final int GET_FIELD_NUMBER = 2;
+ /**
+ * + * Used for listing and getting information about resources. + *+ * + *
string get = 2;
+ * @return Whether the get field is set.
+ */
+ public boolean hasGet() {
+ return patternCase_ == 2;
+ }
/**
*
* Used for listing and getting information about resources.
@@ -487,6 +429,17 @@ private static final long serialVersionUID = 0L;
}
public static final int PUT_FIELD_NUMBER = 3;
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string put = 3;
+ * @return Whether the put field is set.
+ */
+ public boolean hasPut() {
+ return patternCase_ == 3;
+ }
/**
*
* Used for updating a resource.
@@ -540,6 +493,17 @@ private static final long serialVersionUID = 0L;
}
public static final int POST_FIELD_NUMBER = 4;
+ /**
+ *
+ * Used for creating a resource.
+ *
+ *
+ * string post = 4;
+ * @return Whether the post field is set.
+ */
+ public boolean hasPost() {
+ return patternCase_ == 4;
+ }
/**
*
* Used for creating a resource.
@@ -593,6 +557,17 @@ private static final long serialVersionUID = 0L;
}
public static final int DELETE_FIELD_NUMBER = 5;
+ /**
+ *
+ * Used for deleting a resource.
+ *
+ *
+ * string delete = 5;
+ * @return Whether the delete field is set.
+ */
+ public boolean hasDelete() {
+ return patternCase_ == 5;
+ }
/**
*
* Used for deleting a resource.
@@ -646,6 +621,17 @@ private static final long serialVersionUID = 0L;
}
public static final int PATCH_FIELD_NUMBER = 6;
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string patch = 6;
+ * @return Whether the patch field is set.
+ */
+ public boolean hasPatch() {
+ return patternCase_ == 6;
+ }
/**
*
* Used for updating a resource.
@@ -751,7 +737,8 @@ private static final long serialVersionUID = 0L;
}
public static final int BODY_FIELD_NUMBER = 7;
- private volatile java.lang.Object body_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object body_ = "";
/**
*
* The name of the request field whose value is mapped to the HTTP body, or
@@ -803,7 +790,8 @@ private static final long serialVersionUID = 0L;
}
public static final int RESPONSE_BODY_FIELD_NUMBER = 12;
- private volatile java.lang.Object responseBody_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object responseBody_ = "";
/**
*
* Optional. The name of the response field whose value is mapped to the HTTP
@@ -853,6 +841,7 @@ private static final long serialVersionUID = 0L;
}
public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11;
+ @SuppressWarnings("serial")
private java.util.List additionalBindings_;
/**
*
@@ -936,7 +925,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getSelectorBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_);
}
if (patternCase_ == 2) {
@@ -954,7 +943,7 @@ private static final long serialVersionUID = 0L;
if (patternCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pattern_);
}
- if (!getBodyBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, body_);
}
if (patternCase_ == 8) {
@@ -963,10 +952,10 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < additionalBindings_.size(); i++) {
output.writeMessage(11, additionalBindings_.get(i));
}
- if (!getResponseBodyBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, responseBody_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -975,7 +964,7 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getSelectorBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_);
}
if (patternCase_ == 2) {
@@ -993,7 +982,7 @@ private static final long serialVersionUID = 0L;
if (patternCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pattern_);
}
- if (!getBodyBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, body_);
}
if (patternCase_ == 8) {
@@ -1004,10 +993,10 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, additionalBindings_.get(i));
}
- if (!getResponseBodyBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, responseBody_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1059,7 +1048,7 @@ private static final long serialVersionUID = 0L;
case 0:
default:
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1108,7 +1097,7 @@ private static final long serialVersionUID = 0L;
case 0:
default:
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1157,11 +1146,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.api.HttpRule parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1211,10 +1202,13 @@ private static final long serialVersionUID = 0L;
* HTTP request body. The mapping is typically specified as an
* `google.api.http` annotation on the RPC method,
* see "google/api/annotations.proto" for details.
+ *
* The mapping consists of a field specifying the path template and
* method kind. The path template can refer to fields in the request
* message, as in the example below which describes a REST GET
* operation on a resource collection of messages:
+ *
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
@@ -1230,23 +1224,31 @@ private static final long serialVersionUID = 0L;
* message Message {
* string text = 1; // content of the resource
* }
+ *
* The same http annotation can alternatively be expressed inside the
* `GRPC API Configuration` YAML file.
+ *
* http:
* rules:
* - selector: <proto_package_name>.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
+ *
* This definition enables an automatic, bidrectional mapping of HTTP
* JSON to RPC. Example:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
+ *
* In general, not only fields but also field paths can be referenced
* from a path pattern. Fields mapped to the path pattern cannot be
* repeated and must have a primitive (non-message) type.
+ *
* Any fields in the request message which are not bound by the path
* pattern automatically become (optional) HTTP query
* parameters. Assume the following definition of the request message:
+ *
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get = "/v1/messages/{message_id}";
@@ -1260,17 +1262,24 @@ private static final long serialVersionUID = 0L;
* int64 revision = 2; // becomes a parameter
* SubMessage sub = 3; // `sub.subfield` becomes a parameter
* }
+ *
+ *
* This enables a HTTP JSON to RPC mapping as below:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
+ *
* Note that fields which are mapped to HTTP parameters must have a
* primitive type or a repeated primitive type. Message types are not
* allowed. In the case of a repeated type, the parameter can be
* repeated in the URL, as in `...?param=A¶m=B`.
+ *
* For HTTP method kinds which allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
+ *
+ *
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
@@ -1283,16 +1292,21 @@ private static final long serialVersionUID = 0L;
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
+ *
+ *
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
+ *
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ *
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
+ *
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
@@ -1305,17 +1319,23 @@ private static final long serialVersionUID = 0L;
* string message_id = 1;
* string text = 2;
* }
+ *
+ *
* The following HTTP JSON to RPC mapping is enabled:
+ *
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+ *
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice of
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
+ *
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
+ *
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
@@ -1330,15 +1350,21 @@ private static final long serialVersionUID = 0L;
* string message_id = 1;
* string user_id = 2;
* }
+ *
+ *
* This enables the following two alternative HTTP JSON to RPC
* mappings:
+ *
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+ *
* # Rules for HTTP mapping
+ *
* The rules for mapping HTTP path, query parameters, and body fields
* to the request message are as follows:
+ *
* 1. The `body` field specifies either `*` or a field path, or is
* omitted. If omitted, it indicates there is no HTTP request body.
* 2. Leaf fields (recursive expansion of nested messages in the
@@ -1349,34 +1375,42 @@ private static final long serialVersionUID = 0L;
* (c) All other fields.
* 3. URL query parameters found in the HTTP request are mapped to (c) fields.
* 4. Any body sent with an HTTP request can contain only (b) fields.
+ *
* The syntax of the path template is as follows:
+ *
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
+ *
* The syntax `*` matches a single path segment. The syntax `**` matches zero
* or more path segments, which must be the last part of the path except the
* `Verb`. The syntax `LITERAL` matches literal text in the path.
+ *
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
+ *
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path, all characters
* except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
* Discovery Document as `{var}`.
+ *
* If a variable contains one or more path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path, all
* characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
* show up in the Discovery Document as `{+var}`.
+ *
* NOTE: While the single segment variable matches the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
* Simple String Expansion, the multi segment variable **does not** match
* RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs.
+ *
* NOTE: the field paths in variables and in the `body` must not refer to
* repeated fields or map fields.
*
@@ -1402,35 +1436,31 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.api.HttpRule.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getAdditionalBindingsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
selector_ = "";
-
+ if (customBuilder_ != null) {
+ customBuilder_.clear();
+ }
body_ = "";
-
responseBody_ = "";
-
if (additionalBindingsBuilder_ == null) {
additionalBindings_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ additionalBindings_ = null;
additionalBindingsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000200);
patternCase_ = 0;
pattern_ = null;
return this;
@@ -1459,44 +1489,45 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.api.HttpRule buildPartial() {
com.google.api.HttpRule result = new com.google.api.HttpRule(this);
- int from_bitField0_ = bitField0_;
- result.selector_ = selector_;
- if (patternCase_ == 2) {
- result.pattern_ = pattern_;
- }
- if (patternCase_ == 3) {
- result.pattern_ = pattern_;
- }
- if (patternCase_ == 4) {
- result.pattern_ = pattern_;
- }
- if (patternCase_ == 5) {
- result.pattern_ = pattern_;
- }
- if (patternCase_ == 6) {
- result.pattern_ = pattern_;
- }
- if (patternCase_ == 8) {
- if (customBuilder_ == null) {
- result.pattern_ = pattern_;
- } else {
- result.pattern_ = customBuilder_.build();
- }
- }
- result.body_ = body_;
- result.responseBody_ = responseBody_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.api.HttpRule result) {
if (additionalBindingsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000200);
}
result.additionalBindings_ = additionalBindings_;
} else {
result.additionalBindings_ = additionalBindingsBuilder_.build();
}
+ }
+
+ private void buildPartial0(com.google.api.HttpRule result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.selector_ = selector_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.body_ = body_;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.responseBody_ = responseBody_;
+ }
+ }
+
+ private void buildPartialOneofs(com.google.api.HttpRule result) {
result.patternCase_ = patternCase_;
- onBuilt();
- return result;
+ result.pattern_ = this.pattern_;
+ if (patternCase_ == 8 &&
+ customBuilder_ != null) {
+ result.pattern_ = customBuilder_.build();
+ }
}
@java.lang.Override
@@ -1545,21 +1576,24 @@ private static final long serialVersionUID = 0L;
if (other == com.google.api.HttpRule.getDefaultInstance()) return this;
if (!other.getSelector().isEmpty()) {
selector_ = other.selector_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getBody().isEmpty()) {
body_ = other.body_;
+ bitField0_ |= 0x00000080;
onChanged();
}
if (!other.getResponseBody().isEmpty()) {
responseBody_ = other.responseBody_;
+ bitField0_ |= 0x00000100;
onChanged();
}
if (additionalBindingsBuilder_ == null) {
if (!other.additionalBindings_.isEmpty()) {
if (additionalBindings_.isEmpty()) {
additionalBindings_ = other.additionalBindings_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureAdditionalBindingsIsMutable();
additionalBindings_.addAll(other.additionalBindings_);
@@ -1572,7 +1606,7 @@ private static final long serialVersionUID = 0L;
additionalBindingsBuilder_.dispose();
additionalBindingsBuilder_ = null;
additionalBindings_ = other.additionalBindings_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000200);
additionalBindingsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAdditionalBindingsFieldBuilder() : null;
@@ -1620,7 +1654,7 @@ private static final long serialVersionUID = 0L;
break;
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1635,17 +1669,95 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.api.HttpRule 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: {
+ selector_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+ patternCase_ = 2;
+ pattern_ = s;
+ break;
+ } // case 18
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+ patternCase_ = 3;
+ pattern_ = s;
+ break;
+ } // case 26
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+ patternCase_ = 4;
+ pattern_ = s;
+ break;
+ } // case 34
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+ patternCase_ = 5;
+ pattern_ = s;
+ break;
+ } // case 42
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+ patternCase_ = 6;
+ pattern_ = s;
+ break;
+ } // case 50
+ case 58: {
+ body_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 58
+ case 66: {
+ input.readMessage(
+ getCustomFieldBuilder().getBuilder(),
+ extensionRegistry);
+ patternCase_ = 8;
+ break;
+ } // case 66
+ case 90: {
+ com.google.api.HttpRule m =
+ input.readMessage(
+ com.google.api.HttpRule.parser(),
+ extensionRegistry);
+ if (additionalBindingsBuilder_ == null) {
+ ensureAdditionalBindingsIsMutable();
+ additionalBindings_.add(m);
+ } else {
+ additionalBindingsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 90
+ case 98: {
+ responseBody_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 98
+ 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.api.HttpRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int patternCase_ = 0;
@@ -1669,6 +1781,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -1690,6 +1803,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -1712,6 +1826,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -1721,17 +1836,16 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSelector(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
selector_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -1739,14 +1853,15 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearSelector() {
-
selector_ = getDefaultInstance().getSelector();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -1756,16 +1871,26 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSelectorBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
selector_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
+ /**
+ *
+ * Used for listing and getting information about resources.
+ *
+ *
+ * string get = 2;
+ * @return Whether the get field is set.
+ */
+ @java.lang.Override
+ public boolean hasGet() {
+ return patternCase_ == 2;
+ }
/**
*
* Used for listing and getting information about resources.
@@ -1830,10 +1955,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setGet(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- patternCase_ = 2;
+ if (value == null) { throw new NullPointerException(); }
+ patternCase_ = 2;
pattern_ = value;
onChanged();
return this;
@@ -1865,16 +1988,26 @@ private static final long serialVersionUID = 0L;
*/
public Builder setGetBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
patternCase_ = 2;
pattern_ = value;
onChanged();
return this;
}
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string put = 3;
+ * @return Whether the put field is set.
+ */
+ @java.lang.Override
+ public boolean hasPut() {
+ return patternCase_ == 3;
+ }
/**
*
* Used for updating a resource.
@@ -1939,10 +2072,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPut(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- patternCase_ = 3;
+ if (value == null) { throw new NullPointerException(); }
+ patternCase_ = 3;
pattern_ = value;
onChanged();
return this;
@@ -1974,16 +2105,26 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPutBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
patternCase_ = 3;
pattern_ = value;
onChanged();
return this;
}
+ /**
+ *
+ * Used for creating a resource.
+ *
+ *
+ * string post = 4;
+ * @return Whether the post field is set.
+ */
+ @java.lang.Override
+ public boolean hasPost() {
+ return patternCase_ == 4;
+ }
/**
*
* Used for creating a resource.
@@ -2048,10 +2189,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPost(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- patternCase_ = 4;
+ if (value == null) { throw new NullPointerException(); }
+ patternCase_ = 4;
pattern_ = value;
onChanged();
return this;
@@ -2083,16 +2222,26 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPostBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
patternCase_ = 4;
pattern_ = value;
onChanged();
return this;
}
+ /**
+ *
+ * Used for deleting a resource.
+ *
+ *
+ * string delete = 5;
+ * @return Whether the delete field is set.
+ */
+ @java.lang.Override
+ public boolean hasDelete() {
+ return patternCase_ == 5;
+ }
/**
*
* Used for deleting a resource.
@@ -2157,10 +2306,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDelete(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- patternCase_ = 5;
+ if (value == null) { throw new NullPointerException(); }
+ patternCase_ = 5;
pattern_ = value;
onChanged();
return this;
@@ -2192,16 +2339,26 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDeleteBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
patternCase_ = 5;
pattern_ = value;
onChanged();
return this;
}
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string patch = 6;
+ * @return Whether the patch field is set.
+ */
+ @java.lang.Override
+ public boolean hasPatch() {
+ return patternCase_ == 6;
+ }
/**
*
* Used for updating a resource.
@@ -2266,10 +2423,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPatch(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- patternCase_ = 6;
+ if (value == null) { throw new NullPointerException(); }
+ patternCase_ = 6;
pattern_ = value;
onChanged();
return this;
@@ -2301,10 +2456,8 @@ private static final long serialVersionUID = 0L;
*/
public Builder setPatchBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
patternCase_ = 6;
pattern_ = value;
onChanged();
@@ -2420,8 +2573,9 @@ private static final long serialVersionUID = 0L;
} else {
if (patternCase_ == 8) {
customBuilder_.mergeFrom(value);
+ } else {
+ customBuilder_.setMessage(value);
}
- customBuilder_.setMessage(value);
}
patternCase_ = 8;
return this;
@@ -2511,7 +2665,7 @@ private static final long serialVersionUID = 0L;
pattern_ = null;
}
patternCase_ = 8;
- onChanged();;
+ onChanged();
return customBuilder_;
}
@@ -2577,11 +2731,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setBody(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
body_ = value;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2597,8 +2749,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearBody() {
-
body_ = getDefaultInstance().getBody();
+ bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
@@ -2616,12 +2768,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setBodyBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
body_ = value;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2685,11 +2835,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResponseBody(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
responseBody_ = value;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2704,8 +2852,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearResponseBody() {
-
responseBody_ = getDefaultInstance().getResponseBody();
+ bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
@@ -2722,12 +2870,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResponseBodyBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
responseBody_ = value;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2735,9 +2881,9 @@ private static final long serialVersionUID = 0L;
private java.util.List additionalBindings_ =
java.util.Collections.emptyList();
private void ensureAdditionalBindingsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!((bitField0_ & 0x00000200) != 0)) {
additionalBindings_ = new java.util.ArrayList(additionalBindings_);
- bitField0_ |= 0x00000001;
+ bitField0_ |= 0x00000200;
}
}
@@ -2953,7 +3099,7 @@ private static final long serialVersionUID = 0L;
public Builder clearAdditionalBindings() {
if (additionalBindingsBuilder_ == null) {
additionalBindings_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
} else {
additionalBindingsBuilder_.clear();
@@ -3072,7 +3218,7 @@ private static final long serialVersionUID = 0L;
additionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>(
additionalBindings_,
- ((bitField0_ & 0x00000001) != 0),
+ ((bitField0_ & 0x00000200) != 0),
getParentForChildren(),
isClean());
additionalBindings_ = null;
@@ -3112,7 +3258,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new HttpRule(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/src/main/java/com/google/api/HttpRuleOrBuilder.java b/src/main/java/com/google/api/HttpRuleOrBuilder.java
index 5106916..63307b7 100644
--- a/src/main/java/com/google/api/HttpRuleOrBuilder.java
+++ b/src/main/java/com/google/api/HttpRuleOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
+// Protobuf Java Version: 3.25.6
package com.google.api;
public interface HttpRuleOrBuilder extends
@@ -10,6 +11,7 @@ public interface HttpRuleOrBuilder extends
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -20,6 +22,7 @@ public interface HttpRuleOrBuilder extends
/**
*
* Selects methods to which this rule applies.
+ *
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
*
@@ -29,6 +32,15 @@ public interface HttpRuleOrBuilder extends
com.google.protobuf.ByteString
getSelectorBytes();
+ /**
+ *
+ * Used for listing and getting information about resources.
+ *
+ *
+ * string get = 2;
+ * @return Whether the get field is set.
+ */
+ boolean hasGet();
/**
*
* Used for listing and getting information about resources.
@@ -49,6 +61,15 @@ public interface HttpRuleOrBuilder extends
com.google.protobuf.ByteString
getGetBytes();
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string put = 3;
+ * @return Whether the put field is set.
+ */
+ boolean hasPut();
/**
*
* Used for updating a resource.
@@ -69,6 +90,15 @@ public interface HttpRuleOrBuilder extends
com.google.protobuf.ByteString
getPutBytes();
+ /**
+ *
+ * Used for creating a resource.
+ *
+ *
+ * string post = 4;
+ * @return Whether the post field is set.
+ */
+ boolean hasPost();
/**
*
* Used for creating a resource.
@@ -89,6 +119,15 @@ public interface HttpRuleOrBuilder extends
com.google.protobuf.ByteString
getPostBytes();
+ /**
+ *
+ * Used for deleting a resource.
+ *
+ *
+ * string delete = 5;
+ * @return Whether the delete field is set.
+ */
+ boolean hasDelete();
/**
*
* Used for deleting a resource.
@@ -109,6 +148,15 @@ public interface HttpRuleOrBuilder extends
com.google.protobuf.ByteString
getDeleteBytes();
+ /**
+ *
+ * Used for updating a resource.
+ *
+ *
+ * string patch = 6;
+ * @return Whether the patch field is set.
+ */
+ boolean hasPatch();
/**
*
* Used for updating a resource.
@@ -269,5 +317,5 @@ public interface HttpRuleOrBuilder extends
com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(
int index);
- public com.google.api.HttpRule.PatternCase getPatternCase();
+ com.google.api.HttpRule.PatternCase getPatternCase();
}
diff --git a/src/main/java/com/google/protobuf/Empty.java b/src/main/java/com/google/protobuf/Empty.java
index 15d735e..c6e2598 100644
--- a/src/main/java/com/google/protobuf/Empty.java
+++ b/src/main/java/com/google/protobuf/Empty.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
+// Protobuf Java Version: 3.25.6
package com.google.protobuf;
/**
@@ -8,9 +9,11 @@ package com.google.protobuf;
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
+ *
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
+ *
* The JSON representation for `Empty` is empty JSON object `{}`.
*
*
@@ -35,48 +38,6 @@ private static final long serialVersionUID = 0L;
return new Empty();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Empty(
- 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;
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor;
@@ -104,7 +65,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -113,7 +74,7 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -128,7 +89,7 @@ private static final long serialVersionUID = 0L;
}
com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -139,7 +100,7 @@ private static final long serialVersionUID = 0L;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -188,11 +149,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.protobuf.Empty parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -239,9 +202,11 @@ private static final long serialVersionUID = 0L;
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
+ *
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
+ *
* The JSON representation for `Empty` is empty JSON object `{}`.
*
*
@@ -266,18 +231,13 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.protobuf.Empty.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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() {
@@ -356,7 +316,7 @@ private static final long serialVersionUID = 0L;
public Builder mergeFrom(com.google.protobuf.Empty other) {
if (other == com.google.protobuf.Empty.getDefaultInstance()) return this;
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -371,17 +331,30 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.protobuf.Empty 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;
+ 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.protobuf.Empty) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@java.lang.Override
@@ -417,7 +390,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Empty(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/src/main/java/com/google/protobuf/EmptyOrBuilder.java b/src/main/java/com/google/protobuf/EmptyOrBuilder.java
index 9a38161..bcad071 100644
--- a/src/main/java/com/google/protobuf/EmptyOrBuilder.java
+++ b/src/main/java/com/google/protobuf/EmptyOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
+// Protobuf Java Version: 3.25.6
package com.google.protobuf;
public interface EmptyOrBuilder extends
diff --git a/src/main/java/com/google/protobuf/EmptyProto.java b/src/main/java/com/google/protobuf/EmptyProto.java
index 83d1c2e..2257101 100644
--- a/src/main/java/com/google/protobuf/EmptyProto.java
+++ b/src/main/java/com/google/protobuf/EmptyProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
+// Protobuf Java Version: 3.25.6
package com.google.protobuf;
public final class EmptyProto {
diff --git a/src/main/java/com/google/rpc/BadRequest.java b/src/main/java/com/google/rpc/BadRequest.java
index 90b1a02..0fcfd91 100644
--- a/src/main/java/com/google/rpc/BadRequest.java
+++ b/src/main/java/com/google/rpc/BadRequest.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -31,61 +32,6 @@ private static final long serialVersionUID = 0L;
return new BadRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private BadRequest(
- 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)) {
- fieldViolations_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- fieldViolations_.add(
- input.readMessage(com.google.rpc.BadRequest.FieldViolation.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor;
@@ -175,60 +121,6 @@ private static final long serialVersionUID = 0L;
return new FieldViolation();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private FieldViolation(
- 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();
-
- field_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor;
@@ -243,7 +135,8 @@ private static final long serialVersionUID = 0L;
}
public static final int FIELD_FIELD_NUMBER = 1;
- private volatile java.lang.Object field_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object field_ = "";
/**
*
* A path leading to a field in the request body. The value will be a
@@ -293,7 +186,8 @@ private static final long serialVersionUID = 0L;
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* A description of why the request element is bad.
@@ -352,13 +246,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getFieldBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -367,13 +261,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getFieldBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -392,7 +286,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getField())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -407,7 +301,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getField().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -456,11 +350,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -528,26 +424,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.BadRequest.FieldViolation.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
field_ = "";
-
description_ = "";
-
return this;
}
@@ -574,12 +464,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.BadRequest.FieldViolation buildPartial() {
com.google.rpc.BadRequest.FieldViolation result = new com.google.rpc.BadRequest.FieldViolation(this);
- result.field_ = field_;
- result.description_ = description_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.BadRequest.FieldViolation result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.field_ = field_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -626,13 +525,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()) return this;
if (!other.getField().isEmpty()) {
field_ = other.field_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -647,19 +548,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.BadRequest.FieldViolation 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: {
+ field_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.BadRequest.FieldViolation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object field_ = "";
/**
@@ -720,11 +645,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setField(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
field_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -739,8 +662,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearField() {
-
field_ = getDefaultInstance().getField();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -757,12 +680,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setFieldBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
field_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -820,11 +741,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -837,8 +756,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -853,12 +772,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -895,7 +812,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new FieldViolation(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();
}
};
@@ -916,6 +844,7 @@ private static final long serialVersionUID = 0L;
}
public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List fieldViolations_;
/**
*
@@ -992,7 +921,7 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < fieldViolations_.size(); i++) {
output.writeMessage(1, fieldViolations_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1005,7 +934,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fieldViolations_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1022,7 +951,7 @@ private static final long serialVersionUID = 0L;
if (!getFieldViolationsList()
.equals(other.getFieldViolationsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1037,7 +966,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + FIELD_VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + getFieldViolationsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1086,11 +1015,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.BadRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.BadRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1159,29 +1090,25 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.BadRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getFieldViolationsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (fieldViolationsBuilder_ == null) {
fieldViolations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ fieldViolations_ = null;
fieldViolationsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1208,7 +1135,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.BadRequest buildPartial() {
com.google.rpc.BadRequest result = new com.google.rpc.BadRequest(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.rpc.BadRequest result) {
if (fieldViolationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
@@ -1218,8 +1151,10 @@ private static final long serialVersionUID = 0L;
} else {
result.fieldViolations_ = fieldViolationsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.rpc.BadRequest result) {
+ int from_bitField0_ = bitField0_;
}
@java.lang.Override
@@ -1292,7 +1227,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1307,17 +1242,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.BadRequest 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.rpc.BadRequest.FieldViolation m =
+ input.readMessage(
+ com.google.rpc.BadRequest.FieldViolation.parser(),
+ extensionRegistry);
+ if (fieldViolationsBuilder_ == null) {
+ ensureFieldViolationsIsMutable();
+ fieldViolations_.add(m);
+ } else {
+ fieldViolationsBuilder_.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.rpc.BadRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -1666,7 +1627,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new BadRequest(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/src/main/java/com/google/rpc/BadRequestOrBuilder.java b/src/main/java/com/google/rpc/BadRequestOrBuilder.java
index d1a7f39..236f91f 100644
--- a/src/main/java/com/google/rpc/BadRequestOrBuilder.java
+++ b/src/main/java/com/google/rpc/BadRequestOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface BadRequestOrBuilder extends
diff --git a/src/main/java/com/google/rpc/Code.java b/src/main/java/com/google/rpc/Code.java
index ba676b7..35c454f 100644
--- a/src/main/java/com/google/rpc/Code.java
+++ b/src/main/java/com/google/rpc/Code.java
@@ -1,11 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/code.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
*
* The canonical error codes for Google APIs.
+ *
+ *
* Sometimes multiple error codes may apply. Services should return
* the most specific error code that applies. For example, prefer
* `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
@@ -19,6 +22,7 @@ public enum Code
/**
*
* Not an error; returned on success
+ *
* HTTP Mapping: 200 OK
*
*
@@ -28,6 +32,7 @@ public enum Code
/**
*
* The operation was cancelled, typically by the caller.
+ *
* HTTP Mapping: 499 Client Closed Request
*
*
@@ -41,6 +46,7 @@ public enum Code
* an error space that is not known in this address space. Also
* errors raised by APIs that do not return enough error information
* may be converted to this error.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
@@ -53,6 +59,7 @@ public enum Code
* from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -66,6 +73,7 @@ public enum Code
* even if the operation has completed successfully. For example, a
* successful response from a server could have been delayed long
* enough for the deadline to expire.
+ *
* HTTP Mapping: 504 Gateway Timeout
*
*
@@ -75,11 +83,13 @@ public enum Code
/**
*
* Some requested entity (e.g., file or directory) was not found.
+ *
* Note to server developers: if a request is denied for an entire class
* of users, such as gradual feature rollout or undocumented whitelist,
* `NOT_FOUND` may be used. If a request is denied for some users within
* a class of users, such as user-based access control, `PERMISSION_DENIED`
* must be used.
+ *
* HTTP Mapping: 404 Not Found
*
*
@@ -90,6 +100,7 @@ public enum Code
*
* The entity that a client attempted to create (e.g., file or directory)
* already exists.
+ *
* HTTP Mapping: 409 Conflict
*
*
@@ -106,6 +117,7 @@ public enum Code
* instead for those errors). This error code does not imply the
* request is valid or the requested entity exists or satisfies
* other pre-conditions.
+ *
* HTTP Mapping: 403 Forbidden
*
*
@@ -116,6 +128,7 @@ public enum Code
*
* The request does not have valid authentication credentials for the
* operation.
+ *
* HTTP Mapping: 401 Unauthorized
*
*
@@ -126,6 +139,7 @@ public enum Code
*
* Some resource has been exhausted, perhaps a per-user quota, or
* perhaps the entire file system is out of space.
+ *
* HTTP Mapping: 429 Too Many Requests
*
*
@@ -138,6 +152,7 @@ public enum Code
* required for the operation's execution. For example, the directory
* to be deleted is non-empty, an rmdir operation is applied to
* a non-directory, etc.
+ *
* Service implementors can use the following guidelines to decide
* between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
* (a) Use `UNAVAILABLE` if the client can retry just the failing call.
@@ -149,6 +164,7 @@ public enum Code
* fails because the directory is non-empty, `FAILED_PRECONDITION`
* should be returned since the client should not retry unless
* the files are deleted from the directory.
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -159,8 +175,10 @@ public enum Code
*
* The operation was aborted, typically due to a concurrency issue such as
* a sequencer check failure or transaction abort.
+ *
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
+ *
* HTTP Mapping: 409 Conflict
*
*
@@ -171,17 +189,20 @@ public enum Code
*
* The operation was attempted past the valid range. E.g., seeking or
* reading past end-of-file.
+ *
* Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
* be fixed if the system state changes. For example, a 32-bit file
* system will generate `INVALID_ARGUMENT` if asked to read at an
* offset that is not in the range [0,2^32-1], but it will generate
* `OUT_OF_RANGE` if asked to read from an offset past the current
* file size.
+ *
* There is a fair bit of overlap between `FAILED_PRECONDITION` and
* `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
* error) when it applies so that callers who are iterating through
* a space can easily look for an `OUT_OF_RANGE` error to detect when
* they are done.
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -192,6 +213,7 @@ public enum Code
*
* The operation is not implemented or is not supported/enabled in this
* service.
+ *
* HTTP Mapping: 501 Not Implemented
*
*
@@ -203,6 +225,7 @@ public enum Code
* Internal errors. This means that some invariants expected by the
* underlying system have been broken. This error code is reserved
* for serious errors.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
@@ -214,8 +237,10 @@ public enum Code
* The service is currently unavailable. This is most likely a
* transient condition, which can be corrected by retrying with
* a backoff.
+ *
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
+ *
* HTTP Mapping: 503 Service Unavailable
*
*
@@ -225,6 +250,7 @@ public enum Code
/**
*
* Unrecoverable data loss or corruption.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
@@ -237,6 +263,7 @@ public enum Code
/**
*
* Not an error; returned on success
+ *
* HTTP Mapping: 200 OK
*
*
@@ -246,6 +273,7 @@ public enum Code
/**
*
* The operation was cancelled, typically by the caller.
+ *
* HTTP Mapping: 499 Client Closed Request
*
*
@@ -259,6 +287,7 @@ public enum Code
* an error space that is not known in this address space. Also
* errors raised by APIs that do not return enough error information
* may be converted to this error.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
@@ -271,6 +300,7 @@ public enum Code
* from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -284,6 +314,7 @@ public enum Code
* even if the operation has completed successfully. For example, a
* successful response from a server could have been delayed long
* enough for the deadline to expire.
+ *
* HTTP Mapping: 504 Gateway Timeout
*
*
@@ -293,11 +324,13 @@ public enum Code
/**
*
* Some requested entity (e.g., file or directory) was not found.
+ *
* Note to server developers: if a request is denied for an entire class
* of users, such as gradual feature rollout or undocumented whitelist,
* `NOT_FOUND` may be used. If a request is denied for some users within
* a class of users, such as user-based access control, `PERMISSION_DENIED`
* must be used.
+ *
* HTTP Mapping: 404 Not Found
*
*
@@ -308,6 +341,7 @@ public enum Code
*
* The entity that a client attempted to create (e.g., file or directory)
* already exists.
+ *
* HTTP Mapping: 409 Conflict
*
*
@@ -324,6 +358,7 @@ public enum Code
* instead for those errors). This error code does not imply the
* request is valid or the requested entity exists or satisfies
* other pre-conditions.
+ *
* HTTP Mapping: 403 Forbidden
*
*
@@ -334,6 +369,7 @@ public enum Code
*
* The request does not have valid authentication credentials for the
* operation.
+ *
* HTTP Mapping: 401 Unauthorized
*
*
@@ -344,6 +380,7 @@ public enum Code
*
* Some resource has been exhausted, perhaps a per-user quota, or
* perhaps the entire file system is out of space.
+ *
* HTTP Mapping: 429 Too Many Requests
*
*
@@ -356,6 +393,7 @@ public enum Code
* required for the operation's execution. For example, the directory
* to be deleted is non-empty, an rmdir operation is applied to
* a non-directory, etc.
+ *
* Service implementors can use the following guidelines to decide
* between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
* (a) Use `UNAVAILABLE` if the client can retry just the failing call.
@@ -367,6 +405,7 @@ public enum Code
* fails because the directory is non-empty, `FAILED_PRECONDITION`
* should be returned since the client should not retry unless
* the files are deleted from the directory.
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -377,8 +416,10 @@ public enum Code
*
* The operation was aborted, typically due to a concurrency issue such as
* a sequencer check failure or transaction abort.
+ *
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
+ *
* HTTP Mapping: 409 Conflict
*
*
@@ -389,17 +430,20 @@ public enum Code
*
* The operation was attempted past the valid range. E.g., seeking or
* reading past end-of-file.
+ *
* Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
* be fixed if the system state changes. For example, a 32-bit file
* system will generate `INVALID_ARGUMENT` if asked to read at an
* offset that is not in the range [0,2^32-1], but it will generate
* `OUT_OF_RANGE` if asked to read from an offset past the current
* file size.
+ *
* There is a fair bit of overlap between `FAILED_PRECONDITION` and
* `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
* error) when it applies so that callers who are iterating through
* a space can easily look for an `OUT_OF_RANGE` error to detect when
* they are done.
+ *
* HTTP Mapping: 400 Bad Request
*
*
@@ -410,6 +454,7 @@ public enum Code
*
* The operation is not implemented or is not supported/enabled in this
* service.
+ *
* HTTP Mapping: 501 Not Implemented
*
*
@@ -421,6 +466,7 @@ public enum Code
* Internal errors. This means that some invariants expected by the
* underlying system have been broken. This error code is reserved
* for serious errors.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
@@ -432,8 +478,10 @@ public enum Code
* The service is currently unavailable. This is most likely a
* transient condition, which can be corrected by retrying with
* a backoff.
+ *
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
+ *
* HTTP Mapping: 503 Service Unavailable
*
*
@@ -443,6 +491,7 @@ public enum Code
/**
*
* Unrecoverable data loss or corruption.
+ *
* HTTP Mapping: 500 Internal Server Error
*
*
diff --git a/src/main/java/com/google/rpc/CodeProto.java b/src/main/java/com/google/rpc/CodeProto.java
index 229bcfe..da12243 100644
--- a/src/main/java/com/google/rpc/CodeProto.java
+++ b/src/main/java/com/google/rpc/CodeProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/code.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public final class CodeProto {
diff --git a/src/main/java/com/google/rpc/DebugInfo.java b/src/main/java/com/google/rpc/DebugInfo.java
index 4045b38..35f516a 100644
--- a/src/main/java/com/google/rpc/DebugInfo.java
+++ b/src/main/java/com/google/rpc/DebugInfo.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -20,7 +21,8 @@ private static final long serialVersionUID = 0L;
super(builder);
}
private DebugInfo() {
- stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ stackEntries_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
detail_ = "";
}
@@ -31,67 +33,6 @@ private static final long serialVersionUID = 0L;
return new DebugInfo();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private DebugInfo(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- stackEntries_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- stackEntries_.add(s);
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- detail_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- stackEntries_ = stackEntries_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor;
@@ -106,7 +47,9 @@ private static final long serialVersionUID = 0L;
}
public static final int STACK_ENTRIES_FIELD_NUMBER = 1;
- private com.google.protobuf.LazyStringList stackEntries_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList stackEntries_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* The stack trace entries indicating where the error occurred.
@@ -157,7 +100,8 @@ private static final long serialVersionUID = 0L;
}
public static final int DETAIL_FIELD_NUMBER = 2;
- private volatile java.lang.Object detail_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object detail_ = "";
/**
*
* Additional debugging information provided by the server.
@@ -219,10 +163,10 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < stackEntries_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stackEntries_.getRaw(i));
}
- if (!getDetailBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -239,10 +183,10 @@ private static final long serialVersionUID = 0L;
size += dataSize;
size += 1 * getStackEntriesList().size();
}
- if (!getDetailBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -261,7 +205,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getStackEntriesList())) return false;
if (!getDetail()
.equals(other.getDetail())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -278,7 +222,7 @@ private static final long serialVersionUID = 0L;
}
hash = (37 * hash) + DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getDetail().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -327,11 +271,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.DebugInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.DebugInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -399,26 +345,21 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.DebugInfo.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
- stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = 0;
+ stackEntries_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
detail_ = "";
-
return this;
}
@@ -445,17 +386,22 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.DebugInfo buildPartial() {
com.google.rpc.DebugInfo result = new com.google.rpc.DebugInfo(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) != 0)) {
- stackEntries_ = stackEntries_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.stackEntries_ = stackEntries_;
- result.detail_ = detail_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.DebugInfo result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ stackEntries_.makeImmutable();
+ result.stackEntries_ = stackEntries_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.detail_ = detail_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -503,7 +449,7 @@ private static final long serialVersionUID = 0L;
if (!other.stackEntries_.isEmpty()) {
if (stackEntries_.isEmpty()) {
stackEntries_ = other.stackEntries_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ |= 0x00000001;
} else {
ensureStackEntriesIsMutable();
stackEntries_.addAll(other.stackEntries_);
@@ -512,9 +458,10 @@ private static final long serialVersionUID = 0L;
}
if (!other.getDetail().isEmpty()) {
detail_ = other.detail_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -529,27 +476,52 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.DebugInfo parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureStackEntriesIsMutable();
+ stackEntries_.add(s);
+ break;
+ } // case 10
+ case 18: {
+ detail_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.DebugInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
- private com.google.protobuf.LazyStringList stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private com.google.protobuf.LazyStringArrayList stackEntries_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureStackEntriesIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!stackEntries_.isModifiable()) {
stackEntries_ = new com.google.protobuf.LazyStringArrayList(stackEntries_);
- bitField0_ |= 0x00000001;
- }
+ }
+ bitField0_ |= 0x00000001;
}
/**
*
@@ -561,7 +533,8 @@ private static final long serialVersionUID = 0L;
*/
public com.google.protobuf.ProtocolStringList
getStackEntriesList() {
- return stackEntries_.getUnmodifiableView();
+ stackEntries_.makeImmutable();
+ return stackEntries_;
}
/**
*
@@ -611,11 +584,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setStackEntries(
int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureStackEntriesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureStackEntriesIsMutable();
stackEntries_.set(index, value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -630,11 +602,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder addStackEntries(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureStackEntriesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureStackEntriesIsMutable();
stackEntries_.add(value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -652,6 +623,7 @@ private static final long serialVersionUID = 0L;
ensureStackEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, stackEntries_);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -664,8 +636,9 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearStackEntries() {
- stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
+ stackEntries_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
@@ -680,12 +653,11 @@ private static final long serialVersionUID = 0L;
*/
public Builder addStackEntriesBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ensureStackEntriesIsMutable();
stackEntries_.add(value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -743,11 +715,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDetail(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
detail_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -760,8 +730,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDetail() {
-
detail_ = getDefaultInstance().getDetail();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -776,12 +746,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDetailBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
detail_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -818,7 +786,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new DebugInfo(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/src/main/java/com/google/rpc/DebugInfoOrBuilder.java b/src/main/java/com/google/rpc/DebugInfoOrBuilder.java
index 0cef307..ceef4cf 100644
--- a/src/main/java/com/google/rpc/DebugInfoOrBuilder.java
+++ b/src/main/java/com/google/rpc/DebugInfoOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface DebugInfoOrBuilder extends
diff --git a/src/main/java/com/google/rpc/ErrorDetailsProto.java b/src/main/java/com/google/rpc/ErrorDetailsProto.java
index b4e2fb7..e710185 100644
--- a/src/main/java/com/google/rpc/ErrorDetailsProto.java
+++ b/src/main/java/com/google/rpc/ErrorDetailsProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public final class ErrorDetailsProto {
diff --git a/src/main/java/com/google/rpc/Help.java b/src/main/java/com/google/rpc/Help.java
index 1d4c233..43ab4a2 100644
--- a/src/main/java/com/google/rpc/Help.java
+++ b/src/main/java/com/google/rpc/Help.java
@@ -1,11 +1,13 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
*
* Provides links to documentation or for performing an out of band action.
+ *
* For example, if a quota check failed with an error indicating the calling
* project hasn't enabled the accessed service, this can contain a URL pointing
* directly to the right place in the developer console to flip the bit.
@@ -33,61 +35,6 @@ private static final long serialVersionUID = 0L;
return new Help();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Help(
- 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)) {
- links_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- links_.add(
- input.readMessage(com.google.rpc.Help.Link.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- links_ = java.util.Collections.unmodifiableList(links_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
@@ -173,60 +120,6 @@ private static final long serialVersionUID = 0L;
return new Link();
}
- @java.lang.Override
- 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();
-
- description_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- url_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
@@ -241,7 +134,8 @@ private static final long serialVersionUID = 0L;
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* Describes what the link offers.
@@ -287,7 +181,8 @@ private static final long serialVersionUID = 0L;
}
public static final int URL_FIELD_NUMBER = 2;
- private volatile java.lang.Object url_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object url_ = "";
/**
*
* The URL of the link.
@@ -346,13 +241,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
}
- if (!getUrlBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -361,13 +256,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
}
- if (!getUrlBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -386,7 +281,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getDescription())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -401,7 +296,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -450,11 +345,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.Help.Link parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.Help.Link parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -522,26 +419,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.Help.Link.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
description_ = "";
-
url_ = "";
-
return this;
}
@@ -568,12 +459,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.Help.Link buildPartial() {
com.google.rpc.Help.Link result = new com.google.rpc.Help.Link(this);
- result.description_ = description_;
- result.url_ = url_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.Help.Link result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.description_ = description_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.url_ = url_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -620,13 +520,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.Help.Link.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -641,19 +543,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.Help.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: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ url_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.Help.Link) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object description_ = "";
/**
@@ -708,11 +634,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -725,8 +649,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -741,12 +665,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -804,11 +726,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setUrl(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
url_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -821,8 +741,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearUrl() {
-
url_ = getDefaultInstance().getUrl();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -837,12 +757,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
url_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -879,7 +797,18 @@ private static final long serialVersionUID = 0L;
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();
}
};
@@ -900,6 +829,7 @@ private static final long serialVersionUID = 0L;
}
public static final int LINKS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List links_;
/**
*
@@ -976,7 +906,7 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < links_.size(); i++) {
output.writeMessage(1, links_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -989,7 +919,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, links_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1006,7 +936,7 @@ private static final long serialVersionUID = 0L;
if (!getLinksList()
.equals(other.getLinksList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1021,7 +951,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + LINKS_FIELD_NUMBER;
hash = (53 * hash) + getLinksList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1070,11 +1000,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.Help parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.Help parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1119,6 +1051,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Provides links to documentation or for performing an out of band action.
+ *
* For example, if a quota check failed with an error indicating the calling
* project hasn't enabled the accessed service, this can contain a URL pointing
* directly to the right place in the developer console to flip the bit.
@@ -1145,29 +1078,25 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.Help.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getLinksFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (linksBuilder_ == null) {
links_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ links_ = null;
linksBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1194,7 +1123,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.Help buildPartial() {
com.google.rpc.Help result = new com.google.rpc.Help(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.rpc.Help result) {
if (linksBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
links_ = java.util.Collections.unmodifiableList(links_);
@@ -1204,8 +1139,10 @@ private static final long serialVersionUID = 0L;
} else {
result.links_ = linksBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.rpc.Help result) {
+ int from_bitField0_ = bitField0_;
}
@java.lang.Override
@@ -1278,7 +1215,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1293,17 +1230,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.Help 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.rpc.Help.Link m =
+ input.readMessage(
+ com.google.rpc.Help.Link.parser(),
+ extensionRegistry);
+ if (linksBuilder_ == null) {
+ ensureLinksIsMutable();
+ links_.add(m);
+ } else {
+ linksBuilder_.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.rpc.Help) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -1652,7 +1615,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Help(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/src/main/java/com/google/rpc/HelpOrBuilder.java b/src/main/java/com/google/rpc/HelpOrBuilder.java
index 6b63a66..148ffca 100644
--- a/src/main/java/com/google/rpc/HelpOrBuilder.java
+++ b/src/main/java/com/google/rpc/HelpOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface HelpOrBuilder extends
diff --git a/src/main/java/com/google/rpc/LocalizedMessage.java b/src/main/java/com/google/rpc/LocalizedMessage.java
index e1dfa7a..2810389 100644
--- a/src/main/java/com/google/rpc/LocalizedMessage.java
+++ b/src/main/java/com/google/rpc/LocalizedMessage.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -32,60 +33,6 @@ private static final long serialVersionUID = 0L;
return new LocalizedMessage();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private LocalizedMessage(
- 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();
-
- locale_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- message_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_descriptor;
@@ -100,7 +47,8 @@ private static final long serialVersionUID = 0L;
}
public static final int LOCALE_FIELD_NUMBER = 1;
- private volatile java.lang.Object locale_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object locale_ = "";
/**
*
* The locale used following the specification defined at
@@ -150,7 +98,8 @@ private static final long serialVersionUID = 0L;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
- private volatile java.lang.Object message_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object message_ = "";
/**
*
* The localized error message in the above locale.
@@ -209,13 +158,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLocaleBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locale_);
}
- if (!getMessageBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -224,13 +173,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getLocaleBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, locale_);
}
- if (!getMessageBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -249,7 +198,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getLocale())) return false;
if (!getMessage()
.equals(other.getMessage())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -264,7 +213,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getLocale().hashCode();
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -313,11 +262,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.LocalizedMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.LocalizedMessage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -386,26 +337,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.LocalizedMessage.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
locale_ = "";
-
message_ = "";
-
return this;
}
@@ -432,12 +377,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.LocalizedMessage buildPartial() {
com.google.rpc.LocalizedMessage result = new com.google.rpc.LocalizedMessage(this);
- result.locale_ = locale_;
- result.message_ = message_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.LocalizedMessage result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.locale_ = locale_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.message_ = message_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -484,13 +438,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.LocalizedMessage.getDefaultInstance()) return this;
if (!other.getLocale().isEmpty()) {
locale_ = other.locale_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -505,19 +461,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.LocalizedMessage 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: {
+ locale_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ message_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.LocalizedMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object locale_ = "";
/**
@@ -578,11 +558,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setLocale(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
locale_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -597,8 +575,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearLocale() {
-
locale_ = getDefaultInstance().getLocale();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -615,12 +593,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setLocaleBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
locale_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -678,11 +654,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setMessage(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
message_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -695,8 +669,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearMessage() {
-
message_ = getDefaultInstance().getMessage();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -711,12 +685,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setMessageBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
message_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -753,7 +725,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new LocalizedMessage(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/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java b/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java
index 6de4318..31417df 100644
--- a/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java
+++ b/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface LocalizedMessageOrBuilder extends
diff --git a/src/main/java/com/google/rpc/PreconditionFailure.java b/src/main/java/com/google/rpc/PreconditionFailure.java
index 74e1fd5..234c50a 100644
--- a/src/main/java/com/google/rpc/PreconditionFailure.java
+++ b/src/main/java/com/google/rpc/PreconditionFailure.java
@@ -1,11 +1,13 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
*
* Describes what preconditions have failed.
+ *
* For example, if an RPC failed because it required the Terms of Service to be
* acknowledged, it could list the terms of service violation in the
* PreconditionFailure message.
@@ -33,61 +35,6 @@ private static final long serialVersionUID = 0L;
return new PreconditionFailure();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private PreconditionFailure(
- 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)) {
- violations_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- violations_.add(
- input.readMessage(com.google.rpc.PreconditionFailure.Violation.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- violations_ = java.util.Collections.unmodifiableList(violations_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_descriptor;
@@ -157,6 +104,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -168,6 +116,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -206,66 +155,6 @@ private static final long serialVersionUID = 0L;
return new Violation();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Violation(
- 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();
-
- type_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- subject_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_descriptor;
@@ -280,7 +169,8 @@ private static final long serialVersionUID = 0L;
}
public static final int TYPE_FIELD_NUMBER = 1;
- private volatile java.lang.Object type_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object type_ = "";
/**
*
* The type of PreconditionFailure. We recommend using a service-specific
@@ -330,7 +220,8 @@ private static final long serialVersionUID = 0L;
}
public static final int SUBJECT_FIELD_NUMBER = 2;
- private volatile java.lang.Object subject_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object subject_ = "";
/**
*
* The subject, relative to the type, that failed.
@@ -380,11 +271,13 @@ private static final long serialVersionUID = 0L;
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -408,6 +301,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -443,16 +337,16 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
}
- if (!getSubjectBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subject_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -461,16 +355,16 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
}
- if (!getSubjectBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subject_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -491,7 +385,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getSubject())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -508,7 +402,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getSubject().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -557,11 +451,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.PreconditionFailure.Violation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.PreconditionFailure.Violation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -629,28 +525,21 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.PreconditionFailure.Violation.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
type_ = "";
-
subject_ = "";
-
description_ = "";
-
return this;
}
@@ -677,13 +566,24 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.PreconditionFailure.Violation buildPartial() {
com.google.rpc.PreconditionFailure.Violation result = new com.google.rpc.PreconditionFailure.Violation(this);
- result.type_ = type_;
- result.subject_ = subject_;
- result.description_ = description_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.PreconditionFailure.Violation result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.type_ = type_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.subject_ = subject_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -730,17 +630,20 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.PreconditionFailure.Violation.getDefaultInstance()) return this;
if (!other.getType().isEmpty()) {
type_ = other.type_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSubject().isEmpty()) {
subject_ = other.subject_;
+ bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000004;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -755,19 +658,48 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.PreconditionFailure.Violation 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: {
+ type_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ subject_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000004;
+ 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.rpc.PreconditionFailure.Violation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object type_ = "";
/**
@@ -828,11 +760,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setType(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
type_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -847,8 +777,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearType() {
-
type_ = getDefaultInstance().getType();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -865,12 +795,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
type_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -934,11 +862,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSubject(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
subject_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -953,8 +879,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearSubject() {
-
subject_ = getDefaultInstance().getSubject();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -971,12 +897,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
subject_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -986,6 +910,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -1008,6 +933,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -1031,6 +957,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -1040,11 +967,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1052,6 +977,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -1059,8 +985,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
@@ -1068,6 +994,7 @@ private static final long serialVersionUID = 0L;
*
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
+ *
* For example: "Terms of service not accepted".
*
*
@@ -1077,12 +1004,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1119,7 +1044,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Violation(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();
}
};
@@ -1140,6 +1076,7 @@ private static final long serialVersionUID = 0L;
}
public static final int VIOLATIONS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List violations_;
/**
*
@@ -1216,7 +1153,7 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < violations_.size(); i++) {
output.writeMessage(1, violations_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1229,7 +1166,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, violations_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1246,7 +1183,7 @@ private static final long serialVersionUID = 0L;
if (!getViolationsList()
.equals(other.getViolationsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1261,7 +1198,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + getViolationsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1310,11 +1247,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.PreconditionFailure parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.PreconditionFailure parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1359,6 +1298,7 @@ private static final long serialVersionUID = 0L;
/**
*
* Describes what preconditions have failed.
+ *
* For example, if an RPC failed because it required the Terms of Service to be
* acknowledged, it could list the terms of service violation in the
* PreconditionFailure message.
@@ -1385,29 +1325,25 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.PreconditionFailure.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getViolationsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (violationsBuilder_ == null) {
violations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ violations_ = null;
violationsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1434,7 +1370,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.PreconditionFailure buildPartial() {
com.google.rpc.PreconditionFailure result = new com.google.rpc.PreconditionFailure(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.rpc.PreconditionFailure result) {
if (violationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
violations_ = java.util.Collections.unmodifiableList(violations_);
@@ -1444,8 +1386,10 @@ private static final long serialVersionUID = 0L;
} else {
result.violations_ = violationsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.rpc.PreconditionFailure result) {
+ int from_bitField0_ = bitField0_;
}
@java.lang.Override
@@ -1518,7 +1462,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1533,17 +1477,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.PreconditionFailure 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.rpc.PreconditionFailure.Violation m =
+ input.readMessage(
+ com.google.rpc.PreconditionFailure.Violation.parser(),
+ extensionRegistry);
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.add(m);
+ } else {
+ violationsBuilder_.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.rpc.PreconditionFailure) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -1892,7 +1862,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new PreconditionFailure(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/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java b/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java
index d128a3f..368a0a3 100644
--- a/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java
+++ b/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface PreconditionFailureOrBuilder extends
diff --git a/src/main/java/com/google/rpc/QuotaFailure.java b/src/main/java/com/google/rpc/QuotaFailure.java
index 61ba732..b0907b7 100644
--- a/src/main/java/com/google/rpc/QuotaFailure.java
+++ b/src/main/java/com/google/rpc/QuotaFailure.java
@@ -1,17 +1,20 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
*
* Describes how a quota check failed.
+ *
* For example if a daily limit was exceeded for the calling project,
* a service could respond with a QuotaFailure detail containing the project
* id and the description of the quota limit that was exceeded. If the
* calling project hasn't enabled the service in the developer console, then
* a service could respond with the project id and set `service_disabled`
* to true.
+ *
* Also see RetryDetail and Help types for other details about handling a
* quota failure.
*
@@ -38,61 +41,6 @@ private static final long serialVersionUID = 0L;
return new QuotaFailure();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private QuotaFailure(
- 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)) {
- violations_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- violations_.add(
- input.readMessage(com.google.rpc.QuotaFailure.Violation.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- violations_ = java.util.Collections.unmodifiableList(violations_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor;
@@ -140,6 +88,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -154,6 +103,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -193,60 +143,6 @@ private static final long serialVersionUID = 0L;
return new Violation();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Violation(
- 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();
-
- subject_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor;
@@ -261,7 +157,8 @@ private static final long serialVersionUID = 0L;
}
public static final int SUBJECT_FIELD_NUMBER = 1;
- private volatile java.lang.Object subject_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object subject_ = "";
/**
*
* The subject on which the quota check failed.
@@ -311,13 +208,15 @@ private static final long serialVersionUID = 0L;
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* A description of how the quota check failed. Clients can use this
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -344,6 +243,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -380,13 +280,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getSubjectBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subject_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -395,13 +295,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getSubjectBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subject_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -420,7 +320,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getSubject())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -435,7 +335,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getSubject().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -484,11 +384,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -557,26 +459,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.QuotaFailure.Violation.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
subject_ = "";
-
description_ = "";
-
return this;
}
@@ -603,12 +499,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.QuotaFailure.Violation buildPartial() {
com.google.rpc.QuotaFailure.Violation result = new com.google.rpc.QuotaFailure.Violation(this);
- result.subject_ = subject_;
- result.description_ = description_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.QuotaFailure.Violation result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.subject_ = subject_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -655,13 +560,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.QuotaFailure.Violation.getDefaultInstance()) return this;
if (!other.getSubject().isEmpty()) {
subject_ = other.subject_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -676,19 +583,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.QuotaFailure.Violation 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: {
+ subject_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.QuotaFailure.Violation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object subject_ = "";
/**
@@ -749,11 +680,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSubject(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
subject_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -768,8 +697,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearSubject() {
-
subject_ = getDefaultInstance().getSubject();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -786,12 +715,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
subject_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -803,6 +730,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -828,6 +756,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -854,6 +783,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -864,11 +794,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -878,6 +806,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -886,8 +815,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -897,6 +826,7 @@ private static final long serialVersionUID = 0L;
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
+ *
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
@@ -907,12 +837,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -949,7 +877,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Violation(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();
}
};
@@ -970,6 +909,7 @@ private static final long serialVersionUID = 0L;
}
public static final int VIOLATIONS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List violations_;
/**
*
@@ -1046,7 +986,7 @@ private static final long serialVersionUID = 0L;
for (int i = 0; i < violations_.size(); i++) {
output.writeMessage(1, violations_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1059,7 +999,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, violations_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1076,7 +1016,7 @@ private static final long serialVersionUID = 0L;
if (!getViolationsList()
.equals(other.getViolationsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1091,7 +1031,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + getViolationsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1140,11 +1080,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.QuotaFailure parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.QuotaFailure parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1189,12 +1131,14 @@ private static final long serialVersionUID = 0L;
/**
*
* Describes how a quota check failed.
+ *
* For example if a daily limit was exceeded for the calling project,
* a service could respond with a QuotaFailure detail containing the project
* id and the description of the quota limit that was exceeded. If the
* calling project hasn't enabled the service in the developer console, then
* a service could respond with the project id and set `service_disabled`
* to true.
+ *
* Also see RetryDetail and Help types for other details about handling a
* quota failure.
*
@@ -1220,29 +1164,25 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.QuotaFailure.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getViolationsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (violationsBuilder_ == null) {
violations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ violations_ = null;
violationsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1269,7 +1209,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.QuotaFailure buildPartial() {
com.google.rpc.QuotaFailure result = new com.google.rpc.QuotaFailure(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.rpc.QuotaFailure result) {
if (violationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
violations_ = java.util.Collections.unmodifiableList(violations_);
@@ -1279,8 +1225,10 @@ private static final long serialVersionUID = 0L;
} else {
result.violations_ = violationsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.rpc.QuotaFailure result) {
+ int from_bitField0_ = bitField0_;
}
@java.lang.Override
@@ -1353,7 +1301,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1368,17 +1316,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.QuotaFailure 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.rpc.QuotaFailure.Violation m =
+ input.readMessage(
+ com.google.rpc.QuotaFailure.Violation.parser(),
+ extensionRegistry);
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.add(m);
+ } else {
+ violationsBuilder_.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.rpc.QuotaFailure) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -1727,7 +1701,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new QuotaFailure(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/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java b/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java
index 1c063e4..2f0ea20 100644
--- a/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java
+++ b/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface QuotaFailureOrBuilder extends
diff --git a/src/main/java/com/google/rpc/RequestInfo.java b/src/main/java/com/google/rpc/RequestInfo.java
index 7148f51..723a4ec 100644
--- a/src/main/java/com/google/rpc/RequestInfo.java
+++ b/src/main/java/com/google/rpc/RequestInfo.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -32,60 +33,6 @@ private static final long serialVersionUID = 0L;
return new RequestInfo();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private RequestInfo(
- 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();
-
- requestId_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- servingData_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor;
@@ -100,7 +47,8 @@ private static final long serialVersionUID = 0L;
}
public static final int REQUEST_ID_FIELD_NUMBER = 1;
- private volatile java.lang.Object requestId_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object requestId_ = "";
/**
*
* An opaque string that should only be interpreted by the service generating
@@ -148,7 +96,8 @@ private static final long serialVersionUID = 0L;
}
public static final int SERVING_DATA_FIELD_NUMBER = 2;
- private volatile java.lang.Object servingData_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object servingData_ = "";
/**
*
* Any data that was used to serve this request. For example, an encrypted
@@ -209,13 +158,13 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getRequestIdBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_);
}
- if (!getServingDataBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingData_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, servingData_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -224,13 +173,13 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getRequestIdBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_);
}
- if (!getServingDataBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingData_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, servingData_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -249,7 +198,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getRequestId())) return false;
if (!getServingData()
.equals(other.getServingData())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -264,7 +213,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getRequestId().hashCode();
hash = (37 * hash) + SERVING_DATA_FIELD_NUMBER;
hash = (53 * hash) + getServingData().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -313,11 +262,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.RequestInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.RequestInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -386,26 +337,20 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.RequestInfo.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
requestId_ = "";
-
servingData_ = "";
-
return this;
}
@@ -432,12 +377,21 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.RequestInfo buildPartial() {
com.google.rpc.RequestInfo result = new com.google.rpc.RequestInfo(this);
- result.requestId_ = requestId_;
- result.servingData_ = servingData_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.RequestInfo result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.requestId_ = requestId_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.servingData_ = servingData_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -484,13 +438,15 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.RequestInfo.getDefaultInstance()) return this;
if (!other.getRequestId().isEmpty()) {
requestId_ = other.requestId_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getServingData().isEmpty()) {
servingData_ = other.servingData_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -505,19 +461,43 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.RequestInfo 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: {
+ requestId_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ servingData_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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.rpc.RequestInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object requestId_ = "";
/**
@@ -575,11 +555,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setRequestId(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
requestId_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -593,8 +571,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearRequestId() {
-
requestId_ = getDefaultInstance().getRequestId();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -610,12 +588,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setRequestIdBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
requestId_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -676,11 +652,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setServingData(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
servingData_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -694,8 +668,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearServingData() {
-
servingData_ = getDefaultInstance().getServingData();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -711,12 +685,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setServingDataBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
servingData_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -753,7 +725,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new RequestInfo(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/src/main/java/com/google/rpc/RequestInfoOrBuilder.java b/src/main/java/com/google/rpc/RequestInfoOrBuilder.java
index 764a49c..5879361 100644
--- a/src/main/java/com/google/rpc/RequestInfoOrBuilder.java
+++ b/src/main/java/com/google/rpc/RequestInfoOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface RequestInfoOrBuilder extends
diff --git a/src/main/java/com/google/rpc/ResourceInfo.java b/src/main/java/com/google/rpc/ResourceInfo.java
index f0b6552..798ab3f 100644
--- a/src/main/java/com/google/rpc/ResourceInfo.java
+++ b/src/main/java/com/google/rpc/ResourceInfo.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -33,72 +34,6 @@ private static final long serialVersionUID = 0L;
return new ResourceInfo();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ResourceInfo(
- 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();
-
- resourceType_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- resourceName_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- owner_ = s;
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor;
@@ -113,7 +48,8 @@ private static final long serialVersionUID = 0L;
}
public static final int RESOURCE_TYPE_FIELD_NUMBER = 1;
- private volatile java.lang.Object resourceType_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object resourceType_ = "";
/**
*
* A name for the type of resource being accessed, e.g. "sql table",
@@ -163,7 +99,8 @@ private static final long serialVersionUID = 0L;
}
public static final int RESOURCE_NAME_FIELD_NUMBER = 2;
- private volatile java.lang.Object resourceName_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object resourceName_ = "";
/**
*
* The name of the resource being accessed. For example, a shared calendar
@@ -213,7 +150,8 @@ private static final long serialVersionUID = 0L;
}
public static final int OWNER_FIELD_NUMBER = 3;
- private volatile java.lang.Object owner_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object owner_ = "";
/**
*
* The owner of the resource (optional).
@@ -263,7 +201,8 @@ private static final long serialVersionUID = 0L;
}
public static final int DESCRIPTION_FIELD_NUMBER = 4;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* Describes what error is encountered when accessing this resource.
@@ -326,19 +265,19 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getResourceTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceType_);
}
- if (!getResourceNameBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_);
}
- if (!getOwnerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -347,19 +286,19 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (!getResourceTypeBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceType_);
}
- if (!getResourceNameBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_);
}
- if (!getOwnerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -382,7 +321,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getOwner())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -401,7 +340,7 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getOwner().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -450,11 +389,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.ResourceInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.ResourceInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -522,30 +463,22 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.ResourceInfo.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
resourceType_ = "";
-
resourceName_ = "";
-
owner_ = "";
-
description_ = "";
-
return this;
}
@@ -572,14 +505,27 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.ResourceInfo buildPartial() {
com.google.rpc.ResourceInfo result = new com.google.rpc.ResourceInfo(this);
- result.resourceType_ = resourceType_;
- result.resourceName_ = resourceName_;
- result.owner_ = owner_;
- result.description_ = description_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.ResourceInfo result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.resourceType_ = resourceType_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.resourceName_ = resourceName_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.owner_ = owner_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -626,21 +572,25 @@ private static final long serialVersionUID = 0L;
if (other == com.google.rpc.ResourceInfo.getDefaultInstance()) return this;
if (!other.getResourceType().isEmpty()) {
resourceType_ = other.resourceType_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getResourceName().isEmpty()) {
resourceName_ = other.resourceName_;
+ bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getOwner().isEmpty()) {
owner_ = other.owner_;
+ bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000008;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -655,19 +605,53 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.ResourceInfo 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: {
+ resourceType_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ resourceName_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ owner_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000008;
+ 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.rpc.ResourceInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object resourceType_ = "";
/**
@@ -728,11 +712,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResourceType(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
resourceType_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -747,8 +729,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearResourceType() {
-
resourceType_ = getDefaultInstance().getResourceType();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -765,12 +747,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResourceTypeBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
resourceType_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -834,11 +814,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResourceName(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
resourceName_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -853,8 +831,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearResourceName() {
-
resourceName_ = getDefaultInstance().getResourceName();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -871,12 +849,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setResourceNameBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
resourceName_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -940,11 +916,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setOwner(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
owner_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -959,8 +933,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearOwner() {
-
owner_ = getDefaultInstance().getOwner();
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
@@ -977,12 +951,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setOwnerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
owner_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1046,11 +1018,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1065,8 +1035,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
@@ -1083,12 +1053,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1125,7 +1093,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ResourceInfo(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/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java b/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java
index 9ffd08f..a59cd86 100644
--- a/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java
+++ b/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface ResourceInfoOrBuilder extends
diff --git a/src/main/java/com/google/rpc/RetryInfo.java b/src/main/java/com/google/rpc/RetryInfo.java
index 78fb78f..77a957e 100644
--- a/src/main/java/com/google/rpc/RetryInfo.java
+++ b/src/main/java/com/google/rpc/RetryInfo.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -8,8 +9,10 @@ package com.google.rpc;
* Describes when the clients can retry a failed request. Clients could ignore
* the recommendation here or retry when this information is missing from error
* responses.
+ *
* It's always recommended that clients should use exponential backoff when
* retrying.
+ *
* Clients should wait until `retry_delay` amount of time has passed since
* receiving the error response before retrying. If retrying requests also
* fail, clients should use an exponential backoff scheme to gradually increase
@@ -39,61 +42,6 @@ private static final long serialVersionUID = 0L;
return new RetryInfo();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private RetryInfo(
- 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.Duration.Builder subBuilder = null;
- if (retryDelay_ != null) {
- subBuilder = retryDelay_.toBuilder();
- }
- retryDelay_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(retryDelay_);
- retryDelay_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor;
@@ -107,6 +55,7 @@ private static final long serialVersionUID = 0L;
com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class);
}
+ private int bitField0_;
public static final int RETRY_DELAY_FIELD_NUMBER = 1;
private com.google.protobuf.Duration retryDelay_;
/**
@@ -119,7 +68,7 @@ private static final long serialVersionUID = 0L;
*/
@java.lang.Override
public boolean hasRetryDelay() {
- return retryDelay_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -142,7 +91,7 @@ private static final long serialVersionUID = 0L;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() {
- return getRetryDelay();
+ return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_;
}
private byte memoizedIsInitialized = -1;
@@ -159,10 +108,10 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (retryDelay_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getRetryDelay());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -171,11 +120,11 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (retryDelay_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getRetryDelay());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -195,7 +144,7 @@ private static final long serialVersionUID = 0L;
if (!getRetryDelay()
.equals(other.getRetryDelay())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -210,7 +159,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + RETRY_DELAY_FIELD_NUMBER;
hash = (53 * hash) + getRetryDelay().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -259,11 +208,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.RetryInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.RetryInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -310,8 +261,10 @@ private static final long serialVersionUID = 0L;
* Describes when the clients can retry a failed request. Clients could ignore
* the recommendation here or retry when this information is missing from error
* responses.
+ *
* It's always recommended that clients should use exponential backoff when
* retrying.
+ *
* Clients should wait until `retry_delay` amount of time has passed since
* receiving the error response before retrying. If retrying requests also
* fail, clients should use an exponential backoff scheme to gradually increase
@@ -352,15 +305,16 @@ private static final long serialVersionUID = 0L;
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
+ getRetryDelayFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
- if (retryDelayBuilder_ == null) {
- retryDelay_ = null;
- } else {
- retryDelay_ = null;
+ bitField0_ = 0;
+ retryDelay_ = null;
+ if (retryDelayBuilder_ != null) {
+ retryDelayBuilder_.dispose();
retryDelayBuilder_ = null;
}
return this;
@@ -389,15 +343,23 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.RetryInfo buildPartial() {
com.google.rpc.RetryInfo result = new com.google.rpc.RetryInfo(this);
- if (retryDelayBuilder_ == null) {
- result.retryDelay_ = retryDelay_;
- } else {
- result.retryDelay_ = retryDelayBuilder_.build();
- }
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(com.google.rpc.RetryInfo result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.retryDelay_ = retryDelayBuilder_ == null
+ ? retryDelay_
+ : retryDelayBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -445,7 +407,7 @@ private static final long serialVersionUID = 0L;
if (other.hasRetryDelay()) {
mergeRetryDelay(other.getRetryDelay());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -460,19 +422,40 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.RetryInfo 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(
+ getRetryDelayFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ 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.rpc.RetryInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.Duration retryDelay_;
private com.google.protobuf.SingleFieldBuilderV3<
@@ -486,7 +469,7 @@ private static final long serialVersionUID = 0L;
* @return Whether the retryDelay field is set.
*/
public boolean hasRetryDelay() {
- return retryDelayBuilder_ != null || retryDelay_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -516,11 +499,11 @@ private static final long serialVersionUID = 0L;
throw new NullPointerException();
}
retryDelay_ = value;
- onChanged();
} else {
retryDelayBuilder_.setMessage(value);
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -534,11 +517,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.Duration.Builder builderForValue) {
if (retryDelayBuilder_ == null) {
retryDelay_ = builderForValue.build();
- onChanged();
} else {
retryDelayBuilder_.setMessage(builderForValue.build());
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -550,17 +533,20 @@ private static final long serialVersionUID = 0L;
*/
public Builder mergeRetryDelay(com.google.protobuf.Duration value) {
if (retryDelayBuilder_ == null) {
- if (retryDelay_ != null) {
- retryDelay_ =
- com.google.protobuf.Duration.newBuilder(retryDelay_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000001) != 0) &&
+ retryDelay_ != null &&
+ retryDelay_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getRetryDelayBuilder().mergeFrom(value);
} else {
retryDelay_ = value;
}
- onChanged();
} else {
retryDelayBuilder_.mergeFrom(value);
}
-
+ if (retryDelay_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
return this;
}
/**
@@ -571,14 +557,13 @@ private static final long serialVersionUID = 0L;
* .google.protobuf.Duration retry_delay = 1;
*/
public Builder clearRetryDelay() {
- if (retryDelayBuilder_ == null) {
- retryDelay_ = null;
- onChanged();
- } else {
- retryDelay_ = null;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ retryDelay_ = null;
+ if (retryDelayBuilder_ != null) {
+ retryDelayBuilder_.dispose();
retryDelayBuilder_ = null;
}
-
+ onChanged();
return this;
}
/**
@@ -589,7 +574,7 @@ private static final long serialVersionUID = 0L;
* .google.protobuf.Duration retry_delay = 1;
*/
public com.google.protobuf.Duration.Builder getRetryDelayBuilder() {
-
+ bitField0_ |= 0x00000001;
onChanged();
return getRetryDelayFieldBuilder().getBuilder();
}
@@ -661,7 +646,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new RetryInfo(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/src/main/java/com/google/rpc/RetryInfoOrBuilder.java b/src/main/java/com/google/rpc/RetryInfoOrBuilder.java
index 2350a0b..e2a21d9 100644
--- a/src/main/java/com/google/rpc/RetryInfoOrBuilder.java
+++ b/src/main/java/com/google/rpc/RetryInfoOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/error_details.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface RetryInfoOrBuilder extends
diff --git a/src/main/java/com/google/rpc/Status.java b/src/main/java/com/google/rpc/Status.java
index b9e0bba..f82a09e 100644
--- a/src/main/java/com/google/rpc/Status.java
+++ b/src/main/java/com/google/rpc/Status.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/status.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
/**
@@ -8,9 +9,12 @@ package com.google.rpc;
* The `Status` type defines a logical error model that is suitable for different
* programming environments, including REST APIs and RPC APIs. It is used by
* [gRPC](https://github.com/grpc). The error model is designed to be:
+ *
* - Simple to use and understand for most users
* - Flexible enough to meet unexpected needs
+ *
* # Overview
+ *
* The `Status` message contains three pieces of data: error code, error message,
* and error details. The error code should be an enum value of
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
@@ -20,28 +24,38 @@ package com.google.rpc;
* localize it in the client. The optional error details may contain arbitrary
* information about the error. There is a predefined set of error detail types
* in the package `google.rpc` that can be used for common error conditions.
+ *
* # Language mapping
+ *
* The `Status` message is the logical representation of the error model, but it
* is not necessarily the actual wire format. When the `Status` message is
* exposed in different client libraries and different wire protocols, it can be
* mapped differently. For example, it will likely be mapped to some exceptions
* in Java, but more likely mapped to some error codes in C.
+ *
* # Other uses
+ *
* The error model and the `Status` message can be used in a variety of
* environments, either with or without APIs, to provide a
* consistent developer experience across different environments.
+ *
* Example uses of this error model include:
+ *
* - Partial errors. If a service needs to return partial errors to the client,
* it may embed the `Status` in the normal response to indicate the partial
* errors.
+ *
* - Workflow errors. A typical workflow has multiple steps. Each step may
* have a `Status` message for error reporting.
+ *
* - Batch operations. If a client uses batch request and batch response, the
* `Status` message should be used directly inside batch response, one for
* each error sub-response.
+ *
* - Asynchronous operations. If an API call embeds asynchronous operation
* results in its response, the status of those operations should be
* represented directly using the `Status` message.
+ *
* - Logging. If some API errors are stored in logs, the message `Status` could
* be used directly after any stripping needed for security/privacy reasons.
*
@@ -69,72 +83,6 @@ private static final long serialVersionUID = 0L;
return new Status();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Status(
- 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 8: {
-
- code_ = input.readInt32();
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- message_ = s;
- break;
- }
- case 26: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- details_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- details_.add(
- input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- details_ = java.util.Collections.unmodifiableList(details_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor;
@@ -149,7 +97,7 @@ private static final long serialVersionUID = 0L;
}
public static final int CODE_FIELD_NUMBER = 1;
- private int code_;
+ private int code_ = 0;
/**
*
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
@@ -164,7 +112,8 @@ private static final long serialVersionUID = 0L;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
- private volatile java.lang.Object message_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object message_ = "";
/**
*
* A developer-facing error message, which should be in English. Any
@@ -214,6 +163,7 @@ private static final long serialVersionUID = 0L;
}
public static final int DETAILS_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
private java.util.List details_;
/**
*
@@ -295,13 +245,13 @@ private static final long serialVersionUID = 0L;
if (code_ != 0) {
output.writeInt32(1, code_);
}
- if (!getMessageBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
}
for (int i = 0; i < details_.size(); i++) {
output.writeMessage(3, details_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -314,14 +264,14 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, code_);
}
- if (!getMessageBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
}
for (int i = 0; i < details_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, details_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -342,7 +292,7 @@ private static final long serialVersionUID = 0L;
.equals(other.getMessage())) return false;
if (!getDetailsList()
.equals(other.getDetailsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -361,7 +311,7 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getDetailsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -410,11 +360,13 @@ private static final long serialVersionUID = 0L;
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static com.google.rpc.Status parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static com.google.rpc.Status parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -461,9 +413,12 @@ private static final long serialVersionUID = 0L;
* The `Status` type defines a logical error model that is suitable for different
* programming environments, including REST APIs and RPC APIs. It is used by
* [gRPC](https://github.com/grpc). The error model is designed to be:
+ *
* - Simple to use and understand for most users
* - Flexible enough to meet unexpected needs
+ *
* # Overview
+ *
* The `Status` message contains three pieces of data: error code, error message,
* and error details. The error code should be an enum value of
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
@@ -473,28 +428,38 @@ private static final long serialVersionUID = 0L;
* localize it in the client. The optional error details may contain arbitrary
* information about the error. There is a predefined set of error detail types
* in the package `google.rpc` that can be used for common error conditions.
+ *
* # Language mapping
+ *
* The `Status` message is the logical representation of the error model, but it
* is not necessarily the actual wire format. When the `Status` message is
* exposed in different client libraries and different wire protocols, it can be
* mapped differently. For example, it will likely be mapped to some exceptions
* in Java, but more likely mapped to some error codes in C.
+ *
* # Other uses
+ *
* The error model and the `Status` message can be used in a variety of
* environments, either with or without APIs, to provide a
* consistent developer experience across different environments.
+ *
* Example uses of this error model include:
+ *
* - Partial errors. If a service needs to return partial errors to the client,
* it may embed the `Status` in the normal response to indicate the partial
* errors.
+ *
* - Workflow errors. A typical workflow has multiple steps. Each step may
* have a `Status` message for error reporting.
+ *
* - Batch operations. If a client uses batch request and batch response, the
* `Status` message should be used directly inside batch response, one for
* each error sub-response.
+ *
* - Asynchronous operations. If an API call embeds asynchronous operation
* results in its response, the status of those operations should be
* represented directly using the `Status` message.
+ *
* - Logging. If some API errors are stored in logs, the message `Status` could
* be used directly after any stripping needed for security/privacy reasons.
*
@@ -520,33 +485,27 @@ private static final long serialVersionUID = 0L;
// Construct using com.google.rpc.Status.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getDetailsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
code_ = 0;
-
message_ = "";
-
if (detailsBuilder_ == null) {
details_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ details_ = null;
detailsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@@ -573,20 +532,32 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.rpc.Status buildPartial() {
com.google.rpc.Status result = new com.google.rpc.Status(this);
- int from_bitField0_ = bitField0_;
- result.code_ = code_;
- result.message_ = message_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.rpc.Status result) {
if (detailsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000004) != 0)) {
details_ = java.util.Collections.unmodifiableList(details_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
}
result.details_ = details_;
} else {
result.details_ = detailsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(com.google.rpc.Status result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.code_ = code_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.message_ = message_;
+ }
}
@java.lang.Override
@@ -638,13 +609,14 @@ private static final long serialVersionUID = 0L;
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
+ bitField0_ |= 0x00000002;
onChanged();
}
if (detailsBuilder_ == null) {
if (!other.details_.isEmpty()) {
if (details_.isEmpty()) {
details_ = other.details_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureDetailsIsMutable();
details_.addAll(other.details_);
@@ -657,7 +629,7 @@ private static final long serialVersionUID = 0L;
detailsBuilder_.dispose();
detailsBuilder_ = null;
details_ = other.details_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
detailsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDetailsFieldBuilder() : null;
@@ -666,7 +638,7 @@ private static final long serialVersionUID = 0L;
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -681,17 +653,53 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.rpc.Status 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: {
+ code_ = input.readInt32();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18: {
+ message_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ com.google.protobuf.Any m =
+ input.readMessage(
+ com.google.protobuf.Any.parser(),
+ extensionRegistry);
+ if (detailsBuilder_ == null) {
+ ensureDetailsIsMutable();
+ details_.add(m);
+ } else {
+ detailsBuilder_.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.rpc.Status) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -719,8 +727,9 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder setCode(int value) {
-
+
code_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -733,7 +742,7 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearCode() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
code_ = 0;
onChanged();
return this;
@@ -798,11 +807,9 @@ private static final long serialVersionUID = 0L;
*/
public Builder setMessage(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
message_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -817,8 +824,8 @@ private static final long serialVersionUID = 0L;
* @return This builder for chaining.
*/
public Builder clearMessage() {
-
message_ = getDefaultInstance().getMessage();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -835,12 +842,10 @@ private static final long serialVersionUID = 0L;
*/
public Builder setMessageBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
message_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -848,9 +853,9 @@ private static final long serialVersionUID = 0L;
private java.util.List details_ =
java.util.Collections.emptyList();
private void ensureDetailsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!((bitField0_ & 0x00000004) != 0)) {
details_ = new java.util.ArrayList(details_);
- bitField0_ |= 0x00000001;
+ bitField0_ |= 0x00000004;
}
}
@@ -1055,7 +1060,7 @@ private static final long serialVersionUID = 0L;
public Builder clearDetails() {
if (detailsBuilder_ == null) {
details_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
detailsBuilder_.clear();
@@ -1167,7 +1172,7 @@ private static final long serialVersionUID = 0L;
detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
details_,
- ((bitField0_ & 0x00000001) != 0),
+ ((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
details_ = null;
@@ -1207,7 +1212,18 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Status(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/src/main/java/com/google/rpc/StatusOrBuilder.java b/src/main/java/com/google/rpc/StatusOrBuilder.java
index 0a5c580..38b076f 100644
--- a/src/main/java/com/google/rpc/StatusOrBuilder.java
+++ b/src/main/java/com/google/rpc/StatusOrBuilder.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/status.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public interface StatusOrBuilder extends
diff --git a/src/main/java/com/google/rpc/StatusProto.java b/src/main/java/com/google/rpc/StatusProto.java
index 4cd63b9..6b8eaa6 100644
--- a/src/main/java/com/google/rpc/StatusProto.java
+++ b/src/main/java/com/google/rpc/StatusProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/rpc/status.proto
+// Protobuf Java Version: 3.25.6
package com.google.rpc;
public final class StatusProto {
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java
index 58bc6be..c8d8dd8 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdware/bdledger/api/common.proto
+// Protobuf Java Version: 3.25.6
package org.bdware.bdledger.api.grpc.pb;
public final class CommonProto {
@@ -357,109 +358,6 @@ public final class CommonProto {
return new Transaction();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Transaction(
- 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: {
-
- blockHash_ = input.readBytes();
- break;
- }
- case 16: {
-
- blockTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- index_ = input.readUInt32();
- break;
- }
- case 34: {
-
- hash_ = input.readBytes();
- break;
- }
- case 40: {
- int rawValue = input.readEnum();
-
- type_ = rawValue;
- break;
- }
- case 50: {
-
- from_ = input.readBytes();
- break;
- }
- case 56: {
-
- nonce_ = input.readUInt64();
- break;
- }
- case 66: {
-
- to_ = input.readBytes();
- break;
- }
- case 74: {
-
- data_ = input.readBytes();
- break;
- }
- case 82: {
-
- v_ = input.readBytes();
- break;
- }
- case 90: {
-
- r_ = input.readBytes();
- break;
- }
- case 98: {
-
- s_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_descriptor;
@@ -474,7 +372,7 @@ public final class CommonProto {
}
public static final int BLOCK_HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString blockHash_;
+ private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 事务所在的区块的哈希,当事务处于待确认状态时为`null`
@@ -489,7 +387,7 @@ public final class CommonProto {
}
public static final int BLOCK_TIMESTAMP_FIELD_NUMBER = 2;
- private long blockTimestamp_;
+ private long blockTimestamp_ = 0L;
/**
*
* 事务所在的区块产生时的 UNIX 时间戳,单位为秒
@@ -504,7 +402,7 @@ public final class CommonProto {
}
public static final int INDEX_FIELD_NUMBER = 3;
- private int index_;
+ private int index_ = 0;
/**
*
* 事务在区块中的位置 index,当事务处于待确认状态时为`null`
@@ -519,7 +417,7 @@ public final class CommonProto {
}
public static final int HASH_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 事务的哈希
@@ -534,7 +432,7 @@ public final class CommonProto {
}
public static final int TYPE_FIELD_NUMBER = 5;
- private int type_;
+ private int type_ = 0;
/**
*
* 事务类型
@@ -555,13 +453,12 @@ public final class CommonProto {
* @return The type.
*/
@java.lang.Override public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.valueOf(type_);
+ org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
}
public static final int FROM_FIELD_NUMBER = 6;
- private com.google.protobuf.ByteString from_;
+ private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 发送账户地址
@@ -576,7 +473,7 @@ public final class CommonProto {
}
public static final int NONCE_FIELD_NUMBER = 7;
- private long nonce_;
+ private long nonce_ = 0L;
/**
*
* 这条事务之前发送者所发送的事务数量
@@ -591,7 +488,7 @@ public final class CommonProto {
}
public static final int TO_FIELD_NUMBER = 8;
- private com.google.protobuf.ByteString to_;
+ private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
@@ -606,7 +503,7 @@ public final class CommonProto {
}
public static final int DATA_FIELD_NUMBER = 9;
- private com.google.protobuf.ByteString data_;
+ private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 数据或合约代码
@@ -621,7 +518,7 @@ public final class CommonProto {
}
public static final int V_FIELD_NUMBER = 10;
- private com.google.protobuf.ByteString v_;
+ private com.google.protobuf.ByteString v_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* ECDSA recovery id
@@ -636,7 +533,7 @@ public final class CommonProto {
}
public static final int R_FIELD_NUMBER = 11;
- private com.google.protobuf.ByteString r_;
+ private com.google.protobuf.ByteString r_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* ECDSA signature r
@@ -651,7 +548,7 @@ public final class CommonProto {
}
public static final int S_FIELD_NUMBER = 12;
- private com.google.protobuf.ByteString s_;
+ private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* ECDSA signature s
@@ -715,7 +612,7 @@ public final class CommonProto {
if (!s_.isEmpty()) {
output.writeBytes(12, s_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -772,7 +669,7 @@ public final class CommonProto {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(12, s_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -810,7 +707,7 @@ public final class CommonProto {
.equals(other.getR())) return false;
if (!getS()
.equals(other.getS())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -847,7 +744,7 @@ public final class CommonProto {
hash = (53 * hash) + getR().hashCode();
hash = (37 * hash) + S_FIELD_NUMBER;
hash = (53 * hash) + getS().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -896,11 +793,13 @@ public final class CommonProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -964,46 +863,30 @@ public final class CommonProto {
// Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
blockHash_ = com.google.protobuf.ByteString.EMPTY;
-
blockTimestamp_ = 0L;
-
index_ = 0;
-
hash_ = com.google.protobuf.ByteString.EMPTY;
-
type_ = 0;
-
from_ = com.google.protobuf.ByteString.EMPTY;
-
nonce_ = 0L;
-
to_ = com.google.protobuf.ByteString.EMPTY;
-
data_ = com.google.protobuf.ByteString.EMPTY;
-
v_ = com.google.protobuf.ByteString.EMPTY;
-
r_ = com.google.protobuf.ByteString.EMPTY;
-
s_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -1030,22 +913,51 @@ public final class CommonProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction buildPartial() {
org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction(this);
- result.blockHash_ = blockHash_;
- result.blockTimestamp_ = blockTimestamp_;
- result.index_ = index_;
- result.hash_ = hash_;
- result.type_ = type_;
- result.from_ = from_;
- result.nonce_ = nonce_;
- result.to_ = to_;
- result.data_ = data_;
- result.v_ = v_;
- result.r_ = r_;
- result.s_ = s_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.blockHash_ = blockHash_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.blockTimestamp_ = blockTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.index_ = index_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.hash_ = hash_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.type_ = type_;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.from_ = from_;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.nonce_ = nonce_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.to_ = to_;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.data_ = data_;
+ }
+ if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.v_ = v_;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.r_ = r_;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.s_ = s_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -1126,7 +1038,7 @@ public final class CommonProto {
if (other.getS() != com.google.protobuf.ByteString.EMPTY) {
setS(other.getS());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1141,19 +1053,93 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction 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: {
+ blockHash_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ blockTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ index_ = input.readUInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 40: {
+ type_ = input.readEnum();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ case 50: {
+ from_ = input.readBytes();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 50
+ case 56: {
+ nonce_ = input.readUInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 66: {
+ to_ = input.readBytes();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 66
+ case 74: {
+ data_ = input.readBytes();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 74
+ case 82: {
+ v_ = input.readBytes();
+ bitField0_ |= 0x00000200;
+ break;
+ } // case 82
+ case 90: {
+ r_ = input.readBytes();
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 90
+ case 98: {
+ s_ = input.readBytes();
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 98
+ 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 = (org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
/**
@@ -1178,11 +1164,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setBlockHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
blockHash_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1195,7 +1179,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearBlockHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
blockHash_ = getDefaultInstance().getBlockHash();
onChanged();
return this;
@@ -1224,8 +1208,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setBlockTimestamp(long value) {
-
+
blockTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -1238,7 +1223,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearBlockTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
blockTimestamp_ = 0L;
onChanged();
return this;
@@ -1267,8 +1252,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setIndex(int value) {
-
+
index_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1281,7 +1267,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearIndex() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
index_ = 0;
onChanged();
return this;
@@ -1310,11 +1296,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1327,7 +1311,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000008);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -1355,8 +1339,8 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
-
type_ = value;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -1370,8 +1354,7 @@ public final class CommonProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.valueOf(type_);
+ org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
}
/**
@@ -1387,7 +1370,7 @@ public final class CommonProto {
if (value == null) {
throw new NullPointerException();
}
-
+ bitField0_ |= 0x00000010;
type_ = value.getNumber();
onChanged();
return this;
@@ -1401,7 +1384,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearType() {
-
+ bitField0_ = (bitField0_ & ~0x00000010);
type_ = 0;
onChanged();
return this;
@@ -1430,11 +1413,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setFrom(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
from_ = value;
+ bitField0_ |= 0x00000020;
onChanged();
return this;
}
@@ -1447,7 +1428,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearFrom() {
-
+ bitField0_ = (bitField0_ & ~0x00000020);
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
@@ -1476,8 +1457,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
-
+
nonce_ = value;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -1490,7 +1472,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearNonce() {
-
+ bitField0_ = (bitField0_ & ~0x00000040);
nonce_ = 0L;
onChanged();
return this;
@@ -1519,11 +1501,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setTo(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
to_ = value;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -1536,7 +1516,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearTo() {
-
+ bitField0_ = (bitField0_ & ~0x00000080);
to_ = getDefaultInstance().getTo();
onChanged();
return this;
@@ -1565,11 +1545,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
data_ = value;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -1582,7 +1560,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearData() {
-
+ bitField0_ = (bitField0_ & ~0x00000100);
data_ = getDefaultInstance().getData();
onChanged();
return this;
@@ -1611,11 +1589,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setV(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
v_ = value;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -1628,7 +1604,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearV() {
-
+ bitField0_ = (bitField0_ & ~0x00000200);
v_ = getDefaultInstance().getV();
onChanged();
return this;
@@ -1657,11 +1633,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setR(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
r_ = value;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -1674,7 +1648,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearR() {
-
+ bitField0_ = (bitField0_ & ~0x00000400);
r_ = getDefaultInstance().getR();
onChanged();
return this;
@@ -1703,11 +1677,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setS(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
s_ = value;
+ bitField0_ |= 0x00000800;
onChanged();
return this;
}
@@ -1720,7 +1692,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearS() {
-
+ bitField0_ = (bitField0_ & ~0x00000800);
s_ = getDefaultInstance().getS();
onChanged();
return this;
@@ -1758,7 +1730,18 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Transaction(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();
}
};
@@ -2037,13 +2020,13 @@ public final class CommonProto {
private Block() {
hash_ = com.google.protobuf.ByteString.EMPTY;
creator_ = com.google.protobuf.ByteString.EMPTY;
- parentHashes_ = java.util.Collections.emptyList();
- witnesses_ = java.util.Collections.emptyList();
+ parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
+ witnesses_ = emptyList(com.google.protobuf.ByteString.class);
transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
transactions_ = java.util.Collections.emptyList();
- transactionHashes_ = java.util.Collections.emptyList();
+ transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
- witnessSignatures_ = java.util.Collections.emptyList();
+ witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
}
@java.lang.Override
@@ -2053,145 +2036,6 @@ public final class CommonProto {
return new Block();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Block(
- 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: {
-
- hash_ = input.readBytes();
- break;
- }
- case 18: {
-
- creator_ = input.readBytes();
- break;
- }
- case 24: {
-
- nonce_ = input.readUInt64();
- break;
- }
- case 34: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- parentHashes_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- parentHashes_.add(input.readBytes());
- break;
- }
- case 42: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- witnesses_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000002;
- }
- witnesses_.add(input.readBytes());
- break;
- }
- case 48: {
-
- timestamp_ = input.readInt64();
- break;
- }
- case 56: {
-
- size_ = input.readUInt64();
- break;
- }
- case 64: {
-
- transactionCount_ = input.readUInt32();
- break;
- }
- case 74: {
-
- transactionsRoot_ = input.readBytes();
- break;
- }
- case 82: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- transactions_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000004;
- }
- transactions_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(), extensionRegistry));
- break;
- }
- case 90: {
- if (!((mutable_bitField0_ & 0x00000008) != 0)) {
- transactionHashes_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000008;
- }
- transactionHashes_.add(input.readBytes());
- break;
- }
- case 98: {
-
- creatorSignature_ = input.readBytes();
- break;
- }
- case 106: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- witnessSignatures_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000010;
- }
- witnessSignatures_.add(input.readBytes());
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- parentHashes_ = java.util.Collections.unmodifiableList(parentHashes_); // C
- }
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- witnesses_ = java.util.Collections.unmodifiableList(witnesses_); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- transactions_ = java.util.Collections.unmodifiableList(transactions_);
- }
- if (((mutable_bitField0_ & 0x00000008) != 0)) {
- transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_); // C
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- witnessSignatures_ = java.util.Collections.unmodifiableList(witnessSignatures_); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_descriptor;
@@ -2206,7 +2050,7 @@ public final class CommonProto {
}
public static final int HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 区块的哈希,当区块处于待确认状态时为`null`
@@ -2221,7 +2065,7 @@ public final class CommonProto {
}
public static final int CREATOR_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString creator_;
+ private com.google.protobuf.ByteString creator_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 产块者账户地址
@@ -2236,7 +2080,7 @@ public final class CommonProto {
}
public static final int NONCE_FIELD_NUMBER = 3;
- private long nonce_;
+ private long nonce_ = 0L;
/**
*
* 这个区块之前产块者产生的区块数量
@@ -2251,7 +2095,9 @@ public final class CommonProto {
}
public static final int PARENT_HASHES_FIELD_NUMBER = 4;
- private java.util.List parentHashes_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.ProtobufList parentHashes_ =
+ emptyList(com.google.protobuf.ByteString.class);
/**
*
* 父区块的哈希
@@ -2290,7 +2136,9 @@ public final class CommonProto {
}
public static final int WITNESSES_FIELD_NUMBER = 5;
- private java.util.List witnesses_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.ProtobufList witnesses_ =
+ emptyList(com.google.protobuf.ByteString.class);
/**
*
* 见证者账户地址
@@ -2329,7 +2177,7 @@ public final class CommonProto {
}
public static final int TIMESTAMP_FIELD_NUMBER = 6;
- private long timestamp_;
+ private long timestamp_ = 0L;
/**
*
* 区块产生时的 UNIX 时间戳,单位为秒
@@ -2344,7 +2192,7 @@ public final class CommonProto {
}
public static final int SIZE_FIELD_NUMBER = 7;
- private long size_;
+ private long size_ = 0L;
/**
*
* 区块大小的字节数
@@ -2359,7 +2207,7 @@ public final class CommonProto {
}
public static final int TRANSACTION_COUNT_FIELD_NUMBER = 8;
- private int transactionCount_;
+ private int transactionCount_ = 0;
/**
*
* 区块包含的事务数量
@@ -2374,7 +2222,7 @@ public final class CommonProto {
}
public static final int TRANSACTIONS_ROOT_FIELD_NUMBER = 9;
- private com.google.protobuf.ByteString transactionsRoot_;
+ private com.google.protobuf.ByteString transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 区块的事务默克尔树根
@@ -2389,6 +2237,7 @@ public final class CommonProto {
}
public static final int TRANSACTIONS_FIELD_NUMBER = 10;
+ @SuppressWarnings("serial")
private java.util.List transactions_;
/**
*
@@ -2449,7 +2298,9 @@ public final class CommonProto {
}
public static final int TRANSACTION_HASHES_FIELD_NUMBER = 11;
- private java.util.List transactionHashes_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.ProtobufList transactionHashes_ =
+ emptyList(com.google.protobuf.ByteString.class);
/**
*
* 20字节的事务哈希的数组,或为空
@@ -2488,7 +2339,7 @@ public final class CommonProto {
}
public static final int CREATOR_SIGNATURE_FIELD_NUMBER = 12;
- private com.google.protobuf.ByteString creatorSignature_;
+ private com.google.protobuf.ByteString creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 产块者签名
@@ -2503,7 +2354,9 @@ public final class CommonProto {
}
public static final int WITNESS_SIGNATURES_FIELD_NUMBER = 13;
- private java.util.List witnessSignatures_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.ProtobufList witnessSignatures_ =
+ emptyList(com.google.protobuf.ByteString.class);
/**
*
* 见证者签名
@@ -2594,7 +2447,7 @@ public final class CommonProto {
for (int i = 0; i < witnessSignatures_.size(); i++) {
output.writeBytes(13, witnessSignatures_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -2675,7 +2528,7 @@ public final class CommonProto {
size += dataSize;
size += 1 * getWitnessSignaturesList().size();
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -2716,7 +2569,7 @@ public final class CommonProto {
.equals(other.getCreatorSignature())) return false;
if (!getWitnessSignaturesList()
.equals(other.getWitnessSignaturesList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -2766,7 +2619,7 @@ public final class CommonProto {
hash = (37 * hash) + WITNESS_SIGNATURES_FIELD_NUMBER;
hash = (53 * hash) + getWitnessSignaturesList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -2815,11 +2668,13 @@ public final class CommonProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -2883,53 +2738,37 @@ public final class CommonProto {
// Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Block.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getTransactionsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
hash_ = com.google.protobuf.ByteString.EMPTY;
-
creator_ = com.google.protobuf.ByteString.EMPTY;
-
nonce_ = 0L;
-
- parentHashes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- witnesses_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
+ parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
+ witnesses_ = emptyList(com.google.protobuf.ByteString.class);
timestamp_ = 0L;
-
size_ = 0L;
-
transactionCount_ = 0;
-
transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
-
if (transactionsBuilder_ == null) {
transactions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
} else {
+ transactions_ = null;
transactionsBuilder_.clear();
}
- transactionHashes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
+ bitField0_ = (bitField0_ & ~0x00000200);
+ transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
-
- witnessSignatures_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
+ witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
return this;
}
@@ -2956,46 +2795,66 @@ public final class CommonProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.Block buildPartial() {
org.bdware.bdledger.api.grpc.pb.CommonProto.Block result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Block(this);
- int from_bitField0_ = bitField0_;
- result.hash_ = hash_;
- result.creator_ = creator_;
- result.nonce_ = nonce_;
- if (((bitField0_ & 0x00000001) != 0)) {
- parentHashes_ = java.util.Collections.unmodifiableList(parentHashes_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.parentHashes_ = parentHashes_;
- if (((bitField0_ & 0x00000002) != 0)) {
- witnesses_ = java.util.Collections.unmodifiableList(witnesses_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.witnesses_ = witnesses_;
- result.timestamp_ = timestamp_;
- result.size_ = size_;
- result.transactionCount_ = transactionCount_;
- result.transactionsRoot_ = transactionsRoot_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.CommonProto.Block result) {
if (transactionsBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
transactions_ = java.util.Collections.unmodifiableList(transactions_);
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000200);
}
result.transactions_ = transactions_;
} else {
result.transactions_ = transactionsBuilder_.build();
}
- if (((bitField0_ & 0x00000008) != 0)) {
- transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_);
- bitField0_ = (bitField0_ & ~0x00000008);
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Block result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.hash_ = hash_;
}
- result.transactionHashes_ = transactionHashes_;
- result.creatorSignature_ = creatorSignature_;
- if (((bitField0_ & 0x00000010) != 0)) {
- witnessSignatures_ = java.util.Collections.unmodifiableList(witnessSignatures_);
- bitField0_ = (bitField0_ & ~0x00000010);
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.creator_ = creator_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.nonce_ = nonce_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ parentHashes_.makeImmutable();
+ result.parentHashes_ = parentHashes_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ witnesses_.makeImmutable();
+ result.witnesses_ = witnesses_;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.timestamp_ = timestamp_;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.size_ = size_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.transactionCount_ = transactionCount_;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.transactionsRoot_ = transactionsRoot_;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ transactionHashes_.makeImmutable();
+ result.transactionHashes_ = transactionHashes_;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.creatorSignature_ = creatorSignature_;
+ }
+ if (((from_bitField0_ & 0x00001000) != 0)) {
+ witnessSignatures_.makeImmutable();
+ result.witnessSignatures_ = witnessSignatures_;
}
- result.witnessSignatures_ = witnessSignatures_;
- onBuilt();
- return result;
}
@java.lang.Override
@@ -3054,7 +2913,8 @@ public final class CommonProto {
if (!other.parentHashes_.isEmpty()) {
if (parentHashes_.isEmpty()) {
parentHashes_ = other.parentHashes_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ parentHashes_.makeImmutable();
+ bitField0_ |= 0x00000008;
} else {
ensureParentHashesIsMutable();
parentHashes_.addAll(other.parentHashes_);
@@ -3064,7 +2924,8 @@ public final class CommonProto {
if (!other.witnesses_.isEmpty()) {
if (witnesses_.isEmpty()) {
witnesses_ = other.witnesses_;
- bitField0_ = (bitField0_ & ~0x00000002);
+ witnesses_.makeImmutable();
+ bitField0_ |= 0x00000010;
} else {
ensureWitnessesIsMutable();
witnesses_.addAll(other.witnesses_);
@@ -3087,7 +2948,7 @@ public final class CommonProto {
if (!other.transactions_.isEmpty()) {
if (transactions_.isEmpty()) {
transactions_ = other.transactions_;
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureTransactionsIsMutable();
transactions_.addAll(other.transactions_);
@@ -3100,7 +2961,7 @@ public final class CommonProto {
transactionsBuilder_.dispose();
transactionsBuilder_ = null;
transactions_ = other.transactions_;
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000200);
transactionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTransactionsFieldBuilder() : null;
@@ -3112,7 +2973,8 @@ public final class CommonProto {
if (!other.transactionHashes_.isEmpty()) {
if (transactionHashes_.isEmpty()) {
transactionHashes_ = other.transactionHashes_;
- bitField0_ = (bitField0_ & ~0x00000008);
+ transactionHashes_.makeImmutable();
+ bitField0_ |= 0x00000400;
} else {
ensureTransactionHashesIsMutable();
transactionHashes_.addAll(other.transactionHashes_);
@@ -3125,14 +2987,15 @@ public final class CommonProto {
if (!other.witnessSignatures_.isEmpty()) {
if (witnessSignatures_.isEmpty()) {
witnessSignatures_ = other.witnessSignatures_;
- bitField0_ = (bitField0_ & ~0x00000010);
+ witnessSignatures_.makeImmutable();
+ bitField0_ |= 0x00001000;
} else {
ensureWitnessSignaturesIsMutable();
witnessSignatures_.addAll(other.witnessSignatures_);
}
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -3147,17 +3010,107 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block 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: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ creator_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ nonce_ = input.readUInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ com.google.protobuf.ByteString v = input.readBytes();
+ ensureParentHashesIsMutable();
+ parentHashes_.add(v);
+ break;
+ } // case 34
+ case 42: {
+ com.google.protobuf.ByteString v = input.readBytes();
+ ensureWitnessesIsMutable();
+ witnesses_.add(v);
+ break;
+ } // case 42
+ case 48: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ case 56: {
+ size_ = input.readUInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 64: {
+ transactionCount_ = input.readUInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 74: {
+ transactionsRoot_ = input.readBytes();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 74
+ case 82: {
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(),
+ extensionRegistry);
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.add(m);
+ } else {
+ transactionsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 82
+ case 90: {
+ com.google.protobuf.ByteString v = input.readBytes();
+ ensureTransactionHashesIsMutable();
+ transactionHashes_.add(v);
+ break;
+ } // case 90
+ case 98: {
+ creatorSignature_ = input.readBytes();
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 98
+ case 106: {
+ com.google.protobuf.ByteString v = input.readBytes();
+ ensureWitnessSignaturesIsMutable();
+ witnessSignatures_.add(v);
+ break;
+ } // case 106
+ 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 = (org.bdware.bdledger.api.grpc.pb.CommonProto.Block) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -3185,11 +3138,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3202,7 +3153,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -3231,11 +3182,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setCreator(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
creator_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -3248,7 +3197,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearCreator() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
creator_ = getDefaultInstance().getCreator();
onChanged();
return this;
@@ -3277,8 +3226,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
-
+
nonce_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -3291,18 +3241,18 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearNonce() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
nonce_ = 0L;
onChanged();
return this;
}
- private java.util.List parentHashes_ = java.util.Collections.emptyList();
+ private com.google.protobuf.Internal.ProtobufList parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureParentHashesIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- parentHashes_ = new java.util.ArrayList(parentHashes_);
- bitField0_ |= 0x00000001;
- }
+ if (!parentHashes_.isModifiable()) {
+ parentHashes_ = makeMutableCopy(parentHashes_);
+ }
+ bitField0_ |= 0x00000008;
}
/**
*
@@ -3314,8 +3264,8 @@ public final class CommonProto {
*/
public java.util.List
getParentHashesList() {
- return ((bitField0_ & 0x00000001) != 0) ?
- java.util.Collections.unmodifiableList(parentHashes_) : parentHashes_;
+ parentHashes_.makeImmutable();
+ return parentHashes_;
}
/**
*
@@ -3352,11 +3302,10 @@ public final class CommonProto {
*/
public Builder setParentHashes(
int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureParentHashesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureParentHashesIsMutable();
parentHashes_.set(index, value);
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -3370,11 +3319,10 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder addParentHashes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureParentHashesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureParentHashesIsMutable();
parentHashes_.add(value);
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -3392,6 +3340,7 @@ public final class CommonProto {
ensureParentHashesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parentHashes_);
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -3404,18 +3353,18 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearParentHashes() {
- parentHashes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
- private java.util.List witnesses_ = java.util.Collections.emptyList();
+ private com.google.protobuf.Internal.ProtobufList witnesses_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureWitnessesIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- witnesses_ = new java.util.ArrayList(witnesses_);
- bitField0_ |= 0x00000002;
- }
+ if (!witnesses_.isModifiable()) {
+ witnesses_ = makeMutableCopy(witnesses_);
+ }
+ bitField0_ |= 0x00000010;
}
/**
*
@@ -3427,8 +3376,8 @@ public final class CommonProto {
*/
public java.util.List
getWitnessesList() {
- return ((bitField0_ & 0x00000002) != 0) ?
- java.util.Collections.unmodifiableList(witnesses_) : witnesses_;
+ witnesses_.makeImmutable();
+ return witnesses_;
}
/**
*
@@ -3465,11 +3414,10 @@ public final class CommonProto {
*/
public Builder setWitnesses(
int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWitnessesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureWitnessesIsMutable();
witnesses_.set(index, value);
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -3483,11 +3431,10 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder addWitnesses(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWitnessesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureWitnessesIsMutable();
witnesses_.add(value);
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -3505,6 +3452,7 @@ public final class CommonProto {
ensureWitnessesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, witnesses_);
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -3517,8 +3465,8 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearWitnesses() {
- witnesses_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
+ witnesses_ = emptyList(com.google.protobuf.ByteString.class);
+ bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
@@ -3546,8 +3494,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
-
+
timestamp_ = value;
+ bitField0_ |= 0x00000020;
onChanged();
return this;
}
@@ -3560,7 +3509,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000020);
timestamp_ = 0L;
onChanged();
return this;
@@ -3589,8 +3538,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setSize(long value) {
-
+
size_ = value;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -3603,7 +3553,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearSize() {
-
+ bitField0_ = (bitField0_ & ~0x00000040);
size_ = 0L;
onChanged();
return this;
@@ -3632,8 +3582,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setTransactionCount(int value) {
-
+
transactionCount_ = value;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -3646,7 +3597,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearTransactionCount() {
-
+ bitField0_ = (bitField0_ & ~0x00000080);
transactionCount_ = 0;
onChanged();
return this;
@@ -3675,11 +3626,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setTransactionsRoot(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
transactionsRoot_ = value;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -3692,7 +3641,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearTransactionsRoot() {
-
+ bitField0_ = (bitField0_ & ~0x00000100);
transactionsRoot_ = getDefaultInstance().getTransactionsRoot();
onChanged();
return this;
@@ -3701,9 +3650,9 @@ public final class CommonProto {
private java.util.List transactions_ =
java.util.Collections.emptyList();
private void ensureTransactionsIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
+ if (!((bitField0_ & 0x00000200) != 0)) {
transactions_ = new java.util.ArrayList(transactions_);
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000200;
}
}
@@ -3897,7 +3846,7 @@ public final class CommonProto {
public Builder clearTransactions() {
if (transactionsBuilder_ == null) {
transactions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
} else {
transactionsBuilder_.clear();
@@ -4002,7 +3951,7 @@ public final class CommonProto {
transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder, org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>(
transactions_,
- ((bitField0_ & 0x00000004) != 0),
+ ((bitField0_ & 0x00000200) != 0),
getParentForChildren(),
isClean());
transactions_ = null;
@@ -4010,12 +3959,12 @@ public final class CommonProto {
return transactionsBuilder_;
}
- private java.util.List transactionHashes_ = java.util.Collections.emptyList();
+ private com.google.protobuf.Internal.ProtobufList transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureTransactionHashesIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- transactionHashes_ = new java.util.ArrayList(transactionHashes_);
- bitField0_ |= 0x00000008;
- }
+ if (!transactionHashes_.isModifiable()) {
+ transactionHashes_ = makeMutableCopy(transactionHashes_);
+ }
+ bitField0_ |= 0x00000400;
}
/**
*
@@ -4027,8 +3976,8 @@ public final class CommonProto {
*/
public java.util.List
getTransactionHashesList() {
- return ((bitField0_ & 0x00000008) != 0) ?
- java.util.Collections.unmodifiableList(transactionHashes_) : transactionHashes_;
+ transactionHashes_.makeImmutable();
+ return transactionHashes_;
}
/**
*
@@ -4065,11 +4014,10 @@ public final class CommonProto {
*/
public Builder setTransactionHashes(
int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTransactionHashesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureTransactionHashesIsMutable();
transactionHashes_.set(index, value);
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -4083,11 +4031,10 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder addTransactionHashes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTransactionHashesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureTransactionHashesIsMutable();
transactionHashes_.add(value);
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -4105,6 +4052,7 @@ public final class CommonProto {
ensureTransactionHashesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, transactionHashes_);
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -4117,8 +4065,8 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearTransactionHashes() {
- transactionHashes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
+ transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
+ bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
@@ -4146,11 +4094,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setCreatorSignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
creatorSignature_ = value;
+ bitField0_ |= 0x00000800;
onChanged();
return this;
}
@@ -4163,18 +4109,18 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearCreatorSignature() {
-
+ bitField0_ = (bitField0_ & ~0x00000800);
creatorSignature_ = getDefaultInstance().getCreatorSignature();
onChanged();
return this;
}
- private java.util.List witnessSignatures_ = java.util.Collections.emptyList();
+ private com.google.protobuf.Internal.ProtobufList witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureWitnessSignaturesIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- witnessSignatures_ = new java.util.ArrayList(witnessSignatures_);
- bitField0_ |= 0x00000010;
- }
+ if (!witnessSignatures_.isModifiable()) {
+ witnessSignatures_ = makeMutableCopy(witnessSignatures_);
+ }
+ bitField0_ |= 0x00001000;
}
/**
*
@@ -4186,8 +4132,8 @@ public final class CommonProto {
*/
public java.util.List
getWitnessSignaturesList() {
- return ((bitField0_ & 0x00000010) != 0) ?
- java.util.Collections.unmodifiableList(witnessSignatures_) : witnessSignatures_;
+ witnessSignatures_.makeImmutable();
+ return witnessSignatures_;
}
/**
*
@@ -4224,11 +4170,10 @@ public final class CommonProto {
*/
public Builder setWitnessSignatures(
int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWitnessSignaturesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureWitnessSignaturesIsMutable();
witnessSignatures_.set(index, value);
+ bitField0_ |= 0x00001000;
onChanged();
return this;
}
@@ -4242,11 +4187,10 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder addWitnessSignatures(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWitnessSignaturesIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureWitnessSignaturesIsMutable();
witnessSignatures_.add(value);
+ bitField0_ |= 0x00001000;
onChanged();
return this;
}
@@ -4264,6 +4208,7 @@ public final class CommonProto {
ensureWitnessSignaturesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, witnessSignatures_);
+ bitField0_ |= 0x00001000;
onChanged();
return this;
}
@@ -4276,8 +4221,8 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearWitnessSignatures() {
- witnessSignatures_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
+ witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
+ bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
@@ -4314,7 +4259,18 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Block(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();
}
};
@@ -4436,83 +4392,6 @@ public final class CommonProto {
return new Contract();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Contract(
- 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: {
-
- contractName_ = input.readBytes();
- break;
- }
- case 16: {
-
- randomNum_ = input.readUInt32();
- break;
- }
- case 26: {
-
- operation_ = input.readBytes();
- break;
- }
- case 34: {
-
- arg_ = input.readBytes();
- break;
- }
- case 42: {
-
- path_ = input.readBytes();
- break;
- }
- case 50: {
-
- content_ = input.readBytes();
- break;
- }
- case 58: {
-
- pubkey_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_descriptor;
@@ -4716,7 +4595,7 @@ public final class CommonProto {
}
public static final int CONTRACTNAME_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString contractName_;
+ private com.google.protobuf.ByteString contractName_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*合约名称
@@ -4731,7 +4610,7 @@ public final class CommonProto {
}
public static final int RANDOMNUM_FIELD_NUMBER = 2;
- private int randomNum_;
+ private int randomNum_ = 0;
/**
*
*合约执行的节点数量
@@ -4746,7 +4625,7 @@ public final class CommonProto {
}
public static final int OPERATION_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString operation_;
+ private com.google.protobuf.ByteString operation_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*合约方法
@@ -4761,7 +4640,7 @@ public final class CommonProto {
}
public static final int ARG_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString arg_;
+ private com.google.protobuf.ByteString arg_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*合约方法参数
@@ -4776,7 +4655,7 @@ public final class CommonProto {
}
public static final int PATH_FIELD_NUMBER = 5;
- private com.google.protobuf.ByteString path_;
+ private com.google.protobuf.ByteString path_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*合约文件路径(合约在IDE工程的相对路径)
@@ -4791,7 +4670,7 @@ public final class CommonProto {
}
public static final int CONTENT_FIELD_NUMBER = 6;
- private com.google.protobuf.ByteString content_;
+ private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*合约内容(可为合约文件相对路径/合约脚本)
@@ -4806,7 +4685,7 @@ public final class CommonProto {
}
public static final int PUBKEY_FIELD_NUMBER = 7;
- private com.google.protobuf.ByteString pubkey_;
+ private com.google.protobuf.ByteString pubkey_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*用户公钥
@@ -4855,7 +4734,7 @@ public final class CommonProto {
if (!pubkey_.isEmpty()) {
output.writeBytes(7, pubkey_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -4892,7 +4771,7 @@ public final class CommonProto {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, pubkey_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -4921,7 +4800,7 @@ public final class CommonProto {
.equals(other.getContent())) return false;
if (!getPubkey()
.equals(other.getPubkey())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -4946,7 +4825,7 @@ public final class CommonProto {
hash = (53 * hash) + getContent().hashCode();
hash = (37 * hash) + PUBKEY_FIELD_NUMBER;
hash = (53 * hash) + getPubkey().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -4995,11 +4874,13 @@ public final class CommonProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -5063,36 +4944,25 @@ public final class CommonProto {
// Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
contractName_ = com.google.protobuf.ByteString.EMPTY;
-
randomNum_ = 0;
-
operation_ = com.google.protobuf.ByteString.EMPTY;
-
arg_ = com.google.protobuf.ByteString.EMPTY;
-
path_ = com.google.protobuf.ByteString.EMPTY;
-
content_ = com.google.protobuf.ByteString.EMPTY;
-
pubkey_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -5119,17 +4989,36 @@ public final class CommonProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.Contract buildPartial() {
org.bdware.bdledger.api.grpc.pb.CommonProto.Contract result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Contract(this);
- result.contractName_ = contractName_;
- result.randomNum_ = randomNum_;
- result.operation_ = operation_;
- result.arg_ = arg_;
- result.path_ = path_;
- result.content_ = content_;
- result.pubkey_ = pubkey_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Contract result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.contractName_ = contractName_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.randomNum_ = randomNum_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.operation_ = operation_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.arg_ = arg_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.path_ = path_;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.content_ = content_;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.pubkey_ = pubkey_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -5195,7 +5084,7 @@ public final class CommonProto {
if (other.getPubkey() != com.google.protobuf.ByteString.EMPTY) {
setPubkey(other.getPubkey());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -5210,19 +5099,68 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract 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: {
+ contractName_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ randomNum_ = input.readUInt32();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 26: {
+ operation_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34: {
+ arg_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42: {
+ path_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ case 50: {
+ content_ = input.readBytes();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 50
+ case 58: {
+ pubkey_ = input.readBytes();
+ bitField0_ |= 0x00000040;
+ 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 = (org.bdware.bdledger.api.grpc.pb.CommonProto.Contract) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.ByteString contractName_ = com.google.protobuf.ByteString.EMPTY;
/**
@@ -5247,11 +5185,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setContractName(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
contractName_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -5264,7 +5200,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearContractName() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
contractName_ = getDefaultInstance().getContractName();
onChanged();
return this;
@@ -5293,8 +5229,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setRandomNum(int value) {
-
+
randomNum_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -5307,7 +5244,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearRandomNum() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
randomNum_ = 0;
onChanged();
return this;
@@ -5336,11 +5273,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setOperation(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
operation_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -5353,7 +5288,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearOperation() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
operation_ = getDefaultInstance().getOperation();
onChanged();
return this;
@@ -5382,11 +5317,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setArg(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
arg_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -5399,7 +5332,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearArg() {
-
+ bitField0_ = (bitField0_ & ~0x00000008);
arg_ = getDefaultInstance().getArg();
onChanged();
return this;
@@ -5428,11 +5361,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setPath(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
path_ = value;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -5445,7 +5376,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearPath() {
-
+ bitField0_ = (bitField0_ & ~0x00000010);
path_ = getDefaultInstance().getPath();
onChanged();
return this;
@@ -5474,11 +5405,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setContent(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
content_ = value;
+ bitField0_ |= 0x00000020;
onChanged();
return this;
}
@@ -5491,7 +5420,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearContent() {
-
+ bitField0_ = (bitField0_ & ~0x00000020);
content_ = getDefaultInstance().getContent();
onChanged();
return this;
@@ -5520,11 +5449,9 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder setPubkey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
pubkey_ = value;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -5537,7 +5464,7 @@ public final class CommonProto {
* @return This builder for chaining.
*/
public Builder clearPubkey() {
-
+ bitField0_ = (bitField0_ & ~0x00000040);
pubkey_ = getDefaultInstance().getPubkey();
onChanged();
return this;
@@ -5575,7 +5502,18 @@ public final class CommonProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Contract(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/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java
index 85218e7..fa1e8e7 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdware/bdledger/api/error_details.proto
+// Protobuf Java Version: 3.25.6
package org.bdware.bdledger.api.grpc.pb;
public final class ErrorDetailsProto {
@@ -92,61 +93,6 @@ public final class ErrorDetailsProto {
return new InvalidArgument();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private InvalidArgument(
- 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)) {
- fieldViolations_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- fieldViolations_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
@@ -236,60 +182,6 @@ public final class ErrorDetailsProto {
return new FieldViolation();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private FieldViolation(
- 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();
-
- field_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
@@ -304,7 +196,8 @@ public final class ErrorDetailsProto {
}
public static final int FIELD_FIELD_NUMBER = 1;
- private volatile java.lang.Object field_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object field_ = "";
/**
*
* A path leading to a field in the request body. The value will be a
@@ -354,7 +247,8 @@ public final class ErrorDetailsProto {
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
*
* A description of why the request element is bad.
@@ -413,13 +307,13 @@ public final class ErrorDetailsProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getFieldBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -428,13 +322,13 @@ public final class ErrorDetailsProto {
if (size != -1) return size;
size = 0;
- if (!getFieldBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_);
}
- if (!getDescriptionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -453,7 +347,7 @@ public final class ErrorDetailsProto {
.equals(other.getField())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -468,7 +362,7 @@ public final class ErrorDetailsProto {
hash = (53 * hash) + getField().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -517,11 +411,13 @@ public final class ErrorDetailsProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -589,26 +485,20 @@ public final class ErrorDetailsProto {
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
field_ = "";
-
description_ = "";
-
return this;
}
@@ -635,12 +525,21 @@ public final class ErrorDetailsProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation(this);
- result.field_ = field_;
- result.description_ = description_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.field_ = field_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -687,13 +586,15 @@ public final class ErrorDetailsProto {
if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
if (!other.getField().isEmpty()) {
field_ = other.field_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
+ bitField0_ |= 0x00000002;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -708,19 +609,43 @@ public final class ErrorDetailsProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation 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: {
+ field_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ 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 = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object field_ = "";
/**
@@ -781,11 +706,9 @@ public final class ErrorDetailsProto {
*/
public Builder setField(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
field_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -800,8 +723,8 @@ public final class ErrorDetailsProto {
* @return This builder for chaining.
*/
public Builder clearField() {
-
field_ = getDefaultInstance().getField();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -818,12 +741,10 @@ public final class ErrorDetailsProto {
*/
public Builder setFieldBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
field_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -881,11 +802,9 @@ public final class ErrorDetailsProto {
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -898,8 +817,8 @@ public final class ErrorDetailsProto {
* @return This builder for chaining.
*/
public Builder clearDescription() {
-
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -914,12 +833,10 @@ public final class ErrorDetailsProto {
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
description_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -956,7 +873,18 @@ public final class ErrorDetailsProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new FieldViolation(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();
}
};
@@ -977,6 +905,7 @@ public final class ErrorDetailsProto {
}
public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List fieldViolations_;
/**
*
@@ -1053,7 +982,7 @@ public final class ErrorDetailsProto {
for (int i = 0; i < fieldViolations_.size(); i++) {
output.writeMessage(1, fieldViolations_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1066,7 +995,7 @@ public final class ErrorDetailsProto {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fieldViolations_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1083,7 +1012,7 @@ public final class ErrorDetailsProto {
if (!getFieldViolationsList()
.equals(other.getFieldViolationsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1098,7 +1027,7 @@ public final class ErrorDetailsProto {
hash = (37 * hash) + FIELD_VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + getFieldViolationsList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1147,11 +1076,13 @@ public final class ErrorDetailsProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1222,29 +1153,25 @@ public final class ErrorDetailsProto {
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getFieldViolationsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (fieldViolationsBuilder_ == null) {
fieldViolations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ fieldViolations_ = null;
fieldViolationsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1271,7 +1198,13 @@ public final class ErrorDetailsProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result) {
if (fieldViolationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
@@ -1281,8 +1214,10 @@ public final class ErrorDetailsProto {
} else {
result.fieldViolations_ = fieldViolationsBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result) {
+ int from_bitField0_ = bitField0_;
}
@java.lang.Override
@@ -1355,7 +1290,7 @@ public final class ErrorDetailsProto {
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1370,17 +1305,43 @@ public final class ErrorDetailsProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument 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: {
+ org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.parser(),
+ extensionRegistry);
+ if (fieldViolationsBuilder_ == null) {
+ ensureFieldViolationsIsMutable();
+ fieldViolations_.add(m);
+ } else {
+ fieldViolationsBuilder_.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 = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -1729,7 +1690,18 @@ public final class ErrorDetailsProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new InvalidArgument(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/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java
index aa9606f..73eeb7e 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java
@@ -5,14 +5,14 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.41.0)",
+ value = "by gRPC proto compiler (version 1.71.0)",
comments = "Source: bdware/bdledger/api/ledger.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class LedgerGrpc {
private LedgerGrpc() {}
- public static final String SERVICE_NAME = "bdware.bdledger.api.Ledger";
+ public static final java.lang.String SERVICE_NAME = "bdware.bdledger.api.Ledger";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor factory =
+ new io.grpc.stub.AbstractStub.StubFactory() {
+ @java.lang.Override
+ public LedgerBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new LedgerBlockingV2Stub(channel, callOptions);
+ }
+ };
+ return LedgerBlockingV2Stub.newStub(factory, channel);
+ }
+
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
@@ -154,7 +169,7 @@ public final class LedgerGrpc {
/**
*/
- public static abstract class LedgerImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -163,7 +178,7 @@ public final class LedgerGrpc {
* 创建一个新账本
*
*/
- public void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request,
+ default void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateLedgerMethod(), responseObserver);
}
@@ -175,7 +190,7 @@ public final class LedgerGrpc {
* 查询所有帐本列表
*
*/
- public void getLedgers(com.google.protobuf.Empty request,
+ default void getLedgers(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLedgersMethod(), responseObserver);
}
@@ -187,41 +202,28 @@ public final class LedgerGrpc {
* 发送一个新事务
*
*/
- public void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request,
+ default void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSendTransactionMethod(), responseObserver);
}
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getCreateLedgerMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest,
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse>(
- this, METHODID_CREATE_LEDGER)))
- .addMethod(
- getGetLedgersMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.Empty,
- org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse>(
- this, METHODID_GET_LEDGERS)))
- .addMethod(
- getSendTransactionMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest,
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse>(
- this, METHODID_SEND_TRANSACTION)))
- .build();
- }
}
/**
+ * Base class for the server implementation of the service Ledger.
*/
- public static final class LedgerStub extends io.grpc.stub.AbstractAsyncStub {
+ public static abstract class LedgerImplBase
+ implements io.grpc.BindableService, AsyncService {
+
+ @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+ return LedgerGrpc.bindService(this);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do asynchronous rpc calls to service Ledger.
+ */
+ public static final class LedgerStub
+ extends io.grpc.stub.AbstractAsyncStub {
private LedgerStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -274,8 +276,63 @@ public final class LedgerGrpc {
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service Ledger.
*/
- public static final class LedgerBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class LedgerBlockingV2Stub
+ extends io.grpc.stub.AbstractBlockingStub {
+ private LedgerBlockingV2Stub(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected LedgerBlockingV2Stub build(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new LedgerBlockingV2Stub(channel, callOptions);
+ }
+
+ /**
+ *
+ **
+ * Create a new ledger
+ * 创建一个新账本
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getCreateLedgerMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get all ledgers
+ * 查询所有帐本列表
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse getLedgers(com.google.protobuf.Empty request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetLedgersMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Send a new transaction
+ * 发送一个新事务
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getSendTransactionMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do limited synchronous rpc calls to service Ledger.
+ */
+ public static final class LedgerBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private LedgerBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -325,8 +382,10 @@ public final class LedgerGrpc {
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service Ledger.
*/
- public static final class LedgerFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class LedgerFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private LedgerFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -387,10 +446,10 @@ public final class LedgerGrpc {
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final LedgerImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(LedgerImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -427,6 +486,32 @@ public final class LedgerGrpc {
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getCreateLedgerMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest,
+ org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse>(
+ service, METHODID_CREATE_LEDGER)))
+ .addMethod(
+ getGetLedgersMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ com.google.protobuf.Empty,
+ org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse>(
+ service, METHODID_GET_LEDGERS)))
+ .addMethod(
+ getSendTransactionMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest,
+ org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse>(
+ service, METHODID_SEND_TRANSACTION)))
+ .build();
+ }
+
private static abstract class LedgerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
LedgerBaseDescriptorSupplier() {}
@@ -450,9 +535,9 @@ public final class LedgerGrpc {
private static final class LedgerMethodDescriptorSupplier
extends LedgerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
- private final String methodName;
+ private final java.lang.String methodName;
- LedgerMethodDescriptorSupplier(String methodName) {
+ LedgerMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerProto.java
index 731ac7f..1996b59 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerProto.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdware/bdledger/api/ledger.proto
+// Protobuf Java Version: 3.25.6
package org.bdware.bdledger.api.grpc.pb;
public final class LedgerProto {
@@ -63,54 +64,6 @@ public final class LedgerProto {
return new CreateLedgerRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private CreateLedgerRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (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 org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_CreateLedgerRequest_descriptor;
@@ -125,7 +78,8 @@ public final class LedgerProto {
}
public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object name_ = "";
/**
*
* Ledger name
@@ -186,10 +140,10 @@ public final class LedgerProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -198,10 +152,10 @@ public final class LedgerProto {
if (size != -1) return size;
size = 0;
- if (!getNameBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -218,7 +172,7 @@ public final class LedgerProto {
if (!getName()
.equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -231,7 +185,7 @@ public final class LedgerProto {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -280,11 +234,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -348,24 +304,19 @@ public final class LedgerProto {
// Construct using org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
name_ = "";
-
return this;
}
@@ -392,11 +343,18 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest(this);
- result.name_ = name_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.name_ = name_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -443,9 +401,10 @@ public final class LedgerProto {
if (other == org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
+ bitField0_ |= 0x00000001;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -460,19 +419,38 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest 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();
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object name_ = "";
/**
@@ -530,11 +508,9 @@ public final class LedgerProto {
*/
public Builder setName(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
name_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -548,8 +524,8 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearName() {
-
name_ = getDefaultInstance().getName();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -565,12 +541,10 @@ public final class LedgerProto {
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
name_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -607,7 +581,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateLedgerRequest(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();
}
};
@@ -664,53 +649,6 @@ public final class LedgerProto {
return new CreateLedgerResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private CreateLedgerResponse(
- 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: {
-
- ok_ = input.readBool();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_CreateLedgerResponse_descriptor;
@@ -725,7 +663,7 @@ public final class LedgerProto {
}
public static final int OK_FIELD_NUMBER = 1;
- private boolean ok_;
+ private boolean ok_ = false;
/**
*
* Boolean value indicating if the ledger is successfully created
@@ -757,7 +695,7 @@ public final class LedgerProto {
if (ok_ != false) {
output.writeBool(1, ok_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -770,7 +708,7 @@ public final class LedgerProto {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, ok_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -787,7 +725,7 @@ public final class LedgerProto {
if (getOk()
!= other.getOk()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -801,7 +739,7 @@ public final class LedgerProto {
hash = (37 * hash) + OK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getOk());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -850,11 +788,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -918,24 +858,19 @@ public final class LedgerProto {
// Construct using org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
ok_ = false;
-
return this;
}
@@ -962,11 +897,18 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse(this);
- result.ok_ = ok_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ok_ = ok_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -1014,7 +956,7 @@ public final class LedgerProto {
if (other.getOk() != false) {
setOk(other.getOk());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1029,19 +971,38 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse 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: {
+ ok_ = input.readBool();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private boolean ok_ ;
/**
@@ -1068,8 +1029,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setOk(boolean value) {
-
+
ok_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1083,7 +1045,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearOk() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
ok_ = false;
onChanged();
return this;
@@ -1121,7 +1083,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateLedgerResponse(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();
}
};
@@ -1203,7 +1176,8 @@ public final class LedgerProto {
super(builder);
}
private GetLedgersResponse() {
- ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ ledgers_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@@ -1213,61 +1187,6 @@ public final class LedgerProto {
return new GetLedgersResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetLedgersResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- ledgers_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- ledgers_.add(s);
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- ledgers_ = ledgers_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_GetLedgersResponse_descriptor;
@@ -1282,7 +1201,9 @@ public final class LedgerProto {
}
public static final int LEDGERS_FIELD_NUMBER = 1;
- private com.google.protobuf.LazyStringList ledgers_;
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList ledgers_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* List of ledger names
@@ -1353,7 +1274,7 @@ public final class LedgerProto {
for (int i = 0; i < ledgers_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledgers_.getRaw(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1370,7 +1291,7 @@ public final class LedgerProto {
size += dataSize;
size += 1 * getLedgersList().size();
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1387,7 +1308,7 @@ public final class LedgerProto {
if (!getLedgersList()
.equals(other.getLedgersList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1402,7 +1323,7 @@ public final class LedgerProto {
hash = (37 * hash) + LEDGERS_FIELD_NUMBER;
hash = (53 * hash) + getLedgersList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1451,11 +1372,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1519,24 +1442,20 @@ public final class LedgerProto {
// Construct using org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
- ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = 0;
+ ledgers_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@@ -1563,16 +1482,19 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) != 0)) {
- ledgers_ = ledgers_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.ledgers_ = ledgers_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ ledgers_.makeImmutable();
+ result.ledgers_ = ledgers_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -1620,14 +1542,14 @@ public final class LedgerProto {
if (!other.ledgers_.isEmpty()) {
if (ledgers_.isEmpty()) {
ledgers_ = other.ledgers_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ |= 0x00000001;
} else {
ensureLedgersIsMutable();
ledgers_.addAll(other.ledgers_);
}
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1642,27 +1564,47 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureLedgersIsMutable();
+ ledgers_.add(s);
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
- private com.google.protobuf.LazyStringList ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private com.google.protobuf.LazyStringArrayList ledgers_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLedgersIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!ledgers_.isModifiable()) {
ledgers_ = new com.google.protobuf.LazyStringArrayList(ledgers_);
- bitField0_ |= 0x00000001;
- }
+ }
+ bitField0_ |= 0x00000001;
}
/**
*
@@ -1675,7 +1617,8 @@ public final class LedgerProto {
*/
public com.google.protobuf.ProtocolStringList
getLedgersList() {
- return ledgers_.getUnmodifiableView();
+ ledgers_.makeImmutable();
+ return ledgers_;
}
/**
*
@@ -1729,11 +1672,10 @@ public final class LedgerProto {
*/
public Builder setLedgers(
int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLedgersIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureLedgersIsMutable();
ledgers_.set(index, value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1749,11 +1691,10 @@ public final class LedgerProto {
*/
public Builder addLedgers(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLedgersIsMutable();
+ if (value == null) { throw new NullPointerException(); }
+ ensureLedgersIsMutable();
ledgers_.add(value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1772,6 +1713,7 @@ public final class LedgerProto {
ensureLedgersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, ledgers_);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1785,8 +1727,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearLedgers() {
- ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
+ ledgers_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
@@ -1802,12 +1745,11 @@ public final class LedgerProto {
*/
public Builder addLedgersBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ensureLedgersIsMutable();
ledgers_.add(value);
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1844,7 +1786,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetLedgersResponse(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();
}
};
@@ -1943,67 +1896,6 @@ public final class LedgerProto {
return new SendTransactionRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SendTransactionRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 18: {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.Builder subBuilder = null;
- if (transaction_ != null) {
- subBuilder = transaction_.toBuilder();
- }
- transaction_ = input.readMessage(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(transaction_);
- transaction_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_SendTransactionRequest_descriptor;
@@ -2106,74 +1998,6 @@ public final class LedgerProto {
return new Transaction();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Transaction(
- 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 18: {
-
- from_ = input.readBytes();
- break;
- }
- case 24: {
-
- nonce_ = input.readUInt64();
- break;
- }
- case 34: {
-
- to_ = input.readBytes();
- break;
- }
- case 42: {
-
- data_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_SendTransactionRequest_Transaction_descriptor;
@@ -2188,7 +2012,7 @@ public final class LedgerProto {
}
public static final int TYPE_FIELD_NUMBER = 1;
- private int type_;
+ private int type_ = 0;
/**
*
* 事务类型,目前仅支持通用数据记录,即type为RECORD (0)
@@ -2209,13 +2033,12 @@ public final class LedgerProto {
* @return The type.
*/
@java.lang.Override public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.valueOf(type_);
+ org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
}
public static final int FROM_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString from_;
+ private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 任意20字节的地址,用于区分使用同一节点的事务发起者
@@ -2230,7 +2053,7 @@ public final class LedgerProto {
}
public static final int NONCE_FIELD_NUMBER = 3;
- private long nonce_;
+ private long nonce_ = 0L;
/**
*
* 正整数,同一from每个nonce应只使用一次,防止重复的事务(可以每次发送事务+1)
@@ -2245,7 +2068,7 @@ public final class LedgerProto {
}
public static final int TO_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString to_;
+ private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 对于通用数据记录不需传递,无意义
@@ -2260,7 +2083,7 @@ public final class LedgerProto {
}
public static final int DATA_FIELD_NUMBER = 5;
- private com.google.protobuf.ByteString data_;
+ private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 事务数据内容,字节数组
@@ -2303,7 +2126,7 @@ public final class LedgerProto {
if (!data_.isEmpty()) {
output.writeBytes(5, data_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -2332,7 +2155,7 @@ public final class LedgerProto {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, data_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -2356,7 +2179,7 @@ public final class LedgerProto {
.equals(other.getTo())) return false;
if (!getData()
.equals(other.getData())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -2378,7 +2201,7 @@ public final class LedgerProto {
hash = (53 * hash) + getTo().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -2427,11 +2250,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -2495,32 +2320,23 @@ public final class LedgerProto {
// Construct using org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
type_ = 0;
-
from_ = com.google.protobuf.ByteString.EMPTY;
-
nonce_ = 0L;
-
to_ = com.google.protobuf.ByteString.EMPTY;
-
data_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -2547,15 +2363,30 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction(this);
- result.type_ = type_;
- result.from_ = from_;
- result.nonce_ = nonce_;
- result.to_ = to_;
- result.data_ = data_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.type_ = type_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.from_ = from_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.nonce_ = nonce_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.to_ = to_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.data_ = data_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -2615,7 +2446,7 @@ public final class LedgerProto {
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -2630,19 +2461,58 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction 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();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18: {
+ from_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ nonce_ = input.readUInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ to_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42: {
+ data_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private int type_ = 0;
/**
@@ -2666,8 +2536,8 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
-
type_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -2681,8 +2551,7 @@ public final class LedgerProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.valueOf(type_);
+ org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
}
/**
@@ -2698,7 +2567,7 @@ public final class LedgerProto {
if (value == null) {
throw new NullPointerException();
}
-
+ bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
@@ -2712,7 +2581,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearType() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
@@ -2741,11 +2610,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setFrom(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
from_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -2758,7 +2625,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearFrom() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
@@ -2787,8 +2654,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
-
+
nonce_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -2801,7 +2669,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearNonce() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
nonce_ = 0L;
onChanged();
return this;
@@ -2830,11 +2698,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setTo(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
to_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -2847,7 +2713,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearTo() {
-
+ bitField0_ = (bitField0_ & ~0x00000008);
to_ = getDefaultInstance().getTo();
onChanged();
return this;
@@ -2876,11 +2742,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
data_ = value;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -2893,7 +2757,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearData() {
-
+ bitField0_ = (bitField0_ & ~0x00000010);
data_ = getDefaultInstance().getData();
onChanged();
return this;
@@ -2931,7 +2795,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Transaction(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();
}
};
@@ -2951,8 +2826,10 @@ public final class LedgerProto {
}
+ private int bitField0_;
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* Ledger name
@@ -3012,7 +2889,7 @@ public final class LedgerProto {
*/
@java.lang.Override
public boolean hasTransaction() {
- return transaction_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -3037,7 +2914,7 @@ public final class LedgerProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder() {
- return getTransaction();
+ return transaction_ == null ? org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
}
private byte memoizedIsInitialized = -1;
@@ -3054,13 +2931,13 @@ public final class LedgerProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getTransaction());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -3069,14 +2946,14 @@ public final class LedgerProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTransaction());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -3098,7 +2975,7 @@ public final class LedgerProto {
if (!getTransaction()
.equals(other.getTransaction())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -3115,7 +2992,7 @@ public final class LedgerProto {
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -3164,11 +3041,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -3243,17 +3122,17 @@ public final class LedgerProto {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
+ getTransactionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
ledger_ = "";
-
- if (transactionBuilder_ == null) {
- transaction_ = null;
- } else {
- transaction_ = null;
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
return this;
@@ -3282,16 +3161,26 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest(this);
- result.ledger_ = ledger_;
- if (transactionBuilder_ == null) {
- result.transaction_ = transaction_;
- } else {
- result.transaction_ = transactionBuilder_.build();
- }
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.transaction_ = transactionBuilder_ == null
+ ? transaction_
+ : transactionBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -3338,12 +3227,13 @@ public final class LedgerProto {
if (other == org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasTransaction()) {
mergeTransaction(other.getTransaction());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -3358,19 +3248,45 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ input.readMessage(
+ getTransactionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object ledger_ = "";
/**
@@ -3428,11 +3344,9 @@ public final class LedgerProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3446,8 +3360,8 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -3463,12 +3377,10 @@ public final class LedgerProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3486,7 +3398,7 @@ public final class LedgerProto {
* @return Whether the transaction field is set.
*/
public boolean hasTransaction() {
- return transactionBuilder_ != null || transaction_ != null;
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
*
@@ -3518,11 +3430,11 @@ public final class LedgerProto {
throw new NullPointerException();
}
transaction_ = value;
- onChanged();
} else {
transactionBuilder_.setMessage(value);
}
-
+ bitField0_ |= 0x00000002;
+ onChanged();
return this;
}
/**
@@ -3537,11 +3449,11 @@ public final class LedgerProto {
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.Builder builderForValue) {
if (transactionBuilder_ == null) {
transaction_ = builderForValue.build();
- onChanged();
} else {
transactionBuilder_.setMessage(builderForValue.build());
}
-
+ bitField0_ |= 0x00000002;
+ onChanged();
return this;
}
/**
@@ -3554,17 +3466,20 @@ public final class LedgerProto {
*/
public Builder mergeTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction value) {
if (transactionBuilder_ == null) {
- if (transaction_ != null) {
- transaction_ =
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000002) != 0) &&
+ transaction_ != null &&
+ transaction_ != org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.getDefaultInstance()) {
+ getTransactionBuilder().mergeFrom(value);
} else {
transaction_ = value;
}
- onChanged();
} else {
transactionBuilder_.mergeFrom(value);
}
-
+ if (transaction_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
return this;
}
/**
@@ -3576,14 +3491,13 @@ public final class LedgerProto {
* .bdware.bdledger.api.SendTransactionRequest.Transaction transaction = 2;
*/
public Builder clearTransaction() {
- if (transactionBuilder_ == null) {
- transaction_ = null;
- onChanged();
- } else {
- transaction_ = null;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
-
+ onChanged();
return this;
}
/**
@@ -3595,7 +3509,7 @@ public final class LedgerProto {
* .bdware.bdledger.api.SendTransactionRequest.Transaction transaction = 2;
*/
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.Transaction.Builder getTransactionBuilder() {
-
+ bitField0_ |= 0x00000002;
onChanged();
return getTransactionFieldBuilder().getBuilder();
}
@@ -3669,7 +3583,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SendTransactionRequest(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();
}
};
@@ -3727,53 +3652,6 @@ public final class LedgerProto {
return new SendTransactionResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SendTransactionResponse(
- 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: {
-
- hash_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerProto.internal_static_bdware_bdledger_api_SendTransactionResponse_descriptor;
@@ -3788,7 +3666,7 @@ public final class LedgerProto {
}
public static final int HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Hash of the created transaction
@@ -3820,7 +3698,7 @@ public final class LedgerProto {
if (!hash_.isEmpty()) {
output.writeBytes(1, hash_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -3833,7 +3711,7 @@ public final class LedgerProto {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, hash_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -3850,7 +3728,7 @@ public final class LedgerProto {
if (!getHash()
.equals(other.getHash())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -3863,7 +3741,7 @@ public final class LedgerProto {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -3912,11 +3790,13 @@ public final class LedgerProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -3980,24 +3860,19 @@ public final class LedgerProto {
// Construct using org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
hash_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -4024,11 +3899,18 @@ public final class LedgerProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse result = new org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse(this);
- result.hash_ = hash_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.hash_ = hash_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -4076,7 +3958,7 @@ public final class LedgerProto {
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -4091,19 +3973,38 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse 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: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
@@ -4130,11 +4031,9 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -4148,7 +4047,7 @@ public final class LedgerProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -4186,7 +4085,18 @@ public final class LedgerProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SendTransactionResponse(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/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeGrpc.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeGrpc.java
index de02f76..e778dc5 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeGrpc.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeGrpc.java
@@ -5,14 +5,14 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.41.0)",
+ value = "by gRPC proto compiler (version 1.71.0)",
comments = "Source: bdware/bdledger/api/node.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class NodeGrpc {
private NodeGrpc() {}
- public static final String SERVICE_NAME = "bdware.bdledger.api.Node";
+ public static final java.lang.String SERVICE_NAME = "bdware.bdledger.api.Node";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor factory =
+ new io.grpc.stub.AbstractStub.StubFactory() {
+ @java.lang.Override
+ public NodeBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new NodeBlockingV2Stub(channel, callOptions);
+ }
+ };
+ return NodeBlockingV2Stub.newStub(factory, channel);
+ }
+
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
@@ -92,7 +107,7 @@ public final class NodeGrpc {
/**
*/
- public static abstract class NodeImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -101,27 +116,28 @@ public final class NodeGrpc {
* 查询BDLedger节点版本
*
*/
- public void clientVersion(com.google.protobuf.Empty request,
+ default void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver);
}
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getClientVersionMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.Empty,
- org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse>(
- this, METHODID_CLIENT_VERSION)))
- .build();
- }
}
/**
+ * Base class for the server implementation of the service Node.
*/
- public static final class NodeStub extends io.grpc.stub.AbstractAsyncStub {
+ public static abstract class NodeImplBase
+ implements io.grpc.BindableService, AsyncService {
+
+ @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+ return NodeGrpc.bindService(this);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do asynchronous rpc calls to service Node.
+ */
+ public static final class NodeStub
+ extends io.grpc.stub.AbstractAsyncStub {
private NodeStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -148,8 +164,39 @@ public final class NodeGrpc {
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service Node.
*/
- public static final class NodeBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class NodeBlockingV2Stub
+ extends io.grpc.stub.AbstractBlockingStub {
+ private NodeBlockingV2Stub(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected NodeBlockingV2Stub build(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new NodeBlockingV2Stub(channel, callOptions);
+ }
+
+ /**
+ *
+ **
+ * Get BDLedger node version
+ * 查询BDLedger节点版本
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getClientVersionMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do limited synchronous rpc calls to service Node.
+ */
+ public static final class NodeBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private NodeBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -175,8 +222,10 @@ public final class NodeGrpc {
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service Node.
*/
- public static final class NodeFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class NodeFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private NodeFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -209,10 +258,10 @@ public final class NodeGrpc {
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final NodeImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(NodeImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -241,6 +290,18 @@ public final class NodeGrpc {
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getClientVersionMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ com.google.protobuf.Empty,
+ org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse>(
+ service, METHODID_CLIENT_VERSION)))
+ .build();
+ }
+
private static abstract class NodeBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
NodeBaseDescriptorSupplier() {}
@@ -264,9 +325,9 @@ public final class NodeGrpc {
private static final class NodeMethodDescriptorSupplier
extends NodeBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
- private final String methodName;
+ private final java.lang.String methodName;
- NodeMethodDescriptorSupplier(String methodName) {
+ NodeMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeProto.java
index 2995d05..c25c471 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeProto.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/NodeProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdware/bdledger/api/node.proto
+// Protobuf Java Version: 3.25.6
package org.bdware.bdledger.api.grpc.pb;
public final class NodeProto {
@@ -63,54 +64,6 @@ public final class NodeProto {
return new ClientVersionResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ClientVersionResponse(
- 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();
-
- version_ = s;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
@@ -125,7 +78,8 @@ public final class NodeProto {
}
public static final int VERSION_FIELD_NUMBER = 1;
- private volatile java.lang.Object version_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object version_ = "";
/**
*
* Client version
@@ -186,10 +140,10 @@ public final class NodeProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getVersionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -198,10 +152,10 @@ public final class NodeProto {
if (size != -1) return size;
size = 0;
- if (!getVersionBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -218,7 +172,7 @@ public final class NodeProto {
if (!getVersion()
.equals(other.getVersion())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -231,7 +185,7 @@ public final class NodeProto {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -280,11 +234,13 @@ public final class NodeProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -348,24 +304,19 @@ public final class NodeProto {
// Construct using org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
version_ = "";
-
return this;
}
@@ -392,11 +343,18 @@ public final class NodeProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse result = new org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse(this);
- result.version_ = version_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.version_ = version_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -443,9 +401,10 @@ public final class NodeProto {
if (other == org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.getDefaultInstance()) return this;
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
+ bitField0_ |= 0x00000001;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -460,19 +419,38 @@ public final class NodeProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse 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: {
+ version_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object version_ = "";
/**
@@ -530,11 +508,9 @@ public final class NodeProto {
*/
public Builder setVersion(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
version_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -548,8 +524,8 @@ public final class NodeProto {
* @return This builder for chaining.
*/
public Builder clearVersion() {
-
version_ = getDefaultInstance().getVersion();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -565,12 +541,10 @@ public final class NodeProto {
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
version_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -607,7 +581,18 @@ public final class NodeProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ClientVersionResponse(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/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryGrpc.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryGrpc.java
index 9030a50..362d0a4 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryGrpc.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryGrpc.java
@@ -5,14 +5,14 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.41.0)",
+ value = "by gRPC proto compiler (version 1.71.0)",
comments = "Source: bdware/bdledger/api/query.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class QueryGrpc {
private QueryGrpc() {}
- public static final String SERVICE_NAME = "bdware.bdledger.api.Query";
+ public static final java.lang.String SERVICE_NAME = "bdware.bdledger.api.Query";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor factory =
+ new io.grpc.stub.AbstractStub.StubFactory() {
+ @java.lang.Override
+ public QueryBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new QueryBlockingV2Stub(channel, callOptions);
+ }
+ };
+ return QueryBlockingV2Stub.newStub(factory, channel);
+ }
+
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
@@ -309,7 +324,7 @@ public final class QueryGrpc {
/**
*/
- public static abstract class QueryImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -318,7 +333,7 @@ public final class QueryGrpc {
* 查询哈希所指定的区块
*
*/
- public void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request,
+ default void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockByHashMethod(), responseObserver);
}
@@ -339,7 +354,7 @@ public final class QueryGrpc {
* and 'end_timestamp' will never be later than the current timestamp when the node process the query request.
*
*/
- public void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
+ default void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlocksMethod(), responseObserver);
}
@@ -357,7 +372,7 @@ public final class QueryGrpc {
* and 'end_timestamp' will never be later than the current timestamp when the node process the query request.
*
*/
- public void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
+ default void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCountBlocksMethod(), responseObserver);
}
@@ -369,7 +384,7 @@ public final class QueryGrpc {
* 查询最新的 'count' 个区块
*
*/
- public void getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request,
+ default void getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRecentBlocksMethod(), responseObserver);
}
@@ -381,7 +396,7 @@ public final class QueryGrpc {
* 查询哈希所指定的事务
*
*/
- public void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request,
+ default void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionByHashMethod(), responseObserver);
}
@@ -393,7 +408,7 @@ public final class QueryGrpc {
* 查询所在区块的哈希与其在区块中的index所指定的事务
*
*/
- public void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request,
+ default void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionByBlockHashAndIndexMethod(), responseObserver);
}
@@ -406,7 +421,7 @@ public final class QueryGrpc {
* 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.
*
*/
- public void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
+ default void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionsMethod(), responseObserver);
}
@@ -419,76 +434,28 @@ public final class QueryGrpc {
* 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'.
*
*/
- public void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
+ default void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCountTransactionsMethod(), responseObserver);
}
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getGetBlockByHashMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse>(
- this, METHODID_GET_BLOCK_BY_HASH)))
- .addMethod(
- getGetBlocksMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
- this, METHODID_GET_BLOCKS)))
- .addMethod(
- getCountBlocksMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse>(
- this, METHODID_COUNT_BLOCKS)))
- .addMethod(
- getGetRecentBlocksMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
- this, METHODID_GET_RECENT_BLOCKS)))
- .addMethod(
- getGetTransactionByHashMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse>(
- this, METHODID_GET_TRANSACTION_BY_HASH)))
- .addMethod(
- getGetTransactionByBlockHashAndIndexMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse>(
- this, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
- .addMethod(
- getGetTransactionsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse>(
- this, METHODID_GET_TRANSACTIONS)))
- .addMethod(
- getCountTransactionsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
- org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse>(
- this, METHODID_COUNT_TRANSACTIONS)))
- .build();
- }
}
/**
+ * Base class for the server implementation of the service Query.
*/
- public static final class QueryStub extends io.grpc.stub.AbstractAsyncStub {
+ public static abstract class QueryImplBase
+ implements io.grpc.BindableService, AsyncService {
+
+ @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+ return QueryGrpc.bindService(this);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do asynchronous rpc calls to service Query.
+ */
+ public static final class QueryStub
+ extends io.grpc.stub.AbstractAsyncStub {
private QueryStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -623,8 +590,140 @@ public final class QueryGrpc {
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service Query.
*/
- public static final class QueryBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class QueryBlockingV2Stub
+ extends io.grpc.stub.AbstractBlockingStub {
+ private QueryBlockingV2Stub(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected QueryBlockingV2Stub build(
+ io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
+ return new QueryBlockingV2Stub(channel, callOptions);
+ }
+
+ /**
+ *
+ **
+ * Get a block identified by its hash
+ * 查询哈希所指定的区块
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetBlockByHashMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get blocks in a timestamp range
+ * 查询时间范围内的区块
+ * Requirement: start_timestamp <= end_timestamp
+ * If neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to
+ * the genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration)
+ * (query.maxDuration is specified in go-bdledger's config file).
+ * If only 'end_timestamp' is not specified, or (end_timestamp - start_timestamp > query.maxDuration),
+ * then 'end_timestamp' will be set to (start_timestamp + query.maxDuration).
+ * If only 'start_timestamp' is not specified, then 'start_timestamp' will be set to (end_timestamp - query.maxDuration).
+ * In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
+ * and 'end_timestamp' will never be later than the current timestamp when the node process the query request.
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetBlocksMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Count all blocks in a ledger, or blocks in a timestamp range
+ * 查询帐本中的所有区块数量,或时间范围内的区块数量
+ * Requirement: start_timestamp <= end_timestamp
+ * If neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger.
+ * If only 'end_timestamp' is not specified, then count all blocks with timestamps later than 'start_timestamp'.
+ * If only 'start_timestamp' is not specified, then count all blocks with timestamps earlier than 'end_timestamp'.
+ * In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
+ * and 'end_timestamp' will never be later than the current timestamp when the node process the query request.
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getCountBlocksMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
+ * 查询最新的 'count' 个区块
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetRecentBlocksMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get a transaction identified by its hash
+ * 查询哈希所指定的事务
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetTransactionByHashMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get a transaction identified by hash of the block it belongs to and its index inside the block
+ * 查询所在区块的哈希与其在区块中的index所指定的事务
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetTransactionByBlockHashAndIndexMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Get transactions in a timestamp range
+ * 查询时间范围内的事务
+ * 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetTransactionsMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ **
+ * Count all transactions in a ledger, or transactions in a timestamp range
+ * 查询帐本中的所有事务数量,或时间范围内的事务数量
+ * 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'.
+ *
+ */
+ public org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getCountTransactionsMethod(), getCallOptions(), request);
+ }
+ }
+
+ /**
+ * A stub to allow clients to do limited synchronous rpc calls to service Query.
+ */
+ public static final class QueryBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private QueryBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -751,8 +850,10 @@ public final class QueryGrpc {
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service Query.
*/
- public static final class QueryFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class QueryFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private QueryFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -900,10 +1001,10 @@ public final class QueryGrpc {
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final QueryImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(QueryImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -960,6 +1061,67 @@ public final class QueryGrpc {
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getGetBlockByHashMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse>(
+ service, METHODID_GET_BLOCK_BY_HASH)))
+ .addMethod(
+ getGetBlocksMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
+ service, METHODID_GET_BLOCKS)))
+ .addMethod(
+ getCountBlocksMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse>(
+ service, METHODID_COUNT_BLOCKS)))
+ .addMethod(
+ getGetRecentBlocksMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
+ service, METHODID_GET_RECENT_BLOCKS)))
+ .addMethod(
+ getGetTransactionByHashMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse>(
+ service, METHODID_GET_TRANSACTION_BY_HASH)))
+ .addMethod(
+ getGetTransactionByBlockHashAndIndexMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse>(
+ service, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
+ .addMethod(
+ getGetTransactionsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse>(
+ service, METHODID_GET_TRANSACTIONS)))
+ .addMethod(
+ getCountTransactionsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
+ org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse>(
+ service, METHODID_COUNT_TRANSACTIONS)))
+ .build();
+ }
+
private static abstract class QueryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
QueryBaseDescriptorSupplier() {}
@@ -983,9 +1145,9 @@ public final class QueryGrpc {
private static final class QueryMethodDescriptorSupplier
extends QueryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
- private final String methodName;
+ private final java.lang.String methodName;
- QueryMethodDescriptorSupplier(String methodName) {
+ QueryMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryProto.java
index 83351fc..b6e4b91 100644
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryProto.java
+++ b/src/main/java/org/bdware/bdledger/api/grpc/pb/QueryProto.java
@@ -1,6 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdware/bdledger/api/query.proto
+// Protobuf Java Version: 3.25.6
package org.bdware.bdledger.api.grpc.pb;
public final class QueryProto {
@@ -204,58 +205,6 @@ public final class QueryProto {
return new BlockFilter();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private BlockFilter(
- 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: {
-
- hash_ = input.readBytes();
- break;
- }
- case 16: {
-
- timestamp_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_BlockFilter_descriptor;
@@ -270,7 +219,7 @@ public final class QueryProto {
}
public static final int HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes hash = 1;
* @return The hash.
@@ -281,7 +230,7 @@ public final class QueryProto {
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
- private long timestamp_;
+ private long timestamp_ = 0L;
/**
* int64 timestamp = 2;
* @return The timestamp.
@@ -311,7 +260,7 @@ public final class QueryProto {
if (timestamp_ != 0L) {
output.writeInt64(2, timestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -328,7 +277,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, timestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -347,7 +296,7 @@ public final class QueryProto {
.equals(other.getHash())) return false;
if (getTimestamp()
!= other.getTimestamp()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -363,7 +312,7 @@ public final class QueryProto {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -412,11 +361,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -485,26 +436,20 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
hash_ = com.google.protobuf.ByteString.EMPTY;
-
timestamp_ = 0L;
-
return this;
}
@@ -531,12 +476,21 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter result = new org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter(this);
- result.hash_ = hash_;
- result.timestamp_ = timestamp_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.hash_ = hash_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.timestamp_ = timestamp_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -587,7 +541,7 @@ public final class QueryProto {
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -602,19 +556,43 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter 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: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
@@ -631,11 +609,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -644,7 +620,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -665,8 +641,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
-
+
timestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -675,7 +652,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = 0L;
onChanged();
return this;
@@ -713,7 +690,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new BlockFilter(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();
}
};
@@ -791,68 +779,6 @@ public final class QueryProto {
return new TransactionFilter();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private TransactionFilter(
- 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: {
-
- hash_ = input.readBytes();
- break;
- }
- case 18: {
-
- from_ = input.readBytes();
- break;
- }
- case 26: {
-
- to_ = input.readBytes();
- break;
- }
- case 34: {
-
- timestamp_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_TransactionFilter_descriptor;
@@ -867,7 +793,7 @@ public final class QueryProto {
}
public static final int HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes hash = 1;
* @return The hash.
@@ -878,7 +804,7 @@ public final class QueryProto {
}
public static final int FROM_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString from_;
+ private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes from = 2;
* @return The from.
@@ -889,7 +815,7 @@ public final class QueryProto {
}
public static final int TO_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString to_;
+ private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes to = 3;
* @return The to.
@@ -900,7 +826,7 @@ public final class QueryProto {
}
public static final int TIMESTAMP_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString timestamp_;
+ private com.google.protobuf.ByteString timestamp_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes timestamp = 4;
* @return The timestamp.
@@ -936,7 +862,7 @@ public final class QueryProto {
if (!timestamp_.isEmpty()) {
output.writeBytes(4, timestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -961,7 +887,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, timestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -984,7 +910,7 @@ public final class QueryProto {
.equals(other.getTo())) return false;
if (!getTimestamp()
.equals(other.getTimestamp())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1003,7 +929,7 @@ public final class QueryProto {
hash = (53 * hash) + getTo().hashCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1052,11 +978,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1124,30 +1052,22 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
hash_ = com.google.protobuf.ByteString.EMPTY;
-
from_ = com.google.protobuf.ByteString.EMPTY;
-
to_ = com.google.protobuf.ByteString.EMPTY;
-
timestamp_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -1174,14 +1094,27 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter result = new org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter(this);
- result.hash_ = hash_;
- result.from_ = from_;
- result.to_ = to_;
- result.timestamp_ = timestamp_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.hash_ = hash_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.from_ = from_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.to_ = to_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.timestamp_ = timestamp_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -1238,7 +1171,7 @@ public final class QueryProto {
if (other.getTimestamp() != com.google.protobuf.ByteString.EMPTY) {
setTimestamp(other.getTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1253,19 +1186,53 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter 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: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ from_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ to_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34: {
+ timestamp_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
@@ -1282,11 +1249,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1295,7 +1260,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -1316,11 +1281,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setFrom(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
from_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -1329,7 +1292,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearFrom() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
@@ -1350,11 +1313,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setTo(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
to_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1363,7 +1324,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearTo() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
to_ = getDefaultInstance().getTo();
onChanged();
return this;
@@ -1384,11 +1345,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setTimestamp(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
timestamp_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1397,7 +1356,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000008);
timestamp_ = getDefaultInstance().getTimestamp();
onChanged();
return this;
@@ -1435,7 +1394,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new TransactionFilter(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();
}
};
@@ -1523,64 +1493,6 @@ public final class QueryProto {
return new GetBlockByHashRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetBlockByHashRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 18: {
-
- hash_ = input.readBytes();
- break;
- }
- case 24: {
-
- fullTransactions_ = input.readBool();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetBlockByHashRequest_descriptor;
@@ -1595,7 +1507,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -1641,7 +1554,7 @@ public final class QueryProto {
}
public static final int HASH_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 区块哈希
@@ -1656,7 +1569,7 @@ public final class QueryProto {
}
public static final int FULL_TRANSACTIONS_FIELD_NUMBER = 3;
- private boolean fullTransactions_;
+ private boolean fullTransactions_ = false;
/**
*
* 是否返回完整事务列表,而不是事务哈希列表
@@ -1684,7 +1597,7 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (!hash_.isEmpty()) {
@@ -1693,7 +1606,7 @@ public final class QueryProto {
if (fullTransactions_ != false) {
output.writeBool(3, fullTransactions_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1702,7 +1615,7 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (!hash_.isEmpty()) {
@@ -1713,7 +1626,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, fullTransactions_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1734,7 +1647,7 @@ public final class QueryProto {
.equals(other.getHash())) return false;
if (getFullTransactions()
!= other.getFullTransactions()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1752,7 +1665,7 @@ public final class QueryProto {
hash = (37 * hash) + FULL_TRANSACTIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFullTransactions());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1801,11 +1714,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1869,28 +1784,21 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
ledger_ = "";
-
hash_ = com.google.protobuf.ByteString.EMPTY;
-
fullTransactions_ = false;
-
return this;
}
@@ -1917,13 +1825,24 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest(this);
- result.ledger_ = ledger_;
- result.hash_ = hash_;
- result.fullTransactions_ = fullTransactions_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.hash_ = hash_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.fullTransactions_ = fullTransactions_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -1970,6 +1889,7 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
@@ -1978,7 +1898,7 @@ public final class QueryProto {
if (other.getFullTransactions() != false) {
setFullTransactions(other.getFullTransactions());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1993,19 +1913,48 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ fullTransactions_ = input.readBool();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object ledger_ = "";
/**
@@ -2060,11 +2009,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -2077,8 +2024,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -2093,12 +2040,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -2126,11 +2071,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -2143,7 +2086,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -2172,8 +2115,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setFullTransactions(boolean value) {
-
+
fullTransactions_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -2186,7 +2130,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearFullTransactions() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
fullTransactions_ = false;
onChanged();
return this;
@@ -2224,7 +2168,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetBlockByHashRequest(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();
}
};
@@ -2297,61 +2252,6 @@ public final class QueryProto {
return new GetBlockByHashResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetBlockByHashResponse(
- 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: {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder subBuilder = null;
- if (block_ != null) {
- subBuilder = block_.toBuilder();
- }
- block_ = input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Block.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(block_);
- block_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetBlockByHashResponse_descriptor;
@@ -2365,6 +2265,7 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse.class, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse.Builder.class);
}
+ private int bitField0_;
public static final int BLOCK_FIELD_NUMBER = 1;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Block block_;
/**
@@ -2377,7 +2278,7 @@ public final class QueryProto {
*/
@java.lang.Override
public boolean hasBlock() {
- return block_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -2400,7 +2301,7 @@ public final class QueryProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.BlockOrBuilder getBlockOrBuilder() {
- return getBlock();
+ return block_ == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.Block.getDefaultInstance() : block_;
}
private byte memoizedIsInitialized = -1;
@@ -2417,10 +2318,10 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (block_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getBlock());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -2429,11 +2330,11 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (block_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBlock());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -2453,7 +2354,7 @@ public final class QueryProto {
if (!getBlock()
.equals(other.getBlock())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -2468,7 +2369,7 @@ public final class QueryProto {
hash = (37 * hash) + BLOCK_FIELD_NUMBER;
hash = (53 * hash) + getBlock().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -2517,11 +2418,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -2596,15 +2499,16 @@ public final class QueryProto {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
+ getBlockFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
- if (blockBuilder_ == null) {
- block_ = null;
- } else {
- block_ = null;
+ bitField0_ = 0;
+ block_ = null;
+ if (blockBuilder_ != null) {
+ blockBuilder_.dispose();
blockBuilder_ = null;
}
return this;
@@ -2633,15 +2537,23 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse(this);
- if (blockBuilder_ == null) {
- result.block_ = block_;
- } else {
- result.block_ = blockBuilder_.build();
- }
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.block_ = blockBuilder_ == null
+ ? block_
+ : blockBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -2689,7 +2601,7 @@ public final class QueryProto {
if (other.hasBlock()) {
mergeBlock(other.getBlock());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -2704,19 +2616,40 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse 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(
+ getBlockFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Block block_;
private com.google.protobuf.SingleFieldBuilderV3<
@@ -2730,7 +2663,7 @@ public final class QueryProto {
* @return Whether the block field is set.
*/
public boolean hasBlock() {
- return blockBuilder_ != null || block_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -2760,11 +2693,11 @@ public final class QueryProto {
throw new NullPointerException();
}
block_ = value;
- onChanged();
} else {
blockBuilder_.setMessage(value);
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -2778,11 +2711,11 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder builderForValue) {
if (blockBuilder_ == null) {
block_ = builderForValue.build();
- onChanged();
} else {
blockBuilder_.setMessage(builderForValue.build());
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -2794,17 +2727,20 @@ public final class QueryProto {
*/
public Builder mergeBlock(org.bdware.bdledger.api.grpc.pb.CommonProto.Block value) {
if (blockBuilder_ == null) {
- if (block_ != null) {
- block_ =
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block.newBuilder(block_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000001) != 0) &&
+ block_ != null &&
+ block_ != org.bdware.bdledger.api.grpc.pb.CommonProto.Block.getDefaultInstance()) {
+ getBlockBuilder().mergeFrom(value);
} else {
block_ = value;
}
- onChanged();
} else {
blockBuilder_.mergeFrom(value);
}
-
+ if (block_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
return this;
}
/**
@@ -2815,14 +2751,13 @@ public final class QueryProto {
* .bdware.bdledger.api.Block block = 1;
*/
public Builder clearBlock() {
- if (blockBuilder_ == null) {
- block_ = null;
- onChanged();
- } else {
- block_ = null;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ block_ = null;
+ if (blockBuilder_ != null) {
+ blockBuilder_.dispose();
blockBuilder_ = null;
}
-
+ onChanged();
return this;
}
/**
@@ -2833,7 +2768,7 @@ public final class QueryProto {
* .bdware.bdledger.api.Block block = 1;
*/
public org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder getBlockBuilder() {
-
+ bitField0_ |= 0x00000001;
onChanged();
return getBlockFieldBuilder().getBuilder();
}
@@ -2905,7 +2840,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetBlockByHashResponse(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();
}
};
@@ -3057,83 +3003,6 @@ public final class QueryProto {
return new BlocksRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private BlocksRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- case 34: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- filters_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- filters_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter.parser(), extensionRegistry));
- break;
- }
- case 40: {
- int rawValue = input.readEnum();
-
- includeTransactions_ = rawValue;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- filters_ = java.util.Collections.unmodifiableList(filters_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_BlocksRequest_descriptor;
@@ -3148,7 +3017,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -3194,7 +3064,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 查询范围开始时间戳
@@ -3209,7 +3079,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 查询范围结束时间戳
@@ -3224,6 +3094,7 @@ public final class QueryProto {
}
public static final int FILTERS_FIELD_NUMBER = 4;
+ @SuppressWarnings("serial")
private java.util.List filters_;
/**
*
@@ -3284,7 +3155,7 @@ public final class QueryProto {
}
public static final int INCLUDE_TRANSACTIONS_FIELD_NUMBER = 5;
- private int includeTransactions_;
+ private int includeTransactions_ = 0;
/**
*
* 包含事务信息详细程度
@@ -3305,8 +3176,7 @@ public final class QueryProto {
* @return The includeTransactions.
*/
@java.lang.Override public org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions getIncludeTransactions() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.valueOf(includeTransactions_);
+ org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.forNumber(includeTransactions_);
return result == null ? org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.UNRECOGNIZED : result;
}
@@ -3324,7 +3194,7 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (startTimestamp_ != 0L) {
@@ -3339,7 +3209,7 @@ public final class QueryProto {
if (includeTransactions_ != org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.NONE.getNumber()) {
output.writeEnum(5, includeTransactions_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -3348,7 +3218,7 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (startTimestamp_ != 0L) {
@@ -3367,7 +3237,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, includeTransactions_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -3391,7 +3261,7 @@ public final class QueryProto {
if (!getFiltersList()
.equals(other.getFiltersList())) return false;
if (includeTransactions_ != other.includeTransactions_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -3416,7 +3286,7 @@ public final class QueryProto {
}
hash = (37 * hash) + INCLUDE_TRANSACTIONS_FIELD_NUMBER;
hash = (53 * hash) + includeTransactions_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -3465,11 +3335,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -3533,37 +3405,29 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getFiltersFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
ledger_ = "";
-
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
if (filtersBuilder_ == null) {
filters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ filters_ = null;
filtersBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000008);
includeTransactions_ = 0;
-
return this;
}
@@ -3590,22 +3454,38 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest(this);
- int from_bitField0_ = bitField0_;
- result.ledger_ = ledger_;
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest result) {
if (filtersBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000008) != 0)) {
filters_ = java.util.Collections.unmodifiableList(filters_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
}
result.filters_ = filters_;
} else {
result.filters_ = filtersBuilder_.build();
}
- result.includeTransactions_ = includeTransactions_;
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.includeTransactions_ = includeTransactions_;
+ }
}
@java.lang.Override
@@ -3654,6 +3534,7 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getStartTimestamp() != 0L) {
@@ -3666,7 +3547,7 @@ public final class QueryProto {
if (!other.filters_.isEmpty()) {
if (filters_.isEmpty()) {
filters_ = other.filters_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureFiltersIsMutable();
filters_.addAll(other.filters_);
@@ -3679,7 +3560,7 @@ public final class QueryProto {
filtersBuilder_.dispose();
filtersBuilder_ = null;
filters_ = other.filters_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
filtersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFiltersFieldBuilder() : null;
@@ -3691,7 +3572,7 @@ public final class QueryProto {
if (other.includeTransactions_ != 0) {
setIncludeTransactionsValue(other.getIncludeTransactionsValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -3706,17 +3587,63 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter.parser(),
+ extensionRegistry);
+ if (filtersBuilder_ == null) {
+ ensureFiltersIsMutable();
+ filters_.add(m);
+ } else {
+ filtersBuilder_.addMessage(m);
+ }
+ break;
+ } // case 34
+ case 40: {
+ includeTransactions_ = input.readEnum();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -3774,11 +3701,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3791,8 +3716,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -3807,12 +3732,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3840,8 +3763,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -3854,7 +3778,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -3883,8 +3807,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -3897,7 +3822,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -3906,9 +3831,9 @@ public final class QueryProto {
private java.util.List filters_ =
java.util.Collections.emptyList();
private void ensureFiltersIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!((bitField0_ & 0x00000008) != 0)) {
filters_ = new java.util.ArrayList(filters_);
- bitField0_ |= 0x00000001;
+ bitField0_ |= 0x00000008;
}
}
@@ -4102,7 +4027,7 @@ public final class QueryProto {
public Builder clearFilters() {
if (filtersBuilder_ == null) {
filters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
filtersBuilder_.clear();
@@ -4207,7 +4132,7 @@ public final class QueryProto {
filtersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter, org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilter.Builder, org.bdware.bdledger.api.grpc.pb.QueryProto.BlockFilterOrBuilder>(
filters_,
- ((bitField0_ & 0x00000001) != 0),
+ ((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
filters_ = null;
@@ -4237,8 +4162,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setIncludeTransactionsValue(int value) {
-
includeTransactions_ = value;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -4252,8 +4177,7 @@ public final class QueryProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions getIncludeTransactions() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.valueOf(includeTransactions_);
+ org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.forNumber(includeTransactions_);
return result == null ? org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.UNRECOGNIZED : result;
}
/**
@@ -4269,7 +4193,7 @@ public final class QueryProto {
if (value == null) {
throw new NullPointerException();
}
-
+ bitField0_ |= 0x00000010;
includeTransactions_ = value.getNumber();
onChanged();
return this;
@@ -4283,7 +4207,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearIncludeTransactions() {
-
+ bitField0_ = (bitField0_ & ~0x00000010);
includeTransactions_ = 0;
onChanged();
return this;
@@ -4321,7 +4245,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new BlocksRequest(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();
}
};
@@ -4432,71 +4367,6 @@ public final class QueryProto {
return new GetBlocksResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetBlocksResponse(
- 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)) {
- blocks_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- blocks_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Block.parser(), extensionRegistry));
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- blocks_ = java.util.Collections.unmodifiableList(blocks_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetBlocksResponse_descriptor;
@@ -4511,6 +4381,7 @@ public final class QueryProto {
}
public static final int BLOCKS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List blocks_;
/**
*
@@ -4571,7 +4442,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围开始时间戳
@@ -4586,7 +4457,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围结束时间戳
@@ -4623,7 +4494,7 @@ public final class QueryProto {
if (endTimestamp_ != 0L) {
output.writeInt64(3, endTimestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -4644,7 +4515,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -4665,7 +4536,7 @@ public final class QueryProto {
!= other.getStartTimestamp()) return false;
if (getEndTimestamp()
!= other.getEndTimestamp()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -4686,7 +4557,7 @@ public final class QueryProto {
hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -4735,11 +4606,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -4803,33 +4676,27 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getBlocksFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (blocksBuilder_ == null) {
blocks_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ blocks_ = null;
blocksBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
return this;
}
@@ -4856,7 +4723,13 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse result) {
if (blocksBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
blocks_ = java.util.Collections.unmodifiableList(blocks_);
@@ -4866,10 +4739,16 @@ public final class QueryProto {
} else {
result.blocks_ = blocksBuilder_.build();
}
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
}
@java.lang.Override
@@ -4948,7 +4827,7 @@ public final class QueryProto {
if (other.getEndTimestamp() != 0L) {
setEndTimestamp(other.getEndTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -4963,17 +4842,53 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse 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: {
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Block m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Block.parser(),
+ extensionRegistry);
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ blocks_.add(m);
+ } else {
+ blocksBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -5313,8 +5228,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -5327,7 +5243,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -5356,8 +5272,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -5370,7 +5287,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -5408,7 +5325,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetBlocksResponse(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();
}
};
@@ -5484,63 +5412,6 @@ public final class QueryProto {
return new CountBlocksResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private CountBlocksResponse(
- 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: {
-
- count_ = input.readUInt64();
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_CountBlocksResponse_descriptor;
@@ -5555,7 +5426,7 @@ public final class QueryProto {
}
public static final int COUNT_FIELD_NUMBER = 1;
- private long count_;
+ private long count_ = 0L;
/**
*
* 区块数量
@@ -5570,7 +5441,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围开始时间戳
@@ -5585,7 +5456,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围结束时间戳
@@ -5622,7 +5493,7 @@ public final class QueryProto {
if (endTimestamp_ != 0L) {
output.writeInt64(3, endTimestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -5643,7 +5514,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -5664,7 +5535,7 @@ public final class QueryProto {
!= other.getStartTimestamp()) return false;
if (getEndTimestamp()
!= other.getEndTimestamp()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -5684,7 +5555,7 @@ public final class QueryProto {
hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -5733,11 +5604,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -5801,28 +5674,21 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
count_ = 0L;
-
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
return this;
}
@@ -5849,13 +5715,24 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse(this);
- result.count_ = count_;
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.count_ = count_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -5909,7 +5786,7 @@ public final class QueryProto {
if (other.getEndTimestamp() != 0L) {
setEndTimestamp(other.getEndTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -5924,19 +5801,48 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse 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: {
+ count_ = input.readUInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private long count_ ;
/**
@@ -5961,8 +5867,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setCount(long value) {
-
+
count_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -5975,7 +5882,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearCount() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
count_ = 0L;
onChanged();
return this;
@@ -6004,8 +5911,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -6018,7 +5926,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -6047,8 +5955,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -6061,7 +5970,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -6099,7 +6008,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CountBlocksResponse(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();
}
};
@@ -6206,70 +6126,6 @@ public final class QueryProto {
return new RecentBlocksRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private RecentBlocksRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 16: {
-
- offset_ = input.readInt64();
- break;
- }
- case 24: {
-
- count_ = input.readInt64();
- break;
- }
- case 32: {
- int rawValue = input.readEnum();
-
- includeTransactions_ = rawValue;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_RecentBlocksRequest_descriptor;
@@ -6284,7 +6140,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -6330,7 +6187,7 @@ public final class QueryProto {
}
public static final int OFFSET_FIELD_NUMBER = 2;
- private long offset_;
+ private long offset_ = 0L;
/**
*
* 起始值
@@ -6345,7 +6202,7 @@ public final class QueryProto {
}
public static final int COUNT_FIELD_NUMBER = 3;
- private long count_;
+ private long count_ = 0L;
/**
*
* 查询区块数量
@@ -6360,7 +6217,7 @@ public final class QueryProto {
}
public static final int INCLUDE_TRANSACTIONS_FIELD_NUMBER = 4;
- private int includeTransactions_;
+ private int includeTransactions_ = 0;
/**
*
* 包含事务信息详细程度
@@ -6381,8 +6238,7 @@ public final class QueryProto {
* @return The includeTransactions.
*/
@java.lang.Override public org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions getIncludeTransactions() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.valueOf(includeTransactions_);
+ org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.forNumber(includeTransactions_);
return result == null ? org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.UNRECOGNIZED : result;
}
@@ -6400,7 +6256,7 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (offset_ != 0L) {
@@ -6412,7 +6268,7 @@ public final class QueryProto {
if (includeTransactions_ != org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.NONE.getNumber()) {
output.writeEnum(4, includeTransactions_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -6421,7 +6277,7 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (offset_ != 0L) {
@@ -6436,7 +6292,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, includeTransactions_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -6458,7 +6314,7 @@ public final class QueryProto {
if (getCount()
!= other.getCount()) return false;
if (includeTransactions_ != other.includeTransactions_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -6479,7 +6335,7 @@ public final class QueryProto {
getCount());
hash = (37 * hash) + INCLUDE_TRANSACTIONS_FIELD_NUMBER;
hash = (53 * hash) + includeTransactions_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -6528,11 +6384,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -6596,30 +6454,22 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
ledger_ = "";
-
offset_ = 0L;
-
count_ = 0L;
-
includeTransactions_ = 0;
-
return this;
}
@@ -6646,14 +6496,27 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest(this);
- result.ledger_ = ledger_;
- result.offset_ = offset_;
- result.count_ = count_;
- result.includeTransactions_ = includeTransactions_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.offset_ = offset_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.count_ = count_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.includeTransactions_ = includeTransactions_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -6700,6 +6563,7 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getOffset() != 0L) {
@@ -6711,7 +6575,7 @@ public final class QueryProto {
if (other.includeTransactions_ != 0) {
setIncludeTransactionsValue(other.getIncludeTransactionsValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -6726,19 +6590,53 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ offset_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ count_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 32: {
+ includeTransactions_ = input.readEnum();
+ bitField0_ |= 0x00000008;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object ledger_ = "";
/**
@@ -6793,11 +6691,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -6810,8 +6706,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -6826,12 +6722,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -6859,8 +6753,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setOffset(long value) {
-
+
offset_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -6873,7 +6768,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearOffset() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
offset_ = 0L;
onChanged();
return this;
@@ -6902,8 +6797,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setCount(long value) {
-
+
count_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -6916,7 +6812,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearCount() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
count_ = 0L;
onChanged();
return this;
@@ -6944,8 +6840,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setIncludeTransactionsValue(int value) {
-
includeTransactions_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -6959,8 +6855,7 @@ public final class QueryProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions getIncludeTransactions() {
- @SuppressWarnings("deprecation")
- org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.valueOf(includeTransactions_);
+ org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions result = org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.forNumber(includeTransactions_);
return result == null ? org.bdware.bdledger.api.grpc.pb.QueryProto.IncludeTransactions.UNRECOGNIZED : result;
}
/**
@@ -6976,7 +6871,7 @@ public final class QueryProto {
if (value == null) {
throw new NullPointerException();
}
-
+ bitField0_ |= 0x00000008;
includeTransactions_ = value.getNumber();
onChanged();
return this;
@@ -6990,7 +6885,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearIncludeTransactions() {
-
+ bitField0_ = (bitField0_ & ~0x00000008);
includeTransactions_ = 0;
onChanged();
return this;
@@ -7028,7 +6923,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new RecentBlocksRequest(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();
}
};
@@ -7106,59 +7012,6 @@ public final class QueryProto {
return new GetTransactionByHashRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetTransactionByHashRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 18: {
-
- hash_ = input.readBytes();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetTransactionByHashRequest_descriptor;
@@ -7173,7 +7026,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -7219,7 +7073,7 @@ public final class QueryProto {
}
public static final int HASH_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString hash_;
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 事务哈希
@@ -7247,13 +7101,13 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (!hash_.isEmpty()) {
output.writeBytes(2, hash_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -7262,14 +7116,14 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (!hash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, hash_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -7288,7 +7142,7 @@ public final class QueryProto {
.equals(other.getLedger())) return false;
if (!getHash()
.equals(other.getHash())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -7303,7 +7157,7 @@ public final class QueryProto {
hash = (53 * hash) + getLedger().hashCode();
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -7352,11 +7206,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -7420,26 +7276,20 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
ledger_ = "";
-
hash_ = com.google.protobuf.ByteString.EMPTY;
-
return this;
}
@@ -7466,12 +7316,21 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest(this);
- result.ledger_ = ledger_;
- result.hash_ = hash_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.hash_ = hash_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -7518,12 +7377,13 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -7538,19 +7398,43 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ hash_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object ledger_ = "";
/**
@@ -7605,11 +7489,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -7622,8 +7504,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -7638,12 +7520,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -7671,11 +7551,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
hash_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -7688,7 +7566,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
@@ -7726,7 +7604,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetTransactionByHashRequest(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();
}
};
@@ -7799,61 +7688,6 @@ public final class QueryProto {
return new GetTransactionByHashResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetTransactionByHashResponse(
- 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: {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder subBuilder = null;
- if (transaction_ != null) {
- subBuilder = transaction_.toBuilder();
- }
- transaction_ = input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(transaction_);
- transaction_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetTransactionByHashResponse_descriptor;
@@ -7867,6 +7701,7 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse.class, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse.Builder.class);
}
+ private int bitField0_;
public static final int TRANSACTION_FIELD_NUMBER = 1;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction transaction_;
/**
@@ -7879,7 +7714,7 @@ public final class QueryProto {
*/
@java.lang.Override
public boolean hasTransaction() {
- return transaction_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -7902,7 +7737,7 @@ public final class QueryProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder getTransactionOrBuilder() {
- return getTransaction();
+ return transaction_ == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance() : transaction_;
}
private byte memoizedIsInitialized = -1;
@@ -7919,10 +7754,10 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTransaction());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -7931,11 +7766,11 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTransaction());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -7955,7 +7790,7 @@ public final class QueryProto {
if (!getTransaction()
.equals(other.getTransaction())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -7970,7 +7805,7 @@ public final class QueryProto {
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -8019,11 +7854,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -8098,15 +7935,16 @@ public final class QueryProto {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
+ getTransactionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
- if (transactionBuilder_ == null) {
- transaction_ = null;
- } else {
- transaction_ = null;
+ bitField0_ = 0;
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
return this;
@@ -8135,15 +7973,23 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse(this);
- if (transactionBuilder_ == null) {
- result.transaction_ = transaction_;
- } else {
- result.transaction_ = transactionBuilder_.build();
- }
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.transaction_ = transactionBuilder_ == null
+ ? transaction_
+ : transactionBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -8191,7 +8037,7 @@ public final class QueryProto {
if (other.hasTransaction()) {
mergeTransaction(other.getTransaction());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -8206,19 +8052,40 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse 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(
+ getTransactionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction transaction_;
private com.google.protobuf.SingleFieldBuilderV3<
@@ -8232,7 +8099,7 @@ public final class QueryProto {
* @return Whether the transaction field is set.
*/
public boolean hasTransaction() {
- return transactionBuilder_ != null || transaction_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -8262,11 +8129,11 @@ public final class QueryProto {
throw new NullPointerException();
}
transaction_ = value;
- onChanged();
} else {
transactionBuilder_.setMessage(value);
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -8280,11 +8147,11 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder builderForValue) {
if (transactionBuilder_ == null) {
transaction_ = builderForValue.build();
- onChanged();
} else {
transactionBuilder_.setMessage(builderForValue.build());
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -8296,17 +8163,20 @@ public final class QueryProto {
*/
public Builder mergeTransaction(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction value) {
if (transactionBuilder_ == null) {
- if (transaction_ != null) {
- transaction_ =
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000001) != 0) &&
+ transaction_ != null &&
+ transaction_ != org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance()) {
+ getTransactionBuilder().mergeFrom(value);
} else {
transaction_ = value;
}
- onChanged();
} else {
transactionBuilder_.mergeFrom(value);
}
-
+ if (transaction_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
return this;
}
/**
@@ -8317,14 +8187,13 @@ public final class QueryProto {
* .bdware.bdledger.api.Transaction transaction = 1;
*/
public Builder clearTransaction() {
- if (transactionBuilder_ == null) {
- transaction_ = null;
- onChanged();
- } else {
- transaction_ = null;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
-
+ onChanged();
return this;
}
/**
@@ -8335,7 +8204,7 @@ public final class QueryProto {
* .bdware.bdledger.api.Transaction transaction = 1;
*/
public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder getTransactionBuilder() {
-
+ bitField0_ |= 0x00000001;
onChanged();
return getTransactionFieldBuilder().getBuilder();
}
@@ -8407,7 +8276,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetTransactionByHashResponse(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();
}
};
@@ -8495,64 +8375,6 @@ public final class QueryProto {
return new GetTransactionByBlockHashAndIndexRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetTransactionByBlockHashAndIndexRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 18: {
-
- blockHash_ = input.readBytes();
- break;
- }
- case 24: {
-
- index_ = input.readUInt32();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
@@ -8567,7 +8389,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -8613,7 +8436,7 @@ public final class QueryProto {
}
public static final int BLOCK_HASH_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString blockHash_;
+ private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* 事务所属区块哈希
@@ -8628,7 +8451,7 @@ public final class QueryProto {
}
public static final int INDEX_FIELD_NUMBER = 3;
- private int index_;
+ private int index_ = 0;
/**
*
* 事务在区块中的位置
@@ -8656,7 +8479,7 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (!blockHash_.isEmpty()) {
@@ -8665,7 +8488,7 @@ public final class QueryProto {
if (index_ != 0) {
output.writeUInt32(3, index_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -8674,7 +8497,7 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (!blockHash_.isEmpty()) {
@@ -8685,7 +8508,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, index_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -8706,7 +8529,7 @@ public final class QueryProto {
.equals(other.getBlockHash())) return false;
if (getIndex()
!= other.getIndex()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -8723,7 +8546,7 @@ public final class QueryProto {
hash = (53 * hash) + getBlockHash().hashCode();
hash = (37 * hash) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + getIndex();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -8772,11 +8595,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -8840,28 +8665,21 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
ledger_ = "";
-
blockHash_ = com.google.protobuf.ByteString.EMPTY;
-
index_ = 0;
-
return this;
}
@@ -8888,13 +8706,24 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest(this);
- result.ledger_ = ledger_;
- result.blockHash_ = blockHash_;
- result.index_ = index_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.blockHash_ = blockHash_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.index_ = index_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -8941,6 +8770,7 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) {
@@ -8949,7 +8779,7 @@ public final class QueryProto {
if (other.getIndex() != 0) {
setIndex(other.getIndex());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -8964,19 +8794,48 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ blockHash_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ index_ = input.readUInt32();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private java.lang.Object ledger_ = "";
/**
@@ -9031,11 +8890,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -9048,8 +8905,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -9064,12 +8921,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -9097,11 +8952,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setBlockHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
blockHash_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -9114,7 +8967,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearBlockHash() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
blockHash_ = getDefaultInstance().getBlockHash();
onChanged();
return this;
@@ -9143,8 +8996,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setIndex(int value) {
-
+
index_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -9157,7 +9011,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearIndex() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
index_ = 0;
onChanged();
return this;
@@ -9195,7 +9049,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetTransactionByBlockHashAndIndexRequest(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();
}
};
@@ -9268,61 +9133,6 @@ public final class QueryProto {
return new GetTransactionByBlockHashAndIndexResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetTransactionByBlockHashAndIndexResponse(
- 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: {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder subBuilder = null;
- if (transaction_ != null) {
- subBuilder = transaction_.toBuilder();
- }
- transaction_ = input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(transaction_);
- transaction_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetTransactionByBlockHashAndIndexResponse_descriptor;
@@ -9336,6 +9146,7 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse.class, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse.Builder.class);
}
+ private int bitField0_;
public static final int TRANSACTION_FIELD_NUMBER = 1;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction transaction_;
/**
@@ -9348,7 +9159,7 @@ public final class QueryProto {
*/
@java.lang.Override
public boolean hasTransaction() {
- return transaction_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -9371,7 +9182,7 @@ public final class QueryProto {
*/
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder getTransactionOrBuilder() {
- return getTransaction();
+ return transaction_ == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance() : transaction_;
}
private byte memoizedIsInitialized = -1;
@@ -9388,10 +9199,10 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTransaction());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -9400,11 +9211,11 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (transaction_ != null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTransaction());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -9424,7 +9235,7 @@ public final class QueryProto {
if (!getTransaction()
.equals(other.getTransaction())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -9439,7 +9250,7 @@ public final class QueryProto {
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -9488,11 +9299,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -9567,15 +9380,16 @@ public final class QueryProto {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
+ getTransactionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
- if (transactionBuilder_ == null) {
- transaction_ = null;
- } else {
- transaction_ = null;
+ bitField0_ = 0;
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
return this;
@@ -9604,15 +9418,23 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse(this);
- if (transactionBuilder_ == null) {
- result.transaction_ = transaction_;
- } else {
- result.transaction_ = transactionBuilder_.build();
- }
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.transaction_ = transactionBuilder_ == null
+ ? transaction_
+ : transactionBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -9660,7 +9482,7 @@ public final class QueryProto {
if (other.hasTransaction()) {
mergeTransaction(other.getTransaction());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -9675,19 +9497,40 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse 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(
+ getTransactionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction transaction_;
private com.google.protobuf.SingleFieldBuilderV3<
@@ -9701,7 +9544,7 @@ public final class QueryProto {
* @return Whether the transaction field is set.
*/
public boolean hasTransaction() {
- return transactionBuilder_ != null || transaction_ != null;
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
@@ -9731,11 +9574,11 @@ public final class QueryProto {
throw new NullPointerException();
}
transaction_ = value;
- onChanged();
} else {
transactionBuilder_.setMessage(value);
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -9749,11 +9592,11 @@ public final class QueryProto {
org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder builderForValue) {
if (transactionBuilder_ == null) {
transaction_ = builderForValue.build();
- onChanged();
} else {
transactionBuilder_.setMessage(builderForValue.build());
}
-
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
/**
@@ -9765,17 +9608,20 @@ public final class QueryProto {
*/
public Builder mergeTransaction(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction value) {
if (transactionBuilder_ == null) {
- if (transaction_ != null) {
- transaction_ =
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000001) != 0) &&
+ transaction_ != null &&
+ transaction_ != org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance()) {
+ getTransactionBuilder().mergeFrom(value);
} else {
transaction_ = value;
}
- onChanged();
} else {
transactionBuilder_.mergeFrom(value);
}
-
+ if (transaction_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
return this;
}
/**
@@ -9786,14 +9632,13 @@ public final class QueryProto {
* .bdware.bdledger.api.Transaction transaction = 1;
*/
public Builder clearTransaction() {
- if (transactionBuilder_ == null) {
- transaction_ = null;
- onChanged();
- } else {
- transaction_ = null;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ transaction_ = null;
+ if (transactionBuilder_ != null) {
+ transactionBuilder_.dispose();
transactionBuilder_ = null;
}
-
+ onChanged();
return this;
}
/**
@@ -9804,7 +9649,7 @@ public final class QueryProto {
* .bdware.bdledger.api.Transaction transaction = 1;
*/
public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder getTransactionBuilder() {
-
+ bitField0_ |= 0x00000001;
onChanged();
return getTransactionFieldBuilder().getBuilder();
}
@@ -9876,7 +9721,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetTransactionByBlockHashAndIndexResponse(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();
}
};
@@ -10008,77 +9864,6 @@ public final class QueryProto {
return new TransactionsRequest();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private TransactionsRequest(
- 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();
-
- ledger_ = s;
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- case 34: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- filters_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- filters_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter.parser(), extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- filters_ = java.util.Collections.unmodifiableList(filters_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_TransactionsRequest_descriptor;
@@ -10093,7 +9878,8 @@ public final class QueryProto {
}
public static final int LEDGER_FIELD_NUMBER = 1;
- private volatile java.lang.Object ledger_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object ledger_ = "";
/**
*
* 账本名称
@@ -10139,7 +9925,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 查询范围开始时间戳
@@ -10154,7 +9940,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 查询范围结束时间戳
@@ -10169,6 +9955,7 @@ public final class QueryProto {
}
public static final int FILTERS_FIELD_NUMBER = 4;
+ @SuppressWarnings("serial")
private java.util.List filters_;
/**
*
@@ -10242,7 +10029,7 @@ public final class QueryProto {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (startTimestamp_ != 0L) {
@@ -10254,7 +10041,7 @@ public final class QueryProto {
for (int i = 0; i < filters_.size(); i++) {
output.writeMessage(4, filters_.get(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -10263,7 +10050,7 @@ public final class QueryProto {
if (size != -1) return size;
size = 0;
- if (!getLedgerBytes().isEmpty()) {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ledger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
}
if (startTimestamp_ != 0L) {
@@ -10278,7 +10065,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, filters_.get(i));
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -10301,7 +10088,7 @@ public final class QueryProto {
!= other.getEndTimestamp()) return false;
if (!getFiltersList()
.equals(other.getFiltersList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -10324,7 +10111,7 @@ public final class QueryProto {
hash = (37 * hash) + FILTERS_FIELD_NUMBER;
hash = (53 * hash) + getFiltersList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -10373,11 +10160,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -10441,35 +10230,28 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getFiltersFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
ledger_ = "";
-
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
if (filtersBuilder_ == null) {
filters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ filters_ = null;
filtersBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@@ -10496,21 +10278,35 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest result = new org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest(this);
- int from_bitField0_ = bitField0_;
- result.ledger_ = ledger_;
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest result) {
if (filtersBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000008) != 0)) {
filters_ = java.util.Collections.unmodifiableList(filters_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
}
result.filters_ = filters_;
} else {
result.filters_ = filtersBuilder_.build();
}
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.ledger_ = ledger_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
}
@java.lang.Override
@@ -10559,6 +10355,7 @@ public final class QueryProto {
if (other == org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.getStartTimestamp() != 0L) {
@@ -10571,7 +10368,7 @@ public final class QueryProto {
if (!other.filters_.isEmpty()) {
if (filters_.isEmpty()) {
filters_ = other.filters_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureFiltersIsMutable();
filters_.addAll(other.filters_);
@@ -10584,7 +10381,7 @@ public final class QueryProto {
filtersBuilder_.dispose();
filtersBuilder_ = null;
filters_ = other.filters_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
filtersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFiltersFieldBuilder() : null;
@@ -10593,7 +10390,7 @@ public final class QueryProto {
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -10608,17 +10405,58 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest 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: {
+ ledger_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter.parser(),
+ extensionRegistry);
+ if (filtersBuilder_ == null) {
+ ensureFiltersIsMutable();
+ filters_.add(m);
+ } else {
+ filtersBuilder_.addMessage(m);
+ }
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -10676,11 +10514,9 @@ public final class QueryProto {
*/
public Builder setLedger(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
+ if (value == null) { throw new NullPointerException(); }
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -10693,8 +10529,8 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearLedger() {
-
ledger_ = getDefaultInstance().getLedger();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -10709,12 +10545,10 @@ public final class QueryProto {
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
ledger_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -10742,8 +10576,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -10756,7 +10591,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -10785,8 +10620,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -10799,7 +10635,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -10808,9 +10644,9 @@ public final class QueryProto {
private java.util.List filters_ =
java.util.Collections.emptyList();
private void ensureFiltersIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
+ if (!((bitField0_ & 0x00000008) != 0)) {
filters_ = new java.util.ArrayList(filters_);
- bitField0_ |= 0x00000001;
+ bitField0_ |= 0x00000008;
}
}
@@ -11004,7 +10840,7 @@ public final class QueryProto {
public Builder clearFilters() {
if (filtersBuilder_ == null) {
filters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
filtersBuilder_.clear();
@@ -11109,7 +10945,7 @@ public final class QueryProto {
filtersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter, org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilter.Builder, org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionFilterOrBuilder>(
filters_,
- ((bitField0_ & 0x00000001) != 0),
+ ((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
filters_ = null;
@@ -11149,7 +10985,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new TransactionsRequest(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();
}
};
@@ -11260,71 +11107,6 @@ public final class QueryProto {
return new GetTransactionsResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private GetTransactionsResponse(
- 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)) {
- transactions_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- transactions_.add(
- input.readMessage(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(), extensionRegistry));
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- transactions_ = java.util.Collections.unmodifiableList(transactions_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_GetTransactionsResponse_descriptor;
@@ -11339,6 +11121,7 @@ public final class QueryProto {
}
public static final int TRANSACTIONS_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
private java.util.List transactions_;
/**
*
@@ -11399,7 +11182,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围开始时间戳
@@ -11414,7 +11197,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围结束时间戳
@@ -11451,7 +11234,7 @@ public final class QueryProto {
if (endTimestamp_ != 0L) {
output.writeInt64(3, endTimestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -11472,7 +11255,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -11493,7 +11276,7 @@ public final class QueryProto {
!= other.getStartTimestamp()) return false;
if (getEndTimestamp()
!= other.getEndTimestamp()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -11514,7 +11297,7 @@ public final class QueryProto {
hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -11563,11 +11346,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -11631,33 +11416,27 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getTransactionsFieldBuilder();
- }
+
}
@java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
if (transactionsBuilder_ == null) {
transactions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ transactions_ = null;
transactionsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
return this;
}
@@ -11684,7 +11463,13 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse(this);
- int from_bitField0_ = bitField0_;
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse result) {
if (transactionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
transactions_ = java.util.Collections.unmodifiableList(transactions_);
@@ -11694,10 +11479,16 @@ public final class QueryProto {
} else {
result.transactions_ = transactionsBuilder_.build();
}
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
- onBuilt();
- return result;
+ }
+
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
}
@java.lang.Override
@@ -11776,7 +11567,7 @@ public final class QueryProto {
if (other.getEndTimestamp() != 0L) {
setEndTimestamp(other.getEndTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -11791,17 +11582,53 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse 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: {
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction m =
+ input.readMessage(
+ org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(),
+ extensionRegistry);
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.add(m);
+ } else {
+ transactionsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -12141,8 +11968,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -12155,7 +11983,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -12184,8 +12012,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -12198,7 +12027,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -12236,7 +12065,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetTransactionsResponse(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();
}
};
@@ -12312,63 +12152,6 @@ public final class QueryProto {
return new CountTransactionsResponse();
}
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private CountTransactionsResponse(
- 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: {
-
- count_ = input.readUInt64();
- break;
- }
- case 16: {
-
- startTimestamp_ = input.readInt64();
- break;
- }
- case 24: {
-
- endTimestamp_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryProto.internal_static_bdware_bdledger_api_CountTransactionsResponse_descriptor;
@@ -12383,7 +12166,7 @@ public final class QueryProto {
}
public static final int COUNT_FIELD_NUMBER = 1;
- private long count_;
+ private long count_ = 0L;
/**
*
* 事务数量
@@ -12398,7 +12181,7 @@ public final class QueryProto {
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 2;
- private long startTimestamp_;
+ private long startTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围开始时间戳
@@ -12413,7 +12196,7 @@ public final class QueryProto {
}
public static final int END_TIMESTAMP_FIELD_NUMBER = 3;
- private long endTimestamp_;
+ private long endTimestamp_ = 0L;
/**
*
* 本次查询有效的查询范围结束时间戳
@@ -12450,7 +12233,7 @@ public final class QueryProto {
if (endTimestamp_ != 0L) {
output.writeInt64(3, endTimestamp_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -12471,7 +12254,7 @@ public final class QueryProto {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimestamp_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -12492,7 +12275,7 @@ public final class QueryProto {
!= other.getStartTimestamp()) return false;
if (getEndTimestamp()
!= other.getEndTimestamp()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -12512,7 +12295,7 @@ public final class QueryProto {
hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -12561,11 +12344,13 @@ public final class QueryProto {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
+
public static org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -12629,28 +12414,21 @@ public final class QueryProto {
// Construct using org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
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();
+ bitField0_ = 0;
count_ = 0L;
-
startTimestamp_ = 0L;
-
endTimestamp_ = 0L;
-
return this;
}
@@ -12677,13 +12455,24 @@ public final class QueryProto {
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse result = new org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse(this);
- result.count_ = count_;
- result.startTimestamp_ = startTimestamp_;
- result.endTimestamp_ = endTimestamp_;
+ if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartial0(org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.count_ = count_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.startTimestamp_ = startTimestamp_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.endTimestamp_ = endTimestamp_;
+ }
+ }
+
@java.lang.Override
public Builder clone() {
return super.clone();
@@ -12737,7 +12526,7 @@ public final class QueryProto {
if (other.getEndTimestamp() != 0L) {
setEndTimestamp(other.getEndTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -12752,19 +12541,48 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse 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: {
+ count_ = input.readUInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16: {
+ startTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ endTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000004;
+ 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 = (org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
+ private int bitField0_;
private long count_ ;
/**
@@ -12789,8 +12607,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setCount(long value) {
-
+
count_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -12803,7 +12622,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearCount() {
-
+ bitField0_ = (bitField0_ & ~0x00000001);
count_ = 0L;
onChanged();
return this;
@@ -12832,8 +12651,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setStartTimestamp(long value) {
-
+
startTimestamp_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -12846,7 +12666,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearStartTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000002);
startTimestamp_ = 0L;
onChanged();
return this;
@@ -12875,8 +12695,9 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder setEndTimestamp(long value) {
-
+
endTimestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -12889,7 +12710,7 @@ public final class QueryProto {
* @return This builder for chaining.
*/
public Builder clearEndTimestamp() {
-
+ bitField0_ = (bitField0_ & ~0x00000004);
endTimestamp_ = 0L;
onChanged();
return this;
@@ -12927,7 +12748,18 @@ public final class QueryProto {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CountTransactionsResponse(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();
}
};