import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto2 } from "@bufbuild/protobuf";
/**
 * @generated from message io.github.hamok.dev.schema.HamokMessage
 */
export declare class HamokMessage extends Message<HamokMessage> {
    /**
     * @generated from field: optional io.github.hamok.dev.schema.HamokMessage.MessageProtocol protocol = 1;
     */
    protocol?: HamokMessage_MessageProtocol;
    /**
     * @generated from field: optional io.github.hamok.dev.schema.HamokMessage.MessageType type = 2;
     */
    type?: HamokMessage_MessageType;
    /**
     * @generated from field: optional string sourceId = 3;
     */
    sourceId?: string;
    /**
     * @generated from field: optional string destinationId = 4;
     */
    destinationId?: string;
    /**
     * @generated from field: optional string storageId = 5;
     */
    storageId?: string;
    /**
     * @generated from field: optional string requestId = 6;
     */
    requestId?: string;
    /**
     * @generated from field: optional uint64 timestamp = 7;
     */
    timestamp?: bigint;
    /**
     * @generated from field: optional int32 storageSize = 8;
     */
    storageSize?: number;
    /**
     * @generated from field: repeated bytes keys = 10;
     */
    keys: Uint8Array[];
    /**
     * @generated from field: repeated bytes values = 11;
     */
    values: Uint8Array[];
    /**
     * @generated from field: repeated string activeEndpointIds = 12;
     */
    activeEndpointIds: string[];
    /**
     * @generated from field: repeated io.github.hamok.dev.schema.HamokMessage embeddedMessages = 13;
     */
    embeddedMessages: HamokMessage[];
    /**
     * @generated from field: optional bool success = 14;
     */
    success?: boolean;
    /**
     * @generated from field: optional bool executeSync = 15;
     */
    executeSync?: boolean;
    /**
     * @generated from field: optional string raftLeaderId = 16;
     */
    raftLeaderId?: string;
    /**
     * @generated from field: optional int32 raftNumberOfLogs = 17;
     */
    raftNumberOfLogs?: number;
    /**
     * @generated from field: optional int32 raftLastAppliedIndex = 18;
     */
    raftLastAppliedIndex?: number;
    /**
     * @generated from field: optional int32 raftCommitIndex = 19;
     */
    raftCommitIndex?: number;
    /**
     * @generated from field: optional int32 raftLeaderNextIndex = 20;
     */
    raftLeaderNextIndex?: number;
    /**
     * @generated from field: optional int32 raftPrevLogTerm = 21;
     */
    raftPrevLogTerm?: number;
    /**
     * @generated from field: optional int32 raftPrevLogIndex = 22;
     */
    raftPrevLogIndex?: number;
    /**
     * @generated from field: optional int32 raftTerm = 23;
     */
    raftTerm?: number;
    /**
     * @generated from field: optional int32 raftPeerNextIndex = 24;
     */
    raftPeerNextIndex?: number;
    /**
     * @generated from field: optional string raftCandidateId = 25;
     */
    raftCandidateId?: string;
    /**
     * @generated from field: optional int32 sequence = 26;
     */
    sequence?: number;
    /**
     * @generated from field: optional bool lastMessage = 27;
     */
    lastMessage?: boolean;
    /**
     * @generated from field: optional bytes prevValue = 28;
     */
    prevValue?: Uint8Array;
    /**
     * @generated from field: optional bytes snapshot = 29;
     */
    snapshot?: Uint8Array;
    constructor(data?: PartialMessage<HamokMessage>);
    static readonly runtime: typeof proto2;
    static readonly typeName = "io.github.hamok.dev.schema.HamokMessage";
    static readonly fields: FieldList;
    static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HamokMessage;
    static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HamokMessage;
    static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HamokMessage;
    static equals(a: HamokMessage | PlainMessage<HamokMessage> | undefined, b: HamokMessage | PlainMessage<HamokMessage> | undefined): boolean;
}
/**
 * @generated from enum io.github.hamok.dev.schema.HamokMessage.MessageType
 */
