// Auto-generated by avdl-compiler v1.3.12 (https://github.com/keybase/node-avdl-compiler)
//   Input file: avdl/keybase1/kbfs_common.avdl

package keybase1

import (
	"github.com/keybase/go-framed-msgpack-rpc/rpc"
)

type FSStatusCode int

const (
	FSStatusCode_START  FSStatusCode = 0
	FSStatusCode_FINISH FSStatusCode = 1
	FSStatusCode_ERROR  FSStatusCode = 2
)

var FSStatusCodeMap = map[string]FSStatusCode{
	"START":  0,
	"FINISH": 1,
	"ERROR":  2,
}

var FSStatusCodeRevMap = map[FSStatusCode]string{
	0: "START",
	1: "FINISH",
	2: "ERROR",
}

func (e FSStatusCode) String() string {
	if v, ok := FSStatusCodeRevMap[e]; ok {
		return v
	}
	return ""
}

type FSNotificationType int

const (
	FSNotificationType_ENCRYPTING      FSNotificationType = 0
	FSNotificationType_DECRYPTING      FSNotificationType = 1
	FSNotificationType_SIGNING         FSNotificationType = 2
	FSNotificationType_VERIFYING       FSNotificationType = 3
	FSNotificationType_REKEYING        FSNotificationType = 4
	FSNotificationType_CONNECTION      FSNotificationType = 5
	FSNotificationType_MD_READ_SUCCESS FSNotificationType = 6
	FSNotificationType_FILE_CREATED    FSNotificationType = 7
	FSNotificationType_FILE_MODIFIED   FSNotificationType = 8
	FSNotificationType_FILE_DELETED    FSNotificationType = 9
	FSNotificationType_FILE_RENAMED    FSNotificationType = 10
)

var FSNotificationTypeMap = map[string]FSNotificationType{
	"ENCRYPTING":      0,
	"DECRYPTING":      1,
	"SIGNING":         2,
	"VERIFYING":       3,
	"REKEYING":        4,
	"CONNECTION":      5,
	"MD_READ_SUCCESS": 6,
	"FILE_CREATED":    7,
	"FILE_MODIFIED":   8,
	"FILE_DELETED":    9,
	"FILE_RENAMED":    10,
}

var FSNotificationTypeRevMap = map[FSNotificationType]string{
	0:  "ENCRYPTING",
	1:  "DECRYPTING",
	2:  "SIGNING",
	3:  "VERIFYING",
	4:  "REKEYING",
	5:  "CONNECTION",
	6:  "MD_READ_SUCCESS",
	7:  "FILE_CREATED",
	8:  "FILE_MODIFIED",
	9:  "FILE_DELETED",
	10: "FILE_RENAMED",
}

func (e FSNotificationType) String() string {
	if v, ok := FSNotificationTypeRevMap[e]; ok {
		return v
	}
	return ""
}

type FSErrorType int

const (
	FSErrorType_ACCESS_DENIED         FSErrorType = 0
	FSErrorType_USER_NOT_FOUND        FSErrorType = 1
	FSErrorType_REVOKED_DATA_DETECTED FSErrorType = 2
	FSErrorType_NOT_LOGGED_IN         FSErrorType = 3
	FSErrorType_TIMEOUT               FSErrorType = 4
	FSErrorType_REKEY_NEEDED          FSErrorType = 5
	FSErrorType_BAD_FOLDER            FSErrorType = 6
	FSErrorType_NOT_IMPLEMENTED       FSErrorType = 7
	FSErrorType_OLD_VERSION           FSErrorType = 8
	FSErrorType_OVER_QUOTA            FSErrorType = 9
	FSErrorType_NO_SIG_CHAIN          FSErrorType = 10
	FSErrorType_TOO_MANY_FOLDERS      FSErrorType = 11
	FSErrorType_EXDEV_NOT_SUPPORTED   FSErrorType = 12
)

var FSErrorTypeMap = map[string]FSErrorType{
	"ACCESS_DENIED":         0,
	"USER_NOT_FOUND":        1,
	"REVOKED_DATA_DETECTED": 2,
	"NOT_LOGGED_IN":         3,
	"TIMEOUT":               4,
	"REKEY_NEEDED":          5,
	"BAD_FOLDER":            6,
	"NOT_IMPLEMENTED":       7,
	"OLD_VERSION":           8,
	"OVER_QUOTA":            9,
	"NO_SIG_CHAIN":          10,
	"TOO_MANY_FOLDERS":      11,
	"EXDEV_NOT_SUPPORTED":   12,
}

var FSErrorTypeRevMap = map[FSErrorType]string{
	0:  "ACCESS_DENIED",
	1:  "USER_NOT_FOUND",
	2:  "REVOKED_DATA_DETECTED",
	3:  "NOT_LOGGED_IN",
	4:  "TIMEOUT",
	5:  "REKEY_NEEDED",
	6:  "BAD_FOLDER",
	7:  "NOT_IMPLEMENTED",
	8:  "OLD_VERSION",
	9:  "OVER_QUOTA",
	10: "NO_SIG_CHAIN",
	11: "TOO_MANY_FOLDERS",
	12: "EXDEV_NOT_SUPPORTED",
}

func (e FSErrorType) String() string {
	if v, ok := FSErrorTypeRevMap[e]; ok {
		return v
	}
	return ""
}

type FSNotification struct {
	PublicTopLevelFolder bool               `codec:"publicTopLevelFolder" json:"publicTopLevelFolder"`
	Filename             string             `codec:"filename" json:"filename"`
	Status               string             `codec:"status" json:"status"`
	StatusCode           FSStatusCode       `codec:"statusCode" json:"statusCode"`
	NotificationType     FSNotificationType `codec:"notificationType" json:"notificationType"`
	ErrorType            FSErrorType        `codec:"errorType" json:"errorType"`
	Params               map[string]string  `codec:"params" json:"params"`
	WriterUid            UID                `codec:"writerUid" json:"writerUid"`
	LocalTime            Time               `codec:"localTime" json:"localTime"`
}

type FSEditListRequest struct {
	Folder    Folder `codec:"folder" json:"folder"`
	RequestID int    `codec:"requestID" json:"requestID"`
}

type FSSyncStatusRequest struct {
	RequestID int `codec:"requestID" json:"requestID"`
}

type FSPathSyncStatus struct {
	PublicTopLevelFolder bool   `codec:"publicTopLevelFolder" json:"publicTopLevelFolder"`
	Path                 string `codec:"path" json:"path"`
	SyncingBytes         int64  `codec:"syncingBytes" json:"syncingBytes"`
	SyncingOps           int64  `codec:"syncingOps" json:"syncingOps"`
	SyncedBytes          int64  `codec:"syncedBytes" json:"syncedBytes"`
}

type FSSyncStatus struct {
	TotalSyncingBytes int64              `codec:"totalSyncingBytes" json:"totalSyncingBytes"`
	TotalSyncingOps   int64              `codec:"totalSyncingOps" json:"totalSyncingOps"`
	PathStatuses      []FSPathSyncStatus `codec:"pathStatuses" json:"pathStatuses"`
}

type KbfsCommonInterface interface {
}

func KbfsCommonProtocol(i KbfsCommonInterface) rpc.Protocol {
	return rpc.Protocol{
		Name:    "keybase.1.kbfsCommon",
		Methods: map[string]rpc.ServeHandlerDescription{},
	}
}

type KbfsCommonClient struct {
	Cli rpc.GenericClient
}
