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

com.hedera.hapi.platform.event.legacy.EventDescriptor Maven / Gradle / Ivy

There is a newer version: 0.57.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: event/event_descriptor.proto

package com.hedera.hapi.platform.event.legacy;

/**
 * 
 **
 * Unique identifier for an event.
 * 
* * Protobuf type {@code com.hedera.hapi.platform.event.EventDescriptor} */ public final class EventDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:com.hedera.hapi.platform.event.EventDescriptor) EventDescriptorOrBuilder { private static final long serialVersionUID = 0L; // Use EventDescriptor.newBuilder() to construct. private EventDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private EventDescriptor() { hash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new EventDescriptor(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EventDescriptor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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: { hash_ = input.readBytes(); break; } case 16: { creatorNodeId_ = input.readInt64(); break; } case 24: { birthRound_ = input.readInt64(); break; } case 136: { generation_ = input.readInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hapi.platform.event.legacy.EventDescriptorOuterClass.internal_static_com_hedera_hapi_platform_event_EventDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hapi.platform.event.legacy.EventDescriptorOuterClass.internal_static_com_hedera_hapi_platform_event_EventDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hapi.platform.event.legacy.EventDescriptor.class, com.hedera.hapi.platform.event.legacy.EventDescriptor.Builder.class); } public static final int HASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString hash_; /** *
   **
   * The hash of the event.<br/>
   * The hash SHALL be a SHA-384 hash.<br/>
   * The hash SHALL have the following inputs, in the specified order:<br/>
   * 1. The bytes of the `EventCore` protobuf<br/>
   * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
   * 
* * bytes hash = 1; * @return The hash. */ @java.lang.Override public com.google.protobuf.ByteString getHash() { return hash_; } public static final int CREATOR_NODE_ID_FIELD_NUMBER = 2; private long creatorNodeId_; /** *
   **
   * The creator node identifier.<br/>
   * This SHALL be the unique identifier for the node that created the event.<br/>
   * This SHALL match the ID of the node as it appears in the address book.
   * 
* * int64 creator_node_id = 2; * @return The creatorNodeId. */ @java.lang.Override public long getCreatorNodeId() { return creatorNodeId_; } public static final int BIRTH_ROUND_FIELD_NUMBER = 3; private long birthRound_; /** *
   **
   * The birth round of the event.<br/>
   * The birth round SHALL be the pending consensus round at the time the event is created.<br/>
   * The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
   * 
* * int64 birth_round = 3; * @return The birthRound. */ @java.lang.Override public long getBirthRound() { return birthRound_; } public static final int GENERATION_FIELD_NUMBER = 17; private long generation_; /** *
   **
   * The generation of the event.<br/>
   * This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
   * 
* * int64 generation = 17; * @return The generation. */ @java.lang.Override public long getGeneration() { return generation_; } 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 (!hash_.isEmpty()) { output.writeBytes(1, hash_); } if (creatorNodeId_ != 0L) { output.writeInt64(2, creatorNodeId_); } if (birthRound_ != 0L) { output.writeInt64(3, birthRound_); } if (generation_ != 0L) { output.writeInt64(17, generation_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!hash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, hash_); } if (creatorNodeId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, creatorNodeId_); } if (birthRound_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, birthRound_); } if (generation_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(17, generation_); } 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.hapi.platform.event.legacy.EventDescriptor)) { return super.equals(obj); } com.hedera.hapi.platform.event.legacy.EventDescriptor other = (com.hedera.hapi.platform.event.legacy.EventDescriptor) obj; if (!getHash() .equals(other.getHash())) return false; if (getCreatorNodeId() != other.getCreatorNodeId()) return false; if (getBirthRound() != other.getBirthRound()) return false; if (getGeneration() != other.getGeneration()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + HASH_FIELD_NUMBER; hash = (53 * hash) + getHash().hashCode(); hash = (37 * hash) + CREATOR_NODE_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCreatorNodeId()); hash = (37 * hash) + BIRTH_ROUND_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBirthRound()); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getGeneration()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hapi.platform.event.legacy.EventDescriptor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor 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.hapi.platform.event.legacy.EventDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor 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.hapi.platform.event.legacy.EventDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor 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.hapi.platform.event.legacy.EventDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor 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.hapi.platform.event.legacy.EventDescriptor 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; } /** *
   **
   * Unique identifier for an event.
   * 
* * Protobuf type {@code com.hedera.hapi.platform.event.EventDescriptor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:com.hedera.hapi.platform.event.EventDescriptor) com.hedera.hapi.platform.event.legacy.EventDescriptorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hapi.platform.event.legacy.EventDescriptorOuterClass.internal_static_com_hedera_hapi_platform_event_EventDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hapi.platform.event.legacy.EventDescriptorOuterClass.internal_static_com_hedera_hapi_platform_event_EventDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hapi.platform.event.legacy.EventDescriptor.class, com.hedera.hapi.platform.event.legacy.EventDescriptor.Builder.class); } // Construct using com.hedera.hapi.platform.event.legacy.EventDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); hash_ = com.google.protobuf.ByteString.EMPTY; creatorNodeId_ = 0L; birthRound_ = 0L; generation_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hapi.platform.event.legacy.EventDescriptorOuterClass.internal_static_com_hedera_hapi_platform_event_EventDescriptor_descriptor; } @java.lang.Override public com.hedera.hapi.platform.event.legacy.EventDescriptor getDefaultInstanceForType() { return com.hedera.hapi.platform.event.legacy.EventDescriptor.getDefaultInstance(); } @java.lang.Override public com.hedera.hapi.platform.event.legacy.EventDescriptor build() { com.hedera.hapi.platform.event.legacy.EventDescriptor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hapi.platform.event.legacy.EventDescriptor buildPartial() { com.hedera.hapi.platform.event.legacy.EventDescriptor result = new com.hedera.hapi.platform.event.legacy.EventDescriptor(this); result.hash_ = hash_; result.creatorNodeId_ = creatorNodeId_; result.birthRound_ = birthRound_; result.generation_ = generation_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.hedera.hapi.platform.event.legacy.EventDescriptor) { return mergeFrom((com.hedera.hapi.platform.event.legacy.EventDescriptor)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hapi.platform.event.legacy.EventDescriptor other) { if (other == com.hedera.hapi.platform.event.legacy.EventDescriptor.getDefaultInstance()) return this; if (other.getHash() != com.google.protobuf.ByteString.EMPTY) { setHash(other.getHash()); } if (other.getCreatorNodeId() != 0L) { setCreatorNodeId(other.getCreatorNodeId()); } if (other.getBirthRound() != 0L) { setBirthRound(other.getBirthRound()); } if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.hedera.hapi.platform.event.legacy.EventDescriptor parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hedera.hapi.platform.event.legacy.EventDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * The hash of the event.<br/>
     * The hash SHALL be a SHA-384 hash.<br/>
     * The hash SHALL have the following inputs, in the specified order:<br/>
     * 1. The bytes of the `EventCore` protobuf<br/>
     * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
     * 
* * bytes hash = 1; * @return The hash. */ @java.lang.Override public com.google.protobuf.ByteString getHash() { return hash_; } /** *
     **
     * The hash of the event.<br/>
     * The hash SHALL be a SHA-384 hash.<br/>
     * The hash SHALL have the following inputs, in the specified order:<br/>
     * 1. The bytes of the `EventCore` protobuf<br/>
     * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
     * 
* * bytes hash = 1; * @param value The hash to set. * @return This builder for chaining. */ public Builder setHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } hash_ = value; onChanged(); return this; } /** *
     **
     * The hash of the event.<br/>
     * The hash SHALL be a SHA-384 hash.<br/>
     * The hash SHALL have the following inputs, in the specified order:<br/>
     * 1. The bytes of the `EventCore` protobuf<br/>
     * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
     * 
* * bytes hash = 1; * @return This builder for chaining. */ public Builder clearHash() { hash_ = getDefaultInstance().getHash(); onChanged(); return this; } private long creatorNodeId_ ; /** *
     **
     * The creator node identifier.<br/>
     * This SHALL be the unique identifier for the node that created the event.<br/>
     * This SHALL match the ID of the node as it appears in the address book.
     * 
* * int64 creator_node_id = 2; * @return The creatorNodeId. */ @java.lang.Override public long getCreatorNodeId() { return creatorNodeId_; } /** *
     **
     * The creator node identifier.<br/>
     * This SHALL be the unique identifier for the node that created the event.<br/>
     * This SHALL match the ID of the node as it appears in the address book.
     * 
* * int64 creator_node_id = 2; * @param value The creatorNodeId to set. * @return This builder for chaining. */ public Builder setCreatorNodeId(long value) { creatorNodeId_ = value; onChanged(); return this; } /** *
     **
     * The creator node identifier.<br/>
     * This SHALL be the unique identifier for the node that created the event.<br/>
     * This SHALL match the ID of the node as it appears in the address book.
     * 
* * int64 creator_node_id = 2; * @return This builder for chaining. */ public Builder clearCreatorNodeId() { creatorNodeId_ = 0L; onChanged(); return this; } private long birthRound_ ; /** *
     **
     * The birth round of the event.<br/>
     * The birth round SHALL be the pending consensus round at the time the event is created.<br/>
     * The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
     * 
* * int64 birth_round = 3; * @return The birthRound. */ @java.lang.Override public long getBirthRound() { return birthRound_; } /** *
     **
     * The birth round of the event.<br/>
     * The birth round SHALL be the pending consensus round at the time the event is created.<br/>
     * The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
     * 
* * int64 birth_round = 3; * @param value The birthRound to set. * @return This builder for chaining. */ public Builder setBirthRound(long value) { birthRound_ = value; onChanged(); return this; } /** *
     **
     * The birth round of the event.<br/>
     * The birth round SHALL be the pending consensus round at the time the event is created.<br/>
     * The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
     * 
* * int64 birth_round = 3; * @return This builder for chaining. */ public Builder clearBirthRound() { birthRound_ = 0L; onChanged(); return this; } private long generation_ ; /** *
     **
     * The generation of the event.<br/>
     * This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
     * 
* * int64 generation = 17; * @return The generation. */ @java.lang.Override public long getGeneration() { return generation_; } /** *
     **
     * The generation of the event.<br/>
     * This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
     * 
* * int64 generation = 17; * @param value The generation to set. * @return This builder for chaining. */ public Builder setGeneration(long value) { generation_ = value; onChanged(); return this; } /** *
     **
     * The generation of the event.<br/>
     * This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
     * 
* * int64 generation = 17; * @return This builder for chaining. */ public Builder clearGeneration() { generation_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:com.hedera.hapi.platform.event.EventDescriptor) } // @@protoc_insertion_point(class_scope:com.hedera.hapi.platform.event.EventDescriptor) private static final com.hedera.hapi.platform.event.legacy.EventDescriptor DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hapi.platform.event.legacy.EventDescriptor(); } public static com.hedera.hapi.platform.event.legacy.EventDescriptor getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public EventDescriptor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EventDescriptor(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.hapi.platform.event.legacy.EventDescriptor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy