Skip to main content

ledger_models/
fintekkers.requests.security.rs

1/// Use this request to create or update securities. Uniqueness is guaranteed via the UUID.
2/// Security identifiers do not guarantee uniqueness. As an example a bond ISIN or stock ticker
3/// may be re-used over time. Therefore if you send 2 requests with the same security identifier
4/// you will create two securities. In order to avoid duplication you should either re-use the UUID
5/// when calling the API, in which case an update will be applied. If you do not know the UUID, you
6/// should first do a search operation.
7///
8/// It is preferred that the client generates the UUID. This will avoid issues in the network leading
9/// to duplicate securities.
10#[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct CreateSecurityRequestProto {
13    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
14    pub object_type: i32,
15    #[prost(message, optional, tag = "2")]
16    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
17    /// A fully formed security object to be created or updated. Validations may be applied
18    /// before creating. For example creating an equity security with bond fields may be invalid and
19    /// therefore rejected.
20    #[prost(message, optional, tag = "20")]
21    pub security_input: ::core::option::Option<
22        super::super::models::security::SecurityProto,
23    >,
24}
25#[allow(clippy::derive_partial_eq_without_eq)]
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct CreateSecurityResponseProto {
28    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
29    pub object_type: i32,
30    #[prost(message, optional, tag = "2")]
31    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
32    /// The input that was provided for this request.
33    #[prost(message, optional, tag = "20")]
34    pub security_request: ::core::option::Option<CreateSecurityRequestProto>,
35    /// The security (or securities) that were created in response to this request
36    #[prost(message, optional, tag = "30")]
37    pub security_response: ::core::option::Option<
38        super::super::models::security::SecurityProto,
39    >,
40    /// If no errors or warnings in the response then the request was processed successfully without any
41    /// contingencies.
42    #[prost(message, optional, tag = "40")]
43    pub errors_or_warnings: ::core::option::Option<super::util::errors::SummaryProto>,
44}
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct GetFieldValuesRequestProto {
48    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
49    pub object_type: i32,
50    #[prost(message, optional, tag = "2")]
51    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
52    #[prost(enumeration = "super::super::models::position::FieldProto", tag = "10")]
53    pub field: i32,
54}
55#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct GetFieldValuesResponseProto {
58    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
59    pub object_type: i32,
60    #[prost(message, optional, tag = "2")]
61    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
62    #[prost(message, repeated, tag = "10")]
63    pub values: ::prost::alloc::vec::Vec<::prost_types::Any>,
64}
65#[allow(clippy::derive_partial_eq_without_eq)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct GetFieldsResponseProto {
68    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
69    pub object_type: i32,
70    #[prost(message, optional, tag = "2")]
71    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
72    #[prost(
73        enumeration = "super::super::models::position::FieldProto",
74        repeated,
75        tag = "10"
76    )]
77    pub fields: ::prost::alloc::vec::Vec<i32>,
78}
79/// A request to allow clients to find existing securities.
80#[allow(clippy::derive_partial_eq_without_eq)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct QuerySecurityRequestProto {
83    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
84    pub object_type: i32,
85    #[prost(message, optional, tag = "2")]
86    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
87    /// The list of UUIds to return
88    #[prost(message, repeated, tag = "21")]
89    pub uu_ids: ::prost::alloc::vec::Vec<super::super::models::util::UuidProto>,
90    /// A list of position filters that will filter securities that match.
91    #[prost(message, optional, tag = "22")]
92    pub search_security_input: ::core::option::Option<
93        super::super::models::position::PositionFilterProto,
94    >,
95    #[prost(message, optional, tag = "23")]
96    pub as_of: ::core::option::Option<super::super::models::util::LocalTimestampProto>,
97    /// Case-insensitive substring match on security name (issuer) or identifier (e.g. ticker).
98    /// Empty string means no filter (return all).
99    #[prost(string, tag = "24")]
100    pub name_filter: ::prost::alloc::string::String,
101    /// When true, the server populates IndexDetailsProto.constituents on
102    /// returned index securities (productType=*_INDEX) by running its
103    /// registered resolver against the request asOf. Default false:
104    /// index securities are returned without constituents (back-compat).
105    /// Added per second-brain#268.
106    #[prost(bool, tag = "25")]
107    pub lookthrough: bool,
108    /// Paging (see docs/adr/query_paging.md). Max records returned in this
109    /// response: the page size the client asks for. Unset or 0 = no client page
110    /// cap; the server keeps today's behaviour for this RPC. The server may cap
111    /// `limit` and return fewer items; fewer items does not mean last page, only
112    /// an empty `next_page_token` does. For streaming Search, `limit` caps the
113    /// total items across the whole stream. Clients that set neither `limit` nor
114    /// `page_token` get exactly today's results.
115    #[prost(int32, tag = "50")]
116    pub limit: i32,
117    /// Paging (see docs/adr/query_paging.md). Opaque token copied from a
118    /// previous response's `next_page_token`. Unset or empty = first page.
119    /// Clients must not parse or build tokens; send the other request fields
120    /// unchanged across pages. Clients that set neither `limit` nor
121    /// `page_token` get exactly today's results.
122    #[prost(string, tag = "51")]
123    pub page_token: ::prost::alloc::string::String,
124}
125#[allow(clippy::derive_partial_eq_without_eq)]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct QuerySecurityResponseProto {
128    #[prost(enumeration = "super::super::models::util::ObjectTypeProto", tag = "1")]
129    pub object_type: i32,
130    #[prost(message, optional, tag = "2")]
131    pub version: ::core::option::Option<super::super::models::util::VersionProto>,
132    /// The input that was provided for this request.
133    #[prost(message, optional, tag = "20")]
134    pub query_security_input: ::core::option::Option<QuerySecurityRequestProto>,
135    /// The security (or securities) that was matched by this request.
136    #[prost(message, repeated, tag = "30")]
137    pub security_response: ::prost::alloc::vec::Vec<
138        super::super::models::security::SecurityProto,
139    >,
140    /// Any errors or warnings related to this request
141    #[prost(message, repeated, tag = "40")]
142    pub errors_or_warnings: ::prost::alloc::vec::Vec<super::util::errors::SummaryProto>,
143    /// Paging (see docs/adr/query_paging.md). Opaque token for the next page;
144    /// pass it back as the request's `page_token`. Empty = last page. For
145    /// streaming Search, only the final message of the stream carries it.
146    /// Old clients that ignore it get exactly today's results.
147    #[prost(string, tag = "50")]
148    pub next_page_token: ::prost::alloc::string::String,
149}