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

org.hyperledger.fabric.protos.common.ConfigUpdate Maven / Gradle / Ivy

// 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_; /** *
   * 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 readSet_ != null; } /** *
   * 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 getReadSet(); } 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 writeSet_ != null; } /** *
   * 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 getWriteSet(); } 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); } 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 com.google.protobuf.ByteString getIsolatedDataOrDefault( java.lang.String key, 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.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_ = ""; /** *
     * 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; 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(); 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; onChanged(); return this; } private org.hyperledger.fabric.protos.common.ConfigGroup readSet_; private com.google.protobuf.SingleFieldBuilderV3< 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 readSetBuilder_ != null || readSet_ != null; } /** *
     * 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; onChanged(); } else { readSetBuilder_.setMessage(value); } 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(); onChanged(); } else { readSetBuilder_.setMessage(builderForValue.build()); } 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 (readSet_ != null) { readSet_ = org.hyperledger.fabric.protos.common.ConfigGroup.newBuilder(readSet_).mergeFrom(value).buildPartial(); } else { readSet_ = value; } onChanged(); } else { readSetBuilder_.mergeFrom(value); } 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() { if (readSetBuilder_ == null) { readSet_ = null; onChanged(); } else { readSet_ = null; readSetBuilder_ = null; } 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() { 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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 writeSetBuilder_ != null || writeSet_ != null; } /** *
     * 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; onChanged(); } else { writeSetBuilder_.setMessage(value); } 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(); onChanged(); } else { writeSetBuilder_.setMessage(builderForValue.build()); } 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 (writeSet_ != null) { writeSet_ = org.hyperledger.fabric.protos.common.ConfigGroup.newBuilder(writeSet_).mergeFrom(value).buildPartial(); } else { writeSet_ = value; } onChanged(); } else { writeSetBuilder_.mergeFrom(value); } 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() { if (writeSetBuilder_ == null) { writeSet_ = null; onChanged(); } else { writeSet_ = null; writeSetBuilder_ = null; } 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() { 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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() { onChanged();; if (isolatedData_ == null) { isolatedData_ = com.google.protobuf.MapField.newMapField( IsolatedDataDefaultEntryHolder.defaultEntry); } if (!isolatedData_.isMutable()) { isolatedData_ = isolatedData_.copy(); } 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 com.google.protobuf.ByteString getIsolatedDataOrDefault( java.lang.String key, 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() { 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() { 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); 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); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@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 { return new ConfigUpdate(input, extensionRegistry); } }; 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