Skip to main content

ledger_models/
fintekkers.requests.index_composition.rs

1/// Request to create or update an IndexCompositionProto record.
2/// If a record with the same (index_uuid, effective_date) already exists it is replaced
3/// (last-writer-wins — same semantics as InMemoryIndexCompositionStore.upsert).
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct CreateIndexCompositionRequestProto {
7    #[prost(string, tag = "1")]
8    pub object_class: ::prost::alloc::string::String,
9    #[prost(string, tag = "2")]
10    pub version: ::prost::alloc::string::String,
11    #[prost(enumeration = "super::util::RequestOperationTypeProto", tag = "10")]
12    pub operation_type: i32,
13    /// The composition to store.
14    #[prost(message, optional, tag = "20")]
15    pub create_index_composition_input: ::core::option::Option<
16        super::super::models::security::IndexCompositionProto,
17    >,
18}
19#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct CreateIndexCompositionResponseProto {
22    #[prost(string, tag = "1")]
23    pub object_class: ::prost::alloc::string::String,
24    #[prost(string, tag = "2")]
25    pub version: ::prost::alloc::string::String,
26    #[prost(enumeration = "super::util::RequestOperationTypeProto", tag = "10")]
27    pub operation_type: i32,
28    /// Echo of the request that produced this response.
29    #[prost(message, optional, tag = "20")]
30    pub create_index_composition_request: ::core::option::Option<
31        CreateIndexCompositionRequestProto,
32    >,
33    /// The stored composition (with any server-side defaults applied, e.g. auto-generated UUID).
34    #[prost(message, optional, tag = "30")]
35    pub index_composition_response: ::core::option::Option<
36        super::super::models::security::IndexCompositionProto,
37    >,
38}
39/// Request to retrieve the index composition active on a given date.
40/// Returns the most recent IndexCompositionProto where effective_date <= as_of_date.
41#[allow(clippy::derive_partial_eq_without_eq)]
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct GetIndexCompositionRequestProto {
44    #[prost(string, tag = "1")]
45    pub object_class: ::prost::alloc::string::String,
46    #[prost(string, tag = "2")]
47    pub version: ::prost::alloc::string::String,
48    /// UUID of the index security (EQUITY_INDEX_SECURITY).
49    #[prost(message, optional, tag = "10")]
50    pub index_uuid: ::core::option::Option<super::super::models::util::UuidProto>,
51    /// The business date for which to retrieve the active composition.
52    /// Resolution: most recent IndexCompositionProto where effective_date <= as_of_date.
53    #[prost(message, optional, tag = "11")]
54    pub as_of_date: ::core::option::Option<super::super::models::util::LocalDateProto>,
55}
56#[allow(clippy::derive_partial_eq_without_eq)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct GetIndexCompositionResponseProto {
59    #[prost(string, tag = "1")]
60    pub object_class: ::prost::alloc::string::String,
61    #[prost(string, tag = "2")]
62    pub version: ::prost::alloc::string::String,
63    #[prost(enumeration = "super::util::RequestOperationTypeProto", tag = "10")]
64    pub operation_type: i32,
65    /// The resolved composition. Absent if no composition exists for as_of_date.
66    #[prost(message, optional, tag = "20")]
67    pub composition: ::core::option::Option<
68        super::super::models::security::IndexCompositionProto,
69    >,
70    /// The effective_date of the composition returned. Useful when as_of_date
71    /// falls between rebalances — tells the caller which rebalance date applies.
72    #[prost(message, optional, tag = "21")]
73    pub resolved_effective_date: ::core::option::Option<
74        super::super::models::util::LocalDateProto,
75    >,
76}