org.hyperledger.fabric.protos.peer.Configuration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger fabric project
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: peer/configuration.proto
package org.hyperledger.fabric.protos.peer;
public final class Configuration {
private Configuration() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface AnchorPeersOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.AnchorPeers)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
java.util.List
getAnchorPeersList();
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getAnchorPeers(int index);
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
int getAnchorPeersCount();
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
java.util.List
getAnchorPeersOrBuilderList();
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder getAnchorPeersOrBuilder(
int index);
}
/**
*
* AnchorPeers simply represents list of anchor peers which is used in ConfigurationItem
*
*
* Protobuf type {@code protos.AnchorPeers}
*/
public static final class AnchorPeers extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.AnchorPeers)
AnchorPeersOrBuilder {
// Use AnchorPeers.newBuilder() to construct.
private AnchorPeers(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AnchorPeers() {
anchorPeers_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private AnchorPeers(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
anchorPeers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
anchorPeers_.add(
input.readMessage(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
anchorPeers_ = java.util.Collections.unmodifiableList(anchorPeers_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeers_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeers_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.class, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.Builder.class);
}
public static final int ANCHOR_PEERS_FIELD_NUMBER = 1;
private java.util.List anchorPeers_;
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public java.util.List getAnchorPeersList() {
return anchorPeers_;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public java.util.List
getAnchorPeersOrBuilderList() {
return anchorPeers_;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public int getAnchorPeersCount() {
return anchorPeers_.size();
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getAnchorPeers(int index) {
return anchorPeers_.get(index);
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder getAnchorPeersOrBuilder(
int index) {
return anchorPeers_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < anchorPeers_.size(); i++) {
output.writeMessage(1, anchorPeers_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < anchorPeers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, anchorPeers_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers other = (org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers) obj;
boolean result = true;
result = result && getAnchorPeersList()
.equals(other.getAnchorPeersList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getAnchorPeersCount() > 0) {
hash = (37 * hash) + ANCHOR_PEERS_FIELD_NUMBER;
hash = (53 * hash) + getAnchorPeersList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers 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.peer.Configuration.AnchorPeers parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers 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.peer.Configuration.AnchorPeers parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers 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.peer.Configuration.AnchorPeers parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* AnchorPeers simply represents list of anchor peers which is used in ConfigurationItem
*
*
* Protobuf type {@code protos.AnchorPeers}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.AnchorPeers)
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeers_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeers_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.class, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAnchorPeersFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (anchorPeersBuilder_ == null) {
anchorPeers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
anchorPeersBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeers_descriptor;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers build() {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers buildPartial() {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers result = new org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers(this);
int from_bitField0_ = bitField0_;
if (anchorPeersBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
anchorPeers_ = java.util.Collections.unmodifiableList(anchorPeers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.anchorPeers_ = anchorPeers_;
} else {
result.anchorPeers_ = anchorPeersBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers other) {
if (other == org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers.getDefaultInstance()) return this;
if (anchorPeersBuilder_ == null) {
if (!other.anchorPeers_.isEmpty()) {
if (anchorPeers_.isEmpty()) {
anchorPeers_ = other.anchorPeers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnchorPeersIsMutable();
anchorPeers_.addAll(other.anchorPeers_);
}
onChanged();
}
} else {
if (!other.anchorPeers_.isEmpty()) {
if (anchorPeersBuilder_.isEmpty()) {
anchorPeersBuilder_.dispose();
anchorPeersBuilder_ = null;
anchorPeers_ = other.anchorPeers_;
bitField0_ = (bitField0_ & ~0x00000001);
anchorPeersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAnchorPeersFieldBuilder() : null;
} else {
anchorPeersBuilder_.addAllMessages(other.anchorPeers_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List anchorPeers_ =
java.util.Collections.emptyList();
private void ensureAnchorPeersIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
anchorPeers_ = new java.util.ArrayList(anchorPeers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder> anchorPeersBuilder_;
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public java.util.List getAnchorPeersList() {
if (anchorPeersBuilder_ == null) {
return java.util.Collections.unmodifiableList(anchorPeers_);
} else {
return anchorPeersBuilder_.getMessageList();
}
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public int getAnchorPeersCount() {
if (anchorPeersBuilder_ == null) {
return anchorPeers_.size();
} else {
return anchorPeersBuilder_.getCount();
}
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getAnchorPeers(int index) {
if (anchorPeersBuilder_ == null) {
return anchorPeers_.get(index);
} else {
return anchorPeersBuilder_.getMessage(index);
}
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder setAnchorPeers(
int index, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer value) {
if (anchorPeersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnchorPeersIsMutable();
anchorPeers_.set(index, value);
onChanged();
} else {
anchorPeersBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder setAnchorPeers(
int index, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder builderForValue) {
if (anchorPeersBuilder_ == null) {
ensureAnchorPeersIsMutable();
anchorPeers_.set(index, builderForValue.build());
onChanged();
} else {
anchorPeersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder addAnchorPeers(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer value) {
if (anchorPeersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnchorPeersIsMutable();
anchorPeers_.add(value);
onChanged();
} else {
anchorPeersBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder addAnchorPeers(
int index, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer value) {
if (anchorPeersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnchorPeersIsMutable();
anchorPeers_.add(index, value);
onChanged();
} else {
anchorPeersBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder addAnchorPeers(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder builderForValue) {
if (anchorPeersBuilder_ == null) {
ensureAnchorPeersIsMutable();
anchorPeers_.add(builderForValue.build());
onChanged();
} else {
anchorPeersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder addAnchorPeers(
int index, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder builderForValue) {
if (anchorPeersBuilder_ == null) {
ensureAnchorPeersIsMutable();
anchorPeers_.add(index, builderForValue.build());
onChanged();
} else {
anchorPeersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder addAllAnchorPeers(
java.lang.Iterable values) {
if (anchorPeersBuilder_ == null) {
ensureAnchorPeersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, anchorPeers_);
onChanged();
} else {
anchorPeersBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder clearAnchorPeers() {
if (anchorPeersBuilder_ == null) {
anchorPeers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
anchorPeersBuilder_.clear();
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public Builder removeAnchorPeers(int index) {
if (anchorPeersBuilder_ == null) {
ensureAnchorPeersIsMutable();
anchorPeers_.remove(index);
onChanged();
} else {
anchorPeersBuilder_.remove(index);
}
return this;
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder getAnchorPeersBuilder(
int index) {
return getAnchorPeersFieldBuilder().getBuilder(index);
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder getAnchorPeersOrBuilder(
int index) {
if (anchorPeersBuilder_ == null) {
return anchorPeers_.get(index); } else {
return anchorPeersBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public java.util.List
getAnchorPeersOrBuilderList() {
if (anchorPeersBuilder_ != null) {
return anchorPeersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(anchorPeers_);
}
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder addAnchorPeersBuilder() {
return getAnchorPeersFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.getDefaultInstance());
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder addAnchorPeersBuilder(
int index) {
return getAnchorPeersFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.getDefaultInstance());
}
/**
* repeated .protos.AnchorPeer anchor_peers = 1;
*/
public java.util.List
getAnchorPeersBuilderList() {
return getAnchorPeersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder>
getAnchorPeersFieldBuilder() {
if (anchorPeersBuilder_ == null) {
anchorPeersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder>(
anchorPeers_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
anchorPeers_ = null;
}
return anchorPeersBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.AnchorPeers)
}
// @@protoc_insertion_point(class_scope:protos.AnchorPeers)
private static final org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers();
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public AnchorPeers parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnchorPeers(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeers getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AnchorPeerOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.AnchorPeer)
com.google.protobuf.MessageOrBuilder {
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
java.lang.String getHost();
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
com.google.protobuf.ByteString
getHostBytes();
/**
*
* The port number
*
*
* optional int32 port = 2;
*/
int getPort();
}
/**
*
* AnchorPeer message structure which provides information about anchor peer, it includes host name,
* port number and peer certificate.
*
*
* Protobuf type {@code protos.AnchorPeer}
*/
public static final class AnchorPeer extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.AnchorPeer)
AnchorPeerOrBuilder {
// Use AnchorPeer.newBuilder() to construct.
private AnchorPeer(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AnchorPeer() {
host_ = "";
port_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private AnchorPeer(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
host_ = s;
break;
}
case 16: {
port_ = input.readInt32();
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeer_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.class, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder.class);
}
public static final int HOST_FIELD_NUMBER = 1;
private volatile java.lang.Object host_;
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
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();
host_ = s;
return s;
}
}
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_FIELD_NUMBER = 2;
private int port_;
/**
*
* The port number
*
*
* optional int32 port = 2;
*/
public int getPort() {
return port_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getHostBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_);
}
if (port_ != 0) {
output.writeInt32(2, port_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getHostBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_);
}
if (port_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, port_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer other = (org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer) obj;
boolean result = true;
result = result && getHost()
.equals(other.getHost());
result = result && (getPort()
== other.getPort());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + HOST_FIELD_NUMBER;
hash = (53 * hash) + getHost().hashCode();
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer 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.peer.Configuration.AnchorPeer parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer 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.peer.Configuration.AnchorPeer parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer 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.peer.Configuration.AnchorPeer parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* AnchorPeer message structure which provides information about anchor peer, it includes host name,
* port number and peer certificate.
*
*
* Protobuf type {@code protos.AnchorPeer}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.AnchorPeer)
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeer_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.class, org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
host_ = "";
port_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Configuration.internal_static_protos_AnchorPeer_descriptor;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer build() {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer buildPartial() {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer result = new org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer(this);
result.host_ = host_;
result.port_ = port_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer other) {
if (other == org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer.getDefaultInstance()) return this;
if (!other.getHost().isEmpty()) {
host_ = other.host_;
onChanged();
}
if (other.getPort() != 0) {
setPort(other.getPort());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object host_ = "";
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public Builder setHost(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
host_ = value;
onChanged();
return this;
}
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public Builder clearHost() {
host_ = getDefaultInstance().getHost();
onChanged();
return this;
}
/**
*
* DNS host name of the anchor peer
*
*
* optional string host = 1;
*/
public Builder setHostBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
host_ = value;
onChanged();
return this;
}
private int port_ ;
/**
*
* The port number
*
*
* optional int32 port = 2;
*/
public int getPort() {
return port_;
}
/**
*
* The port number
*
*
* optional int32 port = 2;
*/
public Builder setPort(int value) {
port_ = value;
onChanged();
return this;
}
/**
*
* The port number
*
*
* optional int32 port = 2;
*/
public Builder clearPort() {
port_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.AnchorPeer)
}
// @@protoc_insertion_point(class_scope:protos.AnchorPeer)
private static final org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer();
}
public static org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public AnchorPeer parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnchorPeer(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.Configuration.AnchorPeer getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_AnchorPeers_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_AnchorPeers_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_AnchorPeer_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_AnchorPeer_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\030peer/configuration.proto\022\006protos\"7\n\013An" +
"chorPeers\022(\n\014anchor_peers\030\001 \003(\0132\022.protos" +
".AnchorPeer\"(\n\nAnchorPeer\022\014\n\004host\030\001 \001(\t\022" +
"\014\n\004port\030\002 \001(\005BO\n\"org.hyperledger.fabric." +
"protos.peerZ)github.com/hyperledger/fabr" +
"ic/protos/peerb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_protos_AnchorPeers_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_AnchorPeers_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_AnchorPeers_descriptor,
new java.lang.String[] { "AnchorPeers", });
internal_static_protos_AnchorPeer_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_AnchorPeer_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_AnchorPeer_descriptor,
new java.lang.String[] { "Host", "Port", });
}
// @@protoc_insertion_point(outer_class_scope)
}