#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitsRequest {
#[prost(message, optional, tag="1")]
pub identifier: ::core::option::Option<super::super::super::r#type::shared::v1::Identifier>,
#[prost(message, optional, tag="2")]
pub constraints: ::core::option::Option<super::super::super::r#type::shared::v1::Constraints>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitsResponse {
#[prost(message, repeated, tag="1")]
pub data: ::prost::alloc::vec::Vec<Split>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Split {
#[prost(message, optional, tag="1")]
pub date: ::core::option::Option<super::super::super::super::super::google::r#type::Date>,
#[prost(double, tag="2")]
pub new_shares: f64,
#[prost(double, tag="3")]
pub old_shares: f64,
#[prost(double, tag="4")]
pub score: f64,
}
pub mod splits_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct SplitsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SplitsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> SplitsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SplitsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
SplitsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn splits(
&mut self,
request: impl tonic::IntoRequest<super::SplitsRequest>,
) -> Result<tonic::Response<super::SplitsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/systemathics.apis.services.corporate_actions.v1.SplitsService/Splits",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangesRequest {
#[prost(message, optional, tag="1")]
pub identifier: ::core::option::Option<super::super::super::r#type::shared::v1::Identifier>,
#[prost(message, optional, tag="2")]
pub constraints: ::core::option::Option<super::super::super::r#type::shared::v1::Constraints>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangesResponse {
#[prost(message, repeated, tag="1")]
pub data: ::prost::alloc::vec::Vec<Change>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Change {
#[prost(message, optional, tag="1")]
pub date: ::core::option::Option<super::super::super::super::super::google::r#type::Date>,
#[prost(string, tag="2")]
pub new_symbol: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub old_symbol: ::prost::alloc::string::String,
#[prost(double, tag="4")]
pub score: f64,
}
pub mod changes_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ChangesServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ChangesServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ChangesServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ChangesServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ChangesServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn changes(
&mut self,
request: impl tonic::IntoRequest<super::ChangesRequest>,
) -> Result<tonic::Response<super::ChangesResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/systemathics.apis.services.corporate_actions.v1.ChangesService/Changes",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DividendsRequest {
#[prost(message, optional, tag="1")]
pub identifier: ::core::option::Option<super::super::super::r#type::shared::v1::Identifier>,
#[prost(message, optional, tag="2")]
pub constraints: ::core::option::Option<super::super::super::r#type::shared::v1::Constraints>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DividendsResponse {
#[prost(message, repeated, tag="1")]
pub data: ::prost::alloc::vec::Vec<Dividend>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dividend {
#[prost(message, optional, tag="1")]
pub date: ::core::option::Option<super::super::super::super::super::google::r#type::Date>,
#[prost(enumeration="DividendType", tag="2")]
pub r#type: i32,
#[prost(double, tag="3")]
pub amount: f64,
#[prost(double, tag="4")]
pub score: f64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DividendType {
Unspecified = 0,
Cash = 1,
Stock = 2,
}
pub mod dividends_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct DividendsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DividendsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DividendsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DividendsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
DividendsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn dividends(
&mut self,
request: impl tonic::IntoRequest<super::DividendsRequest>,
) -> Result<tonic::Response<super::DividendsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/systemathics.apis.services.corporate_actions.v1.DividendsService/Dividends",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}