#[non_exhaustive]pub struct InterconnectDiagnosticsLinkOpticalPower {
pub state: Option<State>,
pub value: Option<f32>,
/* private fields */
}Available on crate features
interconnect-groups or interconnects only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: Option<State>The status of the current value when compared to the warning and alarm levels for the receiving or transmitting transceiver. Possible states include:
- OK: The value has not crossed a warning threshold.
- LOW_WARNING: The value has crossed below the low
warning threshold.- HIGH_WARNING: The value has
crossed above the high warning threshold.
- LOW_ALARM: The value has crossed below the low alarm threshold.
- HIGH_ALARM: The value has crossed above the high alarm threshold.
value: Option<f32>Value of the current receiving or transmitting optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.
Implementations§
Source§impl InterconnectDiagnosticsLinkOpticalPower
impl InterconnectDiagnosticsLinkOpticalPower
pub fn new() -> Self
Sourcepub fn set_state<T>(self, v: T) -> Self
pub fn set_state<T>(self, v: T) -> Self
Sets the value of state.
§Example
ⓘ
use google_cloud_compute_v1::model::interconnect_diagnostics_link_optical_power::State;
let x0 = InterconnectDiagnosticsLinkOpticalPower::new().set_state(State::HighWarning);
let x1 = InterconnectDiagnosticsLinkOpticalPower::new().set_state(State::LowAlarm);
let x2 = InterconnectDiagnosticsLinkOpticalPower::new().set_state(State::LowWarning);Sourcepub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
Sets or clears the value of state.
§Example
ⓘ
use google_cloud_compute_v1::model::interconnect_diagnostics_link_optical_power::State;
let x0 = InterconnectDiagnosticsLinkOpticalPower::new().set_or_clear_state(Some(State::HighWarning));
let x1 = InterconnectDiagnosticsLinkOpticalPower::new().set_or_clear_state(Some(State::LowAlarm));
let x2 = InterconnectDiagnosticsLinkOpticalPower::new().set_or_clear_state(Some(State::LowWarning));
let x_none = InterconnectDiagnosticsLinkOpticalPower::new().set_or_clear_state(None::<State>);Sourcepub fn set_or_clear_value<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_value<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for InterconnectDiagnosticsLinkOpticalPower
impl Clone for InterconnectDiagnosticsLinkOpticalPower
Source§fn clone(&self) -> InterconnectDiagnosticsLinkOpticalPower
fn clone(&self) -> InterconnectDiagnosticsLinkOpticalPower
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InterconnectDiagnosticsLinkOpticalPower
impl Default for InterconnectDiagnosticsLinkOpticalPower
Source§fn default() -> InterconnectDiagnosticsLinkOpticalPower
fn default() -> InterconnectDiagnosticsLinkOpticalPower
Returns the “default value” for a type. Read more
Source§impl PartialEq for InterconnectDiagnosticsLinkOpticalPower
impl PartialEq for InterconnectDiagnosticsLinkOpticalPower
Source§fn eq(&self, other: &InterconnectDiagnosticsLinkOpticalPower) -> bool
fn eq(&self, other: &InterconnectDiagnosticsLinkOpticalPower) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InterconnectDiagnosticsLinkOpticalPower
Auto Trait Implementations§
impl Freeze for InterconnectDiagnosticsLinkOpticalPower
impl RefUnwindSafe for InterconnectDiagnosticsLinkOpticalPower
impl Send for InterconnectDiagnosticsLinkOpticalPower
impl Sync for InterconnectDiagnosticsLinkOpticalPower
impl Unpin for InterconnectDiagnosticsLinkOpticalPower
impl UnwindSafe for InterconnectDiagnosticsLinkOpticalPower
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more