#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Range {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<Timestamp>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Timestamp {
#[prost(int64, optional, tag = "1")]
pub seconds: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "2")]
pub nanos: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TimeUnit {
Unspecified = 0,
Days = 1,
Hours = 2,
Minutes = 3,
Seconds = 4,
Milliseconds = 5,
Microseconds = 6,
Nanoseconds = 7,
}
impl TimeUnit {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIME_UNIT_UNSPECIFIED",
Self::Days => "DAYS",
Self::Hours => "HOURS",
Self::Minutes => "MINUTES",
Self::Seconds => "SECONDS",
Self::Milliseconds => "MILLISECONDS",
Self::Microseconds => "MICROSECONDS",
Self::Nanoseconds => "NANOSECONDS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIME_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
"DAYS" => Some(Self::Days),
"HOURS" => Some(Self::Hours),
"MINUTES" => Some(Self::Minutes),
"SECONDS" => Some(Self::Seconds),
"MILLISECONDS" => Some(Self::Milliseconds),
"MICROSECONDS" => Some(Self::Microseconds),
"NANOSECONDS" => Some(Self::Nanoseconds),
_ => None,
}
}
}