import { ObjectSchema, TypeCode } from "pip-services3-commons-nodex"; export class CurrentPostStateV1Schema extends ObjectSchema { public constructor() { super(); this.withRequiredProperty("id", TypeCode.String); // Same as post ID this.withOptionalProperty("patrol_id", TypeCode.String); this.withRequiredProperty("updated", TypeCode.DateTime); // Date and time of the last update this.withOptionalProperty("status", TypeCode.String); // Status string from the drop this.withRequiredProperty("long", TypeCode.Double); // Post longitude this.withOptionalProperty("lat", TypeCode.Double); // Post latitude this.withOptionalProperty("alt", TypeCode.Double); // Post altitude (m) this.withOptionalProperty("pitch", TypeCode.Double); // Post vertical angle (deg) this.withOptionalProperty("yaw", TypeCode.Double); // Post horizontal angle (deg) this.withOptionalProperty("roll", TypeCode.Double); // Post rotation angle (deg) this.withOptionalProperty("cam_pitch", TypeCode.Double); // Camera vertical angle this.withOptionalProperty("cam_yaw", TypeCode.Double); // Camera horizontal angle this.withOptionalProperty("video_pitch", TypeCode.Double); // Post + camera vertical angle this.withOptionalProperty("video_yaw", TypeCode.Double); // Post + camera horizontal angle this.withOptionalProperty("charge", TypeCode.Double); // Battery charge or fuel level (%) this.withOptionalProperty("temp", TypeCode.Double); // Temperature (C) this.withOptionalProperty("last_cmd", TypeCode.Double); // Last command type this.withOptionalProperty("last_sent", TypeCode.Double); // Date and time of the last command this.withOptionalProperty("dest_long", TypeCode.Double); // Current destination longitude this.withOptionalProperty("dest_lat", TypeCode.Double); // Current destination latitude this.withOptionalProperty("dest_alt", TypeCode.Double); // Current destination altitude (m) this.withOptionalProperty("extra", null); } }