#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_gax;
extern crate google_cloud_longrunning;
extern crate google_cloud_lro;
extern crate google_cloud_rpc;
extern crate google_cloud_type;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BigQueryExport {
pub name: std::string::String,
pub provisioned: bool,
pub big_query_export_package: crate::model::BigQueryExportPackage,
pub entity_graph_settings: std::option::Option<crate::model::DataSourceExportSettings>,
pub ioc_matches_settings: std::option::Option<crate::model::DataSourceExportSettings>,
pub rule_detections_settings: std::option::Option<crate::model::DataSourceExportSettings>,
pub udm_events_aggregates_settings: std::option::Option<crate::model::DataSourceExportSettings>,
pub udm_events_settings: std::option::Option<crate::model::DataSourceExportSettings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BigQueryExport {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_provisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.provisioned = v.into();
self
}
pub fn set_big_query_export_package<
T: std::convert::Into<crate::model::BigQueryExportPackage>,
>(
mut self,
v: T,
) -> Self {
self.big_query_export_package = v.into();
self
}
pub fn set_entity_graph_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.entity_graph_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_entity_graph_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.entity_graph_settings = v.map(|x| x.into());
self
}
pub fn set_ioc_matches_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.ioc_matches_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_ioc_matches_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.ioc_matches_settings = v.map(|x| x.into());
self
}
pub fn set_rule_detections_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.rule_detections_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule_detections_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.rule_detections_settings = v.map(|x| x.into());
self
}
pub fn set_udm_events_aggregates_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.udm_events_aggregates_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_udm_events_aggregates_settings<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.udm_events_aggregates_settings = v.map(|x| x.into());
self
}
pub fn set_udm_events_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.udm_events_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_udm_events_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataSourceExportSettings>,
{
self.udm_events_settings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for BigQueryExport {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BigQueryExport"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataSourceExportSettings {
pub enabled: bool,
pub retention_days: i32,
pub latest_export_job_state: crate::model::LatestExportJobState,
pub data_freshness_time: std::option::Option<wkt::Timestamp>,
pub data_volume: i64,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataSourceExportSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enabled = v.into();
self
}
pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.retention_days = v.into();
self
}
pub fn set_latest_export_job_state<
T: std::convert::Into<crate::model::LatestExportJobState>,
>(
mut self,
v: T,
) -> Self {
self.latest_export_job_state = v.into();
self
}
pub fn set_data_freshness_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.data_freshness_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_freshness_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.data_freshness_time = v.map(|x| x.into());
self
}
pub fn set_data_volume<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.data_volume = v.into();
self
}
}
impl wkt::message::Message for DataSourceExportSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataSourceExportSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetBigQueryExportRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetBigQueryExportRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetBigQueryExportRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetBigQueryExportRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateBigQueryExportRequest {
pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateBigQueryExportRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_big_query_export<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::BigQueryExport>,
{
self.big_query_export = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::BigQueryExport>,
{
self.big_query_export = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateBigQueryExportRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateBigQueryExportRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ProvisionBigQueryExportRequest {
pub parent: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ProvisionBigQueryExportRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
}
impl wkt::message::Message for ProvisionBigQueryExportRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ProvisionBigQueryExportRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DashboardChart {
pub name: std::string::String,
pub display_name: std::string::String,
pub description: std::string::String,
pub native_dashboard: std::string::String,
pub tile_type: crate::model::TileType,
pub chart_datasource: std::option::Option<crate::model::dashboard_chart::ChartDatasource>,
pub visualization: std::option::Option<crate::model::dashboard_chart::Visualization>,
pub etag: std::string::String,
pub drill_down_config: std::option::Option<crate::model::dashboard_chart::DrillDownConfig>,
pub tokens: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DashboardChart {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_native_dashboard<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.native_dashboard = v.into();
self
}
pub fn set_tile_type<T: std::convert::Into<crate::model::TileType>>(mut self, v: T) -> Self {
self.tile_type = v.into();
self
}
pub fn set_chart_datasource<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::ChartDatasource>,
{
self.chart_datasource = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_chart_datasource<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::ChartDatasource>,
{
self.chart_datasource = v.map(|x| x.into());
self
}
pub fn set_visualization<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::Visualization>,
{
self.visualization = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_visualization<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::Visualization>,
{
self.visualization = v.map(|x| x.into());
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
pub fn set_drill_down_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::DrillDownConfig>,
{
self.drill_down_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_drill_down_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::DrillDownConfig>,
{
self.drill_down_config = v.map(|x| x.into());
self
}
pub fn set_tokens<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.tokens = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DashboardChart {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart"
}
}
pub mod dashboard_chart {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ChartDatasource {
pub dashboard_query: std::string::String,
pub data_sources: std::vec::Vec<crate::model::DataSource>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ChartDatasource {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard_query<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.dashboard_query = v.into();
self
}
pub fn set_data_sources<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataSource>,
{
use std::iter::Iterator;
self.data_sources = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ChartDatasource {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.ChartDatasource"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Visualization {
#[allow(missing_docs)]
pub x_axes: std::vec::Vec<crate::model::dashboard_chart::visualization::Axis>,
#[allow(missing_docs)]
pub y_axes: std::vec::Vec<crate::model::dashboard_chart::visualization::Axis>,
#[allow(missing_docs)]
pub series: std::vec::Vec<crate::model::dashboard_chart::visualization::Series>,
#[allow(missing_docs)]
pub tooltip: std::option::Option<crate::model::dashboard_chart::visualization::Tooltip>,
#[allow(missing_docs)]
pub legends: std::vec::Vec<crate::model::dashboard_chart::visualization::Legend>,
pub column_defs: std::vec::Vec<crate::model::dashboard_chart::visualization::ColumnDef>,
pub table_config:
std::option::Option<crate::model::dashboard_chart::visualization::TableConfig>,
pub button: std::option::Option<crate::model::Button>,
pub markdown: std::option::Option<crate::model::Markdown>,
pub series_column: std::vec::Vec<std::string::String>,
pub grouping_type: std::string::String,
pub google_maps_config:
std::option::Option<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
pub threshold_coloring_enabled: bool,
pub visual_maps: std::vec::Vec<crate::model::dashboard_chart::visualization::VisualMap>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Visualization {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_x_axes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::Axis>,
{
use std::iter::Iterator;
self.x_axes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_y_axes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::Axis>,
{
use std::iter::Iterator;
self.y_axes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_series<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::Series>,
{
use std::iter::Iterator;
self.series = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_tooltip<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::Tooltip>,
{
self.tooltip = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_tooltip<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::Tooltip>,
{
self.tooltip = v.map(|x| x.into());
self
}
pub fn set_legends<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::Legend>,
{
use std::iter::Iterator;
self.legends = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_column_defs<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::ColumnDef>,
{
use std::iter::Iterator;
self.column_defs = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_table_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::TableConfig>,
{
self.table_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_table_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::TableConfig>,
{
self.table_config = v.map(|x| x.into());
self
}
pub fn set_button<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Button>,
{
self.button = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_button<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Button>,
{
self.button = v.map(|x| x.into());
self
}
pub fn set_markdown<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Markdown>,
{
self.markdown = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_markdown<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Markdown>,
{
self.markdown = v.map(|x| x.into());
self
}
pub fn set_series_column<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.series_column = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_grouping_type<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.grouping_type = v.into();
self
}
pub fn set_google_maps_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
{
self.google_maps_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_google_maps_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
{
self.google_maps_config = v.map(|x| x.into());
self
}
pub fn set_threshold_coloring_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.threshold_coloring_enabled = v.into();
self
}
pub fn set_visual_maps<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::visualization::VisualMap>,
{
use std::iter::Iterator;
self.visual_maps = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for Visualization {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization"
}
}
pub mod visualization {
#[allow(unused_imports)]
use super::*;
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Axis {
#[allow(missing_docs)]
pub axis_type: crate::model::AxisType,
#[allow(missing_docs)]
pub display_name: std::string::String,
pub min: std::option::Option<i32>,
pub max: std::option::Option<i32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Axis {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_axis_type<T: std::convert::Into<crate::model::AxisType>>(
mut self,
v: T,
) -> Self {
self.axis_type = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.display_name = v.into();
self
}
pub fn set_min<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.min = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_min<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.min = v.map(|x| x.into());
self
}
pub fn set_max<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.max = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_max<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.max = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Axis {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Axis"
}
}
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Series {
#[allow(missing_docs)]
pub series_type: crate::model::SeriesType,
pub series_name: std::string::String,
#[allow(missing_docs)]
pub show_symbol: bool,
#[allow(missing_docs)]
pub show_background: bool,
#[allow(missing_docs)]
pub stack: std::string::String,
#[allow(missing_docs)]
pub series_stack_strategy: crate::model::SeriesStackStrategy,
#[allow(missing_docs)]
pub encode:
std::option::Option<crate::model::dashboard_chart::visualization::series::Encode>,
#[allow(missing_docs)]
pub label: std::string::String,
#[allow(missing_docs)]
pub field: std::string::String,
pub data_label: std::option::Option<
crate::model::dashboard_chart::visualization::series::DataLabel,
>,
pub radius: std::vec::Vec<std::string::String>,
pub item_style: std::option::Option<
crate::model::dashboard_chart::visualization::series::ItemStyle,
>,
pub series_unique_value: std::string::String,
pub area_style: std::option::Option<
crate::model::dashboard_chart::visualization::series::AreaStyle,
>,
pub item_colors: std::option::Option<
crate::model::dashboard_chart::visualization::series::ItemColors,
>,
pub gauge_config: std::option::Option<
crate::model::dashboard_chart::visualization::series::GaugeConfig,
>,
pub metric_trend_config: std::option::Option<
crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Series {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_series_type<T: std::convert::Into<crate::model::SeriesType>>(
mut self,
v: T,
) -> Self {
self.series_type = v.into();
self
}
pub fn set_series_name<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.series_name = v.into();
self
}
pub fn set_show_symbol<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show_symbol = v.into();
self
}
pub fn set_show_background<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show_background = v.into();
self
}
pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.stack = v.into();
self
}
pub fn set_series_stack_strategy<
T: std::convert::Into<crate::model::SeriesStackStrategy>,
>(
mut self,
v: T,
) -> Self {
self.series_stack_strategy = v.into();
self
}
pub fn set_encode<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::series::Encode>,
{
self.encode = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_encode<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_chart::visualization::series::Encode>,
{
self.encode = v.map(|x| x.into());
self
}
pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.label = v.into();
self
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_data_label<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::DataLabel,
>,
{
self.data_label = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_label<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::DataLabel,
>,
{
self.data_label = v.map(|x| x.into());
self
}
pub fn set_radius<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.radius = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_item_style<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::ItemStyle,
>,
{
self.item_style = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_item_style<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::ItemStyle,
>,
{
self.item_style = v.map(|x| x.into());
self
}
pub fn set_series_unique_value<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.series_unique_value = v.into();
self
}
pub fn set_area_style<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::AreaStyle,
>,
{
self.area_style = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_area_style<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::AreaStyle,
>,
{
self.area_style = v.map(|x| x.into());
self
}
pub fn set_item_colors<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::ItemColors,
>,
{
self.item_colors = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_item_colors<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::ItemColors,
>,
{
self.item_colors = v.map(|x| x.into());
self
}
pub fn set_gauge_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeConfig,
>,
{
self.gauge_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_gauge_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeConfig,
>,
{
self.gauge_config = v.map(|x| x.into());
self
}
pub fn set_metric_trend_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
>,
{
self.metric_trend_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_metric_trend_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
>,
{
self.metric_trend_config = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Series {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series"
}
}
pub mod series {
#[allow(unused_imports)]
use super::*;
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Encode {
#[allow(missing_docs)]
pub x: std::string::String,
#[allow(missing_docs)]
pub y: std::string::String,
pub value: std::string::String,
pub item_name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Encode {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.x = v.into();
self
}
pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.y = v.into();
self
}
pub fn set_value<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.value = v.into();
self
}
pub fn set_item_name<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.item_name = v.into();
self
}
}
impl wkt::message::Message for Encode {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataLabel {
pub show: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataLabel {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show = v.into();
self
}
}
impl wkt::message::Message for DataLabel {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ItemStyle {
pub border_width: i32,
pub border_color: std::string::String,
pub color: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ItemStyle {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_border_width<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.border_width = v.into();
self
}
pub fn set_border_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.border_color = v.into();
self
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
}
impl wkt::message::Message for ItemStyle {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AreaStyle {
pub color: std::string::String,
pub origin: std::string::String,
pub shadow_blur: i32,
pub shadow_color: std::string::String,
pub shadow_offset_x: i32,
pub shadow_offset_y: i32,
pub opacity: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AreaStyle {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
pub fn set_origin<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.origin = v.into();
self
}
pub fn set_shadow_blur<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.shadow_blur = v.into();
self
}
pub fn set_shadow_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.shadow_color = v.into();
self
}
pub fn set_shadow_offset_x<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.shadow_offset_x = v.into();
self
}
pub fn set_shadow_offset_y<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.shadow_offset_y = v.into();
self
}
pub fn set_opacity<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.opacity = v.into();
self
}
}
impl wkt::message::Message for AreaStyle {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UserSelectedValues {
pub color: std::string::String,
pub label: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UserSelectedValues {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
pub fn set_label<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.label = v.into();
self
}
}
impl wkt::message::Message for UserSelectedValues {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ChartSliceColor {
pub key: std::string::String,
pub value: std::option::Option<
crate::model::dashboard_chart::visualization::series::UserSelectedValues,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ChartSliceColor {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.key = v.into();
self
}
pub fn set_value<T>(mut self, v: T) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::series::UserSelectedValues>
{
self.value = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_value<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::series::UserSelectedValues>
{
self.value = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ChartSliceColor {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ItemColors {
pub colors: std::vec::Vec<
crate::model::dashboard_chart::visualization::series::ChartSliceColor,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ItemColors {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_colors<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<
crate::model::dashboard_chart::visualization::series::ChartSliceColor,
>,
{
use std::iter::Iterator;
self.colors = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ItemColors {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GaugeValue {
pub value: i32,
pub color: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GaugeValue {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_value<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.value = v.into();
self
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
}
impl wkt::message::Message for GaugeValue {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GaugeConfig {
pub base_value: std::option::Option<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
pub limit_value: std::option::Option<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
pub threshold_values:
std::vec::Vec<crate::model::dashboard_chart::visualization::series::GaugeValue>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GaugeConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_base_value<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
{
self.base_value = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_base_value<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
{
self.base_value = v.map(|x| x.into());
self
}
pub fn set_limit_value<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
{
self.limit_value = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_limit_value<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
{
self.limit_value = v.map(|x| x.into());
self
}
pub fn set_threshold_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<
crate::model::dashboard_chart::visualization::series::GaugeValue,
>,
{
use std::iter::Iterator;
self.threshold_values = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for GaugeConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct MetricTrendConfig {
pub metric_format: crate::model::MetricFormat,
pub show_metric_trend: bool,
pub metric_display_trend: crate::model::MetricDisplayTrend,
pub metric_trend_type: crate::model::MetricTrendType,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl MetricTrendConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_metric_format<T: std::convert::Into<crate::model::MetricFormat>>(
mut self,
v: T,
) -> Self {
self.metric_format = v.into();
self
}
pub fn set_show_metric_trend<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show_metric_trend = v.into();
self
}
pub fn set_metric_display_trend<
T: std::convert::Into<crate::model::MetricDisplayTrend>,
>(
mut self,
v: T,
) -> Self {
self.metric_display_trend = v.into();
self
}
pub fn set_metric_trend_type<
T: std::convert::Into<crate::model::MetricTrendType>,
>(
mut self,
v: T,
) -> Self {
self.metric_trend_type = v.into();
self
}
}
impl wkt::message::Message for MetricTrendConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig"
}
}
}
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Tooltip {
#[allow(missing_docs)]
pub show: bool,
#[allow(missing_docs)]
pub tooltip_trigger: crate::model::ToolTipTrigger,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Tooltip {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show = v.into();
self
}
pub fn set_tooltip_trigger<T: std::convert::Into<crate::model::ToolTipTrigger>>(
mut self,
v: T,
) -> Self {
self.tooltip_trigger = v.into();
self
}
}
impl wkt::message::Message for Tooltip {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip"
}
}
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Legend {
#[allow(missing_docs)]
pub id: std::string::String,
#[allow(missing_docs)]
pub show: bool,
#[allow(missing_docs)]
pub z_level: i32,
#[allow(missing_docs)]
pub z: i32,
#[allow(missing_docs)]
pub left: i32,
#[allow(missing_docs)]
pub top: i32,
#[allow(missing_docs)]
pub right: i32,
#[allow(missing_docs)]
pub bottom: i32,
#[allow(missing_docs)]
pub legend_orient: crate::model::LegendOrient,
#[allow(missing_docs)]
pub legend_align: crate::model::LegendAlign,
#[allow(missing_docs)]
pub padding: std::vec::Vec<i32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Legend {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.show = v.into();
self
}
pub fn set_z_level<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.z_level = v.into();
self
}
pub fn set_z<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.z = v.into();
self
}
pub fn set_left<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.left = v.into();
self
}
pub fn set_top<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.top = v.into();
self
}
pub fn set_right<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.right = v.into();
self
}
pub fn set_bottom<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.bottom = v.into();
self
}
pub fn set_legend_orient<T: std::convert::Into<crate::model::LegendOrient>>(
mut self,
v: T,
) -> Self {
self.legend_orient = v.into();
self
}
pub fn set_legend_align<T: std::convert::Into<crate::model::LegendAlign>>(
mut self,
v: T,
) -> Self {
self.legend_align = v.into();
self
}
pub fn set_padding<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<i32>,
{
use std::iter::Iterator;
self.padding = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for Legend {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Legend"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnDef {
pub field: std::string::String,
pub header: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnDef {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_header<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.header = v.into();
self
}
}
impl wkt::message::Message for ColumnDef {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnRenderTypeSettings {
pub field: std::string::String,
pub column_render_type: crate::model::RenderType,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnRenderTypeSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_column_render_type<T: std::convert::Into<crate::model::RenderType>>(
mut self,
v: T,
) -> Self {
self.column_render_type = v.into();
self
}
}
impl wkt::message::Message for ColumnRenderTypeSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnTooltipSettings {
pub field: std::string::String,
pub header_tooltip_text: std::string::String,
pub cell_tooltip_text: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnTooltipSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_header_tooltip_text<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.header_tooltip_text = v.into();
self
}
pub fn set_cell_tooltip_text<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.cell_tooltip_text = v.into();
self
}
}
impl wkt::message::Message for ColumnTooltipSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct TableConfig {
pub enable_text_wrap: bool,
pub column_render_type_settings: std::vec::Vec<
crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings,
>,
pub column_tooltip_settings:
std::vec::Vec<crate::model::dashboard_chart::visualization::ColumnTooltipSettings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl TableConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_enable_text_wrap<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enable_text_wrap = v.into();
self
}
pub fn set_column_render_type_settings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<
crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings,
>,
{
use std::iter::Iterator;
self.column_render_type_settings = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_column_tooltip_settings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<
crate::model::dashboard_chart::visualization::ColumnTooltipSettings,
>,
{
use std::iter::Iterator;
self.column_tooltip_settings = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for TableConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GoogleMapsConfig {
pub data_settings: std::option::Option<
crate::model::dashboard_chart::visualization::google_maps_config::DataSettings,
>,
pub plot_mode: crate::model::PlotMode,
pub map_position: std::option::Option<
crate::model::dashboard_chart::visualization::google_maps_config::MapPosition,
>,
pub point_settings: std::option::Option<
crate::model::dashboard_chart::visualization::google_maps_config::PointSettings,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GoogleMapsConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_settings<T>(mut self, v: T) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::DataSettings>
{
self.data_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_settings<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::DataSettings>
{
self.data_settings = v.map(|x| x.into());
self
}
pub fn set_plot_mode<T: std::convert::Into<crate::model::PlotMode>>(
mut self,
v: T,
) -> Self {
self.plot_mode = v.into();
self
}
pub fn set_map_position<T>(mut self, v: T) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::MapPosition>
{
self.map_position = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_map_position<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::MapPosition>
{
self.map_position = v.map(|x| x.into());
self
}
pub fn set_point_settings<T>(mut self, v: T) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::PointSettings>
{
self.point_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_point_settings<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::PointSettings>
{
self.point_settings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for GoogleMapsConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig"
}
}
pub mod google_maps_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataSettings {
pub latitude_column: std::string::String,
pub longitude_column: std::string::String,
pub count_column: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_latitude_column<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.latitude_column = v.into();
self
}
pub fn set_longitude_column<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.longitude_column = v.into();
self
}
pub fn set_count_column<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.count_column = v.into();
self
}
}
impl wkt::message::Message for DataSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct MapPosition {
pub fit_data: bool,
pub latitude_value: f64,
pub longitude_value: f64,
pub zoom_scale_value: f64,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl MapPosition {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_fit_data<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.fit_data = v.into();
self
}
pub fn set_latitude_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.latitude_value = v.into();
self
}
pub fn set_longitude_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.longitude_value = v.into();
self
}
pub fn set_zoom_scale_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.zoom_scale_value = v.into();
self
}
}
impl wkt::message::Message for MapPosition {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PointSettings {
pub point_size_type: crate::model::PointSizeType,
pub color: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl PointSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_point_size_type<T: std::convert::Into<crate::model::PointSizeType>>(
mut self,
v: T,
) -> Self {
self.point_size_type = v.into();
self
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
}
impl wkt::message::Message for PointSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct VisualMap {
pub visual_map_type: crate::model::VisualMapType,
pub pieces: std::vec::Vec<
crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl VisualMap {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_visual_map_type<T: std::convert::Into<crate::model::VisualMapType>>(
mut self,
v: T,
) -> Self {
self.visual_map_type = v.into();
self
}
pub fn set_pieces<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<
crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece,
>,
{
use std::iter::Iterator;
self.pieces = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for VisualMap {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap"
}
}
pub mod visual_map {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct VisualMapPiece {
pub min: std::option::Option<i64>,
pub max: std::option::Option<i64>,
pub color: std::string::String,
pub label: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl VisualMapPiece {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_min<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i64>,
{
self.min = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_min<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i64>,
{
self.min = v.map(|x| x.into());
self
}
pub fn set_max<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i64>,
{
self.max = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_max<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i64>,
{
self.max = v.map(|x| x.into());
self
}
pub fn set_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.color = v.into();
self
}
pub fn set_label<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.label = v.into();
self
}
}
impl wkt::message::Message for VisualMapPiece {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece"
}
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDownConfig {
pub left_drill_downs:
std::vec::Vec<crate::model::dashboard_chart::drill_down_config::DrillDown>,
pub right_drill_downs:
std::vec::Vec<crate::model::dashboard_chart::drill_down_config::DrillDown>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDownConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_left_drill_downs<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::DrillDown>,
{
use std::iter::Iterator;
self.left_drill_downs = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_right_drill_downs<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::DrillDown>,
{
use std::iter::Iterator;
self.right_drill_downs = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DrillDownConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig"
}
}
pub mod drill_down_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDown {
pub id: std::string::String,
pub display_name: std::string::String,
pub settings: std::option::Option<
crate::model::dashboard_chart::drill_down_config::drill_down::Settings,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDown {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.display_name = v.into();
self
}
pub fn set_settings<
T: std::convert::Into<
std::option::Option<
crate::model::dashboard_chart::drill_down_config::drill_down::Settings,
>,
>,
>(
mut self,
v: T,
) -> Self {
self.settings = v.into();
self
}
pub fn default_settings(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings>>{
#[allow(unreachable_patterns)]
self.settings.as_ref().and_then(|v| match v {
crate::model::dashboard_chart::drill_down_config::drill_down::Settings::DefaultSettings(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_default_settings<T: std::convert::Into<std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings>>>(mut self, v: T) -> Self{
self.settings = std::option::Option::Some(
crate::model::dashboard_chart::drill_down_config::drill_down::Settings::DefaultSettings(
v.into()
)
);
self
}
pub fn custom_settings(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings>>{
#[allow(unreachable_patterns)]
self.settings.as_ref().and_then(|v| match v {
crate::model::dashboard_chart::drill_down_config::drill_down::Settings::CustomSettings(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_custom_settings<T: std::convert::Into<std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings>>>(mut self, v: T) -> Self{
self.settings = std::option::Option::Some(
crate::model::dashboard_chart::drill_down_config::drill_down::Settings::CustomSettings(
v.into()
)
);
self
}
}
impl wkt::message::Message for DrillDown {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown"
}
}
pub mod drill_down {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DefaultDrillDownSettings {
pub enabled: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DefaultDrillDownSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enabled = v.into();
self
}
}
impl wkt::message::Message for DefaultDrillDownSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CustomDrillDownSettings {
pub new_tab: bool,
pub left_click_column: std::string::String,
pub action: std::option::Option<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CustomDrillDownSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_new_tab<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.new_tab = v.into();
self
}
pub fn set_left_click_column<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.left_click_column = v.into();
self
}
pub fn set_action<T: std::convert::Into<std::option::Option<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action>>>(mut self, v: T) -> Self
{
self.action = v.into();
self
}
pub fn query(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery>>{
#[allow(unreachable_patterns)]
self.action.as_ref().and_then(|v| match v {
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Query(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_query<T: std::convert::Into<std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery>>>(mut self, v: T) -> Self{
self.action = std::option::Option::Some(
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Query(
v.into()
)
);
self
}
pub fn filter(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter>>{
#[allow(unreachable_patterns)]
self.action.as_ref().and_then(|v| match v {
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Filter(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_filter<T: std::convert::Into<std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter>>>(mut self, v: T) -> Self{
self.action = std::option::Option::Some(
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Filter(
v.into()
)
);
self
}
pub fn external_link(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink>>{
#[allow(unreachable_patterns)]
self.action.as_ref().and_then(|v| match v {
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::ExternalLink(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_external_link<T: std::convert::Into<std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink>>>(mut self, v: T) -> Self{
self.action = std::option::Option::Some(
crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::ExternalLink(
v.into()
)
);
self
}
}
impl wkt::message::Message for CustomDrillDownSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings"
}
}
pub mod custom_drill_down_settings {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDownQuery {
pub query: std::string::String,
pub(crate) _unknown_fields:
serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDownQuery {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_query<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.query = v.into();
self
}
}
impl wkt::message::Message for DrillDownQuery {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDownFilter {
pub dashboard_filters: std::vec::Vec<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDownFilter {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard_filters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter>
{
use std::iter::Iterator;
self.dashboard_filters = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DrillDownFilter {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter"
}
}
pub mod drill_down_filter {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDownDashboardFilter {
pub dashboard_filter_id: std::string::String,
pub filter_operator_and_values:
std::vec::Vec<crate::model::FilterOperatorAndValues>,
pub(crate) _unknown_fields:
serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDownDashboardFilter {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard_filter_id<
T: std::convert::Into<std::string::String>,
>(
mut self,
v: T,
) -> Self {
self.dashboard_filter_id = v.into();
self
}
pub fn set_filter_operator_and_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FilterOperatorAndValues>,
{
use std::iter::Iterator;
self.filter_operator_and_values =
v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DrillDownDashboardFilter {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DrillDownExternalLink {
pub link: std::string::String,
pub description: std::string::String,
pub(crate) _unknown_fields:
serde_json::Map<std::string::String, serde_json::Value>,
}
impl DrillDownExternalLink {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_link<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.link = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.description = v.into();
self
}
}
impl wkt::message::Message for DrillDownExternalLink {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Action {
Query(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery>),
Filter(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter>),
ExternalLink(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink>),
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Settings {
DefaultSettings(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings>),
CustomSettings(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings>),
}
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Button {
#[allow(missing_docs)]
pub label: std::string::String,
#[allow(missing_docs)]
pub hyperlink: std::string::String,
#[allow(missing_docs)]
pub description: std::string::String,
pub new_tab: bool,
#[allow(missing_docs)]
pub properties: std::option::Option<crate::model::button::Properties>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Button {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.label = v.into();
self
}
pub fn set_hyperlink<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.hyperlink = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_new_tab<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.new_tab = v.into();
self
}
pub fn set_properties<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::button::Properties>,
{
self.properties = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::button::Properties>,
{
self.properties = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Button {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Button"
}
}
pub mod button {
#[allow(unused_imports)]
use super::*;
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Properties {
#[allow(missing_docs)]
pub color: std::string::String,
#[allow(missing_docs)]
pub button_style: crate::model::ButtonStyle,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Properties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_color<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.color = v.into();
self
}
pub fn set_button_style<T: std::convert::Into<crate::model::ButtonStyle>>(
mut self,
v: T,
) -> Self {
self.button_style = v.into();
self
}
}
impl wkt::message::Message for Properties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Button.Properties"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Markdown {
pub content: std::string::String,
pub properties: std::option::Option<crate::model::markdown::MarkdownProperties>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Markdown {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.content = v.into();
self
}
pub fn set_properties<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::markdown::MarkdownProperties>,
{
self.properties = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::markdown::MarkdownProperties>,
{
self.properties = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Markdown {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Markdown"
}
}
pub mod markdown {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct MarkdownProperties {
pub background_color: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl MarkdownProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_background_color<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.background_color = v.into();
self
}
}
impl wkt::message::Message for MarkdownProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Markdown.MarkdownProperties"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDashboardChartRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDashboardChartRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDashboardChartRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDashboardChartRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BatchGetDashboardChartsRequest {
pub parent: std::string::String,
pub names: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BatchGetDashboardChartsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_names<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.names = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BatchGetDashboardChartsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BatchGetDashboardChartsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BatchGetDashboardChartsResponse {
pub dashboard_charts: std::vec::Vec<crate::model::DashboardChart>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BatchGetDashboardChartsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard_charts<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DashboardChart>,
{
use std::iter::Iterator;
self.dashboard_charts = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BatchGetDashboardChartsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BatchGetDashboardChartsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DashboardQuery {
pub name: std::string::String,
pub query: std::string::String,
pub input: std::option::Option<crate::model::dashboard_query::Input>,
pub dashboard_chart: std::string::String,
pub etag: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DashboardQuery {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.query = v.into();
self
}
pub fn set_input<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_query::Input>,
{
self.input = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_query::Input>,
{
self.input = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dashboard_chart = v.into();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
}
impl wkt::message::Message for DashboardQuery {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery"
}
}
pub mod dashboard_query {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Input {
#[allow(missing_docs)]
pub time_input: std::option::Option<crate::model::dashboard_query::input::TimeInput>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Input {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_time_input<
T: std::convert::Into<
std::option::Option<crate::model::dashboard_query::input::TimeInput>,
>,
>(
mut self,
v: T,
) -> Self {
self.time_input = v.into();
self
}
pub fn time_window(
&self,
) -> std::option::Option<&std::boxed::Box<google_cloud_type::model::Interval>> {
#[allow(unreachable_patterns)]
self.time_input.as_ref().and_then(|v| match v {
crate::model::dashboard_query::input::TimeInput::TimeWindow(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_time_window<
T: std::convert::Into<std::boxed::Box<google_cloud_type::model::Interval>>,
>(
mut self,
v: T,
) -> Self {
self.time_input = std::option::Option::Some(
crate::model::dashboard_query::input::TimeInput::TimeWindow(v.into()),
);
self
}
pub fn relative_time(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>>
{
#[allow(unreachable_patterns)]
self.time_input.as_ref().and_then(|v| match v {
crate::model::dashboard_query::input::TimeInput::RelativeTime(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_relative_time<
T: std::convert::Into<std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>>,
>(
mut self,
v: T,
) -> Self {
self.time_input = std::option::Option::Some(
crate::model::dashboard_query::input::TimeInput::RelativeTime(v.into()),
);
self
}
}
impl wkt::message::Message for Input {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery.Input"
}
}
pub mod input {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RelativeTime {
#[allow(missing_docs)]
pub time_unit: crate::model::TimeUnit,
#[allow(missing_docs)]
pub start_time_val: i64,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RelativeTime {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_time_unit<T: std::convert::Into<crate::model::TimeUnit>>(
mut self,
v: T,
) -> Self {
self.time_unit = v.into();
self
}
pub fn set_start_time_val<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.start_time_val = v.into();
self
}
}
impl wkt::message::Message for RelativeTime {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime"
}
}
#[allow(missing_docs)]
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum TimeInput {
TimeWindow(std::boxed::Box<google_cloud_type::model::Interval>),
RelativeTime(std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>),
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDashboardQueryRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDashboardQueryRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDashboardQueryRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDashboardQueryRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExecuteDashboardQueryRequest {
pub parent: std::string::String,
pub query: std::option::Option<crate::model::DashboardQuery>,
pub filters: std::vec::Vec<crate::model::DashboardFilter>,
pub clear_cache: bool,
pub use_previous_time_range: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExecuteDashboardQueryRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_query<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.query = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.query = v.map(|x| x.into());
self
}
pub fn set_filters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DashboardFilter>,
{
use std::iter::Iterator;
self.filters = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_clear_cache<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.clear_cache = v.into();
self
}
pub fn set_use_previous_time_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_previous_time_range = v.into();
self
}
}
impl wkt::message::Message for ExecuteDashboardQueryRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct QueryRuntimeError {
pub error_title: std::string::String,
pub error_description: std::string::String,
pub error_severity: crate::model::query_runtime_error::ErrorSeverity,
pub metadata: std::vec::Vec<crate::model::query_runtime_error::QueryRuntimeErrorMetadata>,
pub warning_reason: crate::model::query_runtime_error::WarningReason,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl QueryRuntimeError {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_error_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.error_title = v.into();
self
}
pub fn set_error_description<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.error_description = v.into();
self
}
pub fn set_error_severity<
T: std::convert::Into<crate::model::query_runtime_error::ErrorSeverity>,
>(
mut self,
v: T,
) -> Self {
self.error_severity = v.into();
self
}
pub fn set_metadata<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::query_runtime_error::QueryRuntimeErrorMetadata>,
{
use std::iter::Iterator;
self.metadata = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_warning_reason<
T: std::convert::Into<crate::model::query_runtime_error::WarningReason>,
>(
mut self,
v: T,
) -> Self {
self.warning_reason = v.into();
self
}
}
impl wkt::message::Message for QueryRuntimeError {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.QueryRuntimeError"
}
}
pub mod query_runtime_error {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct QueryRuntimeErrorMetadata {
pub key: crate::model::query_runtime_error::MetadataKey,
pub value: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl QueryRuntimeErrorMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_key<T: std::convert::Into<crate::model::query_runtime_error::MetadataKey>>(
mut self,
v: T,
) -> Self {
self.key = v.into();
self
}
pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.value = v.into();
self
}
}
impl wkt::message::Message for QueryRuntimeErrorMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ErrorSeverity {
Unspecified,
Warning,
Severe,
UnknownValue(error_severity::UnknownValue),
}
#[doc(hidden)]
pub mod error_severity {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ErrorSeverity {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Warning => std::option::Option::Some(1),
Self::Severe => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("ERROR_SEVERITY_UNSPECIFIED"),
Self::Warning => std::option::Option::Some("WARNING"),
Self::Severe => std::option::Option::Some("SEVERE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ErrorSeverity {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ErrorSeverity {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ErrorSeverity {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Warning,
2 => Self::Severe,
_ => Self::UnknownValue(error_severity::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ErrorSeverity {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"ERROR_SEVERITY_UNSPECIFIED" => Self::Unspecified,
"WARNING" => Self::Warning,
"SEVERE" => Self::Severe,
_ => Self::UnknownValue(error_severity::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ErrorSeverity {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Warning => serializer.serialize_i32(1),
Self::Severe => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ErrorSeverity {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorSeverity>::new(
".google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum MetadataKey {
Unspecified,
RowLimit,
UnknownValue(metadata_key::UnknownValue),
}
#[doc(hidden)]
pub mod metadata_key {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl MetadataKey {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::RowLimit => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("METADATA_KEY_UNSPECIFIED"),
Self::RowLimit => std::option::Option::Some("ROW_LIMIT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for MetadataKey {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for MetadataKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for MetadataKey {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::RowLimit,
_ => Self::UnknownValue(metadata_key::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for MetadataKey {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"METADATA_KEY_UNSPECIFIED" => Self::Unspecified,
"ROW_LIMIT" => Self::RowLimit,
_ => Self::UnknownValue(metadata_key::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for MetadataKey {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::RowLimit => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for MetadataKey {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetadataKey>::new(
".google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum WarningReason {
Unspecified,
RowLimitExceeded,
DefaultRowLimitExceeded,
CuratedQueryDefaultRowLimitExceeded,
UnknownValue(warning_reason::UnknownValue),
}
#[doc(hidden)]
pub mod warning_reason {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl WarningReason {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::RowLimitExceeded => std::option::Option::Some(1),
Self::DefaultRowLimitExceeded => std::option::Option::Some(2),
Self::CuratedQueryDefaultRowLimitExceeded => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("WARNING_REASON_UNSPECIFIED"),
Self::RowLimitExceeded => std::option::Option::Some("ROW_LIMIT_EXCEEDED"),
Self::DefaultRowLimitExceeded => {
std::option::Option::Some("DEFAULT_ROW_LIMIT_EXCEEDED")
}
Self::CuratedQueryDefaultRowLimitExceeded => {
std::option::Option::Some("CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for WarningReason {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for WarningReason {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for WarningReason {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::RowLimitExceeded,
2 => Self::DefaultRowLimitExceeded,
3 => Self::CuratedQueryDefaultRowLimitExceeded,
_ => Self::UnknownValue(warning_reason::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for WarningReason {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"WARNING_REASON_UNSPECIFIED" => Self::Unspecified,
"ROW_LIMIT_EXCEEDED" => Self::RowLimitExceeded,
"DEFAULT_ROW_LIMIT_EXCEEDED" => Self::DefaultRowLimitExceeded,
"CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED" => {
Self::CuratedQueryDefaultRowLimitExceeded
}
_ => Self::UnknownValue(warning_reason::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for WarningReason {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::RowLimitExceeded => serializer.serialize_i32(1),
Self::DefaultRowLimitExceeded => serializer.serialize_i32(2),
Self::CuratedQueryDefaultRowLimitExceeded => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for WarningReason {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<WarningReason>::new(
".google.cloud.chronicle.v1.QueryRuntimeError.WarningReason",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExecuteDashboardQueryResponse {
pub results: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnData>,
pub data_sources: std::vec::Vec<crate::model::DataSource>,
pub last_backend_cache_refreshed_time: std::option::Option<wkt::Timestamp>,
pub time_window: std::option::Option<google_cloud_type::model::Interval>,
pub query_runtime_errors: std::vec::Vec<crate::model::QueryRuntimeError>,
pub language_features: std::vec::Vec<crate::model::LanguageFeature>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExecuteDashboardQueryResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_results<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnData>,
{
use std::iter::Iterator;
self.results = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_data_sources<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataSource>,
{
use std::iter::Iterator;
self.data_sources = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_last_backend_cache_refreshed_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_backend_cache_refreshed_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_last_backend_cache_refreshed_time<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_backend_cache_refreshed_time = v.map(|x| x.into());
self
}
pub fn set_time_window<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.time_window = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_time_window<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.time_window = v.map(|x| x.into());
self
}
pub fn set_query_runtime_errors<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::QueryRuntimeError>,
{
use std::iter::Iterator;
self.query_runtime_errors = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_language_features<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::LanguageFeature>,
{
use std::iter::Iterator;
self.language_features = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ExecuteDashboardQueryResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse"
}
}
pub mod execute_dashboard_query_response {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnValue {
#[allow(missing_docs)]
pub metadata: std::option::Option<
crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
>,
#[allow(missing_docs)]
pub value: std::option::Option<
crate::model::execute_dashboard_query_response::column_value::Value,
>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnValue {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_metadata<T>(mut self, v: T) -> Self
where
T: std::convert::Into<
crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
>,
{
self.metadata = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<
crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
>,
{
self.metadata = v.map(|x| x.into());
self
}
pub fn set_value<
T: std::convert::Into<
std::option::Option<
crate::model::execute_dashboard_query_response::column_value::Value,
>,
>,
>(
mut self,
v: T,
) -> Self {
self.value = v.into();
self
}
pub fn null_val(&self) -> std::option::Option<&bool> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::NullVal(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_null_val<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::NullVal(
v.into(),
),
);
self
}
pub fn bool_val(&self) -> std::option::Option<&bool> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::BoolVal(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_bool_val<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::BoolVal(
v.into(),
),
);
self
}
pub fn bytes_val(&self) -> std::option::Option<&::bytes::Bytes> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::BytesVal(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_bytes_val<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::BytesVal(
v.into(),
),
);
self
}
pub fn double_val(&self) -> std::option::Option<&f64> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::DoubleVal(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_double_val<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::DoubleVal(
v.into(),
),
);
self
}
pub fn int64_val(&self) -> std::option::Option<&i64> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::Int64Val(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_int64_val<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::Int64Val(
v.into(),
),
);
self
}
pub fn uint64_val(&self) -> std::option::Option<&u64> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::Uint64Val(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_uint64_val<T: std::convert::Into<u64>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::Uint64Val(
v.into(),
),
);
self
}
pub fn string_val(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::StringVal(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_string_val<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::StringVal(
v.into(),
),
);
self
}
pub fn timestamp_val(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::TimestampVal(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_timestamp_val<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::TimestampVal(
v.into(),
),
);
self
}
pub fn date_val(
&self,
) -> std::option::Option<&std::boxed::Box<google_cloud_type::model::Date>> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::DateVal(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_date_val<
T: std::convert::Into<std::boxed::Box<google_cloud_type::model::Date>>,
>(
mut self,
v: T,
) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::DateVal(
v.into(),
),
);
self
}
pub fn proto_val(&self) -> std::option::Option<&std::boxed::Box<wkt::Any>> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_value::Value::ProtoVal(
v,
) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_proto_val<T: std::convert::Into<std::boxed::Box<wkt::Any>>>(
mut self,
v: T,
) -> Self {
self.value = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_value::Value::ProtoVal(
v.into(),
),
);
self
}
}
impl wkt::message::Message for ColumnValue {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue"
}
}
pub mod column_value {
#[allow(unused_imports)]
use super::*;
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ValueMetadata {
pub links: std::vec::Vec<crate::model::InAppLink>,
#[allow(missing_docs)]
pub field_paths: std::vec::Vec<std::string::String>,
pub timestamp_val: std::option::Option<wkt::Timestamp>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ValueMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_links<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::InAppLink>,
{
use std::iter::Iterator;
self.links = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_field_paths<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.field_paths = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_timestamp_val<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.timestamp_val = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timestamp_val<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.timestamp_val = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ValueMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata"
}
}
#[allow(missing_docs)]
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Value {
NullVal(bool),
BoolVal(bool),
BytesVal(::bytes::Bytes),
DoubleVal(f64),
Int64Val(i64),
Uint64Val(u64),
StringVal(std::string::String),
TimestampVal(std::boxed::Box<wkt::Timestamp>),
DateVal(std::boxed::Box<google_cloud_type::model::Date>),
ProtoVal(std::boxed::Box<wkt::Any>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnType {
#[allow(missing_docs)]
pub r#type:
std::option::Option<crate::model::execute_dashboard_query_response::column_type::Type>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnType {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_type<
T: std::convert::Into<
std::option::Option<
crate::model::execute_dashboard_query_response::column_type::Type,
>,
>,
>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn value(
&self,
) -> std::option::Option<
&std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>,
> {
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_type::Type::Value(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_value<
T: std::convert::Into<
std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>,
>,
>(
mut self,
v: T,
) -> Self {
self.r#type = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_type::Type::Value(v.into()),
);
self
}
pub fn list(
&self,
) -> std::option::Option<
&std::boxed::Box<crate::model::execute_dashboard_query_response::column_type::List>,
> {
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::execute_dashboard_query_response::column_type::Type::List(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_list<
T: std::convert::Into<
std::boxed::Box<
crate::model::execute_dashboard_query_response::column_type::List,
>,
>,
>(
mut self,
v: T,
) -> Self {
self.r#type = std::option::Option::Some(
crate::model::execute_dashboard_query_response::column_type::Type::List(v.into()),
);
self
}
}
impl wkt::message::Message for ColumnType {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType"
}
}
pub mod column_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct List {
#[allow(missing_docs)]
pub values: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnValue>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl List {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnValue>,
{
use std::iter::Iterator;
self.values = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for List {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List"
}
}
#[allow(missing_docs)]
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Type {
Value(std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>),
List(
std::boxed::Box<crate::model::execute_dashboard_query_response::column_type::List>,
),
}
}
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnData {
pub column: std::string::String,
pub values: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnType>,
pub metadata: std::option::Option<crate::model::ColumnMetadata>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnData {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.column = v.into();
self
}
pub fn set_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnType>,
{
use std::iter::Iterator;
self.values = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_metadata<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ColumnMetadata>,
{
self.metadata = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ColumnMetadata>,
{
self.metadata = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ColumnData {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DashboardFilter {
pub id: std::string::String,
pub data_source: crate::model::DataSource,
pub field_path: std::string::String,
pub filter_operator_and_field_values: std::vec::Vec<crate::model::FilterOperatorAndValues>,
pub display_name: std::string::String,
pub chart_ids: std::vec::Vec<std::string::String>,
pub is_standard_time_range_filter: bool,
pub is_mandatory: bool,
pub is_standard_time_range_filter_enabled: std::option::Option<bool>,
pub advanced_filter_config: std::option::Option<crate::model::AdvancedFilterConfig>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DashboardFilter {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_data_source<T: std::convert::Into<crate::model::DataSource>>(
mut self,
v: T,
) -> Self {
self.data_source = v.into();
self
}
pub fn set_field_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field_path = v.into();
self
}
pub fn set_filter_operator_and_field_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FilterOperatorAndValues>,
{
use std::iter::Iterator;
self.filter_operator_and_field_values = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_chart_ids<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.chart_ids = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_is_standard_time_range_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_standard_time_range_filter = v.into();
self
}
pub fn set_is_mandatory<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_mandatory = v.into();
self
}
pub fn set_is_standard_time_range_filter_enabled<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.is_standard_time_range_filter_enabled = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_is_standard_time_range_filter_enabled<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<bool>,
{
self.is_standard_time_range_filter_enabled = v.map(|x| x.into());
self
}
pub fn set_advanced_filter_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::AdvancedFilterConfig>,
{
self.advanced_filter_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_advanced_filter_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::AdvancedFilterConfig>,
{
self.advanced_filter_config = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for DashboardFilter {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardFilter"
}
}
#[allow(missing_docs)]
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FilterOperatorAndValues {
pub filter_operator: crate::model::FilterOperator,
pub field_values: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FilterOperatorAndValues {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_filter_operator<T: std::convert::Into<crate::model::FilterOperator>>(
mut self,
v: T,
) -> Self {
self.filter_operator = v.into();
self
}
pub fn set_field_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.field_values = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for FilterOperatorAndValues {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.FilterOperatorAndValues"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AdvancedFilterConfig {
pub token: std::string::String,
pub prefix: std::string::String,
pub suffix: std::string::String,
pub separator: std::string::String,
pub multiple_allowed: bool,
pub default_values: std::vec::Vec<std::string::String>,
pub skip_default_affixes: bool,
pub value_source: std::option::Option<crate::model::advanced_filter_config::ValueSource>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AdvancedFilterConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.token = v.into();
self
}
pub fn set_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.prefix = v.into();
self
}
pub fn set_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.suffix = v.into();
self
}
pub fn set_separator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.separator = v.into();
self
}
pub fn set_multiple_allowed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.multiple_allowed = v.into();
self
}
pub fn set_default_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.default_values = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_skip_default_affixes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.skip_default_affixes = v.into();
self
}
pub fn set_value_source<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::advanced_filter_config::ValueSource>,
{
self.value_source = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_value_source<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::advanced_filter_config::ValueSource>,
{
self.value_source = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AdvancedFilterConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig"
}
}
pub mod advanced_filter_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ValueSource {
pub source: std::option::Option<crate::model::advanced_filter_config::value_source::Source>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ValueSource {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_source<
T: std::convert::Into<
std::option::Option<crate::model::advanced_filter_config::value_source::Source>,
>,
>(
mut self,
v: T,
) -> Self {
self.source = v.into();
self
}
pub fn manual_options(
&self,
) -> std::option::Option<
&std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>,
> {
#[allow(unreachable_patterns)]
self.source.as_ref().and_then(|v| match v {
crate::model::advanced_filter_config::value_source::Source::ManualOptions(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_manual_options<
T: std::convert::Into<
std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>,
>,
>(
mut self,
v: T,
) -> Self {
self.source = std::option::Option::Some(
crate::model::advanced_filter_config::value_source::Source::ManualOptions(v.into()),
);
self
}
pub fn query_options(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>>
{
#[allow(unreachable_patterns)]
self.source.as_ref().and_then(|v| match v {
crate::model::advanced_filter_config::value_source::Source::QueryOptions(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_query_options<
T: std::convert::Into<std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>>,
>(
mut self,
v: T,
) -> Self {
self.source = std::option::Option::Some(
crate::model::advanced_filter_config::value_source::Source::QueryOptions(v.into()),
);
self
}
}
impl wkt::message::Message for ValueSource {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource"
}
}
pub mod value_source {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Source {
ManualOptions(std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>),
QueryOptions(std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ManualOptions {
pub options: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ManualOptions {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_options<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.options = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ManualOptions {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct QueryOptions {
pub query: std::string::String,
pub column: std::string::String,
pub global_time_filter_enabled: bool,
pub input: std::option::Option<crate::model::dashboard_query::Input>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl QueryOptions {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.query = v.into();
self
}
pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.column = v.into();
self
}
pub fn set_global_time_filter_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.global_time_filter_enabled = v.into();
self
}
pub fn set_input<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_query::Input>,
{
self.input = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_query::Input>,
{
self.input = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for QueryOptions {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct InAppLink {
pub url: std::string::String,
pub label: std::string::String,
pub icon_url: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl InAppLink {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.url = v.into();
self
}
pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.label = v.into();
self
}
pub fn set_icon_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.icon_url = v.into();
self
}
}
impl wkt::message::Message for InAppLink {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.InAppLink"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ColumnMetadata {
pub column: std::string::String,
pub field_path: std::string::String,
pub function_name: std::string::String,
pub function_module: std::string::String,
pub data_source: crate::model::DataSource,
pub timestamp_metadata: std::option::Option<crate::model::TimestampMetadata>,
pub longitude: bool,
pub latitude: bool,
pub selected: bool,
pub unselected: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ColumnMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.column = v.into();
self
}
pub fn set_field_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field_path = v.into();
self
}
pub fn set_function_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.function_name = v.into();
self
}
pub fn set_function_module<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.function_module = v.into();
self
}
pub fn set_data_source<T: std::convert::Into<crate::model::DataSource>>(
mut self,
v: T,
) -> Self {
self.data_source = v.into();
self
}
pub fn set_timestamp_metadata<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::TimestampMetadata>,
{
self.timestamp_metadata = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timestamp_metadata<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::TimestampMetadata>,
{
self.timestamp_metadata = v.map(|x| x.into());
self
}
pub fn set_longitude<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.longitude = v.into();
self
}
pub fn set_latitude<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.latitude = v.into();
self
}
pub fn set_selected<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.selected = v.into();
self
}
pub fn set_unselected<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.unselected = v.into();
self
}
}
impl wkt::message::Message for ColumnMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ColumnMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct TimestampMetadata {
pub time_format: std::string::String,
pub time_zone: std::string::String,
pub time_granularity: std::string::String,
pub is_sortable: bool,
pub is_interpolable: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl TimestampMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_time_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.time_format = v.into();
self
}
pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.time_zone = v.into();
self
}
pub fn set_time_granularity<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.time_granularity = v.into();
self
}
pub fn set_is_sortable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_sortable = v.into();
self
}
pub fn set_is_interpolable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_interpolable = v.into();
self
}
}
impl wkt::message::Message for TimestampMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.TimestampMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateDataAccessLabelRequest {
pub parent: std::string::String,
pub data_access_label: std::option::Option<crate::model::DataAccessLabel>,
pub data_access_label_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateDataAccessLabelRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_data_access_label<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataAccessLabel>,
{
self.data_access_label = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataAccessLabel>,
{
self.data_access_label = v.map(|x| x.into());
self
}
pub fn set_data_access_label_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.data_access_label_id = v.into();
self
}
}
impl wkt::message::Message for CreateDataAccessLabelRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateDataAccessLabelRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataAccessLabelRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataAccessLabelRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDataAccessLabelRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDataAccessLabelRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataAccessLabelsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataAccessLabelsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListDataAccessLabelsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessLabelsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataAccessLabelsResponse {
pub data_access_labels: std::vec::Vec<crate::model::DataAccessLabel>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataAccessLabelsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_access_labels<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataAccessLabel>,
{
use std::iter::Iterator;
self.data_access_labels = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListDataAccessLabelsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessLabelsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAccessLabelsResponse {
type PageItem = crate::model::DataAccessLabel;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.data_access_labels
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDataAccessLabelRequest {
pub data_access_label: std::option::Option<crate::model::DataAccessLabel>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDataAccessLabelRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_access_label<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataAccessLabel>,
{
self.data_access_label = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataAccessLabel>,
{
self.data_access_label = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateDataAccessLabelRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateDataAccessLabelRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteDataAccessLabelRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteDataAccessLabelRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteDataAccessLabelRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteDataAccessLabelRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateDataAccessScopeRequest {
pub parent: std::string::String,
pub data_access_scope: std::option::Option<crate::model::DataAccessScope>,
pub data_access_scope_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateDataAccessScopeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_data_access_scope<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataAccessScope>,
{
self.data_access_scope = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataAccessScope>,
{
self.data_access_scope = v.map(|x| x.into());
self
}
pub fn set_data_access_scope_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.data_access_scope_id = v.into();
self
}
}
impl wkt::message::Message for CreateDataAccessScopeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateDataAccessScopeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataAccessScopeRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataAccessScopeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDataAccessScopeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDataAccessScopeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataAccessScopesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataAccessScopesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListDataAccessScopesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessScopesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataAccessScopesResponse {
pub data_access_scopes: std::vec::Vec<crate::model::DataAccessScope>,
pub global_data_access_scope_granted: std::option::Option<bool>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataAccessScopesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_access_scopes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataAccessScope>,
{
use std::iter::Iterator;
self.data_access_scopes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_global_data_access_scope_granted<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.global_data_access_scope_granted = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_global_data_access_scope_granted<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<bool>,
{
self.global_data_access_scope_granted = v.map(|x| x.into());
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListDataAccessScopesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessScopesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAccessScopesResponse {
type PageItem = crate::model::DataAccessScope;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.data_access_scopes
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDataAccessScopeRequest {
pub data_access_scope: std::option::Option<crate::model::DataAccessScope>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDataAccessScopeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_access_scope<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataAccessScope>,
{
self.data_access_scope = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataAccessScope>,
{
self.data_access_scope = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateDataAccessScopeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateDataAccessScopeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteDataAccessScopeRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteDataAccessScopeRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteDataAccessScopeRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteDataAccessScopeRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataAccessLabel {
pub name: std::string::String,
pub display_name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub author: std::string::String,
pub last_editor: std::string::String,
pub description: std::string::String,
pub definition: std::option::Option<crate::model::data_access_label::Definition>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataAccessLabel {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.author = v.into();
self
}
pub fn set_last_editor<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.last_editor = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_definition<
T: std::convert::Into<std::option::Option<crate::model::data_access_label::Definition>>,
>(
mut self,
v: T,
) -> Self {
self.definition = v.into();
self
}
pub fn udm_query(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.definition.as_ref().and_then(|v| match v {
crate::model::data_access_label::Definition::UdmQuery(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_udm_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.definition = std::option::Option::Some(
crate::model::data_access_label::Definition::UdmQuery(v.into()),
);
self
}
}
impl wkt::message::Message for DataAccessLabel {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataAccessLabel"
}
}
pub mod data_access_label {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Definition {
UdmQuery(std::string::String),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataAccessScope {
pub name: std::string::String,
pub allowed_data_access_labels: std::vec::Vec<crate::model::DataAccessLabelReference>,
pub denied_data_access_labels: std::vec::Vec<crate::model::DataAccessLabelReference>,
pub display_name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub author: std::string::String,
pub last_editor: std::string::String,
pub description: std::string::String,
pub allow_all: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataAccessScope {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_allowed_data_access_labels<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataAccessLabelReference>,
{
use std::iter::Iterator;
self.allowed_data_access_labels = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_denied_data_access_labels<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataAccessLabelReference>,
{
use std::iter::Iterator;
self.denied_data_access_labels = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.author = v.into();
self
}
pub fn set_last_editor<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.last_editor = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_allow_all<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.allow_all = v.into();
self
}
}
impl wkt::message::Message for DataAccessScope {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataAccessScope"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataAccessLabelReference {
pub display_name: std::string::String,
pub label: std::option::Option<crate::model::data_access_label_reference::Label>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataAccessLabelReference {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_label<
T: std::convert::Into<std::option::Option<crate::model::data_access_label_reference::Label>>,
>(
mut self,
v: T,
) -> Self {
self.label = v.into();
self
}
pub fn data_access_label(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.label.as_ref().and_then(|v| match v {
crate::model::data_access_label_reference::Label::DataAccessLabel(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_data_access_label<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.label = std::option::Option::Some(
crate::model::data_access_label_reference::Label::DataAccessLabel(v.into()),
);
self
}
pub fn log_type(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.label.as_ref().and_then(|v| match v {
crate::model::data_access_label_reference::Label::LogType(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_log_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.label = std::option::Option::Some(
crate::model::data_access_label_reference::Label::LogType(v.into()),
);
self
}
pub fn asset_namespace(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.label.as_ref().and_then(|v| match v {
crate::model::data_access_label_reference::Label::AssetNamespace(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_asset_namespace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.label = std::option::Option::Some(
crate::model::data_access_label_reference::Label::AssetNamespace(v.into()),
);
self
}
pub fn ingestion_label(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::IngestionLabel>> {
#[allow(unreachable_patterns)]
self.label.as_ref().and_then(|v| match v {
crate::model::data_access_label_reference::Label::IngestionLabel(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_ingestion_label<
T: std::convert::Into<std::boxed::Box<crate::model::IngestionLabel>>,
>(
mut self,
v: T,
) -> Self {
self.label = std::option::Option::Some(
crate::model::data_access_label_reference::Label::IngestionLabel(v.into()),
);
self
}
}
impl wkt::message::Message for DataAccessLabelReference {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataAccessLabelReference"
}
}
pub mod data_access_label_reference {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Label {
DataAccessLabel(std::string::String),
LogType(std::string::String),
AssetNamespace(std::string::String),
IngestionLabel(std::boxed::Box<crate::model::IngestionLabel>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct IngestionLabel {
pub ingestion_label_key: std::string::String,
pub ingestion_label_value: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl IngestionLabel {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ingestion_label_key<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.ingestion_label_key = v.into();
self
}
pub fn set_ingestion_label_value<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.ingestion_label_value = v.into();
self
}
}
impl wkt::message::Message for IngestionLabel {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.IngestionLabel"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateDataTableRequest {
pub parent: std::string::String,
pub data_table: std::option::Option<crate::model::DataTable>,
pub data_table_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateDataTableRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_data_table<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataTable>,
{
self.data_table = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataTable>,
{
self.data_table = v.map(|x| x.into());
self
}
pub fn set_data_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.data_table_id = v.into();
self
}
}
impl wkt::message::Message for CreateDataTableRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateDataTableRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataTableRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataTableRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDataTableRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDataTableRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDataTableRequest {
pub data_table: std::option::Option<crate::model::DataTable>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDataTableRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataTable>,
{
self.data_table = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataTable>,
{
self.data_table = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateDataTableRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateDataTableRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataTablesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub order_by: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataTablesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
}
impl wkt::message::Message for ListDataTablesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataTablesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteDataTableRequest {
pub name: std::string::String,
pub force: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteDataTableRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.force = v.into();
self
}
}
impl wkt::message::Message for DeleteDataTableRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteDataTableRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataTablesResponse {
pub data_tables: std::vec::Vec<crate::model::DataTable>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataTablesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_tables<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTable>,
{
use std::iter::Iterator;
self.data_tables = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListDataTablesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataTablesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListDataTablesResponse {
type PageItem = crate::model::DataTable;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.data_tables
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateDataTableRowRequest {
pub parent: std::string::String,
pub data_table_row: std::option::Option<crate::model::DataTableRow>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateDataTableRowRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_data_table_row<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataTableRow>,
{
self.data_table_row = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataTableRow>,
{
self.data_table_row = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateDataTableRowRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateDataTableRowRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDataTableRowRequest {
pub data_table_row: std::option::Option<crate::model::DataTableRow>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDataTableRowRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_row<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataTableRow>,
{
self.data_table_row = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataTableRow>,
{
self.data_table_row = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateDataTableRowRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateDataTableRowRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataTableRowsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub order_by: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataTableRowsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListDataTableRowsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataTableRowsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDataTableRowsResponse {
pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDataTableRowsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableRow>,
{
use std::iter::Iterator;
self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListDataTableRowsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListDataTableRowsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListDataTableRowsResponse {
type PageItem = crate::model::DataTableRow;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.data_table_rows
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataTableRowRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataTableRowRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDataTableRowRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDataTableRowRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteDataTableRowRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteDataTableRowRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteDataTableRowRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteDataTableRowRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkCreateDataTableRowsRequest {
pub parent: std::string::String,
pub requests: std::vec::Vec<crate::model::CreateDataTableRowRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkCreateDataTableRowsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_requests<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
{
use std::iter::Iterator;
self.requests = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkCreateDataTableRowsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkCreateDataTableRowsResponse {
pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkCreateDataTableRowsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableRow>,
{
use std::iter::Iterator;
self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkCreateDataTableRowsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkGetDataTableRowsRequest {
pub parent: std::string::String,
pub requests: std::vec::Vec<crate::model::GetDataTableRowRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkGetDataTableRowsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_requests<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::GetDataTableRowRequest>,
{
use std::iter::Iterator;
self.requests = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkGetDataTableRowsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkGetDataTableRowsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkGetDataTableRowsResponse {
pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkGetDataTableRowsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableRow>,
{
use std::iter::Iterator;
self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkGetDataTableRowsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkGetDataTableRowsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkReplaceDataTableRowsRequest {
pub parent: std::string::String,
pub requests: std::vec::Vec<crate::model::CreateDataTableRowRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkReplaceDataTableRowsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_requests<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
{
use std::iter::Iterator;
self.requests = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkReplaceDataTableRowsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkReplaceDataTableRowsResponse {
pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkReplaceDataTableRowsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableRow>,
{
use std::iter::Iterator;
self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkReplaceDataTableRowsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkUpdateDataTableRowsRequest {
pub parent: std::string::String,
pub requests: std::vec::Vec<crate::model::UpdateDataTableRowRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkUpdateDataTableRowsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_requests<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::UpdateDataTableRowRequest>,
{
use std::iter::Iterator;
self.requests = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkUpdateDataTableRowsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BulkUpdateDataTableRowsResponse {
pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BulkUpdateDataTableRowsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableRow>,
{
use std::iter::Iterator;
self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BulkUpdateDataTableRowsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataTableScopeInfo {
pub data_access_scopes: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataTableScopeInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_data_access_scopes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.data_access_scopes = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DataTableScopeInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataTableScopeInfo"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataTable {
pub name: std::string::String,
pub display_name: std::string::String,
pub description: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub column_info: std::vec::Vec<crate::model::DataTableColumnInfo>,
pub data_table_uuid: std::string::String,
pub rules: std::vec::Vec<std::string::String>,
pub rule_associations_count: i32,
pub row_time_to_live: std::string::String,
pub approximate_row_count: i64,
pub scope_info: std::option::Option<crate::model::DataTableScopeInfo>,
pub update_source: crate::model::DataTableUpdateSource,
pub row_time_to_live_update_time: std::option::Option<wkt::Timestamp>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataTable {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_column_info<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DataTableColumnInfo>,
{
use std::iter::Iterator;
self.column_info = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_data_table_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.data_table_uuid = v.into();
self
}
pub fn set_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_rule_associations_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.rule_associations_count = v.into();
self
}
pub fn set_row_time_to_live<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.row_time_to_live = v.into();
self
}
pub fn set_approximate_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.approximate_row_count = v.into();
self
}
pub fn set_scope_info<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DataTableScopeInfo>,
{
self.scope_info = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_scope_info<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DataTableScopeInfo>,
{
self.scope_info = v.map(|x| x.into());
self
}
pub fn set_update_source<T: std::convert::Into<crate::model::DataTableUpdateSource>>(
mut self,
v: T,
) -> Self {
self.update_source = v.into();
self
}
pub fn set_row_time_to_live_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.row_time_to_live_update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_row_time_to_live_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.row_time_to_live_update_time = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for DataTable {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataTable"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataTableRow {
pub name: std::string::String,
pub values: std::vec::Vec<std::string::String>,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub row_time_to_live: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataTableRow {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_values<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.values = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_row_time_to_live<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.row_time_to_live = v.into();
self
}
}
impl wkt::message::Message for DataTableRow {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataTableRow"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataTableColumnInfo {
pub column_index: i32,
pub original_column: std::string::String,
pub key_column: bool,
pub repeated_values: bool,
#[allow(missing_docs)]
pub path_or_type: std::option::Option<crate::model::data_table_column_info::PathOrType>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataTableColumnInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_column_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.column_index = v.into();
self
}
pub fn set_original_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.original_column = v.into();
self
}
pub fn set_key_column<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.key_column = v.into();
self
}
pub fn set_repeated_values<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.repeated_values = v.into();
self
}
pub fn set_path_or_type<
T: std::convert::Into<std::option::Option<crate::model::data_table_column_info::PathOrType>>,
>(
mut self,
v: T,
) -> Self {
self.path_or_type = v.into();
self
}
pub fn mapped_column_path(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.path_or_type.as_ref().and_then(|v| match v {
crate::model::data_table_column_info::PathOrType::MappedColumnPath(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_mapped_column_path<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.path_or_type = std::option::Option::Some(
crate::model::data_table_column_info::PathOrType::MappedColumnPath(v.into()),
);
self
}
pub fn column_type(
&self,
) -> std::option::Option<&crate::model::data_table_column_info::DataTableColumnType> {
#[allow(unreachable_patterns)]
self.path_or_type.as_ref().and_then(|v| match v {
crate::model::data_table_column_info::PathOrType::ColumnType(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_column_type<
T: std::convert::Into<crate::model::data_table_column_info::DataTableColumnType>,
>(
mut self,
v: T,
) -> Self {
self.path_or_type = std::option::Option::Some(
crate::model::data_table_column_info::PathOrType::ColumnType(v.into()),
);
self
}
}
impl wkt::message::Message for DataTableColumnInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataTableColumnInfo"
}
}
pub mod data_table_column_info {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DataTableColumnType {
Unspecified,
String,
Regex,
Cidr,
Number,
UnknownValue(data_table_column_type::UnknownValue),
}
#[doc(hidden)]
pub mod data_table_column_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DataTableColumnType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::String => std::option::Option::Some(1),
Self::Regex => std::option::Option::Some(2),
Self::Cidr => std::option::Option::Some(3),
Self::Number => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => {
std::option::Option::Some("DATA_TABLE_COLUMN_TYPE_UNSPECIFIED")
}
Self::String => std::option::Option::Some("STRING"),
Self::Regex => std::option::Option::Some("REGEX"),
Self::Cidr => std::option::Option::Some("CIDR"),
Self::Number => std::option::Option::Some("NUMBER"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DataTableColumnType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DataTableColumnType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DataTableColumnType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::String,
2 => Self::Regex,
3 => Self::Cidr,
4 => Self::Number,
_ => Self::UnknownValue(data_table_column_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DataTableColumnType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED" => Self::Unspecified,
"STRING" => Self::String,
"REGEX" => Self::Regex,
"CIDR" => Self::Cidr,
"NUMBER" => Self::Number,
_ => Self::UnknownValue(data_table_column_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DataTableColumnType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::String => serializer.serialize_i32(1),
Self::Regex => serializer.serialize_i32(2),
Self::Cidr => serializer.serialize_i32(3),
Self::Number => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DataTableColumnType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataTableColumnType>::new(
".google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType",
))
}
}
#[allow(missing_docs)]
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum PathOrType {
MappedColumnPath(std::string::String),
ColumnType(crate::model::data_table_column_info::DataTableColumnType),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataTableOperationErrorsRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataTableOperationErrorsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDataTableOperationErrorsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataTableOperationErrors {
pub name: std::string::String,
pub rpc_errors: std::vec::Vec<google_cloud_rpc::model::Status>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataTableOperationErrors {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_rpc_errors<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<google_cloud_rpc::model::Status>,
{
use std::iter::Iterator;
self.rpc_errors = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DataTableOperationErrors {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DataTableOperationErrors"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Watchlist {
pub name: std::string::String,
pub display_name: std::string::String,
pub description: std::string::String,
pub multiplying_factor: f32,
pub entity_population_mechanism:
std::option::Option<crate::model::watchlist::EntityPopulationMechanism>,
pub entity_count: std::option::Option<crate::model::watchlist::EntityCount>,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub watchlist_user_preferences: std::option::Option<crate::model::WatchlistUserPreferences>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Watchlist {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_multiplying_factor<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.multiplying_factor = v.into();
self
}
pub fn set_entity_population_mechanism<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::watchlist::EntityPopulationMechanism>,
{
self.entity_population_mechanism = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_entity_population_mechanism<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::watchlist::EntityPopulationMechanism>,
{
self.entity_population_mechanism = v.map(|x| x.into());
self
}
pub fn set_entity_count<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::watchlist::EntityCount>,
{
self.entity_count = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_entity_count<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::watchlist::EntityCount>,
{
self.entity_count = v.map(|x| x.into());
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_watchlist_user_preferences<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::WatchlistUserPreferences>,
{
self.watchlist_user_preferences = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_watchlist_user_preferences<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::WatchlistUserPreferences>,
{
self.watchlist_user_preferences = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Watchlist {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Watchlist"
}
}
pub mod watchlist {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct EntityPopulationMechanism {
pub mechanism:
std::option::Option<crate::model::watchlist::entity_population_mechanism::Mechanism>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl EntityPopulationMechanism {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_mechanism<
T: std::convert::Into<
std::option::Option<
crate::model::watchlist::entity_population_mechanism::Mechanism,
>,
>,
>(
mut self,
v: T,
) -> Self {
self.mechanism = v.into();
self
}
pub fn manual(
&self,
) -> std::option::Option<
&std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>,
> {
#[allow(unreachable_patterns)]
self.mechanism.as_ref().and_then(|v| match v {
crate::model::watchlist::entity_population_mechanism::Mechanism::Manual(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_manual<
T: std::convert::Into<
std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>,
>,
>(
mut self,
v: T,
) -> Self {
self.mechanism = std::option::Option::Some(
crate::model::watchlist::entity_population_mechanism::Mechanism::Manual(v.into()),
);
self
}
}
impl wkt::message::Message for EntityPopulationMechanism {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism"
}
}
pub mod entity_population_mechanism {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Manual {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Manual {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for Manual {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Mechanism {
Manual(std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct EntityCount {
pub user: i32,
pub asset: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl EntityCount {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_user<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.user = v.into();
self
}
pub fn set_asset<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.asset = v.into();
self
}
}
impl wkt::message::Message for EntityCount {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityCount"
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct WatchlistUserPreferences {
pub pinned: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl WatchlistUserPreferences {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_pinned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.pinned = v.into();
self
}
}
impl wkt::message::Message for WatchlistUserPreferences {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.WatchlistUserPreferences"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetWatchlistRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetWatchlistRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetWatchlistRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetWatchlistRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWatchlistsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListWatchlistsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListWatchlistsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListWatchlistsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWatchlistsResponse {
pub watchlists: std::vec::Vec<crate::model::Watchlist>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListWatchlistsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_watchlists<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Watchlist>,
{
use std::iter::Iterator;
self.watchlists = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListWatchlistsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListWatchlistsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListWatchlistsResponse {
type PageItem = crate::model::Watchlist;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.watchlists
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateWatchlistRequest {
pub parent: std::string::String,
pub watchlist_id: std::string::String,
pub watchlist: std::option::Option<crate::model::Watchlist>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateWatchlistRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_watchlist_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.watchlist_id = v.into();
self
}
pub fn set_watchlist<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Watchlist>,
{
self.watchlist = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Watchlist>,
{
self.watchlist = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateWatchlistRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateWatchlistRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateWatchlistRequest {
pub watchlist: std::option::Option<crate::model::Watchlist>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateWatchlistRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_watchlist<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Watchlist>,
{
self.watchlist = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Watchlist>,
{
self.watchlist = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateWatchlistRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateWatchlistRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteWatchlistRequest {
pub name: std::string::String,
pub force: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteWatchlistRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.force = v.into();
self
}
}
impl wkt::message::Message for DeleteWatchlistRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteWatchlistRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FeaturedContentMetadata {
pub id: std::string::String,
pub display_name: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub author: std::string::String,
pub certified: bool,
pub description: std::string::String,
pub categories: std::vec::Vec<std::string::String>,
pub version: std::string::String,
pub verified: std::option::Option<bool>,
pub source_type: crate::model::featured_content_metadata::ContentSourceType,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FeaturedContentMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.author = v.into();
self
}
pub fn set_certified<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.certified = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_categories<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.categories = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
pub fn set_verified<T>(mut self, v: T) -> Self
where
T: std::convert::Into<bool>,
{
self.verified = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_verified<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<bool>,
{
self.verified = v.map(|x| x.into());
self
}
pub fn set_source_type<
T: std::convert::Into<crate::model::featured_content_metadata::ContentSourceType>,
>(
mut self,
v: T,
) -> Self {
self.source_type = v.into();
self
}
}
impl wkt::message::Message for FeaturedContentMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.FeaturedContentMetadata"
}
}
pub mod featured_content_metadata {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ContentSourceType {
Unspecified,
Google,
Community,
Partner,
UnknownValue(content_source_type::UnknownValue),
}
#[doc(hidden)]
pub mod content_source_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ContentSourceType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Google => std::option::Option::Some(1),
Self::Community => std::option::Option::Some(2),
Self::Partner => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("CONTENT_SOURCE_TYPE_UNSPECIFIED"),
Self::Google => std::option::Option::Some("GOOGLE"),
Self::Community => std::option::Option::Some("COMMUNITY"),
Self::Partner => std::option::Option::Some("PARTNER"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ContentSourceType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ContentSourceType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ContentSourceType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Google,
2 => Self::Community,
3 => Self::Partner,
_ => Self::UnknownValue(content_source_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ContentSourceType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"CONTENT_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
"GOOGLE" => Self::Google,
"COMMUNITY" => Self::Community,
"PARTNER" => Self::Partner,
_ => Self::UnknownValue(content_source_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ContentSourceType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Google => serializer.serialize_i32(1),
Self::Community => serializer.serialize_i32(2),
Self::Partner => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ContentSourceType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentSourceType>::new(
".google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FeaturedContentNativeDashboard {
pub name: std::string::String,
pub content_metadata: std::option::Option<crate::model::FeaturedContentMetadata>,
pub dashboard_content: std::option::Option<crate::model::NativeDashboardWithChartsAndQueries>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FeaturedContentNativeDashboard {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_content_metadata<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FeaturedContentMetadata>,
{
self.content_metadata = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_content_metadata<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::FeaturedContentMetadata>,
{
self.content_metadata = v.map(|x| x.into());
self
}
pub fn set_dashboard_content<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
{
self.dashboard_content = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_content<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
{
self.dashboard_content = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for FeaturedContentNativeDashboard {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.FeaturedContentNativeDashboard"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetFeaturedContentNativeDashboardRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetFeaturedContentNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetFeaturedContentNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListFeaturedContentNativeDashboardsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListFeaturedContentNativeDashboardsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListFeaturedContentNativeDashboardsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListFeaturedContentNativeDashboardsResponse {
pub featured_content_native_dashboards:
std::vec::Vec<crate::model::FeaturedContentNativeDashboard>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListFeaturedContentNativeDashboardsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_featured_content_native_dashboards<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
{
use std::iter::Iterator;
self.featured_content_native_dashboards = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListFeaturedContentNativeDashboardsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse
for ListFeaturedContentNativeDashboardsResponse
{
type PageItem = crate::model::FeaturedContentNativeDashboard;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.featured_content_native_dashboards
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct InstallFeaturedContentNativeDashboardRequest {
pub name: std::string::String,
pub featured_content_native_dashboard:
std::option::Option<crate::model::FeaturedContentNativeDashboard>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl InstallFeaturedContentNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_featured_content_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
{
self.featured_content_native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_featured_content_native_dashboard<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
{
self.featured_content_native_dashboard = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for InstallFeaturedContentNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct InstallFeaturedContentNativeDashboardResponse {
pub native_dashboard: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl InstallFeaturedContentNativeDashboardResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboard<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.native_dashboard = v.into();
self
}
}
impl wkt::message::Message for InstallFeaturedContentNativeDashboardResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Instance {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Instance {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for Instance {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Instance"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetInstanceRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetInstanceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetInstanceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetInstanceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExportNativeDashboardsRequest {
pub parent: std::string::String,
pub names: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExportNativeDashboardsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_names<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.names = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ExportNativeDashboardsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExportNativeDashboardsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExportNativeDashboardsResponse {
pub destination:
std::option::Option<crate::model::export_native_dashboards_response::Destination>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ExportNativeDashboardsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_destination<
T: std::convert::Into<
std::option::Option<crate::model::export_native_dashboards_response::Destination>,
>,
>(
mut self,
v: T,
) -> Self {
self.destination = v.into();
self
}
pub fn inline_destination(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::InlineDestination>> {
#[allow(unreachable_patterns)]
self.destination.as_ref().and_then(|v| match v {
crate::model::export_native_dashboards_response::Destination::InlineDestination(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_inline_destination<
T: std::convert::Into<std::boxed::Box<crate::model::InlineDestination>>,
>(
mut self,
v: T,
) -> Self {
self.destination = std::option::Option::Some(
crate::model::export_native_dashboards_response::Destination::InlineDestination(
v.into(),
),
);
self
}
}
impl wkt::message::Message for ExportNativeDashboardsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ExportNativeDashboardsResponse"
}
}
pub mod export_native_dashboards_response {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Destination {
InlineDestination(std::boxed::Box<crate::model::InlineDestination>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct InlineDestination {
pub dashboards: std::vec::Vec<crate::model::NativeDashboardWithChartsAndQueries>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl InlineDestination {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboards<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
{
use std::iter::Iterator;
self.dashboards = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for InlineDestination {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.InlineDestination"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NativeDashboardWithChartsAndQueries {
pub dashboard: std::option::Option<crate::model::NativeDashboard>,
pub dashboard_charts: std::vec::Vec<crate::model::DashboardChart>,
pub dashboard_queries: std::vec::Vec<crate::model::DashboardQuery>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NativeDashboardWithChartsAndQueries {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.dashboard = v.map(|x| x.into());
self
}
pub fn set_dashboard_charts<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DashboardChart>,
{
use std::iter::Iterator;
self.dashboard_charts = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_dashboard_queries<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DashboardQuery>,
{
use std::iter::Iterator;
self.dashboard_queries = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for NativeDashboardWithChartsAndQueries {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ImportNativeDashboardsRequest {
pub parent: std::string::String,
pub source: std::option::Option<crate::model::ImportNativeDashboardsInlineSource>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ImportNativeDashboardsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_source<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
{
self.source = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
{
self.source = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ImportNativeDashboardsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ImportNativeDashboardsInlineSource {
pub dashboards: std::vec::Vec<crate::model::NativeDashboardWithChartsAndQueries>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ImportNativeDashboardsInlineSource {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboards<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
{
use std::iter::Iterator;
self.dashboards = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ImportNativeDashboardsInlineSource {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ImportNativeDashboardsResponse {
pub results: std::vec::Vec<crate::model::ImportExportStatus>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ImportNativeDashboardsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_results<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ImportExportStatus>,
{
use std::iter::Iterator;
self.results = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ImportNativeDashboardsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ImportExportStatus {
pub dashboard: std::string::String,
pub status: std::option::Option<google_cloud_rpc::model::Status>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ImportExportStatus {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dashboard = v.into();
self
}
pub fn set_status<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_rpc::model::Status>,
{
self.status = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_rpc::model::Status>,
{
self.status = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ImportExportStatus {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ImportExportStatus"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NativeDashboard {
pub name: std::string::String,
pub display_name: std::string::String,
pub description: std::string::String,
pub definition: std::option::Option<crate::model::DashboardDefinition>,
pub r#type: crate::model::DashboardType,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub create_user_id: std::string::String,
pub update_user_id: std::string::String,
pub dashboard_user_data: std::option::Option<crate::model::DashboardUserData>,
pub etag: std::string::String,
pub access: crate::model::DashboardAccess,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NativeDashboard {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_definition<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardDefinition>,
{
self.definition = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_definition<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardDefinition>,
{
self.definition = v.map(|x| x.into());
self
}
pub fn set_type<T: std::convert::Into<crate::model::DashboardType>>(mut self, v: T) -> Self {
self.r#type = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_create_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.create_user_id = v.into();
self
}
pub fn set_update_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.update_user_id = v.into();
self
}
pub fn set_dashboard_user_data<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardUserData>,
{
self.dashboard_user_data = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_user_data<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardUserData>,
{
self.dashboard_user_data = v.map(|x| x.into());
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
pub fn set_access<T: std::convert::Into<crate::model::DashboardAccess>>(
mut self,
v: T,
) -> Self {
self.access = v.into();
self
}
}
impl wkt::message::Message for NativeDashboard {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.NativeDashboard"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateNativeDashboardRequest {
pub parent: std::string::String,
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetNativeDashboardRequest {
pub name: std::string::String,
pub view: crate::model::NativeDashboardView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::NativeDashboardView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNativeDashboardsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub view: crate::model::NativeDashboardView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNativeDashboardsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::NativeDashboardView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for ListNativeDashboardsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListNativeDashboardsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListNativeDashboardsResponse {
pub native_dashboards: std::vec::Vec<crate::model::NativeDashboard>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListNativeDashboardsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboards<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::NativeDashboard>,
{
use std::iter::Iterator;
self.native_dashboards = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListNativeDashboardsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListNativeDashboardsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListNativeDashboardsResponse {
type PageItem = crate::model::NativeDashboard;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.native_dashboards
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateNativeDashboardRequest {
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DuplicateNativeDashboardRequest {
pub name: std::string::String,
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DuplicateNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for DuplicateNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DuplicateNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteNativeDashboardRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteNativeDashboardRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteNativeDashboardRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteNativeDashboardRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AddChartRequest {
pub name: std::string::String,
pub dashboard_query: std::option::Option<crate::model::DashboardQuery>,
pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
pub chart_layout:
std::option::Option<crate::model::dashboard_definition::chart_config::ChartLayout>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AddChartRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_dashboard_query<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.dashboard_query = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.dashboard_query = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = v.map(|x| x.into());
self
}
pub fn set_chart_layout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
{
self.chart_layout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_chart_layout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
{
self.chart_layout = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AddChartRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AddChartRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AddChartResponse {
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AddChartResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AddChartResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.AddChartResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct EditChartRequest {
pub name: std::string::String,
pub dashboard_query: std::option::Option<crate::model::DashboardQuery>,
pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
pub edit_mask: std::option::Option<wkt::FieldMask>,
pub language_features: std::vec::Vec<crate::model::LanguageFeature>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl EditChartRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_dashboard_query<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.dashboard_query = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardQuery>,
{
self.dashboard_query = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = v.map(|x| x.into());
self
}
pub fn set_edit_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.edit_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_edit_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.edit_mask = v.map(|x| x.into());
self
}
pub fn set_language_features<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::LanguageFeature>,
{
use std::iter::Iterator;
self.language_features = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for EditChartRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.EditChartRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct EditChartResponse {
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl EditChartResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for EditChartResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.EditChartResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RemoveChartRequest {
pub name: std::string::String,
pub dashboard_chart: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RemoveChartRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dashboard_chart = v.into();
self
}
}
impl wkt::message::Message for RemoveChartRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.RemoveChartRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DuplicateChartRequest {
pub name: std::string::String,
pub dashboard_chart: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DuplicateChartRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dashboard_chart = v.into();
self
}
}
impl wkt::message::Message for DuplicateChartRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DuplicateChartRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DuplicateChartResponse {
pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DuplicateChartResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_native_dashboard<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NativeDashboard>,
{
self.native_dashboard = v.map(|x| x.into());
self
}
pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DashboardChart>,
{
self.dashboard_chart = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for DuplicateChartResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DuplicateChartResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DashboardUserData {
pub last_viewed_time: std::option::Option<wkt::Timestamp>,
pub is_pinned: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DashboardUserData {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_last_viewed_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_viewed_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_last_viewed_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_viewed_time = v.map(|x| x.into());
self
}
pub fn set_is_pinned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_pinned = v.into();
self
}
}
impl wkt::message::Message for DashboardUserData {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardUserData"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DashboardDefinition {
pub filters: std::vec::Vec<crate::model::DashboardFilter>,
pub fingerprint: std::string::String,
pub charts: std::vec::Vec<crate::model::dashboard_definition::ChartConfig>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DashboardDefinition {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_filters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DashboardFilter>,
{
use std::iter::Iterator;
self.filters = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_fingerprint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.fingerprint = v.into();
self
}
pub fn set_charts<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::dashboard_definition::ChartConfig>,
{
use std::iter::Iterator;
self.charts = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DashboardDefinition {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition"
}
}
pub mod dashboard_definition {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ChartConfig {
#[allow(missing_docs)]
pub dashboard_chart: std::string::String,
#[allow(missing_docs)]
pub chart_layout:
std::option::Option<crate::model::dashboard_definition::chart_config::ChartLayout>,
pub filters_ids: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ChartConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.dashboard_chart = v.into();
self
}
pub fn set_chart_layout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
{
self.chart_layout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_chart_layout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
{
self.chart_layout = v.map(|x| x.into());
self
}
pub fn set_filters_ids<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.filters_ids = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ChartConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition.ChartConfig"
}
}
pub mod chart_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ChartLayout {
#[allow(missing_docs)]
pub start_x: std::option::Option<i32>,
#[allow(missing_docs)]
pub span_x: i32,
#[allow(missing_docs)]
pub start_y: std::option::Option<i32>,
#[allow(missing_docs)]
pub span_y: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ChartLayout {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_start_x<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.start_x = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_start_x<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.start_x = v.map(|x| x.into());
self
}
pub fn set_span_x<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.span_x = v.into();
self
}
pub fn set_start_y<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.start_y = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_start_y<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.start_y = v.map(|x| x.into());
self
}
pub fn set_span_y<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.span_y = v.into();
self
}
}
impl wkt::message::Message for ChartLayout {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout"
}
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ScopeInfo {
pub reference_list_scope: std::option::Option<crate::model::ReferenceListScope>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ScopeInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_reference_list_scope<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ReferenceListScope>,
{
self.reference_list_scope = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_reference_list_scope<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ReferenceListScope>,
{
self.reference_list_scope = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ScopeInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ScopeInfo"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReferenceListScope {
pub scope_names: std::vec::Vec<std::string::String>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReferenceListScope {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_scope_names<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.scope_names = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ReferenceListScope {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ReferenceListScope"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetReferenceListRequest {
pub name: std::string::String,
pub view: crate::model::ReferenceListView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetReferenceListRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ReferenceListView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetReferenceListRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetReferenceListRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListReferenceListsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub view: crate::model::ReferenceListView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListReferenceListsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ReferenceListView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for ListReferenceListsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListReferenceListsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListReferenceListsResponse {
pub reference_lists: std::vec::Vec<crate::model::ReferenceList>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListReferenceListsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_reference_lists<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ReferenceList>,
{
use std::iter::Iterator;
self.reference_lists = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListReferenceListsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListReferenceListsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListReferenceListsResponse {
type PageItem = crate::model::ReferenceList;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.reference_lists
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateReferenceListRequest {
pub parent: std::string::String,
pub reference_list: std::option::Option<crate::model::ReferenceList>,
pub reference_list_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateReferenceListRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_reference_list<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ReferenceList>,
{
self.reference_list = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ReferenceList>,
{
self.reference_list = v.map(|x| x.into());
self
}
pub fn set_reference_list_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.reference_list_id = v.into();
self
}
}
impl wkt::message::Message for CreateReferenceListRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateReferenceListRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateReferenceListRequest {
pub reference_list: std::option::Option<crate::model::ReferenceList>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateReferenceListRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_reference_list<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ReferenceList>,
{
self.reference_list = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ReferenceList>,
{
self.reference_list = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateReferenceListRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateReferenceListRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReferenceList {
pub name: std::string::String,
pub display_name: std::string::String,
pub revision_create_time: std::option::Option<wkt::Timestamp>,
pub description: std::string::String,
pub entries: std::vec::Vec<crate::model::ReferenceListEntry>,
pub rules: std::vec::Vec<std::string::String>,
pub syntax_type: crate::model::ReferenceListSyntaxType,
pub rule_associations_count: i32,
pub scope_info: std::option::Option<crate::model::ScopeInfo>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReferenceList {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_revision_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.revision_create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_revision_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.revision_create_time = v.map(|x| x.into());
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_entries<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ReferenceListEntry>,
{
use std::iter::Iterator;
self.entries = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_syntax_type<T: std::convert::Into<crate::model::ReferenceListSyntaxType>>(
mut self,
v: T,
) -> Self {
self.syntax_type = v.into();
self
}
pub fn set_rule_associations_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.rule_associations_count = v.into();
self
}
pub fn set_scope_info<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ScopeInfo>,
{
self.scope_info = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_scope_info<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ScopeInfo>,
{
self.scope_info = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ReferenceList {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ReferenceList"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReferenceListEntry {
pub value: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReferenceListEntry {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.value = v.into();
self
}
}
impl wkt::message::Message for ReferenceListEntry {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ReferenceListEntry"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Rule {
pub name: std::string::String,
pub revision_id: std::string::String,
pub display_name: std::string::String,
pub text: std::string::String,
pub author: std::string::String,
pub severity: std::option::Option<crate::model::Severity>,
pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
pub create_time: std::option::Option<wkt::Timestamp>,
pub revision_create_time: std::option::Option<wkt::Timestamp>,
pub compilation_state: crate::model::rule::CompilationState,
pub r#type: crate::model::RuleType,
pub reference_lists: std::vec::Vec<std::string::String>,
pub allowed_run_frequencies: std::vec::Vec<crate::model::RunFrequency>,
pub etag: std::string::String,
pub scope: std::string::String,
pub compilation_diagnostics: std::vec::Vec<crate::model::CompilationDiagnostic>,
pub near_real_time_live_rule_eligible: bool,
pub inputs_used: std::option::Option<crate::model::InputsUsed>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Rule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.revision_id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.text = v.into();
self
}
pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.author = v.into();
self
}
pub fn set_severity<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Severity>,
{
self.severity = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_severity<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Severity>,
{
self.severity = v.map(|x| x.into());
self
}
pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_revision_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.revision_create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_revision_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.revision_create_time = v.map(|x| x.into());
self
}
pub fn set_compilation_state<T: std::convert::Into<crate::model::rule::CompilationState>>(
mut self,
v: T,
) -> Self {
self.compilation_state = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::RuleType>>(mut self, v: T) -> Self {
self.r#type = v.into();
self
}
pub fn set_reference_lists<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.reference_lists = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_allowed_run_frequencies<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RunFrequency>,
{
use std::iter::Iterator;
self.allowed_run_frequencies = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.scope = v.into();
self
}
pub fn set_compilation_diagnostics<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::CompilationDiagnostic>,
{
use std::iter::Iterator;
self.compilation_diagnostics = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_near_real_time_live_rule_eligible<T: std::convert::Into<bool>>(
mut self,
v: T,
) -> Self {
self.near_real_time_live_rule_eligible = v.into();
self
}
pub fn set_inputs_used<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::InputsUsed>,
{
self.inputs_used = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_inputs_used<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::InputsUsed>,
{
self.inputs_used = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Rule {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Rule"
}
}
pub mod rule {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum CompilationState {
Unspecified,
Succeeded,
Failed,
UnknownValue(compilation_state::UnknownValue),
}
#[doc(hidden)]
pub mod compilation_state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl CompilationState {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Succeeded => std::option::Option::Some(1),
Self::Failed => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("COMPILATION_STATE_UNSPECIFIED"),
Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for CompilationState {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for CompilationState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for CompilationState {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Succeeded,
2 => Self::Failed,
_ => Self::UnknownValue(compilation_state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for CompilationState {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"COMPILATION_STATE_UNSPECIFIED" => Self::Unspecified,
"SUCCEEDED" => Self::Succeeded,
"FAILED" => Self::Failed,
_ => Self::UnknownValue(compilation_state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for CompilationState {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Succeeded => serializer.serialize_i32(1),
Self::Failed => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for CompilationState {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompilationState>::new(
".google.cloud.chronicle.v1.Rule.CompilationState",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RuleDeployment {
pub name: std::string::String,
pub enabled: bool,
pub alerting: bool,
pub archived: bool,
pub archive_time: std::option::Option<wkt::Timestamp>,
pub run_frequency: crate::model::RunFrequency,
pub execution_state: crate::model::rule_deployment::ExecutionState,
pub producer_rules: std::vec::Vec<std::string::String>,
pub consumer_rules: std::vec::Vec<std::string::String>,
pub last_alert_status_change_time: std::option::Option<wkt::Timestamp>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RuleDeployment {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enabled = v.into();
self
}
pub fn set_alerting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.alerting = v.into();
self
}
pub fn set_archived<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.archived = v.into();
self
}
pub fn set_archive_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.archive_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_archive_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.archive_time = v.map(|x| x.into());
self
}
pub fn set_run_frequency<T: std::convert::Into<crate::model::RunFrequency>>(
mut self,
v: T,
) -> Self {
self.run_frequency = v.into();
self
}
pub fn set_execution_state<
T: std::convert::Into<crate::model::rule_deployment::ExecutionState>,
>(
mut self,
v: T,
) -> Self {
self.execution_state = v.into();
self
}
pub fn set_producer_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.producer_rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_consumer_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.consumer_rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_last_alert_status_change_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_alert_status_change_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_last_alert_status_change_time<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_alert_status_change_time = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for RuleDeployment {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.RuleDeployment"
}
}
pub mod rule_deployment {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ExecutionState {
Unspecified,
Default,
Limited,
Paused,
UnknownValue(execution_state::UnknownValue),
}
#[doc(hidden)]
pub mod execution_state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ExecutionState {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Default => std::option::Option::Some(1),
Self::Limited => std::option::Option::Some(2),
Self::Paused => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("EXECUTION_STATE_UNSPECIFIED"),
Self::Default => std::option::Option::Some("DEFAULT"),
Self::Limited => std::option::Option::Some("LIMITED"),
Self::Paused => std::option::Option::Some("PAUSED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ExecutionState {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ExecutionState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ExecutionState {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Default,
2 => Self::Limited,
3 => Self::Paused,
_ => Self::UnknownValue(execution_state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ExecutionState {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"EXECUTION_STATE_UNSPECIFIED" => Self::Unspecified,
"DEFAULT" => Self::Default,
"LIMITED" => Self::Limited,
"PAUSED" => Self::Paused,
_ => Self::UnknownValue(execution_state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ExecutionState {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Default => serializer.serialize_i32(1),
Self::Limited => serializer.serialize_i32(2),
Self::Paused => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ExecutionState {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionState>::new(
".google.cloud.chronicle.v1.RuleDeployment.ExecutionState",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Retrohunt {
pub name: std::string::String,
pub process_interval: std::option::Option<google_cloud_type::model::Interval>,
pub execution_interval: std::option::Option<google_cloud_type::model::Interval>,
pub state: crate::model::retrohunt::State,
pub progress_percentage: f32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Retrohunt {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_process_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.process_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_process_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.process_interval = v.map(|x| x.into());
self
}
pub fn set_execution_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.execution_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_execution_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.execution_interval = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::retrohunt::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_progress_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.progress_percentage = v.into();
self
}
}
impl wkt::message::Message for Retrohunt {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Retrohunt"
}
}
pub mod retrohunt {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Running,
Done,
Cancelled,
Failed,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Running => std::option::Option::Some(1),
Self::Done => std::option::Option::Some(2),
Self::Cancelled => std::option::Option::Some(3),
Self::Failed => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Running => std::option::Option::Some("RUNNING"),
Self::Done => std::option::Option::Some("DONE"),
Self::Cancelled => std::option::Option::Some("CANCELLED"),
Self::Failed => std::option::Option::Some("FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Running,
2 => Self::Done,
3 => Self::Cancelled,
4 => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"RUNNING" => Self::Running,
"DONE" => Self::Done,
"CANCELLED" => Self::Cancelled,
"FAILED" => Self::Failed,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Running => serializer.serialize_i32(1),
Self::Done => serializer.serialize_i32(2),
Self::Cancelled => serializer.serialize_i32(3),
Self::Failed => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.cloud.chronicle.v1.Retrohunt.State",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateRuleRequest {
pub parent: std::string::String,
pub rule: std::option::Option<crate::model::Rule>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Rule>,
{
self.rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Rule>,
{
self.rule = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetRuleRequest {
pub name: std::string::String,
pub view: crate::model::RuleView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRulesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub view: crate::model::RuleView,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRulesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListRulesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRulesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRulesResponse {
pub rules: std::vec::Vec<crate::model::Rule>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRulesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Rule>,
{
use std::iter::Iterator;
self.rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListRulesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRulesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListRulesResponse {
type PageItem = crate::model::Rule;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.rules
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateRuleRequest {
pub rule: std::option::Option<crate::model::Rule>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Rule>,
{
self.rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Rule>,
{
self.rule = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteRuleRequest {
pub name: std::string::String,
pub force: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.force = v.into();
self
}
}
impl wkt::message::Message for DeleteRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.DeleteRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRuleRevisionsRequest {
pub name: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub view: crate::model::RuleView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRuleRevisionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for ListRuleRevisionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRuleRevisionsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRuleRevisionsResponse {
pub rules: std::vec::Vec<crate::model::Rule>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRuleRevisionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Rule>,
{
use std::iter::Iterator;
self.rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListRuleRevisionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRuleRevisionsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListRuleRevisionsResponse {
type PageItem = crate::model::Rule;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.rules
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateRetrohuntRequest {
pub parent: std::string::String,
pub retrohunt: std::option::Option<crate::model::Retrohunt>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateRetrohuntRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_retrohunt<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Retrohunt>,
{
self.retrohunt = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_retrohunt<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Retrohunt>,
{
self.retrohunt = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateRetrohuntRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CreateRetrohuntRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetRetrohuntRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetRetrohuntRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetRetrohuntRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetRetrohuntRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRetrohuntsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRetrohuntsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListRetrohuntsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRetrohuntsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRetrohuntsResponse {
pub retrohunts: std::vec::Vec<crate::model::Retrohunt>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRetrohuntsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_retrohunts<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Retrohunt>,
{
use std::iter::Iterator;
self.retrohunts = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListRetrohuntsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRetrohuntsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListRetrohuntsResponse {
type PageItem = crate::model::Retrohunt;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.retrohunts
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetRuleDeploymentRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetRuleDeploymentRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetRuleDeploymentRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.GetRuleDeploymentRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRuleDeploymentsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRuleDeploymentsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListRuleDeploymentsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRuleDeploymentsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListRuleDeploymentsResponse {
pub rule_deployments: std::vec::Vec<crate::model::RuleDeployment>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListRuleDeploymentsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_rule_deployments<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RuleDeployment>,
{
use std::iter::Iterator;
self.rule_deployments = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListRuleDeploymentsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.ListRuleDeploymentsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListRuleDeploymentsResponse {
type PageItem = crate::model::RuleDeployment;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.rule_deployments
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateRuleDeploymentRequest {
pub rule_deployment: std::option::Option<crate::model::RuleDeployment>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateRuleDeploymentRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_rule_deployment<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::RuleDeployment>,
{
self.rule_deployment = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule_deployment<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::RuleDeployment>,
{
self.rule_deployment = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateRuleDeploymentRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.UpdateRuleDeploymentRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CompilationPosition {
pub start_line: i32,
pub start_column: i32,
pub end_line: i32,
pub end_column: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CompilationPosition {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_start_line<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.start_line = v.into();
self
}
pub fn set_start_column<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.start_column = v.into();
self
}
pub fn set_end_line<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.end_line = v.into();
self
}
pub fn set_end_column<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.end_column = v.into();
self
}
}
impl wkt::message::Message for CompilationPosition {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CompilationPosition"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CompilationDiagnostic {
pub message: std::string::String,
pub position: std::option::Option<crate::model::CompilationPosition>,
pub severity: crate::model::compilation_diagnostic::Severity,
pub uri: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CompilationDiagnostic {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.message = v.into();
self
}
pub fn set_position<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CompilationPosition>,
{
self.position = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_position<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CompilationPosition>,
{
self.position = v.map(|x| x.into());
self
}
pub fn set_severity<T: std::convert::Into<crate::model::compilation_diagnostic::Severity>>(
mut self,
v: T,
) -> Self {
self.severity = v.into();
self
}
pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uri = v.into();
self
}
}
impl wkt::message::Message for CompilationDiagnostic {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.CompilationDiagnostic"
}
}
pub mod compilation_diagnostic {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Severity {
Unspecified,
Warning,
Error,
UnknownValue(severity::UnknownValue),
}
#[doc(hidden)]
pub mod severity {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Severity {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Warning => std::option::Option::Some(1),
Self::Error => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
Self::Warning => std::option::Option::Some("WARNING"),
Self::Error => std::option::Option::Some("ERROR"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Severity {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Severity {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Severity {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Warning,
2 => Self::Error,
_ => Self::UnknownValue(severity::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Severity {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SEVERITY_UNSPECIFIED" => Self::Unspecified,
"WARNING" => Self::Warning,
"ERROR" => Self::Error,
_ => Self::UnknownValue(severity::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Severity {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Warning => serializer.serialize_i32(1),
Self::Error => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Severity {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
".google.cloud.chronicle.v1.CompilationDiagnostic.Severity",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Severity {
pub display_name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Severity {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
}
impl wkt::message::Message for Severity {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.Severity"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RetrohuntMetadata {
pub retrohunt: std::string::String,
pub execution_interval: std::option::Option<google_cloud_type::model::Interval>,
pub progress_percentage: f32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RetrohuntMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_retrohunt<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.retrohunt = v.into();
self
}
pub fn set_execution_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.execution_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_execution_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Interval>,
{
self.execution_interval = v.map(|x| x.into());
self
}
pub fn set_progress_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.progress_percentage = v.into();
self
}
}
impl wkt::message::Message for RetrohuntMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.RetrohuntMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct InputsUsed {
pub uses_udm: bool,
pub uses_entity: bool,
pub uses_detection: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl InputsUsed {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_uses_udm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.uses_udm = v.into();
self
}
pub fn set_uses_entity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.uses_entity = v.into();
self
}
pub fn set_uses_detection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.uses_detection = v.into();
self
}
}
impl wkt::message::Message for InputsUsed {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.chronicle.v1.InputsUsed"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum BigQueryExportPackage {
Unspecified,
Byobq,
Advanced,
UnknownValue(big_query_export_package::UnknownValue),
}
#[doc(hidden)]
pub mod big_query_export_package {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl BigQueryExportPackage {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Byobq => std::option::Option::Some(1),
Self::Advanced => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED"),
Self::Byobq => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_BYOBQ"),
Self::Advanced => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_ADVANCED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for BigQueryExportPackage {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for BigQueryExportPackage {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for BigQueryExportPackage {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Byobq,
2 => Self::Advanced,
_ => Self::UnknownValue(big_query_export_package::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for BigQueryExportPackage {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED" => Self::Unspecified,
"BIG_QUERY_EXPORT_PACKAGE_BYOBQ" => Self::Byobq,
"BIG_QUERY_EXPORT_PACKAGE_ADVANCED" => Self::Advanced,
_ => Self::UnknownValue(big_query_export_package::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for BigQueryExportPackage {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Byobq => serializer.serialize_i32(1),
Self::Advanced => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for BigQueryExportPackage {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<BigQueryExportPackage>::new(
".google.cloud.chronicle.v1.BigQueryExportPackage",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LatestExportJobState {
Unspecified,
Success,
Failed,
UnknownValue(latest_export_job_state::UnknownValue),
}
#[doc(hidden)]
pub mod latest_export_job_state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LatestExportJobState {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Success => std::option::Option::Some(1),
Self::Failed => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_UNSPECIFIED"),
Self::Success => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_SUCCESS"),
Self::Failed => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_FAILED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LatestExportJobState {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LatestExportJobState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LatestExportJobState {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Success,
2 => Self::Failed,
_ => Self::UnknownValue(latest_export_job_state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LatestExportJobState {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LATEST_EXPORT_JOB_STATE_UNSPECIFIED" => Self::Unspecified,
"LATEST_EXPORT_JOB_STATE_SUCCESS" => Self::Success,
"LATEST_EXPORT_JOB_STATE_FAILED" => Self::Failed,
_ => Self::UnknownValue(latest_export_job_state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LatestExportJobState {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Success => serializer.serialize_i32(1),
Self::Failed => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LatestExportJobState {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LatestExportJobState>::new(
".google.cloud.chronicle.v1.LatestExportJobState",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum TileType {
Unspecified,
Visualization,
Button,
Markdown,
UnknownValue(tile_type::UnknownValue),
}
#[doc(hidden)]
pub mod tile_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl TileType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Visualization => std::option::Option::Some(1),
Self::Button => std::option::Option::Some(2),
Self::Markdown => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TILE_TYPE_UNSPECIFIED"),
Self::Visualization => std::option::Option::Some("TILE_TYPE_VISUALIZATION"),
Self::Button => std::option::Option::Some("TILE_TYPE_BUTTON"),
Self::Markdown => std::option::Option::Some("TILE_TYPE_MARKDOWN"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for TileType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for TileType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for TileType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Visualization,
2 => Self::Button,
3 => Self::Markdown,
_ => Self::UnknownValue(tile_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for TileType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TILE_TYPE_UNSPECIFIED" => Self::Unspecified,
"TILE_TYPE_VISUALIZATION" => Self::Visualization,
"TILE_TYPE_BUTTON" => Self::Button,
"TILE_TYPE_MARKDOWN" => Self::Markdown,
_ => Self::UnknownValue(tile_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for TileType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Visualization => serializer.serialize_i32(1),
Self::Button => serializer.serialize_i32(2),
Self::Markdown => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for TileType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<TileType>::new(
".google.cloud.chronicle.v1.TileType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RenderType {
Unspecified,
Text,
Icon,
IconAndText,
UnknownValue(render_type::UnknownValue),
}
#[doc(hidden)]
pub mod render_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RenderType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Text => std::option::Option::Some(1),
Self::Icon => std::option::Option::Some(2),
Self::IconAndText => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("RENDER_TYPE_UNSPECIFIED"),
Self::Text => std::option::Option::Some("RENDER_TYPE_TEXT"),
Self::Icon => std::option::Option::Some("RENDER_TYPE_ICON"),
Self::IconAndText => std::option::Option::Some("RENDER_TYPE_ICON_AND_TEXT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RenderType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RenderType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RenderType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Text,
2 => Self::Icon,
3 => Self::IconAndText,
_ => Self::UnknownValue(render_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RenderType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"RENDER_TYPE_UNSPECIFIED" => Self::Unspecified,
"RENDER_TYPE_TEXT" => Self::Text,
"RENDER_TYPE_ICON" => Self::Icon,
"RENDER_TYPE_ICON_AND_TEXT" => Self::IconAndText,
_ => Self::UnknownValue(render_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RenderType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Text => serializer.serialize_i32(1),
Self::Icon => serializer.serialize_i32(2),
Self::IconAndText => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RenderType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RenderType>::new(
".google.cloud.chronicle.v1.RenderType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum AxisType {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Value,
#[allow(missing_docs)]
Category,
#[allow(missing_docs)]
Time,
#[allow(missing_docs)]
Log,
UnknownValue(axis_type::UnknownValue),
}
#[doc(hidden)]
pub mod axis_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl AxisType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Value => std::option::Option::Some(1),
Self::Category => std::option::Option::Some(2),
Self::Time => std::option::Option::Some(3),
Self::Log => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("AXIS_TYPE_UNSPECIFIED"),
Self::Value => std::option::Option::Some("VALUE"),
Self::Category => std::option::Option::Some("CATEGORY"),
Self::Time => std::option::Option::Some("TIME"),
Self::Log => std::option::Option::Some("LOG"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for AxisType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for AxisType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for AxisType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Value,
2 => Self::Category,
3 => Self::Time,
4 => Self::Log,
_ => Self::UnknownValue(axis_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for AxisType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"AXIS_TYPE_UNSPECIFIED" => Self::Unspecified,
"VALUE" => Self::Value,
"CATEGORY" => Self::Category,
"TIME" => Self::Time,
"LOG" => Self::Log,
_ => Self::UnknownValue(axis_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for AxisType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Value => serializer.serialize_i32(1),
Self::Category => serializer.serialize_i32(2),
Self::Time => serializer.serialize_i32(3),
Self::Log => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for AxisType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<AxisType>::new(
".google.cloud.chronicle.v1.AxisType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SeriesType {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Line,
#[allow(missing_docs)]
Bar,
#[allow(missing_docs)]
Pie,
#[allow(missing_docs)]
Text,
Map,
Gauge,
Scatterplot,
UnknownValue(series_type::UnknownValue),
}
#[doc(hidden)]
pub mod series_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SeriesType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Line => std::option::Option::Some(1),
Self::Bar => std::option::Option::Some(2),
Self::Pie => std::option::Option::Some(3),
Self::Text => std::option::Option::Some(4),
Self::Map => std::option::Option::Some(5),
Self::Gauge => std::option::Option::Some(6),
Self::Scatterplot => std::option::Option::Some(7),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SERIES_TYPE_UNSPECIFIED"),
Self::Line => std::option::Option::Some("LINE"),
Self::Bar => std::option::Option::Some("BAR"),
Self::Pie => std::option::Option::Some("PIE"),
Self::Text => std::option::Option::Some("TEXT"),
Self::Map => std::option::Option::Some("MAP"),
Self::Gauge => std::option::Option::Some("GAUGE"),
Self::Scatterplot => std::option::Option::Some("SCATTERPLOT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SeriesType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SeriesType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SeriesType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Line,
2 => Self::Bar,
3 => Self::Pie,
4 => Self::Text,
5 => Self::Map,
6 => Self::Gauge,
7 => Self::Scatterplot,
_ => Self::UnknownValue(series_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SeriesType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SERIES_TYPE_UNSPECIFIED" => Self::Unspecified,
"LINE" => Self::Line,
"BAR" => Self::Bar,
"PIE" => Self::Pie,
"TEXT" => Self::Text,
"MAP" => Self::Map,
"GAUGE" => Self::Gauge,
"SCATTERPLOT" => Self::Scatterplot,
_ => Self::UnknownValue(series_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SeriesType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Line => serializer.serialize_i32(1),
Self::Bar => serializer.serialize_i32(2),
Self::Pie => serializer.serialize_i32(3),
Self::Text => serializer.serialize_i32(4),
Self::Map => serializer.serialize_i32(5),
Self::Gauge => serializer.serialize_i32(6),
Self::Scatterplot => serializer.serialize_i32(7),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SeriesType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SeriesType>::new(
".google.cloud.chronicle.v1.SeriesType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SeriesStackStrategy {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Samesign,
#[allow(missing_docs)]
All,
#[allow(missing_docs)]
Positive,
#[allow(missing_docs)]
Negative,
UnknownValue(series_stack_strategy::UnknownValue),
}
#[doc(hidden)]
pub mod series_stack_strategy {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SeriesStackStrategy {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Samesign => std::option::Option::Some(1),
Self::All => std::option::Option::Some(2),
Self::Positive => std::option::Option::Some(3),
Self::Negative => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SERIES_STACK_STRATEGY_UNSPECIFIED"),
Self::Samesign => std::option::Option::Some("SAMESIGN"),
Self::All => std::option::Option::Some("ALL"),
Self::Positive => std::option::Option::Some("POSITIVE"),
Self::Negative => std::option::Option::Some("NEGATIVE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SeriesStackStrategy {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SeriesStackStrategy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SeriesStackStrategy {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Samesign,
2 => Self::All,
3 => Self::Positive,
4 => Self::Negative,
_ => Self::UnknownValue(series_stack_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SeriesStackStrategy {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SERIES_STACK_STRATEGY_UNSPECIFIED" => Self::Unspecified,
"SAMESIGN" => Self::Samesign,
"ALL" => Self::All,
"POSITIVE" => Self::Positive,
"NEGATIVE" => Self::Negative,
_ => Self::UnknownValue(series_stack_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SeriesStackStrategy {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Samesign => serializer.serialize_i32(1),
Self::All => serializer.serialize_i32(2),
Self::Positive => serializer.serialize_i32(3),
Self::Negative => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SeriesStackStrategy {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SeriesStackStrategy>::new(
".google.cloud.chronicle.v1.SeriesStackStrategy",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ToolTipTrigger {
#[allow(missing_docs)]
TooltipTriggerUnspecified,
#[allow(missing_docs)]
TooltipTriggerNone,
#[allow(missing_docs)]
TooltipTriggerItem,
#[allow(missing_docs)]
TooltipTriggerAxis,
UnknownValue(tool_tip_trigger::UnknownValue),
}
#[doc(hidden)]
pub mod tool_tip_trigger {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ToolTipTrigger {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::TooltipTriggerUnspecified => std::option::Option::Some(0),
Self::TooltipTriggerNone => std::option::Option::Some(1),
Self::TooltipTriggerItem => std::option::Option::Some(2),
Self::TooltipTriggerAxis => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::TooltipTriggerUnspecified => {
std::option::Option::Some("TOOLTIP_TRIGGER_UNSPECIFIED")
}
Self::TooltipTriggerNone => std::option::Option::Some("TOOLTIP_TRIGGER_NONE"),
Self::TooltipTriggerItem => std::option::Option::Some("TOOLTIP_TRIGGER_ITEM"),
Self::TooltipTriggerAxis => std::option::Option::Some("TOOLTIP_TRIGGER_AXIS"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ToolTipTrigger {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ToolTipTrigger {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ToolTipTrigger {
fn from(value: i32) -> Self {
match value {
0 => Self::TooltipTriggerUnspecified,
1 => Self::TooltipTriggerNone,
2 => Self::TooltipTriggerItem,
3 => Self::TooltipTriggerAxis,
_ => Self::UnknownValue(tool_tip_trigger::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ToolTipTrigger {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TOOLTIP_TRIGGER_UNSPECIFIED" => Self::TooltipTriggerUnspecified,
"TOOLTIP_TRIGGER_NONE" => Self::TooltipTriggerNone,
"TOOLTIP_TRIGGER_ITEM" => Self::TooltipTriggerItem,
"TOOLTIP_TRIGGER_AXIS" => Self::TooltipTriggerAxis,
_ => Self::UnknownValue(tool_tip_trigger::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ToolTipTrigger {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::TooltipTriggerUnspecified => serializer.serialize_i32(0),
Self::TooltipTriggerNone => serializer.serialize_i32(1),
Self::TooltipTriggerItem => serializer.serialize_i32(2),
Self::TooltipTriggerAxis => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ToolTipTrigger {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ToolTipTrigger>::new(
".google.cloud.chronicle.v1.ToolTipTrigger",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LegendOrient {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Vertical,
#[allow(missing_docs)]
Horizontal,
UnknownValue(legend_orient::UnknownValue),
}
#[doc(hidden)]
pub mod legend_orient {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LegendOrient {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Vertical => std::option::Option::Some(1),
Self::Horizontal => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("LEGEND_ORIENT_UNSPECIFIED"),
Self::Vertical => std::option::Option::Some("VERTICAL"),
Self::Horizontal => std::option::Option::Some("HORIZONTAL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LegendOrient {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LegendOrient {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LegendOrient {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Vertical,
2 => Self::Horizontal,
_ => Self::UnknownValue(legend_orient::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LegendOrient {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LEGEND_ORIENT_UNSPECIFIED" => Self::Unspecified,
"VERTICAL" => Self::Vertical,
"HORIZONTAL" => Self::Horizontal,
_ => Self::UnknownValue(legend_orient::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LegendOrient {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Vertical => serializer.serialize_i32(1),
Self::Horizontal => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LegendOrient {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LegendOrient>::new(
".google.cloud.chronicle.v1.LegendOrient",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LegendAlign {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Auto,
#[allow(missing_docs)]
Left,
#[allow(missing_docs)]
Right,
UnknownValue(legend_align::UnknownValue),
}
#[doc(hidden)]
pub mod legend_align {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LegendAlign {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Auto => std::option::Option::Some(1),
Self::Left => std::option::Option::Some(2),
Self::Right => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("LEGEND_ALIGN_UNSPECIFIED"),
Self::Auto => std::option::Option::Some("AUTO"),
Self::Left => std::option::Option::Some("LEFT"),
Self::Right => std::option::Option::Some("RIGHT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LegendAlign {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LegendAlign {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LegendAlign {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Auto,
2 => Self::Left,
3 => Self::Right,
_ => Self::UnknownValue(legend_align::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LegendAlign {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LEGEND_ALIGN_UNSPECIFIED" => Self::Unspecified,
"AUTO" => Self::Auto,
"LEFT" => Self::Left,
"RIGHT" => Self::Right,
_ => Self::UnknownValue(legend_align::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LegendAlign {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Auto => serializer.serialize_i32(1),
Self::Left => serializer.serialize_i32(2),
Self::Right => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LegendAlign {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LegendAlign>::new(
".google.cloud.chronicle.v1.LegendAlign",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ButtonStyle {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Filled,
#[allow(missing_docs)]
Outlined,
#[allow(missing_docs)]
Transparent,
UnknownValue(button_style::UnknownValue),
}
#[doc(hidden)]
pub mod button_style {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ButtonStyle {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Filled => std::option::Option::Some(1),
Self::Outlined => std::option::Option::Some(2),
Self::Transparent => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("BUTTON_STYLE_UNSPECIFIED"),
Self::Filled => std::option::Option::Some("BUTTON_STYLE_FILLED"),
Self::Outlined => std::option::Option::Some("BUTTON_STYLE_OUTLINED"),
Self::Transparent => std::option::Option::Some("BUTTON_STYLE_TRANSPARENT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ButtonStyle {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ButtonStyle {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ButtonStyle {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Filled,
2 => Self::Outlined,
3 => Self::Transparent,
_ => Self::UnknownValue(button_style::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ButtonStyle {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"BUTTON_STYLE_UNSPECIFIED" => Self::Unspecified,
"BUTTON_STYLE_FILLED" => Self::Filled,
"BUTTON_STYLE_OUTLINED" => Self::Outlined,
"BUTTON_STYLE_TRANSPARENT" => Self::Transparent,
_ => Self::UnknownValue(button_style::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ButtonStyle {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Filled => serializer.serialize_i32(1),
Self::Outlined => serializer.serialize_i32(2),
Self::Transparent => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ButtonStyle {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ButtonStyle>::new(
".google.cloud.chronicle.v1.ButtonStyle",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum PlotMode {
Unspecified,
Points,
Heatmap,
Both,
UnknownValue(plot_mode::UnknownValue),
}
#[doc(hidden)]
pub mod plot_mode {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl PlotMode {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Points => std::option::Option::Some(1),
Self::Heatmap => std::option::Option::Some(2),
Self::Both => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("PLOT_MODE_UNSPECIFIED"),
Self::Points => std::option::Option::Some("PLOT_MODE_POINTS"),
Self::Heatmap => std::option::Option::Some("PLOT_MODE_HEATMAP"),
Self::Both => std::option::Option::Some("PLOT_MODE_BOTH"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for PlotMode {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for PlotMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for PlotMode {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Points,
2 => Self::Heatmap,
3 => Self::Both,
_ => Self::UnknownValue(plot_mode::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for PlotMode {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"PLOT_MODE_UNSPECIFIED" => Self::Unspecified,
"PLOT_MODE_POINTS" => Self::Points,
"PLOT_MODE_HEATMAP" => Self::Heatmap,
"PLOT_MODE_BOTH" => Self::Both,
_ => Self::UnknownValue(plot_mode::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for PlotMode {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Points => serializer.serialize_i32(1),
Self::Heatmap => serializer.serialize_i32(2),
Self::Both => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for PlotMode {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<PlotMode>::new(
".google.cloud.chronicle.v1.PlotMode",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum PointSizeType {
Unspecified,
Fixed,
ProportionalToSize,
UnknownValue(point_size_type::UnknownValue),
}
#[doc(hidden)]
pub mod point_size_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl PointSizeType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Fixed => std::option::Option::Some(1),
Self::ProportionalToSize => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("POINT_SIZE_TYPE_UNSPECIFIED"),
Self::Fixed => std::option::Option::Some("POINT_SIZE_TYPE_FIXED"),
Self::ProportionalToSize => {
std::option::Option::Some("POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for PointSizeType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for PointSizeType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for PointSizeType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Fixed,
2 => Self::ProportionalToSize,
_ => Self::UnknownValue(point_size_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for PointSizeType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"POINT_SIZE_TYPE_UNSPECIFIED" => Self::Unspecified,
"POINT_SIZE_TYPE_FIXED" => Self::Fixed,
"POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE" => Self::ProportionalToSize,
_ => Self::UnknownValue(point_size_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for PointSizeType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Fixed => serializer.serialize_i32(1),
Self::ProportionalToSize => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for PointSizeType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<PointSizeType>::new(
".google.cloud.chronicle.v1.PointSizeType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum MetricFormat {
Unspecified,
Number,
PlainText,
UnknownValue(metric_format::UnknownValue),
}
#[doc(hidden)]
pub mod metric_format {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl MetricFormat {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Number => std::option::Option::Some(1),
Self::PlainText => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("METRIC_FORMAT_UNSPECIFIED"),
Self::Number => std::option::Option::Some("METRIC_FORMAT_NUMBER"),
Self::PlainText => std::option::Option::Some("METRIC_FORMAT_PLAIN_TEXT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for MetricFormat {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for MetricFormat {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for MetricFormat {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Number,
2 => Self::PlainText,
_ => Self::UnknownValue(metric_format::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for MetricFormat {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"METRIC_FORMAT_UNSPECIFIED" => Self::Unspecified,
"METRIC_FORMAT_NUMBER" => Self::Number,
"METRIC_FORMAT_PLAIN_TEXT" => Self::PlainText,
_ => Self::UnknownValue(metric_format::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for MetricFormat {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Number => serializer.serialize_i32(1),
Self::PlainText => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for MetricFormat {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricFormat>::new(
".google.cloud.chronicle.v1.MetricFormat",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum MetricDisplayTrend {
Unspecified,
AbsoluteValue,
Percentage,
AbsoluteValueAndPercentage,
UnknownValue(metric_display_trend::UnknownValue),
}
#[doc(hidden)]
pub mod metric_display_trend {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl MetricDisplayTrend {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::AbsoluteValue => std::option::Option::Some(2),
Self::Percentage => std::option::Option::Some(3),
Self::AbsoluteValueAndPercentage => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("METRIC_DISPLAY_TREND_UNSPECIFIED"),
Self::AbsoluteValue => std::option::Option::Some("METRIC_DISPLAY_TREND_ABSOLUTE_VALUE"),
Self::Percentage => std::option::Option::Some("METRIC_DISPLAY_TREND_PERCENTAGE"),
Self::AbsoluteValueAndPercentage => {
std::option::Option::Some("METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for MetricDisplayTrend {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for MetricDisplayTrend {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for MetricDisplayTrend {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
2 => Self::AbsoluteValue,
3 => Self::Percentage,
4 => Self::AbsoluteValueAndPercentage,
_ => Self::UnknownValue(metric_display_trend::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for MetricDisplayTrend {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"METRIC_DISPLAY_TREND_UNSPECIFIED" => Self::Unspecified,
"METRIC_DISPLAY_TREND_ABSOLUTE_VALUE" => Self::AbsoluteValue,
"METRIC_DISPLAY_TREND_PERCENTAGE" => Self::Percentage,
"METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE" => {
Self::AbsoluteValueAndPercentage
}
_ => Self::UnknownValue(metric_display_trend::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for MetricDisplayTrend {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::AbsoluteValue => serializer.serialize_i32(2),
Self::Percentage => serializer.serialize_i32(3),
Self::AbsoluteValueAndPercentage => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for MetricDisplayTrend {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricDisplayTrend>::new(
".google.cloud.chronicle.v1.MetricDisplayTrend",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum MetricTrendType {
Unspecified,
Regular,
Inverse,
UnknownValue(metric_trend_type::UnknownValue),
}
#[doc(hidden)]
pub mod metric_trend_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl MetricTrendType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Regular => std::option::Option::Some(1),
Self::Inverse => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("METRIC_TREND_TYPE_UNSPECIFIED"),
Self::Regular => std::option::Option::Some("METRIC_TREND_TYPE_REGULAR"),
Self::Inverse => std::option::Option::Some("METRIC_TREND_TYPE_INVERSE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for MetricTrendType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for MetricTrendType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for MetricTrendType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Regular,
2 => Self::Inverse,
_ => Self::UnknownValue(metric_trend_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for MetricTrendType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"METRIC_TREND_TYPE_UNSPECIFIED" => Self::Unspecified,
"METRIC_TREND_TYPE_REGULAR" => Self::Regular,
"METRIC_TREND_TYPE_INVERSE" => Self::Inverse,
_ => Self::UnknownValue(metric_trend_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for MetricTrendType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Regular => serializer.serialize_i32(1),
Self::Inverse => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for MetricTrendType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricTrendType>::new(
".google.cloud.chronicle.v1.MetricTrendType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum VisualMapType {
Unspecified,
Continuous,
Piecewise,
UnknownValue(visual_map_type::UnknownValue),
}
#[doc(hidden)]
pub mod visual_map_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl VisualMapType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Continuous => std::option::Option::Some(1),
Self::Piecewise => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("VISUAL_MAP_TYPE_UNSPECIFIED"),
Self::Continuous => std::option::Option::Some("CONTINUOUS"),
Self::Piecewise => std::option::Option::Some("PIECEWISE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for VisualMapType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for VisualMapType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for VisualMapType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Continuous,
2 => Self::Piecewise,
_ => Self::UnknownValue(visual_map_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for VisualMapType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"VISUAL_MAP_TYPE_UNSPECIFIED" => Self::Unspecified,
"CONTINUOUS" => Self::Continuous,
"PIECEWISE" => Self::Piecewise,
_ => Self::UnknownValue(visual_map_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for VisualMapType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Continuous => serializer.serialize_i32(1),
Self::Piecewise => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for VisualMapType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<VisualMapType>::new(
".google.cloud.chronicle.v1.VisualMapType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LanguageFeature {
Unspecified,
Joins,
Stages,
DataTables,
UnknownValue(language_feature::UnknownValue),
}
#[doc(hidden)]
pub mod language_feature {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LanguageFeature {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Joins => std::option::Option::Some(1),
Self::Stages => std::option::Option::Some(2),
Self::DataTables => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("LANGUAGE_FEATURE_UNSPECIFIED"),
Self::Joins => std::option::Option::Some("JOINS"),
Self::Stages => std::option::Option::Some("STAGES"),
Self::DataTables => std::option::Option::Some("DATA_TABLES"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LanguageFeature {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LanguageFeature {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LanguageFeature {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Joins,
2 => Self::Stages,
3 => Self::DataTables,
_ => Self::UnknownValue(language_feature::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LanguageFeature {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LANGUAGE_FEATURE_UNSPECIFIED" => Self::Unspecified,
"JOINS" => Self::Joins,
"STAGES" => Self::Stages,
"DATA_TABLES" => Self::DataTables,
_ => Self::UnknownValue(language_feature::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LanguageFeature {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Joins => serializer.serialize_i32(1),
Self::Stages => serializer.serialize_i32(2),
Self::DataTables => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LanguageFeature {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LanguageFeature>::new(
".google.cloud.chronicle.v1.LanguageFeature",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum FilterOperator {
Unspecified,
#[allow(missing_docs)]
Equal,
#[allow(missing_docs)]
NotEqual,
#[allow(missing_docs)]
In,
#[allow(missing_docs)]
GreaterThan,
#[allow(missing_docs)]
GreaterThanOrEqualTo,
#[allow(missing_docs)]
LessThan,
#[allow(missing_docs)]
LessThanOrEqualTo,
#[allow(missing_docs)]
Between,
#[allow(missing_docs)]
Past,
#[allow(missing_docs)]
IsNull,
#[allow(missing_docs)]
IsNotNull,
#[allow(missing_docs)]
StartsWith,
#[allow(missing_docs)]
EndsWith,
#[allow(missing_docs)]
DoesNotStartsWith,
#[allow(missing_docs)]
DoesNotEndsWith,
#[allow(missing_docs)]
NotIn,
Contains,
DoesNotContain,
UnknownValue(filter_operator::UnknownValue),
}
#[doc(hidden)]
pub mod filter_operator {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl FilterOperator {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Equal => std::option::Option::Some(1),
Self::NotEqual => std::option::Option::Some(2),
Self::In => std::option::Option::Some(3),
Self::GreaterThan => std::option::Option::Some(4),
Self::GreaterThanOrEqualTo => std::option::Option::Some(5),
Self::LessThan => std::option::Option::Some(6),
Self::LessThanOrEqualTo => std::option::Option::Some(7),
Self::Between => std::option::Option::Some(8),
Self::Past => std::option::Option::Some(9),
Self::IsNull => std::option::Option::Some(10),
Self::IsNotNull => std::option::Option::Some(11),
Self::StartsWith => std::option::Option::Some(12),
Self::EndsWith => std::option::Option::Some(13),
Self::DoesNotStartsWith => std::option::Option::Some(14),
Self::DoesNotEndsWith => std::option::Option::Some(15),
Self::NotIn => std::option::Option::Some(16),
Self::Contains => std::option::Option::Some(17),
Self::DoesNotContain => std::option::Option::Some(18),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("FILTER_OPERATOR_UNSPECIFIED"),
Self::Equal => std::option::Option::Some("EQUAL"),
Self::NotEqual => std::option::Option::Some("NOT_EQUAL"),
Self::In => std::option::Option::Some("IN"),
Self::GreaterThan => std::option::Option::Some("GREATER_THAN"),
Self::GreaterThanOrEqualTo => std::option::Option::Some("GREATER_THAN_OR_EQUAL_TO"),
Self::LessThan => std::option::Option::Some("LESS_THAN"),
Self::LessThanOrEqualTo => std::option::Option::Some("LESS_THAN_OR_EQUAL_TO"),
Self::Between => std::option::Option::Some("BETWEEN"),
Self::Past => std::option::Option::Some("PAST"),
Self::IsNull => std::option::Option::Some("IS_NULL"),
Self::IsNotNull => std::option::Option::Some("IS_NOT_NULL"),
Self::StartsWith => std::option::Option::Some("STARTS_WITH"),
Self::EndsWith => std::option::Option::Some("ENDS_WITH"),
Self::DoesNotStartsWith => std::option::Option::Some("DOES_NOT_STARTS_WITH"),
Self::DoesNotEndsWith => std::option::Option::Some("DOES_NOT_ENDS_WITH"),
Self::NotIn => std::option::Option::Some("NOT_IN"),
Self::Contains => std::option::Option::Some("CONTAINS"),
Self::DoesNotContain => std::option::Option::Some("DOES_NOT_CONTAIN"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for FilterOperator {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for FilterOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for FilterOperator {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Equal,
2 => Self::NotEqual,
3 => Self::In,
4 => Self::GreaterThan,
5 => Self::GreaterThanOrEqualTo,
6 => Self::LessThan,
7 => Self::LessThanOrEqualTo,
8 => Self::Between,
9 => Self::Past,
10 => Self::IsNull,
11 => Self::IsNotNull,
12 => Self::StartsWith,
13 => Self::EndsWith,
14 => Self::DoesNotStartsWith,
15 => Self::DoesNotEndsWith,
16 => Self::NotIn,
17 => Self::Contains,
18 => Self::DoesNotContain,
_ => Self::UnknownValue(filter_operator::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for FilterOperator {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"FILTER_OPERATOR_UNSPECIFIED" => Self::Unspecified,
"EQUAL" => Self::Equal,
"NOT_EQUAL" => Self::NotEqual,
"IN" => Self::In,
"GREATER_THAN" => Self::GreaterThan,
"GREATER_THAN_OR_EQUAL_TO" => Self::GreaterThanOrEqualTo,
"LESS_THAN" => Self::LessThan,
"LESS_THAN_OR_EQUAL_TO" => Self::LessThanOrEqualTo,
"BETWEEN" => Self::Between,
"PAST" => Self::Past,
"IS_NULL" => Self::IsNull,
"IS_NOT_NULL" => Self::IsNotNull,
"STARTS_WITH" => Self::StartsWith,
"ENDS_WITH" => Self::EndsWith,
"DOES_NOT_STARTS_WITH" => Self::DoesNotStartsWith,
"DOES_NOT_ENDS_WITH" => Self::DoesNotEndsWith,
"NOT_IN" => Self::NotIn,
"CONTAINS" => Self::Contains,
"DOES_NOT_CONTAIN" => Self::DoesNotContain,
_ => Self::UnknownValue(filter_operator::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for FilterOperator {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Equal => serializer.serialize_i32(1),
Self::NotEqual => serializer.serialize_i32(2),
Self::In => serializer.serialize_i32(3),
Self::GreaterThan => serializer.serialize_i32(4),
Self::GreaterThanOrEqualTo => serializer.serialize_i32(5),
Self::LessThan => serializer.serialize_i32(6),
Self::LessThanOrEqualTo => serializer.serialize_i32(7),
Self::Between => serializer.serialize_i32(8),
Self::Past => serializer.serialize_i32(9),
Self::IsNull => serializer.serialize_i32(10),
Self::IsNotNull => serializer.serialize_i32(11),
Self::StartsWith => serializer.serialize_i32(12),
Self::EndsWith => serializer.serialize_i32(13),
Self::DoesNotStartsWith => serializer.serialize_i32(14),
Self::DoesNotEndsWith => serializer.serialize_i32(15),
Self::NotIn => serializer.serialize_i32(16),
Self::Contains => serializer.serialize_i32(17),
Self::DoesNotContain => serializer.serialize_i32(18),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for FilterOperator {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<FilterOperator>::new(
".google.cloud.chronicle.v1.FilterOperator",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DataSource {
#[allow(missing_docs)]
Unspecified,
#[allow(missing_docs)]
Udm,
#[allow(missing_docs)]
Entity,
#[allow(missing_docs)]
IngestionMetrics,
RuleDetections,
Rulesets,
Global,
IocMatches,
Rules,
SoarCases,
SoarPlaybooks,
SoarCaseHistory,
DataTable,
Investigation,
InvestigationFeedback,
UnknownValue(data_source::UnknownValue),
}
#[doc(hidden)]
pub mod data_source {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DataSource {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Udm => std::option::Option::Some(1),
Self::Entity => std::option::Option::Some(2),
Self::IngestionMetrics => std::option::Option::Some(3),
Self::RuleDetections => std::option::Option::Some(4),
Self::Rulesets => std::option::Option::Some(5),
Self::Global => std::option::Option::Some(6),
Self::IocMatches => std::option::Option::Some(7),
Self::Rules => std::option::Option::Some(8),
Self::SoarCases => std::option::Option::Some(9),
Self::SoarPlaybooks => std::option::Option::Some(10),
Self::SoarCaseHistory => std::option::Option::Some(11),
Self::DataTable => std::option::Option::Some(12),
Self::Investigation => std::option::Option::Some(13),
Self::InvestigationFeedback => std::option::Option::Some(14),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DATA_SOURCE_UNSPECIFIED"),
Self::Udm => std::option::Option::Some("UDM"),
Self::Entity => std::option::Option::Some("ENTITY"),
Self::IngestionMetrics => std::option::Option::Some("INGESTION_METRICS"),
Self::RuleDetections => std::option::Option::Some("RULE_DETECTIONS"),
Self::Rulesets => std::option::Option::Some("RULESETS"),
Self::Global => std::option::Option::Some("GLOBAL"),
Self::IocMatches => std::option::Option::Some("IOC_MATCHES"),
Self::Rules => std::option::Option::Some("RULES"),
Self::SoarCases => std::option::Option::Some("SOAR_CASES"),
Self::SoarPlaybooks => std::option::Option::Some("SOAR_PLAYBOOKS"),
Self::SoarCaseHistory => std::option::Option::Some("SOAR_CASE_HISTORY"),
Self::DataTable => std::option::Option::Some("DATA_TABLE"),
Self::Investigation => std::option::Option::Some("INVESTIGATION"),
Self::InvestigationFeedback => std::option::Option::Some("INVESTIGATION_FEEDBACK"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DataSource {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DataSource {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DataSource {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Udm,
2 => Self::Entity,
3 => Self::IngestionMetrics,
4 => Self::RuleDetections,
5 => Self::Rulesets,
6 => Self::Global,
7 => Self::IocMatches,
8 => Self::Rules,
9 => Self::SoarCases,
10 => Self::SoarPlaybooks,
11 => Self::SoarCaseHistory,
12 => Self::DataTable,
13 => Self::Investigation,
14 => Self::InvestigationFeedback,
_ => Self::UnknownValue(data_source::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DataSource {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATA_SOURCE_UNSPECIFIED" => Self::Unspecified,
"UDM" => Self::Udm,
"ENTITY" => Self::Entity,
"INGESTION_METRICS" => Self::IngestionMetrics,
"RULE_DETECTIONS" => Self::RuleDetections,
"RULESETS" => Self::Rulesets,
"GLOBAL" => Self::Global,
"IOC_MATCHES" => Self::IocMatches,
"RULES" => Self::Rules,
"SOAR_CASES" => Self::SoarCases,
"SOAR_PLAYBOOKS" => Self::SoarPlaybooks,
"SOAR_CASE_HISTORY" => Self::SoarCaseHistory,
"DATA_TABLE" => Self::DataTable,
"INVESTIGATION" => Self::Investigation,
"INVESTIGATION_FEEDBACK" => Self::InvestigationFeedback,
_ => Self::UnknownValue(data_source::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DataSource {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Udm => serializer.serialize_i32(1),
Self::Entity => serializer.serialize_i32(2),
Self::IngestionMetrics => serializer.serialize_i32(3),
Self::RuleDetections => serializer.serialize_i32(4),
Self::Rulesets => serializer.serialize_i32(5),
Self::Global => serializer.serialize_i32(6),
Self::IocMatches => serializer.serialize_i32(7),
Self::Rules => serializer.serialize_i32(8),
Self::SoarCases => serializer.serialize_i32(9),
Self::SoarPlaybooks => serializer.serialize_i32(10),
Self::SoarCaseHistory => serializer.serialize_i32(11),
Self::DataTable => serializer.serialize_i32(12),
Self::Investigation => serializer.serialize_i32(13),
Self::InvestigationFeedback => serializer.serialize_i32(14),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DataSource {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataSource>::new(
".google.cloud.chronicle.v1.DataSource",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum TimeUnit {
Unspecified,
#[allow(missing_docs)]
Second,
#[allow(missing_docs)]
Minute,
#[allow(missing_docs)]
Hour,
#[allow(missing_docs)]
Day,
#[allow(missing_docs)]
Week,
#[allow(missing_docs)]
Month,
#[allow(missing_docs)]
Year,
UnknownValue(time_unit::UnknownValue),
}
#[doc(hidden)]
pub mod time_unit {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl TimeUnit {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Second => std::option::Option::Some(1),
Self::Minute => std::option::Option::Some(2),
Self::Hour => std::option::Option::Some(3),
Self::Day => std::option::Option::Some(4),
Self::Week => std::option::Option::Some(5),
Self::Month => std::option::Option::Some(6),
Self::Year => std::option::Option::Some(7),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("TIME_UNIT_UNSPECIFIED"),
Self::Second => std::option::Option::Some("SECOND"),
Self::Minute => std::option::Option::Some("MINUTE"),
Self::Hour => std::option::Option::Some("HOUR"),
Self::Day => std::option::Option::Some("DAY"),
Self::Week => std::option::Option::Some("WEEK"),
Self::Month => std::option::Option::Some("MONTH"),
Self::Year => std::option::Option::Some("YEAR"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for TimeUnit {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for TimeUnit {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for TimeUnit {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Second,
2 => Self::Minute,
3 => Self::Hour,
4 => Self::Day,
5 => Self::Week,
6 => Self::Month,
7 => Self::Year,
_ => Self::UnknownValue(time_unit::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for TimeUnit {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"TIME_UNIT_UNSPECIFIED" => Self::Unspecified,
"SECOND" => Self::Second,
"MINUTE" => Self::Minute,
"HOUR" => Self::Hour,
"DAY" => Self::Day,
"WEEK" => Self::Week,
"MONTH" => Self::Month,
"YEAR" => Self::Year,
_ => Self::UnknownValue(time_unit::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for TimeUnit {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Second => serializer.serialize_i32(1),
Self::Minute => serializer.serialize_i32(2),
Self::Hour => serializer.serialize_i32(3),
Self::Day => serializer.serialize_i32(4),
Self::Week => serializer.serialize_i32(5),
Self::Month => serializer.serialize_i32(6),
Self::Year => serializer.serialize_i32(7),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for TimeUnit {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimeUnit>::new(
".google.cloud.chronicle.v1.TimeUnit",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DataTableUpdateSource {
Unspecified,
User,
Rule,
Search,
UnknownValue(data_table_update_source::UnknownValue),
}
#[doc(hidden)]
pub mod data_table_update_source {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DataTableUpdateSource {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::User => std::option::Option::Some(1),
Self::Rule => std::option::Option::Some(2),
Self::Search => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED"),
Self::User => std::option::Option::Some("USER"),
Self::Rule => std::option::Option::Some("RULE"),
Self::Search => std::option::Option::Some("SEARCH"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DataTableUpdateSource {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DataTableUpdateSource {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DataTableUpdateSource {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::User,
2 => Self::Rule,
3 => Self::Search,
_ => Self::UnknownValue(data_table_update_source::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DataTableUpdateSource {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED" => Self::Unspecified,
"USER" => Self::User,
"RULE" => Self::Rule,
"SEARCH" => Self::Search,
_ => Self::UnknownValue(data_table_update_source::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DataTableUpdateSource {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::User => serializer.serialize_i32(1),
Self::Rule => serializer.serialize_i32(2),
Self::Search => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DataTableUpdateSource {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataTableUpdateSource>::new(
".google.cloud.chronicle.v1.DataTableUpdateSource",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DashboardType {
Unspecified,
Curated,
Private,
Public,
Custom,
Marketplace,
UnknownValue(dashboard_type::UnknownValue),
}
#[doc(hidden)]
pub mod dashboard_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DashboardType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Curated => std::option::Option::Some(1),
Self::Private => std::option::Option::Some(2),
Self::Public => std::option::Option::Some(3),
Self::Custom => std::option::Option::Some(4),
Self::Marketplace => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DASHBOARD_TYPE_UNSPECIFIED"),
Self::Curated => std::option::Option::Some("CURATED"),
Self::Private => std::option::Option::Some("PRIVATE"),
Self::Public => std::option::Option::Some("PUBLIC"),
Self::Custom => std::option::Option::Some("CUSTOM"),
Self::Marketplace => std::option::Option::Some("MARKETPLACE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DashboardType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DashboardType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DashboardType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Curated,
2 => Self::Private,
3 => Self::Public,
4 => Self::Custom,
5 => Self::Marketplace,
_ => Self::UnknownValue(dashboard_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DashboardType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DASHBOARD_TYPE_UNSPECIFIED" => Self::Unspecified,
"CURATED" => Self::Curated,
"PRIVATE" => Self::Private,
"PUBLIC" => Self::Public,
"CUSTOM" => Self::Custom,
"MARKETPLACE" => Self::Marketplace,
_ => Self::UnknownValue(dashboard_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DashboardType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Curated => serializer.serialize_i32(1),
Self::Private => serializer.serialize_i32(2),
Self::Public => serializer.serialize_i32(3),
Self::Custom => serializer.serialize_i32(4),
Self::Marketplace => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DashboardType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DashboardType>::new(
".google.cloud.chronicle.v1.DashboardType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DashboardAccess {
Unspecified,
DashboardPrivate,
DashboardPublic,
UnknownValue(dashboard_access::UnknownValue),
}
#[doc(hidden)]
pub mod dashboard_access {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DashboardAccess {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::DashboardPrivate => std::option::Option::Some(1),
Self::DashboardPublic => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DASHBOARD_ACCESS_UNSPECIFIED"),
Self::DashboardPrivate => std::option::Option::Some("DASHBOARD_PRIVATE"),
Self::DashboardPublic => std::option::Option::Some("DASHBOARD_PUBLIC"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DashboardAccess {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DashboardAccess {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DashboardAccess {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::DashboardPrivate,
2 => Self::DashboardPublic,
_ => Self::UnknownValue(dashboard_access::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DashboardAccess {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DASHBOARD_ACCESS_UNSPECIFIED" => Self::Unspecified,
"DASHBOARD_PRIVATE" => Self::DashboardPrivate,
"DASHBOARD_PUBLIC" => Self::DashboardPublic,
_ => Self::UnknownValue(dashboard_access::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DashboardAccess {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::DashboardPrivate => serializer.serialize_i32(1),
Self::DashboardPublic => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DashboardAccess {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DashboardAccess>::new(
".google.cloud.chronicle.v1.DashboardAccess",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum NativeDashboardView {
Unspecified,
Basic,
Full,
UnknownValue(native_dashboard_view::UnknownValue),
}
#[doc(hidden)]
pub mod native_dashboard_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl NativeDashboardView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Basic => std::option::Option::Some(1),
Self::Full => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_UNSPECIFIED"),
Self::Basic => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_BASIC"),
Self::Full => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_FULL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for NativeDashboardView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for NativeDashboardView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for NativeDashboardView {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Basic,
2 => Self::Full,
_ => Self::UnknownValue(native_dashboard_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for NativeDashboardView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"NATIVE_DASHBOARD_VIEW_UNSPECIFIED" => Self::Unspecified,
"NATIVE_DASHBOARD_VIEW_BASIC" => Self::Basic,
"NATIVE_DASHBOARD_VIEW_FULL" => Self::Full,
_ => Self::UnknownValue(native_dashboard_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for NativeDashboardView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Basic => serializer.serialize_i32(1),
Self::Full => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for NativeDashboardView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<NativeDashboardView>::new(
".google.cloud.chronicle.v1.NativeDashboardView",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ReferenceListSyntaxType {
Unspecified,
PlainTextString,
Regex,
Cidr,
UnknownValue(reference_list_syntax_type::UnknownValue),
}
#[doc(hidden)]
pub mod reference_list_syntax_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ReferenceListSyntaxType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::PlainTextString => std::option::Option::Some(1),
Self::Regex => std::option::Option::Some(2),
Self::Cidr => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => {
std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED")
}
Self::PlainTextString => {
std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING")
}
Self::Regex => std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_REGEX"),
Self::Cidr => std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_CIDR"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ReferenceListSyntaxType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ReferenceListSyntaxType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ReferenceListSyntaxType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::PlainTextString,
2 => Self::Regex,
3 => Self::Cidr,
_ => Self::UnknownValue(reference_list_syntax_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ReferenceListSyntaxType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED" => Self::Unspecified,
"REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING" => Self::PlainTextString,
"REFERENCE_LIST_SYNTAX_TYPE_REGEX" => Self::Regex,
"REFERENCE_LIST_SYNTAX_TYPE_CIDR" => Self::Cidr,
_ => Self::UnknownValue(reference_list_syntax_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ReferenceListSyntaxType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::PlainTextString => serializer.serialize_i32(1),
Self::Regex => serializer.serialize_i32(2),
Self::Cidr => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ReferenceListSyntaxType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReferenceListSyntaxType>::new(
".google.cloud.chronicle.v1.ReferenceListSyntaxType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ReferenceListView {
Unspecified,
Basic,
Full,
UnknownValue(reference_list_view::UnknownValue),
}
#[doc(hidden)]
pub mod reference_list_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ReferenceListView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Basic => std::option::Option::Some(1),
Self::Full => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("REFERENCE_LIST_VIEW_UNSPECIFIED"),
Self::Basic => std::option::Option::Some("REFERENCE_LIST_VIEW_BASIC"),
Self::Full => std::option::Option::Some("REFERENCE_LIST_VIEW_FULL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ReferenceListView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ReferenceListView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ReferenceListView {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Basic,
2 => Self::Full,
_ => Self::UnknownValue(reference_list_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ReferenceListView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"REFERENCE_LIST_VIEW_UNSPECIFIED" => Self::Unspecified,
"REFERENCE_LIST_VIEW_BASIC" => Self::Basic,
"REFERENCE_LIST_VIEW_FULL" => Self::Full,
_ => Self::UnknownValue(reference_list_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ReferenceListView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Basic => serializer.serialize_i32(1),
Self::Full => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ReferenceListView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReferenceListView>::new(
".google.cloud.chronicle.v1.ReferenceListView",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RunFrequency {
Unspecified,
Live,
Hourly,
Daily,
UnknownValue(run_frequency::UnknownValue),
}
#[doc(hidden)]
pub mod run_frequency {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RunFrequency {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Live => std::option::Option::Some(1),
Self::Hourly => std::option::Option::Some(2),
Self::Daily => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("RUN_FREQUENCY_UNSPECIFIED"),
Self::Live => std::option::Option::Some("LIVE"),
Self::Hourly => std::option::Option::Some("HOURLY"),
Self::Daily => std::option::Option::Some("DAILY"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RunFrequency {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RunFrequency {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RunFrequency {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Live,
2 => Self::Hourly,
3 => Self::Daily,
_ => Self::UnknownValue(run_frequency::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RunFrequency {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"RUN_FREQUENCY_UNSPECIFIED" => Self::Unspecified,
"LIVE" => Self::Live,
"HOURLY" => Self::Hourly,
"DAILY" => Self::Daily,
_ => Self::UnknownValue(run_frequency::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RunFrequency {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Live => serializer.serialize_i32(1),
Self::Hourly => serializer.serialize_i32(2),
Self::Daily => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RunFrequency {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RunFrequency>::new(
".google.cloud.chronicle.v1.RunFrequency",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RuleType {
Unspecified,
SingleEvent,
MultiEvent,
UnknownValue(rule_type::UnknownValue),
}
#[doc(hidden)]
pub mod rule_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RuleType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::SingleEvent => std::option::Option::Some(1),
Self::MultiEvent => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
Self::SingleEvent => std::option::Option::Some("SINGLE_EVENT"),
Self::MultiEvent => std::option::Option::Some("MULTI_EVENT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RuleType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RuleType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RuleType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::SingleEvent,
2 => Self::MultiEvent,
_ => Self::UnknownValue(rule_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RuleType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
"SINGLE_EVENT" => Self::SingleEvent,
"MULTI_EVENT" => Self::MultiEvent,
_ => Self::UnknownValue(rule_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RuleType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::SingleEvent => serializer.serialize_i32(1),
Self::MultiEvent => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RuleType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
".google.cloud.chronicle.v1.RuleType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RuleView {
Unspecified,
Basic,
Full,
RevisionMetadataOnly,
UnknownValue(rule_view::UnknownValue),
}
#[doc(hidden)]
pub mod rule_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RuleView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Basic => std::option::Option::Some(1),
Self::Full => std::option::Option::Some(2),
Self::RevisionMetadataOnly => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("RULE_VIEW_UNSPECIFIED"),
Self::Basic => std::option::Option::Some("BASIC"),
Self::Full => std::option::Option::Some("FULL"),
Self::RevisionMetadataOnly => std::option::Option::Some("REVISION_METADATA_ONLY"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RuleView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RuleView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RuleView {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Basic,
2 => Self::Full,
3 => Self::RevisionMetadataOnly,
_ => Self::UnknownValue(rule_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RuleView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"RULE_VIEW_UNSPECIFIED" => Self::Unspecified,
"BASIC" => Self::Basic,
"FULL" => Self::Full,
"REVISION_METADATA_ONLY" => Self::RevisionMetadataOnly,
_ => Self::UnknownValue(rule_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RuleView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Basic => serializer.serialize_i32(1),
Self::Full => serializer.serialize_i32(2),
Self::RevisionMetadataOnly => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RuleView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleView>::new(
".google.cloud.chronicle.v1.RuleView",
))
}
}