org.hyperledger.fabric.protos.common.ConfigGroup Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: common/configtx.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.common;
/**
*
* ConfigGroup is the hierarchical data structure for holding config
*
*
* Protobuf type {@code common.ConfigGroup}
*/
public final class ConfigGroup extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:common.ConfigGroup)
ConfigGroupOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ConfigGroup.class.getName());
}
// Use ConfigGroup.newBuilder() to construct.
private ConfigGroup(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ConfigGroup() {
modPolicy_ = "";
}
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.MapFieldReflectionAccessor internalGetMapFieldReflection(
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.GeneratedMessage.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_ = 0L;
/**
* 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());
}
@SuppressWarnings("serial")
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 /* nullable */
org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrDefault(
java.lang.String key,
/* nullable */
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());
}
@SuppressWarnings("serial")
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 /* nullable */
org.hyperledger.fabric.protos.common.ConfigValue getValuesOrDefault(
java.lang.String key,
/* nullable */
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());
}
@SuppressWarnings("serial")
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 /* nullable */
org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrDefault(
java.lang.String key,
/* nullable */
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;
@SuppressWarnings("serial")
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.GeneratedMessage
.serializeStringMapTo(
output,
internalGetGroups(),
GroupsDefaultEntryHolder.defaultEntry,
2);
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetValues(),
ValuesDefaultEntryHolder.defaultEntry,
3);
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetPolicies(),
PoliciesDefaultEntryHolder.defaultEntry,
4);
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modPolicy_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 5, modPolicy_);
}
getUnknownFields().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.GeneratedMessage.isStringEmpty(modPolicy_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(5, modPolicy_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.common.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 (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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.GeneratedMessage
.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.GeneratedMessage
.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.GeneratedMessage
.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.GeneratedMessage
.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.GeneratedMessage
.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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.common.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.GeneratedMessage.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.GeneratedMessage.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.MapFieldReflectionAccessor internalGetMapFieldReflection(
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.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
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.GeneratedMessage.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() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.common.ConfigGroup result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.version_ = version_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.groups_ = internalGetGroups().build(GroupsDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.values_ = internalGetValues().build(ValuesDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.policies_ = internalGetPolicies().build(PoliciesDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.modPolicy_ = modPolicy_;
}
}
@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());
bitField0_ |= 0x00000002;
internalGetMutableValues().mergeFrom(
other.internalGetValues());
bitField0_ |= 0x00000004;
internalGetMutablePolicies().mergeFrom(
other.internalGetPolicies());
bitField0_ |= 0x00000008;
if (!other.getModPolicy().isEmpty()) {
modPolicy_ = other.modPolicy_;
bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
version_ = input.readUInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
com.google.protobuf.MapEntry
groups__ = input.readMessage(
GroupsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableGroups().ensureBuilderMap().put(
groups__.getKey(), groups__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
values__ = input.readMessage(
ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableValues().ensureBuilderMap().put(
values__.getKey(), values__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
com.google.protobuf.MapEntry
policies__ = input.readMessage(
PoliciesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutablePolicies().ensureBuilderMap().put(
policies__.getKey(), policies__.getValue());
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
modPolicy_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* uint64 version = 1 [json_name = "version"];
* @return This builder for chaining.
*/
public Builder clearVersion() {
bitField0_ = (bitField0_ & ~0x00000001);
version_ = 0L;
onChanged();
return this;
}
private static final class GroupsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroup build(org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder val) {
if (val instanceof org.hyperledger.fabric.protos.common.ConfigGroup) { return (org.hyperledger.fabric.protos.common.ConfigGroup) val; }
return ((org.hyperledger.fabric.protos.common.ConfigGroup.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return GroupsDefaultEntryHolder.defaultEntry;
}
};
private static final GroupsConverter groupsConverter = new GroupsConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder, org.hyperledger.fabric.protos.common.ConfigGroup, org.hyperledger.fabric.protos.common.ConfigGroup.Builder> groups_;
private com.google.protobuf.MapFieldBuilder
internalGetGroups() {
if (groups_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(groupsConverter);
}
return groups_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableGroups() {
if (groups_ == null) {
groups_ = new com.google.protobuf.MapFieldBuilder<>(groupsConverter);
}
bitField0_ |= 0x00000002;
onChanged();
return groups_;
}
public int getGroupsCount() {
return internalGetGroups().ensureBuilderMap().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().ensureBuilderMap().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().getImmutableMap();
}
/**
* map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"];
*/
@java.lang.Override
public /* nullable */
org.hyperledger.fabric.protos.common.ConfigGroup getGroupsOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.common.ConfigGroup defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableGroups().ensureBuilderMap();
return map.containsKey(key) ? groupsConverter.build(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 = internalGetMutableGroups().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return groupsConverter.build(map.get(key));
}
public Builder clearGroups() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableGroups().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().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableGroups() {
bitField0_ |= 0x00000002;
return internalGetMutableGroups().ensureMessageMap();
}
/**
* 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().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"];
*/
public Builder putAllGroups(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableGroups().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
/**
* map<string, .common.ConfigGroup> groups = 2 [json_name = "groups"];
*/
public org.hyperledger.fabric.protos.common.ConfigGroup.Builder putGroupsBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableGroups().ensureBuilderMap();
org.hyperledger.fabric.protos.common.ConfigGroupOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = org.hyperledger.fabric.protos.common.ConfigGroup.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof org.hyperledger.fabric.protos.common.ConfigGroup) {
entry = ((org.hyperledger.fabric.protos.common.ConfigGroup) entry).toBuilder();
builderMap.put(key, entry);
}
return (org.hyperledger.fabric.protos.common.ConfigGroup.Builder) entry;
}
private static final class ValuesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigValue build(org.hyperledger.fabric.protos.common.ConfigValueOrBuilder val) {
if (val instanceof org.hyperledger.fabric.protos.common.ConfigValue) { return (org.hyperledger.fabric.protos.common.ConfigValue) val; }
return ((org.hyperledger.fabric.protos.common.ConfigValue.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return ValuesDefaultEntryHolder.defaultEntry;
}
};
private static final ValuesConverter valuesConverter = new ValuesConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, org.hyperledger.fabric.protos.common.ConfigValueOrBuilder, org.hyperledger.fabric.protos.common.ConfigValue, org.hyperledger.fabric.protos.common.ConfigValue.Builder> values_;
private com.google.protobuf.MapFieldBuilder
internalGetValues() {
if (values_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(valuesConverter);
}
return values_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableValues() {
if (values_ == null) {
values_ = new com.google.protobuf.MapFieldBuilder<>(valuesConverter);
}
bitField0_ |= 0x00000004;
onChanged();
return values_;
}
public int getValuesCount() {
return internalGetValues().ensureBuilderMap().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().ensureBuilderMap().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().getImmutableMap();
}
/**
* map<string, .common.ConfigValue> values = 3 [json_name = "values"];
*/
@java.lang.Override
public /* nullable */
org.hyperledger.fabric.protos.common.ConfigValue getValuesOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.common.ConfigValue defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableValues().ensureBuilderMap();
return map.containsKey(key) ? valuesConverter.build(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 = internalGetMutableValues().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return valuesConverter.build(map.get(key));
}
public Builder clearValues() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableValues().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().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableValues() {
bitField0_ |= 0x00000004;
return internalGetMutableValues().ensureMessageMap();
}
/**
* 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().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
* map<string, .common.ConfigValue> values = 3 [json_name = "values"];
*/
public Builder putAllValues(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableValues().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000004;
return this;
}
/**
* map<string, .common.ConfigValue> values = 3 [json_name = "values"];
*/
public org.hyperledger.fabric.protos.common.ConfigValue.Builder putValuesBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableValues().ensureBuilderMap();
org.hyperledger.fabric.protos.common.ConfigValueOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = org.hyperledger.fabric.protos.common.ConfigValue.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof org.hyperledger.fabric.protos.common.ConfigValue) {
entry = ((org.hyperledger.fabric.protos.common.ConfigValue) entry).toBuilder();
builderMap.put(key, entry);
}
return (org.hyperledger.fabric.protos.common.ConfigValue.Builder) entry;
}
private static final class PoliciesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigPolicy build(org.hyperledger.fabric.protos.common.ConfigPolicyOrBuilder val) {
if (val instanceof org.hyperledger.fabric.protos.common.ConfigPolicy) { return (org.hyperledger.fabric.protos.common.ConfigPolicy) val; }
return ((org.hyperledger.fabric.protos.common.ConfigPolicy.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return PoliciesDefaultEntryHolder.defaultEntry;
}
};
private static final PoliciesConverter policiesConverter = new PoliciesConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, org.hyperledger.fabric.protos.common.ConfigPolicyOrBuilder, org.hyperledger.fabric.protos.common.ConfigPolicy, org.hyperledger.fabric.protos.common.ConfigPolicy.Builder> policies_;
private com.google.protobuf.MapFieldBuilder
internalGetPolicies() {
if (policies_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(policiesConverter);
}
return policies_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutablePolicies() {
if (policies_ == null) {
policies_ = new com.google.protobuf.MapFieldBuilder<>(policiesConverter);
}
bitField0_ |= 0x00000008;
onChanged();
return policies_;
}
public int getPoliciesCount() {
return internalGetPolicies().ensureBuilderMap().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().ensureBuilderMap().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().getImmutableMap();
}
/**
* map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"];
*/
@java.lang.Override
public /* nullable */
org.hyperledger.fabric.protos.common.ConfigPolicy getPoliciesOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.common.ConfigPolicy defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutablePolicies().ensureBuilderMap();
return map.containsKey(key) ? policiesConverter.build(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 = internalGetMutablePolicies().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return policiesConverter.build(map.get(key));
}
public Builder clearPolicies() {
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutablePolicies().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().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePolicies() {
bitField0_ |= 0x00000008;
return internalGetMutablePolicies().ensureMessageMap();
}
/**
* 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().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000008;
return this;
}
/**
* map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"];
*/
public Builder putAllPolicies(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutablePolicies().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000008;
return this;
}
/**
* map<string, .common.ConfigPolicy> policies = 4 [json_name = "policies"];
*/
public org.hyperledger.fabric.protos.common.ConfigPolicy.Builder putPoliciesBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutablePolicies().ensureBuilderMap();
org.hyperledger.fabric.protos.common.ConfigPolicyOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = org.hyperledger.fabric.protos.common.ConfigPolicy.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof org.hyperledger.fabric.protos.common.ConfigPolicy) {
entry = ((org.hyperledger.fabric.protos.common.ConfigPolicy) entry).toBuilder();
builderMap.put(key, entry);
}
return (org.hyperledger.fabric.protos.common.ConfigPolicy.Builder) entry;
}
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;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* string mod_policy = 5 [json_name = "modPolicy"];
* @return This builder for chaining.
*/
public Builder clearModPolicy() {
modPolicy_ = getDefaultInstance().getModPolicy();
bitField0_ = (bitField0_ & ~0x00000010);
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;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
// @@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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.ConfigGroup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy