org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: ledger/rwset/rwset.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.ledger.rwset;
/**
*
* TxReadWriteSet encapsulates a read-write set for a transaction
* DataModel specifies the enum value of the data model
* ns_rwset field specifies a list of chaincode specific read-write set (one for each chaincode)
*
*
* Protobuf type {@code rwset.TxReadWriteSet}
*/
public final class TxReadWriteSet extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:rwset.TxReadWriteSet)
TxReadWriteSetOrBuilder {
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= */ "",
TxReadWriteSet.class.getName());
}
// Use TxReadWriteSet.newBuilder() to construct.
private TxReadWriteSet(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private TxReadWriteSet() {
dataModel_ = 0;
nsRwset_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.RWSetProto.internal_static_rwset_TxReadWriteSet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.RWSetProto.internal_static_rwset_TxReadWriteSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.class, org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.Builder.class);
}
/**
* Protobuf enum {@code rwset.TxReadWriteSet.DataModel}
*/
public enum DataModel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* KV = 0;
*/
KV(0),
UNRECOGNIZED(-1),
;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
DataModel.class.getName());
}
/**
* KV = 0;
*/
public static final int KV_VALUE = 0;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DataModel valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static DataModel forNumber(int value) {
switch (value) {
case 0: return KV;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
DataModel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public DataModel findValueByNumber(int number) {
return DataModel.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.getDescriptor().getEnumTypes().get(0);
}
private static final DataModel[] VALUES = values();
public static DataModel valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private DataModel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:rwset.TxReadWriteSet.DataModel)
}
public static final int DATA_MODEL_FIELD_NUMBER = 1;
private int dataModel_ = 0;
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @return The enum numeric value on the wire for dataModel.
*/
@java.lang.Override public int getDataModelValue() {
return dataModel_;
}
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @return The dataModel.
*/
@java.lang.Override public org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel getDataModel() {
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel result = org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.forNumber(dataModel_);
return result == null ? org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.UNRECOGNIZED : result;
}
public static final int NS_RWSET_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List nsRwset_;
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
@java.lang.Override
public java.util.List getNsRwsetList() {
return nsRwset_;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder>
getNsRwsetOrBuilderList() {
return nsRwset_;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
@java.lang.Override
public int getNsRwsetCount() {
return nsRwset_.size();
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet getNsRwset(int index) {
return nsRwset_.get(index);
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder getNsRwsetOrBuilder(
int index) {
return nsRwset_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (dataModel_ != org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.KV.getNumber()) {
output.writeEnum(1, dataModel_);
}
for (int i = 0; i < nsRwset_.size(); i++) {
output.writeMessage(2, nsRwset_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (dataModel_ != org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.KV.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, dataModel_);
}
for (int i = 0; i < nsRwset_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, nsRwset_.get(i));
}
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.ledger.rwset.TxReadWriteSet)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet other = (org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet) obj;
if (dataModel_ != other.dataModel_) return false;
if (!getNsRwsetList()
.equals(other.getNsRwsetList())) 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) + DATA_MODEL_FIELD_NUMBER;
hash = (53 * hash) + dataModel_;
if (getNsRwsetCount() > 0) {
hash = (37 * hash) + NS_RWSET_FIELD_NUMBER;
hash = (53 * hash) + getNsRwsetList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet 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.ledger.rwset.TxReadWriteSet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet 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.ledger.rwset.TxReadWriteSet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet 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.ledger.rwset.TxReadWriteSet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet 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.ledger.rwset.TxReadWriteSet parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet 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.ledger.rwset.TxReadWriteSet 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;
}
/**
*
* TxReadWriteSet encapsulates a read-write set for a transaction
* DataModel specifies the enum value of the data model
* ns_rwset field specifies a list of chaincode specific read-write set (one for each chaincode)
*
*
* Protobuf type {@code rwset.TxReadWriteSet}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:rwset.TxReadWriteSet)
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.RWSetProto.internal_static_rwset_TxReadWriteSet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.RWSetProto.internal_static_rwset_TxReadWriteSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.class, org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
dataModel_ = 0;
if (nsRwsetBuilder_ == null) {
nsRwset_ = java.util.Collections.emptyList();
} else {
nsRwset_ = null;
nsRwsetBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.ledger.rwset.RWSetProto.internal_static_rwset_TxReadWriteSet_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet build() {
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet buildPartial() {
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet result = new org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet result) {
if (nsRwsetBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
nsRwset_ = java.util.Collections.unmodifiableList(nsRwset_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.nsRwset_ = nsRwset_;
} else {
result.nsRwset_ = nsRwsetBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.dataModel_ = dataModel_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet) {
return mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet other) {
if (other == org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.getDefaultInstance()) return this;
if (other.dataModel_ != 0) {
setDataModelValue(other.getDataModelValue());
}
if (nsRwsetBuilder_ == null) {
if (!other.nsRwset_.isEmpty()) {
if (nsRwset_.isEmpty()) {
nsRwset_ = other.nsRwset_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureNsRwsetIsMutable();
nsRwset_.addAll(other.nsRwset_);
}
onChanged();
}
} else {
if (!other.nsRwset_.isEmpty()) {
if (nsRwsetBuilder_.isEmpty()) {
nsRwsetBuilder_.dispose();
nsRwsetBuilder_ = null;
nsRwset_ = other.nsRwset_;
bitField0_ = (bitField0_ & ~0x00000002);
nsRwsetBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getNsRwsetFieldBuilder() : null;
} else {
nsRwsetBuilder_.addAllMessages(other.nsRwset_);
}
}
}
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: {
dataModel_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet m =
input.readMessage(
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.parser(),
extensionRegistry);
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
nsRwset_.add(m);
} else {
nsRwsetBuilder_.addMessage(m);
}
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 int dataModel_ = 0;
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @return The enum numeric value on the wire for dataModel.
*/
@java.lang.Override public int getDataModelValue() {
return dataModel_;
}
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @param value The enum numeric value on the wire for dataModel to set.
* @return This builder for chaining.
*/
public Builder setDataModelValue(int value) {
dataModel_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @return The dataModel.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel getDataModel() {
org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel result = org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.forNumber(dataModel_);
return result == null ? org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel.UNRECOGNIZED : result;
}
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @param value The dataModel to set.
* @return This builder for chaining.
*/
public Builder setDataModel(org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet.DataModel value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
dataModel_ = value.getNumber();
onChanged();
return this;
}
/**
* .rwset.TxReadWriteSet.DataModel data_model = 1 [json_name = "dataModel"];
* @return This builder for chaining.
*/
public Builder clearDataModel() {
bitField0_ = (bitField0_ & ~0x00000001);
dataModel_ = 0;
onChanged();
return this;
}
private java.util.List nsRwset_ =
java.util.Collections.emptyList();
private void ensureNsRwsetIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
nsRwset_ = new java.util.ArrayList(nsRwset_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder> nsRwsetBuilder_;
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public java.util.List getNsRwsetList() {
if (nsRwsetBuilder_ == null) {
return java.util.Collections.unmodifiableList(nsRwset_);
} else {
return nsRwsetBuilder_.getMessageList();
}
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public int getNsRwsetCount() {
if (nsRwsetBuilder_ == null) {
return nsRwset_.size();
} else {
return nsRwsetBuilder_.getCount();
}
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet getNsRwset(int index) {
if (nsRwsetBuilder_ == null) {
return nsRwset_.get(index);
} else {
return nsRwsetBuilder_.getMessage(index);
}
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder setNsRwset(
int index, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet value) {
if (nsRwsetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNsRwsetIsMutable();
nsRwset_.set(index, value);
onChanged();
} else {
nsRwsetBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder setNsRwset(
int index, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder builderForValue) {
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
nsRwset_.set(index, builderForValue.build());
onChanged();
} else {
nsRwsetBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder addNsRwset(org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet value) {
if (nsRwsetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNsRwsetIsMutable();
nsRwset_.add(value);
onChanged();
} else {
nsRwsetBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder addNsRwset(
int index, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet value) {
if (nsRwsetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNsRwsetIsMutable();
nsRwset_.add(index, value);
onChanged();
} else {
nsRwsetBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder addNsRwset(
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder builderForValue) {
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
nsRwset_.add(builderForValue.build());
onChanged();
} else {
nsRwsetBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder addNsRwset(
int index, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder builderForValue) {
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
nsRwset_.add(index, builderForValue.build());
onChanged();
} else {
nsRwsetBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder addAllNsRwset(
java.lang.Iterable extends org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet> values) {
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, nsRwset_);
onChanged();
} else {
nsRwsetBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder clearNsRwset() {
if (nsRwsetBuilder_ == null) {
nsRwset_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
nsRwsetBuilder_.clear();
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public Builder removeNsRwset(int index) {
if (nsRwsetBuilder_ == null) {
ensureNsRwsetIsMutable();
nsRwset_.remove(index);
onChanged();
} else {
nsRwsetBuilder_.remove(index);
}
return this;
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder getNsRwsetBuilder(
int index) {
return getNsRwsetFieldBuilder().getBuilder(index);
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder getNsRwsetOrBuilder(
int index) {
if (nsRwsetBuilder_ == null) {
return nsRwset_.get(index); } else {
return nsRwsetBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public java.util.List extends org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder>
getNsRwsetOrBuilderList() {
if (nsRwsetBuilder_ != null) {
return nsRwsetBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(nsRwset_);
}
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder addNsRwsetBuilder() {
return getNsRwsetFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.getDefaultInstance());
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder addNsRwsetBuilder(
int index) {
return getNsRwsetFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.getDefaultInstance());
}
/**
* repeated .rwset.NsReadWriteSet ns_rwset = 2 [json_name = "nsRwset"];
*/
public java.util.List
getNsRwsetBuilderList() {
return getNsRwsetFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder>
getNsRwsetFieldBuilder() {
if (nsRwsetBuilder_ == null) {
nsRwsetBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSet.Builder, org.hyperledger.fabric.protos.ledger.rwset.NsReadWriteSetOrBuilder>(
nsRwset_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
nsRwset_ = null;
}
return nsRwsetBuilder_;
}
// @@protoc_insertion_point(builder_scope:rwset.TxReadWriteSet)
}
// @@protoc_insertion_point(class_scope:rwset.TxReadWriteSet)
private static final org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet();
}
public static org.hyperledger.fabric.protos.ledger.rwset.TxReadWriteSet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TxReadWriteSet 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.ledger.rwset.TxReadWriteSet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy