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

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

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: common/configtx.proto

package org.hyperledger.fabric.protos.common;

/**
 * 
 * ConfigGroup is the hierarchical data structure for holding config
 * 
* * Protobuf type {@code common.ConfigGroup} */ public final class ConfigGroup extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.ConfigGroup) ConfigGroupOrBuilder { private static final long serialVersionUID = 0L; // Use ConfigGroup.newBuilder() to construct. private ConfigGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ConfigGroup() { modPolicy_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ConfigGroup(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ConfigGroup( 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 8: { version_ = input.readUInt64(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { groups_ = com.google.protobuf.MapField.newMapField( GroupsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry groups__ = input.readMessage( GroupsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); groups_.getMutableMap().put( groups__.getKey(), groups__.getValue()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { values_ = com.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry values__ = input.readMessage( ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); values_.getMutableMap().put( values__.getKey(), values__.getValue()); break; } case 34: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { policies_ = com.google.protobuf.MapField.newMapField( PoliciesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000004; } com.google.protobuf.MapEntry policies__ = input.readMessage( PoliciesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); policies_.getMutableMap().put( policies__.getKey(), policies__.getValue()); break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); modPolicy_ = s; 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_ConfigGroup_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetGroups(); case 3: return internalGetValues(); case 4: return internalGetPolicies(); 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_ConfigGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.common.ConfigGroup.class, org.hyperledger.fabric.protos.common.ConfigGroup.Builder.class); } public static final int VERSION_FIELD_NUMBER = 1; private long version_; /** * uint64 version = 1 [json_name = "version"]; * @return The version. */ @java.lang.Override public long getVersion() { return version_; } public static final int GROUPS_FIELD_NUMBER = 2; private static final class GroupsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, org.hyperledger.fabric.protos.common.ConfigGroup> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigGroup_GroupsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigGroup> groups_; private com.google.protobuf.MapField internalGetGroups() { if (groups_ == null) { return com.google.protobuf.MapField.emptyMapField( GroupsDefaultEntryHolder.defaultEntry); } return groups_; } public int getGroupsCount() { return internalGetGroups().getMap().size(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public boolean containsGroups( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetGroups().getMap().containsKey(key); } /** * Use {@link #getGroupsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getGroups() { return getGroupsMap(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public java.util.Map getGroupsMap() { return internalGetGroups().getMap(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigGroup defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetGroups().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetGroups().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int VALUES_FIELD_NUMBER = 3; private static final class ValuesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, org.hyperledger.fabric.protos.common.ConfigValue> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigGroup_ValuesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, org.hyperledger.fabric.protos.common.ConfigValue.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigValue> values_; private com.google.protobuf.MapField internalGetValues() { if (values_ == null) { return com.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); } return values_; } public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public boolean containsValues( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** * Use {@link #getValuesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getValues() { return getValuesMap(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public java.util.Map getValuesMap() { return internalGetValues().getMap(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigValue getValuesOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigValue defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigValue getValuesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int POLICIES_FIELD_NUMBER = 4; private static final class PoliciesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, org.hyperledger.fabric.protos.common.ConfigPolicy> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigGroup_PoliciesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, org.hyperledger.fabric.protos.common.ConfigPolicy.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigPolicy> policies_; private com.google.protobuf.MapField internalGetPolicies() { if (policies_ == null) { return com.google.protobuf.MapField.emptyMapField( PoliciesDefaultEntryHolder.defaultEntry); } return policies_; } public int getPoliciesCount() { return internalGetPolicies().getMap().size(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public boolean containsPolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPolicies().getMap().containsKey(key); } /** * Use {@link #getPoliciesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPolicies() { return getPoliciesMap(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public java.util.Map getPoliciesMap() { return internalGetPolicies().getMap(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigPolicy defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int MOD_POLICY_FIELD_NUMBER = 5; private volatile java.lang.Object modPolicy_; /** * string mod_policy = 5 [json_name = "modPolicy"]; * @return The modPolicy. */ @java.lang.Override public java.lang.String getModPolicy() { java.lang.Object ref = modPolicy_; 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(); modPolicy_ = s; return s; } } /** * string mod_policy = 5 [json_name = "modPolicy"]; * @return The bytes for modPolicy. */ @java.lang.Override public com.google.protobuf.ByteString getModPolicyBytes() { java.lang.Object ref = modPolicy_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); modPolicy_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (version_ != 0L) { output.writeUInt64(1, version_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetGroups(), GroupsDefaultEntryHolder.defaultEntry, 2); com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 3); com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetPolicies(), PoliciesDefaultEntryHolder.defaultEntry, 4); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, modPolicy_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (version_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, version_); } for (java.util.Map.Entry entry : internalGetGroups().getMap().entrySet()) { com.google.protobuf.MapEntry groups__ = GroupsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, groups__); } for (java.util.Map.Entry entry : internalGetValues().getMap().entrySet()) { com.google.protobuf.MapEntry values__ = ValuesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, values__); } for (java.util.Map.Entry entry : internalGetPolicies().getMap().entrySet()) { com.google.protobuf.MapEntry policies__ = PoliciesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, policies__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, modPolicy_); } 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.ConfigGroup)) { return super.equals(obj); } org.hyperledger.fabric.protos.common.ConfigGroup other = (org.hyperledger.fabric.protos.common.ConfigGroup) obj; if (getVersion() != other.getVersion()) return false; if (!internalGetGroups().equals( other.internalGetGroups())) return false; if (!internalGetValues().equals( other.internalGetValues())) return false; if (!internalGetPolicies().equals( other.internalGetPolicies())) return false; if (!getModPolicy() .equals(other.getModPolicy())) 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) + VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getVersion()); if (!internalGetGroups().getMap().isEmpty()) { hash = (37 * hash) + GROUPS_FIELD_NUMBER; hash = (53 * hash) + internalGetGroups().hashCode(); } if (!internalGetValues().getMap().isEmpty()) { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetValues().hashCode(); } if (!internalGetPolicies().getMap().isEmpty()) { hash = (37 * hash) + POLICIES_FIELD_NUMBER; hash = (53 * hash) + internalGetPolicies().hashCode(); } hash = (37 * hash) + MOD_POLICY_FIELD_NUMBER; hash = (53 * hash) + getModPolicy().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.common.ConfigGroup parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.common.ConfigGroup 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.ConfigGroup parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.common.ConfigGroup 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.ConfigGroup parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.common.ConfigGroup 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.ConfigGroup parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.common.ConfigGroup 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.ConfigGroup parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.common.ConfigGroup 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.ConfigGroup 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.ConfigGroup 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.ConfigGroup 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; } /** *
   * ConfigGroup is the hierarchical data structure for holding config
   * 
* * Protobuf type {@code common.ConfigGroup} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:common.ConfigGroup) org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigGroup_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetGroups(); case 3: return internalGetValues(); case 4: return internalGetPolicies(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 2: return internalGetMutableGroups(); case 3: return internalGetMutableValues(); case 4: return internalGetMutablePolicies(); 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_ConfigGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.common.ConfigGroup.class, org.hyperledger.fabric.protos.common.ConfigGroup.Builder.class); } // Construct using org.hyperledger.fabric.protos.common.ConfigGroup.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(); version_ = 0L; internalGetMutableGroups().clear(); internalGetMutableValues().clear(); internalGetMutablePolicies().clear(); modPolicy_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.common.ConfigTxProto.internal_static_common_ConfigGroup_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup getDefaultInstanceForType() { return org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup build() { org.hyperledger.fabric.protos.common.ConfigGroup result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup buildPartial() { org.hyperledger.fabric.protos.common.ConfigGroup result = new org.hyperledger.fabric.protos.common.ConfigGroup(this); int from_bitField0_ = bitField0_; result.version_ = version_; result.groups_ = internalGetGroups(); result.groups_.makeImmutable(); result.values_ = internalGetValues(); result.values_.makeImmutable(); result.policies_ = internalGetPolicies(); result.policies_.makeImmutable(); result.modPolicy_ = modPolicy_; 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.ConfigGroup) { return mergeFrom((org.hyperledger.fabric.protos.common.ConfigGroup)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.common.ConfigGroup other) { if (other == org.hyperledger.fabric.protos.common.ConfigGroup.getDefaultInstance()) return this; if (other.getVersion() != 0L) { setVersion(other.getVersion()); } internalGetMutableGroups().mergeFrom( other.internalGetGroups()); internalGetMutableValues().mergeFrom( other.internalGetValues()); internalGetMutablePolicies().mergeFrom( other.internalGetPolicies()); if (!other.getModPolicy().isEmpty()) { modPolicy_ = other.modPolicy_; onChanged(); } 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.ConfigGroup parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.common.ConfigGroup) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long version_ ; /** * uint64 version = 1 [json_name = "version"]; * @return The version. */ @java.lang.Override public long getVersion() { return version_; } /** * uint64 version = 1 [json_name = "version"]; * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion(long value) { version_ = value; onChanged(); return this; } /** * uint64 version = 1 [json_name = "version"]; * @return This builder for chaining. */ public Builder clearVersion() { version_ = 0L; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigGroup> groups_; private com.google.protobuf.MapField internalGetGroups() { if (groups_ == null) { return com.google.protobuf.MapField.emptyMapField( GroupsDefaultEntryHolder.defaultEntry); } return groups_; } private com.google.protobuf.MapField internalGetMutableGroups() { onChanged();; if (groups_ == null) { groups_ = com.google.protobuf.MapField.newMapField( GroupsDefaultEntryHolder.defaultEntry); } if (!groups_.isMutable()) { groups_ = groups_.copy(); } return groups_; } public int getGroupsCount() { return internalGetGroups().getMap().size(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public boolean containsGroups( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetGroups().getMap().containsKey(key); } /** * Use {@link #getGroupsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getGroups() { return getGroupsMap(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public java.util.Map getGroupsMap() { return internalGetGroups().getMap(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigGroup defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetGroups().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetGroups().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearGroups() { internalGetMutableGroups().getMutableMap() .clear(); return this; } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ public Builder removeGroups( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableGroups().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableGroups() { return internalGetMutableGroups().getMutableMap(); } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ public Builder putGroups( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigGroup value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableGroups().getMutableMap() .put(key, value); return this; } /** * map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"]; */ public Builder putAllGroups( java.util.Map values) { internalGetMutableGroups().getMutableMap() .putAll(values); return this; } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigValue> values_; private com.google.protobuf.MapField internalGetValues() { if (values_ == null) { return com.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); } return values_; } private com.google.protobuf.MapField internalGetMutableValues() { onChanged();; if (values_ == null) { values_ = com.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); } if (!values_.isMutable()) { values_ = values_.copy(); } return values_; } public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public boolean containsValues( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** * Use {@link #getValuesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getValues() { return getValuesMap(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public java.util.Map getValuesMap() { return internalGetValues().getMap(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigValue getValuesOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigValue defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigValue getValuesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearValues() { internalGetMutableValues().getMutableMap() .clear(); return this; } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ public Builder removeValues( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableValues().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableValues() { return internalGetMutableValues().getMutableMap(); } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ public Builder putValues( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigValue value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableValues().getMutableMap() .put(key, value); return this; } /** * map<string, .common.ConfigValue> values = 3 [json_name = "values"]; */ public Builder putAllValues( java.util.Map values) { internalGetMutableValues().getMutableMap() .putAll(values); return this; } private com.google.protobuf.MapField< java.lang.String, org.hyperledger.fabric.protos.common.ConfigPolicy> policies_; private com.google.protobuf.MapField internalGetPolicies() { if (policies_ == null) { return com.google.protobuf.MapField.emptyMapField( PoliciesDefaultEntryHolder.defaultEntry); } return policies_; } private com.google.protobuf.MapField internalGetMutablePolicies() { onChanged();; if (policies_ == null) { policies_ = com.google.protobuf.MapField.newMapField( PoliciesDefaultEntryHolder.defaultEntry); } if (!policies_.isMutable()) { policies_ = policies_.copy(); } return policies_; } public int getPoliciesCount() { return internalGetPolicies().getMap().size(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public boolean containsPolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPolicies().getMap().containsKey(key); } /** * Use {@link #getPoliciesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPolicies() { return getPoliciesMap(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public java.util.Map getPoliciesMap() { return internalGetPolicies().getMap(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrDefault( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigPolicy defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ @java.lang.Override public org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearPolicies() { internalGetMutablePolicies().getMutableMap() .clear(); return this; } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ public Builder removePolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutablePolicies().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutablePolicies() { return internalGetMutablePolicies().getMutableMap(); } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ public Builder putPolicies( java.lang.String key, org.hyperledger.fabric.protos.common.ConfigPolicy value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePolicies().getMutableMap() .put(key, value); return this; } /** * map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"]; */ public Builder putAllPolicies( java.util.Map values) { internalGetMutablePolicies().getMutableMap() .putAll(values); return this; } private java.lang.Object modPolicy_ = ""; /** * string mod_policy = 5 [json_name = "modPolicy"]; * @return The modPolicy. */ public java.lang.String getModPolicy() { java.lang.Object ref = modPolicy_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); modPolicy_ = s; return s; } else { return (java.lang.String) ref; } } /** * string mod_policy = 5 [json_name = "modPolicy"]; * @return The bytes for modPolicy. */ public com.google.protobuf.ByteString getModPolicyBytes() { java.lang.Object ref = modPolicy_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); modPolicy_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string mod_policy = 5 [json_name = "modPolicy"]; * @param value The modPolicy to set. * @return This builder for chaining. */ public Builder setModPolicy( java.lang.String value) { if (value == null) { throw new NullPointerException(); } modPolicy_ = value; onChanged(); return this; } /** * string mod_policy = 5 [json_name = "modPolicy"]; * @return This builder for chaining. */ public Builder clearModPolicy() { modPolicy_ = getDefaultInstance().getModPolicy(); onChanged(); return this; } /** * string mod_policy = 5 [json_name = "modPolicy"]; * @param value The bytes for modPolicy to set. * @return This builder for chaining. */ public Builder setModPolicyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); modPolicy_ = value; onChanged(); 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.ConfigGroup) } // @@protoc_insertion_point(class_scope:common.ConfigGroup) private static final org.hyperledger.fabric.protos.common.ConfigGroup DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.ConfigGroup(); } public static org.hyperledger.fabric.protos.common.ConfigGroup getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ConfigGroup parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ConfigGroup(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.ConfigGroup getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy