#[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,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampType {
#[prost(oneof = "timestamp_type::Option", tags = "1, 2")]
pub option: ::core::option::Option<timestamp_type::Option>,
}
pub mod timestamp_type {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Option {
#[prost(message, tag = "1")]
Relative(super::RelativeTimestamp),
#[prost(message, tag = "2")]
Absolute(super::AbsoluteTimestamp),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelativeTimestamp {
#[prost(string, tag = "1")]
pub time_unit: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub offset: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbsoluteTimestamp {
#[prost(oneof = "absolute_timestamp::Option", tags = "1, 2, 3")]
pub option: ::core::option::Option<absolute_timestamp::Option>,
}
pub mod absolute_timestamp {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Option {
#[prost(message, tag = "1")]
Iso8601(super::Iso8601Timestamp),
#[prost(message, tag = "2")]
EpochOfTimeUnit(super::EpochTimestamp),
#[prost(message, tag = "3")]
CustomFormat(super::CustomTimestamp),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Iso8601Timestamp {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpochTimestamp {
#[prost(string, tag = "1")]
pub time_unit: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomTimestamp {
#[prost(string, tag = "1")]
pub format: ::prost::alloc::string::String,
#[prost(int32, optional, tag = "2")]
pub default_year: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "3")]
pub default_day_of_year: ::core::option::Option<i32>,
}