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

org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo Maven / Gradle / Ivy

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

package org.hyperledger.fabric.protos.transientstore;

/**
 * 
 * TxPvtReadWriteSetWithConfigInfo encapsulates the transaction's private
 * read-write set and additional information about the configurations such as
 * the latest collection config when the transaction is simulated
 * 
* * Protobuf type {@code transientstore.TxPvtReadWriteSetWithConfigInfo} */ public final class TxPvtReadWriteSetWithConfigInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:transientstore.TxPvtReadWriteSetWithConfigInfo) TxPvtReadWriteSetWithConfigInfoOrBuilder { 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= */ "", TxPvtReadWriteSetWithConfigInfo.class.getName()); } // Use TxPvtReadWriteSetWithConfigInfo.newBuilder() to construct. private TxPvtReadWriteSetWithConfigInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TxPvtReadWriteSetWithConfigInfo() { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetCollectionConfigs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.class, org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.Builder.class); } private int bitField0_; public static final int ENDORSED_AT_FIELD_NUMBER = 1; private long endorsedAt_ = 0L; /** * uint64 endorsed_at = 1 [json_name = "endorsedAt"]; * @return The endorsedAt. */ @java.lang.Override public long getEndorsedAt() { return endorsedAt_; } public static final int PVT_RWSET_FIELD_NUMBER = 2; private org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet pvtRwset_; /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; * @return Whether the pvtRwset field is set. */ @java.lang.Override public boolean hasPvtRwset() { return ((bitField0_ & 0x00000001) != 0); } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; * @return The pvtRwset. */ @java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPvtRwset() { return pvtRwset_ == null ? org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance() : pvtRwset_; } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ @java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder getPvtRwsetOrBuilder() { return pvtRwset_ == null ? org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance() : pvtRwset_; } public static final int COLLECTION_CONFIGS_FIELD_NUMBER = 3; private static final class CollectionConfigsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, org.hyperledger.fabric.protos.peer.CollectionConfigPackage> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_CollectionConfigsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, org.hyperledger.fabric.protos.peer.CollectionConfigPackage.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.peer.CollectionConfigPackage> collectionConfigs_; private com.google.protobuf.MapField internalGetCollectionConfigs() { if (collectionConfigs_ == null) { return com.google.protobuf.MapField.emptyMapField( CollectionConfigsDefaultEntryHolder.defaultEntry); } return collectionConfigs_; } public int getCollectionConfigsCount() { return internalGetCollectionConfigs().getMap().size(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public boolean containsCollectionConfigs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetCollectionConfigs().getMap().containsKey(key); } /** * Use {@link #getCollectionConfigsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getCollectionConfigs() { return getCollectionConfigsMap(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public java.util.Map getCollectionConfigsMap() { return internalGetCollectionConfigs().getMap(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public /* nullable */ org.hyperledger.fabric.protos.peer.CollectionConfigPackage getCollectionConfigsOrDefault( java.lang.String key, /* nullable */ org.hyperledger.fabric.protos.peer.CollectionConfigPackage defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetCollectionConfigs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public org.hyperledger.fabric.protos.peer.CollectionConfigPackage getCollectionConfigsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetCollectionConfigs().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 (endorsedAt_ != 0L) { output.writeUInt64(1, endorsedAt_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getPvtRwset()); } com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetCollectionConfigs(), CollectionConfigsDefaultEntryHolder.defaultEntry, 3); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (endorsedAt_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, endorsedAt_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getPvtRwset()); } for (java.util.Map.Entry entry : internalGetCollectionConfigs().getMap().entrySet()) { com.google.protobuf.MapEntry collectionConfigs__ = CollectionConfigsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, collectionConfigs__); } 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.transientstore.TxPvtReadWriteSetWithConfigInfo)) { return super.equals(obj); } org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo other = (org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo) obj; if (getEndorsedAt() != other.getEndorsedAt()) return false; if (hasPvtRwset() != other.hasPvtRwset()) return false; if (hasPvtRwset()) { if (!getPvtRwset() .equals(other.getPvtRwset())) return false; } if (!internalGetCollectionConfigs().equals( other.internalGetCollectionConfigs())) 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) + ENDORSED_AT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getEndorsedAt()); if (hasPvtRwset()) { hash = (37 * hash) + PVT_RWSET_FIELD_NUMBER; hash = (53 * hash) + getPvtRwset().hashCode(); } if (!internalGetCollectionConfigs().getMap().isEmpty()) { hash = (37 * hash) + COLLECTION_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + internalGetCollectionConfigs().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo 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; } /** *
   * TxPvtReadWriteSetWithConfigInfo encapsulates the transaction's private
   * read-write set and additional information about the configurations such as
   * the latest collection config when the transaction is simulated
   * 
