Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: common/common.proto
package org.hyperledger.fabric.protos.common;
public final class Common {
private Common() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* These status codes are intended to resemble selected HTTP status codes
*
*
* Protobuf enum {@code common.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* SUCCESS = 200;
*/
SUCCESS(200),
/**
* BAD_REQUEST = 400;
*/
BAD_REQUEST(400),
/**
* FORBIDDEN = 403;
*/
FORBIDDEN(403),
/**
* NOT_FOUND = 404;
*/
NOT_FOUND(404),
/**
* REQUEST_ENTITY_TOO_LARGE = 413;
*/
REQUEST_ENTITY_TOO_LARGE(413),
/**
* INTERNAL_SERVER_ERROR = 500;
*/
INTERNAL_SERVER_ERROR(500),
/**
* NOT_IMPLEMENTED = 501;
*/
NOT_IMPLEMENTED(501),
/**
* SERVICE_UNAVAILABLE = 503;
*/
SERVICE_UNAVAILABLE(503),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* SUCCESS = 200;
*/
public static final int SUCCESS_VALUE = 200;
/**
* BAD_REQUEST = 400;
*/
public static final int BAD_REQUEST_VALUE = 400;
/**
* FORBIDDEN = 403;
*/
public static final int FORBIDDEN_VALUE = 403;
/**
* NOT_FOUND = 404;
*/
public static final int NOT_FOUND_VALUE = 404;
/**
* REQUEST_ENTITY_TOO_LARGE = 413;
*/
public static final int REQUEST_ENTITY_TOO_LARGE_VALUE = 413;
/**
* INTERNAL_SERVER_ERROR = 500;
*/
public static final int INTERNAL_SERVER_ERROR_VALUE = 500;
/**
* NOT_IMPLEMENTED = 501;
*/
public static final int NOT_IMPLEMENTED_VALUE = 501;
/**
* SERVICE_UNAVAILABLE = 503;
*/
public static final int SERVICE_UNAVAILABLE_VALUE = 503;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Status valueOf(int value) {
return forNumber(value);
}
public static Status forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 200: return SUCCESS;
case 400: return BAD_REQUEST;
case 403: return FORBIDDEN;
case 404: return NOT_FOUND;
case 413: return REQUEST_ENTITY_TOO_LARGE;
case 500: return INTERNAL_SERVER_ERROR;
case 501: return NOT_IMPLEMENTED;
case 503: return SERVICE_UNAVAILABLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:common.Status)
}
/**
*
* Prevent removed tag re-use
* Uncomment after fabric-baseimage moves to 3.5.1
* reserved 7;
* reserved "PEER_RESOURCE_UPDATE";
*
*
* MESSAGE = 0;
*/
public static final int MESSAGE_VALUE = 0;
/**
*
* Used for messages which express the channel config
*
*
* CONFIG = 1;
*/
public static final int CONFIG_VALUE = 1;
/**
*
* Used for transactions which update the channel config
*
*
* CONFIG_UPDATE = 2;
*/
public static final int CONFIG_UPDATE_VALUE = 2;
/**
*
* Used by the SDK to submit endorser based transactions
*
*
* ENDORSER_TRANSACTION = 3;
*/
public static final int ENDORSER_TRANSACTION_VALUE = 3;
/**
*
* Used internally by the orderer for management
*
*
* ORDERER_TRANSACTION = 4;
*/
public static final int ORDERER_TRANSACTION_VALUE = 4;
/**
*
* Used as the type for Envelope messages submitted to instruct the Deliver API to seek
*
*
* DELIVER_SEEK_INFO = 5;
*/
public static final int DELIVER_SEEK_INFO_VALUE = 5;
/**
*
* Used for packaging chaincode artifacts for install
*
*
* CHAINCODE_PACKAGE = 6;
*/
public static final int CHAINCODE_PACKAGE_VALUE = 6;
/**
*
* Used for invoking an administrative operation on a peer
*
*
* PEER_ADMIN_OPERATION = 8;
*/
public static final int PEER_ADMIN_OPERATION_VALUE = 8;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HeaderType valueOf(int value) {
return forNumber(value);
}
public static HeaderType forNumber(int value) {
switch (value) {
case 0: return MESSAGE;
case 1: return CONFIG;
case 2: return CONFIG_UPDATE;
case 3: return ENDORSER_TRANSACTION;
case 4: return ORDERER_TRANSACTION;
case 5: return DELIVER_SEEK_INFO;
case 6: return CHAINCODE_PACKAGE;
case 8: return PEER_ADMIN_OPERATION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
HeaderType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public HeaderType findValueByNumber(int number) {
return HeaderType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.getDescriptor().getEnumTypes().get(1);
}
private static final HeaderType[] VALUES = values();
public static HeaderType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private HeaderType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:common.HeaderType)
}
/**
*
* This enum enlists indexes of the block metadata array
*
* Block metadata array position for block signatures
*
*
* SIGNATURES = 0;
*/
public static final int SIGNATURES_VALUE = 0;
/**
*
* Block metadata array position to store last configuration block sequence number
*
*
* LAST_CONFIG = 1;
*/
public static final int LAST_CONFIG_VALUE = 1;
/**
*
* Block metadata array position to store serialized bit array filter of invalid transactions
*
*
* TRANSACTIONS_FILTER = 2;
*/
public static final int TRANSACTIONS_FILTER_VALUE = 2;
/**
*
* Block metadata array position to store operational metadata for orderers
*
*
* ORDERER = 3;
*/
public static final int ORDERER_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BlockMetadataIndex valueOf(int value) {
return forNumber(value);
}
public static BlockMetadataIndex forNumber(int value) {
switch (value) {
case 0: return SIGNATURES;
case 1: return LAST_CONFIG;
case 2: return TRANSACTIONS_FILTER;
case 3: return ORDERER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BlockMetadataIndex> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BlockMetadataIndex findValueByNumber(int number) {
return BlockMetadataIndex.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.getDescriptor().getEnumTypes().get(2);
}
private static final BlockMetadataIndex[] VALUES = values();
public static BlockMetadataIndex valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BlockMetadataIndex(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:common.BlockMetadataIndex)
}
public interface LastConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.LastConfig)
com.google.protobuf.MessageOrBuilder {
/**
* optional uint64 index = 1;
*/
long getIndex();
}
/**
*
* LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
*
*
* Protobuf type {@code common.LastConfig}
*/
public static final class LastConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.LastConfig)
LastConfigOrBuilder {
// Use LastConfig.newBuilder() to construct.
private LastConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private LastConfig() {
index_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private LastConfig(
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 8: {
index_ = input.readUInt64();
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.common.Common.internal_static_common_LastConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_LastConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.LastConfig.class, org.hyperledger.fabric.protos.common.Common.LastConfig.Builder.class);
}
public static final int INDEX_FIELD_NUMBER = 1;
private long index_;
/**
* optional uint64 index = 1;
*/
public long getIndex() {
return 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 {
if (index_ != 0L) {
output.writeUInt64(1, index_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (index_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, index_);
}
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.common.Common.LastConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Common.LastConfig other = (org.hyperledger.fabric.protos.common.Common.LastConfig) obj;
boolean result = true;
result = result && (getIndex()
== other.getIndex());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIndex());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig 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.Common.LastConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig 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.Common.LastConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig 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.Common.LastConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig 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.Common.LastConfig 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.Common.LastConfig 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.common.Common.LastConfig 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;
}
/**
*
* LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
*
*
* Protobuf type {@code common.LastConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.LastConfig)
org.hyperledger.fabric.protos.common.Common.LastConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_LastConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_LastConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.LastConfig.class, org.hyperledger.fabric.protos.common.Common.LastConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Common.LastConfig.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();
index_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_LastConfig_descriptor;
}
public org.hyperledger.fabric.protos.common.Common.LastConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Common.LastConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Common.LastConfig build() {
org.hyperledger.fabric.protos.common.Common.LastConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Common.LastConfig buildPartial() {
org.hyperledger.fabric.protos.common.Common.LastConfig result = new org.hyperledger.fabric.protos.common.Common.LastConfig(this);
result.index_ = index_;
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.common.Common.LastConfig) {
return mergeFrom((org.hyperledger.fabric.protos.common.Common.LastConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.LastConfig other) {
if (other == org.hyperledger.fabric.protos.common.Common.LastConfig.getDefaultInstance()) return this;
if (other.getIndex() != 0L) {
setIndex(other.getIndex());
}
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.common.Common.LastConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Common.LastConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long index_ ;
/**
* optional uint64 index = 1;
*/
public long getIndex() {
return index_;
}
/**
* optional uint64 index = 1;
*/
public Builder setIndex(long value) {
index_ = value;
onChanged();
return this;
}
/**
* optional uint64 index = 1;
*/
public Builder clearIndex() {
index_ = 0L;
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:common.LastConfig)
}
// @@protoc_insertion_point(class_scope:common.LastConfig)
private static final org.hyperledger.fabric.protos.common.Common.LastConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.LastConfig();
}
public static org.hyperledger.fabric.protos.common.Common.LastConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public LastConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LastConfig(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.common.Common.LastConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.Metadata)
com.google.protobuf.MessageOrBuilder {
/**
* optional bytes value = 1;
*/
com.google.protobuf.ByteString getValue();
/**
* repeated .common.MetadataSignature signatures = 2;
*/
java.util.List
getSignaturesList();
/**
* repeated .common.MetadataSignature signatures = 2;
*/
org.hyperledger.fabric.protos.common.Common.MetadataSignature getSignatures(int index);
/**
* repeated .common.MetadataSignature signatures = 2;
*/
int getSignaturesCount();
/**
* repeated .common.MetadataSignature signatures = 2;
*/
java.util.List
getSignaturesOrBuilderList();
/**
* repeated .common.MetadataSignature signatures = 2;
*/
org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder getSignaturesOrBuilder(
int index);
}
/**
*
* Metadata is a common structure to be used to encode block metadata
*
*
* Protobuf type {@code common.Metadata}
*/
public static final class Metadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.Metadata)
MetadataOrBuilder {
// Use Metadata.newBuilder() to construct.
private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Metadata() {
value_ = com.google.protobuf.ByteString.EMPTY;
signatures_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Metadata(
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: {
value_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
signatures_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
signatures_.add(
input.readMessage(org.hyperledger.fabric.protos.common.Common.MetadataSignature.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_ & 0x00000002) == 0x00000002)) {
signatures_ = java.util.Collections.unmodifiableList(signatures_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Metadata_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Metadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.Metadata.class, org.hyperledger.fabric.protos.common.Common.Metadata.Builder.class);
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString value_;
/**
* optional bytes value = 1;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
public static final int SIGNATURES_FIELD_NUMBER = 2;
private java.util.List signatures_;
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public java.util.List getSignaturesList() {
return signatures_;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public java.util.List
getSignaturesOrBuilderList() {
return signatures_;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public int getSignaturesCount() {
return signatures_.size();
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignature getSignatures(int index) {
return signatures_.get(index);
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder getSignaturesOrBuilder(
int index) {
return signatures_.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 {
if (!value_.isEmpty()) {
output.writeBytes(1, value_);
}
for (int i = 0; i < signatures_.size(); i++) {
output.writeMessage(2, signatures_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, value_);
}
for (int i = 0; i < signatures_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, signatures_.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.common.Common.Metadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Common.Metadata other = (org.hyperledger.fabric.protos.common.Common.Metadata) obj;
boolean result = true;
result = result && getValue()
.equals(other.getValue());
result = result && getSignaturesList()
.equals(other.getSignaturesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
if (getSignaturesCount() > 0) {
hash = (37 * hash) + SIGNATURES_FIELD_NUMBER;
hash = (53 * hash) + getSignaturesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Common.Metadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.Metadata 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.Common.Metadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.Metadata 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.Common.Metadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.Metadata 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.Common.Metadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.Metadata 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.Common.Metadata 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.Common.Metadata 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.common.Common.Metadata 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;
}
/**
*
* Metadata is a common structure to be used to encode block metadata
*
*
* Protobuf type {@code common.Metadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.Metadata)
org.hyperledger.fabric.protos.common.Common.MetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Metadata_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Metadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.Metadata.class, org.hyperledger.fabric.protos.common.Common.Metadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Common.Metadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSignaturesFieldBuilder();
}
}
public Builder clear() {
super.clear();
value_ = com.google.protobuf.ByteString.EMPTY;
if (signaturesBuilder_ == null) {
signatures_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
signaturesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Metadata_descriptor;
}
public org.hyperledger.fabric.protos.common.Common.Metadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Common.Metadata.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Common.Metadata build() {
org.hyperledger.fabric.protos.common.Common.Metadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Common.Metadata buildPartial() {
org.hyperledger.fabric.protos.common.Common.Metadata result = new org.hyperledger.fabric.protos.common.Common.Metadata(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.value_ = value_;
if (signaturesBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
signatures_ = java.util.Collections.unmodifiableList(signatures_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.signatures_ = signatures_;
} else {
result.signatures_ = signaturesBuilder_.build();
}
result.bitField0_ = to_bitField0_;
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.common.Common.Metadata) {
return mergeFrom((org.hyperledger.fabric.protos.common.Common.Metadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.Metadata other) {
if (other == org.hyperledger.fabric.protos.common.Common.Metadata.getDefaultInstance()) return this;
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
if (signaturesBuilder_ == null) {
if (!other.signatures_.isEmpty()) {
if (signatures_.isEmpty()) {
signatures_ = other.signatures_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSignaturesIsMutable();
signatures_.addAll(other.signatures_);
}
onChanged();
}
} else {
if (!other.signatures_.isEmpty()) {
if (signaturesBuilder_.isEmpty()) {
signaturesBuilder_.dispose();
signaturesBuilder_ = null;
signatures_ = other.signatures_;
bitField0_ = (bitField0_ & ~0x00000002);
signaturesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSignaturesFieldBuilder() : null;
} else {
signaturesBuilder_.addAllMessages(other.signatures_);
}
}
}
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.common.Common.Metadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Common.Metadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes value = 1;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* optional bytes value = 1;
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* optional bytes value = 1;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
private java.util.List signatures_ =
java.util.Collections.emptyList();
private void ensureSignaturesIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
signatures_ = new java.util.ArrayList(signatures_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.MetadataSignature, org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder, org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder> signaturesBuilder_;
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public java.util.List getSignaturesList() {
if (signaturesBuilder_ == null) {
return java.util.Collections.unmodifiableList(signatures_);
} else {
return signaturesBuilder_.getMessageList();
}
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public int getSignaturesCount() {
if (signaturesBuilder_ == null) {
return signatures_.size();
} else {
return signaturesBuilder_.getCount();
}
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignature getSignatures(int index) {
if (signaturesBuilder_ == null) {
return signatures_.get(index);
} else {
return signaturesBuilder_.getMessage(index);
}
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder setSignatures(
int index, org.hyperledger.fabric.protos.common.Common.MetadataSignature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.set(index, value);
onChanged();
} else {
signaturesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder setSignatures(
int index, org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.set(index, builderForValue.build());
onChanged();
} else {
signaturesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder addSignatures(org.hyperledger.fabric.protos.common.Common.MetadataSignature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.add(value);
onChanged();
} else {
signaturesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder addSignatures(
int index, org.hyperledger.fabric.protos.common.Common.MetadataSignature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.add(index, value);
onChanged();
} else {
signaturesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder addSignatures(
org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.add(builderForValue.build());
onChanged();
} else {
signaturesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder addSignatures(
int index, org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.add(index, builderForValue.build());
onChanged();
} else {
signaturesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder addAllSignatures(
java.lang.Iterable values) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, signatures_);
onChanged();
} else {
signaturesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder clearSignatures() {
if (signaturesBuilder_ == null) {
signatures_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
signaturesBuilder_.clear();
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public Builder removeSignatures(int index) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.remove(index);
onChanged();
} else {
signaturesBuilder_.remove(index);
}
return this;
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder getSignaturesBuilder(
int index) {
return getSignaturesFieldBuilder().getBuilder(index);
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder getSignaturesOrBuilder(
int index) {
if (signaturesBuilder_ == null) {
return signatures_.get(index); } else {
return signaturesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public java.util.List
getSignaturesOrBuilderList() {
if (signaturesBuilder_ != null) {
return signaturesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(signatures_);
}
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder addSignaturesBuilder() {
return getSignaturesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.common.Common.MetadataSignature.getDefaultInstance());
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder addSignaturesBuilder(
int index) {
return getSignaturesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.common.Common.MetadataSignature.getDefaultInstance());
}
/**
* repeated .common.MetadataSignature signatures = 2;
*/
public java.util.List
getSignaturesBuilderList() {
return getSignaturesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.MetadataSignature, org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder, org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder>
getSignaturesFieldBuilder() {
if (signaturesBuilder_ == null) {
signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.MetadataSignature, org.hyperledger.fabric.protos.common.Common.MetadataSignature.Builder, org.hyperledger.fabric.protos.common.Common.MetadataSignatureOrBuilder>(
signatures_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
signatures_ = null;
}
return signaturesBuilder_;
}
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:common.Metadata)
}
// @@protoc_insertion_point(class_scope:common.Metadata)
private static final org.hyperledger.fabric.protos.common.Common.Metadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.Metadata();
}
public static org.hyperledger.fabric.protos.common.Common.Metadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Metadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Metadata(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.common.Common.Metadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetadataSignatureOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.MetadataSignature)
com.google.protobuf.MessageOrBuilder {
/**
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* The epoch in which this header was generated, where epoch is defined based on block height
* Epoch in which the response has been generated. This field identifies a
* logical window of time. A proposal response is accepted by a peer only if
* two conditions hold:
* 1. the epoch specified in the message is the current epoch
* 2. this message has been only seen once during this epoch (i.e. it hasn't
* been replayed)
*
* Header is a generic replay prevention and identity message to include in a signed payload
*
*
* Protobuf type {@code common.ChannelHeader}
*/
public static final class ChannelHeader extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.ChannelHeader)
ChannelHeaderOrBuilder {
// Use ChannelHeader.newBuilder() to construct.
private ChannelHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChannelHeader() {
type_ = 0;
version_ = 0;
channelId_ = "";
txId_ = "";
epoch_ = 0L;
extension_ = com.google.protobuf.ByteString.EMPTY;
tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChannelHeader(
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 8: {
type_ = input.readInt32();
break;
}
case 16: {
version_ = input.readInt32();
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
channelId_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
txId_ = s;
break;
}
case 48: {
epoch_ = input.readUInt64();
break;
}
case 58: {
extension_ = input.readBytes();
break;
}
case 66: {
tlsCertHash_ = input.readBytes();
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.common.Common.internal_static_common_ChannelHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.ChannelHeader.class, org.hyperledger.fabric.protos.common.Common.ChannelHeader.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
*
* Header types 0-10000 are reserved and defined by HeaderType
*
*
* optional int32 type = 1;
*/
public int getType() {
return type_;
}
public static final int VERSION_FIELD_NUMBER = 2;
private int version_;
/**
*
* Version indicates message protocol version
*
*
* optional int32 version = 2;
*/
public int getVersion() {
return version_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp timestamp_;
/**
*
* Timestamp is the local time when the message was created
* by the sender
*
* Identifier of the channel this message is bound for
*
*
* optional string channel_id = 4;
*/
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TX_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object txId_;
/**
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
*
* optional string tx_id = 5;
*/
public com.google.protobuf.ByteString
getTxIdBytes() {
java.lang.Object ref = txId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EPOCH_FIELD_NUMBER = 6;
private long epoch_;
/**
*
* The epoch in which this header was generated, where epoch is defined based on block height
* Epoch in which the response has been generated. This field identifies a
* logical window of time. A proposal response is accepted by a peer only if
* two conditions hold:
* 1. the epoch specified in the message is the current epoch
* 2. this message has been only seen once during this epoch (i.e. it hasn't
* been replayed)
*
*
* optional uint64 epoch = 6;
*/
public long getEpoch() {
return epoch_;
}
public static final int EXTENSION_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString extension_;
/**
*
* Extension that may be attached based on the header type
*
*
* optional bytes extension = 7;
*/
public com.google.protobuf.ByteString getExtension() {
return extension_;
}
public static final int TLS_CERT_HASH_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString tlsCertHash_;
/**
*
* If mutual TLS is employed, this represents
* the hash of the client's TLS certificate
*
*
* optional bytes tls_cert_hash = 8;
*/
public com.google.protobuf.ByteString getTlsCertHash() {
return tlsCertHash_;
}
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 (type_ != 0) {
output.writeInt32(1, type_);
}
if (version_ != 0) {
output.writeInt32(2, version_);
}
if (timestamp_ != null) {
output.writeMessage(3, getTimestamp());
}
if (!getChannelIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, channelId_);
}
if (!getTxIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, txId_);
}
if (epoch_ != 0L) {
output.writeUInt64(6, epoch_);
}
if (!extension_.isEmpty()) {
output.writeBytes(7, extension_);
}
if (!tlsCertHash_.isEmpty()) {
output.writeBytes(8, tlsCertHash_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, type_);
}
if (version_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, version_);
}
if (timestamp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTimestamp());
}
if (!getChannelIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, channelId_);
}
if (!getTxIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, txId_);
}
if (epoch_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(6, epoch_);
}
if (!extension_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, extension_);
}
if (!tlsCertHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, tlsCertHash_);
}
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.common.Common.ChannelHeader)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Common.ChannelHeader other = (org.hyperledger.fabric.protos.common.Common.ChannelHeader) obj;
boolean result = true;
result = result && (getType()
== other.getType());
result = result && (getVersion()
== other.getVersion());
result = result && (hasTimestamp() == other.hasTimestamp());
if (hasTimestamp()) {
result = result && getTimestamp()
.equals(other.getTimestamp());
}
result = result && getChannelId()
.equals(other.getChannelId());
result = result && getTxId()
.equals(other.getTxId());
result = result && (getEpoch()
== other.getEpoch());
result = result && getExtension()
.equals(other.getExtension());
result = result && getTlsCertHash()
.equals(other.getTlsCertHash());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion();
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
hash = (53 * hash) + getChannelId().hashCode();
hash = (37 * hash) + TX_ID_FIELD_NUMBER;
hash = (53 * hash) + getTxId().hashCode();
hash = (37 * hash) + EPOCH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEpoch());
hash = (37 * hash) + EXTENSION_FIELD_NUMBER;
hash = (53 * hash) + getExtension().hashCode();
hash = (37 * hash) + TLS_CERT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getTlsCertHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.ChannelHeader 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.Common.ChannelHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.ChannelHeader 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.Common.ChannelHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.ChannelHeader 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.Common.ChannelHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.ChannelHeader 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.Common.ChannelHeader 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.Common.ChannelHeader 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.common.Common.ChannelHeader 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;
}
/**
*
* Header is a generic replay prevention and identity message to include in a signed payload
*
*
* Protobuf type {@code common.ChannelHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.ChannelHeader)
org.hyperledger.fabric.protos.common.Common.ChannelHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.ChannelHeader.class, org.hyperledger.fabric.protos.common.Common.ChannelHeader.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Common.ChannelHeader.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();
type_ = 0;
version_ = 0;
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
channelId_ = "";
txId_ = "";
epoch_ = 0L;
extension_ = com.google.protobuf.ByteString.EMPTY;
tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_descriptor;
}
public org.hyperledger.fabric.protos.common.Common.ChannelHeader getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Common.ChannelHeader.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Common.ChannelHeader build() {
org.hyperledger.fabric.protos.common.Common.ChannelHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Common.ChannelHeader buildPartial() {
org.hyperledger.fabric.protos.common.Common.ChannelHeader result = new org.hyperledger.fabric.protos.common.Common.ChannelHeader(this);
result.type_ = type_;
result.version_ = version_;
if (timestampBuilder_ == null) {
result.timestamp_ = timestamp_;
} else {
result.timestamp_ = timestampBuilder_.build();
}
result.channelId_ = channelId_;
result.txId_ = txId_;
result.epoch_ = epoch_;
result.extension_ = extension_;
result.tlsCertHash_ = tlsCertHash_;
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.common.Common.ChannelHeader) {
return mergeFrom((org.hyperledger.fabric.protos.common.Common.ChannelHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.ChannelHeader other) {
if (other == org.hyperledger.fabric.protos.common.Common.ChannelHeader.getDefaultInstance()) return this;
if (other.getType() != 0) {
setType(other.getType());
}
if (other.getVersion() != 0) {
setVersion(other.getVersion());
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
if (!other.getChannelId().isEmpty()) {
channelId_ = other.channelId_;
onChanged();
}
if (!other.getTxId().isEmpty()) {
txId_ = other.txId_;
onChanged();
}
if (other.getEpoch() != 0L) {
setEpoch(other.getEpoch());
}
if (other.getExtension() != com.google.protobuf.ByteString.EMPTY) {
setExtension(other.getExtension());
}
if (other.getTlsCertHash() != com.google.protobuf.ByteString.EMPTY) {
setTlsCertHash(other.getTlsCertHash());
}
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.common.Common.ChannelHeader parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Common.ChannelHeader) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int type_ ;
/**
*
* Header types 0-10000 are reserved and defined by HeaderType
*
*
* optional int32 type = 1;
*/
public int getType() {
return type_;
}
/**
*
* Header types 0-10000 are reserved and defined by HeaderType
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
* An unique identifier that is used end-to-end.
* - set by higher layers such as end user or SDK
* - passed to the endorser (which will check for uniqueness)
* - as the header is passed along unchanged, it will be
* be retrieved by the committer (uniqueness check here as well)
* - to be stored in the ledger
*
*
* optional string tx_id = 5;
*/
public Builder setTxIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
txId_ = value;
onChanged();
return this;
}
private long epoch_ ;
/**
*
* The epoch in which this header was generated, where epoch is defined based on block height
* Epoch in which the response has been generated. This field identifies a
* logical window of time. A proposal response is accepted by a peer only if
* two conditions hold:
* 1. the epoch specified in the message is the current epoch
* 2. this message has been only seen once during this epoch (i.e. it hasn't
* been replayed)
*
*
* optional uint64 epoch = 6;
*/
public long getEpoch() {
return epoch_;
}
/**
*
* The epoch in which this header was generated, where epoch is defined based on block height
* Epoch in which the response has been generated. This field identifies a
* logical window of time. A proposal response is accepted by a peer only if
* two conditions hold:
* 1. the epoch specified in the message is the current epoch
* 2. this message has been only seen once during this epoch (i.e. it hasn't
* been replayed)
*
* The epoch in which this header was generated, where epoch is defined based on block height
* Epoch in which the response has been generated. This field identifies a
* logical window of time. A proposal response is accepted by a peer only if
* two conditions hold:
* 1. the epoch specified in the message is the current epoch
* 2. this message has been only seen once during this epoch (i.e. it hasn't
* been replayed)
*
* This is finalized block structure to be shared among the orderer and peer
* Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
* in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
* the Metadata is not.
*
*
* Protobuf type {@code common.Block}
*/
public static final class Block extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.Block)
BlockOrBuilder {
// Use Block.newBuilder() to construct.
private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Block() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Block(
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: {
org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder subBuilder = null;
if (header_ != null) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockHeader.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.hyperledger.fabric.protos.common.Common.BlockData.Builder subBuilder = null;
if (data_ != null) {
subBuilder = data_.toBuilder();
}
data_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockData.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(data_);
data_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockMetadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
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.common.Common.internal_static_common_Block_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.Block.class, org.hyperledger.fabric.protos.common.Common.Block.Builder.class);
}
public static final int HEADER_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.common.Common.BlockHeader header_;
/**
* optional .common.BlockHeader header = 1;
*/
public boolean hasHeader() {
return header_ != null;
}
/**
* optional .common.BlockHeader header = 1;
*/
public org.hyperledger.fabric.protos.common.Common.BlockHeader getHeader() {
return header_ == null ? org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance() : header_;
}
/**
* optional .common.BlockHeader header = 1;
*/
public org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder getHeaderOrBuilder() {
return getHeader();
}
public static final int DATA_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.common.Common.BlockData data_;
/**
* optional .common.BlockData data = 2;
*/
public boolean hasData() {
return data_ != null;
}
/**
* optional .common.BlockData data = 2;
*/
public org.hyperledger.fabric.protos.common.Common.BlockData getData() {
return data_ == null ? org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance() : data_;
}
/**
* optional .common.BlockData data = 2;
*/
public org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder getDataOrBuilder() {
return getData();
}
public static final int METADATA_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.common.Common.BlockMetadata metadata_;
/**
* optional .common.BlockMetadata metadata = 3;
*/
public boolean hasMetadata() {
return metadata_ != null;
}
/**
* optional .common.BlockMetadata metadata = 3;
*/
public org.hyperledger.fabric.protos.common.Common.BlockMetadata getMetadata() {
return metadata_ == null ? org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance() : metadata_;
}
/**
* optional .common.BlockMetadata metadata = 3;
*/
public org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
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 (header_ != null) {
output.writeMessage(1, getHeader());
}
if (data_ != null) {
output.writeMessage(2, getData());
}
if (metadata_ != null) {
output.writeMessage(3, getMetadata());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (header_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
if (data_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getData());
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMetadata());
}
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.common.Common.Block)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Common.Block other = (org.hyperledger.fabric.protos.common.Common.Block) obj;
boolean result = true;
result = result && (hasHeader() == other.hasHeader());
if (hasHeader()) {
result = result && getHeader()
.equals(other.getHeader());
}
result = result && (hasData() == other.hasData());
if (hasData()) {
result = result && getData()
.equals(other.getData());
}
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata()
.equals(other.getMetadata());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
if (hasData()) {
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.Block 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.Common.Block parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.Block 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.Common.Block parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.Block 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.Common.Block parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.Block 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.Common.Block 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.Common.Block 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.common.Common.Block 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;
}
/**
*
* This is finalized block structure to be shared among the orderer and peer
* Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
* in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
* the Metadata is not.
*
* BlockHeader is the element of the block which forms the block chain
* The block header is hashed using the configured chain hashing algorithm
* over the ASN.1 encoding of the BlockHeader
*
*
* Protobuf type {@code common.BlockHeader}
*/
public static final class BlockHeader extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.BlockHeader)
BlockHeaderOrBuilder {
// Use BlockHeader.newBuilder() to construct.
private BlockHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private BlockHeader() {
number_ = 0L;
previousHash_ = com.google.protobuf.ByteString.EMPTY;
dataHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private BlockHeader(
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 8: {
number_ = input.readUInt64();
break;
}
case 18: {
previousHash_ = input.readBytes();
break;
}
case 26: {
dataHash_ = input.readBytes();
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.common.Common.internal_static_common_BlockHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.BlockHeader.class, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder.class);
}
public static final int NUMBER_FIELD_NUMBER = 1;
private long number_;
/**
*
* The position in the blockchain
*
*
* optional uint64 number = 1;
*/
public long getNumber() {
return number_;
}
public static final int PREVIOUS_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString previousHash_;
/**
*
* The hash of the previous block header
*
*
* optional bytes previous_hash = 2;
*/
public com.google.protobuf.ByteString getPreviousHash() {
return previousHash_;
}
public static final int DATA_HASH_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString dataHash_;
/**
*
* The hash of the BlockData, by MerkleTree
*
*
* optional bytes data_hash = 3;
*/
public com.google.protobuf.ByteString getDataHash() {
return dataHash_;
}
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 (number_ != 0L) {
output.writeUInt64(1, number_);
}
if (!previousHash_.isEmpty()) {
output.writeBytes(2, previousHash_);
}
if (!dataHash_.isEmpty()) {
output.writeBytes(3, dataHash_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (number_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, number_);
}
if (!previousHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, previousHash_);
}
if (!dataHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, dataHash_);
}
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.common.Common.BlockHeader)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Common.BlockHeader other = (org.hyperledger.fabric.protos.common.Common.BlockHeader) obj;
boolean result = true;
result = result && (getNumber()
== other.getNumber());
result = result && getPreviousHash()
.equals(other.getPreviousHash());
result = result && getDataHash()
.equals(other.getDataHash());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNumber());
hash = (37 * hash) + PREVIOUS_HASH_FIELD_NUMBER;
hash = (53 * hash) + getPreviousHash().hashCode();
hash = (37 * hash) + DATA_HASH_FIELD_NUMBER;
hash = (53 * hash) + getDataHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.BlockHeader 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.Common.BlockHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Common.BlockHeader 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.Common.BlockHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.BlockHeader 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.Common.BlockHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Common.BlockHeader 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.Common.BlockHeader 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.Common.BlockHeader 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.common.Common.BlockHeader 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;
}
/**
*
* BlockHeader is the element of the block which forms the block chain
* The block header is hashed using the configured chain hashing algorithm
* over the ASN.1 encoding of the BlockHeader
*
*
* Protobuf type {@code common.BlockHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.BlockHeader)
org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Common.BlockHeader.class, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Common.BlockHeader.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();
number_ = 0L;
previousHash_ = com.google.protobuf.ByteString.EMPTY;
dataHash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_descriptor;
}
public org.hyperledger.fabric.protos.common.Common.BlockHeader getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Common.BlockHeader build() {
org.hyperledger.fabric.protos.common.Common.BlockHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Common.BlockHeader buildPartial() {
org.hyperledger.fabric.protos.common.Common.BlockHeader result = new org.hyperledger.fabric.protos.common.Common.BlockHeader(this);
result.number_ = number_;
result.previousHash_ = previousHash_;
result.dataHash_ = dataHash_;
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.common.Common.BlockHeader) {
return mergeFrom((org.hyperledger.fabric.protos.common.Common.BlockHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.BlockHeader other) {
if (other == org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance()) return this;
if (other.getNumber() != 0L) {
setNumber(other.getNumber());
}
if (other.getPreviousHash() != com.google.protobuf.ByteString.EMPTY) {
setPreviousHash(other.getPreviousHash());
}
if (other.getDataHash() != com.google.protobuf.ByteString.EMPTY) {
setDataHash(other.getDataHash());
}
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.common.Common.BlockHeader parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Common.BlockHeader) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long number_ ;
/**
*
* The position in the blockchain
*
*
* optional uint64 number = 1;
*/
public long getNumber() {
return number_;
}
/**
*