From 17d598ac816ec3ffbeed0aeab9296afa7e865cad Mon Sep 17 00:00:00 2001 From: Viktor Todorov Date: Thu, 6 Apr 2023 10:01:42 +0300 Subject: [PATCH] Add light client messaging protocol (#57) * Add nabu jar * Add initial Kademlia bootstrap logic * Replace existing Nabu jar with Nabu jar that has dependencies built into it * Add network module * Add network module * Update nabu * Refactor * Remove finished TOTO * Refactor long line * Remove unused import * Refactor time period to constant * Update cli logic * Add comma separator * Rename constant * Remove unused variable * Refactor network module * Change bootnode * Remove westend-local * Refactor DB * Add loading local genesis only from json * Add javadocs * Remove unused import * Refactor * Add light client messaging protocol * Remove unnecessary dependency * Add base warp sync structure * Remove unused annotations * Fix build * Resolve formatting issue * Remove unrelated files --------- Co-authored-by: Boris Velkovski --- .../java/com/limechain/network/Network.java | 13 +- .../network/protobuf/LightClientMessage.proto | 121 + .../substream/lightclient/LightMessages.java | 74 + .../lightclient/LightMessagesController.java | 69 + .../lightclient/LightMessagesEngine.java | 37 + .../lightclient/LightMessagesProtocol.java | 106 + .../lightclient/LightMessagesService.java | 12 + .../lightclient/pb/LightClientMessage.java | 11722 ++++++++++++++++ .../network/protocol/warp/WarpSyncTest.java | 2 + .../lightclient/LightMessagesTest.java | 71 + 10 files changed, 12224 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/limechain/network/protobuf/LightClientMessage.proto create mode 100644 src/main/java/com/limechain/network/substream/lightclient/LightMessages.java create mode 100644 src/main/java/com/limechain/network/substream/lightclient/LightMessagesController.java create mode 100644 src/main/java/com/limechain/network/substream/lightclient/LightMessagesEngine.java create mode 100644 src/main/java/com/limechain/network/substream/lightclient/LightMessagesProtocol.java create mode 100644 src/main/java/com/limechain/network/substream/lightclient/LightMessagesService.java create mode 100644 src/main/java/com/limechain/network/substream/lightclient/pb/com/limechain/network/substream/lightclient/pb/LightClientMessage.java create mode 100644 src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java create mode 100644 src/test/java/com/limechain/network/substream/lightclient/LightMessagesTest.java diff --git a/src/main/java/com/limechain/network/Network.java b/src/main/java/com/limechain/network/Network.java index 7d9223e5c..a1e23798f 100644 --- a/src/main/java/com/limechain/network/Network.java +++ b/src/main/java/com/limechain/network/Network.java @@ -4,6 +4,7 @@ import com.limechain.chain.ChainService; import com.limechain.config.HostConfig; import com.limechain.network.kad.KademliaService; +import com.limechain.network.substream.lightclient.LightMessagesService; import io.ipfs.multihash.Multihash; import io.libp2p.core.Host; import io.libp2p.protocol.Ping; @@ -31,7 +32,8 @@ public class Network { private static final int TEN_SECONDS_IN_MS = 10000; private static final int HOST_PORT = 1001; private static Network network; - public static KademliaService kademliaService; + public LightMessagesService lightMessagesService; + public KademliaService kademliaService; private HostBuilder hostBuilder; private Host host; @@ -42,14 +44,19 @@ public class Network { * Connects Kademlia to boot nodes * * @param chainService chain specification information containing boot nodes - * @param hostConfig host configuration containing current network + * @param hostConfig host configuration containing current network */ private Network(ChainService chainService, HostConfig hostConfig) { boolean isLocalEnabled = hostConfig.getChain() == Chain.LOCAL; hostBuilder = (new HostBuilder()).generateIdentity().listenLocalhost(HOST_PORT); Multihash hostId = Multihash.deserialize(hostBuilder.getPeerId().getBytes()); + kademliaService = new KademliaService("/dot/kad", hostId, isLocalEnabled); - hostBuilder.addProtocols(List.of(new Ping(), kademliaService.getDht())); + lightMessagesService = new LightMessagesService(); + + hostBuilder.addProtocols( + List.of(new Ping(), kademliaService.getDht(), + lightMessagesService.getLightMessages())); host = hostBuilder.build(); kademliaService.setHost(host); diff --git a/src/main/java/com/limechain/network/protobuf/LightClientMessage.proto b/src/main/java/com/limechain/network/protobuf/LightClientMessage.proto new file mode 100644 index 000000000..2f39d1b07 --- /dev/null +++ b/src/main/java/com/limechain/network/protobuf/LightClientMessage.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; + +package com.limechain.network.substream.lightclient.pb; +option java_package = "com.limechain.network.substream.lightclient.pb"; + +// Schema definition for light client messages. +// Copied from https://github.com/paritytech/substrate/blob/9b08105b8c7106d723c4f470304ad9e2868569d9/client/network/src/schema/light.v1.proto + +// A pair of arbitrary bytes. +message Pair { + // The first element of the pair. + bytes fst = 1; + // The second element of the pair. + bytes snd = 2; +} + +// Enumerate all possible light client request messages. +message Request { + oneof request { + RemoteCallRequest remote_call_request = 1; + RemoteReadRequest remote_read_request = 2; + RemoteHeaderRequest remote_header_request = 3; + RemoteReadChildRequest remote_read_child_request = 4; + RemoteChangesRequest remote_changes_request = 5; + } +} + +// Enumerate all possible light client response messages. +message Response { + oneof response { + RemoteCallResponse remote_call_response = 1; + RemoteReadResponse remote_read_response = 2; + RemoteHeaderResponse remote_header_response = 3; + RemoteChangesResponse remote_changes_response = 4; + } +} + +// Remote call request. +message RemoteCallRequest { + // Block at which to perform call. + bytes block = 2; + // Method name. + string method = 3; + // Call data. + bytes data = 4; +} + +// Remote call response. +message RemoteCallResponse { + // Execution proof. + bytes proof = 2; +} + +// Remote storage read request. +message RemoteReadRequest { + // Block at which to perform call. + bytes block = 2; + // Storage keys. + repeated bytes keys = 3; +} + +// Remote read response. +message RemoteReadResponse { + // Read proof. + bytes proof = 2; +} + +// Remote storage read child request. +message RemoteReadChildRequest { + // Block at which to perform call. + bytes block = 2; + // Child Storage key, this is relative + // to the child type storage location. + bytes storage_key = 3; + // Storage keys. + repeated bytes keys = 6; +} + +// Remote header request. +message RemoteHeaderRequest { + // Block number to request header for. + bytes block = 2; +} + +// Remote header response. +message RemoteHeaderResponse { + // Header. None if proof generation has failed (e.g. header is unknown). + bytes header = 2; // optional + // Header proof. + bytes proof = 3; +} + +/// Remote changes request. +message RemoteChangesRequest { + // Hash of the first block of the range (including first) where changes are requested. + bytes first = 2; + // Hash of the last block of the range (including last) where changes are requested. + bytes last = 3; + // Hash of the first block for which the requester has the changes trie root. All other + // affected roots must be proved. + bytes min = 4; + // Hash of the last block that we can use when querying changes. + bytes max = 5; + // Storage child node key which changes are requested. + bytes storage_key = 6; // optional + // Storage key which changes are requested. + bytes key = 7; +} + +// Remote changes response. +message RemoteChangesResponse { + // Proof has been generated using block with this number as a max block. Should be + // less than or equal to the RemoteChangesRequest::max block number. + bytes max = 2; + // Changes proof. + repeated bytes proof = 3; + // Changes tries roots missing on the requester' node. + repeated Pair roots = 4; + // Missing changes tries roots proof. + bytes roots_proof = 5; +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/LightMessages.java b/src/main/java/com/limechain/network/substream/lightclient/LightMessages.java new file mode 100644 index 000000000..8a34cb1fb --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/LightMessages.java @@ -0,0 +1,74 @@ +package com.limechain.network.substream.lightclient; + +import com.limechain.network.substream.lightclient.pb.LightClientMessage; +import io.libp2p.core.AddressBook; +import io.libp2p.core.Host; +import io.libp2p.core.PeerId; +import io.libp2p.core.multiformats.Multiaddr; +import io.libp2p.core.multistream.StrictProtocolBinding; +import lombok.extern.java.Log; + +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; + +@Log +public class LightMessages extends StrictProtocolBinding { + public LightMessages(LightMessagesProtocol protocol) { + super("/dot/light/2", protocol); + + } + + public LightClientMessage.Response remoteCallRequest(Host us, AddressBook addrs, PeerId peer, + String blockHash, + String method, + String data) { + LightMessagesController controller = dialPeer(us, peer, addrs); + try { + LightClientMessage.Response resp = controller.remoteCallRequest(blockHash, method, data).get(); + log.log(Level.INFO, "Received response: " + resp.toString()); + return resp; + } catch (ExecutionException | InterruptedException e) { + log.log(Level.SEVERE, "Error while sending remote call request: ", e); + throw new RuntimeException(e); + } + } + + public LightClientMessage.Response remoteReadRequest(Host us, AddressBook addrs, PeerId peer, + String blockHash, + String[] keys) { + LightMessagesController controller = dialPeer(us, peer, addrs); + try { + LightClientMessage.Response resp = controller.remoteReadRequest(blockHash, keys).get(); + log.log(Level.INFO, "Received response: " + resp.toString()); + return resp; + } catch (ExecutionException | InterruptedException e) { + log.log(Level.SEVERE, "Error while sending remote call request: ", e); + throw new RuntimeException(e); + } + } + + public LightClientMessage.Response remoteReadChildRequest(Host us, AddressBook addrs, PeerId peer, + String blockHash, + String childStorageKey, + String[] keys) { + LightMessagesController controller = dialPeer(us, peer, addrs); + try { + LightClientMessage.Response resp = + controller.remoteReadChildRequest(blockHash, childStorageKey, keys).get(); + log.log(Level.INFO, "Received response: " + resp.toString()); + return resp; + } catch (ExecutionException | InterruptedException e) { + log.log(Level.SEVERE, "Error while sending remote call request: ", e); + throw new RuntimeException(e); + } + } + + private LightMessagesController dialPeer(Host us, PeerId peer, AddressBook addrs) { + Multiaddr[] addr = addrs.get(peer).join().toArray(new Multiaddr[0]); + if (addr.length == 0) + throw new IllegalStateException("No addresses known for peer " + peer); + + return dial(us, peer, addr).getController().join(); + } + +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/LightMessagesController.java b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesController.java new file mode 100644 index 000000000..8cc615942 --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesController.java @@ -0,0 +1,69 @@ +package com.limechain.network.substream.lightclient; + +import com.google.protobuf.ByteString; +import com.limechain.network.substream.lightclient.pb.LightClientMessage; + +import java.util.Arrays; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; + +public interface LightMessagesController { + CompletableFuture send(LightClientMessage.Request msg); + + default CompletableFuture remoteCallRequest(String blockHash, + String methodName, + String callData) { + return send(LightClientMessage.Request + .newBuilder() + .setRemoteCallRequest( + LightClientMessage.RemoteCallRequest + .newBuilder() + .setBlock(ByteString.copyFrom(blockHash.getBytes())) + .setMethod(methodName) + .setData(ByteString.copyFrom(callData.getBytes())) + .build() + ) + .build()); + } + + default CompletableFuture remoteReadRequest(String blockHash, + String[] storageKeys) { + + return send(LightClientMessage.Request + .newBuilder() + .setRemoteReadRequest( + LightClientMessage.RemoteReadRequest + .newBuilder() + .setBlock(ByteString.copyFrom(blockHash.getBytes())) + .addAllKeys( + Arrays.stream(storageKeys) + .map(s -> ByteString.copyFrom(s.getBytes())) + .collect(Collectors.toList()) + ) + .build() + ) + .build()); + + } + + default CompletableFuture remoteReadChildRequest(String blockHash, + String childStorageKey, + String[] keys) { + return send(LightClientMessage.Request + .newBuilder() + .setRemoteReadChildRequest( + LightClientMessage.RemoteReadChildRequest + .newBuilder() + .setBlock(ByteString.copyFrom(blockHash.getBytes())) + .setStorageKey(ByteString.copyFrom(childStorageKey.getBytes())) + .addAllKeys( + Arrays.stream(keys) + .map(s -> ByteString.copyFrom(s.getBytes())) + .collect(Collectors.toList()) + ) + .build() + ) + .build()); + } + +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/LightMessagesEngine.java b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesEngine.java new file mode 100644 index 000000000..a852e0ad7 --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesEngine.java @@ -0,0 +1,37 @@ +package com.limechain.network.substream.lightclient; + +import com.google.protobuf.ByteString; +import com.limechain.network.substream.lightclient.pb.LightClientMessage; +import io.libp2p.core.Stream; +import lombok.extern.java.Log; + +import java.util.logging.Level; + +@Log +public class LightMessagesEngine { + + // TODO: Add logic for handling incoming each request type + public void receiveRequest(LightClientMessage.Request msg, Stream stream) { + var builder = LightClientMessage.Response.newBuilder(); + if (msg.hasRemoteCallRequest()) { + log.log(Level.INFO, "Received: RemoteCallRequest"); + builder.setRemoteCallResponse( + LightClientMessage.RemoteCallResponse.newBuilder() + .setProof(ByteString.copyFrom("0x0".getBytes())) + .build()); + } else if (msg.hasRemoteReadRequest()) { + log.log(Level.INFO, "Received: RemoteReadRequest"); + builder.setRemoteReadResponse( + LightClientMessage.RemoteReadResponse.newBuilder() + .setProof(ByteString.copyFrom("0x1".getBytes())) + .build()); + } else if (msg.hasRemoteReadChildRequest()) { + log.log(Level.INFO, "Received: RemoteReadChildRequest"); + builder.setRemoteReadResponse( + LightClientMessage.RemoteReadResponse.newBuilder() + .setProof(ByteString.copyFrom("0x2".getBytes())) + .build()); + } + stream.writeAndFlush(builder.build()); + } +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/LightMessagesProtocol.java b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesProtocol.java new file mode 100644 index 000000000..f0ba121b7 --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesProtocol.java @@ -0,0 +1,106 @@ +package com.limechain.network.substream.lightclient; + +import com.limechain.network.substream.lightclient.pb.LightClientMessage; +import io.libp2p.core.ConnectionClosedException; +import io.libp2p.core.Stream; +import io.libp2p.protocol.ProtocolHandler; +import io.libp2p.protocol.ProtocolMessageHandler; +import io.netty.handler.codec.protobuf.ProtobufDecoder; +import io.netty.handler.codec.protobuf.ProtobufEncoder; +import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder; +import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender; + +import java.util.concurrent.CompletableFuture; + +public class LightMessagesProtocol extends ProtocolHandler { + // Sizes taken from smoldot + public static final int MAX_REQUEST_SIZE = 1024 * 512; + public static final int MAX_RESPONSE_SIZE = 10 * 1024 * 1024; + private final LightMessagesEngine engine; + + public LightMessagesProtocol(LightMessagesEngine engine) { + super(MAX_REQUEST_SIZE, MAX_RESPONSE_SIZE); + this.engine = engine; + } + + @Override + protected CompletableFuture onStartInitiator(Stream stream) { + stream.pushHandler(new ProtobufVarint32FrameDecoder()); + stream.pushHandler(new ProtobufDecoder(LightClientMessage.Response.getDefaultInstance())); + + stream.pushHandler((new ProtobufVarint32LengthFieldPrepender())); + stream.pushHandler((new ProtobufEncoder())); + + Sender handler = new Sender(stream); + stream.pushHandler(handler); + return CompletableFuture.completedFuture(handler); + } + + @Override + protected CompletableFuture onStartResponder(Stream stream) { + stream.pushHandler(new ProtobufVarint32FrameDecoder()); + stream.pushHandler(new ProtobufDecoder(LightClientMessage.Request.getDefaultInstance())); + + stream.pushHandler((new ProtobufVarint32LengthFieldPrepender())); + stream.pushHandler((new ProtobufEncoder())); + + Receiver handler = new Receiver(engine); + stream.pushHandler(handler); + return CompletableFuture.completedFuture(handler); + } + + // Class for handling incoming requests + static class Receiver implements ProtocolMessageHandler, LightMessagesController { + private final LightMessagesEngine engine; + + public Receiver(LightMessagesEngine engine) { + this.engine = engine; + } + + @Override + public void onMessage(Stream stream, LightClientMessage.Request msg) { + engine.receiveRequest(msg, stream); + } + + @Override + public CompletableFuture send(LightClientMessage.Request msg) { + throw new IllegalStateException("Host can't process inbound requests yet!"); + } + + } + + // Class for handling outgoing requests + static class Sender + implements ProtocolMessageHandler, + LightMessagesController { + private final CompletableFuture resp = new CompletableFuture<>(); + private final Stream stream; + + public Sender(Stream stream) { + this.stream = stream; + } + + @Override + public void onMessage(Stream stream, LightClientMessage.Response msg) { + resp.complete(msg); + stream.closeWrite(); + } + + @Override + public CompletableFuture send(LightClientMessage.Request req) { + stream.writeAndFlush(req); + return resp; + } + + @Override + public void onClosed(Stream stream) { + resp.completeExceptionally(new ConnectionClosedException()); + } + + @Override + public void onException(Throwable cause) { + resp.completeExceptionally(cause); + } + + } +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/LightMessagesService.java b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesService.java new file mode 100644 index 000000000..d7aec4da8 --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/LightMessagesService.java @@ -0,0 +1,12 @@ +package com.limechain.network.substream.lightclient; + +import lombok.Getter; + +public class LightMessagesService { + @Getter + private final LightMessages lightMessages; + + public LightMessagesService() { + this.lightMessages = new LightMessages(new LightMessagesProtocol(new LightMessagesEngine())); + } +} diff --git a/src/main/java/com/limechain/network/substream/lightclient/pb/com/limechain/network/substream/lightclient/pb/LightClientMessage.java b/src/main/java/com/limechain/network/substream/lightclient/pb/com/limechain/network/substream/lightclient/pb/LightClientMessage.java new file mode 100644 index 000000000..21810efff --- /dev/null +++ b/src/main/java/com/limechain/network/substream/lightclient/pb/com/limechain/network/substream/lightclient/pb/LightClientMessage.java @@ -0,0 +1,11722 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/main/java/com/limechain/network/substream/lightclient/pb/LightClientMessage.proto + +package com.limechain.network.substream.lightclient.pb; + +//CHECKSTYLE.OFF +public final class LightClientMessage { + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_Pair_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_Request_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_Response_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + + static { + java.lang.String[] descriptorData = { + "\nUsrc/main/java/com/limechain/network/su" + + "bstream/lightclient/pb/LightClientMessag" + + "e.proto\022.com.limechain.network.substream" + + ".lightclient.pb\" \n\004Pair\022\013\n\003fst\030\001 \001(\014\022\013\n\003" + + "snd\030\002 \001(\014\"\223\004\n\007Request\022`\n\023remote_call_req" + + "uest\030\001 \001(\0132A.com.limechain.network.subst" + + "ream.lightclient.pb.RemoteCallRequestH\000\022" + + "`\n\023remote_read_request\030\002 \001(\0132A.com.limec" + + "hain.network.substream.lightclient.pb.Re" + + "moteReadRequestH\000\022d\n\025remote_header_reque" + + "st\030\003 \001(\0132C.com.limechain.network.substre" + + "am.lightclient.pb.RemoteHeaderRequestH\000\022" + + "k\n\031remote_read_child_request\030\004 \001(\0132F.com" + + ".limechain.network.substream.lightclient" + + ".pb.RemoteReadChildRequestH\000\022f\n\026remote_c" + + "hanges_request\030\005 \001(\0132D.com.limechain.net" + + "work.substream.lightclient.pb.RemoteChan" + + "gesRequestH\000B\t\n\007request\"\260\003\n\010Response\022b\n\024" + + "remote_call_response\030\001 \001(\0132B.com.limecha" + + "in.network.substream.lightclient.pb.Remo" + + "teCallResponseH\000\022b\n\024remote_read_response" + + "\030\002 \001(\0132B.com.limechain.network.substream" + + ".lightclient.pb.RemoteReadResponseH\000\022f\n\026" + + "remote_header_response\030\003 \001(\0132D.com.limec" + + "hain.network.substream.lightclient.pb.Re" + + "moteHeaderResponseH\000\022h\n\027remote_changes_r" + + "esponse\030\004 \001(\0132E.com.limechain.network.su" + + "bstream.lightclient.pb.RemoteChangesResp" + + "onseH\000B\n\n\010response\"@\n\021RemoteCallRequest\022" + + "\r\n\005block\030\002 \001(\014\022\016\n\006method\030\003 \001(\t\022\014\n\004data\030\004" + + " \001(\014\"#\n\022RemoteCallResponse\022\r\n\005proof\030\002 \001(" + + "\014\"0\n\021RemoteReadRequest\022\r\n\005block\030\002 \001(\014\022\014\n" + + "\004keys\030\003 \003(\014\"#\n\022RemoteReadResponse\022\r\n\005pro" + + "of\030\002 \001(\014\"J\n\026RemoteReadChildRequest\022\r\n\005bl" + + "ock\030\002 \001(\014\022\023\n\013storage_key\030\003 \001(\014\022\014\n\004keys\030\006" + + " \003(\014\"$\n\023RemoteHeaderRequest\022\r\n\005block\030\002 \001" + + "(\014\"5\n\024RemoteHeaderResponse\022\016\n\006header\030\002 \001" + + "(\014\022\r\n\005proof\030\003 \001(\014\"o\n\024RemoteChangesReques" + + "t\022\r\n\005first\030\002 \001(\014\022\014\n\004last\030\003 \001(\014\022\013\n\003min\030\004 " + + "\001(\014\022\013\n\003max\030\005 \001(\014\022\023\n\013storage_key\030\006 \001(\014\022\013\n" + + "\003key\030\007 \001(\014\"\215\001\n\025RemoteChangesResponse\022\013\n\003" + + "max\030\002 \001(\014\022\r\n\005proof\030\003 \003(\014\022C\n\005roots\030\004 \003(\0132" + + "4.com.limechain.network.substream.lightc" + + "lient.pb.Pair\022\023\n\013roots_proof\030\005 \001(\014B0\n.co" + + "m.limechain.network.substream.lightclien" + + "t.pbb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{ + }); + internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_limechain_network_substream_lightclient_pb_Pair_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor, + new java.lang.String[]{"Fst", "Snd",}); + internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_limechain_network_substream_lightclient_pb_Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor, + new java.lang.String[]{"RemoteCallRequest", "RemoteReadRequest", "RemoteHeaderRequest", + "RemoteReadChildRequest", "RemoteChangesRequest", "Request",}); + internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_limechain_network_substream_lightclient_pb_Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor, + new java.lang.String[]{"RemoteCallResponse", "RemoteReadResponse", "RemoteHeaderResponse", + "RemoteChangesResponse", "Response",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor, + new java.lang.String[]{"Block", "Method", "Data",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor, + new java.lang.String[]{"Proof",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor, + new java.lang.String[]{"Block", "Keys",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor, + new java.lang.String[]{"Proof",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor, + new java.lang.String[]{"Block", "StorageKey", "Keys",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor, + new java.lang.String[]{"Block",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor, + new java.lang.String[]{"Header", "Proof",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor, + new java.lang.String[]{"First", "Last", "Min", "Max", "StorageKey", "Key",}); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor, + new java.lang.String[]{"Max", "Proof", "Roots", "RootsProof",}); + } + + private LightClientMessage() { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + + public interface PairOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.Pair) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * The first element of the pair.
+         * 
+ * + * bytes fst = 1; + * + * @return The fst. + */ + com.google.protobuf.ByteString getFst(); + + /** + *
+         * The second element of the pair.
+         * 
+ * + * bytes snd = 2; + * + * @return The snd. + */ + com.google.protobuf.ByteString getSnd(); + } + + public interface RequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.Request) + com.google.protobuf.MessageOrBuilder { + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return Whether the remoteCallRequest field is set. + */ + boolean hasRemoteCallRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return The remoteCallRequest. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getRemoteCallRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder getRemoteCallRequestOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return Whether the remoteReadRequest field is set. + */ + boolean hasRemoteReadRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return The remoteReadRequest. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getRemoteReadRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder getRemoteReadRequestOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return Whether the remoteHeaderRequest field is set. + */ + boolean hasRemoteHeaderRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return The remoteHeaderRequest. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getRemoteHeaderRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder getRemoteHeaderRequestOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return Whether the remoteReadChildRequest field is set. + */ + boolean hasRemoteReadChildRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return The remoteReadChildRequest. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getRemoteReadChildRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder getRemoteReadChildRequestOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return Whether the remoteChangesRequest field is set. + */ + boolean hasRemoteChangesRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return The remoteChangesRequest. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getRemoteChangesRequest(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder getRemoteChangesRequestOrBuilder(); + + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.RequestCase getRequestCase(); + } + + public interface ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.Response) + com.google.protobuf.MessageOrBuilder { + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return Whether the remoteCallResponse field is set. + */ + boolean hasRemoteCallResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return The remoteCallResponse. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getRemoteCallResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder getRemoteCallResponseOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return Whether the remoteReadResponse field is set. + */ + boolean hasRemoteReadResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return The remoteReadResponse. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getRemoteReadResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder getRemoteReadResponseOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return Whether the remoteHeaderResponse field is set. + */ + boolean hasRemoteHeaderResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return The remoteHeaderResponse. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getRemoteHeaderResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder getRemoteHeaderResponseOrBuilder(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return Whether the remoteChangesResponse field is set. + */ + boolean hasRemoteChangesResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return The remoteChangesResponse. + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getRemoteChangesResponse(); + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder getRemoteChangesResponseOrBuilder(); + + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.ResponseCase getResponseCase(); + } + + public interface RemoteCallRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteCallRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + com.google.protobuf.ByteString getBlock(); + + /** + *
+         * Method name.
+         * 
+ * + * string method = 3; + * + * @return The method. + */ + java.lang.String getMethod(); + + /** + *
+         * Method name.
+         * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + com.google.protobuf.ByteString + getMethodBytes(); + + /** + *
+         * Call data.
+         * 
+ * + * bytes data = 4; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + } + + public interface RemoteCallResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteCallResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Execution proof.
+         * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + com.google.protobuf.ByteString getProof(); + } + + public interface RemoteReadRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteReadRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + com.google.protobuf.ByteString getBlock(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @return A list containing the keys. + */ + java.util.List getKeysList(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @return The count of keys. + */ + int getKeysCount(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + com.google.protobuf.ByteString getKeys(int index); + } + + public interface RemoteReadResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteReadResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Read proof.
+         * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + com.google.protobuf.ByteString getProof(); + } + + public interface RemoteReadChildRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + com.google.protobuf.ByteString getBlock(); + + /** + *
+         * Child Storage key, this is relative
+         * to the child type storage location.
+         * 
+ * + * bytes storage_key = 3; + * + * @return The storageKey. + */ + com.google.protobuf.ByteString getStorageKey(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @return A list containing the keys. + */ + java.util.List getKeysList(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @return The count of keys. + */ + int getKeysCount(); + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + com.google.protobuf.ByteString getKeys(int index); + } + + public interface RemoteHeaderRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Block number to request header for.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + com.google.protobuf.ByteString getBlock(); + } + + public interface RemoteHeaderResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Header. None if proof generation has failed (e.g. header is unknown).
+         * 
+ * + * bytes header = 2; + * + * @return The header. + */ + com.google.protobuf.ByteString getHeader(); + + /** + *
+         * Header proof.
+         * 
+ * + * bytes proof = 3; + * + * @return The proof. + */ + com.google.protobuf.ByteString getProof(); + } + + public interface RemoteChangesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteChangesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Hash of the first block of the range (including first) where changes are requested.
+         * 
+ * + * bytes first = 2; + * + * @return The first. + */ + com.google.protobuf.ByteString getFirst(); + + /** + *
+         * Hash of the last block of the range (including last) where changes are requested.
+         * 
+ * + * bytes last = 3; + * + * @return The last. + */ + com.google.protobuf.ByteString getLast(); + + /** + *
+         * Hash of the first block for which the requester has the changes trie root. All other
+         * affected roots must be proved.
+         * 
+ * + * bytes min = 4; + * + * @return The min. + */ + com.google.protobuf.ByteString getMin(); + + /** + *
+         * Hash of the last block that we can use when querying changes.
+         * 
+ * + * bytes max = 5; + * + * @return The max. + */ + com.google.protobuf.ByteString getMax(); + + /** + *
+         * Storage child node key which changes are requested.
+         * 
+ * + * bytes storage_key = 6; + * + * @return The storageKey. + */ + com.google.protobuf.ByteString getStorageKey(); + + /** + *
+         * Storage key which changes are requested.
+         * 
+ * + * bytes key = 7; + * + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + } + + public interface RemoteChangesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.limechain.network.substream.lightclient.pb.RemoteChangesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Proof has been generated using block with this number as a max block. Should be
+         * less than or equal to the RemoteChangesRequest::max block number.
+         * 
+ * + * bytes max = 2; + * + * @return The max. + */ + com.google.protobuf.ByteString getMax(); + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @return A list containing the proof. + */ + java.util.List getProofList(); + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @return The count of proof. + */ + int getProofCount(); + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @param index The index of the element to return. + * @return The proof at the given index. + */ + com.google.protobuf.ByteString getProof(int index); + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + java.util.List + getRootsList(); + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getRoots(int index); + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + int getRootsCount(); + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + java.util.List + getRootsOrBuilderList(); + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder getRootsOrBuilder( + int index); + + /** + *
+         * Missing changes tries roots proof.
+         * 
+ * + * bytes roots_proof = 5; + * + * @return The rootsProof. + */ + com.google.protobuf.ByteString getRootsProof(); + } + + /** + *
+     * A pair of arbitrary bytes.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Pair} + */ + public static final class Pair extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.Pair) + PairOrBuilder { + public static final int FST_FIELD_NUMBER = 1; + public static final int SND_FIELD_NUMBER = 2; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.Pair) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pair parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = new com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair(); + } + + private com.google.protobuf.ByteString fst_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString snd_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use Pair.newBuilder() to construct. + private Pair(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Pair() { + fst_ = com.google.protobuf.ByteString.EMPTY; + snd_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Pair(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Pair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder.class); + } + + /** + *

+         * The first element of the pair.
+         * 
+ * + * bytes fst = 1; + * + * @return The fst. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFst() { + return fst_; + } + + /** + *
+         * The second element of the pair.
+         * 
+ * + * bytes snd = 2; + * + * @return The snd. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnd() { + return snd_; + } + + @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 (!fst_.isEmpty()) { + output.writeBytes(1, fst_); + } + if (!snd_.isEmpty()) { + output.writeBytes(2, snd_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!fst_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, fst_); + } + if (!snd_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, snd_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair) obj; + + if (!getFst() + .equals(other.getFst())) return false; + if (!getSnd() + .equals(other.getSnd())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FST_FIELD_NUMBER; + hash = (53 * hash) + getFst().hashCode(); + hash = (37 * hash) + SND_FIELD_NUMBER; + hash = (53 * hash) + getSnd().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * A pair of arbitrary bytes.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Pair} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.Pair) + com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString fst_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString snd_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Pair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fst_ = com.google.protobuf.ByteString.EMPTY; + snd_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Pair_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fst_ = fst_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.snd_ = snd_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair) { + return mergeFrom((com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.getDefaultInstance()) + return this; + if (other.getFst() != com.google.protobuf.ByteString.EMPTY) { + setFst(other.getFst()); + } + if (other.getSnd() != com.google.protobuf.ByteString.EMPTY) { + setSnd(other.getSnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + fst_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + snd_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * The first element of the pair.
+             * 
+ * + * bytes fst = 1; + * + * @return The fst. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFst() { + return fst_; + } + + /** + *
+             * The first element of the pair.
+             * 
+ * + * bytes fst = 1; + * + * @param value The fst to set. + * @return This builder for chaining. + */ + public Builder setFst(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + fst_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * The first element of the pair.
+             * 
+ * + * bytes fst = 1; + * + * @return This builder for chaining. + */ + public Builder clearFst() { + bitField0_ = (bitField0_ & ~0x00000001); + fst_ = getDefaultInstance().getFst(); + onChanged(); + return this; + } + + /** + *
+             * The second element of the pair.
+             * 
+ * + * bytes snd = 2; + * + * @return The snd. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnd() { + return snd_; + } + + /** + *
+             * The second element of the pair.
+             * 
+ * + * bytes snd = 2; + * + * @param value The snd to set. + * @return This builder for chaining. + */ + public Builder setSnd(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + snd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * The second element of the pair.
+             * 
+ * + * bytes snd = 2; + * + * @return This builder for chaining. + */ + public Builder clearSnd() { + bitField0_ = (bitField0_ & ~0x00000002); + snd_ = getDefaultInstance().getSnd(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.Pair) + } + + } + + /** + *
+     * Enumerate all possible light client request messages.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Request} + */ + public static final class Request extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.Request) + RequestOrBuilder { + public static final int REMOTE_CALL_REQUEST_FIELD_NUMBER = 1; + public static final int REMOTE_READ_REQUEST_FIELD_NUMBER = 2; + public static final int REMOTE_HEADER_REQUEST_FIELD_NUMBER = 3; + public static final int REMOTE_READ_CHILD_REQUEST_FIELD_NUMBER = 4; + public static final int REMOTE_CHANGES_REQUEST_FIELD_NUMBER = 5; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.Request) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.Request DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Request parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = new com.limechain.network.substream.lightclient.pb.LightClientMessage.Request(); + } + + private int requestCase_ = 0; + + ; + private java.lang.Object request_; + private byte memoizedIsInitialized = -1; + + // Use Request.newBuilder() to construct. + private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Request() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Request getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Request(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.Builder.class); + } + + public RequestCase + getRequestCase() { + return RequestCase.forNumber( + requestCase_); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return Whether the remoteCallRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteCallRequest() { + return requestCase_ == 1; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return The remoteCallRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getRemoteCallRequest() { + if (requestCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder getRemoteCallRequestOrBuilder() { + if (requestCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return Whether the remoteReadRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteReadRequest() { + return requestCase_ == 2; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return The remoteReadRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getRemoteReadRequest() { + if (requestCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder getRemoteReadRequestOrBuilder() { + if (requestCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return Whether the remoteHeaderRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteHeaderRequest() { + return requestCase_ == 3; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return The remoteHeaderRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getRemoteHeaderRequest() { + if (requestCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder getRemoteHeaderRequestOrBuilder() { + if (requestCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return Whether the remoteReadChildRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteReadChildRequest() { + return requestCase_ == 4; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return The remoteReadChildRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getRemoteReadChildRequest() { + if (requestCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder getRemoteReadChildRequestOrBuilder() { + if (requestCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return Whether the remoteChangesRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteChangesRequest() { + return requestCase_ == 5; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return The remoteChangesRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getRemoteChangesRequest() { + if (requestCase_ == 5) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder getRemoteChangesRequestOrBuilder() { + if (requestCase_ == 5) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + + @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 (requestCase_ == 1) { + output.writeMessage(1, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_); + } + if (requestCase_ == 2) { + output.writeMessage(2, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_); + } + if (requestCase_ == 3) { + output.writeMessage(3, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_); + } + if (requestCase_ == 4) { + output.writeMessage(4, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_); + } + if (requestCase_ == 5) { + output.writeMessage(5, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_); + } + if (requestCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_); + } + if (requestCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_); + } + if (requestCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_); + } + if (requestCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Request)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.Request) obj; + + if (!getRequestCase().equals(other.getRequestCase())) return false; + switch (requestCase_) { + case 1: + if (!getRemoteCallRequest() + .equals(other.getRemoteCallRequest())) return false; + break; + case 2: + if (!getRemoteReadRequest() + .equals(other.getRemoteReadRequest())) return false; + break; + case 3: + if (!getRemoteHeaderRequest() + .equals(other.getRemoteHeaderRequest())) return false; + break; + case 4: + if (!getRemoteReadChildRequest() + .equals(other.getRemoteReadChildRequest())) return false; + break; + case 5: + if (!getRemoteChangesRequest() + .equals(other.getRemoteChangesRequest())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (requestCase_) { + case 1: + hash = (37 * hash) + REMOTE_CALL_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRemoteCallRequest().hashCode(); + break; + case 2: + hash = (37 * hash) + REMOTE_READ_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRemoteReadRequest().hashCode(); + break; + case 3: + hash = (37 * hash) + REMOTE_HEADER_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRemoteHeaderRequest().hashCode(); + break; + case 4: + hash = (37 * hash) + REMOTE_READ_CHILD_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRemoteReadChildRequest().hashCode(); + break; + case 5: + hash = (37 * hash) + REMOTE_CHANGES_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRemoteChangesRequest().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Request getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + public enum RequestCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMOTE_CALL_REQUEST(1), + REMOTE_READ_REQUEST(2), + REMOTE_HEADER_REQUEST(3), + REMOTE_READ_CHILD_REQUEST(4), + REMOTE_CHANGES_REQUEST(5), + REQUEST_NOT_SET(0); + private final int value; + + private RequestCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RequestCase valueOf(int value) { + return forNumber(value); + } + + public static RequestCase forNumber(int value) { + switch (value) { + case 1: + return REMOTE_CALL_REQUEST; + case 2: + return REMOTE_READ_REQUEST; + case 3: + return REMOTE_HEADER_REQUEST; + case 4: + return REMOTE_READ_CHILD_REQUEST; + case 5: + return REMOTE_CHANGES_REQUEST; + case 0: + return REQUEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + /** + *

