Skip to main content

aion_proto/
schedule.rs

1//! Schedule-management serde/prost wire types.
2
3use crate::convert::{ProtoScheduleId, WireEnvelope};
4
5/// Proto representation of `CreateScheduleRequest`.
6#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
7pub struct ProtoCreateScheduleRequest {
8    /// Namespace that scopes the operation.
9    #[prost(string, tag = "1")]
10    pub namespace: String,
11    /// Serde-encoded `aion_core::ScheduleConfig` envelope.
12    #[prost(message, optional, tag = "2")]
13    pub config: Option<WireEnvelope>,
14}
15
16/// Proto representation of `CreateScheduleResponse`.
17#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
18pub struct ProtoCreateScheduleResponse {
19    /// Assigned schedule identifier.
20    #[prost(message, optional, tag = "1")]
21    pub schedule_id: Option<ProtoScheduleId>,
22    /// Serde-encoded `aion::schedule::ScheduleState` envelope.
23    #[prost(message, optional, tag = "2")]
24    pub state: Option<WireEnvelope>,
25}
26
27/// Proto representation of `UpdateScheduleRequest`.
28#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
29pub struct ProtoUpdateScheduleRequest {
30    /// Namespace that scopes the operation.
31    #[prost(string, tag = "1")]
32    pub namespace: String,
33    /// Target schedule identifier.
34    #[prost(message, optional, tag = "2")]
35    pub schedule_id: Option<ProtoScheduleId>,
36    /// Replacement serde-encoded `aion_core::ScheduleConfig` envelope.
37    #[prost(message, optional, tag = "3")]
38    pub config: Option<WireEnvelope>,
39}
40
41/// Proto representation of `UpdateScheduleResponse`.
42#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
43pub struct ProtoUpdateScheduleResponse {
44    /// Serde-encoded `aion::schedule::ScheduleState` envelope after update.
45    #[prost(message, optional, tag = "1")]
46    pub state: Option<WireEnvelope>,
47}
48
49/// Proto representation of a schedule-id request.
50#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
51pub struct ProtoScheduleIdRequest {
52    /// Namespace that scopes the operation.
53    #[prost(string, tag = "1")]
54    pub namespace: String,
55    /// Target schedule identifier.
56    #[prost(message, optional, tag = "2")]
57    pub schedule_id: Option<ProtoScheduleId>,
58}
59
60/// Proto representation of `PauseScheduleResponse`.
61#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
62pub struct ProtoPauseScheduleResponse {
63    /// Serde-encoded `aion::schedule::ScheduleState` envelope after pause.
64    #[prost(message, optional, tag = "1")]
65    pub state: Option<WireEnvelope>,
66}
67
68/// Proto representation of `ResumeScheduleResponse`.
69#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
70pub struct ProtoResumeScheduleResponse {
71    /// Serde-encoded `aion::schedule::ScheduleState` envelope after resume.
72    #[prost(message, optional, tag = "1")]
73    pub state: Option<WireEnvelope>,
74}
75
76/// Proto representation of `DeleteScheduleResponse`.
77#[derive(Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
78pub struct ProtoDeleteScheduleResponse {}
79
80/// Proto representation of `ListSchedulesRequest`.
81#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
82pub struct ProtoListSchedulesRequest {
83    /// Namespace that scopes the operation.
84    #[prost(string, tag = "1")]
85    pub namespace: String,
86}
87
88/// Proto representation of `ListSchedulesResponse`.
89#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
90pub struct ProtoListSchedulesResponse {
91    /// Serde-encoded `aion::schedule::ScheduleState` envelopes.
92    #[prost(message, repeated, tag = "1")]
93    pub schedules: Vec<WireEnvelope>,
94}
95
96/// Proto representation of `DescribeScheduleResponse`.
97#[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, prost::Message)]
98pub struct ProtoDescribeScheduleResponse {
99    /// Serde-encoded `aion::schedule::ScheduleState` envelope.
100    #[prost(message, optional, tag = "1")]
101    pub state: Option<WireEnvelope>,
102}