Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: common/configtx.proto
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.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.ConfigUpdate)
ConfigUpdateOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConfigUpdate.newBuilder() to construct.
private ConfigUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ConfigUpdate() {
channelId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConfigUpdate();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConfigUpdate(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
channelId_ = s;
break;
}
case 18: {
org.hyperledger.fabric.protos.common.ConfigGroup.Builder subBuilder = null;
if (readSet_ != null) {
subBuilder = readSet_.toBuilder();
}
readSet_ = input.readMessage(org.hyperledger.fabric.protos.common.ConfigGroup.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(readSet_);
readSet_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.hyperledger.fabric.protos.common.ConfigGroup.Builder subBuilder = null;
if (writeSet_ != null) {
subBuilder = writeSet_.toBuilder();
}
writeSet_ = input.readMessage(org.hyperledger.fabric.protos.common.ConfigGroup.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(writeSet_);
writeSet_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
isolatedData_ = com.google.protobuf.MapField.newMapField(
IsolatedDataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
isolatedData__ = input.readMessage(
IsolatedDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
isolatedData_.getMutableMap().put(
isolatedData__.getKey(), isolatedData__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.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);
}
public static final int CHANNEL_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object channelId_;
/**
*
* 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.GeneratedMessageV3.isStringEmpty(channelId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
}
if (readSet_ != null) {
output.writeMessage(2, getReadSet());
}
if (writeSet_ != null) {
output.writeMessage(3, getWriteSet());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetIsolatedData(),
IsolatedDataDefaultEntryHolder.defaultEntry,
5);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
}
if (readSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getReadSet());
}
if (writeSet_ != null) {
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 += unknownFields.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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3.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.GeneratedMessageV3.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.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 5:
return internalGetMutableIsolatedData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
channelId_ = "";
if (readSetBuilder_ == null) {
readSet_ = null;
} else {
readSet_ = null;
readSetBuilder_ = null;
}
if (writeSetBuilder_ == null) {
writeSet_ = null;
} else {
writeSet_ = null;
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);
int from_bitField0_ = bitField0_;
result.channelId_ = channelId_;
if (readSetBuilder_ == null) {
result.readSet_ = readSet_;
} else {
result.readSet_ = readSetBuilder_.build();
}
if (writeSetBuilder_ == null) {
result.writeSet_ = writeSet_;
} else {
result.writeSet_ = writeSetBuilder_.build();
}
result.isolatedData_ = internalGetIsolatedData();
result.isolatedData_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof 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_;
onChanged();
}
if (other.hasReadSet()) {
mergeReadSet(other.getReadSet());
}
if (other.hasWriteSet()) {
mergeWriteSet(other.getWriteSet());
}
internalGetMutableIsolatedData().mergeFrom(
other.internalGetIsolatedData());
this.mergeUnknownFields(other.unknownFields);
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 {
org.hyperledger.fabric.protos.common.ConfigUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.ConfigUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object channelId_ = "";
/**
*