#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Grant {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(uint64, tag = "2")]
pub organization_id: u64,
#[prost(enumeration = "GrantType", tag = "3")]
pub r#type: i32,
#[prost(string, repeated, tag = "4")]
pub line_item_uids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "5")]
pub amount: i64,
#[prost(message, optional, tag = "6")]
pub start_date: ::core::option::Option<super::super::super::Date>,
#[prost(message, optional, tag = "7")]
pub end_date: ::core::option::Option<super::super::super::Date>,
#[prost(enumeration = "GrantStatus", tag = "8")]
pub status: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GrantType {
Unspecified = 0,
Units = 1,
Cents = 2,
}
impl GrantType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "GRANT_TYPE_UNSPECIFIED",
Self::Units => "GRANT_TYPE_UNITS",
Self::Cents => "GRANT_TYPE_CENTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GRANT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"GRANT_TYPE_UNITS" => Some(Self::Units),
"GRANT_TYPE_CENTS" => Some(Self::Cents),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GrantStatus {
Unspecified = 0,
Active = 1,
Inactive = 2,
Expired = 3,
}
impl GrantStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "GRANT_STATUS_UNSPECIFIED",
Self::Active => "GRANT_STATUS_ACTIVE",
Self::Inactive => "GRANT_STATUS_INACTIVE",
Self::Expired => "GRANT_STATUS_EXPIRED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GRANT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"GRANT_STATUS_ACTIVE" => Some(Self::Active),
"GRANT_STATUS_INACTIVE" => Some(Self::Inactive),
"GRANT_STATUS_EXPIRED" => Some(Self::Expired),
_ => None,
}
}
}