org.hyperledger.fabric.protos.common.ConfigUpdate Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: common/configtx.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.common;
/**
*
* ConfigUpdate is used to submit a subset of config and to have the orderer apply to Config
* it is always submitted inside a ConfigUpdateEnvelope which allows the addition of signatures
* resulting in a new total configuration. The update is applied as follows:
* 1. The versions from all of the elements in the read_set is verified against the versions in the existing config.
* If there is a mismatch in the read versions, then the config update fails and is rejected.
* 2. Any elements in the write_set with the same version as the read_set are ignored.
* 3. The corresponding mod_policy for every remaining element in the write_set is collected.
* 4. Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected
* 5. The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal
*
*
* Protobuf type {@code common.ConfigUpdate}
*/
public final class ConfigUpdate extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:common.ConfigUpdate)
ConfigUpdateOrBuilder {
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= */ "",
ConfigUpdate.class.getName());
}
// Use ConfigUpdate.newBuilder() to construct.
private ConfigUpdate(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ConfigUpdate() {
channelId_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.ConfigUpdate.class, org.hyperledger.fabric.protos.common.ConfigUpdate.Builder.class);
}
private int bitField0_;
public static final int CHANNEL_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object channelId_ = "";
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @return The channelId.
*/
@java.lang.Override
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
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();
channelId_ = s;
return s;
}
}
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @return The bytes for channelId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int READ_SET_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.common.ConfigGroup readSet_;
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
* @return Whether the readSet field is set.
*/
@java.lang.Override
public boolean hasReadSet() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
* @return The readSet.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroup getReadSet() {
return readSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : readSet_;
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder getReadSetOrBuilder() {
return readSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : readSet_;
}
public static final int WRITE_SET_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.common.ConfigGroup writeSet_;
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
* @return Whether the writeSet field is set.
*/
@java.lang.Override
public boolean hasWriteSet() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
* @return The writeSet.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroup getWriteSet() {
return writeSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : writeSet_;
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder getWriteSetOrBuilder() {
return writeSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : writeSet_;
}
public static final int ISOLATED_DATA_FIELD_NUMBER = 5;
private static final class IsolatedDataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.ByteString> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_IsolatedDataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.BYTES,
com.google.protobuf.ByteString.EMPTY);
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> isolatedData_;
private com.google.protobuf.MapField
internalGetIsolatedData() {
if (isolatedData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IsolatedDataDefaultEntryHolder.defaultEntry);
}
return isolatedData_;
}
public int getIsolatedDataCount() {
return internalGetIsolatedData().getMap().size();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public boolean containsIsolatedData(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetIsolatedData().getMap().containsKey(key);
}
/**
* Use {@link #getIsolatedDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getIsolatedData() {
return getIsolatedDataMap();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public java.util.Map getIsolatedDataMap() {
return internalGetIsolatedData().getMap();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public /* nullable */
com.google.protobuf.ByteString getIsolatedDataOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetIsolatedData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public com.google.protobuf.ByteString getIsolatedDataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetIsolatedData().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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getReadSet());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getWriteSet());
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetIsolatedData(),
IsolatedDataDefaultEntryHolder.defaultEntry,
5);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getReadSet());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getWriteSet());
}
for (java.util.Map.Entry entry
: internalGetIsolatedData().getMap().entrySet()) {
com.google.protobuf.MapEntry
isolatedData__ = IsolatedDataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, isolatedData__);
}
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.common.ConfigUpdate)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.ConfigUpdate other = (org.hyperledger.fabric.protos.common.ConfigUpdate) obj;
if (!getChannelId()
.equals(other.getChannelId())) return false;
if (hasReadSet() != other.hasReadSet()) return false;
if (hasReadSet()) {
if (!getReadSet()
.equals(other.getReadSet())) return false;
}
if (hasWriteSet() != other.hasWriteSet()) return false;
if (hasWriteSet()) {
if (!getWriteSet()
.equals(other.getWriteSet())) return false;
}
if (!internalGetIsolatedData().equals(
other.internalGetIsolatedData())) 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) + CHANNEL_ID_FIELD_NUMBER;
hash = (53 * hash) + getChannelId().hashCode();
if (hasReadSet()) {
hash = (37 * hash) + READ_SET_FIELD_NUMBER;
hash = (53 * hash) + getReadSet().hashCode();
}
if (hasWriteSet()) {
hash = (37 * hash) + WRITE_SET_FIELD_NUMBER;
hash = (53 * hash) + getWriteSet().hashCode();
}
if (!internalGetIsolatedData().getMap().isEmpty()) {
hash = (37 * hash) + ISOLATED_DATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetIsolatedData().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate 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.common.ConfigUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate 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.common.ConfigUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate 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.common.ConfigUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate 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.common.ConfigUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate 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.common.ConfigUpdate 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;
}
/**
*
* ConfigUpdate is used to submit a subset of config and to have the orderer apply to Config
* it is always submitted inside a ConfigUpdateEnvelope which allows the addition of signatures
* resulting in a new total configuration. The update is applied as follows:
* 1. The versions from all of the elements in the read_set is verified against the versions in the existing config.
* If there is a mismatch in the read versions, then the config update fails and is rejected.
* 2. Any elements in the write_set with the same version as the read_set are ignored.
* 3. The corresponding mod_policy for every remaining element in the write_set is collected.
* 4. Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected
* 5. The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal
*
*
* Protobuf type {@code common.ConfigUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:common.ConfigUpdate)
org.hyperledger.fabric.protos.common.ConfigUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetMutableIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.ConfigUpdate.class, org.hyperledger.fabric.protos.common.ConfigUpdate.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.ConfigUpdate.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getReadSetFieldBuilder();
getWriteSetFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
channelId_ = "";
readSet_ = null;
if (readSetBuilder_ != null) {
readSetBuilder_.dispose();
readSetBuilder_ = null;
}
writeSet_ = null;
if (writeSetBuilder_ != null) {
writeSetBuilder_.dispose();
writeSetBuilder_ = null;
}
internalGetMutableIsolatedData().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigUpdate_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigUpdate getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.ConfigUpdate.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigUpdate build() {
org.hyperledger.fabric.protos.common.ConfigUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigUpdate buildPartial() {
org.hyperledger.fabric.protos.common.ConfigUpdate result = new org.hyperledger.fabric.protos.common.ConfigUpdate(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.common.ConfigUpdate result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.channelId_ = channelId_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.readSet_ = readSetBuilder_ == null
? readSet_
: readSetBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.writeSet_ = writeSetBuilder_ == null
? writeSet_
: writeSetBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.isolatedData_ = internalGetIsolatedData();
result.isolatedData_.makeImmutable();
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.ConfigUpdate) {
return mergeFrom((org.hyperledger.fabric.protos.common.ConfigUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.ConfigUpdate other) {
if (other == org.hyperledger.fabric.protos.common.ConfigUpdate.getDefaultInstance()) return this;
if (!other.getChannelId().isEmpty()) {
channelId_ = other.channelId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasReadSet()) {
mergeReadSet(other.getReadSet());
}
if (other.hasWriteSet()) {
mergeWriteSet(other.getWriteSet());
}
internalGetMutableIsolatedData().mergeFrom(
other.internalGetIsolatedData());
bitField0_ |= 0x00000008;
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: {
channelId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getReadSetFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getWriteSetFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 42: {
com.google.protobuf.MapEntry
isolatedData__ = input.readMessage(
IsolatedDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableIsolatedData().getMutableMap().put(
isolatedData__.getKey(), isolatedData__.getValue());
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;
}
private int bitField0_;
private java.lang.Object channelId_ = "";
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @return The channelId.
*/
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @return The bytes for channelId.
*/
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @param value The channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
channelId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @return This builder for chaining.
*/
public Builder clearChannelId() {
channelId_ = getDefaultInstance().getChannelId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Which channel this config update is for
*
*
* string channel_id = 1 [json_name = "channelId"];
* @param value The bytes for channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
channelId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.common.ConfigGroup readSet_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder> readSetBuilder_;
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
* @return Whether the readSet field is set.
*/
public boolean hasReadSet() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
* @return The readSet.
*/
public org.hyperledger.fabric.protos.common.ConfigGroup getReadSet() {
if (readSetBuilder_ == null) {
return readSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : readSet_;
} else {
return readSetBuilder_.getMessage();
}
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public Builder setReadSet(org.hyperledger.fabric.protos.common.ConfigGroup value) {
if (readSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
readSet_ = value;
} else {
readSetBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public Builder setReadSet(
org.hyperledger.fabric.protos.common.ConfigGroup.Builder builderForValue) {
if (readSetBuilder_ == null) {
readSet_ = builderForValue.build();
} else {
readSetBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public Builder mergeReadSet(org.hyperledger.fabric.protos.common.ConfigGroup value) {
if (readSetBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
readSet_ != null &&
readSet_ != org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance()) {
getReadSetBuilder().mergeFrom(value);
} else {
readSet_ = value;
}
} else {
readSetBuilder_.mergeFrom(value);
}
if (readSet_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public Builder clearReadSet() {
bitField0_ = (bitField0_ & ~0x00000002);
readSet_ = null;
if (readSetBuilder_ != null) {
readSetBuilder_.dispose();
readSetBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public org.hyperledger.fabric.protos.common.ConfigGroup.Builder getReadSetBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getReadSetFieldBuilder().getBuilder();
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
public org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder getReadSetOrBuilder() {
if (readSetBuilder_ != null) {
return readSetBuilder_.getMessageOrBuilder();
} else {
return readSet_ == null ?
org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : readSet_;
}
}
/**
*
* ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
*
*
* .common.ConfigGroup read_set = 2 [json_name = "readSet"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder>
getReadSetFieldBuilder() {
if (readSetBuilder_ == null) {
readSetBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder>(
getReadSet(),
getParentForChildren(),
isClean());
readSet_ = null;
}
return readSetBuilder_;
}
private org.hyperledger.fabric.protos.common.ConfigGroup writeSet_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder> writeSetBuilder_;
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
* @return Whether the writeSet field is set.
*/
public boolean hasWriteSet() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
* @return The writeSet.
*/
public org.hyperledger.fabric.protos.common.ConfigGroup getWriteSet() {
if (writeSetBuilder_ == null) {
return writeSet_ == null ? org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : writeSet_;
} else {
return writeSetBuilder_.getMessage();
}
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public Builder setWriteSet(org.hyperledger.fabric.protos.common.ConfigGroup value) {
if (writeSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
writeSet_ = value;
} else {
writeSetBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public Builder setWriteSet(
org.hyperledger.fabric.protos.common.ConfigGroup.Builder builderForValue) {
if (writeSetBuilder_ == null) {
writeSet_ = builderForValue.build();
} else {
writeSetBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public Builder mergeWriteSet(org.hyperledger.fabric.protos.common.ConfigGroup value) {
if (writeSetBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
writeSet_ != null &&
writeSet_ != org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance()) {
getWriteSetBuilder().mergeFrom(value);
} else {
writeSet_ = value;
}
} else {
writeSetBuilder_.mergeFrom(value);
}
if (writeSet_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public Builder clearWriteSet() {
bitField0_ = (bitField0_ & ~0x00000004);
writeSet_ = null;
if (writeSetBuilder_ != null) {
writeSetBuilder_.dispose();
writeSetBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public org.hyperledger.fabric.protos.common.ConfigGroup.Builder getWriteSetBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getWriteSetFieldBuilder().getBuilder();
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
public org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder getWriteSetOrBuilder() {
if (writeSetBuilder_ != null) {
return writeSetBuilder_.getMessageOrBuilder();
} else {
return writeSet_ == null ?
org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance() : writeSet_;
}
}
/**
*
* WriteSet lists the portion of the config which was written, this should included updated Versions
*
*
* .common.ConfigGroup write_set = 3 [json_name = "writeSet"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder>
getWriteSetFieldBuilder() {
if (writeSetBuilder_ == null) {
writeSetBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder>(
getWriteSet(),
getParentForChildren(),
isClean());
writeSet_ = null;
}
return writeSetBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> isolatedData_;
private com.google.protobuf.MapField
internalGetIsolatedData() {
if (isolatedData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IsolatedDataDefaultEntryHolder.defaultEntry);
}
return isolatedData_;
}
private com.google.protobuf.MapField
internalGetMutableIsolatedData() {
if (isolatedData_ == null) {
isolatedData_ = com.google.protobuf.MapField.newMapField(
IsolatedDataDefaultEntryHolder.defaultEntry);
}
if (!isolatedData_.isMutable()) {
isolatedData_ = isolatedData_.copy();
}
bitField0_ |= 0x00000008;
onChanged();
return isolatedData_;
}
public int getIsolatedDataCount() {
return internalGetIsolatedData().getMap().size();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public boolean containsIsolatedData(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetIsolatedData().getMap().containsKey(key);
}
/**
* Use {@link #getIsolatedDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getIsolatedData() {
return getIsolatedDataMap();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public java.util.Map getIsolatedDataMap() {
return internalGetIsolatedData().getMap();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public /* nullable */
com.google.protobuf.ByteString getIsolatedDataOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetIsolatedData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
@java.lang.Override
public com.google.protobuf.ByteString getIsolatedDataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetIsolatedData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearIsolatedData() {
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutableIsolatedData().getMutableMap()
.clear();
return this;
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
public Builder removeIsolatedData(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableIsolatedData().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableIsolatedData() {
bitField0_ |= 0x00000008;
return internalGetMutableIsolatedData().getMutableMap();
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
public Builder putIsolatedData(
java.lang.String key,
com.google.protobuf.ByteString value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableIsolatedData().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000008;
return this;
}
/**
*
* Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
*
*
* map<string, bytes> isolated_data = 5 [json_name = "isolatedData"];
*/
public Builder putAllIsolatedData(
java.util.Map values) {
internalGetMutableIsolatedData().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000008;
return this;
}
// @@protoc_insertion_point(builder_scope:common.ConfigUpdate)
}
// @@protoc_insertion_point(class_scope:common.ConfigUpdate)
private static final org.hyperledger.fabric.protos.common.ConfigUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.ConfigUpdate();
}
public static org.hyperledger.fabric.protos.common.ConfigUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConfigUpdate 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.common.ConfigUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy