syntax = "proto3";
package mapeo;

import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

message Observation_4 {
  bytes id = 1;
  google.protobuf.Timestamp created_at = 4;
  optional google.protobuf.Timestamp timestamp = 5;
  optional string userId = 6;
  optional string deviceId = 7;
  repeated string links = 8;
  optional float lat = 9;
  optional float lon = 10;
  repeated google.protobuf.Struct refs = 11;
  repeated google.protobuf.Struct attachments = 12;
  optional google.protobuf.Struct tags = 13;
  message Metadata {
    optional bool manual_location = 1;

    message Position {
      float timestamp = 1;
      bool mocked = 2;

      message Coords {
        float altitude = 1;
        float heading = 2;
        float longitude = 3;
        float latitude = 4;
        float speed = 5;
        float acurracy = 6;
      }
      optional Coords coords = 3;
    }

    message PositionProvider {
      bool gpsAvailable = 1;
      bool passiveAvailable = 2;
      bool locationServicesEnabled = 3;
      bool networkAvailable = 4;
    }
    optional Position position = 3;
    optional Position lastSavedPosition = 4;
    optional PositionProvider positionProvider = 5;
  }
  optional Metadata metadata = 14;
}
