#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;
use super::common::*;
use super::kbfs_common::*;
pub type OpID = Vec<u8>;
pub type KBFSRevision = i64;
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum KBFSArchivedType {
Revision_0,
Time_1,
Time_string_2,
Rel_time_string_3,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum KBFSArchivedParam {
Revision {revision: KBFSRevision},
Time {time: Time},
Time_string {time_string: String},
Rel_time_string {rel_time_string: String},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct KBFSArchivedPath {
#[serde(default)]
pub path: Option<String>,
pub archivedParam: Option<KBFSArchivedParam>,
pub identifyBehavior: Option<TLFIdentifyBehavior>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct KBFSPath {
#[serde(default)]
pub path: Option<String>,
pub identifyBehavior: Option<TLFIdentifyBehavior>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum PathType {
Local_0,
Kbfs_1,
Kbfs_archived_2,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum Path {
Local {local: String},
Kbfs {kbfs: KBFSPath},
Kbfs_archived {kbfs_archived: KBFSArchivedPath},
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum DirentType {
File_0,
Dir_1,
Sym_2,
Exec_3,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum PrefetchStatus {
Not_started_0,
In_progress_1,
Complete_2,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PrefetchProgress {
pub start: Option<Time>,
pub endEstimate: Option<Time>,
pub bytesTotal: Option<i64>,
pub bytesFetched: Option<i64>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct Dirent {
pub time: Option<Time>,
pub size: Option<i32>,
#[serde(default)]
pub name: Option<String>,
pub direntType: Option<DirentType>,
pub lastWriterUnverified: Option<User>,
#[serde(default)]
pub writable: Option<bool>,
pub prefetchStatus: Option<PrefetchStatus>,
pub prefetchProgress: Option<PrefetchProgress>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct DirentWithRevision {
pub entry: Option<Dirent>,
pub revision: Option<KBFSRevision>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum RevisionSpanType {
Default_0,
Last_five_1,
}
pub type ErrorNum = i32;
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum OpenFlags {
Read_0,
Replace_1,
Existing_2,
Write_4,
Append_8,
Directory_16,
}
pub type Progress = i32;
#[derive(Serialize, Deserialize, Debug)]
pub struct SimpleFSListResult {
#[serde(default)]
pub entries: Option<Vec<Dirent>>,
pub progress: Option<Progress>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FileContent {
#[serde(default)]
pub data: Option<String>,
pub progress: Option<Progress>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum AsyncOps {
List_0,
List_recursive_1,
Read_2,
Write_3,
Copy_4,
Move_5,
Remove_6,
List_recursive_to_depth_7,
Get_revisions_8,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ListFilter {
No_filter_0,
Filter_all_hidden_1,
Filter_system_hidden_2,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ListArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
pub filter: Option<ListFilter>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ListToDepthArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
pub filter: Option<ListFilter>,
pub depth: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RemoveArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
#[serde(default)]
pub recursive: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ReadArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
pub offset: Option<i64>,
pub size: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct WriteArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
pub offset: Option<i64>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct CopyArgs {
pub opID: Option<OpID>,
pub src: Option<Path>,
pub dest: Option<Path>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MoveArgs {
pub opID: Option<OpID>,
pub src: Option<Path>,
pub dest: Option<Path>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetRevisionsArgs {
pub opID: Option<OpID>,
pub path: Option<Path>,
pub spanType: Option<RevisionSpanType>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum OpDescription {
List {list: ListArgs},
List_recursive {list_recursive: ListArgs},
List_recursive_to_depth {list_recursive_to_depth: ListToDepthArgs},
Read {read: ReadArgs},
Write {write: WriteArgs},
Copy {copy: CopyArgs},
Move {r#move: MoveArgs},
Remove {remove: RemoveArgs},
Get_revisions {get_revisions: GetRevisionsArgs},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetRevisionsResult {
#[serde(default)]
pub revisions: Option<Vec<DirentWithRevision>>,
pub progress: Option<Progress>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct OpProgress {
pub start: Option<Time>,
pub endEstimate: Option<Time>,
pub opType: Option<AsyncOps>,
pub bytesTotal: Option<i64>,
pub bytesRead: Option<i64>,
pub bytesWritten: Option<i64>,
pub filesTotal: Option<i64>,
pub filesRead: Option<i64>,
pub filesWritten: Option<i64>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SimpleFSGetHTTPAddressAndTokenResponse {
#[serde(default)]
pub address: Option<String>,
#[serde(default)]
pub token: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SimpleFSQuotaUsage {
pub usageBytes: Option<i64>,
pub archiveBytes: Option<i64>,
pub limitBytes: Option<i64>,
pub gitUsageBytes: Option<i64>,
pub gitArchiveBytes: Option<i64>,
pub gitLimitBytes: Option<i64>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum FolderSyncMode {
Disabled_0,
Enabled_1,
Partial_2,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FolderSyncConfig {
pub mode: Option<FolderSyncMode>,
#[serde(default)]
pub paths: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FolderSyncConfigAndStatus {
pub config: Option<FolderSyncConfig>,
pub status: Option<FolderSyncStatus>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FolderSyncConfigAndStatusWithFolder {
pub folder: Option<Folder>,
pub config: Option<FolderSyncConfig>,
pub status: Option<FolderSyncStatus>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SyncConfigAndStatusRes {
#[serde(default)]
pub folders: Option<Vec<FolderSyncConfigAndStatusWithFolder>>,
pub overallStatus: Option<FolderSyncStatus>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FSSettings {
pub spaceAvailableNotificationThreshold: Option<i64>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SimpleFSStats {
pub processStats: Option<ProcessRuntimeStats>,
#[serde(default)]
pub blockCacheDbStats: Option<Vec<String>>,
#[serde(default)]
pub syncCacheDbStats: Option<Vec<String>>,
#[serde(default)]
pub runtimeDbStats: Option<Vec<DbStats>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum SubscriptionTopic {
Favorites_0,
Journal_status_1,
Online_status_2,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum PathSubscriptionTopic {
Children_0,
Stat_1,
}