Skip to content

Commit 0a38555

Browse files
committed
envoy-types: update generated files
After upgrading `protoc` to the latest stable release (v31.1).
1 parent 3e142f3 commit 0a38555

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

envoy-types/src/generated/google.protobuf.rs

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ pub struct FileDescriptorProto {
138138
/// For Google-internal migration only. Do not use.
139139
#[prost(int32, repeated, packed = "false", tag = "11")]
140140
pub weak_dependency: ::prost::alloc::vec::Vec<i32>,
141+
/// Names of files imported by this file purely for the purpose of providing
142+
/// option extensions. These are excluded from the dependency list above.
143+
#[prost(string, repeated, tag = "15")]
144+
pub option_dependency: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
141145
/// All top-level definitions in this file.
142146
#[prost(message, repeated, tag = "4")]
143147
pub message_type: ::prost::alloc::vec::Vec<DescriptorProto>,
@@ -196,6 +200,9 @@ pub struct DescriptorProto {
196200
/// A given name may only be reserved once.
197201
#[prost(string, repeated, tag = "10")]
198202
pub reserved_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
203+
/// Support for `export` and `local` keywords on enums.
204+
#[prost(enumeration = "SymbolVisibility", optional, tag = "11")]
205+
pub visibility: ::core::option::Option<i32>,
199206
}
200207
/// Nested message and enum types in `DescriptorProto`.
201208
pub mod descriptor_proto {
@@ -551,6 +558,9 @@ pub struct EnumDescriptorProto {
551558
/// be reserved once.
552559
#[prost(string, repeated, tag = "5")]
553560
pub reserved_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
561+
/// Support for `export` and `local` keywords on enums.
562+
#[prost(enumeration = "SymbolVisibility", optional, tag = "6")]
563+
pub visibility: ::core::option::Option<i32>,
554564
}
555565
/// Nested message and enum types in `EnumDescriptorProto`.
556566
pub mod enum_descriptor_proto {
@@ -1413,9 +1423,71 @@ pub struct FeatureSet {
14131423
pub json_format: ::core::option::Option<i32>,
14141424
#[prost(enumeration = "feature_set::EnforceNamingStyle", optional, tag = "7")]
14151425
pub enforce_naming_style: ::core::option::Option<i32>,
1426+
#[prost(
1427+
enumeration = "feature_set::visibility_feature::DefaultSymbolVisibility",
1428+
optional,
1429+
tag = "8"
1430+
)]
1431+
pub default_symbol_visibility: ::core::option::Option<i32>,
14161432
}
14171433
/// Nested message and enum types in `FeatureSet`.
14181434
pub mod feature_set {
1435+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1436+
pub struct VisibilityFeature {}
1437+
/// Nested message and enum types in `VisibilityFeature`.
1438+
pub mod visibility_feature {
1439+
#[derive(
1440+
Clone,
1441+
Copy,
1442+
Debug,
1443+
PartialEq,
1444+
Eq,
1445+
Hash,
1446+
PartialOrd,
1447+
Ord,
1448+
::prost::Enumeration
1449+
)]
1450+
#[repr(i32)]
1451+
pub enum DefaultSymbolVisibility {
1452+
Unknown = 0,
1453+
/// Default pre-EDITION_2024, all UNSET visibility are export.
1454+
ExportAll = 1,
1455+
/// All top-level symbols default to export, nested default to local.
1456+
ExportTopLevel = 2,
1457+
/// All symbols default to local.
1458+
LocalAll = 3,
1459+
/// All symbols local by default. Nested types cannot be exported.
1460+
/// With special case caveat for message { enum {} reserved 1 to max; }
1461+
/// This is the recommended setting for new protos.
1462+
Strict = 4,
1463+
}
1464+
impl DefaultSymbolVisibility {
1465+
/// String value of the enum field names used in the ProtoBuf definition.
1466+
///
1467+
/// The values are not transformed in any way and thus are considered stable
1468+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1469+
pub fn as_str_name(&self) -> &'static str {
1470+
match self {
1471+
Self::Unknown => "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
1472+
Self::ExportAll => "EXPORT_ALL",
1473+
Self::ExportTopLevel => "EXPORT_TOP_LEVEL",
1474+
Self::LocalAll => "LOCAL_ALL",
1475+
Self::Strict => "STRICT",
1476+
}
1477+
}
1478+
/// Creates an enum from field names used in the ProtoBuf definition.
1479+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1480+
match value {
1481+
"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" => Some(Self::Unknown),
1482+
"EXPORT_ALL" => Some(Self::ExportAll),
1483+
"EXPORT_TOP_LEVEL" => Some(Self::ExportTopLevel),
1484+
"LOCAL_ALL" => Some(Self::LocalAll),
1485+
"STRICT" => Some(Self::Strict),
1486+
_ => None,
1487+
}
1488+
}
1489+
}
1490+
}
14191491
#[derive(
14201492
Clone,
14211493
Copy,
@@ -2027,6 +2099,40 @@ impl Edition {
20272099
}
20282100
}
20292101
}
2102+
/// Describes the 'visibility' of a symbol with respect to the proto import
2103+
/// system. Symbols can only be imported when the visibility rules do not prevent
2104+
/// it (ex: local symbols cannot be imported). Visibility modifiers can only set
2105+
/// on `message` and `enum` as they are the only types available to be referenced
2106+
/// from other files.
2107+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2108+
#[repr(i32)]
2109+
pub enum SymbolVisibility {
2110+
VisibilityUnset = 0,
2111+
VisibilityLocal = 1,
2112+
VisibilityExport = 2,
2113+
}
2114+
impl SymbolVisibility {
2115+
/// String value of the enum field names used in the ProtoBuf definition.
2116+
///
2117+
/// The values are not transformed in any way and thus are considered stable
2118+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
2119+
pub fn as_str_name(&self) -> &'static str {
2120+
match self {
2121+
Self::VisibilityUnset => "VISIBILITY_UNSET",
2122+
Self::VisibilityLocal => "VISIBILITY_LOCAL",
2123+
Self::VisibilityExport => "VISIBILITY_EXPORT",
2124+
}
2125+
}
2126+
/// Creates an enum from field names used in the ProtoBuf definition.
2127+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2128+
match value {
2129+
"VISIBILITY_UNSET" => Some(Self::VisibilityUnset),
2130+
"VISIBILITY_LOCAL" => Some(Self::VisibilityLocal),
2131+
"VISIBILITY_EXPORT" => Some(Self::VisibilityExport),
2132+
_ => None,
2133+
}
2134+
}
2135+
}
20302136
/// `Any` contains an arbitrary serialized protocol buffer message along with a
20312137
/// URL that describes the type of the serialized message.
20322138
///
2.47 KB
Binary file not shown.

0 commit comments

Comments
 (0)