From 8bbe9ae173b2ed433eccb1d9925fc515741723c2 Mon Sep 17 00:00:00 2001 From: Nex Date: Thu, 11 Oct 2018 16:30:37 +0800 Subject: [PATCH] Update gRPC API --- .../bdchain/api/grpc/AccountingChainGrpc.java | 89 +- .../api/grpc/AccountingChainProto.java | 87 +- .../api/grpc/ClientVersionResponse.java | 569 ++++++ .../grpc/ClientVersionResponseOrBuilder.java | 27 + .../java/bdchain/api/grpc/CommonProto.java | 23 +- .../bdchain/api/grpc/ErrorDetailsProto.java | 71 + .../bdchain/api/grpc/InvalidArgument.java | 1650 +++++++++++++++++ .../api/grpc/InvalidArgumentOrBuilder.java | 53 + .../api/grpc/TransactionLedgerGrpc.java | 83 +- .../api/grpc/TransactionLedgerProto.java | 22 +- 10 files changed, 2607 insertions(+), 67 deletions(-) create mode 100644 src/main/java/bdchain/api/grpc/ClientVersionResponse.java create mode 100644 src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java create mode 100644 src/main/java/bdchain/api/grpc/ErrorDetailsProto.java create mode 100644 src/main/java/bdchain/api/grpc/InvalidArgument.java create mode 100644 src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java diff --git a/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java b/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java index 4daa5f6..802f823 100644 --- a/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java +++ b/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java @@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.14.0)", + value = "by gRPC proto compiler (version 1.15.0)", comments = "Source: bdchain/api/ac_chain.proto") public final class AccountingChainGrpc { @@ -27,6 +27,38 @@ public final class AccountingChainGrpc { public static final String SERVICE_NAME = "bdchain.api.AccountingChain"; // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getClientVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ClientVersion", + requestType = com.google.protobuf.Empty.class, + responseType = bdchain.api.grpc.ClientVersionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getClientVersionMethod() { + io.grpc.MethodDescriptor getClientVersionMethod; + if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) { + synchronized (AccountingChainGrpc.class) { + if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) { + AccountingChainGrpc.getClientVersionMethod = getClientVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "bdchain.api.AccountingChain", "ClientVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + bdchain.api.grpc.ClientVersionResponse.getDefaultInstance())) + .setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("ClientVersion")) + .build(); + } + } + } + return getClientVersionMethod; + } + private static volatile io.grpc.MethodDescriptor getBlockNumberMethod; @@ -246,6 +278,13 @@ public final class AccountingChainGrpc { */ public static abstract class AccountingChainImplBase implements io.grpc.BindableService { + /** + */ + public void clientVersion(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver); + } + /** */ public void blockNumber(bdchain.api.grpc.BlockNumberRequest request, @@ -290,6 +329,13 @@ public final class AccountingChainGrpc { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getClientVersionMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + bdchain.api.grpc.ClientVersionResponse>( + this, METHODID_CLIENT_VERSION))) .addMethod( getBlockNumberMethod(), asyncUnaryCall( @@ -354,6 +400,14 @@ public final class AccountingChainGrpc { return new AccountingChainStub(channel, callOptions); } + /** + */ + public void clientVersion(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void blockNumber(bdchain.api.grpc.BlockNumberRequest request, @@ -421,6 +475,13 @@ public final class AccountingChainGrpc { return new AccountingChainBlockingStub(channel, callOptions); } + /** + */ + public bdchain.api.grpc.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) { + return blockingUnaryCall( + getChannel(), getClientVersionMethod(), getCallOptions(), request); + } + /** */ public bdchain.api.grpc.BlockNumberResponse blockNumber(bdchain.api.grpc.BlockNumberRequest request) { @@ -482,6 +543,14 @@ public final class AccountingChainGrpc { return new AccountingChainFutureStub(channel, callOptions); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture clientVersion( + com.google.protobuf.Empty request) { + return futureUnaryCall( + getChannel().newCall(getClientVersionMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture blockNumber( @@ -531,12 +600,13 @@ public final class AccountingChainGrpc { } } - private static final int METHODID_BLOCK_NUMBER = 0; - private static final int METHODID_GET_BLOCK_BY_NUMBER = 1; - private static final int METHODID_GET_BLOCK_BY_HASH = 2; - private static final int METHODID_GET_TRANSACTION_BY_HASH = 3; - private static final int METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX = 4; - private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 5; + private static final int METHODID_CLIENT_VERSION = 0; + private static final int METHODID_BLOCK_NUMBER = 1; + private static final int METHODID_GET_BLOCK_BY_NUMBER = 2; + private static final int METHODID_GET_BLOCK_BY_HASH = 3; + private static final int METHODID_GET_TRANSACTION_BY_HASH = 4; + private static final int METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX = 5; + private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -555,6 +625,10 @@ public final class AccountingChainGrpc { @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_CLIENT_VERSION: + serviceImpl.clientVersion((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_BLOCK_NUMBER: serviceImpl.blockNumber((bdchain.api.grpc.BlockNumberRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -640,6 +714,7 @@ public final class AccountingChainGrpc { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AccountingChainFileDescriptorSupplier()) + .addMethod(getClientVersionMethod()) .addMethod(getBlockNumberMethod()) .addMethod(getGetBlockByNumberMethod()) .addMethod(getGetBlockByHashMethod()) diff --git a/src/main/java/bdchain/api/grpc/AccountingChainProto.java b/src/main/java/bdchain/api/grpc/AccountingChainProto.java index d39e2f3..232733a 100644 --- a/src/main/java/bdchain/api/grpc/AccountingChainProto.java +++ b/src/main/java/bdchain/api/grpc/AccountingChainProto.java @@ -69,47 +69,50 @@ public final class AccountingChainProto { static { java.lang.String[] descriptorData = { "\n\032bdchain/api/ac_chain.proto\022\013bdchain.ap" + - "i\032\030bdchain/api/common.proto\"\330\001\n\013Transact" + - "ion\022\024\n\014block_number\030\001 \001(\004\022\022\n\nblock_hash\030" + - "\002 \001(\014\022\r\n\005index\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\022*\n\004ty" + - "pe\030\005 \001(\0162\034.bdchain.api.TransactionType\022\014" + - "\n\004from\030\006 \001(\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 \001(\014\022" + - "\014\n\004data\030\t \001(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022\t\n\001s" + - "\030\014 \001(\014\"\323\001\n\005Block\022\016\n\006number\030\001 \001(\004\022\014\n\004hash" + - "\030\002 \001(\014\022\023\n\013parent_hash\030\003 \001(\014\022\017\n\007witness\030\004" + - " \001(\014\022\021\n\ttimestamp\030\005 \001(\004\022\014\n\004size\030\006 \001(\004\022\031\n" + - "\021transactions_root\030\007 \001(\014\022.\n\014transactions" + - "\030\010 \003(\0132\030.bdchain.api.Transaction\022\032\n\022tran" + - "saction_hashes\030\t \003(\014\"$\n\022BlockNumberReque" + - "st\022\016\n\006ledger\030\001 \001(\t\"+\n\023BlockNumberRespons" + - "e\022\024\n\014block_number\030\001 \001(\004\"S\n\027GetBlockByNum" + - "berRequest\022\016\n\006ledger\030\001 \001(\t\022\016\n\006number\030\002 \001" + - "(\004\022\030\n\020full_transaction\030\003 \001(\010\"O\n\025GetBlock" + - "ByHashRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 " + - "\001(\014\022\030\n\020full_transaction\030\003 \001(\010\";\n\033GetTran" + - "sactionByHashRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004" + - "hash\030\002 \001(\014\"a\n*GetTransactionByBlockNumbe" + - "rAndIndexRequest\022\016\n\006ledger\030\001 \001(\t\022\024\n\014bloc" + - "k_number\030\002 \001(\004\022\r\n\005index\030\003 \001(\r\"]\n(GetTran" + - "sactionByBlockHashAndIndexRequest\022\016\n\006led" + - "ger\030\001 \001(\t\022\022\n\nblock_hash\030\002 \001(\014\022\r\n\005index\030\003" + - " \001(\r2\307\004\n\017AccountingChain\022P\n\013BlockNumber\022" + - "\037.bdchain.api.BlockNumberRequest\032 .bdcha" + - "in.api.BlockNumberResponse\022L\n\020GetBlockBy" + - "Number\022$.bdchain.api.GetBlockByNumberReq" + - "uest\032\022.bdchain.api.Block\022H\n\016GetBlockByHa" + - "sh\022\".bdchain.api.GetBlockByHashRequest\032\022" + - ".bdchain.api.Block\022Z\n\024GetTransactionByHa" + - "sh\022(.bdchain.api.GetTransactionByHashReq" + - "uest\032\030.bdchain.api.Transaction\022x\n#GetTra" + - "nsactionByBlockNumberAndIndex\0227.bdchain." + - "api.GetTransactionByBlockNumberAndIndexR" + - "equest\032\030.bdchain.api.Transaction\022t\n!GetT" + - "ransactionByBlockHashAndIndex\0225.bdchain." + - "api.GetTransactionByBlockHashAndIndexReq" + - "uest\032\030.bdchain.api.TransactionB@\n\020bdchai" + - "n.api.grpcB\024AccountingChainProtoP\001Z\024bdch" + - "ain/api/ac_chainb\006proto3" + "i\032\033google/protobuf/empty.proto\032\030bdchain/" + + "api/common.proto\"\330\001\n\013Transaction\022\024\n\014bloc" + + "k_number\030\001 \001(\004\022\022\n\nblock_hash\030\002 \001(\014\022\r\n\005in" + + "dex\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\022*\n\004type\030\005 \001(\0162\034." + + "bdchain.api.TransactionType\022\014\n\004from\030\006 \001(" + + "\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 \001(\014\022\014\n\004data\030\t \001" + + "(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022\t\n\001s\030\014 \001(\014\"\323\001\n\005" + + "Block\022\016\n\006number\030\001 \001(\004\022\014\n\004hash\030\002 \001(\014\022\023\n\013p" + + "arent_hash\030\003 \001(\014\022\017\n\007witness\030\004 \001(\014\022\021\n\ttim" + + "estamp\030\005 \001(\004\022\014\n\004size\030\006 \001(\004\022\031\n\021transactio" + + "ns_root\030\007 \001(\014\022.\n\014transactions\030\010 \003(\0132\030.bd" + + "chain.api.Transaction\022\032\n\022transaction_has" + + "hes\030\t \003(\014\"$\n\022BlockNumberRequest\022\016\n\006ledge" + + "r\030\001 \001(\t\"+\n\023BlockNumberResponse\022\024\n\014block_" + + "number\030\001 \001(\004\"S\n\027GetBlockByNumberRequest\022" + + "\016\n\006ledger\030\001 \001(\t\022\016\n\006number\030\002 \001(\004\022\030\n\020full_" + + "transaction\030\003 \001(\010\"O\n\025GetBlockByHashReque" + + "st\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\022\030\n\020full" + + "_transaction\030\003 \001(\010\";\n\033GetTransactionByHa" + + "shRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\"" + + "a\n*GetTransactionByBlockNumberAndIndexRe" + + "quest\022\016\n\006ledger\030\001 \001(\t\022\024\n\014block_number\030\002 " + + "\001(\004\022\r\n\005index\030\003 \001(\r\"]\n(GetTransactionByBl" + + "ockHashAndIndexRequest\022\016\n\006ledger\030\001 \001(\t\022\022" + + "\n\nblock_hash\030\002 \001(\014\022\r\n\005index\030\003 \001(\r2\224\005\n\017Ac" + + "countingChain\022K\n\rClientVersion\022\026.google." + + "protobuf.Empty\032\".bdchain.api.ClientVersi" + + "onResponse\022P\n\013BlockNumber\022\037.bdchain.api." + + "BlockNumberRequest\032 .bdchain.api.BlockNu" + + "mberResponse\022L\n\020GetBlockByNumber\022$.bdcha" + + "in.api.GetBlockByNumberRequest\032\022.bdchain" + + ".api.Block\022H\n\016GetBlockByHash\022\".bdchain.a" + + "pi.GetBlockByHashRequest\032\022.bdchain.api.B" + + "lock\022Z\n\024GetTransactionByHash\022(.bdchain.a" + + "pi.GetTransactionByHashRequest\032\030.bdchain" + + ".api.Transaction\022x\n#GetTransactionByBloc" + + "kNumberAndIndex\0227.bdchain.api.GetTransac" + + "tionByBlockNumberAndIndexRequest\032\030.bdcha" + + "in.api.Transaction\022t\n!GetTransactionByBl" + + "ockHashAndIndex\0225.bdchain.api.GetTransac" + + "tionByBlockHashAndIndexRequest\032\030.bdchain" + + ".api.TransactionBD\n\020bdchain.api.grpcB\024Ac" + + "countingChainProtoP\001Z\030bdchain/api/grpc/a" + + "cchainb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -122,6 +125,7 @@ public final class AccountingChainProto { com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.EmptyProto.getDescriptor(), bdchain.api.grpc.CommonProto.getDescriptor(), }, assigner); internal_static_bdchain_api_Transaction_descriptor = @@ -178,6 +182,7 @@ public final class AccountingChainProto { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor, new java.lang.String[] { "Ledger", "BlockHash", "Index", }); + com.google.protobuf.EmptyProto.getDescriptor(); bdchain.api.grpc.CommonProto.getDescriptor(); } diff --git a/src/main/java/bdchain/api/grpc/ClientVersionResponse.java b/src/main/java/bdchain/api/grpc/ClientVersionResponse.java new file mode 100644 index 0000000..b6fed80 --- /dev/null +++ b/src/main/java/bdchain/api/grpc/ClientVersionResponse.java @@ -0,0 +1,569 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: bdchain/api/common.proto + +package bdchain.api.grpc; + +/** + * Protobuf type {@code bdchain.api.ClientVersionResponse} + */ +public final class ClientVersionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:bdchain.api.ClientVersionResponse) + ClientVersionResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ClientVersionResponse.newBuilder() to construct. + private ClientVersionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ClientVersionResponse() { + version_ = ""; + } + + @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(); + } + 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(); + + version_ = s; + break; + } + default: { + if (!parseUnknownFieldProto3( + 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 bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * 节点客户端版本
+   * 
+ * + * string version = 1; + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * 节点客户端版本
+   * 
+ * + * string version = 1; + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof bdchain.api.grpc.ClientVersionResponse)) { + return super.equals(obj); + } + bdchain.api.grpc.ClientVersionResponse other = (bdchain.api.grpc.ClientVersionResponse) obj; + + boolean result = true; + result = result && getVersion() + .equals(other.getVersion()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.ClientVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(bdchain.api.grpc.ClientVersionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code bdchain.api.ClientVersionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:bdchain.api.ClientVersionResponse) + bdchain.api.grpc.ClientVersionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class); + } + + // Construct using bdchain.api.grpc.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(); + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor; + } + + @java.lang.Override + public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() { + return bdchain.api.grpc.ClientVersionResponse.getDefaultInstance(); + } + + @java.lang.Override + public bdchain.api.grpc.ClientVersionResponse build() { + bdchain.api.grpc.ClientVersionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public bdchain.api.grpc.ClientVersionResponse buildPartial() { + bdchain.api.grpc.ClientVersionResponse result = new bdchain.api.grpc.ClientVersionResponse(this); + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof bdchain.api.grpc.ClientVersionResponse) { + return mergeFrom((bdchain.api.grpc.ClientVersionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(bdchain.api.grpc.ClientVersionResponse other) { + if (other == bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + bdchain.api.grpc.ClientVersionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (bdchain.api.grpc.ClientVersionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * 节点客户端版本
+     * 
+ * + * string version = 1; + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 节点客户端版本
+     * 
+ * + * string version = 1; + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 节点客户端版本
+     * 
+ * + * string version = 1; + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * 节点客户端版本
+     * 
+ * + * string version = 1; + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * 节点客户端版本
+     * 
+ * + * string version = 1; + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:bdchain.api.ClientVersionResponse) + } + + // @@protoc_insertion_point(class_scope:bdchain.api.ClientVersionResponse) + private static final bdchain.api.grpc.ClientVersionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new bdchain.api.grpc.ClientVersionResponse(); + } + + public static bdchain.api.grpc.ClientVersionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientVersionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientVersionResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java new file mode 100644 index 0000000..7f545c4 --- /dev/null +++ b/src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: bdchain/api/common.proto + +package bdchain.api.grpc; + +public interface ClientVersionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:bdchain.api.ClientVersionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 节点客户端版本
+   * 
+ * + * string version = 1; + */ + java.lang.String getVersion(); + /** + *
+   * 节点客户端版本
+   * 
+ * + * string version = 1; + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/src/main/java/bdchain/api/grpc/CommonProto.java b/src/main/java/bdchain/api/grpc/CommonProto.java index 23826ac..65722ff 100644 --- a/src/main/java/bdchain/api/grpc/CommonProto.java +++ b/src/main/java/bdchain/api/grpc/CommonProto.java @@ -14,6 +14,11 @@ public final class CommonProto { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_bdchain_api_ClientVersionResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -23,11 +28,13 @@ public final class CommonProto { descriptor; static { java.lang.String[] descriptorData = { - "\n\030bdchain/api/common.proto\022\013bdchain.api*" + - "Z\n\017TransactionType\022\n\n\006RECORD\020\000\022\013\n\007MESSAG" + - "E\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023CONTRACT_I" + - "NVOCATION\020\003B5\n\020bdchain.api.grpcB\013CommonP" + - "rotoP\001Z\022bdchain/api/commonb\006proto3" + "\n\030bdchain/api/common.proto\022\013bdchain.api\"" + + "(\n\025ClientVersionResponse\022\017\n\007version\030\001 \001(" + + "\t*Z\n\017TransactionType\022\n\n\006RECORD\020\000\022\013\n\007MESS" + + "AGE\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023CONTRACT" + + "_INVOCATION\020\003B:\n\020bdchain.api.grpcB\013Commo" + + "nProtoP\001Z\027bdchain/api/grpc/commonb\006proto" + + "3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -41,6 +48,12 @@ public final class CommonProto { .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); + internal_static_bdchain_api_ClientVersionResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_bdchain_api_ClientVersionResponse_descriptor, + new java.lang.String[] { "Version", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/main/java/bdchain/api/grpc/ErrorDetailsProto.java b/src/main/java/bdchain/api/grpc/ErrorDetailsProto.java new file mode 100644 index 0000000..4461ea2 --- /dev/null +++ b/src/main/java/bdchain/api/grpc/ErrorDetailsProto.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: bdchain/api/error_details.proto + +package bdchain.api.grpc; + +public final class ErrorDetailsProto { + private ErrorDetailsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_bdchain_api_InvalidArgument_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_bdchain_api_InvalidArgument_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037bdchain/api/error_details.proto\022\013bdcha" + + "in.api\"\216\001\n\017InvalidArgument\022E\n\020field_viol" + + "ations\030\001 \003(\0132+.bdchain.api.InvalidArgume" + + "nt.FieldViolation\0324\n\016FieldViolation\022\r\n\005f" + + "ield\030\001 \001(\t\022\023\n\013description\030\002 \001(\tBD\n\020bdcha" + + "in.api.grpcB\021ErrorDetailsProtoP\001Z\033bdchai" + + "n/api/grpc/errdetailsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_bdchain_api_InvalidArgument_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_bdchain_api_InvalidArgument_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_bdchain_api_InvalidArgument_descriptor, + new java.lang.String[] { "FieldViolations", }); + internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor = + internal_static_bdchain_api_InvalidArgument_descriptor.getNestedTypes().get(0); + internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor, + new java.lang.String[] { "Field", "Description", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/bdchain/api/grpc/InvalidArgument.java b/src/main/java/bdchain/api/grpc/InvalidArgument.java new file mode 100644 index 0000000..576e7b6 --- /dev/null +++ b/src/main/java/bdchain/api/grpc/InvalidArgument.java @@ -0,0 +1,1650 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: bdchain/api/error_details.proto + +package bdchain.api.grpc; + +/** + *
+ * InvalidArgument indicates client specified an invalid argument.
+ * Note that this differs from FailedPrecondition. It indicates arguments
+ * that are problematic regardless of the state of the system
+ * (e.g., a malformed file name).
+ * 
+ * + * Protobuf type {@code bdchain.api.InvalidArgument} + */ +public final class InvalidArgument extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:bdchain.api.InvalidArgument) + InvalidArgumentOrBuilder { +private static final long serialVersionUID = 0L; + // Use InvalidArgument.newBuilder() to construct. + private InvalidArgument(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvalidArgument() { + fieldViolations_ = java.util.Collections.emptyList(); + } + + @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) == 0x00000001)) { + fieldViolations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldViolations_.add( + input.readMessage(bdchain.api.grpc.InvalidArgument.FieldViolation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownFieldProto3( + 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) == 0x00000001)) { + fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.InvalidArgument.class, bdchain.api.grpc.InvalidArgument.Builder.class); + } + + public interface FieldViolationOrBuilder extends + // @@protoc_insertion_point(interface_extends:bdchain.api.InvalidArgument.FieldViolation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "field_violations.field" would identify this field.
+     * 
+ * + * string field = 1; + */ + java.lang.String getField(); + /** + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "field_violations.field" would identify this field.
+     * 
+ * + * string field = 1; + */ + com.google.protobuf.ByteString + getFieldBytes(); + + /** + *
+     * A description of why the request element is bad.
+     * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + *
+     * A description of why the request element is bad.
+     * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * A message type used to describe a single invalid field.
+   * 
+ * + * Protobuf type {@code bdchain.api.InvalidArgument.FieldViolation} + */ + public static final class FieldViolation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:bdchain.api.InvalidArgument.FieldViolation) + FieldViolationOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldViolation.newBuilder() to construct. + private FieldViolation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FieldViolation() { + field_ = ""; + description_ = ""; + } + + @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(); + } + 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(); + + field_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownFieldProto3( + 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 bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.InvalidArgument.FieldViolation.class, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "field_violations.field" would identify this field.
+     * 
+ * + * string field = 1; + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "field_violations.field" would identify this field.
+     * 
+ * + * string field = 1; + */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+     * A description of why the request element is bad.
+     * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * A description of why the request element is bad.
+     * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFieldBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFieldBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof bdchain.api.grpc.InvalidArgument.FieldViolation)) { + return super.equals(obj); + } + bdchain.api.grpc.InvalidArgument.FieldViolation other = (bdchain.api.grpc.InvalidArgument.FieldViolation) obj; + + boolean result = true; + result = result && getField() + .equals(other.getField()); + result = result && getDescription() + .equals(other.getDescription()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(bdchain.api.grpc.InvalidArgument.FieldViolation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A message type used to describe a single invalid field.
+     * 
+ * + * Protobuf type {@code bdchain.api.InvalidArgument.FieldViolation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:bdchain.api.InvalidArgument.FieldViolation) + bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.InvalidArgument.FieldViolation.class, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder.class); + } + + // Construct using bdchain.api.grpc.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(); + field_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstanceForType() { + return bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance(); + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument.FieldViolation build() { + bdchain.api.grpc.InvalidArgument.FieldViolation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument.FieldViolation buildPartial() { + bdchain.api.grpc.InvalidArgument.FieldViolation result = new bdchain.api.grpc.InvalidArgument.FieldViolation(this); + result.field_ = field_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof bdchain.api.grpc.InvalidArgument.FieldViolation) { + return mergeFrom((bdchain.api.grpc.InvalidArgument.FieldViolation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(bdchain.api.grpc.InvalidArgument.FieldViolation other) { + if (other == bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + bdchain.api.grpc.InvalidArgument.FieldViolation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (bdchain.api.grpc.InvalidArgument.FieldViolation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object field_ = ""; + /** + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "field_violations.field" would identify this field.
+       * 
+ * + * string field = 1; + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "field_violations.field" would identify this field.
+       * 
+ * + * string field = 1; + */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "field_violations.field" would identify this field.
+       * 
+ * + * string field = 1; + */ + public Builder setField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "field_violations.field" would identify this field.
+       * 
+ * + * string field = 1; + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "field_violations.field" would identify this field.
+       * 
+ * + * string field = 1; + */ + public Builder setFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * A description of why the request element is bad.
+       * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A description of why the request element is bad.
+       * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A description of why the request element is bad.
+       * 
+ * + * string description = 2; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * A description of why the request element is bad.
+       * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * A description of why the request element is bad.
+       * 
+ * + * string description = 2; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:bdchain.api.InvalidArgument.FieldViolation) + } + + // @@protoc_insertion_point(class_scope:bdchain.api.InvalidArgument.FieldViolation) + private static final bdchain.api.grpc.InvalidArgument.FieldViolation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new bdchain.api.grpc.InvalidArgument.FieldViolation(); + } + + public static bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldViolation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldViolation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1; + private java.util.List fieldViolations_; + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public java.util.List getFieldViolationsList() { + return fieldViolations_; + } + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public java.util.List + getFieldViolationsOrBuilderList() { + return fieldViolations_; + } + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public int getFieldViolationsCount() { + return fieldViolations_.size(); + } + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index) { + return fieldViolations_.get(index); + } + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index) { + return fieldViolations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fieldViolations_.size(); i++) { + output.writeMessage(1, fieldViolations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fieldViolations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fieldViolations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof bdchain.api.grpc.InvalidArgument)) { + return super.equals(obj); + } + bdchain.api.grpc.InvalidArgument other = (bdchain.api.grpc.InvalidArgument) obj; + + boolean result = true; + result = result && getFieldViolationsList() + .equals(other.getFieldViolationsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldViolationsCount() > 0) { + hash = (37 * hash) + FIELD_VIOLATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFieldViolationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static bdchain.api.grpc.InvalidArgument parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static bdchain.api.grpc.InvalidArgument parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(bdchain.api.grpc.InvalidArgument prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * InvalidArgument indicates client specified an invalid argument.
+   * Note that this differs from FailedPrecondition. It indicates arguments
+   * that are problematic regardless of the state of the system
+   * (e.g., a malformed file name).
+   * 
+ * + * Protobuf type {@code bdchain.api.InvalidArgument} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:bdchain.api.InvalidArgument) + bdchain.api.grpc.InvalidArgumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + bdchain.api.grpc.InvalidArgument.class, bdchain.api.grpc.InvalidArgument.Builder.class); + } + + // Construct using bdchain.api.grpc.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(); + if (fieldViolationsBuilder_ == null) { + fieldViolations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldViolationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument getDefaultInstanceForType() { + return bdchain.api.grpc.InvalidArgument.getDefaultInstance(); + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument build() { + bdchain.api.grpc.InvalidArgument result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument buildPartial() { + bdchain.api.grpc.InvalidArgument result = new bdchain.api.grpc.InvalidArgument(this); + int from_bitField0_ = bitField0_; + if (fieldViolationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldViolations_ = fieldViolations_; + } else { + result.fieldViolations_ = fieldViolationsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof bdchain.api.grpc.InvalidArgument) { + return mergeFrom((bdchain.api.grpc.InvalidArgument)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(bdchain.api.grpc.InvalidArgument other) { + if (other == bdchain.api.grpc.InvalidArgument.getDefaultInstance()) return this; + if (fieldViolationsBuilder_ == null) { + if (!other.fieldViolations_.isEmpty()) { + if (fieldViolations_.isEmpty()) { + fieldViolations_ = other.fieldViolations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldViolationsIsMutable(); + fieldViolations_.addAll(other.fieldViolations_); + } + onChanged(); + } + } else { + if (!other.fieldViolations_.isEmpty()) { + if (fieldViolationsBuilder_.isEmpty()) { + fieldViolationsBuilder_.dispose(); + fieldViolationsBuilder_ = null; + fieldViolations_ = other.fieldViolations_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldViolationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldViolationsFieldBuilder() : null; + } else { + fieldViolationsBuilder_.addAllMessages(other.fieldViolations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + bdchain.api.grpc.InvalidArgument parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (bdchain.api.grpc.InvalidArgument) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List fieldViolations_ = + java.util.Collections.emptyList(); + private void ensureFieldViolationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + fieldViolations_ = new java.util.ArrayList(fieldViolations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_; + + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public java.util.List getFieldViolationsList() { + if (fieldViolationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldViolations_); + } else { + return fieldViolationsBuilder_.getMessageList(); + } + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public int getFieldViolationsCount() { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.size(); + } else { + return fieldViolationsBuilder_.getCount(); + } + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index) { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.get(index); + } else { + return fieldViolationsBuilder_.getMessage(index); + } + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder setFieldViolations( + int index, bdchain.api.grpc.InvalidArgument.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.set(index, value); + onChanged(); + } else { + fieldViolationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder setFieldViolations( + int index, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder addFieldViolations(bdchain.api.grpc.InvalidArgument.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.add(value); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder addFieldViolations( + int index, bdchain.api.grpc.InvalidArgument.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.add(index, value); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder addFieldViolations( + bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.add(builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder addFieldViolations( + int index, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder addAllFieldViolations( + java.lang.Iterable values) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fieldViolations_); + onChanged(); + } else { + fieldViolationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder clearFieldViolations() { + if (fieldViolationsBuilder_ == null) { + fieldViolations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldViolationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public Builder removeFieldViolations(int index) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.remove(index); + onChanged(); + } else { + fieldViolationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder( + int index) { + return getFieldViolationsFieldBuilder().getBuilder(index); + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index) { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.get(index); } else { + return fieldViolationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public java.util.List + getFieldViolationsOrBuilderList() { + if (fieldViolationsBuilder_ != null) { + return fieldViolationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldViolations_); + } + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() { + return getFieldViolationsFieldBuilder().addBuilder( + bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance()); + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder( + int index) { + return getFieldViolationsFieldBuilder().addBuilder( + index, bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance()); + } + /** + *
+     * Describes all violations in a client request.
+     * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + public java.util.List + getFieldViolationsBuilderList() { + return getFieldViolationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder> + getFieldViolationsFieldBuilder() { + if (fieldViolationsBuilder_ == null) { + fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>( + fieldViolations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + fieldViolations_ = null; + } + return fieldViolationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:bdchain.api.InvalidArgument) + } + + // @@protoc_insertion_point(class_scope:bdchain.api.InvalidArgument) + private static final bdchain.api.grpc.InvalidArgument DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new bdchain.api.grpc.InvalidArgument(); + } + + public static bdchain.api.grpc.InvalidArgument getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvalidArgument parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvalidArgument(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public bdchain.api.grpc.InvalidArgument getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java b/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java new file mode 100644 index 0000000..51965e1 --- /dev/null +++ b/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: bdchain/api/error_details.proto + +package bdchain.api.grpc; + +public interface InvalidArgumentOrBuilder extends + // @@protoc_insertion_point(interface_extends:bdchain.api.InvalidArgument) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + java.util.List + getFieldViolationsList(); + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index); + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + int getFieldViolationsCount(); + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + java.util.List + getFieldViolationsOrBuilderList(); + /** + *
+   * Describes all violations in a client request.
+   * 
+ * + * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1; + */ + bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index); +} diff --git a/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java b/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java index 646a42d..3a37001 100644 --- a/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java +++ b/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java @@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.14.0)", + value = "by gRPC proto compiler (version 1.15.0)", comments = "Source: bdchain/api/tx_ledger.proto") public final class TransactionLedgerGrpc { @@ -27,6 +27,38 @@ public final class TransactionLedgerGrpc { public static final String SERVICE_NAME = "bdchain.api.TransactionLedger"; // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getClientVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ClientVersion", + requestType = com.google.protobuf.Empty.class, + responseType = bdchain.api.grpc.ClientVersionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getClientVersionMethod() { + io.grpc.MethodDescriptor getClientVersionMethod; + if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) { + synchronized (TransactionLedgerGrpc.class) { + if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) { + TransactionLedgerGrpc.getClientVersionMethod = getClientVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "bdchain.api.TransactionLedger", "ClientVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + bdchain.api.grpc.ClientVersionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("ClientVersion")) + .build(); + } + } + } + return getClientVersionMethod; + } + private static volatile io.grpc.MethodDescriptor getCreateLedgerMethod; @@ -150,6 +182,13 @@ public final class TransactionLedgerGrpc { */ public static abstract class TransactionLedgerImplBase implements io.grpc.BindableService { + /** + */ + public void clientVersion(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver); + } + /** */ public void createLedger(bdchain.api.grpc.CreateLedgerRequest request, @@ -173,6 +212,13 @@ public final class TransactionLedgerGrpc { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getClientVersionMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + bdchain.api.grpc.ClientVersionResponse>( + this, METHODID_CLIENT_VERSION))) .addMethod( getCreateLedgerMethod(), asyncUnaryCall( @@ -216,6 +262,14 @@ public final class TransactionLedgerGrpc { return new TransactionLedgerStub(channel, callOptions); } + /** + */ + public void clientVersion(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void createLedger(bdchain.api.grpc.CreateLedgerRequest request, @@ -259,6 +313,13 @@ public final class TransactionLedgerGrpc { return new TransactionLedgerBlockingStub(channel, callOptions); } + /** + */ + public bdchain.api.grpc.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) { + return blockingUnaryCall( + getChannel(), getClientVersionMethod(), getCallOptions(), request); + } + /** */ public bdchain.api.grpc.CreateLedgerResponse createLedger(bdchain.api.grpc.CreateLedgerRequest request) { @@ -299,6 +360,14 @@ public final class TransactionLedgerGrpc { return new TransactionLedgerFutureStub(channel, callOptions); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture clientVersion( + com.google.protobuf.Empty request) { + return futureUnaryCall( + getChannel().newCall(getClientVersionMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture createLedger( @@ -324,9 +393,10 @@ public final class TransactionLedgerGrpc { } } - private static final int METHODID_CREATE_LEDGER = 0; - private static final int METHODID_GET_LEDGERS = 1; - private static final int METHODID_SEND_TRANSACTION = 2; + private static final int METHODID_CLIENT_VERSION = 0; + private static final int METHODID_CREATE_LEDGER = 1; + private static final int METHODID_GET_LEDGERS = 2; + private static final int METHODID_SEND_TRANSACTION = 3; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -345,6 +415,10 @@ public final class TransactionLedgerGrpc { @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_CLIENT_VERSION: + serviceImpl.clientVersion((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_CREATE_LEDGER: serviceImpl.createLedger((bdchain.api.grpc.CreateLedgerRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -418,6 +492,7 @@ public final class TransactionLedgerGrpc { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new TransactionLedgerFileDescriptorSupplier()) + .addMethod(getClientVersionMethod()) .addMethod(getCreateLedgerMethod()) .addMethod(getGetLedgersMethod()) .addMethod(getSendTransactionMethod()) diff --git a/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java b/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java index fe19ff8..2ef9691 100644 --- a/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java +++ b/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java @@ -64,16 +64,18 @@ public final class TransactionLedgerProto { "on\032a\n\013Transaction\022*\n\004type\030\001 \001(\0162\034.bdchai" + "n.api.TransactionType\022\014\n\004from\030\002 \001(\014\022\n\n\002t" + "o\030\003 \001(\014\022\014\n\004data\030\004 \001(\014\"\'\n\027SendTransaction" + - "Response\022\014\n\004hash\030\001 \001(\0142\215\002\n\021TransactionLe" + - "dger\022S\n\014CreateLedger\022 .bdchain.api.Creat" + - "eLedgerRequest\032!.bdchain.api.CreateLedge" + - "rResponse\022E\n\nGetLedgers\022\026.google.protobu" + - "f.Empty\032\037.bdchain.api.GetLedgersResponse" + - "\022\\\n\017SendTransaction\022#.bdchain.api.SendTr" + - "ansactionRequest\032$.bdchain.api.SendTrans" + - "actionResponseBC\n\020bdchain.api.grpcB\026Tran" + - "sactionLedgerProtoP\001Z\025bdchain/api/tx_led" + - "gerb\006proto3" + "Response\022\014\n\004hash\030\001 \001(\0142\332\002\n\021TransactionLe" + + "dger\022K\n\rClientVersion\022\026.google.protobuf." + + "Empty\032\".bdchain.api.ClientVersionRespons" + + "e\022S\n\014CreateLedger\022 .bdchain.api.CreateLe" + + "dgerRequest\032!.bdchain.api.CreateLedgerRe" + + "sponse\022E\n\nGetLedgers\022\026.google.protobuf.E" + + "mpty\032\037.bdchain.api.GetLedgersResponse\022\\\n" + + "\017SendTransaction\022#.bdchain.api.SendTrans" + + "actionRequest\032$.bdchain.api.SendTransact" + + "ionResponseBG\n\020bdchain.api.grpcB\026Transac" + + "tionLedgerProtoP\001Z\031bdchain/api/grpc/txle" + + "dgerb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {