#[non_exhaustive]pub struct MetricDescriptorMetadata {
pub launch_stage: LaunchStage,
pub sample_period: Option<Duration>,
pub ingest_delay: Option<Duration>,
pub time_series_resource_hierarchy_level: Vec<TimeSeriesResourceHierarchyLevel>,
/* private fields */
}Expand description
Additional annotations that can be used to guide the usage of a metric.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.launch_stage: LaunchStageDeprecated. Must use the MetricDescriptor.launch_stage instead.
sample_period: Option<Duration>The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.
ingest_delay: Option<Duration>The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.
time_series_resource_hierarchy_level: Vec<TimeSeriesResourceHierarchyLevel>The scope of the timeseries data of the metric.
Implementations§
Source§impl MetricDescriptorMetadata
impl MetricDescriptorMetadata
pub fn new() -> Self
Sourcepub fn set_launch_stage<T: Into<LaunchStage>>(self, v: T) -> Self
👎Deprecated
pub fn set_launch_stage<T: Into<LaunchStage>>(self, v: T) -> Self
Sets the value of launch_stage.
§Example
use google_cloud_api::model::LaunchStage;
let x0 = MetricDescriptorMetadata::new().set_launch_stage(LaunchStage::Unimplemented);
let x1 = MetricDescriptorMetadata::new().set_launch_stage(LaunchStage::Prelaunch);
let x2 = MetricDescriptorMetadata::new().set_launch_stage(LaunchStage::EarlyAccess);Sourcepub fn set_sample_period<T>(self, v: T) -> Self
pub fn set_sample_period<T>(self, v: T) -> Self
Sets the value of sample_period.
§Example
use wkt::Duration;
let x = MetricDescriptorMetadata::new().set_sample_period(Duration::default()/* use setters */);Sourcepub fn set_or_clear_sample_period<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_sample_period<T>(self, v: Option<T>) -> Self
Sets or clears the value of sample_period.
§Example
use wkt::Duration;
let x = MetricDescriptorMetadata::new().set_or_clear_sample_period(Some(Duration::default()/* use setters */));
let x = MetricDescriptorMetadata::new().set_or_clear_sample_period(None::<Duration>);Sourcepub fn set_ingest_delay<T>(self, v: T) -> Self
pub fn set_ingest_delay<T>(self, v: T) -> Self
Sets the value of ingest_delay.
§Example
use wkt::Duration;
let x = MetricDescriptorMetadata::new().set_ingest_delay(Duration::default()/* use setters */);Sourcepub fn set_or_clear_ingest_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ingest_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of ingest_delay.
§Example
use wkt::Duration;
let x = MetricDescriptorMetadata::new().set_or_clear_ingest_delay(Some(Duration::default()/* use setters */));
let x = MetricDescriptorMetadata::new().set_or_clear_ingest_delay(None::<Duration>);Sourcepub fn set_time_series_resource_hierarchy_level<T, V>(self, v: T) -> Self
pub fn set_time_series_resource_hierarchy_level<T, V>(self, v: T) -> Self
Sets the value of time_series_resource_hierarchy_level.
§Example
use google_cloud_api::model::metric_descriptor::metric_descriptor_metadata::TimeSeriesResourceHierarchyLevel;
let x = MetricDescriptorMetadata::new().set_time_series_resource_hierarchy_level([
TimeSeriesResourceHierarchyLevel::Project,
TimeSeriesResourceHierarchyLevel::Organization,
TimeSeriesResourceHierarchyLevel::Folder,
]);Trait Implementations§
Source§impl Clone for MetricDescriptorMetadata
impl Clone for MetricDescriptorMetadata
Source§fn clone(&self) -> MetricDescriptorMetadata
fn clone(&self) -> MetricDescriptorMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more