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: record_stream_file.proto
package com.hedera.services.stream.proto;
/**
*
**
* RecordStreamFile is used to serialize all RecordStreamItems that are part of the
* same period into record stream files.
* This structure represents a block in Hedera (HIP-415).
*
*
* Protobuf type {@code proto.RecordStreamFile}
*/
public final class RecordStreamFile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.RecordStreamFile)
RecordStreamFileOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecordStreamFile.newBuilder() to construct.
private RecordStreamFile(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecordStreamFile() {
recordStreamItems_ = java.util.Collections.emptyList();
sidecars_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecordStreamFile();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RecordStreamFile(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.hederahashgraph.api.proto.java.SemanticVersion.Builder subBuilder = null;
if (hapiProtoVersion_ != null) {
subBuilder = hapiProtoVersion_.toBuilder();
}
hapiProtoVersion_ = input.readMessage(com.hederahashgraph.api.proto.java.SemanticVersion.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hapiProtoVersion_);
hapiProtoVersion_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.hedera.services.stream.proto.HashObject.Builder subBuilder = null;
if (startObjectRunningHash_ != null) {
subBuilder = startObjectRunningHash_.toBuilder();
}
startObjectRunningHash_ = input.readMessage(com.hedera.services.stream.proto.HashObject.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(startObjectRunningHash_);
startObjectRunningHash_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
recordStreamItems_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
recordStreamItems_.add(
input.readMessage(com.hedera.services.stream.proto.RecordStreamItem.parser(), extensionRegistry));
break;
}
case 34: {
com.hedera.services.stream.proto.HashObject.Builder subBuilder = null;
if (endObjectRunningHash_ != null) {
subBuilder = endObjectRunningHash_.toBuilder();
}
endObjectRunningHash_ = input.readMessage(com.hedera.services.stream.proto.HashObject.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(endObjectRunningHash_);
endObjectRunningHash_ = subBuilder.buildPartial();
}
break;
}
case 40: {
blockNumber_ = input.readInt64();
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
sidecars_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
sidecars_.add(
input.readMessage(com.hedera.services.stream.proto.SidecarMetadata.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
recordStreamItems_ = java.util.Collections.unmodifiableList(recordStreamItems_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
sidecars_ = java.util.Collections.unmodifiableList(sidecars_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.services.stream.proto.RecordStreamFileOuterClass.internal_static_proto_RecordStreamFile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.services.stream.proto.RecordStreamFileOuterClass.internal_static_proto_RecordStreamFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.services.stream.proto.RecordStreamFile.class, com.hedera.services.stream.proto.RecordStreamFile.Builder.class);
}
public static final int HAPI_PROTO_VERSION_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.SemanticVersion hapiProtoVersion_;
/**
*
**
* Version of HAPI that was used to serialize the file.
*
*
* .proto.SemanticVersion hapi_proto_version = 1;
* @return Whether the hapiProtoVersion field is set.
*/
@java.lang.Override
public boolean hasHapiProtoVersion() {
return hapiProtoVersion_ != null;
}
/**
*
**
* Version of HAPI that was used to serialize the file.
*
**
* Running Hash of all RecordStreamItems before closing this file.
*
*
* .proto.HashObject end_object_running_hash = 4;
*/
@java.lang.Override
public com.hedera.services.stream.proto.HashObjectOrBuilder getEndObjectRunningHashOrBuilder() {
return getEndObjectRunningHash();
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 5;
private long blockNumber_;
/**
*
**
* The block number associated with this period.
*
*
* int64 block_number = 5;
* @return The blockNumber.
*/
@java.lang.Override
public long getBlockNumber() {
return blockNumber_;
}
public static final int SIDECARS_FIELD_NUMBER = 6;
private java.util.List sidecars_;
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
@java.lang.Override
public int getSidecarsCount() {
return sidecars_.size();
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
@java.lang.Override
public com.hedera.services.stream.proto.SidecarMetadataOrBuilder getSidecarsOrBuilder(
int index) {
return sidecars_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (hapiProtoVersion_ != null) {
output.writeMessage(1, getHapiProtoVersion());
}
if (startObjectRunningHash_ != null) {
output.writeMessage(2, getStartObjectRunningHash());
}
for (int i = 0; i < recordStreamItems_.size(); i++) {
output.writeMessage(3, recordStreamItems_.get(i));
}
if (endObjectRunningHash_ != null) {
output.writeMessage(4, getEndObjectRunningHash());
}
if (blockNumber_ != 0L) {
output.writeInt64(5, blockNumber_);
}
for (int i = 0; i < sidecars_.size(); i++) {
output.writeMessage(6, sidecars_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (hapiProtoVersion_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHapiProtoVersion());
}
if (startObjectRunningHash_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getStartObjectRunningHash());
}
for (int i = 0; i < recordStreamItems_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, recordStreamItems_.get(i));
}
if (endObjectRunningHash_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getEndObjectRunningHash());
}
if (blockNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, blockNumber_);
}
for (int i = 0; i < sidecars_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, sidecars_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.services.stream.proto.RecordStreamFile)) {
return super.equals(obj);
}
com.hedera.services.stream.proto.RecordStreamFile other = (com.hedera.services.stream.proto.RecordStreamFile) obj;
if (hasHapiProtoVersion() != other.hasHapiProtoVersion()) return false;
if (hasHapiProtoVersion()) {
if (!getHapiProtoVersion()
.equals(other.getHapiProtoVersion())) return false;
}
if (hasStartObjectRunningHash() != other.hasStartObjectRunningHash()) return false;
if (hasStartObjectRunningHash()) {
if (!getStartObjectRunningHash()
.equals(other.getStartObjectRunningHash())) return false;
}
if (!getRecordStreamItemsList()
.equals(other.getRecordStreamItemsList())) return false;
if (hasEndObjectRunningHash() != other.hasEndObjectRunningHash()) return false;
if (hasEndObjectRunningHash()) {
if (!getEndObjectRunningHash()
.equals(other.getEndObjectRunningHash())) return false;
}
if (getBlockNumber()
!= other.getBlockNumber()) return false;
if (!getSidecarsList()
.equals(other.getSidecarsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHapiProtoVersion()) {
hash = (37 * hash) + HAPI_PROTO_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getHapiProtoVersion().hashCode();
}
if (hasStartObjectRunningHash()) {
hash = (37 * hash) + START_OBJECT_RUNNING_HASH_FIELD_NUMBER;
hash = (53 * hash) + getStartObjectRunningHash().hashCode();
}
if (getRecordStreamItemsCount() > 0) {
hash = (37 * hash) + RECORD_STREAM_ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getRecordStreamItemsList().hashCode();
}
if (hasEndObjectRunningHash()) {
hash = (37 * hash) + END_OBJECT_RUNNING_HASH_FIELD_NUMBER;
hash = (53 * hash) + getEndObjectRunningHash().hashCode();
}
hash = (37 * hash) + BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNumber());
if (getSidecarsCount() > 0) {
hash = (37 * hash) + SIDECARS_FIELD_NUMBER;
hash = (53 * hash) + getSidecarsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.services.stream.proto.RecordStreamFile 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 com.hedera.services.stream.proto.RecordStreamFile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.services.stream.proto.RecordStreamFile 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 com.hedera.services.stream.proto.RecordStreamFile parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.services.stream.proto.RecordStreamFile parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.services.stream.proto.RecordStreamFile prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
**
* RecordStreamFile is used to serialize all RecordStreamItems that are part of the
* same period into record stream files.
* This structure represents a block in Hedera (HIP-415).
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public int getSidecarsCount() {
if (sidecarsBuilder_ == null) {
return sidecars_.size();
} else {
return sidecarsBuilder_.getCount();
}
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public Builder setSidecars(
int index, com.hedera.services.stream.proto.SidecarMetadata value) {
if (sidecarsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSidecarsIsMutable();
sidecars_.set(index, value);
onChanged();
} else {
sidecarsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public Builder addSidecars(com.hedera.services.stream.proto.SidecarMetadata value) {
if (sidecarsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSidecarsIsMutable();
sidecars_.add(value);
onChanged();
} else {
sidecarsBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public Builder addSidecars(
int index, com.hedera.services.stream.proto.SidecarMetadata value) {
if (sidecarsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSidecarsIsMutable();
sidecars_.add(index, value);
onChanged();
} else {
sidecarsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public com.hedera.services.stream.proto.SidecarMetadata.Builder getSidecarsBuilder(
int index) {
return getSidecarsFieldBuilder().getBuilder(index);
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public com.hedera.services.stream.proto.SidecarMetadataOrBuilder getSidecarsOrBuilder(
int index) {
if (sidecarsBuilder_ == null) {
return sidecars_.get(index); } else {
return sidecarsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
**
* List of the hashes of all the sidecar record files created for the same period.
* Allows multiple sidecar files to be linked to this RecordStreamFile.
*
*
* repeated .proto.SidecarMetadata sidecars = 6;
*/
public java.util.List
getSidecarsBuilderList() {
return getSidecarsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.services.stream.proto.SidecarMetadata, com.hedera.services.stream.proto.SidecarMetadata.Builder, com.hedera.services.stream.proto.SidecarMetadataOrBuilder>
getSidecarsFieldBuilder() {
if (sidecarsBuilder_ == null) {
sidecarsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.services.stream.proto.SidecarMetadata, com.hedera.services.stream.proto.SidecarMetadata.Builder, com.hedera.services.stream.proto.SidecarMetadataOrBuilder>(
sidecars_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
sidecars_ = null;
}
return sidecarsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.RecordStreamFile)
}
// @@protoc_insertion_point(class_scope:proto.RecordStreamFile)
private static final com.hedera.services.stream.proto.RecordStreamFile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.services.stream.proto.RecordStreamFile();
}
public static com.hedera.services.stream.proto.RecordStreamFile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecordStreamFile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RecordStreamFile(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.services.stream.proto.RecordStreamFile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}