yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LagInfo {
    /// ID of LAG.
    /// Optional.
    /// If is not set scheduler selects it by himself.
    #[prost(message, optional, tag = "1")]
    pub lag_id: ::core::option::Option<i64>,
    /// List of port names that the LAG is deployed on.
    #[prost(string, repeated, tag = "2")]
    pub port_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Structure for create and update requests that describes LAG allocation settings
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LagAllocationSettingsRequest {
    #[prost(oneof = "lag_allocation_settings_request::Lag", tags = "13")]
    pub lag: ::core::option::Option<lag_allocation_settings_request::Lag>,
}
/// Nested message and enum types in `LagAllocationSettingsRequest`.
pub mod lag_allocation_settings_request {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Lag {
        /// Size of LAG.
        /// Must be from 1 to 10 inclusively.
        #[prost(int64, tag = "13")]
        LagSize(i64),
    }
}
/// Structure that describes LAG allocation settings
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LagAllocationSettings {
    /// LagInfo
    #[prost(message, optional, tag = "14")]
    pub lag_info: ::core::option::Option<LagInfo>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransceiverType {
    Unspecified = 0,
    TransceiverType1000baseLx = 1,
    TransceiverType10gbaseLr = 2,
    TransceiverType10gbaseEr = 3,
    TransceiverType100gbaseLr4 = 4,
    TransceiverType100gbaseEr4 = 5,
}
impl TransceiverType {
    /// 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 {
            TransceiverType::Unspecified => "TRANSCEIVER_TYPE_UNSPECIFIED",
            TransceiverType::TransceiverType1000baseLx => "TRANSCEIVER_TYPE_1000BASE_LX",
            TransceiverType::TransceiverType10gbaseLr => "TRANSCEIVER_TYPE_10GBASE_LR",
            TransceiverType::TransceiverType10gbaseEr => "TRANSCEIVER_TYPE_10GBASE_ER",
            TransceiverType::TransceiverType100gbaseLr4 => {
                "TRANSCEIVER_TYPE_100GBASE_LR4"
            }
            TransceiverType::TransceiverType100gbaseEr4 => {
                "TRANSCEIVER_TYPE_100GBASE_ER4"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANSCEIVER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TRANSCEIVER_TYPE_1000BASE_LX" => Some(Self::TransceiverType1000baseLx),
            "TRANSCEIVER_TYPE_10GBASE_LR" => Some(Self::TransceiverType10gbaseLr),
            "TRANSCEIVER_TYPE_10GBASE_ER" => Some(Self::TransceiverType10gbaseEr),
            "TRANSCEIVER_TYPE_100GBASE_LR4" => Some(Self::TransceiverType100gbaseLr4),
            "TRANSCEIVER_TYPE_100GBASE_ER4" => Some(Self::TransceiverType100gbaseEr4),
            _ => None,
        }
    }
}