#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
#[prost(message, optional, tag = "1")]
pub scheduling: ::core::option::Option<SchedulingPolicy>,
#[prost(message, optional, tag = "2")]
pub job_template: ::core::option::Option<super::super::jobs::v1::Job>,
#[prost(message, repeated, tag = "3")]
pub labels: ::prost::alloc::vec::Vec<super::super::common::v1::Label>,
#[prost(message, optional, tag = "4")]
pub time_range: ::core::option::Option<super::super::common::v1::TimeRange>,
}
impl ::prost::Name for Schedule {
const NAME: &'static str = "Schedule";
const PACKAGE: &'static str = "ora.schedules.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.schedules.v1.Schedule".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.schedules.v1.Schedule".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SchedulingPolicy {
#[prost(oneof = "scheduling_policy::Policy", tags = "1, 2")]
pub policy: ::core::option::Option<scheduling_policy::Policy>,
}
pub mod scheduling_policy {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Policy {
#[prost(message, tag = "1")]
Interval(super::SchedulingPolicyInterval),
#[prost(message, tag = "2")]
Cron(super::SchedulingPolicyCron),
}
}
impl ::prost::Name for SchedulingPolicy {
const NAME: &'static str = "SchedulingPolicy";
const PACKAGE: &'static str = "ora.schedules.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.schedules.v1.SchedulingPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.schedules.v1.SchedulingPolicy".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SchedulingPolicyInterval {
#[prost(message, optional, tag = "1")]
pub interval: ::core::option::Option<::prost_types::Duration>,
#[prost(bool, tag = "2")]
pub immediate: bool,
#[prost(enumeration = "MissedTimePolicy", tag = "3")]
pub missed_time_policy: i32,
}
impl ::prost::Name for SchedulingPolicyInterval {
const NAME: &'static str = "SchedulingPolicyInterval";
const PACKAGE: &'static str = "ora.schedules.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.schedules.v1.SchedulingPolicyInterval".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.schedules.v1.SchedulingPolicyInterval".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SchedulingPolicyCron {
#[prost(string, tag = "1")]
pub cron_expression: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub immediate: bool,
#[prost(enumeration = "MissedTimePolicy", tag = "3")]
pub missed_time_policy: i32,
}
impl ::prost::Name for SchedulingPolicyCron {
const NAME: &'static str = "SchedulingPolicyCron";
const PACKAGE: &'static str = "ora.schedules.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.schedules.v1.SchedulingPolicyCron".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.schedules.v1.SchedulingPolicyCron".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MissedTimePolicy {
Unspecified = 0,
Skip = 1,
Create = 2,
}
impl MissedTimePolicy {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MISSED_TIME_POLICY_UNSPECIFIED",
Self::Skip => "MISSED_TIME_POLICY_SKIP",
Self::Create => "MISSED_TIME_POLICY_CREATE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MISSED_TIME_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
"MISSED_TIME_POLICY_SKIP" => Some(Self::Skip),
"MISSED_TIME_POLICY_CREATE" => Some(Self::Create),
_ => None,
}
}
}