/* tslint:disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

export type GeneratorVersion = string;
/**
 * Used to identify your application (Used in Android Play store for example)
 */
export type ApplicationBundleIdentifier = string;
export type Domain = string;
export type ApplicationDescription = string;
export type ApplicationName = string;
export type ApplicationVersion = string;
/**
 * Application home url
 */
export type DefaultPage = string;
export type SpplashImagePath = string;
export type Value = string | number;
export type Color = string | number;
export type ColorThemeList = ColorTheme[];
export type EnabledAndroidPlatform = boolean;
export type EnableIOSPlatform = boolean;
/**
 * Enabled Browser platform
 */
export type EnableBrowserSupport = boolean;
/**
 * Enable Progressive Web App (PWA) support
 */
export type PWA = boolean;
export type TapConnectionPage = Page & {
  type: Type;
  protocols: {
    mqtt?: MQTTOptions;
    socket?: SocketOptions;
    nfc?: NFCOptions;
    ble?: BLEOptions;
    [k: string]: any;
  };
  [k: string]: any;
};
/**
 * Disable this option to prevent page generation
 */
export type GenerateThisPage = boolean;
export type PageTitle = string;
/**
 * Page path used when loaded into a Browser
 */
export type PagePath = string;
/**
 * Generated source file path relatively to the application source directory. Use default value if your not sure.
 */
export type ProjectPath = string;
export type Type = string;
/**
 * Generate MQTT connection page
 */
export type EnableMQTT = boolean;
/**
 * Generate Socket/Websocket/Wifi connection page
 */
export type EnableSocket = boolean;
/**
 * Generate NFC connection page
 */
export type EnableNFC = boolean;
/**
 * Generate BLE connection page
 */
export type EnableBLE = boolean;
export type TapDevicePage = Page & {
  type: string;
  children?: {
    TapInfoPage?: TapInfoPage;
    MonitoringPage?: MonitoringPage;
    ProtocolConfigurationPage?: ProtocolConfigurationPage;
    TapLoginPage?: TapLoginPage;
    [k: string]: any;
  };
  [k: string]: any;
};
export type TapInfoPage = Page & {
  type: string;
  items?: TapInfoList;
  [k: string]: any;
};
export type TapInfo =
  | "serialNumber"
  | "modelName"
  | "appName"
  | "appPath"
  | "tapFirmwareVersion"
  | "configVersion"
  | "androidApplicationRecord"
  | "DataLogPacketCount"
  | "HostProtocol"
  | "TargetProtocol"
  | "tapManufacturer"
  | "CloudUploadPeriod"
  | "DataLogMaxPacketCount";
export type TapInfoList = {
  key: TapInfo;
  [k: string]: any;
}[];
export type MonitoringPage = Page & {
  type: string;
  children?: MonitoringDashboardPage[];
  [k: string]: any;
};
export type MonitoringDashboardPage = Page & {
  type: Type1;
  profileName?: ProfileName;
  content?: Layout;
  [k: string]: any;
};
export type Type1 = string;
/**
 * Restrict page access to the given profile
 */
export type ProfileName = string;
export type Layout = VerticalLayout | HorizontalLayout | GridLayout | CardLayout1 | ListLayout;
export type DashboardInnerElement =
  | VariableCard
  | VariableText
  | VariableGauge
  | VariableButtons
  | VariableRange
  | CardLayout;
export type VariableCard = TapVariableMonitorBaseComponent & {
  title?: Title;
  type: Type2;
  icon?: Icon;
  description?: Description;
  unit?: Unit;
  editable?: Editable;
  [k: string]: any;
};
export type Variable = string;
/**
 * Used when using array variable. Element index starts from 0
 */
export type VariableIndex = number;
/**
 * Card title
 */
export type Title = string;
/**
 * Full list here: https://ionicframework.com/docs/v3/ionicons/site_data.json
 */
export type Icon = string;
export type Description = string;
export type Unit = string;
/**
 * Check this if you want to be able to edit variable value
 */
