jj_lib/protos/
local_working_copy.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct MaterializedConflictData {
4    /// TODO: maybe we should store num_sides here as well
5    #[prost(uint32, tag = "1")]
6    pub conflict_marker_len: u32,
7}
8#[derive(Clone, Copy, PartialEq, ::prost::Message)]
9pub struct FileState {
10    #[prost(int64, tag = "1")]
11    pub mtime_millis_since_epoch: i64,
12    #[prost(uint64, tag = "2")]
13    pub size: u64,
14    #[prost(enumeration = "FileType", tag = "3")]
15    pub file_type: i32,
16    #[prost(message, optional, tag = "5")]
17    pub materialized_conflict_data: ::core::option::Option<MaterializedConflictData>,
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct FileStateEntry {
21    #[prost(string, tag = "1")]
22    pub path: ::prost::alloc::string::String,
23    #[prost(message, optional, tag = "2")]
24    pub state: ::core::option::Option<FileState>,
25}
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct SparsePatterns {
28    #[prost(string, repeated, tag = "1")]
29    pub prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct TreeState {
33    #[deprecated]
34    #[prost(bytes = "vec", tag = "1")]
35    pub legacy_tree_id: ::prost::alloc::vec::Vec<u8>,
36    /// Alternating positive and negative terms if there's a conflict, otherwise a
37    /// single (positive) value
38    #[prost(bytes = "vec", repeated, tag = "5")]
39    pub tree_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
40    #[prost(message, repeated, tag = "2")]
41    pub file_states: ::prost::alloc::vec::Vec<FileStateEntry>,
42    #[prost(bool, tag = "6")]
43    pub is_file_states_sorted: bool,
44    #[prost(message, optional, tag = "3")]
45    pub sparse_patterns: ::core::option::Option<SparsePatterns>,
46    #[prost(message, optional, tag = "4")]
47    pub watchman_clock: ::core::option::Option<WatchmanClock>,
48}
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct WatchmanClock {
51    #[prost(oneof = "watchman_clock::WatchmanClock", tags = "1, 2")]
52    pub watchman_clock: ::core::option::Option<watchman_clock::WatchmanClock>,
53}
54/// Nested message and enum types in `WatchmanClock`.
55pub mod watchman_clock {
56    #[derive(Clone, PartialEq, ::prost::Oneof)]
57    pub enum WatchmanClock {
58        #[prost(string, tag = "1")]
59        StringClock(::prost::alloc::string::String),
60        #[prost(int64, tag = "2")]
61        UnixTimestamp(i64),
62    }
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct Checkout {
66    /// The operation at which the working copy was updated.
67    #[prost(bytes = "vec", tag = "2")]
68    pub operation_id: ::prost::alloc::vec::Vec<u8>,
69    /// An identifier for this workspace. It is used for looking up the current
70    /// working-copy commit in the repo view. Currently a human-readable name.
71    /// TODO: Is it better to make this a UUID and a have map that to a name in
72    /// config? That way users can rename a workspace.
73    #[prost(string, tag = "3")]
74    pub workspace_name: ::prost::alloc::string::String,
75}
76#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
77#[repr(i32)]
78pub enum FileType {
79    Normal = 0,
80    Symlink = 1,
81    Executable = 2,
82    Conflict = 3,
83    GitSubmodule = 4,
84}
85impl FileType {
86    /// String value of the enum field names used in the ProtoBuf definition.
87    ///
88    /// The values are not transformed in any way and thus are considered stable
89    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
90    pub fn as_str_name(&self) -> &'static str {
91        match self {
92            Self::Normal => "Normal",
93            Self::Symlink => "Symlink",
94            Self::Executable => "Executable",
95            Self::Conflict => "Conflict",
96            Self::GitSubmodule => "GitSubmodule",
97        }
98    }
99    /// Creates an enum from field names used in the ProtoBuf definition.
100    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
101        match value {
102            "Normal" => Some(Self::Normal),
103            "Symlink" => Some(Self::Symlink),
104            "Executable" => Some(Self::Executable),
105            "Conflict" => Some(Self::Conflict),
106            "GitSubmodule" => Some(Self::GitSubmodule),
107            _ => None,
108        }
109    }
110}