// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
// @generated from file meshtastic/mqtt.proto (package meshtastic, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
import type { Config_DeviceConfig_Role, Config_LoRaConfig_ModemPreset, Config_LoRaConfig_RegionCode } from "./config_pb";
import { file_meshtastic_config } from "./config_pb";
import type { HardwareModel, MeshPacket } from "./mesh_pb";
import { file_meshtastic_mesh } from "./mesh_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file meshtastic/mqtt.proto.
 */
export const file_meshtastic_mqtt: GenFile = /*@__PURE__*/
  fileDesc("ChVtZXNodGFzdGljL21xdHQucHJvdG8SCm1lc2h0YXN0aWMiYQoPU2VydmljZUVudmVsb3BlEiYKBnBhY2tldBgBIAEoCzIWLm1lc2h0YXN0aWMuTWVzaFBhY2tldBISCgpjaGFubmVsX2lkGAIgASgJEhIKCmdhdGV3YXlfaWQYAyABKAki3wMKCU1hcFJlcG9ydBIRCglsb25nX25hbWUYASABKAkSEgoKc2hvcnRfbmFtZRgCIAEoCRIyCgRyb2xlGAMgASgOMiQubWVzaHRhc3RpYy5Db25maWcuRGV2aWNlQ29uZmlnLlJvbGUSKwoIaHdfbW9kZWwYBCABKA4yGS5tZXNodGFzdGljLkhhcmR3YXJlTW9kZWwSGAoQZmlybXdhcmVfdmVyc2lvbhgFIAEoCRI4CgZyZWdpb24YBiABKA4yKC5tZXNodGFzdGljLkNvbmZpZy5Mb1JhQ29uZmlnLlJlZ2lvbkNvZGUSPwoMbW9kZW1fcHJlc2V0GAcgASgOMikubWVzaHRhc3RpYy5Db25maWcuTG9SYUNvbmZpZy5Nb2RlbVByZXNldBIbChNoYXNfZGVmYXVsdF9jaGFubmVsGAggASgIEhIKCmxhdGl0dWRlX2kYCSABKA8SEwoLbG9uZ2l0dWRlX2kYCiABKA8SEAoIYWx0aXR1ZGUYCyABKAUSGgoScG9zaXRpb25fcHJlY2lzaW9uGAwgASgNEh4KFm51bV9vbmxpbmVfbG9jYWxfbm9kZXMYDSABKA0SIQoZaGFzX29wdGVkX3JlcG9ydF9sb2NhdGlvbhgOIAEoCEJgChRvcmcubWVzaHRhc3RpYy5wcm90b0IKTVFUVFByb3Rvc1oiZ2l0aHViLmNvbS9tZXNodGFzdGljL2dvL2dlbmVyYXRlZKoCFE1lc2h0YXN0aWMuUHJvdG9idWZzugIAYgZwcm90bzM", [file_meshtastic_config, file_meshtastic_mesh]);

/**
 *
 * This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
 *
 * @generated from message meshtastic.ServiceEnvelope
 */
export type ServiceEnvelope = Message<"meshtastic.ServiceEnvelope"> & {
  /**
   *
   * The (probably encrypted) packet
   *
   * @generated from field: meshtastic.MeshPacket packet = 1;
   */
  packet?: MeshPacket | undefined;

  /**
   *
   * The global channel ID it was sent on
   *
   * @generated from field: string channel_id = 2;
   */
  channelId: string;

  /**
   *
   * The sending gateway node ID. Can we use this to authenticate/prevent fake
   * nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as
   * the globally trusted nodenum
   *
   * @generated from field: string gateway_id = 3;
   */
  gatewayId: string;
};

/**
 * Describes the message meshtastic.ServiceEnvelope.
 * Use `create(ServiceEnvelopeSchema)` to create a new message.
 */
export const ServiceEnvelopeSchema: GenMessage<ServiceEnvelope> = /*@__PURE__*/
  messageDesc(file_meshtastic_mqtt, 0);

/**
 *
 * Information about a node intended to be reported unencrypted to a map using MQTT.
 *
 * @generated from message meshtastic.MapReport
 */
export type MapReport = Message<"meshtastic.MapReport"> & {
  /**
   *
   * A full name for this user, i.e. "Kevin Hester"
   *
   * @generated from field: string long_name = 1;
   */
  longName: string;

  /**
   *
   * A VERY short name, ideally two characters.
   * Suitable for a tiny OLED screen
   *
   * @generated from field: string short_name = 2;
   */
  shortName: string;

  /**
   *
   * Role of the node that applies specific settings for a particular use-case
   *
   * @generated from field: meshtastic.Config.DeviceConfig.Role role = 3;
   */
  role: Config_DeviceConfig_Role;

  /**
   *
   * Hardware model of the node, i.e. T-Beam, Heltec V3, etc...
   *
   * @generated from field: meshtastic.HardwareModel hw_model = 4;
   */
  hwModel: HardwareModel;

  /**
   *
   * Device firmware version string
   *
   * @generated from field: string firmware_version = 5;
   */
  firmwareVersion: string;

  /**
   *
   * The region code for the radio (US, CN, EU433, etc...)
   *
   * @generated from field: meshtastic.Config.LoRaConfig.RegionCode region = 6;
   */
  region: Config_LoRaConfig_RegionCode;

  /**
   *
   * Modem preset used by the radio (LongFast, MediumSlow, etc...)
   *
   * @generated from field: meshtastic.Config.LoRaConfig.ModemPreset modem_preset = 7;
   */
  modemPreset: Config_LoRaConfig_ModemPreset;

  /**
   *
   * Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
   * and it uses the default frequency slot given the region and modem preset.
   *
   * @generated from field: bool has_default_channel = 8;
   */
  hasDefaultChannel: boolean;

  /**
   *
   * Latitude: multiply by 1e-7 to get degrees in floating point
   *
   * @generated from field: sfixed32 latitude_i = 9;
   */
  latitudeI: number;

  /**
   *
   * Longitude: multiply by 1e-7 to get degrees in floating point
   *
   * @generated from field: sfixed32 longitude_i = 10;
   */
  longitudeI: number;

  /**
   *
   * Altitude in meters above MSL
   *
   * @generated from field: int32 altitude = 11;
   */
  altitude: number;

  /**
   *
   * Indicates the bits of precision for latitude and longitude set by the sending node
   *
   * @generated from field: uint32 position_precision = 12;
   */
  positionPrecision: number;

  /**
   *
   * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT)
   *
   * @generated from field: uint32 num_online_local_nodes = 13;
   */
  numOnlineLocalNodes: number;

  /**
   *
   * User has opted in to share their location (map report) with the mqtt server
   * Controlled by map_report.should_report_location
   *
   * @generated from field: bool has_opted_report_location = 14;
   */
  hasOptedReportLocation: boolean;
};

/**
 * Describes the message meshtastic.MapReport.
 * Use `create(MapReportSchema)` to create a new message.
 */
export const MapReportSchema: GenMessage<MapReport> = /*@__PURE__*/
  messageDesc(file_meshtastic_mqtt, 1);