export type Editable = boolean;
export type VariableText = TapVariableMonitorBaseComponent & {
  type: Type3;
  unit?: Unit1;
  editable?: Editable1;
  [k: string]: any;
};
export type Type3 = string;
export type Unit1 = string;
export type Editable1 = boolean;
export type VariableGauge = TapVariableMonitorBaseComponent & {
  type: Type4;
  min?: MinimumValue;
  max?: MaximumValue;
  unit?: Unit2;
  dynamicRange?: DynamicRange;
  [k: string]: any;
};
export type Type4 = string;
export type MinimumValue = number;
export type MaximumValue = number;
export type Unit2 = string;
/**
 * Check this option if you want the minimum and maximum gauge range to be redefined when values are out of the current range
 */
export type DynamicRange = boolean;
export type VariableButtons = TapVariableMonitorBaseComponent & {
  type: Type5;
  actions?: Actions;
  [k: string]: any;
};
export type Type5 = string;
/**
 * Button label
 */
export type Name = string;
/**
 * Value to send to the device when this button is clicked
 */
export type Value1 = string | number;
/**
 * Full list here: https://ionicframework.com/docs/v3/ionicons/site_data.json
 */
export type Icon1 = string;
export type Actions = {
  name?: Name;
  value?: Value1;
  icon?: Icon1;
  [k: string]: any;
}[];
export type VariableRange = TapVariableMonitorBaseComponent & {
  type: Type6;
  disabled?: Disabled;
  min?: MinimalValue;
  max?: MaximalValue;
  step?: ValueStep;
  [k: string]: any;
};
export type Type6 = string;
export type Disabled = boolean;
export type MinimalValue = number;
export type MaximalValue = number;
export type ValueStep = number;
export type Title1 = string;
/**
 * Full list here: https://ionicframework.com/docs/v3/ionicons/site_data.json
 */
export type Icon2 = string;
export type Description1 = string;
export type TapVariableMonitorComponents = Card | Text | Gauge | Buttons | Toggle | Range;
export type Card = TapVariableMonitorBaseComponent & {
  title?: Title;
  type: Type2;
  icon?: Icon;
  description?: Description;
  unit?: Unit;
  editable?: Editable;
  [k: string]: any;
};
export type Text = TapVariableMonitorBaseComponent & {
  type: Type3;
  unit?: Unit1;
  editable?: Editable1;
  [k: string]: any;
};
export type Gauge = TapVariableMonitorBaseComponent & {
  type: Type4;
  min?: MinimumValue;
  max?: MaximumValue;
  unit?: Unit2;
  dynamicRange?: DynamicRange;
  [k: string]: any;
};
export type Buttons = TapVariableMonitorBaseComponent & {
  type: Type5;
  actions?: Actions;
  [k: string]: any;
};
export type Toggle = TapVariableMonitorBaseComponent & {
  type: Type7;
  conditionOn?: ConditionOn;
  editable?: Editable2;
  [k: string]: any;
};
export type Type7 = string;
/**
 * You can insert a Typescript expression here that must return true when toggle button is on.
 */
export type ConditionOn = string;
export type Editable2 = boolean;
export type Range = TapVariableMonitorBaseComponent & {
  type: Type6;
  disabled?: Disabled;
  min?: MinimalValue;
  max?: MaximalValue;
  step?: ValueStep;
  [k: string]: any;
};
export type Content = TapVariableMonitorComponents[];
export type Elements = DashboardInnerElement[];
export type Elements1 = DashboardInnerElement[];
/**
 * Column number per row
 */
export type Cols = number;
export type Elements2 = DashboardInnerElement[];
export type ProtocolConfigurationPage = Page & {
  type: Type8;
  serialSettings?: SerialSettings;
  modbusSettings?: ModbusSettings;
  tapnpassSettings?: TapNPassSettings;
  [k: string]: any;
};
export type Type8 = string;
/**
 * Generate serial settings options
 */
export type SerialSettings = boolean;
/**
 * Generate modbus settings options
 */
export type ModbusSettings = boolean;
/**
 * Generate tapnpass settings options
 */
export type TapNPassSettings = boolean;
export type TapLoginPage = Page & {
  type: Type9;
  [k: string]: any;
};
export type Type9 = string;
export type AboutPage = Page & {
  type: Type10;
  items?: Informations;
  [k: string]: any;
};
export type Type10 = string;
export type Title2 = string;
export type Value2 = string;
/**
 * List of key/value information pair to display on this page
 */
export type Informations = KeyValueInfo[];
export type NotFoundPage = Page & {
  type: Type11;
  [k: string]: any;
};
export type Type11 = string;
export type Title3 = string;
export type Url = string;
/**
 * Full list here: https://ionicframework.com/docs/v3/ionicons/site_data.json
 */
