pub struct Operation {
Show 13 fields pub consumer_id: Option<String>, pub end_time: Option<DateTime<Utc>>, pub importance: Option<String>, pub labels: Option<HashMap<String, String>>, pub log_entries: Option<Vec<LogEntry>>, pub metric_value_sets: Option<Vec<MetricValueSet>>, pub operation_id: Option<String>, pub operation_name: Option<String>, pub quota_properties: Option<QuotaProperties>, pub resources: Option<Vec<ResourceInfo>>, pub start_time: Option<DateTime<Utc>>, pub trace_spans: Option<Vec<TraceSpan>>, pub user_labels: Option<HashMap<String, String>>,
}
Expand description

Represents information regarding an operation.

This type is not used in any activity, and only used as part of another schema.

Fields§

§consumer_id: Option<String>

Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer. - This can be in one of the following formats: - project:PROJECT_ID, - project_number:PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, - folders/FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api_key:API_KEY.

§end_time: Option<DateTime<Utc>>

End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.

§importance: Option<String>

DO NOT USE. This is an experimental field.

§labels: Option<HashMap<String, String>>

Labels describing the operation. Only the following labels are allowed: - Labels describing monitored resources as defined in the service configuration. - Default labels of metric values. When specified, labels defined in the metric value override these default. - The following labels defined by Google Cloud Platform: - cloud.googleapis.com/location describing the location where the operation happened, - servicecontrol.googleapis.com/user_agent describing the user agent of the API request, - servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP), - servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

§log_entries: Option<Vec<LogEntry>>

Represents information to be logged.

§metric_value_sets: Option<Vec<MetricValueSet>>

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

§operation_id: Option<String>

Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.

§operation_name: Option<String>

Fully qualified name of the operation. Reserved for future use.

§quota_properties: Option<QuotaProperties>

Represents the properties needed for quota check. Applicable only if this operation is for a quota check request. If this is not specified, no quota check will be performed.

§resources: Option<Vec<ResourceInfo>>

The resources that are involved in the operation. The maximum supported number of entries in this field is 100.

§start_time: Option<DateTime<Utc>>

Required. Start time of the operation.

§trace_spans: Option<Vec<TraceSpan>>

Unimplemented. A list of Cloud Trace spans. The span names shall contain the id of the destination project which can be either the produce or the consumer project.

§user_labels: Option<HashMap<String, String>>

Private Preview. This feature is only available for approved services. User defined labels for the resource that this operation is associated with.

Trait Implementations§

source§

impl Clone for Operation

source§

fn clone(&self) -> Operation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Operation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Operation

source§

fn default() -> Operation

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Operation

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Operation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Part for Operation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,