google_ai_rs/proto/
executable_code.rs

1/// Supported programming languages for the generated code.
2#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3#[repr(i32)]
4pub enum Language {
5    /// Unspecified language. This value should not be used.
6    Unspecified = 0,
7    /// Python >= 3.10, with numpy and simpy available.
8    Python = 1,
9}
10impl Language {
11    /// String value of the enum field names used in the ProtoBuf definition.
12    ///
13    /// The values are not transformed in any way and thus are considered stable
14    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
15    pub fn as_str_name(&self) -> &'static str {
16        match self {
17            Self::Unspecified => "LANGUAGE_UNSPECIFIED",
18            Self::Python => "PYTHON",
19        }
20    }
21    /// Creates an enum from field names used in the ProtoBuf definition.
22    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
23        match value {
24            "LANGUAGE_UNSPECIFIED" => Some(Self::Unspecified),
25            "PYTHON" => Some(Self::Python),
26            _ => None,
27        }
28    }
29}