ORE Studio 0.0.4
Loading...
Searching...
No Matches
pricing_model_product_parameter_protocol.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_ANALYTICS_MESSAGING_PRICING_MODEL_PRODUCT_PARAMETER_PROTOCOL_HPP
21#define ORES_ANALYTICS_MESSAGING_PRICING_MODEL_PRODUCT_PARAMETER_PROTOCOL_HPP
22
23#include <string>
24#include <vector>
25#include <boost/uuid/uuid.hpp>
26#include "ores.analytics.api/domain/pricing_model_product_parameter.hpp"
27
28namespace ores::analytics::messaging {
29
30struct get_pricing_model_product_parameters_request {
31 using response_type = struct get_pricing_model_product_parameters_response;
32 static constexpr std::string_view nats_subject =
33 "analytics.v1.pricing_model_product_parameters.list";
34 std::string config_id;
35};
36
37struct get_pricing_model_product_parameters_response {
38 std::vector<ores::analytics::domain::pricing_model_product_parameter> parameters;
39 int total_available_count = 0;
40 bool success = true;
41 std::string message;
42};
43
44struct save_pricing_model_product_parameter_request {
45 using response_type = struct save_pricing_model_product_parameter_response;
46 static constexpr std::string_view nats_subject =
47 "analytics.v1.pricing_model_product_parameters.save";
49};
50
51struct save_pricing_model_product_parameter_response {
52 bool success = false;
53 std::string message;
54};
55
56struct delete_pricing_model_product_parameter_request {
57 using response_type = struct delete_pricing_model_product_parameter_response;
58 static constexpr std::string_view nats_subject =
59 "analytics.v1.pricing_model_product_parameters.delete";
60 std::vector<boost::uuids::uuid> ids;
61};
62
63struct delete_pricing_model_product_parameter_response {
64 bool success = false;
65 std::string message;
66};
67
68struct get_pricing_model_product_parameter_history_request {
69 using response_type = struct get_pricing_model_product_parameter_history_response;
70 static constexpr std::string_view nats_subject =
71 "analytics.v1.pricing_model_product_parameters.history";
72 boost::uuids::uuid id;
73};
74
75struct get_pricing_model_product_parameter_history_response {
76 std::vector<ores::analytics::domain::pricing_model_product_parameter> parameters;
77 bool success = false;
78 std::string message;
79};
80
81struct get_pricing_model_product_parameters_for_config_request {
82 using response_type = struct get_pricing_model_product_parameters_for_config_response;
83 static constexpr std::string_view nats_subject =
84 "analytics.v1.pricing_model_product_parameters.list_for_config";
85 std::string config_id;
86};
87
88struct get_pricing_model_product_parameters_for_config_response {
89 std::vector<ores::analytics::domain::pricing_model_product_parameter> parameters;
90 bool success = true;
91 std::string message;
92};
93
94struct get_pricing_model_product_parameters_for_product_request {
95 using response_type = struct get_pricing_model_product_parameters_for_product_response;
96 static constexpr std::string_view nats_subject =
97 "analytics.v1.pricing_model_product_parameters.list_for_product";
98 std::string product_id;
99};
100
101struct get_pricing_model_product_parameters_for_product_response {
102 std::vector<ores::analytics::domain::pricing_model_product_parameter> parameters;
103 bool success = true;
104 std::string message;
105};
106
107}
108
109#endif
Normalised parameter row for a pricing model configuration.
Definition pricing_model_product_parameter.hpp:44