export declare enum HamokMessage_MessageType {
    /**
     * *
     * Hello notifications are sent by every endpoint in order to inform every other endpoint
     * about the existance.
     *
     * @generated from enum value: HELLO_NOTIFICATION = 1;
     */
    HELLO_NOTIFICATION = 1,
    /**
     * *
     * Endpoint states are sent by the leader of the grid.
     * Endpoint state contains information about active and inactive endpoints, so every endpoint can keep up to date
     * about the remote endpoints
     *
     * @generated from enum value: ENDPOINT_STATES_NOTIFICATION = 2;
     */
    ENDPOINT_STATES_NOTIFICATION = 2,
    /**
     * *
     * Inform endpoint about the requests currently ongoing and prevent the requester to timeout those.
     * (fetching took more time than time requestTimeout)
     *
     * @generated from enum value: ONGOING_REQUESTS_NOTIFICATION = 3;
     */
    ONGOING_REQUESTS_NOTIFICATION = 3,
    /**
     * *
     * Join notification is sent by a new endpoint to every other endpoint
     * in order to join the grid
     *
     * @generated from enum value: JOIN_NOTIFICATION = 4;
     */
    JOIN_NOTIFICATION = 4,
    /**
     * *
     * Raft Vote request is sent by a raccoon made itself a candidate
     * in order to be a leader of the cluster
     *
     * @generated from enum value: RAFT_VOTE_REQUEST = 12;
     */
    RAFT_VOTE_REQUEST = 12,
    /**
     * *
     * Raft Vote Response is a response to a vote request
     * contain if the voting is succeeded or not
     *
     * @generated from enum value: RAFT_VOTE_RESPONSE = 13;
     */
    RAFT_VOTE_RESPONSE = 13,
    /**
     * *
     * Raft Append entries chunk is sent by the leader to followers in a cluster
     * for heartbeat and log distribution purposes
     *
     * @generated from enum value: RAFT_APPEND_ENTRIES_REQUEST_CHUNK = 16;
     */
    RAFT_APPEND_ENTRIES_REQUEST_CHUNK = 16,
    /**
     * *
     * Raft Append entries response is sent by a follower to the leader
     * in order to inform the leader about the acceptance of the append request
     *
     * @generated from enum value: RAFT_APPEND_ENTRIES_RESPONSE = 17;
     */
    RAFT_APPEND_ENTRIES_RESPONSE = 17,
    /**
     * *
     * Submit request is sent by any endpoint to the leader of the cluster
     * in order to push a log entry to the Raft processed by Raccoons.
     *
     * @generated from enum value: SUBMIT_MESSAGE_REQUEST = 20;
     */
    SUBMIT_MESSAGE_REQUEST = 20,
    /**
     * *
     * Submit response is a response from a leader endpoint to the follower
     * inform about the success or failure correspondent to the request
     *
     * @generated from enum value: SUBMIT_MESSAGE_RESPONSE = 21;
     */
    SUBMIT_MESSAGE_RESPONSE = 21,
    /**
     * *
     * Request to clear the storage
     *
     * @generated from enum value: CLEAR_ENTRIES_REQUEST = 24;
     */
    CLEAR_ENTRIES_REQUEST = 24,
    /**
     * *
     * Response about the cleared storage
     *
     * @generated from enum value: CLEAR_ENTRIES_RESPONSE = 25;
     */
    CLEAR_ENTRIES_RESPONSE = 25,
    /**
     * *
     * Clear entries notification
     *
     * @generated from enum value: CLEAR_ENTRIES_NOTIFICATION = 26;
     */
    CLEAR_ENTRIES_NOTIFICATION = 26,
    /**
     * *
     * Request entries from remote endpoint(s).
     *
     * @generated from enum value: GET_ENTRIES_REQUEST = 28;
     */
    GET_ENTRIES_REQUEST = 28,
    /**
     * *
     * Response to a gen entries request contain the found entries
     *
     * @generated from enum value: GET_ENTRIES_RESPONSE = 29;
     */
    GET_ENTRIES_RESPONSE = 29,
    /**
     * *
     * Request the size of a storage
     *
     * @generated from enum value: GET_SIZE_REQUEST = 32;
     */
    GET_SIZE_REQUEST = 32,
    /**
     * *
     * Response to size request
     *
     * @generated from enum value: GET_SIZE_RESPONSE = 33;
     */
    GET_SIZE_RESPONSE = 33,
    /**
     * *
     * Request all the keys a storage on a remote endpoint(s) has.
     *
     * @generated from enum value: GET_KEYS_REQUEST = 36;
     */
    GET_KEYS_REQUEST = 36,
    /**
     * *
     * Response to a keys request contain all the keys an endpoint has
     *
     * @generated from enum value: GET_KEYS_RESPONSE = 37;
     */
    GET_KEYS_RESPONSE = 37,
    /**
     * *
     * Request to delete entries on a remote endpoint
     *
     * @generated from enum value: DELETE_ENTRIES_REQUEST = 40;
     */
    DELETE_ENTRIES_REQUEST = 40,
    /**
     * *
     * Response to a delete request
     *
     * @generated from enum value: DELETE_ENTRIES_RESPONSE = 41;
     */
    DELETE_ENTRIES_RESPONSE = 41,
    /**
     * *
     * Notification about deleting
     *
     * @generated from enum value: DELETE_ENTRIES_NOTIFICATION = 42;
     */
    DELETE_ENTRIES_NOTIFICATION = 42,
    /**
     * *
     * Request to delete entries on a remote endpoint
     *
     * @generated from enum value: REMOVE_ENTRIES_REQUEST = 44;
     */
    REMOVE_ENTRIES_REQUEST = 44,
    /**
     * *
     * Response to a delete request
     *
     * @generated from enum value: REMOVE_ENTRIES_RESPONSE = 45;
     */
    REMOVE_ENTRIES_RESPONSE = 45,
    /**
     * *
     * Notification to remove specific entries from the storage.
     * the difference between delete and remove that remove send the values
     * specifically need to be removed and delete only send the keys. It is useful for distributed collections
     *
     *
     * @generated from enum value: REMOVE_ENTRIES_NOTIFICATION = 46;
     */
    REMOVE_ENTRIES_NOTIFICATION = 46,
    /**
     * *
     * Notification about the removed entries
     *
     * @generated from enum value: ENTRIES_REMOVED_NOTIFICATION = 47;
     */
    ENTRIES_REMOVED_NOTIFICATION = 47,
    /**
     * *
     * Insert item(s) only if they don't exist. if they
     * exist then it returns with the value associated
     *
     * NOTE: Only the storage entries replicated by a
     * distributed and coordinated way like by a Raft algorithm
     * can guarantee that insert is atomic
     *
     *
     * @generated from enum value: INSERT_ENTRIES_REQUEST = 52;
     */
    INSERT_ENTRIES_REQUEST = 52,
    /**
     * *
     * Response to insert requests
     *
     * @generated from enum value: INSERT_ENTRIES_RESPONSE = 53;
     */
    INSERT_ENTRIES_RESPONSE = 53,
    /**
     * *
     * Notification about an insert operation.
     *
     * @generated from enum value: INSERT_ENTRIES_NOTIFICATION = 54;
     */
    INSERT_ENTRIES_NOTIFICATION = 54,
    /**
     * *
     * Notification about the inserted entries
     *
     * @generated from enum value: ENTRIES_INSERTED_NOTIFICATION = 55;
     */
    ENTRIES_INSERTED_NOTIFICATION = 55,
    /**
     * *
     * Request an update from a remote storage
     *
     * @generated from enum value: UPDATE_ENTRIES_REQUEST = 56;
     */
    UPDATE_ENTRIES_REQUEST = 56,
    /**
     * *
     * Response to an update request
     *
     * @generated from enum value: UPDATE_ENTRIES_RESPONSE = 57;
     */
    UPDATE_ENTRIES_RESPONSE = 57,
    /**
     * *
     * Notification about the update
     *
     * @generated from enum value: UPDATE_ENTRIES_NOTIFICATION = 58;
     */
    UPDATE_ENTRIES_NOTIFICATION = 58,
    /**
     * *
     * Notification about the updated entries
     *
     * @generated from enum value: ENTRY_UPDATED_NOTIFICATION = 59;
     */
    ENTRY_UPDATED_NOTIFICATION = 59,
    /**
     * *
     * Notification about the applied commit
     *
     * @generated from enum value: STORAGE_APPLIED_COMMIT_NOTIFICATION = 60;
     */
    STORAGE_APPLIED_COMMIT_NOTIFICATION = 60,
    /**
     * *
     * Notification from an endpoint created a storage and wants to join to the grid
     *
     * @generated from enum value: STORAGE_HELLO_NOTIFICATION = 61;
     */
    STORAGE_HELLO_NOTIFICATION = 61,
    /**
     * *
     * Notification about the state of the storage as a response for the hello notification
     *
     * @generated from enum value: STORAGE_STATE_NOTIFICATION = 62;
     */
    STORAGE_STATE_NOTIFICATION = 62
}
/**
 * @generated from enum io.github.hamok.dev.schema.HamokMessage.MessageProtocol
 */
export declare enum HamokMessage_MessageProtocol {
    /**
     * *
     * Messages should be interpreted by a grid client
     *
     * @generated from enum value: GRID_COMMUNICATION_PROTOCOL = 1;
     */
    GRID_COMMUNICATION_PROTOCOL = 1,
    /**
     * *
     * Messages should be interpreted by a Raft implementation
     *
     * @generated from enum value: RAFT_COMMUNICATION_PROTOCOL = 2;
     */
    RAFT_COMMUNICATION_PROTOCOL = 2,
    /**
     * *
     * Messages should be interpreted by a specific storage
     *
     * @generated from enum value: STORAGE_COMMUNICATION_PROTOCOL = 3;
     */
    STORAGE_COMMUNICATION_PROTOCOL = 3
}
//# sourceMappingURL=HamokMessage.d.ts.map