proto/opt/rustwide/target/x86_64-unknown-linux-gnu/debug/build/cronback-proto-50749ec4953422ce/out/
common.rs

1#[derive(::dto::ProstMessageExt)]
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Payload {
5    #[prost(string, tag = "1")]
6    pub content_type: ::prost::alloc::string::String,
7    #[prost(map = "string, string", tag = "2")]
8    pub headers: ::std::collections::HashMap<
9        ::prost::alloc::string::String,
10        ::prost::alloc::string::String,
11    >,
12    #[prost(bytes = "vec", tag = "3")]
13    pub body: ::prost::alloc::vec::Vec<u8>,
14}
15#[derive(::dto::ProstMessageExt)]
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct Action {
19    #[prost(oneof = "action::Action", tags = "1")]
20    pub action: ::core::option::Option<action::Action>,
21}
22/// Nested message and enum types in `Action`.
23pub mod action {
24    #[allow(clippy::derive_partial_eq_without_eq)]
25    #[derive(Clone, PartialEq, ::prost::Oneof)]
26    pub enum Action {
27        /// Tunnel tunnel = 2;
28        #[prost(message, tag = "1")]
29        Webhook(super::Webhook),
30    }
31}
32#[derive(::dto::ProstMessageExt)]
33#[allow(clippy::derive_partial_eq_without_eq)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct SimpleRetry {
36    #[prost(uint32, tag = "1")]
37    pub max_num_attempts: u32,
38    #[prost(double, tag = "2")]
39    pub delay_s: f64,
40}
41#[derive(::dto::ProstMessageExt)]
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct ExponentialBackoffRetry {
45    #[prost(uint32, tag = "1")]
46    pub max_num_attempts: u32,
47    #[prost(double, tag = "2")]
48    pub delay_s: f64,
49    #[prost(double, tag = "3")]
50    pub max_delay_s: f64,
51}
52#[derive(::dto::ProstMessageExt)]
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct RetryConfig {
56    #[prost(oneof = "retry_config::Policy", tags = "1, 2")]
57    pub policy: ::core::option::Option<retry_config::Policy>,
58}
59/// Nested message and enum types in `RetryConfig`.
60pub mod retry_config {
61    #[allow(clippy::derive_partial_eq_without_eq)]
62    #[derive(Clone, PartialEq, ::prost::Oneof)]
63    pub enum Policy {
64        #[prost(message, tag = "1")]
65        Simple(super::SimpleRetry),
66        #[prost(message, tag = "2")]
67        ExponentialBackoff(super::ExponentialBackoffRetry),
68    }
69}
70#[derive(::dto::ProstMessageExt)]
71#[allow(clippy::derive_partial_eq_without_eq)]
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct Webhook {
74    #[prost(enumeration = "HttpMethod", tag = "1")]
75    pub http_method: i32,
76    #[prost(string, tag = "2")]
77    pub url: ::prost::alloc::string::String,
78    #[prost(double, tag = "3")]
79    pub timeout_s: f64,
80    #[prost(message, optional, tag = "4")]
81    pub retry: ::core::option::Option<RetryConfig>,
82}
83#[derive(::dto::ProstMessageExt)]
84#[allow(clippy::derive_partial_eq_without_eq)]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct PaginationIn {
87    #[prost(int32, tag = "1")]
88    pub limit: i32,
89    #[prost(string, optional, tag = "2")]
90    pub cursor: ::core::option::Option<::prost::alloc::string::String>,
91}
92#[derive(::dto::ProstMessageExt)]
93#[allow(clippy::derive_partial_eq_without_eq)]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct PaginationOut {
96    #[prost(string, optional, tag = "1")]
97    pub next_cursor: ::core::option::Option<::prost::alloc::string::String>,
98    #[prost(bool, tag = "2")]
99    pub has_more: bool,
100}
101#[derive(::dto::ProstMessageExt)]
102#[allow(clippy::derive_partial_eq_without_eq)]
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct Etag {
105    #[prost(string, tag = "1")]
106    pub value: ::prost::alloc::string::String,
107}
108#[derive(::dto::ProstMessageExt)]
109#[allow(clippy::derive_partial_eq_without_eq)]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct RequestPrecondition {
112    #[prost(enumeration = "request_precondition::PreconditionType", tag = "1")]
113    pub precondition_type: i32,
114    /// Only set on IF_MATCH and IF_NOT_MATCH.
115    #[prost(message, optional, tag = "2")]
116    pub etag: ::core::option::Option<Etag>,
117}
118/// Nested message and enum types in `RequestPrecondition`.
119pub mod request_precondition {
120    #[derive(
121        Clone,
122        Copy,
123        Debug,
124        PartialEq,
125        Eq,
126        Hash,
127        PartialOrd,
128        Ord,
129        ::prost::Enumeration
130    )]
131    #[repr(i32)]
132    pub enum PreconditionType {
133        Unknown = 0,
134        /// Only perform operation if the resource exists. Only makes sense in PUT
135        /// operations.
136        MustExist = 2,
137        /// Only perform operation if the resource does **not** exist. Only makes sense
138        /// in PUT operations.
139        MustNotExist = 3,
140        /// Only perform operation if existing resource matches the provided etag.
141        MustMatch = 4,
142        /// Only perform operation if existing resource does **not** match the
143        /// provided etag.
144        MustNotMatch = 5,
145    }
146    impl PreconditionType {
147        /// String value of the enum field names used in the ProtoBuf definition.
148        ///
149        /// The values are not transformed in any way and thus are considered stable
150        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
151        pub fn as_str_name(&self) -> &'static str {
152            match self {
153                PreconditionType::Unknown => "PreconditionType_UNKNOWN",
154                PreconditionType::MustExist => "MUST_EXIST",
155                PreconditionType::MustNotExist => "MUST_NOT_EXIST",
156                PreconditionType::MustMatch => "MUST_MATCH",
157                PreconditionType::MustNotMatch => "MUST_NOT_MATCH",
158            }
159        }
160        /// Creates an enum from field names used in the ProtoBuf definition.
161        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
162            match value {
163                "PreconditionType_UNKNOWN" => Some(Self::Unknown),
164                "MUST_EXIST" => Some(Self::MustExist),
165                "MUST_NOT_EXIST" => Some(Self::MustNotExist),
166                "MUST_MATCH" => Some(Self::MustMatch),
167                "MUST_NOT_MATCH" => Some(Self::MustNotMatch),
168                _ => None,
169            }
170        }
171    }
172}
173#[derive(::dto::ProstMessageExt)]
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct DateTime {
177    #[prost(string, tag = "1")]
178    pub rfc3339: ::prost::alloc::string::String,
179}
180/// Model Ids
181#[derive(::dto::ProstMessageExt)]
182#[allow(clippy::derive_partial_eq_without_eq)]
183#[derive(Clone, PartialEq, ::prost::Message)]
184pub struct ProjectId {
185    #[prost(string, tag = "1")]
186    pub value: ::prost::alloc::string::String,
187}
188#[derive(::dto::ProstMessageExt)]
189#[allow(clippy::derive_partial_eq_without_eq)]
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct TriggerId {
192    #[prost(string, tag = "1")]
193    pub value: ::prost::alloc::string::String,
194}
195#[derive(::dto::ProstMessageExt)]
196#[allow(clippy::derive_partial_eq_without_eq)]
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct RunId {
199    #[prost(string, tag = "1")]
200    pub value: ::prost::alloc::string::String,
201}
202#[derive(::dto::ProstMessageExt)]
203#[allow(clippy::derive_partial_eq_without_eq)]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct AttemptId {
206    #[prost(string, tag = "1")]
207    pub value: ::prost::alloc::string::String,
208}
209#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
210#[repr(i32)]
211pub enum HttpMethod {
212    Unknown = 0,
213    Get = 1,
214    Post = 2,
215    Put = 3,
216    Delete = 4,
217    Head = 5,
218    Patch = 6,
219}
220impl HttpMethod {
221    /// String value of the enum field names used in the ProtoBuf definition.
222    ///
223    /// The values are not transformed in any way and thus are considered stable
224    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
225    pub fn as_str_name(&self) -> &'static str {
226        match self {
227            HttpMethod::Unknown => "HttpMethod_UNKNOWN",
228            HttpMethod::Get => "GET",
229            HttpMethod::Post => "POST",
230            HttpMethod::Put => "PUT",
231            HttpMethod::Delete => "DELETE",
232            HttpMethod::Head => "HEAD",
233            HttpMethod::Patch => "PATCH",
234        }
235    }
236    /// Creates an enum from field names used in the ProtoBuf definition.
237    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
238        match value {
239            "HttpMethod_UNKNOWN" => Some(Self::Unknown),
240            "GET" => Some(Self::Get),
241            "POST" => Some(Self::Post),
242            "PUT" => Some(Self::Put),
243            "DELETE" => Some(Self::Delete),
244            "HEAD" => Some(Self::Head),
245            "PATCH" => Some(Self::Patch),
246            _ => None,
247        }
248    }
249}
250#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
251#[repr(i32)]
252pub enum UpsertEffect {
253    Unknown = 0,
254    Created = 1,
255    /// aka. OK
256    Modified = 2,
257    /// No change
258    NotModified = 3,
259}
260impl UpsertEffect {
261    /// String value of the enum field names used in the ProtoBuf definition.
262    ///
263    /// The values are not transformed in any way and thus are considered stable
264    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
265    pub fn as_str_name(&self) -> &'static str {
266        match self {
267            UpsertEffect::Unknown => "UpsertEffect_UNKNOWN",
268            UpsertEffect::Created => "CREATED",
269            UpsertEffect::Modified => "MODIFIED",
270            UpsertEffect::NotModified => "NOT_MODIFIED",
271        }
272    }
273    /// Creates an enum from field names used in the ProtoBuf definition.
274    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
275        match value {
276            "UpsertEffect_UNKNOWN" => Some(Self::Unknown),
277            "CREATED" => Some(Self::Created),
278            "MODIFIED" => Some(Self::Modified),
279            "NOT_MODIFIED" => Some(Self::NotModified),
280            _ => None,
281        }
282    }
283}