export type Icon3 = string;
export type Title4 = string;
export type Url1 = string;
/**
 * Full list here: https://ionicframework.com/docs/v3/ionicons/site_data.json
 */
export type Icon4 = string;
export type SubMenu = SubMenuItem[];
export type ShowAdvanceFormSettings = boolean;

export interface TapAppGeneratorSchema {
  version: Version;
  app: App;
  formMeta?: FormMeta;
  [k: string]: any;
}
export interface Version {
  generator?: GeneratorVersion;
  [k: string]: any;
}
export interface App {
  id: ApplicationBundleIdentifier;
  domain: Domain;
  description?: ApplicationDescription;
  name: ApplicationName;
  version: ApplicationVersion;
  defaultPage?: DefaultPage;
  logo?: Logo;
  splashScreen?: SplashScreen;
  theme?: Theme;
  platforms: {
    android?: AndroidPlatform;
    ios?: IOSPlatform;
    browser?: BrowserPlatform;
    [k: string]: any;
  };
  pages: {
    TapConnectionPage?: TapConnectionPage;
    TapDevicePage?: TapDevicePage;
    AboutPage?: AboutPage;
    NotFoundPage?: NotFoundPage;
    [k: string]: any;
  };
  menu: MenuItem[];
  [k: string]: any;
}
export interface Logo {
  /**
   * Logo file
   */
  image?: string;
  [k: string]: any;
}
export interface SplashScreen {
  image?: SpplashImagePath;
  [k: string]: any;
}
export interface Theme {
  colors: ColorThemeList;
  [k: string]: any;
}
export interface ColorTheme {
  name: string;
  value: Value;
  tint?: Color;
  contrast?: Color;
  shade?: Color;
  [k: string]: any;
}
export interface AndroidPlatform {
  enabled?: EnabledAndroidPlatform;
  [k: string]: any;
}
export interface IOSPlatform {
  enabled?: EnableIOSPlatform;
  [k: string]: any;
}
export interface BrowserPlatform {
  enabled?: EnableBrowserSupport;
  PWA?: PWA;
  [k: string]: any;
}
export interface Page {
  enabled: GenerateThisPage;
  pageTitle: PageTitle;
  path: PagePath;
  projectPath: ProjectPath;
  [k: string]: any;
}
export interface MQTTOptions {
  enabled?: EnableMQTT;
  [k: string]: any;
}
export interface SocketOptions {
  enabled?: EnableSocket;
  [k: string]: any;
}
export interface NFCOptions {
  enabled?: EnableNFC;
  [k: string]: any;
}
export interface BLEOptions {
  enabled?: EnableBLE;
  [k: string]: any;
}
export interface VerticalLayout {
  type: string;
  elements?: Elements;
  [k: string]: any;
}
export interface TapVariableMonitorBaseComponent {
  variable: Variable;
  variableIndex?: VariableIndex;
  [k: string]: any;
}
export interface Type2 {
  [k: string]: any;
}
export interface CardLayout {
  type: string;
  title: Title1;
  icon?: Icon2;
  description?: Description1;
  content?: Content;
  [k: string]: any;
}
export interface HorizontalLayout {
  type: string;
  elements?: Elements1;
  [k: string]: any;
}
export interface GridLayout {
  cols: Cols;
  type: string;
  elements?: Elements2;
  [k: string]: any;
}
export interface CardLayout1 {
  type: string;
  title: Title1;
  icon?: Icon2;
  description?: Description1;
  content?: Content;
  [k: string]: any;
}
export interface ListLayout {
  type: string;
  items?: ListLayoutItem[];
  [k: string]: any;
}
export interface ListLayoutItem {
  title?: string;
  value?: DashboardInnerElement;
  [k: string]: any;
}
export interface KeyValueInfo {
  title: Title2;
  value: Value2;
  [k: string]: any;
}
export interface MenuItem {
  title: Title3;
  url: Url;
  icon?: Icon3;
  children?: SubMenu;
  [k: string]: any;
}
export interface SubMenuItem {
  title: Title4;
  url: Url1;
  icon?: Icon4;
  [k: string]: any;
}
export interface FormMeta {
  showAdvanceSettings?: ShowAdvanceFormSettings;
  [k: string]: any;
}
