ORE Studio 0.0.4
Loading...
Searching...
No Matches
import_choices.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2026 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_ORE_PLANNER_IMPORT_CHOICES_HPP
21#define ORES_ORE_PLANNER_IMPORT_CHOICES_HPP
22
23#include <string>
24#include <vector>
25#include <optional>
26#include <boost/uuid/uuid.hpp>
27
28namespace ores::ore::planner {
29
33enum class currency_import_mode {
34 all,
35 missing_only
36};
37
42enum class reimport_mode {
44 add_trades_only,
47 create_new_versions
48};
49
57 std::string trade_date;
58 std::string effective_date;
59 std::string termination_date;
60 std::string activity_type_code;
61 std::optional<boost::uuids::uuid> default_counterparty_id;
62};
63
73 currency_import_mode currency_mode = currency_import_mode::missing_only;
74
78 reimport_mode portfolio_reimport_mode = reimport_mode::add_trades_only;
79
84
89
97 std::vector<std::string> scan_exclusions;
98
107 std::vector<std::string> hierarchy_strip = {"Input"};
108
113
121 std::optional<boost::uuids::uuid> existing_parent_portfolio_id;
122
128 boost::uuids::uuid party_id;
129
133 std::string aggregation_ccy = "USD";
134
138 std::string ledger_ccy = "USD";
139
143 std::string purpose_type = "Internal";
144};
145
146}
147
148#endif
Default field values to stamp onto imported trades.
Definition import_choices.hpp:56
User-supplied choices that drive the import plan.
Definition import_choices.hpp:69
bool create_parent_portfolio
If true, a single parent portfolio wraps all imported portfolios.
Definition import_choices.hpp:88
currency_import_mode currency_mode
How to handle currencies already in the database.
Definition import_choices.hpp:73
std::string parent_portfolio_name
Name for the optional wrapping parent portfolio.
Definition import_choices.hpp:83
trade_defaults defaults
Default field values to stamp onto imported trades.
Definition import_choices.hpp:112
boost::uuids::uuid party_id
Party that owns the imported entities.
Definition import_choices.hpp:128
std::string aggregation_ccy
Aggregation currency for auto-created portfolios.
Definition import_choices.hpp:133
std::string purpose_type
Purpose type for auto-created portfolios.
Definition import_choices.hpp:143
reimport_mode portfolio_reimport_mode
How to handle portfolios and books that already exist.
Definition import_choices.hpp:78
std::optional< boost::uuids::uuid > existing_parent_portfolio_id
UUID of a pre-existing portfolio to use as parent.
Definition import_choices.hpp:121
std::string ledger_ccy
Ledger currency for auto-created books.
Definition import_choices.hpp:138
std::vector< std::string > scan_exclusions
Directory name segments to skip during the filesystem scan.
Definition import_choices.hpp:97
std::vector< std::string > hierarchy_strip
Directory name segments to strip when building the portfolio/book hierarchy.
Definition import_choices.hpp:107