zitadel-with-serde 0.1.1-alpha.6

An implementation of ZITADEL API access and authentication in Rust. Now with support for serde for easy JSON serialization and deserialization.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
// @generated
// This file is @generated by prost-build.
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Target {
    /// The unique identifier of the target.
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    /// The timestamp of the target creation.
    #[prost(message, optional, tag="2")]
    pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
    /// The timestamp of the last change to the target (e.g. creation, activation, deactivation).
    #[prost(message, optional, tag="3")]
    pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
    #[prost(string, tag="4")]
    pub name: ::prost::alloc::string::String,
    /// Timeout defines the duration until ZITADEL cancels the execution.
    /// If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.
    #[prost(message, optional, tag="8")]
    pub timeout: ::core::option::Option<::pbjson_types::Duration>,
    #[prost(string, tag="9")]
    pub endpoint: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub signing_key: ::prost::alloc::string::String,
    /// Defines the target type and how the response of the target is treated.
    #[prost(oneof="target::TargetType", tags="5, 6, 7")]
    pub target_type: ::core::option::Option<target::TargetType>,
}
/// Nested message and enum types in `Target`.
pub mod target {
    /// Defines the target type and how the response of the target is treated.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum TargetType {
        #[prost(message, tag="5")]
        RestWebhook(super::RestWebhook),
        #[prost(message, tag="6")]
        RestCall(super::RestCall),
        #[prost(message, tag="7")]
        RestAsync(super::RestAsync),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RestWebhook {
    /// Define if any error stops the whole execution. By default the process continues as normal.
    #[prost(bool, tag="1")]
    pub interrupt_on_error: bool,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RestCall {
    /// Define if any error stops the whole execution. By default the process continues as normal.
    #[prost(bool, tag="1")]
    pub interrupt_on_error: bool,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RestAsync {
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
    #[prost(message, optional, tag="1")]
    pub condition: ::core::option::Option<Condition>,
    /// The timestamp of the execution creation.
    #[prost(message, optional, tag="2")]
    pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
    /// The timestamp of the last change to the execution.
    #[prost(message, optional, tag="3")]
    pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Ordered list of targets called during the execution.
    #[prost(string, repeated, tag="4")]
    pub targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Condition {
    /// Condition-types under which conditions the execution should happen, only one possible.
    #[prost(oneof="condition::ConditionType", tags="1, 2, 3, 4")]
    pub condition_type: ::core::option::Option<condition::ConditionType>,
}
/// Nested message and enum types in `Condition`.
pub mod condition {
    /// Condition-types under which conditions the execution should happen, only one possible.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ConditionType {
        /// Condition-type to execute if a request on the defined API point happens.
        #[prost(message, tag="1")]
        Request(super::RequestExecution),
        /// Condition-type to execute on response if a request on the defined API point happens.
        #[prost(message, tag="2")]
        Response(super::ResponseExecution),
        /// Condition-type to execute if function is used, replaces actions v1.
        #[prost(message, tag="3")]
        Function(super::FunctionExecution),
        /// Condition-type to execute if an event is created in the system.
        #[prost(message, tag="4")]
        Event(super::EventExecution),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestExecution {
    /// Condition for the request execution. Only one is possible.
    #[prost(oneof="request_execution::Condition", tags="1, 2, 3")]
    pub condition: ::core::option::Option<request_execution::Condition>,
}
/// Nested message and enum types in `RequestExecution`.
pub mod request_execution {
    /// Condition for the request execution. Only one is possible.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Condition {
        /// GRPC-method as condition.
        #[prost(string, tag="1")]
        Method(::prost::alloc::string::String),
        /// GRPC-service as condition.
        #[prost(string, tag="2")]
        Service(::prost::alloc::string::String),
        /// All calls to any available services and methods as condition.
        #[prost(bool, tag="3")]
        All(bool),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseExecution {
    /// Condition for the response execution. Only one is possible.
    #[prost(oneof="response_execution::Condition", tags="1, 2, 3")]
    pub condition: ::core::option::Option<response_execution::Condition>,
}
/// Nested message and enum types in `ResponseExecution`.
pub mod response_execution {
    /// Condition for the response execution. Only one is possible.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Condition {
        /// GRPC-method as condition.
        #[prost(string, tag="1")]
        Method(::prost::alloc::string::String),
        /// GRPC-service as condition.
        #[prost(string, tag="2")]
        Service(::prost::alloc::string::String),
        /// All calls to any available services and methods as condition.
        #[prost(bool, tag="3")]
        All(bool),
    }
}
/// Executed on the specified function
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionExecution {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventExecution {
    /// Condition for the event execution. Only one is possible.
    #[prost(oneof="event_execution::Condition", tags="1, 2, 3")]
    pub condition: ::core::option::Option<event_execution::Condition>,
}
/// Nested message and enum types in `EventExecution`.
pub mod event_execution {
    /// Condition for the event execution. Only one is possible.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Condition {
        /// Event name as condition.
        #[prost(string, tag="1")]
        Event(::prost::alloc::string::String),
        /// Event group as condition, all events under this group.
        #[prost(string, tag="2")]
        Group(::prost::alloc::string::String),
        /// all events as condition.
        #[prost(bool, tag="3")]
        All(bool),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionSearchFilter {
    #[prost(oneof="execution_search_filter::Filter", tags="1, 2, 3")]
    pub filter: ::core::option::Option<execution_search_filter::Filter>,
}
/// Nested message and enum types in `ExecutionSearchFilter`.
pub mod execution_search_filter {
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Filter {
        #[prost(message, tag="1")]
        InConditionsFilter(super::InConditionsFilter),
        #[prost(message, tag="2")]
        ExecutionTypeFilter(super::ExecutionTypeFilter),
        #[prost(message, tag="3")]
        TargetFilter(super::TargetFilter),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InConditionsFilter {
    /// Defines the conditions to query for.
    #[prost(message, repeated, tag="1")]
    pub conditions: ::prost::alloc::vec::Vec<Condition>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExecutionTypeFilter {
    /// Defines the type to query for.
    #[prost(enumeration="ExecutionType", tag="1")]
    pub execution_type: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetFilter {
    /// Defines the id to query for.
    #[prost(string, tag="1")]
    pub target_id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetSearchFilter {
    #[prost(oneof="target_search_filter::Filter", tags="1, 2")]
    pub filter: ::core::option::Option<target_search_filter::Filter>,
}
/// Nested message and enum types in `TargetSearchFilter`.
pub mod target_search_filter {
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Filter {
        #[prost(message, tag="1")]
        TargetNameFilter(super::TargetNameFilter),
        #[prost(message, tag="2")]
        InTargetIdsFilter(super::InTargetIDsFilter),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetNameFilter {
    /// Defines the name of the target to query for.
    #[prost(string, tag="1")]
    pub target_name: ::prost::alloc::string::String,
    /// Defines which text comparison method used for the name query.
    #[prost(enumeration="super::super::filter::v2::TextFilterMethod", tag="2")]
    pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InTargetIDsFilter {
    /// Defines the ids to query for.
    #[prost(string, repeated, tag="1")]
    pub target_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TargetFieldName {
    Unspecified = 0,
    Id = 1,
    CreatedDate = 2,
    ChangedDate = 3,
    Name = 4,
    TargetType = 5,
    Url = 6,
    Timeout = 7,
    InterruptOnError = 8,
}
impl TargetFieldName {
    /// 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 => "TARGET_FIELD_NAME_UNSPECIFIED",
            Self::Id => "TARGET_FIELD_NAME_ID",
            Self::CreatedDate => "TARGET_FIELD_NAME_CREATED_DATE",
            Self::ChangedDate => "TARGET_FIELD_NAME_CHANGED_DATE",
            Self::Name => "TARGET_FIELD_NAME_NAME",
            Self::TargetType => "TARGET_FIELD_NAME_TARGET_TYPE",
            Self::Url => "TARGET_FIELD_NAME_URL",
            Self::Timeout => "TARGET_FIELD_NAME_TIMEOUT",
            Self::InterruptOnError => "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TARGET_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified),
            "TARGET_FIELD_NAME_ID" => Some(Self::Id),
            "TARGET_FIELD_NAME_CREATED_DATE" => Some(Self::CreatedDate),
            "TARGET_FIELD_NAME_CHANGED_DATE" => Some(Self::ChangedDate),
            "TARGET_FIELD_NAME_NAME" => Some(Self::Name),
            "TARGET_FIELD_NAME_TARGET_TYPE" => Some(Self::TargetType),
            "TARGET_FIELD_NAME_URL" => Some(Self::Url),
            "TARGET_FIELD_NAME_TIMEOUT" => Some(Self::Timeout),
            "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR" => Some(Self::InterruptOnError),
            _ => None,
        }
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionType {
    Unspecified = 0,
    Request = 1,
    Response = 2,
    Event = 3,
    Function = 4,
}
impl ExecutionType {
    /// 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 => "EXECUTION_TYPE_UNSPECIFIED",
            Self::Request => "EXECUTION_TYPE_REQUEST",
            Self::Response => "EXECUTION_TYPE_RESPONSE",
            Self::Event => "EXECUTION_TYPE_EVENT",
            Self::Function => "EXECUTION_TYPE_FUNCTION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXECUTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXECUTION_TYPE_REQUEST" => Some(Self::Request),
            "EXECUTION_TYPE_RESPONSE" => Some(Self::Response),
            "EXECUTION_TYPE_EVENT" => Some(Self::Event),
            "EXECUTION_TYPE_FUNCTION" => Some(Self::Function),
            _ => None,
        }
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionFieldName {
    Unspecified = 0,
    Id = 1,
    CreatedDate = 2,
    ChangedDate = 3,
}
impl ExecutionFieldName {
    /// 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 => "EXECUTION_FIELD_NAME_UNSPECIFIED",
            Self::Id => "EXECUTION_FIELD_NAME_ID",
            Self::CreatedDate => "EXECUTION_FIELD_NAME_CREATED_DATE",
            Self::ChangedDate => "EXECUTION_FIELD_NAME_CHANGED_DATE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXECUTION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified),
            "EXECUTION_FIELD_NAME_ID" => Some(Self::Id),
            "EXECUTION_FIELD_NAME_CREATED_DATE" => Some(Self::CreatedDate),
            "EXECUTION_FIELD_NAME_CHANGED_DATE" => Some(Self::ChangedDate),
            _ => None,
        }
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTargetRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// Timeout defines the duration until ZITADEL cancels the execution.
    /// If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.
    #[prost(message, optional, tag="5")]
    pub timeout: ::core::option::Option<::pbjson_types::Duration>,
    #[prost(string, tag="6")]
    pub endpoint: ::prost::alloc::string::String,
    /// Defines the target type and how the response of the target is treated.
    #[prost(oneof="create_target_request::TargetType", tags="2, 3, 4")]
    pub target_type: ::core::option::Option<create_target_request::TargetType>,
}
/// Nested message and enum types in `CreateTargetRequest`.
pub mod create_target_request {
    /// Defines the target type and how the response of the target is treated.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum TargetType {
        /// Wait for response but response body is ignored, status is checked, call is sent as post.
        #[prost(message, tag="2")]
        RestWebhook(super::RestWebhook),
        /// Wait for response and response body is used, status is checked, call is sent as post.
        #[prost(message, tag="3")]
        RestCall(super::RestCall),
        /// Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
        #[prost(message, tag="4")]
        RestAsync(super::RestAsync),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTargetResponse {
    /// The unique identifier of the newly created target.
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    /// The timestamp of the target creation.
    #[prost(message, optional, tag="2")]
    pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Key used to sign and check payload sent to the target.
    #[prost(string, tag="3")]
    pub signing_key: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTargetRequest {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// Timeout defines the duration until ZITADEL cancels the execution.
    /// If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.
    #[prost(message, optional, tag="6")]
    pub timeout: ::core::option::Option<::pbjson_types::Duration>,
    #[prost(string, optional, tag="7")]
    pub endpoint: ::core::option::Option<::prost::alloc::string::String>,
    /// Regenerate the key used for signing and checking the payload sent to the target.
    /// Set the graceful period for the existing key. During that time, the previous
    /// signing key and the new one will be used to sign the request to allow you a smooth
    /// transition onf your API.
    ///
    /// Note that we currently only allow an immediate rotation ("0s") and will support
    /// longer expirations in the future.
    #[prost(message, optional, tag="8")]
    pub expiration_signing_key: ::core::option::Option<::pbjson_types::Duration>,
    /// Defines the target type and how the response of the target is treated.
    #[prost(oneof="update_target_request::TargetType", tags="3, 4, 5")]
    pub target_type: ::core::option::Option<update_target_request::TargetType>,
}
/// Nested message and enum types in `UpdateTargetRequest`.
pub mod update_target_request {
    /// Defines the target type and how the response of the target is treated.
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[serde(crate = "serde", rename_all = "snake_case")]
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum TargetType {
        /// Wait for response but response body is ignored, status is checked, call is sent as post.
        #[prost(message, tag="3")]
        RestWebhook(super::RestWebhook),
        /// Wait for response and response body is used, status is checked, call is sent as post.
        #[prost(message, tag="4")]
        RestCall(super::RestCall),
        /// Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
        #[prost(message, tag="5")]
        RestAsync(super::RestAsync),
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTargetResponse {
    /// The timestamp of the change of the target.
    #[prost(message, optional, tag="1")]
    pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Key used to sign and check payload sent to the target.
    #[prost(string, optional, tag="2")]
    pub signing_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTargetRequest {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteTargetResponse {
    /// The timestamp of the deletion of the target.
    /// Note that the deletion date is only guaranteed to be set if the deletion was successful during the request.
    /// In case the deletion occurred in a previous request, the deletion date might be empty.
    #[prost(message, optional, tag="3")]
    pub deletion_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTargetRequest {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTargetResponse {
    #[prost(message, optional, tag="1")]
    pub target: ::core::option::Option<Target>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTargetsRequest {
    /// List limitations and ordering.
    #[prost(message, optional, tag="1")]
    pub pagination: ::core::option::Option<super::super::filter::v2::PaginationRequest>,
    /// The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.
    #[prost(enumeration="TargetFieldName", optional, tag="2")]
    pub sorting_column: ::core::option::Option<i32>,
    /// Define the criteria to query for.
    #[prost(message, repeated, tag="3")]
    pub filters: ::prost::alloc::vec::Vec<TargetSearchFilter>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTargetsResponse {
    #[prost(message, optional, tag="1")]
    pub pagination: ::core::option::Option<super::super::filter::v2::PaginationResponse>,
    #[prost(message, repeated, tag="2")]
    pub targets: ::prost::alloc::vec::Vec<Target>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetExecutionRequest {
    /// Condition defining when the execution should be used.
    #[prost(message, optional, tag="1")]
    pub condition: ::core::option::Option<Condition>,
    /// Ordered list of targets called during the execution.
    #[prost(string, repeated, tag="2")]
    pub targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetExecutionResponse {
    /// The timestamp of the execution set.
    #[prost(message, optional, tag="1")]
    pub set_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsRequest {
    /// List limitations and ordering.
    #[prost(message, optional, tag="1")]
    pub pagination: ::core::option::Option<super::super::filter::v2::PaginationRequest>,
    /// The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.
    #[prost(enumeration="ExecutionFieldName", optional, tag="2")]
    pub sorting_column: ::core::option::Option<i32>,
    /// Define the criteria to query for.
    #[prost(message, repeated, tag="3")]
    pub filters: ::prost::alloc::vec::Vec<ExecutionSearchFilter>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsResponse {
    #[prost(message, optional, tag="1")]
    pub pagination: ::core::option::Option<super::super::filter::v2::PaginationResponse>,
    #[prost(message, repeated, tag="2")]
    pub executions: ::prost::alloc::vec::Vec<Execution>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListExecutionFunctionsRequest {
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionFunctionsResponse {
    /// All available methods
    #[prost(string, repeated, tag="1")]
    pub functions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListExecutionMethodsRequest {
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionMethodsResponse {
    /// All available methods
    #[prost(string, repeated, tag="1")]
    pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListExecutionServicesRequest {
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionServicesResponse {
    /// All available methods
    #[prost(string, repeated, tag="1")]
    pub services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
include!("zitadel.action.v2.tonic.rs");
// @@protoc_insertion_point(module)