+         * Enumerate all possible light client request messages.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Request} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.Request) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RequestOrBuilder { + private int requestCase_ = 0; + private java.lang.Object request_; + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder> + remoteCallRequestBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder> + remoteReadRequestBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder> + remoteHeaderRequestBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder> + remoteReadChildRequestBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder> + remoteChangesRequestBuilder_; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (remoteCallRequestBuilder_ != null) { + remoteCallRequestBuilder_.clear(); + } + if (remoteReadRequestBuilder_ != null) { + remoteReadRequestBuilder_.clear(); + } + if (remoteHeaderRequestBuilder_ != null) { + remoteHeaderRequestBuilder_.clear(); + } + if (remoteReadChildRequestBuilder_ != null) { + remoteReadChildRequestBuilder_.clear(); + } + if (remoteChangesRequestBuilder_ != null) { + remoteChangesRequestBuilder_.clear(); + } + requestCase_ = 0; + request_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Request_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Request getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Request build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Request buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.Request(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request result) { + result.requestCase_ = requestCase_; + result.request_ = this.request_; + if (requestCase_ == 1 && + remoteCallRequestBuilder_ != null) { + result.request_ = remoteCallRequestBuilder_.build(); + } + if (requestCase_ == 2 && + remoteReadRequestBuilder_ != null) { + result.request_ = remoteReadRequestBuilder_.build(); + } + if (requestCase_ == 3 && + remoteHeaderRequestBuilder_ != null) { + result.request_ = remoteHeaderRequestBuilder_.build(); + } + if (requestCase_ == 4 && + remoteReadChildRequestBuilder_ != null) { + result.request_ = remoteReadChildRequestBuilder_.build(); + } + if (requestCase_ == 5 && + remoteChangesRequestBuilder_ != null) { + result.request_ = remoteChangesRequestBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Request) { + return mergeFrom((com.limechain.network.substream.lightclient.pb.LightClientMessage.Request) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.limechain.network.substream.lightclient.pb.LightClientMessage.Request other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.Request.getDefaultInstance()) + return this; + switch (other.getRequestCase()) { + case REMOTE_CALL_REQUEST: { + mergeRemoteCallRequest(other.getRemoteCallRequest()); + break; + } + case REMOTE_READ_REQUEST: { + mergeRemoteReadRequest(other.getRemoteReadRequest()); + break; + } + case REMOTE_HEADER_REQUEST: { + mergeRemoteHeaderRequest(other.getRemoteHeaderRequest()); + break; + } + case REMOTE_READ_CHILD_REQUEST: { + mergeRemoteReadChildRequest(other.getRemoteReadChildRequest()); + break; + } + case REMOTE_CHANGES_REQUEST: { + mergeRemoteChangesRequest(other.getRemoteChangesRequest()); + break; + } + case REQUEST_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getRemoteCallRequestFieldBuilder().getBuilder(), + extensionRegistry); + requestCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getRemoteReadRequestFieldBuilder().getBuilder(), + extensionRegistry); + requestCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getRemoteHeaderRequestFieldBuilder().getBuilder(), + extensionRegistry); + requestCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getRemoteReadChildRequestFieldBuilder().getBuilder(), + extensionRegistry); + requestCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getRemoteChangesRequestFieldBuilder().getBuilder(), + extensionRegistry); + requestCase_ = 5; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + public RequestCase + getRequestCase() { + return RequestCase.forNumber( + requestCase_); + } + + public Builder clearRequest() { + requestCase_ = 0; + request_ = null; + onChanged(); + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return Whether the remoteCallRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteCallRequest() { + return requestCase_ == 1; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + * + * @return The remoteCallRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getRemoteCallRequest() { + if (remoteCallRequestBuilder_ == null) { + if (requestCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } else { + if (requestCase_ == 1) { + return remoteCallRequestBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + public Builder setRemoteCallRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest value) { + if (remoteCallRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + remoteCallRequestBuilder_.setMessage(value); + } + requestCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + public Builder setRemoteCallRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder builderForValue) { + if (remoteCallRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + remoteCallRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + public Builder mergeRemoteCallRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest value) { + if (remoteCallRequestBuilder_ == null) { + if (requestCase_ == 1 && + request_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance()) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_) + .mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 1) { + remoteCallRequestBuilder_.mergeFrom(value); + } else { + remoteCallRequestBuilder_.setMessage(value); + } + } + requestCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + public Builder clearRemoteCallRequest() { + if (remoteCallRequestBuilder_ == null) { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + } + remoteCallRequestBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder getRemoteCallRequestBuilder() { + return getRemoteCallRequestFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder getRemoteCallRequestOrBuilder() { + if ((requestCase_ == 1) && (remoteCallRequestBuilder_ != null)) { + return remoteCallRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallRequest remote_call_request = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder> + getRemoteCallRequestFieldBuilder() { + if (remoteCallRequestBuilder_ == null) { + if (!(requestCase_ == 1)) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + remoteCallRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 1; + onChanged(); + return remoteCallRequestBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return Whether the remoteReadRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteReadRequest() { + return requestCase_ == 2; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + * + * @return The remoteReadRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getRemoteReadRequest() { + if (remoteReadRequestBuilder_ == null) { + if (requestCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } else { + if (requestCase_ == 2) { + return remoteReadRequestBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + public Builder setRemoteReadRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest value) { + if (remoteReadRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + remoteReadRequestBuilder_.setMessage(value); + } + requestCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + public Builder setRemoteReadRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder builderForValue) { + if (remoteReadRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + remoteReadRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + public Builder mergeRemoteReadRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest value) { + if (remoteReadRequestBuilder_ == null) { + if (requestCase_ == 2 && + request_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance()) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_) + .mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 2) { + remoteReadRequestBuilder_.mergeFrom(value); + } else { + remoteReadRequestBuilder_.setMessage(value); + } + } + requestCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + public Builder clearRemoteReadRequest() { + if (remoteReadRequestBuilder_ == null) { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + } + remoteReadRequestBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder getRemoteReadRequestBuilder() { + return getRemoteReadRequestFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder getRemoteReadRequestOrBuilder() { + if ((requestCase_ == 2) && (remoteReadRequestBuilder_ != null)) { + return remoteReadRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadRequest remote_read_request = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder> + getRemoteReadRequestFieldBuilder() { + if (remoteReadRequestBuilder_ == null) { + if (!(requestCase_ == 2)) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + remoteReadRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 2; + onChanged(); + return remoteReadRequestBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return Whether the remoteHeaderRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteHeaderRequest() { + return requestCase_ == 3; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + * + * @return The remoteHeaderRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getRemoteHeaderRequest() { + if (remoteHeaderRequestBuilder_ == null) { + if (requestCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } else { + if (requestCase_ == 3) { + return remoteHeaderRequestBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + public Builder setRemoteHeaderRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest value) { + if (remoteHeaderRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + remoteHeaderRequestBuilder_.setMessage(value); + } + requestCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + public Builder setRemoteHeaderRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder builderForValue) { + if (remoteHeaderRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + remoteHeaderRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + public Builder mergeRemoteHeaderRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest value) { + if (remoteHeaderRequestBuilder_ == null) { + if (requestCase_ == 3 && + request_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance()) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_) + .mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 3) { + remoteHeaderRequestBuilder_.mergeFrom(value); + } else { + remoteHeaderRequestBuilder_.setMessage(value); + } + } + requestCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + public Builder clearRemoteHeaderRequest() { + if (remoteHeaderRequestBuilder_ == null) { + if (requestCase_ == 3) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 3) { + requestCase_ = 0; + request_ = null; + } + remoteHeaderRequestBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder getRemoteHeaderRequestBuilder() { + return getRemoteHeaderRequestFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder getRemoteHeaderRequestOrBuilder() { + if ((requestCase_ == 3) && (remoteHeaderRequestBuilder_ != null)) { + return remoteHeaderRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest remote_header_request = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder> + getRemoteHeaderRequestFieldBuilder() { + if (remoteHeaderRequestBuilder_ == null) { + if (!(requestCase_ == 3)) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + remoteHeaderRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 3; + onChanged(); + return remoteHeaderRequestBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return Whether the remoteReadChildRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteReadChildRequest() { + return requestCase_ == 4; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + * + * @return The remoteReadChildRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getRemoteReadChildRequest() { + if (remoteReadChildRequestBuilder_ == null) { + if (requestCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } else { + if (requestCase_ == 4) { + return remoteReadChildRequestBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + public Builder setRemoteReadChildRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest value) { + if (remoteReadChildRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + remoteReadChildRequestBuilder_.setMessage(value); + } + requestCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + public Builder setRemoteReadChildRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder builderForValue) { + if (remoteReadChildRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + remoteReadChildRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + public Builder mergeRemoteReadChildRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest value) { + if (remoteReadChildRequestBuilder_ == null) { + if (requestCase_ == 4 && + request_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance()) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_) + .mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 4) { + remoteReadChildRequestBuilder_.mergeFrom(value); + } else { + remoteReadChildRequestBuilder_.setMessage(value); + } + } + requestCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + public Builder clearRemoteReadChildRequest() { + if (remoteReadChildRequestBuilder_ == null) { + if (requestCase_ == 4) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 4) { + requestCase_ = 0; + request_ = null; + } + remoteReadChildRequestBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder getRemoteReadChildRequestBuilder() { + return getRemoteReadChildRequestFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder getRemoteReadChildRequestOrBuilder() { + if ((requestCase_ == 4) && (remoteReadChildRequestBuilder_ != null)) { + return remoteReadChildRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest remote_read_child_request = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder> + getRemoteReadChildRequestFieldBuilder() { + if (remoteReadChildRequestBuilder_ == null) { + if (!(requestCase_ == 4)) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + remoteReadChildRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 4; + onChanged(); + return remoteReadChildRequestBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return Whether the remoteChangesRequest field is set. + */ + @java.lang.Override + public boolean hasRemoteChangesRequest() { + return requestCase_ == 5; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + * + * @return The remoteChangesRequest. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getRemoteChangesRequest() { + if (remoteChangesRequestBuilder_ == null) { + if (requestCase_ == 5) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } else { + if (requestCase_ == 5) { + return remoteChangesRequestBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + public Builder setRemoteChangesRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest value) { + if (remoteChangesRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + remoteChangesRequestBuilder_.setMessage(value); + } + requestCase_ = 5; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + public Builder setRemoteChangesRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder builderForValue) { + if (remoteChangesRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + remoteChangesRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 5; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + public Builder mergeRemoteChangesRequest( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest value) { + if (remoteChangesRequestBuilder_ == null) { + if (requestCase_ == 5 && + request_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance()) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_) + .mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 5) { + remoteChangesRequestBuilder_.mergeFrom(value); + } else { + remoteChangesRequestBuilder_.setMessage(value); + } + } + requestCase_ = 5; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + public Builder clearRemoteChangesRequest() { + if (remoteChangesRequestBuilder_ == null) { + if (requestCase_ == 5) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 5) { + requestCase_ = 0; + request_ = null; + } + remoteChangesRequestBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder getRemoteChangesRequestBuilder() { + return getRemoteChangesRequestFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder getRemoteChangesRequestOrBuilder() { + if ((requestCase_ == 5) && (remoteChangesRequestBuilder_ != null)) { + return remoteChangesRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 5) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesRequest remote_changes_request = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder> + getRemoteChangesRequestFieldBuilder() { + if (remoteChangesRequestBuilder_ == null) { + if (!(requestCase_ == 5)) { + request_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + remoteChangesRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 5; + onChanged(); + return remoteChangesRequestBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.Request) + } + + } + + /** + *

+     * Enumerate all possible light client response messages.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Response} + */ + public static final class Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.Response) + ResponseOrBuilder { + public static final int REMOTE_CALL_RESPONSE_FIELD_NUMBER = 1; + public static final int REMOTE_READ_RESPONSE_FIELD_NUMBER = 2; + public static final int REMOTE_HEADER_RESPONSE_FIELD_NUMBER = 3; + public static final int REMOTE_CHANGES_RESPONSE_FIELD_NUMBER = 4; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.Response) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.Response + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = new com.limechain.network.substream.lightclient.pb.LightClientMessage.Response(); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + + ; + private byte memoizedIsInitialized = -1; + + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Response() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Response(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.Builder.class); + } + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return Whether the remoteCallResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteCallResponse() { + return responseCase_ == 1; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return The remoteCallResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getRemoteCallResponse() { + if (responseCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder getRemoteCallResponseOrBuilder() { + if (responseCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return Whether the remoteReadResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteReadResponse() { + return responseCase_ == 2; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return The remoteReadResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getRemoteReadResponse() { + if (responseCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder getRemoteReadResponseOrBuilder() { + if (responseCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return Whether the remoteHeaderResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteHeaderResponse() { + return responseCase_ == 3; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return The remoteHeaderResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getRemoteHeaderResponse() { + if (responseCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder getRemoteHeaderResponseOrBuilder() { + if (responseCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return Whether the remoteChangesResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteChangesResponse() { + return responseCase_ == 4; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return The remoteChangesResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getRemoteChangesResponse() { + if (responseCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder getRemoteChangesResponseOrBuilder() { + if (responseCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + + @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 (responseCase_ == 1) { + output.writeMessage(1, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_); + } + if (responseCase_ == 2) { + output.writeMessage(2, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_); + } + if (responseCase_ == 3) { + output.writeMessage(3, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_); + } + if (responseCase_ == 4) { + output.writeMessage(4, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_); + } + if (responseCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_); + } + if (responseCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_); + } + if (responseCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Response)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.Response) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getRemoteCallResponse() + .equals(other.getRemoteCallResponse())) return false; + break; + case 2: + if (!getRemoteReadResponse() + .equals(other.getRemoteReadResponse())) return false; + break; + case 3: + if (!getRemoteHeaderResponse() + .equals(other.getRemoteHeaderResponse())) return false; + break; + case 4: + if (!getRemoteChangesResponse() + .equals(other.getRemoteChangesResponse())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (responseCase_) { + case 1: + hash = (37 * hash) + REMOTE_CALL_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getRemoteCallResponse().hashCode(); + break; + case 2: + hash = (37 * hash) + REMOTE_READ_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getRemoteReadResponse().hashCode(); + break; + case 3: + hash = (37 * hash) + REMOTE_HEADER_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getRemoteHeaderResponse().hashCode(); + break; + case 4: + hash = (37 * hash) + REMOTE_CHANGES_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getRemoteChangesResponse().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMOTE_CALL_RESPONSE(1), + REMOTE_READ_RESPONSE(2), + REMOTE_HEADER_RESPONSE(3), + REMOTE_CHANGES_RESPONSE(4), + RESPONSE_NOT_SET(0); + private final int value; + + private ResponseCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: + return REMOTE_CALL_RESPONSE; + case 2: + return REMOTE_READ_RESPONSE; + case 3: + return REMOTE_HEADER_RESPONSE; + case 4: + return REMOTE_CHANGES_RESPONSE; + case 0: + return RESPONSE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + /** + *

+         * Enumerate all possible light client response messages.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.Response) + com.limechain.network.substream.lightclient.pb.LightClientMessage.ResponseOrBuilder { + private int responseCase_ = 0; + private java.lang.Object response_; + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder> + remoteCallResponseBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder> + remoteReadResponseBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder> + remoteHeaderResponseBuilder_; + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder> + remoteChangesResponseBuilder_; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (remoteCallResponseBuilder_ != null) { + remoteCallResponseBuilder_.clear(); + } + if (remoteReadResponseBuilder_ != null) { + remoteReadResponseBuilder_.clear(); + } + if (remoteHeaderResponseBuilder_ != null) { + remoteHeaderResponseBuilder_.clear(); + } + if (remoteChangesResponseBuilder_ != null) { + remoteChangesResponseBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_Response_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Response getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Response build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Response buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.Response(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && + remoteCallResponseBuilder_ != null) { + result.response_ = remoteCallResponseBuilder_.build(); + } + if (responseCase_ == 2 && + remoteReadResponseBuilder_ != null) { + result.response_ = remoteReadResponseBuilder_.build(); + } + if (responseCase_ == 3 && + remoteHeaderResponseBuilder_ != null) { + result.response_ = remoteHeaderResponseBuilder_.build(); + } + if (responseCase_ == 4 && + remoteChangesResponseBuilder_ != null) { + result.response_ = remoteChangesResponseBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.Response) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.Response) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.limechain.network.substream.lightclient.pb.LightClientMessage.Response other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.Response.getDefaultInstance()) + return this; + switch (other.getResponseCase()) { + case REMOTE_CALL_RESPONSE: { + mergeRemoteCallResponse(other.getRemoteCallResponse()); + break; + } + case REMOTE_READ_RESPONSE: { + mergeRemoteReadResponse(other.getRemoteReadResponse()); + break; + } + case REMOTE_HEADER_RESPONSE: { + mergeRemoteHeaderResponse(other.getRemoteHeaderResponse()); + break; + } + case REMOTE_CHANGES_RESPONSE: { + mergeRemoteChangesResponse(other.getRemoteChangesResponse()); + break; + } + case RESPONSE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getRemoteCallResponseFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getRemoteReadResponseFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getRemoteHeaderResponseFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getRemoteChangesResponseFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 4; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return Whether the remoteCallResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteCallResponse() { + return responseCase_ == 1; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + * + * @return The remoteCallResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getRemoteCallResponse() { + if (remoteCallResponseBuilder_ == null) { + if (responseCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return remoteCallResponseBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + public Builder setRemoteCallResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse value) { + if (remoteCallResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + remoteCallResponseBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + public Builder setRemoteCallResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder builderForValue) { + if (remoteCallResponseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + remoteCallResponseBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + public Builder mergeRemoteCallResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse value) { + if (remoteCallResponseBuilder_ == null) { + if (responseCase_ == 1 && + response_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance()) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + remoteCallResponseBuilder_.mergeFrom(value); + } else { + remoteCallResponseBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + public Builder clearRemoteCallResponse() { + if (remoteCallResponseBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + remoteCallResponseBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder getRemoteCallResponseBuilder() { + return getRemoteCallResponseFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder getRemoteCallResponseOrBuilder() { + if ((responseCase_ == 1) && (remoteCallResponseBuilder_ != null)) { + return remoteCallResponseBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteCallResponse remote_call_response = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder> + getRemoteCallResponseFieldBuilder() { + if (remoteCallResponseBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + remoteCallResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return remoteCallResponseBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return Whether the remoteReadResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteReadResponse() { + return responseCase_ == 2; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + * + * @return The remoteReadResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getRemoteReadResponse() { + if (remoteReadResponseBuilder_ == null) { + if (responseCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return remoteReadResponseBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + public Builder setRemoteReadResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse value) { + if (remoteReadResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + remoteReadResponseBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + public Builder setRemoteReadResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder builderForValue) { + if (remoteReadResponseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + remoteReadResponseBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + public Builder mergeRemoteReadResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse value) { + if (remoteReadResponseBuilder_ == null) { + if (responseCase_ == 2 && + response_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance()) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + remoteReadResponseBuilder_.mergeFrom(value); + } else { + remoteReadResponseBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + public Builder clearRemoteReadResponse() { + if (remoteReadResponseBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + remoteReadResponseBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder getRemoteReadResponseBuilder() { + return getRemoteReadResponseFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder getRemoteReadResponseOrBuilder() { + if ((responseCase_ == 2) && (remoteReadResponseBuilder_ != null)) { + return remoteReadResponseBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteReadResponse remote_read_response = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder> + getRemoteReadResponseFieldBuilder() { + if (remoteReadResponseBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + remoteReadResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return remoteReadResponseBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return Whether the remoteHeaderResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteHeaderResponse() { + return responseCase_ == 3; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + * + * @return The remoteHeaderResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getRemoteHeaderResponse() { + if (remoteHeaderResponseBuilder_ == null) { + if (responseCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return remoteHeaderResponseBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + public Builder setRemoteHeaderResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse value) { + if (remoteHeaderResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + remoteHeaderResponseBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + public Builder setRemoteHeaderResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder builderForValue) { + if (remoteHeaderResponseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + remoteHeaderResponseBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + public Builder mergeRemoteHeaderResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse value) { + if (remoteHeaderResponseBuilder_ == null) { + if (responseCase_ == 3 && + response_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance()) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + remoteHeaderResponseBuilder_.mergeFrom(value); + } else { + remoteHeaderResponseBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + public Builder clearRemoteHeaderResponse() { + if (remoteHeaderResponseBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + remoteHeaderResponseBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder getRemoteHeaderResponseBuilder() { + return getRemoteHeaderResponseFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder getRemoteHeaderResponseOrBuilder() { + if ((responseCase_ == 3) && (remoteHeaderResponseBuilder_ != null)) { + return remoteHeaderResponseBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse remote_header_response = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder> + getRemoteHeaderResponseFieldBuilder() { + if (remoteHeaderResponseBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + remoteHeaderResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged(); + return remoteHeaderResponseBuilder_; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return Whether the remoteChangesResponse field is set. + */ + @java.lang.Override + public boolean hasRemoteChangesResponse() { + return responseCase_ == 4; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + * + * @return The remoteChangesResponse. + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getRemoteChangesResponse() { + if (remoteChangesResponseBuilder_ == null) { + if (responseCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } else { + if (responseCase_ == 4) { + return remoteChangesResponseBuilder_.getMessage(); + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + public Builder setRemoteChangesResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse value) { + if (remoteChangesResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + remoteChangesResponseBuilder_.setMessage(value); + } + responseCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + public Builder setRemoteChangesResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder builderForValue) { + if (remoteChangesResponseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + remoteChangesResponseBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + public Builder mergeRemoteChangesResponse( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse value) { + if (remoteChangesResponseBuilder_ == null) { + if (responseCase_ == 4 && + response_ != + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance()) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.newBuilder( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 4) { + remoteChangesResponseBuilder_.mergeFrom(value); + } else { + remoteChangesResponseBuilder_.setMessage(value); + } + } + responseCase_ = 4; + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + public Builder clearRemoteChangesResponse() { + if (remoteChangesResponseBuilder_ == null) { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + } + remoteChangesResponseBuilder_.clear(); + } + return this; + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder getRemoteChangesResponseBuilder() { + return getRemoteChangesResponseFieldBuilder().getBuilder(); + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder getRemoteChangesResponseOrBuilder() { + if ((responseCase_ == 4) && (remoteChangesResponseBuilder_ != null)) { + return remoteChangesResponseBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 4) { + return (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_; + } + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + } + + /** + * .com.limechain.network.substream.lightclient.pb.RemoteChangesResponse remote_changes_response = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder> + getRemoteChangesResponseFieldBuilder() { + if (remoteChangesResponseBuilder_ == null) { + if (!(responseCase_ == 4)) { + response_ = + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + remoteChangesResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder>( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 4; + onChanged(); + return remoteChangesResponseBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.Response) + } + + } + + /** + *

+     * Remote call request.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteCallRequest} + */ + public static final class RemoteCallRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteCallRequest) + RemoteCallRequestOrBuilder { + public static final int BLOCK_FIELD_NUMBER = 2; + public static final int METHOD_FIELD_NUMBER = 3; + public static final int DATA_FIELD_NUMBER = 4; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteCallRequest) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteCallRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest(); + } + + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteCallRequest.newBuilder() to construct. + private RemoteCallRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteCallRequest() { + block_ = com.google.protobuf.ByteString.EMPTY; + method_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteCallRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder.class); + } + + /** + *

+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+         * Method name.
+         * 
+ * + * string method = 3; + * + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + 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(); + method_ = s; + return s; + } + } + + /** + *
+         * Method name.
+         * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + *
+         * Call data.
+         * 
+ * + * bytes data = 4; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + @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 (!block_.isEmpty()) { + output.writeBytes(2, block_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, method_); + } + if (!data_.isEmpty()) { + output.writeBytes(4, data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!block_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, block_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, method_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) obj; + + if (!getBlock() + .equals(other.getBlock())) return false; + if (!getMethod() + .equals(other.getMethod())) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote call request.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteCallRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteCallRequest) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequestOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + private java.lang.Object method_ = ""; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + block_ = com.google.protobuf.ByteString.EMPTY; + method_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallRequest_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.block_ = block_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallRequest.getDefaultInstance()) + return this; + if (other.getBlock() != com.google.protobuf.ByteString.EMPTY) { + setBlock(other.getBlock()); + } + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + block_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: { + data_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @param value The block to set. + * @return This builder for chaining. + */ + public Builder setBlock(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return This builder for chaining. + */ + public Builder clearBlock() { + bitField0_ = (bitField0_ & ~0x00000001); + block_ = getDefaultInstance().getBlock(); + onChanged(); + return this; + } + + /** + *
+             * Method name.
+             * 
+ * + * string method = 3; + * + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + *
+             * Method name.
+             * 
+ * + * string method = 3; + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * Method name.
+             * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + *
+             * Method name.
+             * 
+ * + * string method = 3; + * + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * Method name.
+             * 
+ * + * string method = 3; + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + *
+             * Call data.
+             * 
+ * + * bytes data = 4; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + *
+             * Call data.
+             * 
+ * + * bytes data = 4; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + *
+             * Call data.
+             * 
+ * + * bytes data = 4; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteCallRequest) + } + + } + + /** + *
+     * Remote call response.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteCallResponse} + */ + public static final class RemoteCallResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteCallResponse) + RemoteCallResponseOrBuilder { + public static final int PROOF_FIELD_NUMBER = 2; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteCallResponse) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteCallResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse(); + } + + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteCallResponse.newBuilder() to construct. + private RemoteCallResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteCallResponse() { + proof_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteCallResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder.class); + } + + /** + *

+         * Execution proof.
+         * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + @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 (!proof_.isEmpty()) { + output.writeBytes(2, proof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!proof_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, proof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) obj; + + if (!getProof() + .equals(other.getProof())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROOF_FIELD_NUMBER; + hash = (53 * hash) + getProof().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote call response.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteCallResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteCallResponse) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponseOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + proof_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteCallResponse_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.proof_ = proof_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteCallResponse.getDefaultInstance()) + return this; + if (other.getProof() != com.google.protobuf.ByteString.EMPTY) { + setProof(other.getProof()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + proof_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Execution proof.
+             * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + /** + *
+             * Execution proof.
+             * 
+ * + * bytes proof = 2; + * + * @param value The proof to set. + * @return This builder for chaining. + */ + public Builder setProof(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + proof_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Execution proof.
+             * 
+ * + * bytes proof = 2; + * + * @return This builder for chaining. + */ + public Builder clearProof() { + bitField0_ = (bitField0_ & ~0x00000001); + proof_ = getDefaultInstance().getProof(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteCallResponse) + } + + } + + /** + *
+     * Remote storage read request.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadRequest} + */ + public static final class RemoteReadRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteReadRequest) + RemoteReadRequestOrBuilder { + public static final int BLOCK_FIELD_NUMBER = 2; + public static final int KEYS_FIELD_NUMBER = 3; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteReadRequest) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteReadRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest(); + } + + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + @SuppressWarnings("serial") + private java.util.List keys_; + private byte memoizedIsInitialized = -1; + + // Use RemoteReadRequest.newBuilder() to construct. + private RemoteReadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteReadRequest() { + block_ = com.google.protobuf.ByteString.EMPTY; + keys_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteReadRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder.class); + } + + /** + *

+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @return A list containing the keys. + */ + @java.lang.Override + public java.util.List + getKeysList() { + return keys_; + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @return The count of keys. + */ + public int getKeysCount() { + return keys_.size(); + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 3; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + public com.google.protobuf.ByteString getKeys(int index) { + return keys_.get(index); + } + + @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 (!block_.isEmpty()) { + output.writeBytes(2, block_); + } + for (int i = 0; i < keys_.size(); i++) { + output.writeBytes(3, keys_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!block_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, block_); + } + { + int dataSize = 0; + for (int i = 0; i < keys_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(keys_.get(i)); + } + size += dataSize; + size += 1 * getKeysList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) obj; + + if (!getBlock() + .equals(other.getBlock())) return false; + if (!getKeysList() + .equals(other.getKeysList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + if (getKeysCount() > 0) { + hash = (37 * hash) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote storage read request.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteReadRequest) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequestOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + private java.util.List keys_ = java.util.Collections.emptyList(); + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + block_ = com.google.protobuf.ByteString.EMPTY; + keys_ = java.util.Collections.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadRequest_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest result) { + if (((bitField0_ & 0x00000002) != 0)) { + keys_ = java.util.Collections.unmodifiableList(keys_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.keys_ = keys_; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.block_ = block_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadRequest.getDefaultInstance()) + return this; + if (other.getBlock() != com.google.protobuf.ByteString.EMPTY) { + setBlock(other.getBlock()); + } + if (!other.keys_.isEmpty()) { + if (keys_.isEmpty()) { + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureKeysIsMutable(); + keys_.addAll(other.keys_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + block_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + com.google.protobuf.ByteString v = input.readBytes(); + ensureKeysIsMutable(); + keys_.add(v); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @param value The block to set. + * @return This builder for chaining. + */ + public Builder setBlock(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return This builder for chaining. + */ + public Builder clearBlock() { + bitField0_ = (bitField0_ & ~0x00000001); + block_ = getDefaultInstance().getBlock(); + onChanged(); + return this; + } + + private void ensureKeysIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + keys_ = new java.util.ArrayList(keys_); + bitField0_ |= 0x00000002; + } + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @return A list containing the keys. + */ + public java.util.List + getKeysList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(keys_) : keys_; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @return The count of keys. + */ + public int getKeysCount() { + return keys_.size(); + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + public com.google.protobuf.ByteString getKeys(int index) { + return keys_.get(index); + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @param index The index to set the value at. + * @param value The keys to set. + * @return This builder for chaining. + */ + public Builder setKeys( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.set(index, value); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @param value The keys to add. + * @return This builder for chaining. + */ + public Builder addKeys(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(value); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @param values The keys to add. + * @return This builder for chaining. + */ + public Builder addAllKeys( + java.lang.Iterable values) { + ensureKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, keys_); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 3; + * + * @return This builder for chaining. + */ + public Builder clearKeys() { + keys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteReadRequest) + } + + } + + /** + *
+     * Remote read response.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadResponse} + */ + public static final class RemoteReadResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteReadResponse) + RemoteReadResponseOrBuilder { + public static final int PROOF_FIELD_NUMBER = 2; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteReadResponse) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteReadResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse(); + } + + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteReadResponse.newBuilder() to construct. + private RemoteReadResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteReadResponse() { + proof_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteReadResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder.class); + } + + /** + *

+         * Read proof.
+         * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + @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 (!proof_.isEmpty()) { + output.writeBytes(2, proof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!proof_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, proof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) obj; + + if (!getProof() + .equals(other.getProof())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROOF_FIELD_NUMBER; + hash = (53 * hash) + getProof().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote read response.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteReadResponse) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponseOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + proof_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadResponse_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.proof_ = proof_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadResponse.getDefaultInstance()) + return this; + if (other.getProof() != com.google.protobuf.ByteString.EMPTY) { + setProof(other.getProof()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + proof_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Read proof.
+             * 
+ * + * bytes proof = 2; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + /** + *
+             * Read proof.
+             * 
+ * + * bytes proof = 2; + * + * @param value The proof to set. + * @return This builder for chaining. + */ + public Builder setProof(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + proof_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Read proof.
+             * 
+ * + * bytes proof = 2; + * + * @return This builder for chaining. + */ + public Builder clearProof() { + bitField0_ = (bitField0_ & ~0x00000001); + proof_ = getDefaultInstance().getProof(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteReadResponse) + } + + } + + /** + *
+     * Remote storage read child request.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest} + */ + public static final class RemoteReadChildRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest) + RemoteReadChildRequestOrBuilder { + public static final int BLOCK_FIELD_NUMBER = 2; + public static final int STORAGE_KEY_FIELD_NUMBER = 3; + public static final int KEYS_FIELD_NUMBER = 6; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteReadChildRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest(); + } + + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString storageKey_ = com.google.protobuf.ByteString.EMPTY; + @SuppressWarnings("serial") + private java.util.List keys_; + private byte memoizedIsInitialized = -1; + + // Use RemoteReadChildRequest.newBuilder() to construct. + private RemoteReadChildRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteReadChildRequest() { + block_ = com.google.protobuf.ByteString.EMPTY; + storageKey_ = com.google.protobuf.ByteString.EMPTY; + keys_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteReadChildRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder.class); + } + + /** + *

+         * Block at which to perform call.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+         * Child Storage key, this is relative
+         * to the child type storage location.
+         * 
+ * + * bytes storage_key = 3; + * + * @return The storageKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageKey() { + return storageKey_; + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @return A list containing the keys. + */ + @java.lang.Override + public java.util.List + getKeysList() { + return keys_; + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @return The count of keys. + */ + public int getKeysCount() { + return keys_.size(); + } + + /** + *
+         * Storage keys.
+         * 
+ * + * repeated bytes keys = 6; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + public com.google.protobuf.ByteString getKeys(int index) { + return keys_.get(index); + } + + @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 (!block_.isEmpty()) { + output.writeBytes(2, block_); + } + if (!storageKey_.isEmpty()) { + output.writeBytes(3, storageKey_); + } + for (int i = 0; i < keys_.size(); i++) { + output.writeBytes(6, keys_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!block_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, block_); + } + if (!storageKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, storageKey_); + } + { + int dataSize = 0; + for (int i = 0; i < keys_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(keys_.get(i)); + } + size += dataSize; + size += 1 * getKeysList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) obj; + + if (!getBlock() + .equals(other.getBlock())) return false; + if (!getStorageKey() + .equals(other.getStorageKey())) return false; + if (!getKeysList() + .equals(other.getKeysList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + hash = (37 * hash) + STORAGE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getStorageKey().hashCode(); + if (getKeysCount() > 0) { + hash = (37 * hash) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote storage read child request.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequestOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString storageKey_ = com.google.protobuf.ByteString.EMPTY; + private java.util.List keys_ = java.util.Collections.emptyList(); + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + block_ = com.google.protobuf.ByteString.EMPTY; + storageKey_ = com.google.protobuf.ByteString.EMPTY; + keys_ = java.util.Collections.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteReadChildRequest_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest result) { + if (((bitField0_ & 0x00000004) != 0)) { + keys_ = java.util.Collections.unmodifiableList(keys_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.keys_ = keys_; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.block_ = block_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.storageKey_ = storageKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteReadChildRequest.getDefaultInstance()) + return this; + if (other.getBlock() != com.google.protobuf.ByteString.EMPTY) { + setBlock(other.getBlock()); + } + if (other.getStorageKey() != com.google.protobuf.ByteString.EMPTY) { + setStorageKey(other.getStorageKey()); + } + if (!other.keys_.isEmpty()) { + if (keys_.isEmpty()) { + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureKeysIsMutable(); + keys_.addAll(other.keys_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + block_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + storageKey_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 50: { + com.google.protobuf.ByteString v = input.readBytes(); + ensureKeysIsMutable(); + keys_.add(v); + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @param value The block to set. + * @return This builder for chaining. + */ + public Builder setBlock(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Block at which to perform call.
+             * 
+ * + * bytes block = 2; + * + * @return This builder for chaining. + */ + public Builder clearBlock() { + bitField0_ = (bitField0_ & ~0x00000001); + block_ = getDefaultInstance().getBlock(); + onChanged(); + return this; + } + + /** + *
+             * Child Storage key, this is relative
+             * to the child type storage location.
+             * 
+ * + * bytes storage_key = 3; + * + * @return The storageKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageKey() { + return storageKey_; + } + + /** + *
+             * Child Storage key, this is relative
+             * to the child type storage location.
+             * 
+ * + * bytes storage_key = 3; + * + * @param value The storageKey to set. + * @return This builder for chaining. + */ + public Builder setStorageKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + storageKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * Child Storage key, this is relative
+             * to the child type storage location.
+             * 
+ * + * bytes storage_key = 3; + * + * @return This builder for chaining. + */ + public Builder clearStorageKey() { + bitField0_ = (bitField0_ & ~0x00000002); + storageKey_ = getDefaultInstance().getStorageKey(); + onChanged(); + return this; + } + + private void ensureKeysIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + keys_ = new java.util.ArrayList(keys_); + bitField0_ |= 0x00000004; + } + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @return A list containing the keys. + */ + public java.util.List + getKeysList() { + return ((bitField0_ & 0x00000004) != 0) ? + java.util.Collections.unmodifiableList(keys_) : keys_; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @return The count of keys. + */ + public int getKeysCount() { + return keys_.size(); + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @param index The index of the element to return. + * @return The keys at the given index. + */ + public com.google.protobuf.ByteString getKeys(int index) { + return keys_.get(index); + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @param index The index to set the value at. + * @param value The keys to set. + * @return This builder for chaining. + */ + public Builder setKeys( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.set(index, value); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @param value The keys to add. + * @return This builder for chaining. + */ + public Builder addKeys(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(value); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @param values The keys to add. + * @return This builder for chaining. + */ + public Builder addAllKeys( + java.lang.Iterable values) { + ensureKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, keys_); + onChanged(); + return this; + } + + /** + *
+             * Storage keys.
+             * 
+ * + * repeated bytes keys = 6; + * + * @return This builder for chaining. + */ + public Builder clearKeys() { + keys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteReadChildRequest) + } + + } + + /** + *
+     * Remote header request.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest} + */ + public static final class RemoteHeaderRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest) + RemoteHeaderRequestOrBuilder { + public static final int BLOCK_FIELD_NUMBER = 2; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteHeaderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest(); + } + + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteHeaderRequest.newBuilder() to construct. + private RemoteHeaderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteHeaderRequest() { + block_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteHeaderRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder.class); + } + + /** + *

+         * Block number to request header for.
+         * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + @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 (!block_.isEmpty()) { + output.writeBytes(2, block_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!block_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, block_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) obj; + + if (!getBlock() + .equals(other.getBlock())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote header request.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequestOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString block_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + block_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderRequest_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.block_ = block_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderRequest.getDefaultInstance()) + return this; + if (other.getBlock() != com.google.protobuf.ByteString.EMPTY) { + setBlock(other.getBlock()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + block_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Block number to request header for.
+             * 
+ * + * bytes block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlock() { + return block_; + } + + /** + *
+             * Block number to request header for.
+             * 
+ * + * bytes block = 2; + * + * @param value The block to set. + * @return This builder for chaining. + */ + public Builder setBlock(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Block number to request header for.
+             * 
+ * + * bytes block = 2; + * + * @return This builder for chaining. + */ + public Builder clearBlock() { + bitField0_ = (bitField0_ & ~0x00000001); + block_ = getDefaultInstance().getBlock(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteHeaderRequest) + } + + } + + /** + *
+     * Remote header response.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse} + */ + public static final class RemoteHeaderResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse) + RemoteHeaderResponseOrBuilder { + public static final int HEADER_FIELD_NUMBER = 2; + public static final int PROOF_FIELD_NUMBER = 3; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteHeaderResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse(); + } + + private com.google.protobuf.ByteString header_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteHeaderResponse.newBuilder() to construct. + private RemoteHeaderResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteHeaderResponse() { + header_ = com.google.protobuf.ByteString.EMPTY; + proof_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteHeaderResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder.class); + } + + /** + *

+         * Header. None if proof generation has failed (e.g. header is unknown).
+         * 
+ * + * bytes header = 2; + * + * @return The header. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHeader() { + return header_; + } + + /** + *
+         * Header proof.
+         * 
+ * + * bytes proof = 3; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + @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 (!header_.isEmpty()) { + output.writeBytes(2, header_); + } + if (!proof_.isEmpty()) { + output.writeBytes(3, proof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!header_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, header_); + } + if (!proof_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, proof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) obj; + + if (!getHeader() + .equals(other.getHeader())) return false; + if (!getProof() + .equals(other.getProof())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + hash = (37 * hash) + PROOF_FIELD_NUMBER; + hash = (53 * hash) + getProof().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote header response.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponseOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString header_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString proof_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = com.google.protobuf.ByteString.EMPTY; + proof_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteHeaderResponse_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = header_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.proof_ = proof_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteHeaderResponse.getDefaultInstance()) + return this; + if (other.getHeader() != com.google.protobuf.ByteString.EMPTY) { + setHeader(other.getHeader()); + } + if (other.getProof() != com.google.protobuf.ByteString.EMPTY) { + setProof(other.getProof()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + header_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + proof_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Header. None if proof generation has failed (e.g. header is unknown).
+             * 
+ * + * bytes header = 2; + * + * @return The header. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHeader() { + return header_; + } + + /** + *
+             * Header. None if proof generation has failed (e.g. header is unknown).
+             * 
+ * + * bytes header = 2; + * + * @param value The header to set. + * @return This builder for chaining. + */ + public Builder setHeader(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Header. None if proof generation has failed (e.g. header is unknown).
+             * 
+ * + * bytes header = 2; + * + * @return This builder for chaining. + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = getDefaultInstance().getHeader(); + onChanged(); + return this; + } + + /** + *
+             * Header proof.
+             * 
+ * + * bytes proof = 3; + * + * @return The proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProof() { + return proof_; + } + + /** + *
+             * Header proof.
+             * 
+ * + * bytes proof = 3; + * + * @param value The proof to set. + * @return This builder for chaining. + */ + public Builder setProof(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + proof_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * Header proof.
+             * 
+ * + * bytes proof = 3; + * + * @return This builder for chaining. + */ + public Builder clearProof() { + bitField0_ = (bitField0_ & ~0x00000002); + proof_ = getDefaultInstance().getProof(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteHeaderResponse) + } + + } + + /** + *
+     * / Remote changes request.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteChangesRequest} + */ + public static final class RemoteChangesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteChangesRequest) + RemoteChangesRequestOrBuilder { + public static final int FIRST_FIELD_NUMBER = 2; + public static final int LAST_FIELD_NUMBER = 3; + public static final int MIN_FIELD_NUMBER = 4; + public static final int MAX_FIELD_NUMBER = 5; + public static final int STORAGE_KEY_FIELD_NUMBER = 6; + public static final int KEY_FIELD_NUMBER = 7; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteChangesRequest) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteChangesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest(); + } + + private com.google.protobuf.ByteString first_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString last_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString min_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString max_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString storageKey_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteChangesRequest.newBuilder() to construct. + private RemoteChangesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteChangesRequest() { + first_ = com.google.protobuf.ByteString.EMPTY; + last_ = com.google.protobuf.ByteString.EMPTY; + min_ = com.google.protobuf.ByteString.EMPTY; + max_ = com.google.protobuf.ByteString.EMPTY; + storageKey_ = com.google.protobuf.ByteString.EMPTY; + key_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteChangesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder.class); + } + + /** + *

+         * Hash of the first block of the range (including first) where changes are requested.
+         * 
+ * + * bytes first = 2; + * + * @return The first. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirst() { + return first_; + } + + /** + *
+         * Hash of the last block of the range (including last) where changes are requested.
+         * 
+ * + * bytes last = 3; + * + * @return The last. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLast() { + return last_; + } + + /** + *
+         * Hash of the first block for which the requester has the changes trie root. All other
+         * affected roots must be proved.
+         * 
+ * + * bytes min = 4; + * + * @return The min. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMin() { + return min_; + } + + /** + *
+         * Hash of the last block that we can use when querying changes.
+         * 
+ * + * bytes max = 5; + * + * @return The max. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMax() { + return max_; + } + + /** + *
+         * Storage child node key which changes are requested.
+         * 
+ * + * bytes storage_key = 6; + * + * @return The storageKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageKey() { + return storageKey_; + } + + /** + *
+         * Storage key which changes are requested.
+         * 
+ * + * bytes key = 7; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + @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 (!first_.isEmpty()) { + output.writeBytes(2, first_); + } + if (!last_.isEmpty()) { + output.writeBytes(3, last_); + } + if (!min_.isEmpty()) { + output.writeBytes(4, min_); + } + if (!max_.isEmpty()) { + output.writeBytes(5, max_); + } + if (!storageKey_.isEmpty()) { + output.writeBytes(6, storageKey_); + } + if (!key_.isEmpty()) { + output.writeBytes(7, key_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!first_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, first_); + } + if (!last_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, last_); + } + if (!min_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, min_); + } + if (!max_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, max_); + } + if (!storageKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, storageKey_); + } + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, key_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) obj; + + if (!getFirst() + .equals(other.getFirst())) return false; + if (!getLast() + .equals(other.getLast())) return false; + if (!getMin() + .equals(other.getMin())) return false; + if (!getMax() + .equals(other.getMax())) return false; + if (!getStorageKey() + .equals(other.getStorageKey())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIRST_FIELD_NUMBER; + hash = (53 * hash) + getFirst().hashCode(); + hash = (37 * hash) + LAST_FIELD_NUMBER; + hash = (53 * hash) + getLast().hashCode(); + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + getMin().hashCode(); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax().hashCode(); + hash = (37 * hash) + STORAGE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getStorageKey().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * / Remote changes request.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteChangesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteChangesRequest) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequestOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString first_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString last_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString min_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString max_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString storageKey_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + first_ = com.google.protobuf.ByteString.EMPTY; + last_ = com.google.protobuf.ByteString.EMPTY; + min_ = com.google.protobuf.ByteString.EMPTY; + max_ = com.google.protobuf.ByteString.EMPTY; + storageKey_ = com.google.protobuf.ByteString.EMPTY; + key_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesRequest_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.first_ = first_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.last_ = last_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.min_ = min_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.max_ = max_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.storageKey_ = storageKey_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.key_ = key_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesRequest.getDefaultInstance()) + return this; + if (other.getFirst() != com.google.protobuf.ByteString.EMPTY) { + setFirst(other.getFirst()); + } + if (other.getLast() != com.google.protobuf.ByteString.EMPTY) { + setLast(other.getLast()); + } + if (other.getMin() != com.google.protobuf.ByteString.EMPTY) { + setMin(other.getMin()); + } + if (other.getMax() != com.google.protobuf.ByteString.EMPTY) { + setMax(other.getMax()); + } + if (other.getStorageKey() != com.google.protobuf.ByteString.EMPTY) { + setStorageKey(other.getStorageKey()); + } + if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { + setKey(other.getKey()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + first_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + last_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: { + min_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: { + max_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: { + storageKey_ = input.readBytes(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: { + key_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Hash of the first block of the range (including first) where changes are requested.
+             * 
+ * + * bytes first = 2; + * + * @return The first. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirst() { + return first_; + } + + /** + *
+             * Hash of the first block of the range (including first) where changes are requested.
+             * 
+ * + * bytes first = 2; + * + * @param value The first to set. + * @return This builder for chaining. + */ + public Builder setFirst(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + first_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Hash of the first block of the range (including first) where changes are requested.
+             * 
+ * + * bytes first = 2; + * + * @return This builder for chaining. + */ + public Builder clearFirst() { + bitField0_ = (bitField0_ & ~0x00000001); + first_ = getDefaultInstance().getFirst(); + onChanged(); + return this; + } + + /** + *
+             * Hash of the last block of the range (including last) where changes are requested.
+             * 
+ * + * bytes last = 3; + * + * @return The last. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLast() { + return last_; + } + + /** + *
+             * Hash of the last block of the range (including last) where changes are requested.
+             * 
+ * + * bytes last = 3; + * + * @param value The last to set. + * @return This builder for chaining. + */ + public Builder setLast(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + last_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+             * Hash of the last block of the range (including last) where changes are requested.
+             * 
+ * + * bytes last = 3; + * + * @return This builder for chaining. + */ + public Builder clearLast() { + bitField0_ = (bitField0_ & ~0x00000002); + last_ = getDefaultInstance().getLast(); + onChanged(); + return this; + } + + /** + *
+             * Hash of the first block for which the requester has the changes trie root. All other
+             * affected roots must be proved.
+             * 
+ * + * bytes min = 4; + * + * @return The min. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMin() { + return min_; + } + + /** + *
+             * Hash of the first block for which the requester has the changes trie root. All other
+             * affected roots must be proved.
+             * 
+ * + * bytes min = 4; + * + * @param value The min to set. + * @return This builder for chaining. + */ + public Builder setMin(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + min_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + *
+             * Hash of the first block for which the requester has the changes trie root. All other
+             * affected roots must be proved.
+             * 
+ * + * bytes min = 4; + * + * @return This builder for chaining. + */ + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000004); + min_ = getDefaultInstance().getMin(); + onChanged(); + return this; + } + + /** + *
+             * Hash of the last block that we can use when querying changes.
+             * 
+ * + * bytes max = 5; + * + * @return The max. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMax() { + return max_; + } + + /** + *
+             * Hash of the last block that we can use when querying changes.
+             * 
+ * + * bytes max = 5; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + max_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + *
+             * Hash of the last block that we can use when querying changes.
+             * 
+ * + * bytes max = 5; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000008); + max_ = getDefaultInstance().getMax(); + onChanged(); + return this; + } + + /** + *
+             * Storage child node key which changes are requested.
+             * 
+ * + * bytes storage_key = 6; + * + * @return The storageKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageKey() { + return storageKey_; + } + + /** + *
+             * Storage child node key which changes are requested.
+             * 
+ * + * bytes storage_key = 6; + * + * @param value The storageKey to set. + * @return This builder for chaining. + */ + public Builder setStorageKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + storageKey_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + *
+             * Storage child node key which changes are requested.
+             * 
+ * + * bytes storage_key = 6; + * + * @return This builder for chaining. + */ + public Builder clearStorageKey() { + bitField0_ = (bitField0_ & ~0x00000010); + storageKey_ = getDefaultInstance().getStorageKey(); + onChanged(); + return this; + } + + /** + *
+             * Storage key which changes are requested.
+             * 
+ * + * bytes key = 7; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + /** + *
+             * Storage key which changes are requested.
+             * 
+ * + * bytes key = 7; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + *
+             * Storage key which changes are requested.
+             * 
+ * + * bytes key = 7; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000020); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteChangesRequest) + } + + } + + /** + *
+     * Remote changes response.
+     * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteChangesResponse} + */ + public static final class RemoteChangesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.limechain.network.substream.lightclient.pb.RemoteChangesResponse) + RemoteChangesResponseOrBuilder { + public static final int MAX_FIELD_NUMBER = 2; + public static final int PROOF_FIELD_NUMBER = 3; + public static final int ROOTS_FIELD_NUMBER = 4; + public static final int ROOTS_PROOF_FIELD_NUMBER = 5; + private static final long serialVersionUID = 0L; + // @@protoc_insertion_point(class_scope:com.limechain.network.substream.lightclient.pb.RemoteChangesResponse) + private static final com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse + DEFAULT_INSTANCE; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteChangesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + static { + DEFAULT_INSTANCE = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse(); + } + + private com.google.protobuf.ByteString max_ = com.google.protobuf.ByteString.EMPTY; + @SuppressWarnings("serial") + private java.util.List proof_; + @SuppressWarnings("serial") + private java.util.List roots_; + private com.google.protobuf.ByteString rootsProof_ = com.google.protobuf.ByteString.EMPTY; + private byte memoizedIsInitialized = -1; + + // Use RemoteChangesResponse.newBuilder() to construct. + private RemoteChangesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteChangesResponse() { + max_ = com.google.protobuf.ByteString.EMPTY; + proof_ = java.util.Collections.emptyList(); + roots_ = java.util.Collections.emptyList(); + rootsProof_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor; + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseDelimitedFrom( + java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public static com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteChangesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder.class); + } + + /** + *

+         * Proof has been generated using block with this number as a max block. Should be
+         * less than or equal to the RemoteChangesRequest::max block number.
+         * 
+ * + * bytes max = 2; + * + * @return The max. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMax() { + return max_; + } + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @return A list containing the proof. + */ + @java.lang.Override + public java.util.List + getProofList() { + return proof_; + } + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @return The count of proof. + */ + public int getProofCount() { + return proof_.size(); + } + + /** + *
+         * Changes proof.
+         * 
+ * + * repeated bytes proof = 3; + * + * @param index The index of the element to return. + * @return The proof at the given index. + */ + public com.google.protobuf.ByteString getProof(int index) { + return proof_.get(index); + } + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + @java.lang.Override + public java.util.List getRootsList() { + return roots_; + } + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + @java.lang.Override + public java.util.List + getRootsOrBuilderList() { + return roots_; + } + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + @java.lang.Override + public int getRootsCount() { + return roots_.size(); + } + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getRoots(int index) { + return roots_.get(index); + } + + /** + *
+         * Changes tries roots missing on the requester' node.
+         * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder getRootsOrBuilder( + int index) { + return roots_.get(index); + } + + /** + *
+         * Missing changes tries roots proof.
+         * 
+ * + * bytes roots_proof = 5; + * + * @return The rootsProof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRootsProof() { + return rootsProof_; + } + + @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 (!max_.isEmpty()) { + output.writeBytes(2, max_); + } + for (int i = 0; i < proof_.size(); i++) { + output.writeBytes(3, proof_.get(i)); + } + for (int i = 0; i < roots_.size(); i++) { + output.writeMessage(4, roots_.get(i)); + } + if (!rootsProof_.isEmpty()) { + output.writeBytes(5, rootsProof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!max_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, max_); + } + { + int dataSize = 0; + for (int i = 0; i < proof_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(proof_.get(i)); + } + size += dataSize; + size += 1 * getProofList().size(); + } + for (int i = 0; i < roots_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, roots_.get(i)); + } + if (!rootsProof_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, rootsProof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse)) { + return super.equals(obj); + } + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse other = + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) obj; + + if (!getMax() + .equals(other.getMax())) return false; + if (!getProofList() + .equals(other.getProofList())) return false; + if (!getRootsList() + .equals(other.getRootsList())) return false; + if (!getRootsProof() + .equals(other.getRootsProof())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax().hashCode(); + if (getProofCount() > 0) { + hash = (37 * hash) + PROOF_FIELD_NUMBER; + hash = (53 * hash) + getProofList().hashCode(); + } + if (getRootsCount() > 0) { + hash = (37 * hash) + ROOTS_FIELD_NUMBER; + hash = (53 * hash) + getRootsList().hashCode(); + } + hash = (37 * hash) + ROOTS_PROOF_FIELD_NUMBER; + hash = (53 * hash) + getRootsProof().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + @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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + /** + *
+         * Remote changes response.
+         * 
+ *

+ * Protobuf type {@code com.limechain.network.substream.lightclient.pb.RemoteChangesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.limechain.network.substream.lightclient.pb.RemoteChangesResponse) + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponseOrBuilder { + private int bitField0_; + private com.google.protobuf.ByteString max_ = com.google.protobuf.ByteString.EMPTY; + private java.util.List proof_ = java.util.Collections.emptyList(); + private java.util.List roots_ = + java.util.Collections.emptyList(); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair, com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder> + rootsBuilder_; + private com.google.protobuf.ByteString rootsProof_ = com.google.protobuf.ByteString.EMPTY; + + // Construct using com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.class, + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.Builder.class); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + max_ = com.google.protobuf.ByteString.EMPTY; + proof_ = java.util.Collections.emptyList(); + if (rootsBuilder_ == null) { + roots_ = java.util.Collections.emptyList(); + } else { + roots_ = null; + rootsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + rootsProof_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.internal_static_com_limechain_network_substream_lightclient_pb_RemoteChangesResponse_descriptor; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse getDefaultInstanceForType() { + return com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse build() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse buildPartial() { + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse result = + new com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse result) { + if (((bitField0_ & 0x00000002) != 0)) { + proof_ = java.util.Collections.unmodifiableList(proof_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.proof_ = proof_; + if (rootsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + roots_ = java.util.Collections.unmodifiableList(roots_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.roots_ = roots_; + } else { + result.roots_ = rootsBuilder_.build(); + } + } + + private void buildPartial0( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.max_ = max_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rootsProof_ = rootsProof_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) { + return mergeFrom( + (com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse other) { + if (other == + com.limechain.network.substream.lightclient.pb.LightClientMessage.RemoteChangesResponse.getDefaultInstance()) + return this; + if (other.getMax() != com.google.protobuf.ByteString.EMPTY) { + setMax(other.getMax()); + } + if (!other.proof_.isEmpty()) { + if (proof_.isEmpty()) { + proof_ = other.proof_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProofIsMutable(); + proof_.addAll(other.proof_); + } + onChanged(); + } + if (rootsBuilder_ == null) { + if (!other.roots_.isEmpty()) { + if (roots_.isEmpty()) { + roots_ = other.roots_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRootsIsMutable(); + roots_.addAll(other.roots_); + } + onChanged(); + } + } else { + if (!other.roots_.isEmpty()) { + if (rootsBuilder_.isEmpty()) { + rootsBuilder_.dispose(); + rootsBuilder_ = null; + roots_ = other.roots_; + bitField0_ = (bitField0_ & ~0x00000004); + rootsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRootsFieldBuilder() : null; + } else { + rootsBuilder_.addAllMessages(other.roots_); + } + } + } + if (other.getRootsProof() != com.google.protobuf.ByteString.EMPTY) { + setRootsProof(other.getRootsProof()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + max_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + com.google.protobuf.ByteString v = input.readBytes(); + ensureProofIsMutable(); + proof_.add(v); + break; + } // case 26 + case 34: { + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair m = + input.readMessage( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.parser(), + extensionRegistry); + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + roots_.add(m); + } else { + rootsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + rootsProof_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + /** + *

+             * Proof has been generated using block with this number as a max block. Should be
+             * less than or equal to the RemoteChangesRequest::max block number.
+             * 
+ * + * bytes max = 2; + * + * @return The max. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMax() { + return max_; + } + + /** + *
+             * Proof has been generated using block with this number as a max block. Should be
+             * less than or equal to the RemoteChangesRequest::max block number.
+             * 
+ * + * bytes max = 2; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + max_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+             * Proof has been generated using block with this number as a max block. Should be
+             * less than or equal to the RemoteChangesRequest::max block number.
+             * 
+ * + * bytes max = 2; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000001); + max_ = getDefaultInstance().getMax(); + onChanged(); + return this; + } + + private void ensureProofIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + proof_ = new java.util.ArrayList(proof_); + bitField0_ |= 0x00000002; + } + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @return A list containing the proof. + */ + public java.util.List + getProofList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(proof_) : proof_; + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @return The count of proof. + */ + public int getProofCount() { + return proof_.size(); + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @param index The index of the element to return. + * @return The proof at the given index. + */ + public com.google.protobuf.ByteString getProof(int index) { + return proof_.get(index); + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @param index The index to set the value at. + * @param value The proof to set. + * @return This builder for chaining. + */ + public Builder setProof( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProofIsMutable(); + proof_.set(index, value); + onChanged(); + return this; + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @param value The proof to add. + * @return This builder for chaining. + */ + public Builder addProof(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProofIsMutable(); + proof_.add(value); + onChanged(); + return this; + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @param values The proof to add. + * @return This builder for chaining. + */ + public Builder addAllProof( + java.lang.Iterable values) { + ensureProofIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, proof_); + onChanged(); + return this; + } + + /** + *
+             * Changes proof.
+             * 
+ * + * repeated bytes proof = 3; + * + * @return This builder for chaining. + */ + public Builder clearProof() { + proof_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private void ensureRootsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + roots_ = + new java.util.ArrayList( + roots_); + bitField0_ |= 0x00000004; + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public java.util.List getRootsList() { + if (rootsBuilder_ == null) { + return java.util.Collections.unmodifiableList(roots_); + } else { + return rootsBuilder_.getMessageList(); + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public int getRootsCount() { + if (rootsBuilder_ == null) { + return roots_.size(); + } else { + return rootsBuilder_.getCount(); + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair getRoots(int index) { + if (rootsBuilder_ == null) { + return roots_.get(index); + } else { + return rootsBuilder_.getMessage(index); + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder setRoots( + int index, com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair value) { + if (rootsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRootsIsMutable(); + roots_.set(index, value); + onChanged(); + } else { + rootsBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder setRoots( + int index, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder builderForValue) { + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + roots_.set(index, builderForValue.build()); + onChanged(); + } else { + rootsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder addRoots(com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair value) { + if (rootsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRootsIsMutable(); + roots_.add(value); + onChanged(); + } else { + rootsBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder addRoots( + int index, com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair value) { + if (rootsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRootsIsMutable(); + roots_.add(index, value); + onChanged(); + } else { + rootsBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder addRoots( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder builderForValue) { + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + roots_.add(builderForValue.build()); + onChanged(); + } else { + rootsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder addRoots( + int index, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder builderForValue) { + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + roots_.add(index, builderForValue.build()); + onChanged(); + } else { + rootsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder addAllRoots( + java.lang.Iterable values) { + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, roots_); + onChanged(); + } else { + rootsBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder clearRoots() { + if (rootsBuilder_ == null) { + roots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rootsBuilder_.clear(); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public Builder removeRoots(int index) { + if (rootsBuilder_ == null) { + ensureRootsIsMutable(); + roots_.remove(index); + onChanged(); + } else { + rootsBuilder_.remove(index); + } + return this; + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder getRootsBuilder( + int index) { + return getRootsFieldBuilder().getBuilder(index); + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder getRootsOrBuilder( + int index) { + if (rootsBuilder_ == null) { + return roots_.get(index); + } else { + return rootsBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public java.util.List + getRootsOrBuilderList() { + if (rootsBuilder_ != null) { + return rootsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(roots_); + } + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder addRootsBuilder() { + return getRootsFieldBuilder().addBuilder( + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.getDefaultInstance()); + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder addRootsBuilder( + int index) { + return getRootsFieldBuilder().addBuilder( + index, + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.getDefaultInstance()); + } + + /** + *
+             * Changes tries roots missing on the requester' node.
+             * 
+ * + * repeated .com.limechain.network.substream.lightclient.pb.Pair roots = 4; + */ + public java.util.List + getRootsBuilderList() { + return getRootsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair, com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder> + getRootsFieldBuilder() { + if (rootsBuilder_ == null) { + rootsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair, com.limechain.network.substream.lightclient.pb.LightClientMessage.Pair.Builder, com.limechain.network.substream.lightclient.pb.LightClientMessage.PairOrBuilder>( + roots_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + roots_ = null; + } + return rootsBuilder_; + } + + /** + *
+             * Missing changes tries roots proof.
+             * 
+ * + * bytes roots_proof = 5; + * + * @return The rootsProof. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRootsProof() { + return rootsProof_; + } + + /** + *
+             * Missing changes tries roots proof.
+             * 
+ * + * bytes roots_proof = 5; + * + * @param value The rootsProof to set. + * @return This builder for chaining. + */ + public Builder setRootsProof(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + rootsProof_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + *
+             * Missing changes tries roots proof.
+             * 
+ * + * bytes roots_proof = 5; + * + * @return This builder for chaining. + */ + public Builder clearRootsProof() { + bitField0_ = (bitField0_ & ~0x00000008); + rootsProof_ = getDefaultInstance().getRootsProof(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.limechain.network.substream.lightclient.pb.RemoteChangesResponse) + } + + } + + // @@protoc_insertion_point(outer_class_scope) +} +//CHECKSTYLE.O \ No newline at end of file diff --git a/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java b/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java new file mode 100644 index 000000000..3092de1d9 --- /dev/null +++ b/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp;public class WarpSyncTest { +} diff --git a/src/test/java/com/limechain/network/substream/lightclient/LightMessagesTest.java b/src/test/java/com/limechain/network/substream/lightclient/LightMessagesTest.java new file mode 100644 index 000000000..d07ead710 --- /dev/null +++ b/src/test/java/com/limechain/network/substream/lightclient/LightMessagesTest.java @@ -0,0 +1,71 @@ +package com.limechain.network.substream.lightclient; + +import io.libp2p.core.Host; +import io.libp2p.core.multiformats.Multiaddr; +import io.libp2p.protocol.Ping; +import org.junit.jupiter.api.Test; +import org.peergos.HostBuilder; + +import java.util.List; +import java.util.Objects; +import java.util.Random; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class LightMessagesTest { + + @Test + public void remoteFunctions_return_correctData() { + Host senderNode = null; + Host receiverNode = null; + + try { + HostBuilder hostBuilder1 = + (new HostBuilder()).generateIdentity().listenLocalhost(10000 + new Random().nextInt(50000)); + + var lightMessages1 = new LightMessages(new LightMessagesProtocol(new LightMessagesEngine())); + hostBuilder1.addProtocols(List.of(new Ping(), lightMessages1)); + senderNode = hostBuilder1.build(); + + HostBuilder hostBuilder2 = + (new HostBuilder()).generateIdentity().listenLocalhost(10000 + new Random().nextInt(50000)); + var lightMessages2 = new LightMessages(new LightMessagesProtocol(new LightMessagesEngine())); + hostBuilder2.addProtocols(List.of(new Ping(), lightMessages2)); + receiverNode = hostBuilder2.build(); + + senderNode.start().join(); + receiverNode.start().join(); + + Multiaddr address2 = receiverNode.listenAddresses().get(0); + senderNode.getAddressBook().addAddrs(Objects.requireNonNull(address2.getPeerId()), 0, address2).join(); + + var remoteCallResponse = + lightMessages1.remoteCallRequest(senderNode, senderNode.getAddressBook(), receiverNode.getPeerId(), + "0x123", + "testMethod", "0x"); + assertTrue(remoteCallResponse.hasRemoteCallResponse()); + + var remoteReadResponse = + lightMessages1.remoteReadRequest(senderNode, senderNode.getAddressBook(), receiverNode.getPeerId(), + "0x123", + new String[]{"0x321"}); + assertTrue(remoteReadResponse.hasRemoteReadResponse()); + + var remoteReadChildResponse = + lightMessages1.remoteReadChildRequest(senderNode, senderNode.getAddressBook(), + receiverNode.getPeerId(), + "0x123", + "0xchild", new String[]{"0x321"}); + assertTrue(remoteReadChildResponse.hasRemoteReadResponse()); + } finally { + + if (senderNode != null) { + senderNode.stop(); + } + + if (receiverNode != null) { + receiverNode.stop(); + } + } + } +}