// This file is @generated by prost-build.
#[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>,
}
/// Picosecond precision timestamp type, represented by an epoch time in seconds, a nanosecond offset, and optional
/// picosecond offset. The nanosecond offset is from the start of the epoch second, so must be less than 1 billion. The
/// optional picosecond offset is only used for picosecond-precision data sources and is from the start of the
/// nanosecond, so must be less than 1000.
#[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>,
    #[prost(int32, optional, tag = "3")]
    pub picos: ::core::option::Option<i32>,
}
/// buf:lint:ignore ENUM_VALUE_PREFIX
#[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,
    Picoseconds = 8,
}
impl TimeUnit {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    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",
            Self::Picoseconds => "PICOSECONDS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    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),
            "PICOSECONDS" => Some(Self::Picoseconds),
            _ => None,
        }
    }
}