* * Protobuf type {@code transientstore.TxPvtReadWriteSetWithConfigInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:transientstore.TxPvtReadWriteSetWithConfigInfo) org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetCollectionConfigs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableCollectionConfigs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.class, org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.Builder.class); } // Construct using org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getPvtRwsetFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; endorsedAt_ = 0L; pvtRwset_ = null; if (pvtRwsetBuilder_ != null) { pvtRwsetBuilder_.dispose(); pvtRwsetBuilder_ = null; } internalGetMutableCollectionConfigs().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.transientstore.TransientstoreProto.internal_static_transientstore_TxPvtReadWriteSetWithConfigInfo_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo getDefaultInstanceForType() { return org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo build() { org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo buildPartial() { org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo result = new org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.endorsedAt_ = endorsedAt_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.pvtRwset_ = pvtRwsetBuilder_ == null ? pvtRwset_ : pvtRwsetBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.collectionConfigs_ = internalGetCollectionConfigs().build(CollectionConfigsDefaultEntryHolder.defaultEntry); } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo) { return mergeFrom((org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo other) { if (other == org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo.getDefaultInstance()) return this; if (other.getEndorsedAt() != 0L) { setEndorsedAt(other.getEndorsedAt()); } if (other.hasPvtRwset()) { mergePvtRwset(other.getPvtRwset()); } internalGetMutableCollectionConfigs().mergeFrom( other.internalGetCollectionConfigs()); bitField0_ |= 0x00000004; 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 8: { endorsedAt_ = input.readUInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getPvtRwsetFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.protobuf.MapEntry collectionConfigs__ = input.readMessage( CollectionConfigsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableCollectionConfigs().ensureBuilderMap().put( collectionConfigs__.getKey(), collectionConfigs__.getValue()); bitField0_ |= 0x00000004; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long endorsedAt_ ; /** * uint64 endorsed_at = 1 [json_name = "endorsedAt"]; * @return The endorsedAt. */ @java.lang.Override public long getEndorsedAt() { return endorsedAt_; } /** * uint64 endorsed_at = 1 [json_name = "endorsedAt"]; * @param value The endorsedAt to set. * @return This builder for chaining. */ public Builder setEndorsedAt(long value) { endorsedAt_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * uint64 endorsed_at = 1 [json_name = "endorsedAt"]; * @return This builder for chaining. */ public Builder clearEndorsedAt() { bitField0_ = (bitField0_ & ~0x00000001); endorsedAt_ = 0L; onChanged(); return this; } private org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet pvtRwset_; private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder> pvtRwsetBuilder_; /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; * @return Whether the pvtRwset field is set. */ public boolean hasPvtRwset() { return ((bitField0_ & 0x00000002) != 0); } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; * @return The pvtRwset. */ public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet getPvtRwset() { if (pvtRwsetBuilder_ == null) { return pvtRwset_ == null ? org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance() : pvtRwset_; } else { return pvtRwsetBuilder_.getMessage(); } } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public Builder setPvtRwset(org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet value) { if (pvtRwsetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pvtRwset_ = value; } else { pvtRwsetBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public Builder setPvtRwset( org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder builderForValue) { if (pvtRwsetBuilder_ == null) { pvtRwset_ = builderForValue.build(); } else { pvtRwsetBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public Builder mergePvtRwset(org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet value) { if (pvtRwsetBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && pvtRwset_ != null && pvtRwset_ != org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance()) { getPvtRwsetBuilder().mergeFrom(value); } else { pvtRwset_ = value; } } else { pvtRwsetBuilder_.mergeFrom(value); } if (pvtRwset_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public Builder clearPvtRwset() { bitField0_ = (bitField0_ & ~0x00000002); pvtRwset_ = null; if (pvtRwsetBuilder_ != null) { pvtRwsetBuilder_.dispose(); pvtRwsetBuilder_ = null; } onChanged(); return this; } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder getPvtRwsetBuilder() { bitField0_ |= 0x00000002; onChanged(); return getPvtRwsetFieldBuilder().getBuilder(); } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ public org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder getPvtRwsetOrBuilder() { if (pvtRwsetBuilder_ != null) { return pvtRwsetBuilder_.getMessageOrBuilder(); } else { return pvtRwset_ == null ? org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.getDefaultInstance() : pvtRwset_; } } /** * .rwset.TxPvtReadWriteSet pvt_rwset = 2 [json_name = "pvtRwset"]; */ private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder> getPvtRwsetFieldBuilder() { if (pvtRwsetBuilder_ == null) { pvtRwsetBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.TxPvtReadWriteSetOrBuilder>( getPvtRwset(), getParentForChildren(), isClean()); pvtRwset_ = null; } return pvtRwsetBuilder_; } private static final class CollectionConfigsConverter implements com.google.protobuf.MapFieldBuilder.Converter { @java.lang.Override public org.hyperledger.fabric.protos.peer.CollectionConfigPackage build(org.hyperledger.fabric.protos.peer.CollectionConfigPackageOrBuilder val) { if (val instanceof org.hyperledger.fabric.protos.peer.CollectionConfigPackage) { return (org.hyperledger.fabric.protos.peer.CollectionConfigPackage) val; } return ((org.hyperledger.fabric.protos.peer.CollectionConfigPackage.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry defaultEntry() { return CollectionConfigsDefaultEntryHolder.defaultEntry; } }; private static final CollectionConfigsConverter collectionConfigsConverter = new CollectionConfigsConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, org.hyperledger.fabric.protos.peer.CollectionConfigPackageOrBuilder, org.hyperledger.fabric.protos.peer.CollectionConfigPackage, org.hyperledger.fabric.protos.peer.CollectionConfigPackage.Builder> collectionConfigs_; private com.google.protobuf.MapFieldBuilder internalGetCollectionConfigs() { if (collectionConfigs_ == null) { return new com.google.protobuf.MapFieldBuilder<>(collectionConfigsConverter); } return collectionConfigs_; } private com.google.protobuf.MapFieldBuilder internalGetMutableCollectionConfigs() { if (collectionConfigs_ == null) { collectionConfigs_ = new com.google.protobuf.MapFieldBuilder<>(collectionConfigsConverter); } bitField0_ |= 0x00000004; onChanged(); return collectionConfigs_; } public int getCollectionConfigsCount() { return internalGetCollectionConfigs().ensureBuilderMap().size(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public boolean containsCollectionConfigs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetCollectionConfigs().ensureBuilderMap().containsKey(key); } /** * Use {@link #getCollectionConfigsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getCollectionConfigs() { return getCollectionConfigsMap(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public java.util.Map getCollectionConfigsMap() { return internalGetCollectionConfigs().getImmutableMap(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public /* nullable */ org.hyperledger.fabric.protos.peer.CollectionConfigPackage getCollectionConfigsOrDefault( java.lang.String key, /* nullable */ org.hyperledger.fabric.protos.peer.CollectionConfigPackage defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableCollectionConfigs().ensureBuilderMap(); return map.containsKey(key) ? collectionConfigsConverter.build(map.get(key)) : defaultValue; } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ @java.lang.Override public org.hyperledger.fabric.protos.peer.CollectionConfigPackage getCollectionConfigsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableCollectionConfigs().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return collectionConfigsConverter.build(map.get(key)); } public Builder clearCollectionConfigs() { bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableCollectionConfigs().clear(); return this; } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ public Builder removeCollectionConfigs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableCollectionConfigs().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableCollectionConfigs() { bitField0_ |= 0x00000004; return internalGetMutableCollectionConfigs().ensureMessageMap(); } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ public Builder putCollectionConfigs( java.lang.String key, org.hyperledger.fabric.protos.peer.CollectionConfigPackage value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableCollectionConfigs().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000004; return this; } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ public Builder putAllCollectionConfigs( java.util.Map values) { for (java.util.Map.Entry e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableCollectionConfigs().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000004; return this; } /** * map<string, .protos.CollectionConfigPackage> collection_configs = 3 [json_name = "collectionConfigs"]; */ public org.hyperledger.fabric.protos.peer.CollectionConfigPackage.Builder putCollectionConfigsBuilderIfAbsent( java.lang.String key) { java.util.Map builderMap = internalGetMutableCollectionConfigs().ensureBuilderMap(); org.hyperledger.fabric.protos.peer.CollectionConfigPackageOrBuilder entry = builderMap.get(key); if (entry == null) { entry = org.hyperledger.fabric.protos.peer.CollectionConfigPackage.newBuilder(); builderMap.put(key, entry); } if (entry instanceof org.hyperledger.fabric.protos.peer.CollectionConfigPackage) { entry = ((org.hyperledger.fabric.protos.peer.CollectionConfigPackage) entry).toBuilder(); builderMap.put(key, entry); } return (org.hyperledger.fabric.protos.peer.CollectionConfigPackage.Builder) entry; } // @@protoc_insertion_point(builder_scope:transientstore.TxPvtReadWriteSetWithConfigInfo) } // @@protoc_insertion_point(class_scope:transientstore.TxPvtReadWriteSetWithConfigInfo) private static final org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo(); } public static org.hyperledger.fabric.protos.transientstore.TxPvtReadWriteSetWithConfigInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TxPvtReadWriteSetWithConfigInfo 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.transientstore.TxPvtReadWriteSetWithConfigInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy