xds_api/generated/
udpa.annotations.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct StatusAnnotation {
4    /// The entity is work-in-progress and subject to breaking changes.
5    #[prost(bool, tag = "1")]
6    pub work_in_progress: bool,
7    /// The entity belongs to a package with the given version status.
8    #[prost(enumeration = "PackageVersionStatus", tag = "2")]
9    pub package_version_status: i32,
10}
11impl ::prost::Name for StatusAnnotation {
12    const NAME: &'static str = "StatusAnnotation";
13    const PACKAGE: &'static str = "udpa.annotations";
14    fn full_name() -> ::prost::alloc::string::String {
15        "udpa.annotations.StatusAnnotation".into()
16    }
17    fn type_url() -> ::prost::alloc::string::String {
18        "/udpa.annotations.StatusAnnotation".into()
19    }
20}
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
22#[repr(i32)]
23pub enum PackageVersionStatus {
24    /// Unknown package version status.
25    Unknown = 0,
26    /// This version of the package is frozen.
27    Frozen = 1,
28    /// This version of the package is the active development version.
29    Active = 2,
30    /// This version of the package is the candidate for the next major version. It
31    /// is typically machine generated from the active development version.
32    NextMajorVersionCandidate = 3,
33}
34impl PackageVersionStatus {
35    /// String value of the enum field names used in the ProtoBuf definition.
36    ///
37    /// The values are not transformed in any way and thus are considered stable
38    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
39    pub fn as_str_name(&self) -> &'static str {
40        match self {
41            Self::Unknown => "UNKNOWN",
42            Self::Frozen => "FROZEN",
43            Self::Active => "ACTIVE",
44            Self::NextMajorVersionCandidate => "NEXT_MAJOR_VERSION_CANDIDATE",
45        }
46    }
47    /// Creates an enum from field names used in the ProtoBuf definition.
48    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
49        match value {
50            "UNKNOWN" => Some(Self::Unknown),
51            "FROZEN" => Some(Self::Frozen),
52            "ACTIVE" => Some(Self::Active),
53            "NEXT_MAJOR_VERSION_CANDIDATE" => Some(Self::NextMajorVersionCandidate),
54            _ => None,
55        }
56    }
57}
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct VersioningAnnotation {
60    /// Track the previous message type. E.g. this message might be
61    /// udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This
62    /// information is consumed by UDPA via proto descriptors.
63    #[prost(string, tag = "1")]
64    pub previous_message_type: ::prost::alloc::string::String,
65}
66impl ::prost::Name for VersioningAnnotation {
67    const NAME: &'static str = "VersioningAnnotation";
68    const PACKAGE: &'static str = "udpa.annotations";
69    fn full_name() -> ::prost::alloc::string::String {
70        "udpa.annotations.VersioningAnnotation".into()
71    }
72    fn type_url() -> ::prost::alloc::string::String {
73        "/udpa.annotations.VersioningAnnotation".into()
74    }
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct MigrateAnnotation {
78    /// Rename the message/enum/enum value in next version.
79    #[prost(string, tag = "1")]
80    pub rename: ::prost::alloc::string::String,
81}
82impl ::prost::Name for MigrateAnnotation {
83    const NAME: &'static str = "MigrateAnnotation";
84    const PACKAGE: &'static str = "udpa.annotations";
85    fn full_name() -> ::prost::alloc::string::String {
86        "udpa.annotations.MigrateAnnotation".into()
87    }
88    fn type_url() -> ::prost::alloc::string::String {
89        "/udpa.annotations.MigrateAnnotation".into()
90    }
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct FieldMigrateAnnotation {
94    /// Rename the field in next version.
95    #[prost(string, tag = "1")]
96    pub rename: ::prost::alloc::string::String,
97    /// Add the field to a named oneof in next version. If this already exists, the
98    /// field will join its siblings under the oneof, otherwise a new oneof will be
99    /// created with the given name.
100    #[prost(string, tag = "2")]
101    pub oneof_promotion: ::prost::alloc::string::String,
102}
103impl ::prost::Name for FieldMigrateAnnotation {
104    const NAME: &'static str = "FieldMigrateAnnotation";
105    const PACKAGE: &'static str = "udpa.annotations";
106    fn full_name() -> ::prost::alloc::string::String {
107        "udpa.annotations.FieldMigrateAnnotation".into()
108    }
109    fn type_url() -> ::prost::alloc::string::String {
110        "/udpa.annotations.FieldMigrateAnnotation".into()
111    }
112}
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct FileMigrateAnnotation {
115    /// Move all types in the file to another package, this implies changing proto
116    /// file path.
117    #[prost(string, tag = "2")]
118    pub move_to_package: ::prost::alloc::string::String,
119}
120impl ::prost::Name for FileMigrateAnnotation {
121    const NAME: &'static str = "FileMigrateAnnotation";
122    const PACKAGE: &'static str = "udpa.annotations";
123    fn full_name() -> ::prost::alloc::string::String {
124        "udpa.annotations.FileMigrateAnnotation".into()
125    }
126    fn type_url() -> ::prost::alloc::string::String {
127        "/udpa.annotations.FileMigrateAnnotation".into()
128    }
129}
130/// These annotations indicate metadata for the purpose of understanding the
131/// security significance of fields.
132#[derive(Clone, Copy, PartialEq, ::prost::Message)]
133pub struct FieldSecurityAnnotation {
134    /// Field should be set in the presence of untrusted downstreams.
135    #[prost(bool, tag = "1")]
136    pub configure_for_untrusted_downstream: bool,
137    /// Field should be set in the presence of untrusted upstreams.
138    #[prost(bool, tag = "2")]
139    pub configure_for_untrusted_upstream: bool,
140}
141impl ::prost::Name for FieldSecurityAnnotation {
142    const NAME: &'static str = "FieldSecurityAnnotation";
143    const PACKAGE: &'static str = "udpa.annotations";
144    fn full_name() -> ::prost::alloc::string::String {
145        "udpa.annotations.FieldSecurityAnnotation".into()
146    }
147    fn type_url() -> ::prost::alloc::string::String {
148        "/udpa.annotations.FieldSecurityAnnotation".into()
149    }
150}