nominal_api/proto/
google.api.rs1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Http {
4 #[prost(message, repeated, tag = "1")]
5 pub rules: ::prost::alloc::vec::Vec<HttpRule>,
6 #[prost(bool, tag = "2")]
7 pub fully_decode_reserved_expansion: bool,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct HttpRule {
11 #[prost(string, tag = "1")]
12 pub selector: ::prost::alloc::string::String,
13 #[prost(string, tag = "7")]
14 pub body: ::prost::alloc::string::String,
15 #[prost(string, tag = "12")]
16 pub response_body: ::prost::alloc::string::String,
17 #[prost(message, repeated, tag = "11")]
18 pub additional_bindings: ::prost::alloc::vec::Vec<HttpRule>,
19 #[prost(oneof = "http_rule::Pattern", tags = "2, 3, 4, 5, 6, 8")]
20 pub pattern: ::core::option::Option<http_rule::Pattern>,
21}
22pub mod http_rule {
24 #[derive(Clone, PartialEq, ::prost::Oneof)]
25 pub enum Pattern {
26 #[prost(string, tag = "2")]
27 Get(::prost::alloc::string::String),
28 #[prost(string, tag = "3")]
29 Put(::prost::alloc::string::String),
30 #[prost(string, tag = "4")]
31 Post(::prost::alloc::string::String),
32 #[prost(string, tag = "5")]
33 Delete(::prost::alloc::string::String),
34 #[prost(string, tag = "6")]
35 Patch(::prost::alloc::string::String),
36 #[prost(message, tag = "8")]
37 Custom(super::CustomHttpPattern),
38 }
39}
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct CustomHttpPattern {
42 #[prost(string, tag = "1")]
43 pub kind: ::prost::alloc::string::String,
44 #[prost(string, tag = "2")]
45 pub path: ::prost::alloc::string::String,
46}
47#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
48#[repr(i32)]
49pub enum FieldBehavior {
50 Unspecified = 0,
51 Optional = 1,
52 Required = 2,
53 OutputOnly = 3,
54 InputOnly = 4,
55 Immutable = 5,
56 UnorderedList = 6,
57 NonEmptyDefault = 7,
58 Identifier = 8,
59}
60impl FieldBehavior {
61 pub fn as_str_name(&self) -> &'static str {
66 match self {
67 Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
68 Self::Optional => "OPTIONAL",
69 Self::Required => "REQUIRED",
70 Self::OutputOnly => "OUTPUT_ONLY",
71 Self::InputOnly => "INPUT_ONLY",
72 Self::Immutable => "IMMUTABLE",
73 Self::UnorderedList => "UNORDERED_LIST",
74 Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
75 Self::Identifier => "IDENTIFIER",
76 }
77 }
78 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
80 match value {
81 "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
82 "OPTIONAL" => Some(Self::Optional),
83 "REQUIRED" => Some(Self::Required),
84 "OUTPUT_ONLY" => Some(Self::OutputOnly),
85 "INPUT_ONLY" => Some(Self::InputOnly),
86 "IMMUTABLE" => Some(Self::Immutable),
87 "UNORDERED_LIST" => Some(Self::UnorderedList),
88 "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
89 "IDENTIFIER" => Some(Self::Identifier),
90 _ => None,
91 }
92 }
93}