cerbos 0.5.0

Rust SDK for working with Cerbos: an open core, language-agnostic, scalable authorization solution
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
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanResourcesResponse {
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    #[deprecated]
    #[prost(string, tag = "2")]
    pub action: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "9")]
    pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "3")]
    pub resource_kind: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub policy_version: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub filter: ::core::option::Option<super::super::engine::v1::PlanResourcesFilter>,
    #[prost(message, optional, tag = "6")]
    pub meta: ::core::option::Option<plan_resources_response::Meta>,
    #[prost(message, repeated, tag = "7")]
    pub validation_errors: ::prost::alloc::vec::Vec<
        super::super::schema::v1::ValidationError,
    >,
    #[prost(string, tag = "8")]
    pub cerbos_call_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `PlanResourcesResponse`.
pub mod plan_resources_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Meta {
        #[prost(string, tag = "1")]
        pub filter_debug: ::prost::alloc::string::String,
        #[deprecated]
        #[prost(string, tag = "2")]
        pub matched_scope: ::prost::alloc::string::String,
        #[prost(map = "string, string", tag = "3")]
        pub matched_scopes: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
    }
}
/// Deprecated. See CheckResourcesResponse.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckResourceSetResponse {
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    #[prost(map = "string, message", tag = "2")]
    pub resource_instances: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        check_resource_set_response::ActionEffectMap,
    >,
    #[prost(message, optional, tag = "3")]
    pub meta: ::core::option::Option<check_resource_set_response::Meta>,
}
/// Nested message and enum types in `CheckResourceSetResponse`.
pub mod check_resource_set_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ActionEffectMap {
        #[prost(
            map = "string, enumeration(super::super::super::effect::v1::Effect)",
            tag = "1"
        )]
        pub actions: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
        #[prost(message, repeated, tag = "2")]
        pub validation_errors: ::prost::alloc::vec::Vec<
            super::super::super::schema::v1::ValidationError,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Meta {
        #[prost(map = "string, message", tag = "1")]
        pub resource_instances: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            meta::ActionMeta,
        >,
    }
    /// Nested message and enum types in `Meta`.
    pub mod meta {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct EffectMeta {
            #[prost(string, tag = "1")]
            pub matched_policy: ::prost::alloc::string::String,
            #[prost(string, tag = "2")]
            pub matched_scope: ::prost::alloc::string::String,
        }
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct ActionMeta {
            #[prost(map = "string, message", tag = "1")]
            pub actions: ::std::collections::HashMap<
                ::prost::alloc::string::String,
                EffectMeta,
            >,
            #[prost(string, repeated, tag = "2")]
            pub effective_derived_roles: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
        }
    }
}
/// Deprecated. See CheckResourcesResponse.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckResourceBatchResponse {
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub results: ::prost::alloc::vec::Vec<
        check_resource_batch_response::ActionEffectMap,
    >,
}
/// Nested message and enum types in `CheckResourceBatchResponse`.
pub mod check_resource_batch_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ActionEffectMap {
        #[prost(string, tag = "1")]
        pub resource_id: ::prost::alloc::string::String,
        #[prost(
            map = "string, enumeration(super::super::super::effect::v1::Effect)",
            tag = "2"
        )]
        pub actions: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
        #[prost(message, repeated, tag = "3")]
        pub validation_errors: ::prost::alloc::vec::Vec<
            super::super::super::schema::v1::ValidationError,
        >,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckResourcesResponse {
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub results: ::prost::alloc::vec::Vec<check_resources_response::ResultEntry>,
    #[prost(string, tag = "3")]
    pub cerbos_call_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `CheckResourcesResponse`.
pub mod check_resources_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ResultEntry {
        #[prost(message, optional, tag = "1")]
        pub resource: ::core::option::Option<result_entry::Resource>,
        #[prost(
            map = "string, enumeration(super::super::super::effect::v1::Effect)",
            tag = "2"
        )]
        pub actions: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
        #[prost(message, repeated, tag = "3")]
        pub validation_errors: ::prost::alloc::vec::Vec<
            super::super::super::schema::v1::ValidationError,
        >,
        #[prost(message, optional, tag = "4")]
        pub meta: ::core::option::Option<result_entry::Meta>,
        #[prost(message, repeated, tag = "5")]
        pub outputs: ::prost::alloc::vec::Vec<
            super::super::super::engine::v1::OutputEntry,
        >,
    }
    /// Nested message and enum types in `ResultEntry`.
    pub mod result_entry {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Resource {
            #[prost(string, tag = "1")]
            pub id: ::prost::alloc::string::String,
            #[prost(string, tag = "2")]
            pub kind: ::prost::alloc::string::String,
            #[prost(string, tag = "3")]
            pub policy_version: ::prost::alloc::string::String,
            #[prost(string, tag = "4")]
            pub scope: ::prost::alloc::string::String,
        }
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Meta {
            #[prost(map = "string, message", tag = "1")]
            pub actions: ::std::collections::HashMap<
                ::prost::alloc::string::String,
                meta::EffectMeta,
            >,
            #[prost(string, repeated, tag = "2")]
            pub effective_derived_roles: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
        }
        /// Nested message and enum types in `Meta`.
        pub mod meta {
            #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
            pub struct EffectMeta {
                #[prost(string, tag = "1")]
                pub matched_policy: ::prost::alloc::string::String,
                #[prost(string, tag = "2")]
                pub matched_scope: ::prost::alloc::string::String,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaygroundFailure {
    #[prost(message, repeated, tag = "1")]
    pub errors: ::prost::alloc::vec::Vec<playground_failure::Error>,
}
/// Nested message and enum types in `PlaygroundFailure`.
pub mod playground_failure {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ErrorDetails {
        #[prost(uint32, tag = "1")]
        pub line: u32,
        #[prost(uint32, tag = "2")]
        pub column: u32,
        #[prost(string, tag = "3")]
        pub context: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Error {
        #[prost(string, tag = "1")]
        pub file: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub error: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "3")]
        pub details: ::core::option::Option<ErrorDetails>,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaygroundValidateResponse {
    #[prost(string, tag = "1")]
    pub playground_id: ::prost::alloc::string::String,
    #[prost(oneof = "playground_validate_response::Outcome", tags = "2, 3")]
    pub outcome: ::core::option::Option<playground_validate_response::Outcome>,
}
/// Nested message and enum types in `PlaygroundValidateResponse`.
pub mod playground_validate_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Outcome {
        #[prost(message, tag = "2")]
        Failure(super::PlaygroundFailure),
        #[prost(message, tag = "3")]
        Success(super::super::super::super::google::protobuf::Empty),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaygroundTestResponse {
    #[prost(string, tag = "1")]
    pub playground_id: ::prost::alloc::string::String,
    #[prost(oneof = "playground_test_response::Outcome", tags = "2, 3")]
    pub outcome: ::core::option::Option<playground_test_response::Outcome>,
}
/// Nested message and enum types in `PlaygroundTestResponse`.
pub mod playground_test_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TestResults {
        #[prost(message, optional, tag = "1")]
        pub results: ::core::option::Option<
            super::super::super::policy::v1::TestResults,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Outcome {
        #[prost(message, tag = "2")]
        Failure(super::PlaygroundFailure),
        #[prost(message, tag = "3")]
        Success(TestResults),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaygroundEvaluateResponse {
    #[prost(string, tag = "1")]
    pub playground_id: ::prost::alloc::string::String,
    #[prost(oneof = "playground_evaluate_response::Outcome", tags = "2, 3")]
    pub outcome: ::core::option::Option<playground_evaluate_response::Outcome>,
}
/// Nested message and enum types in `PlaygroundEvaluateResponse`.
pub mod playground_evaluate_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EvalResult {
        #[prost(string, tag = "1")]
        pub action: ::prost::alloc::string::String,
        #[prost(enumeration = "super::super::super::effect::v1::Effect", tag = "2")]
        pub effect: i32,
        #[prost(string, tag = "3")]
        pub policy: ::prost::alloc::string::String,
        #[deprecated]
        #[prost(string, repeated, tag = "4")]
        pub effective_derived_roles: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
        #[deprecated]
        #[prost(message, repeated, tag = "5")]
        pub validation_errors: ::prost::alloc::vec::Vec<
            super::super::super::schema::v1::ValidationError,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EvalResultList {
        #[prost(message, repeated, tag = "1")]
        pub results: ::prost::alloc::vec::Vec<EvalResult>,
        #[prost(string, repeated, tag = "2")]
        pub effective_derived_roles: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
        #[prost(message, repeated, tag = "3")]
        pub validation_errors: ::prost::alloc::vec::Vec<
            super::super::super::schema::v1::ValidationError,
        >,
        #[prost(message, repeated, tag = "4")]
        pub outputs: ::prost::alloc::vec::Vec<
            super::super::super::engine::v1::OutputEntry,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Outcome {
        #[prost(message, tag = "2")]
        Failure(super::PlaygroundFailure),
        #[prost(message, tag = "3")]
        Success(EvalResultList),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaygroundProxyResponse {
    #[prost(string, tag = "1")]
    pub playground_id: ::prost::alloc::string::String,
    #[prost(oneof = "playground_proxy_response::Outcome", tags = "2, 3, 4, 5, 6")]
    pub outcome: ::core::option::Option<playground_proxy_response::Outcome>,
}
/// Nested message and enum types in `PlaygroundProxyResponse`.
pub mod playground_proxy_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Outcome {
        #[prost(message, tag = "2")]
        Failure(super::PlaygroundFailure),
        #[prost(message, tag = "3")]
        CheckResourceSet(super::CheckResourceSetResponse),
        #[prost(message, tag = "4")]
        CheckResourceBatch(super::CheckResourceBatchResponse),
        #[prost(message, tag = "5")]
        PlanResources(super::PlanResourcesResponse),
        #[prost(message, tag = "6")]
        CheckResources(super::CheckResourcesResponse),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddOrUpdatePolicyResponse {
    #[prost(message, optional, tag = "1")]
    pub success: ::core::option::Option<super::super::super::google::protobuf::Empty>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuditLogEntriesResponse {
    #[prost(oneof = "list_audit_log_entries_response::Entry", tags = "1, 2")]
    pub entry: ::core::option::Option<list_audit_log_entries_response::Entry>,
}
/// Nested message and enum types in `ListAuditLogEntriesResponse`.
pub mod list_audit_log_entries_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Entry {
        #[prost(message, tag = "1")]
        AccessLogEntry(super::super::super::audit::v1::AccessLogEntry),
        #[prost(message, tag = "2")]
        DecisionLogEntry(super::super::super::audit::v1::DecisionLogEntry),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServerInfoResponse {
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub commit: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub build_date: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPoliciesResponse {
    #[prost(string, repeated, tag = "1")]
    pub policy_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPolicyResponse {
    #[prost(message, repeated, tag = "1")]
    pub policies: ::prost::alloc::vec::Vec<super::super::policy::v1::Policy>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisablePolicyResponse {
    #[prost(uint32, tag = "1")]
    pub disabled_policies: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnablePolicyResponse {
    #[prost(uint32, tag = "1")]
    pub enabled_policies: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectPoliciesResponse {
    #[prost(map = "string, message", tag = "1")]
    pub results: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        inspect_policies_response::Result,
    >,
}
/// Nested message and enum types in `InspectPoliciesResponse`.
pub mod inspect_policies_response {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Attribute {
        #[prost(enumeration = "attribute::Kind", tag = "1")]
        pub kind: i32,
        #[prost(string, tag = "2")]
        pub name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Attribute`.
    pub mod attribute {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Kind {
            Unspecified = 0,
            PrincipalAttribute = 1,
            ResourceAttribute = 2,
        }
        impl Kind {
            /// 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 => "KIND_UNSPECIFIED",
                    Self::PrincipalAttribute => "KIND_PRINCIPAL_ATTRIBUTE",
                    Self::ResourceAttribute => "KIND_RESOURCE_ATTRIBUTE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "KIND_UNSPECIFIED" => Some(Self::Unspecified),
                    "KIND_PRINCIPAL_ATTRIBUTE" => Some(Self::PrincipalAttribute),
                    "KIND_RESOURCE_ATTRIBUTE" => Some(Self::ResourceAttribute),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct DerivedRole {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(enumeration = "derived_role::Kind", tag = "2")]
        pub kind: i32,
        #[prost(string, tag = "3")]
        pub source: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `DerivedRole`.
    pub mod derived_role {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Kind {
            Unspecified = 0,
            Undefined = 1,
            Exported = 2,
            Imported = 3,
        }
        impl Kind {
            /// 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 => "KIND_UNSPECIFIED",
                    Self::Undefined => "KIND_UNDEFINED",
                    Self::Exported => "KIND_EXPORTED",
                    Self::Imported => "KIND_IMPORTED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "KIND_UNSPECIFIED" => Some(Self::Unspecified),
                    "KIND_UNDEFINED" => Some(Self::Undefined),
                    "KIND_EXPORTED" => Some(Self::Exported),
                    "KIND_IMPORTED" => Some(Self::Imported),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Constant {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "2")]
        pub value: ::core::option::Option<
            super::super::super::super::google::protobuf::Value,
        >,
        #[prost(enumeration = "constant::Kind", tag = "3")]
        pub kind: i32,
        #[prost(string, tag = "4")]
        pub source: ::prost::alloc::string::String,
        #[prost(bool, tag = "5")]
        pub used: bool,
    }
    /// Nested message and enum types in `Constant`.
    pub mod constant {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Kind {
            Unspecified = 0,
            Exported = 1,
            Imported = 2,
            Local = 3,
            Undefined = 4,
            Unknown = 5,
        }
        impl Kind {
            /// 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 => "KIND_UNSPECIFIED",
                    Self::Exported => "KIND_EXPORTED",
                    Self::Imported => "KIND_IMPORTED",
                    Self::Local => "KIND_LOCAL",
                    Self::Undefined => "KIND_UNDEFINED",
                    Self::Unknown => "KIND_UNKNOWN",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "KIND_UNSPECIFIED" => Some(Self::Unspecified),
                    "KIND_EXPORTED" => Some(Self::Exported),
                    "KIND_IMPORTED" => Some(Self::Imported),
                    "KIND_LOCAL" => Some(Self::Local),
                    "KIND_UNDEFINED" => Some(Self::Undefined),
                    "KIND_UNKNOWN" => Some(Self::Unknown),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Variable {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub value: ::prost::alloc::string::String,
        #[prost(enumeration = "variable::Kind", tag = "3")]
        pub kind: i32,
        #[prost(string, tag = "4")]
        pub source: ::prost::alloc::string::String,
        #[prost(bool, tag = "5")]
        pub used: bool,
    }
    /// Nested message and enum types in `Variable`.
    pub mod variable {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Kind {
            Unspecified = 0,
            Exported = 1,
            Imported = 2,
            Local = 3,
            Undefined = 4,
            Unknown = 5,
        }
        impl Kind {
            /// 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 => "KIND_UNSPECIFIED",
                    Self::Exported => "KIND_EXPORTED",
                    Self::Imported => "KIND_IMPORTED",
                    Self::Local => "KIND_LOCAL",
                    Self::Undefined => "KIND_UNDEFINED",
                    Self::Unknown => "KIND_UNKNOWN",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "KIND_UNSPECIFIED" => Some(Self::Unspecified),
                    "KIND_EXPORTED" => Some(Self::Exported),
                    "KIND_IMPORTED" => Some(Self::Imported),
                    "KIND_LOCAL" => Some(Self::Local),
                    "KIND_UNDEFINED" => Some(Self::Undefined),
                    "KIND_UNKNOWN" => Some(Self::Unknown),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Result {
        #[prost(string, repeated, tag = "1")]
        pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        #[prost(message, repeated, tag = "2")]
        pub variables: ::prost::alloc::vec::Vec<Variable>,
        #[prost(string, tag = "3")]
        pub policy_id: ::prost::alloc::string::String,
        #[prost(message, repeated, tag = "4")]
        pub derived_roles: ::prost::alloc::vec::Vec<DerivedRole>,
        #[prost(message, repeated, tag = "5")]
        pub attributes: ::prost::alloc::vec::Vec<Attribute>,
        #[prost(message, repeated, tag = "6")]
        pub constants: ::prost::alloc::vec::Vec<Constant>,
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddOrUpdateSchemaResponse {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListSchemasResponse {
    #[prost(string, repeated, tag = "1")]
    pub schema_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSchemaResponse {
    #[prost(message, repeated, tag = "1")]
    pub schemas: ::prost::alloc::vec::Vec<super::super::schema::v1::Schema>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSchemaResponse {
    #[prost(uint32, tag = "1")]
    pub deleted_schemas: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReloadStoreResponse {}