All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.peer.BlockAndPrivateData Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: peer/events.proto
// Protobuf Java Version: 4.28.2

package org.hyperledger.fabric.protos.peer;

/**
 * 
 * BlockAndPrivateData contains Block and a map from tx_seq_in_block to rwset.TxPvtReadWriteSet
 * 
* * Protobuf type {@code protos.BlockAndPrivateData} */ public final class BlockAndPrivateData extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:protos.BlockAndPrivateData) BlockAndPrivateDataOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 28, /* patch= */ 2, /* suffix= */ "", BlockAndPrivateData.class.getName()); } // Use BlockAndPrivateData.newBuilder() to construct. private BlockAndPrivateData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BlockAndPrivateData() { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: return internalGetPrivateDataMap(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.BlockAndPrivateData.class, org.hyperledger.fabric.protos.peer.BlockAndPrivateData.Builder.class); } private int bitField0_; public static final int BLOCK_FIELD_NUMBER = 1; private org.hyperledger.fabric.protos.common.Block block_; /** * .common.Block block = 1 [json_name = "block"]; * @return Whether the block field is set. */ @java.lang.Override public boolean hasBlock() { return ((bitField0_ & 0x00000001) != 0); } /** * .common.Block block = 1 [json_name = "block"]; * @return The block. */ @java.lang.Override public org.hyperledger.fabric.protos.common.Block getBlock() { return block_ == null ? org.hyperledger.fabric.protos.common.Block.getDefaultInstance() : block_; } /** * .common.Block block = 1 [json_name = "block"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.BlockOrBuilder getBlockOrBuilder() { return block_ == null ? org.hyperledger.fabric.protos.common.Block.getDefaultInstance() : block_; } public static final int PRIVATE_DATA_MAP_FIELD_NUMBER = 2; private static final class PrivateDataMapDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.Long, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_PrivateDataMapEntry_descriptor, com.google.protobuf.WireFormat.FieldType.UINT64, 0L, com.google.protobuf.WireFormat.FieldType.MESSAGE, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.Long, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet> privateDataMap_; private com.google.protobuf.MapField internalGetPrivateDataMap() { if (privateDataMap_ == null) { return com.google.protobuf.MapField.emptyMapField( PrivateDataMapDefaultEntryHolder.defaultEntry); } return privateDataMap_; } public int getPrivateDataMapCount() { return internalGetPrivateDataMap().getMap().size(); } /** *
   * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
   * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public boolean containsPrivateDataMap( long key) { return internalGetPrivateDataMap().getMap().containsKey(key); } /** * Use {@link #getPrivateDataMapMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPrivateDataMap() { return getPrivateDataMapMap(); } /** *
   * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
   * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public java.util.Map getPrivateDataMapMap() { return internalGetPrivateDataMap().getMap(); } /** *
   * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
   * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public /* nullable */ org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPrivateDataMapOrDefault( long key, /* nullable */ org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet defaultValue) { java.util.Map map = internalGetPrivateDataMap().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
   * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPrivateDataMapOrThrow( long key) { java.util.Map map = internalGetPrivateDataMap().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getBlock()); } com.google.protobuf.GeneratedMessage .serializeLongMapTo( output, internalGetPrivateDataMap(), PrivateDataMapDefaultEntryHolder.defaultEntry, 2); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getBlock()); } for (java.util.Map.Entry entry : internalGetPrivateDataMap().getMap().entrySet()) { com.google.protobuf.MapEntry privateDataMap__ = PrivateDataMapDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, privateDataMap__); } 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 org.hyperledger.fabric.protos.peer.BlockAndPrivateData)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.BlockAndPrivateData other = (org.hyperledger.fabric.protos.peer.BlockAndPrivateData) obj; if (hasBlock() != other.hasBlock()) return false; if (hasBlock()) { if (!getBlock() .equals(other.getBlock())) return false; } if (!internalGetPrivateDataMap().equals( other.internalGetPrivateDataMap())) 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(); if (hasBlock()) { hash = (37 * hash) + BLOCK_FIELD_NUMBER; hash = (53 * hash) + getBlock().hashCode(); } if (!internalGetPrivateDataMap().getMap().isEmpty()) { hash = (37 * hash) + PRIVATE_DATA_MAP_FIELD_NUMBER; hash = (53 * hash) + internalGetPrivateDataMap().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.BlockAndPrivateData prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * BlockAndPrivateData contains Block and a map from tx_seq_in_block to rwset.TxPvtReadWriteSet
   * 
* * Protobuf type {@code protos.BlockAndPrivateData} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:protos.BlockAndPrivateData) org.hyperledger.fabric.protos.peer.BlockAndPrivateDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: return internalGetPrivateDataMap(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 2: return internalGetMutablePrivateDataMap(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.BlockAndPrivateData.class, org.hyperledger.fabric.protos.peer.BlockAndPrivateData.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.BlockAndPrivateData.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getBlockFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; block_ = null; if (blockBuilder_ != null) { blockBuilder_.dispose(); blockBuilder_ = null; } internalGetMutablePrivateDataMap().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.EventsProto.internal_static_protos_BlockAndPrivateData_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.peer.BlockAndPrivateData getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.BlockAndPrivateData.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.peer.BlockAndPrivateData build() { org.hyperledger.fabric.protos.peer.BlockAndPrivateData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.peer.BlockAndPrivateData buildPartial() { org.hyperledger.fabric.protos.peer.BlockAndPrivateData result = new org.hyperledger.fabric.protos.peer.BlockAndPrivateData(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.hyperledger.fabric.protos.peer.BlockAndPrivateData result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.block_ = blockBuilder_ == null ? block_ : blockBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.privateDataMap_ = internalGetPrivateDataMap().build(PrivateDataMapDefaultEntryHolder.defaultEntry); } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.BlockAndPrivateData) { return mergeFrom((org.hyperledger.fabric.protos.peer.BlockAndPrivateData)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.BlockAndPrivateData other) { if (other == org.hyperledger.fabric.protos.peer.BlockAndPrivateData.getDefaultInstance()) return this; if (other.hasBlock()) { mergeBlock(other.getBlock()); } internalGetMutablePrivateDataMap().mergeFrom( other.internalGetPrivateDataMap()); bitField0_ |= 0x00000002; 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( getBlockFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.google.protobuf.MapEntry privateDataMap__ = input.readMessage( PrivateDataMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutablePrivateDataMap().ensureBuilderMap().put( privateDataMap__.getKey(), privateDataMap__.getValue()); 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; } private int bitField0_; private org.hyperledger.fabric.protos.common.Block block_; private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.common.Block, org.hyperledger.fabric.protos.common.Block.Builder, org.hyperledger.fabric.protos.common.BlockOrBuilder> blockBuilder_; /** * .common.Block block = 1 [json_name = "block"]; * @return Whether the block field is set. */ public boolean hasBlock() { return ((bitField0_ & 0x00000001) != 0); } /** * .common.Block block = 1 [json_name = "block"]; * @return The block. */ public org.hyperledger.fabric.protos.common.Block getBlock() { if (blockBuilder_ == null) { return block_ == null ? org.hyperledger.fabric.protos.common.Block.getDefaultInstance() : block_; } else { return blockBuilder_.getMessage(); } } /** * .common.Block block = 1 [json_name = "block"]; */ public Builder setBlock(org.hyperledger.fabric.protos.common.Block value) { if (blockBuilder_ == null) { if (value == null) { throw new NullPointerException(); } block_ = value; } else { blockBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .common.Block block = 1 [json_name = "block"]; */ public Builder setBlock( org.hyperledger.fabric.protos.common.Block.Builder builderForValue) { if (blockBuilder_ == null) { block_ = builderForValue.build(); } else { blockBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .common.Block block = 1 [json_name = "block"]; */ public Builder mergeBlock(org.hyperledger.fabric.protos.common.Block value) { if (blockBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && block_ != null && block_ != org.hyperledger.fabric.protos.common.Block.getDefaultInstance()) { getBlockBuilder().mergeFrom(value); } else { block_ = value; } } else { blockBuilder_.mergeFrom(value); } if (block_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * .common.Block block = 1 [json_name = "block"]; */ public Builder clearBlock() { bitField0_ = (bitField0_ & ~0x00000001); block_ = null; if (blockBuilder_ != null) { blockBuilder_.dispose(); blockBuilder_ = null; } onChanged(); return this; } /** * .common.Block block = 1 [json_name = "block"]; */ public org.hyperledger.fabric.protos.common.Block.Builder getBlockBuilder() { bitField0_ |= 0x00000001; onChanged(); return getBlockFieldBuilder().getBuilder(); } /** * .common.Block block = 1 [json_name = "block"]; */ public org.hyperledger.fabric.protos.common.BlockOrBuilder getBlockOrBuilder() { if (blockBuilder_ != null) { return blockBuilder_.getMessageOrBuilder(); } else { return block_ == null ? org.hyperledger.fabric.protos.common.Block.getDefaultInstance() : block_; } } /** * .common.Block block = 1 [json_name = "block"]; */ private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.common.Block, org.hyperledger.fabric.protos.common.Block.Builder, org.hyperledger.fabric.protos.common.BlockOrBuilder> getBlockFieldBuilder() { if (blockBuilder_ == null) { blockBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.common.Block, org.hyperledger.fabric.protos.common.Block.Builder, org.hyperledger.fabric.protos.common.BlockOrBuilder>( getBlock(), getParentForChildren(), isClean()); block_ = null; } return blockBuilder_; } private static final class PrivateDataMapConverter implements com.google.protobuf.MapFieldBuilder.Converter { @java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet build(org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder val) { if (val instanceof org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet) { return (org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet) val; } return ((org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry defaultEntry() { return PrivateDataMapDefaultEntryHolder.defaultEntry; } }; private static final PrivateDataMapConverter privateDataMapConverter = new PrivateDataMapConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.Long, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder> privateDataMap_; private com.google.protobuf.MapFieldBuilder internalGetPrivateDataMap() { if (privateDataMap_ == null) { return new com.google.protobuf.MapFieldBuilder<>(privateDataMapConverter); } return privateDataMap_; } private com.google.protobuf.MapFieldBuilder internalGetMutablePrivateDataMap() { if (privateDataMap_ == null) { privateDataMap_ = new com.google.protobuf.MapFieldBuilder<>(privateDataMapConverter); } bitField0_ |= 0x00000002; onChanged(); return privateDataMap_; } public int getPrivateDataMapCount() { return internalGetPrivateDataMap().ensureBuilderMap().size(); } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public boolean containsPrivateDataMap( long key) { return internalGetPrivateDataMap().ensureBuilderMap().containsKey(key); } /** * Use {@link #getPrivateDataMapMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPrivateDataMap() { return getPrivateDataMapMap(); } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public java.util.Map getPrivateDataMapMap() { return internalGetPrivateDataMap().getImmutableMap(); } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public /* nullable */ org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPrivateDataMapOrDefault( long key, /* nullable */ org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet defaultValue) { java.util.Map map = internalGetMutablePrivateDataMap().ensureBuilderMap(); return map.containsKey(key) ? privateDataMapConverter.build(map.get(key)) : defaultValue; } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ @java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPrivateDataMapOrThrow( long key) { java.util.Map map = internalGetMutablePrivateDataMap().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return privateDataMapConverter.build(map.get(key)); } public Builder clearPrivateDataMap() { bitField0_ = (bitField0_ & ~0x00000002); internalGetMutablePrivateDataMap().clear(); return this; } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ public Builder removePrivateDataMap( long key) { internalGetMutablePrivateDataMap().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutablePrivateDataMap() { bitField0_ |= 0x00000002; return internalGetMutablePrivateDataMap().ensureMessageMap(); } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ public Builder putPrivateDataMap( long key, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet value) { if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePrivateDataMap().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000002; return this; } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ public Builder putAllPrivateDataMap( java.util.Map values) { for (java.util.Map.Entry e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutablePrivateDataMap().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000002; return this; } /** *
     * map from tx_seq_in_block to rwset.TxPvtReadWriteSet
     * 
* * map<uint64, .rwset.TxPvtReadWriteSet> private_data_map = 2 [json_name = "privateDataMap"]; */ public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder putPrivateDataMapBuilderIfAbsent( long key) { java.util.Map builderMap = internalGetMutablePrivateDataMap().ensureBuilderMap(); org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder entry = builderMap.get(key); if (entry == null) { entry = org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.newBuilder(); builderMap.put(key, entry); } if (entry instanceof org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet) { entry = ((org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet) entry).toBuilder(); builderMap.put(key, entry); } return (org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder) entry; } // @@protoc_insertion_point(builder_scope:protos.BlockAndPrivateData) } // @@protoc_insertion_point(class_scope:protos.BlockAndPrivateData) private static final org.hyperledger.fabric.protos.peer.BlockAndPrivateData DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.BlockAndPrivateData(); } public static org.hyperledger.fabric.protos.peer.BlockAndPrivateData getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BlockAndPrivateData 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(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.hyperledger.fabric.protos.peer.BlockAndPrivateData getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy