Struct google_api_proto::google::analytics::admin::v1alpha::CustomMetric
source · pub struct CustomMetric {
pub name: String,
pub parameter_name: String,
pub display_name: String,
pub description: String,
pub measurement_unit: i32,
pub scope: i32,
pub restricted_metric_type: Vec<i32>,
}
Expand description
A definition for a custom metric.
Fields§
§name: String
Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}
parameter_name: String
Required. Immutable. Tagging name for this custom metric.
If this is an event-scoped metric, then this is the event parameter name.
May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics.
display_name: String
Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.
description: String
Optional. Description for this custom dimension. Max length of 150 characters.
measurement_unit: i32
Required. The type for the custom metric’s value.
scope: i32
Required. Immutable. The scope of this custom metric.
restricted_metric_type: Vec<i32>
Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit.
Implementations§
source§impl CustomMetric
impl CustomMetric
sourcepub fn measurement_unit(&self) -> MeasurementUnit
pub fn measurement_unit(&self) -> MeasurementUnit
Returns the enum value of measurement_unit
, or the default if the field is set to an invalid enum value.
sourcepub fn set_measurement_unit(&mut self, value: MeasurementUnit)
pub fn set_measurement_unit(&mut self, value: MeasurementUnit)
Sets measurement_unit
to the provided enum value.
sourcepub fn scope(&self) -> MetricScope
pub fn scope(&self) -> MetricScope
Returns the enum value of scope
, or the default if the field is set to an invalid enum value.
sourcepub fn set_scope(&mut self, value: MetricScope)
pub fn set_scope(&mut self, value: MetricScope)
Sets scope
to the provided enum value.
sourcepub fn restricted_metric_type(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<RestrictedMetricType>>
pub fn restricted_metric_type( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<RestrictedMetricType>>
Returns an iterator which yields the valid enum values contained in restricted_metric_type
.
sourcepub fn push_restricted_metric_type(&mut self, value: RestrictedMetricType)
pub fn push_restricted_metric_type(&mut self, value: RestrictedMetricType)
Appends the provided enum value to restricted_metric_type
.
Trait Implementations§
source§impl Clone for CustomMetric
impl Clone for CustomMetric
source§fn clone(&self) -> CustomMetric
fn clone(&self) -> CustomMetric
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomMetric
impl Debug for CustomMetric
source§impl Default for CustomMetric
impl Default for CustomMetric
source§impl Message for CustomMetric
impl Message for CustomMetric
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CustomMetric
impl PartialEq for CustomMetric
source§fn eq(&self, other: &CustomMetric) -> bool
fn eq(&self, other: &CustomMetric) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomMetric
Auto Trait Implementations§
impl Freeze for CustomMetric
impl RefUnwindSafe for CustomMetric
impl Send for CustomMetric
impl Sync for CustomMetric
impl Unpin for CustomMetric
impl UnwindSafe for CustomMetric
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request