Skip to main content

arvo_api/generated/
arvo.portfolio.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct PortfolioName {
5    #[prost(string, tag = "1")]
6    pub name: ::prost::alloc::string::String,
7}
8/// The move between the two most recent valuations.
9#[derive(serde::Serialize, serde::Deserialize)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct ChangeView {
12    #[prost(string, tag = "1")]
13    pub from: ::prost::alloc::string::String,
14    #[prost(string, tag = "2")]
15    pub to: ::prost::alloc::string::String,
16    #[prost(double, tag = "3")]
17    pub absolute: f64,
18    #[prost(double, optional, tag = "4")]
19    pub percent: ::core::option::Option<f64>,
20}
21#[derive(serde::Serialize, serde::Deserialize)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct HoldingView {
24    #[prost(string, tag = "1")]
25    pub instrument: ::prost::alloc::string::String,
26    /// `None` when the source reported money without units — a collective
27    /// trust in a 401(k) does exactly that.
28    #[prost(double, optional, tag = "2")]
29    pub quantity: ::core::option::Option<f64>,
30    #[prost(double, optional, tag = "3")]
31    pub price: ::core::option::Option<f64>,
32    #[prost(double, tag = "4")]
33    pub market_value: f64,
34    #[prost(double, optional, tag = "5")]
35    pub cost_basis: ::core::option::Option<f64>,
36    #[prost(double, optional, tag = "6")]
37    pub unrealized: ::core::option::Option<f64>,
38    #[prost(double, optional, tag = "7")]
39    pub unrealized_pct: ::core::option::Option<f64>,
40    #[prost(double, tag = "8")]
41    pub weight: f64,
42    /// "statement", "last_close" or "face" — so a price nobody verified is
43    /// visibly different from one that came off a statement.
44    #[prost(string, tag = "9")]
45    pub priced_by: ::prost::alloc::string::String,
46}
47#[derive(serde::Serialize, serde::Deserialize)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct ImportView {
50    /// Role → the column heading used for it.
51    #[prost(message, repeated, tag = "1")]
52    pub columns: ::prost::alloc::vec::Vec<NamedText>,
53    #[prost(string, repeated, tag = "2")]
54    pub ignored: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
55    #[prost(uint32, tag = "3")]
56    pub rows_imported: u32,
57    #[prost(string, repeated, tag = "4")]
58    pub rows_skipped: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
59    /// Cost basis came from a per-share column multiplied by quantity.
60    #[prost(bool, tag = "5")]
61    pub cost_basis_derived: bool,
62}
63/// A column and what it was read as.
64#[derive(serde::Serialize, serde::Deserialize)]
65#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
66pub struct NamedText {
67    #[prost(string, tag = "1")]
68    pub name: ::prost::alloc::string::String,
69    #[prost(string, tag = "2")]
70    pub value: ::prost::alloc::string::String,
71}
72#[derive(serde::Serialize, serde::Deserialize)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct PortfolioLibraryView {
75    /// Shown so somebody with no holdings file knows where to put one.
76    #[prost(string, tag = "1")]
77    pub directory: ::prost::alloc::string::String,
78    #[prost(message, repeated, tag = "2")]
79    pub portfolios: ::prost::alloc::vec::Vec<PortfolioView>,
80}
81#[derive(serde::Serialize, serde::Deserialize)]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct PortfolioView {
84    #[prost(string, tag = "1")]
85    pub name: ::prost::alloc::string::String,
86    #[prost(string, tag = "2")]
87    pub as_of: ::prost::alloc::string::String,
88    #[prost(double, tag = "3")]
89    pub total_value: f64,
90    #[prost(double, optional, tag = "4")]
91    pub total_cost: ::core::option::Option<f64>,
92    #[prost(double, optional, tag = "5")]
93    pub unrealized: ::core::option::Option<f64>,
94    #[prost(double, optional, tag = "6")]
95    pub unrealized_pct: ::core::option::Option<f64>,
96    /// How many holdings reported no cost basis. Normal for a 401(k).
97    #[prost(uint32, tag = "7")]
98    pub without_cost_basis: u32,
99    #[prost(double, tag = "8")]
100    pub cash: f64,
101    #[prost(message, repeated, tag = "9")]
102    pub holdings: ::prost::alloc::vec::Vec<HoldingView>,
103    #[prost(string, repeated, tag = "10")]
104    pub unpriced: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
105    /// Value on every day this portfolio has been looked at. A holdings file
106    /// says what you hold now; almost everything interesting is a change, and
107    /// a single export cannot express one.
108    #[prost(message, repeated, tag = "11")]
109    pub value_history: ::prost::alloc::vec::Vec<ValuePoint>,
110    /// `None` until a portfolio has been valued on two different days.
111    #[prost(message, optional, tag = "12")]
112    pub change: ::core::option::Option<ChangeView>,
113    /// Holdings over their band or over the default ceiling, as sentences
114    /// saying what to trim (#27). See `arvo_portfolio::bands`.
115    #[prost(string, repeated, tag = "13")]
116    pub warnings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
117    /// How the file was read. Shown, not hidden: an importer that guessed a
118    /// column wrong produces a portfolio that looks entirely plausible, and
119    /// this is the only thing that would reveal it.
120    #[prost(message, optional, tag = "14")]
121    pub import: ::core::option::Option<ImportView>,
122    /// The vendor whose sync wrote this file (`robinhood`), or `None` for a
123    /// file the person exported themselves. Says whether a refresh is a
124    /// button or a matter of replacing the file.
125    #[prost(string, optional, tag = "15")]
126    pub source: ::core::option::Option<::prost::alloc::string::String>,
127    /// Simulated money — a broker's paper account. Never added to a real
128    /// total: one blended number would report a paper gain as wealth.
129    #[prost(bool, tag = "16")]
130    pub paper: bool,
131    /// When the file was last written, as the file system says: the last
132    /// sync for a synced account, the last export for an exported one.
133    #[prost(string, optional, tag = "17")]
134    pub refreshed_at: ::core::option::Option<::prost::alloc::string::String>,
135}
136/// One day on the value line.
137#[derive(serde::Serialize, serde::Deserialize)]
138#[derive(Clone, Copy, PartialEq, ::prost::Message)]
139pub struct ValuePoint {
140    /// Seconds since the epoch, the same convention every other chart series
141    /// uses. One convention rather than two: the portfolio chart reuses the
142    /// research chart component, and a date string here against epoch seconds
143    /// there is a mismatch the compiler cannot see and the reader meets as a
144    /// deserialisation error at runtime.
145    #[prost(int64, tag = "1")]
146    pub time: i64,
147    #[prost(double, tag = "2")]
148    pub value: f64,
149}