Skip to main content

google_cloud_chronicle_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_longrunning;
25extern crate google_cloud_lro;
26extern crate google_cloud_rpc;
27extern crate google_cloud_type;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// This resource represents the BigQuery export configuration for a Chronicle
40/// instance which includes Google Cloud Platform resources like Cloud Storage
41/// buckets, BigQuery datasets etc and the export settings for each data source.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct BigQueryExport {
45    /// Identifier. The resource name of the BigQueryExport.
46    /// Format:
47    /// projects/{project}/locations/{location}/instances/{instance}/bigQueryExport
48    pub name: std::string::String,
49
50    /// Output only. Whether the BigQueryExport has been provisioned for the
51    /// Chronicle instance.
52    pub provisioned: bool,
53
54    /// Output only. The BigQueryExportPackage entitled for the Chronicle instance.
55    pub big_query_export_package: crate::model::BigQueryExportPackage,
56
57    /// Optional. The export settings for the Entity Graph data source.
58    pub entity_graph_settings: std::option::Option<crate::model::DataSourceExportSettings>,
59
60    /// Optional. The export settings for the IOC Matches data source.
61    pub ioc_matches_settings: std::option::Option<crate::model::DataSourceExportSettings>,
62
63    /// Optional. The export settings for the Rule Detections data source.
64    pub rule_detections_settings: std::option::Option<crate::model::DataSourceExportSettings>,
65
66    /// Optional. The export settings for the UDM Events Aggregates data source.
67    pub udm_events_aggregates_settings: std::option::Option<crate::model::DataSourceExportSettings>,
68
69    /// Optional. The export settings for the UDM Events data source.
70    pub udm_events_settings: std::option::Option<crate::model::DataSourceExportSettings>,
71
72    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73}
74
75impl BigQueryExport {
76    /// Creates a new default instance.
77    pub fn new() -> Self {
78        std::default::Default::default()
79    }
80
81    /// Sets the value of [name][crate::model::BigQueryExport::name].
82    ///
83    /// # Example
84    /// ```ignore,no_run
85    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
86    /// # let project_id = "project_id";
87    /// # let location_id = "location_id";
88    /// # let instance_id = "instance_id";
89    /// let x = BigQueryExport::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/bigQueryExport"));
90    /// ```
91    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92        self.name = v.into();
93        self
94    }
95
96    /// Sets the value of [provisioned][crate::model::BigQueryExport::provisioned].
97    ///
98    /// # Example
99    /// ```ignore,no_run
100    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
101    /// let x = BigQueryExport::new().set_provisioned(true);
102    /// ```
103    pub fn set_provisioned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
104        self.provisioned = v.into();
105        self
106    }
107
108    /// Sets the value of [big_query_export_package][crate::model::BigQueryExport::big_query_export_package].
109    ///
110    /// # Example
111    /// ```ignore,no_run
112    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
113    /// use google_cloud_chronicle_v1::model::BigQueryExportPackage;
114    /// let x0 = BigQueryExport::new().set_big_query_export_package(BigQueryExportPackage::Byobq);
115    /// let x1 = BigQueryExport::new().set_big_query_export_package(BigQueryExportPackage::Advanced);
116    /// ```
117    pub fn set_big_query_export_package<
118        T: std::convert::Into<crate::model::BigQueryExportPackage>,
119    >(
120        mut self,
121        v: T,
122    ) -> Self {
123        self.big_query_export_package = v.into();
124        self
125    }
126
127    /// Sets the value of [entity_graph_settings][crate::model::BigQueryExport::entity_graph_settings].
128    ///
129    /// # Example
130    /// ```ignore,no_run
131    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
132    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
133    /// let x = BigQueryExport::new().set_entity_graph_settings(DataSourceExportSettings::default()/* use setters */);
134    /// ```
135    pub fn set_entity_graph_settings<T>(mut self, v: T) -> Self
136    where
137        T: std::convert::Into<crate::model::DataSourceExportSettings>,
138    {
139        self.entity_graph_settings = std::option::Option::Some(v.into());
140        self
141    }
142
143    /// Sets or clears the value of [entity_graph_settings][crate::model::BigQueryExport::entity_graph_settings].
144    ///
145    /// # Example
146    /// ```ignore,no_run
147    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
148    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
149    /// let x = BigQueryExport::new().set_or_clear_entity_graph_settings(Some(DataSourceExportSettings::default()/* use setters */));
150    /// let x = BigQueryExport::new().set_or_clear_entity_graph_settings(None::<DataSourceExportSettings>);
151    /// ```
152    pub fn set_or_clear_entity_graph_settings<T>(mut self, v: std::option::Option<T>) -> Self
153    where
154        T: std::convert::Into<crate::model::DataSourceExportSettings>,
155    {
156        self.entity_graph_settings = v.map(|x| x.into());
157        self
158    }
159
160    /// Sets the value of [ioc_matches_settings][crate::model::BigQueryExport::ioc_matches_settings].
161    ///
162    /// # Example
163    /// ```ignore,no_run
164    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
165    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
166    /// let x = BigQueryExport::new().set_ioc_matches_settings(DataSourceExportSettings::default()/* use setters */);
167    /// ```
168    pub fn set_ioc_matches_settings<T>(mut self, v: T) -> Self
169    where
170        T: std::convert::Into<crate::model::DataSourceExportSettings>,
171    {
172        self.ioc_matches_settings = std::option::Option::Some(v.into());
173        self
174    }
175
176    /// Sets or clears the value of [ioc_matches_settings][crate::model::BigQueryExport::ioc_matches_settings].
177    ///
178    /// # Example
179    /// ```ignore,no_run
180    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
181    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
182    /// let x = BigQueryExport::new().set_or_clear_ioc_matches_settings(Some(DataSourceExportSettings::default()/* use setters */));
183    /// let x = BigQueryExport::new().set_or_clear_ioc_matches_settings(None::<DataSourceExportSettings>);
184    /// ```
185    pub fn set_or_clear_ioc_matches_settings<T>(mut self, v: std::option::Option<T>) -> Self
186    where
187        T: std::convert::Into<crate::model::DataSourceExportSettings>,
188    {
189        self.ioc_matches_settings = v.map(|x| x.into());
190        self
191    }
192
193    /// Sets the value of [rule_detections_settings][crate::model::BigQueryExport::rule_detections_settings].
194    ///
195    /// # Example
196    /// ```ignore,no_run
197    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
198    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
199    /// let x = BigQueryExport::new().set_rule_detections_settings(DataSourceExportSettings::default()/* use setters */);
200    /// ```
201    pub fn set_rule_detections_settings<T>(mut self, v: T) -> Self
202    where
203        T: std::convert::Into<crate::model::DataSourceExportSettings>,
204    {
205        self.rule_detections_settings = std::option::Option::Some(v.into());
206        self
207    }
208
209    /// Sets or clears the value of [rule_detections_settings][crate::model::BigQueryExport::rule_detections_settings].
210    ///
211    /// # Example
212    /// ```ignore,no_run
213    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
214    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
215    /// let x = BigQueryExport::new().set_or_clear_rule_detections_settings(Some(DataSourceExportSettings::default()/* use setters */));
216    /// let x = BigQueryExport::new().set_or_clear_rule_detections_settings(None::<DataSourceExportSettings>);
217    /// ```
218    pub fn set_or_clear_rule_detections_settings<T>(mut self, v: std::option::Option<T>) -> Self
219    where
220        T: std::convert::Into<crate::model::DataSourceExportSettings>,
221    {
222        self.rule_detections_settings = v.map(|x| x.into());
223        self
224    }
225
226    /// Sets the value of [udm_events_aggregates_settings][crate::model::BigQueryExport::udm_events_aggregates_settings].
227    ///
228    /// # Example
229    /// ```ignore,no_run
230    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
231    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
232    /// let x = BigQueryExport::new().set_udm_events_aggregates_settings(DataSourceExportSettings::default()/* use setters */);
233    /// ```
234    pub fn set_udm_events_aggregates_settings<T>(mut self, v: T) -> Self
235    where
236        T: std::convert::Into<crate::model::DataSourceExportSettings>,
237    {
238        self.udm_events_aggregates_settings = std::option::Option::Some(v.into());
239        self
240    }
241
242    /// Sets or clears the value of [udm_events_aggregates_settings][crate::model::BigQueryExport::udm_events_aggregates_settings].
243    ///
244    /// # Example
245    /// ```ignore,no_run
246    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
247    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
248    /// let x = BigQueryExport::new().set_or_clear_udm_events_aggregates_settings(Some(DataSourceExportSettings::default()/* use setters */));
249    /// let x = BigQueryExport::new().set_or_clear_udm_events_aggregates_settings(None::<DataSourceExportSettings>);
250    /// ```
251    pub fn set_or_clear_udm_events_aggregates_settings<T>(
252        mut self,
253        v: std::option::Option<T>,
254    ) -> Self
255    where
256        T: std::convert::Into<crate::model::DataSourceExportSettings>,
257    {
258        self.udm_events_aggregates_settings = v.map(|x| x.into());
259        self
260    }
261
262    /// Sets the value of [udm_events_settings][crate::model::BigQueryExport::udm_events_settings].
263    ///
264    /// # Example
265    /// ```ignore,no_run
266    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
267    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
268    /// let x = BigQueryExport::new().set_udm_events_settings(DataSourceExportSettings::default()/* use setters */);
269    /// ```
270    pub fn set_udm_events_settings<T>(mut self, v: T) -> Self
271    where
272        T: std::convert::Into<crate::model::DataSourceExportSettings>,
273    {
274        self.udm_events_settings = std::option::Option::Some(v.into());
275        self
276    }
277
278    /// Sets or clears the value of [udm_events_settings][crate::model::BigQueryExport::udm_events_settings].
279    ///
280    /// # Example
281    /// ```ignore,no_run
282    /// # use google_cloud_chronicle_v1::model::BigQueryExport;
283    /// use google_cloud_chronicle_v1::model::DataSourceExportSettings;
284    /// let x = BigQueryExport::new().set_or_clear_udm_events_settings(Some(DataSourceExportSettings::default()/* use setters */));
285    /// let x = BigQueryExport::new().set_or_clear_udm_events_settings(None::<DataSourceExportSettings>);
286    /// ```
287    pub fn set_or_clear_udm_events_settings<T>(mut self, v: std::option::Option<T>) -> Self
288    where
289        T: std::convert::Into<crate::model::DataSourceExportSettings>,
290    {
291        self.udm_events_settings = v.map(|x| x.into());
292        self
293    }
294}
295
296impl wkt::message::Message for BigQueryExport {
297    fn typename() -> &'static str {
298        "type.googleapis.com/google.cloud.chronicle.v1.BigQueryExport"
299    }
300}
301
302/// The export settings for a data source.
303#[derive(Clone, Default, PartialEq)]
304#[non_exhaustive]
305pub struct DataSourceExportSettings {
306    /// Required. Whether the data source is enabled for export.
307    pub enabled: bool,
308
309    /// Required. The retention period for the data source in days.
310    pub retention_days: i32,
311
312    /// Output only. The state of the latest data source export job.
313    pub latest_export_job_state: crate::model::LatestExportJobState,
314
315    /// Output only. The data freshness of the given export which represents the
316    /// time bucket at which the latest event was exported.
317    pub data_freshness_time: std::option::Option<wkt::Timestamp>,
318
319    /// Output only. The stored data volume of all the exports.
320    pub data_volume: i64,
321
322    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
323}
324
325impl DataSourceExportSettings {
326    /// Creates a new default instance.
327    pub fn new() -> Self {
328        std::default::Default::default()
329    }
330
331    /// Sets the value of [enabled][crate::model::DataSourceExportSettings::enabled].
332    ///
333    /// # Example
334    /// ```ignore,no_run
335    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
336    /// let x = DataSourceExportSettings::new().set_enabled(true);
337    /// ```
338    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
339        self.enabled = v.into();
340        self
341    }
342
343    /// Sets the value of [retention_days][crate::model::DataSourceExportSettings::retention_days].
344    ///
345    /// # Example
346    /// ```ignore,no_run
347    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
348    /// let x = DataSourceExportSettings::new().set_retention_days(42);
349    /// ```
350    pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
351        self.retention_days = v.into();
352        self
353    }
354
355    /// Sets the value of [latest_export_job_state][crate::model::DataSourceExportSettings::latest_export_job_state].
356    ///
357    /// # Example
358    /// ```ignore,no_run
359    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
360    /// use google_cloud_chronicle_v1::model::LatestExportJobState;
361    /// let x0 = DataSourceExportSettings::new().set_latest_export_job_state(LatestExportJobState::Success);
362    /// let x1 = DataSourceExportSettings::new().set_latest_export_job_state(LatestExportJobState::Failed);
363    /// ```
364    pub fn set_latest_export_job_state<
365        T: std::convert::Into<crate::model::LatestExportJobState>,
366    >(
367        mut self,
368        v: T,
369    ) -> Self {
370        self.latest_export_job_state = v.into();
371        self
372    }
373
374    /// Sets the value of [data_freshness_time][crate::model::DataSourceExportSettings::data_freshness_time].
375    ///
376    /// # Example
377    /// ```ignore,no_run
378    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
379    /// use wkt::Timestamp;
380    /// let x = DataSourceExportSettings::new().set_data_freshness_time(Timestamp::default()/* use setters */);
381    /// ```
382    pub fn set_data_freshness_time<T>(mut self, v: T) -> Self
383    where
384        T: std::convert::Into<wkt::Timestamp>,
385    {
386        self.data_freshness_time = std::option::Option::Some(v.into());
387        self
388    }
389
390    /// Sets or clears the value of [data_freshness_time][crate::model::DataSourceExportSettings::data_freshness_time].
391    ///
392    /// # Example
393    /// ```ignore,no_run
394    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
395    /// use wkt::Timestamp;
396    /// let x = DataSourceExportSettings::new().set_or_clear_data_freshness_time(Some(Timestamp::default()/* use setters */));
397    /// let x = DataSourceExportSettings::new().set_or_clear_data_freshness_time(None::<Timestamp>);
398    /// ```
399    pub fn set_or_clear_data_freshness_time<T>(mut self, v: std::option::Option<T>) -> Self
400    where
401        T: std::convert::Into<wkt::Timestamp>,
402    {
403        self.data_freshness_time = v.map(|x| x.into());
404        self
405    }
406
407    /// Sets the value of [data_volume][crate::model::DataSourceExportSettings::data_volume].
408    ///
409    /// # Example
410    /// ```ignore,no_run
411    /// # use google_cloud_chronicle_v1::model::DataSourceExportSettings;
412    /// let x = DataSourceExportSettings::new().set_data_volume(42);
413    /// ```
414    pub fn set_data_volume<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
415        self.data_volume = v.into();
416        self
417    }
418}
419
420impl wkt::message::Message for DataSourceExportSettings {
421    fn typename() -> &'static str {
422        "type.googleapis.com/google.cloud.chronicle.v1.DataSourceExportSettings"
423    }
424}
425
426/// The request message to fetch BigQuery Export configuration.
427#[derive(Clone, Default, PartialEq)]
428#[non_exhaustive]
429pub struct GetBigQueryExportRequest {
430    /// Required. The resource name of the BigqueryExport to retrieve.
431    /// Format:
432    /// projects/{project}/locations/{location}/instances/{instance}/bigQueryExport
433    pub name: std::string::String,
434
435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
436}
437
438impl GetBigQueryExportRequest {
439    /// Creates a new default instance.
440    pub fn new() -> Self {
441        std::default::Default::default()
442    }
443
444    /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
445    ///
446    /// # Example
447    /// ```ignore,no_run
448    /// # use google_cloud_chronicle_v1::model::GetBigQueryExportRequest;
449    /// # let project_id = "project_id";
450    /// # let location_id = "location_id";
451    /// # let instance_id = "instance_id";
452    /// let x = GetBigQueryExportRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/bigQueryExport"));
453    /// ```
454    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
455        self.name = v.into();
456        self
457    }
458}
459
460impl wkt::message::Message for GetBigQueryExportRequest {
461    fn typename() -> &'static str {
462        "type.googleapis.com/google.cloud.chronicle.v1.GetBigQueryExportRequest"
463    }
464}
465
466/// The request message to update BigQuery Export configuration.
467#[derive(Clone, Default, PartialEq)]
468#[non_exhaustive]
469pub struct UpdateBigQueryExportRequest {
470    /// Required. The BigQueryExport settings to update.
471    /// Format:
472    /// projects/{project}/locations/{location}/instances/{instance}/bigQueryExport
473    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
474
475    /// Optional. The list of fields to update.
476    pub update_mask: std::option::Option<wkt::FieldMask>,
477
478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
479}
480
481impl UpdateBigQueryExportRequest {
482    /// Creates a new default instance.
483    pub fn new() -> Self {
484        std::default::Default::default()
485    }
486
487    /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
488    ///
489    /// # Example
490    /// ```ignore,no_run
491    /// # use google_cloud_chronicle_v1::model::UpdateBigQueryExportRequest;
492    /// use google_cloud_chronicle_v1::model::BigQueryExport;
493    /// let x = UpdateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
494    /// ```
495    pub fn set_big_query_export<T>(mut self, v: T) -> Self
496    where
497        T: std::convert::Into<crate::model::BigQueryExport>,
498    {
499        self.big_query_export = std::option::Option::Some(v.into());
500        self
501    }
502
503    /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
504    ///
505    /// # Example
506    /// ```ignore,no_run
507    /// # use google_cloud_chronicle_v1::model::UpdateBigQueryExportRequest;
508    /// use google_cloud_chronicle_v1::model::BigQueryExport;
509    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
510    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
511    /// ```
512    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
513    where
514        T: std::convert::Into<crate::model::BigQueryExport>,
515    {
516        self.big_query_export = v.map(|x| x.into());
517        self
518    }
519
520    /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
521    ///
522    /// # Example
523    /// ```ignore,no_run
524    /// # use google_cloud_chronicle_v1::model::UpdateBigQueryExportRequest;
525    /// use wkt::FieldMask;
526    /// let x = UpdateBigQueryExportRequest::new().set_update_mask(FieldMask::default()/* use setters */);
527    /// ```
528    pub fn set_update_mask<T>(mut self, v: T) -> Self
529    where
530        T: std::convert::Into<wkt::FieldMask>,
531    {
532        self.update_mask = std::option::Option::Some(v.into());
533        self
534    }
535
536    /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
537    ///
538    /// # Example
539    /// ```ignore,no_run
540    /// # use google_cloud_chronicle_v1::model::UpdateBigQueryExportRequest;
541    /// use wkt::FieldMask;
542    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
543    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(None::<FieldMask>);
544    /// ```
545    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
546    where
547        T: std::convert::Into<wkt::FieldMask>,
548    {
549        self.update_mask = v.map(|x| x.into());
550        self
551    }
552}
553
554impl wkt::message::Message for UpdateBigQueryExportRequest {
555    fn typename() -> &'static str {
556        "type.googleapis.com/google.cloud.chronicle.v1.UpdateBigQueryExportRequest"
557    }
558}
559
560/// The request message to provision BigQuery Export configuration.
561#[derive(Clone, Default, PartialEq)]
562#[non_exhaustive]
563pub struct ProvisionBigQueryExportRequest {
564    /// Required. The instance for which BigQuery export is being provisioned.
565    /// Format: projects/{project}/locations/{location}/instances/{instance}
566    pub parent: std::string::String,
567
568    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
569}
570
571impl ProvisionBigQueryExportRequest {
572    /// Creates a new default instance.
573    pub fn new() -> Self {
574        std::default::Default::default()
575    }
576
577    /// Sets the value of [parent][crate::model::ProvisionBigQueryExportRequest::parent].
578    ///
579    /// # Example
580    /// ```ignore,no_run
581    /// # use google_cloud_chronicle_v1::model::ProvisionBigQueryExportRequest;
582    /// # let project_id = "project_id";
583    /// # let location_id = "location_id";
584    /// # let instance_id = "instance_id";
585    /// let x = ProvisionBigQueryExportRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
586    /// ```
587    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
588        self.parent = v.into();
589        self
590    }
591}
592
593impl wkt::message::Message for ProvisionBigQueryExportRequest {
594    fn typename() -> &'static str {
595        "type.googleapis.com/google.cloud.chronicle.v1.ProvisionBigQueryExportRequest"
596    }
597}
598
599/// DashboardChart resource.
600#[derive(Clone, Default, PartialEq)]
601#[non_exhaustive]
602pub struct DashboardChart {
603    /// Output only. Name of the dashboardChart.
604    pub name: std::string::String,
605
606    /// Required. Display name/Title of the dashboardChart visible to users.
607    pub display_name: std::string::String,
608
609    /// Optional. Description of the dashboardChart.
610    pub description: std::string::String,
611
612    /// Output only. NativeDashboard this chart belongs to.
613    pub native_dashboard: std::string::String,
614
615    /// Optional. Type of tile i.e., visualization, button or text.
616    pub tile_type: crate::model::TileType,
617
618    /// Optional. Query and datasource used in the chart. Should be empty for
619    /// Button Tiles.
620    pub chart_datasource: std::option::Option<crate::model::dashboard_chart::ChartDatasource>,
621
622    /// Required. Depending on tile_type one of below fields will be required.
623    pub visualization: std::option::Option<crate::model::dashboard_chart::Visualization>,
624
625    /// Optional. This checksum is computed by the server based on the value of
626    /// other fields, and may be sent on update and delete requests to ensure the
627    /// client has an up-to-date value before proceeding.
628    pub etag: std::string::String,
629
630    /// Optional. Drill down configuration.
631    pub drill_down_config: std::option::Option<crate::model::dashboard_chart::DrillDownConfig>,
632
633    /// Optional. List of Advanced Filter tokens used in this chart's query (e.g.,
634    /// "hostname", "ip"). This allows the UI to identify dependencies without
635    /// parsing the query text. The tokens are stored without the wrapping '$'
636    /// characters.
637    /// The number of tokens are not expected to be more than 10.
638    pub tokens: std::vec::Vec<std::string::String>,
639
640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
641}
642
643impl DashboardChart {
644    /// Creates a new default instance.
645    pub fn new() -> Self {
646        std::default::Default::default()
647    }
648
649    /// Sets the value of [name][crate::model::DashboardChart::name].
650    ///
651    /// # Example
652    /// ```ignore,no_run
653    /// # use google_cloud_chronicle_v1::model::DashboardChart;
654    /// # let project_id = "project_id";
655    /// # let location_id = "location_id";
656    /// # let instance_id = "instance_id";
657    /// # let chart_id = "chart_id";
658    /// let x = DashboardChart::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
659    /// ```
660    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
661        self.name = v.into();
662        self
663    }
664
665    /// Sets the value of [display_name][crate::model::DashboardChart::display_name].
666    ///
667    /// # Example
668    /// ```ignore,no_run
669    /// # use google_cloud_chronicle_v1::model::DashboardChart;
670    /// let x = DashboardChart::new().set_display_name("example");
671    /// ```
672    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
673        self.display_name = v.into();
674        self
675    }
676
677    /// Sets the value of [description][crate::model::DashboardChart::description].
678    ///
679    /// # Example
680    /// ```ignore,no_run
681    /// # use google_cloud_chronicle_v1::model::DashboardChart;
682    /// let x = DashboardChart::new().set_description("example");
683    /// ```
684    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
685        self.description = v.into();
686        self
687    }
688
689    /// Sets the value of [native_dashboard][crate::model::DashboardChart::native_dashboard].
690    ///
691    /// # Example
692    /// ```ignore,no_run
693    /// # use google_cloud_chronicle_v1::model::DashboardChart;
694    /// # let project_id = "project_id";
695    /// # let location_id = "location_id";
696    /// # let instance_id = "instance_id";
697    /// # let dashboard_id = "dashboard_id";
698    /// let x = DashboardChart::new().set_native_dashboard(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
699    /// ```
700    pub fn set_native_dashboard<T: std::convert::Into<std::string::String>>(
701        mut self,
702        v: T,
703    ) -> Self {
704        self.native_dashboard = v.into();
705        self
706    }
707
708    /// Sets the value of [tile_type][crate::model::DashboardChart::tile_type].
709    ///
710    /// # Example
711    /// ```ignore,no_run
712    /// # use google_cloud_chronicle_v1::model::DashboardChart;
713    /// use google_cloud_chronicle_v1::model::TileType;
714    /// let x0 = DashboardChart::new().set_tile_type(TileType::Visualization);
715    /// let x1 = DashboardChart::new().set_tile_type(TileType::Button);
716    /// let x2 = DashboardChart::new().set_tile_type(TileType::Markdown);
717    /// ```
718    pub fn set_tile_type<T: std::convert::Into<crate::model::TileType>>(mut self, v: T) -> Self {
719        self.tile_type = v.into();
720        self
721    }
722
723    /// Sets the value of [chart_datasource][crate::model::DashboardChart::chart_datasource].
724    ///
725    /// # Example
726    /// ```ignore,no_run
727    /// # use google_cloud_chronicle_v1::model::DashboardChart;
728    /// use google_cloud_chronicle_v1::model::dashboard_chart::ChartDatasource;
729    /// let x = DashboardChart::new().set_chart_datasource(ChartDatasource::default()/* use setters */);
730    /// ```
731    pub fn set_chart_datasource<T>(mut self, v: T) -> Self
732    where
733        T: std::convert::Into<crate::model::dashboard_chart::ChartDatasource>,
734    {
735        self.chart_datasource = std::option::Option::Some(v.into());
736        self
737    }
738
739    /// Sets or clears the value of [chart_datasource][crate::model::DashboardChart::chart_datasource].
740    ///
741    /// # Example
742    /// ```ignore,no_run
743    /// # use google_cloud_chronicle_v1::model::DashboardChart;
744    /// use google_cloud_chronicle_v1::model::dashboard_chart::ChartDatasource;
745    /// let x = DashboardChart::new().set_or_clear_chart_datasource(Some(ChartDatasource::default()/* use setters */));
746    /// let x = DashboardChart::new().set_or_clear_chart_datasource(None::<ChartDatasource>);
747    /// ```
748    pub fn set_or_clear_chart_datasource<T>(mut self, v: std::option::Option<T>) -> Self
749    where
750        T: std::convert::Into<crate::model::dashboard_chart::ChartDatasource>,
751    {
752        self.chart_datasource = v.map(|x| x.into());
753        self
754    }
755
756    /// Sets the value of [visualization][crate::model::DashboardChart::visualization].
757    ///
758    /// # Example
759    /// ```ignore,no_run
760    /// # use google_cloud_chronicle_v1::model::DashboardChart;
761    /// use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
762    /// let x = DashboardChart::new().set_visualization(Visualization::default()/* use setters */);
763    /// ```
764    pub fn set_visualization<T>(mut self, v: T) -> Self
765    where
766        T: std::convert::Into<crate::model::dashboard_chart::Visualization>,
767    {
768        self.visualization = std::option::Option::Some(v.into());
769        self
770    }
771
772    /// Sets or clears the value of [visualization][crate::model::DashboardChart::visualization].
773    ///
774    /// # Example
775    /// ```ignore,no_run
776    /// # use google_cloud_chronicle_v1::model::DashboardChart;
777    /// use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
778    /// let x = DashboardChart::new().set_or_clear_visualization(Some(Visualization::default()/* use setters */));
779    /// let x = DashboardChart::new().set_or_clear_visualization(None::<Visualization>);
780    /// ```
781    pub fn set_or_clear_visualization<T>(mut self, v: std::option::Option<T>) -> Self
782    where
783        T: std::convert::Into<crate::model::dashboard_chart::Visualization>,
784    {
785        self.visualization = v.map(|x| x.into());
786        self
787    }
788
789    /// Sets the value of [etag][crate::model::DashboardChart::etag].
790    ///
791    /// # Example
792    /// ```ignore,no_run
793    /// # use google_cloud_chronicle_v1::model::DashboardChart;
794    /// let x = DashboardChart::new().set_etag("example");
795    /// ```
796    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
797        self.etag = v.into();
798        self
799    }
800
801    /// Sets the value of [drill_down_config][crate::model::DashboardChart::drill_down_config].
802    ///
803    /// # Example
804    /// ```ignore,no_run
805    /// # use google_cloud_chronicle_v1::model::DashboardChart;
806    /// use google_cloud_chronicle_v1::model::dashboard_chart::DrillDownConfig;
807    /// let x = DashboardChart::new().set_drill_down_config(DrillDownConfig::default()/* use setters */);
808    /// ```
809    pub fn set_drill_down_config<T>(mut self, v: T) -> Self
810    where
811        T: std::convert::Into<crate::model::dashboard_chart::DrillDownConfig>,
812    {
813        self.drill_down_config = std::option::Option::Some(v.into());
814        self
815    }
816
817    /// Sets or clears the value of [drill_down_config][crate::model::DashboardChart::drill_down_config].
818    ///
819    /// # Example
820    /// ```ignore,no_run
821    /// # use google_cloud_chronicle_v1::model::DashboardChart;
822    /// use google_cloud_chronicle_v1::model::dashboard_chart::DrillDownConfig;
823    /// let x = DashboardChart::new().set_or_clear_drill_down_config(Some(DrillDownConfig::default()/* use setters */));
824    /// let x = DashboardChart::new().set_or_clear_drill_down_config(None::<DrillDownConfig>);
825    /// ```
826    pub fn set_or_clear_drill_down_config<T>(mut self, v: std::option::Option<T>) -> Self
827    where
828        T: std::convert::Into<crate::model::dashboard_chart::DrillDownConfig>,
829    {
830        self.drill_down_config = v.map(|x| x.into());
831        self
832    }
833
834    /// Sets the value of [tokens][crate::model::DashboardChart::tokens].
835    ///
836    /// # Example
837    /// ```ignore,no_run
838    /// # use google_cloud_chronicle_v1::model::DashboardChart;
839    /// let x = DashboardChart::new().set_tokens(["a", "b", "c"]);
840    /// ```
841    pub fn set_tokens<T, V>(mut self, v: T) -> Self
842    where
843        T: std::iter::IntoIterator<Item = V>,
844        V: std::convert::Into<std::string::String>,
845    {
846        use std::iter::Iterator;
847        self.tokens = v.into_iter().map(|i| i.into()).collect();
848        self
849    }
850}
851
852impl wkt::message::Message for DashboardChart {
853    fn typename() -> &'static str {
854        "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart"
855    }
856}
857
858/// Defines additional types related to [DashboardChart].
859pub mod dashboard_chart {
860    #[allow(unused_imports)]
861    use super::*;
862
863    /// Datasource of the chart including the query reference and source name.
864    #[derive(Clone, Default, PartialEq)]
865    #[non_exhaustive]
866    pub struct ChartDatasource {
867        /// Reference to dashboard query resource used in the chart.
868        pub dashboard_query: std::string::String,
869
870        /// Name of the datasource used in the chart.
871        pub data_sources: std::vec::Vec<crate::model::DataSource>,
872
873        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
874    }
875
876    impl ChartDatasource {
877        /// Creates a new default instance.
878        pub fn new() -> Self {
879            std::default::Default::default()
880        }
881
882        /// Sets the value of [dashboard_query][crate::model::dashboard_chart::ChartDatasource::dashboard_query].
883        ///
884        /// # Example
885        /// ```ignore,no_run
886        /// # use google_cloud_chronicle_v1::model::dashboard_chart::ChartDatasource;
887        /// # let project_id = "project_id";
888        /// # let location_id = "location_id";
889        /// # let instance_id = "instance_id";
890        /// # let query_id = "query_id";
891        /// let x = ChartDatasource::new().set_dashboard_query(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardQueries/{query_id}"));
892        /// ```
893        pub fn set_dashboard_query<T: std::convert::Into<std::string::String>>(
894            mut self,
895            v: T,
896        ) -> Self {
897            self.dashboard_query = v.into();
898            self
899        }
900
901        /// Sets the value of [data_sources][crate::model::dashboard_chart::ChartDatasource::data_sources].
902        ///
903        /// # Example
904        /// ```ignore,no_run
905        /// # use google_cloud_chronicle_v1::model::dashboard_chart::ChartDatasource;
906        /// use google_cloud_chronicle_v1::model::DataSource;
907        /// let x = ChartDatasource::new().set_data_sources([
908        ///     DataSource::Udm,
909        ///     DataSource::Entity,
910        ///     DataSource::IngestionMetrics,
911        /// ]);
912        /// ```
913        pub fn set_data_sources<T, V>(mut self, v: T) -> Self
914        where
915            T: std::iter::IntoIterator<Item = V>,
916            V: std::convert::Into<crate::model::DataSource>,
917        {
918            use std::iter::Iterator;
919            self.data_sources = v.into_iter().map(|i| i.into()).collect();
920            self
921        }
922    }
923
924    impl wkt::message::Message for ChartDatasource {
925        fn typename() -> &'static str {
926            "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.ChartDatasource"
927        }
928    }
929
930    /// Visualization config for a chart.
931    /// <https://echarts.apache.org/en/option.html#series>
932    #[derive(Clone, Default, PartialEq)]
933    #[non_exhaustive]
934    pub struct Visualization {
935        #[allow(missing_docs)]
936        pub x_axes: std::vec::Vec<crate::model::dashboard_chart::visualization::Axis>,
937
938        #[allow(missing_docs)]
939        pub y_axes: std::vec::Vec<crate::model::dashboard_chart::visualization::Axis>,
940
941        #[allow(missing_docs)]
942        pub series: std::vec::Vec<crate::model::dashboard_chart::visualization::Series>,
943
944        #[allow(missing_docs)]
945        pub tooltip: std::option::Option<crate::model::dashboard_chart::visualization::Tooltip>,
946
947        #[allow(missing_docs)]
948        pub legends: std::vec::Vec<crate::model::dashboard_chart::visualization::Legend>,
949
950        /// Column Definition to represent chart as a table.
951        pub column_defs: std::vec::Vec<crate::model::dashboard_chart::visualization::ColumnDef>,
952
953        /// Optional. Configuration for table appearance.
954        pub table_config:
955            std::option::Option<crate::model::dashboard_chart::visualization::TableConfig>,
956
957        /// Button config for a chart if tileType is TILE_TYPE_BUTTON.
958        pub button: std::option::Option<crate::model::Button>,
959
960        /// Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN.
961        pub markdown: std::option::Option<crate::model::Markdown>,
962
963        /// Optional. Selected column for series
964        pub series_column: std::vec::Vec<std::string::String>,
965
966        /// Optional. Selected grouping type for series
967        pub grouping_type: std::string::String,
968
969        /// Optional. Google Maps config for a chart if type is GOOGLE MAPS.
970        pub google_maps_config:
971            std::option::Option<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
972
973        /// Optional. Whether threshold coloring is enabled for the chart. If it's
974        /// enabled, the chart will be colored based on the values stored in
975        /// VisualMap below.
976        pub threshold_coloring_enabled: bool,
977
978        /// Optional. Visual maps for the chart.
979        pub visual_maps: std::vec::Vec<crate::model::dashboard_chart::visualization::VisualMap>,
980
981        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
982    }
983
984    impl Visualization {
985        /// Creates a new default instance.
986        pub fn new() -> Self {
987            std::default::Default::default()
988        }
989
990        /// Sets the value of [x_axes][crate::model::dashboard_chart::Visualization::x_axes].
991        ///
992        /// # Example
993        /// ```ignore,no_run
994        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
995        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
996        /// let x = Visualization::new()
997        ///     .set_x_axes([
998        ///         Axis::default()/* use setters */,
999        ///         Axis::default()/* use (different) setters */,
1000        ///     ]);
1001        /// ```
1002        pub fn set_x_axes<T, V>(mut self, v: T) -> Self
1003        where
1004            T: std::iter::IntoIterator<Item = V>,
1005            V: std::convert::Into<crate::model::dashboard_chart::visualization::Axis>,
1006        {
1007            use std::iter::Iterator;
1008            self.x_axes = v.into_iter().map(|i| i.into()).collect();
1009            self
1010        }
1011
1012        /// Sets the value of [y_axes][crate::model::dashboard_chart::Visualization::y_axes].
1013        ///
1014        /// # Example
1015        /// ```ignore,no_run
1016        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1017        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1018        /// let x = Visualization::new()
1019        ///     .set_y_axes([
1020        ///         Axis::default()/* use setters */,
1021        ///         Axis::default()/* use (different) setters */,
1022        ///     ]);
1023        /// ```
1024        pub fn set_y_axes<T, V>(mut self, v: T) -> Self
1025        where
1026            T: std::iter::IntoIterator<Item = V>,
1027            V: std::convert::Into<crate::model::dashboard_chart::visualization::Axis>,
1028        {
1029            use std::iter::Iterator;
1030            self.y_axes = v.into_iter().map(|i| i.into()).collect();
1031            self
1032        }
1033
1034        /// Sets the value of [series][crate::model::dashboard_chart::Visualization::series].
1035        ///
1036        /// # Example
1037        /// ```ignore,no_run
1038        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1039        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1040        /// let x = Visualization::new()
1041        ///     .set_series([
1042        ///         Series::default()/* use setters */,
1043        ///         Series::default()/* use (different) setters */,
1044        ///     ]);
1045        /// ```
1046        pub fn set_series<T, V>(mut self, v: T) -> Self
1047        where
1048            T: std::iter::IntoIterator<Item = V>,
1049            V: std::convert::Into<crate::model::dashboard_chart::visualization::Series>,
1050        {
1051            use std::iter::Iterator;
1052            self.series = v.into_iter().map(|i| i.into()).collect();
1053            self
1054        }
1055
1056        /// Sets the value of [tooltip][crate::model::dashboard_chart::Visualization::tooltip].
1057        ///
1058        /// # Example
1059        /// ```ignore,no_run
1060        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1061        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Tooltip;
1062        /// let x = Visualization::new().set_tooltip(Tooltip::default()/* use setters */);
1063        /// ```
1064        pub fn set_tooltip<T>(mut self, v: T) -> Self
1065        where
1066            T: std::convert::Into<crate::model::dashboard_chart::visualization::Tooltip>,
1067        {
1068            self.tooltip = std::option::Option::Some(v.into());
1069            self
1070        }
1071
1072        /// Sets or clears the value of [tooltip][crate::model::dashboard_chart::Visualization::tooltip].
1073        ///
1074        /// # Example
1075        /// ```ignore,no_run
1076        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1077        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Tooltip;
1078        /// let x = Visualization::new().set_or_clear_tooltip(Some(Tooltip::default()/* use setters */));
1079        /// let x = Visualization::new().set_or_clear_tooltip(None::<Tooltip>);
1080        /// ```
1081        pub fn set_or_clear_tooltip<T>(mut self, v: std::option::Option<T>) -> Self
1082        where
1083            T: std::convert::Into<crate::model::dashboard_chart::visualization::Tooltip>,
1084        {
1085            self.tooltip = v.map(|x| x.into());
1086            self
1087        }
1088
1089        /// Sets the value of [legends][crate::model::dashboard_chart::Visualization::legends].
1090        ///
1091        /// # Example
1092        /// ```ignore,no_run
1093        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1094        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
1095        /// let x = Visualization::new()
1096        ///     .set_legends([
1097        ///         Legend::default()/* use setters */,
1098        ///         Legend::default()/* use (different) setters */,
1099        ///     ]);
1100        /// ```
1101        pub fn set_legends<T, V>(mut self, v: T) -> Self
1102        where
1103            T: std::iter::IntoIterator<Item = V>,
1104            V: std::convert::Into<crate::model::dashboard_chart::visualization::Legend>,
1105        {
1106            use std::iter::Iterator;
1107            self.legends = v.into_iter().map(|i| i.into()).collect();
1108            self
1109        }
1110
1111        /// Sets the value of [column_defs][crate::model::dashboard_chart::Visualization::column_defs].
1112        ///
1113        /// # Example
1114        /// ```ignore,no_run
1115        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1116        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnDef;
1117        /// let x = Visualization::new()
1118        ///     .set_column_defs([
1119        ///         ColumnDef::default()/* use setters */,
1120        ///         ColumnDef::default()/* use (different) setters */,
1121        ///     ]);
1122        /// ```
1123        pub fn set_column_defs<T, V>(mut self, v: T) -> Self
1124        where
1125            T: std::iter::IntoIterator<Item = V>,
1126            V: std::convert::Into<crate::model::dashboard_chart::visualization::ColumnDef>,
1127        {
1128            use std::iter::Iterator;
1129            self.column_defs = v.into_iter().map(|i| i.into()).collect();
1130            self
1131        }
1132
1133        /// Sets the value of [table_config][crate::model::dashboard_chart::Visualization::table_config].
1134        ///
1135        /// # Example
1136        /// ```ignore,no_run
1137        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1138        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::TableConfig;
1139        /// let x = Visualization::new().set_table_config(TableConfig::default()/* use setters */);
1140        /// ```
1141        pub fn set_table_config<T>(mut self, v: T) -> Self
1142        where
1143            T: std::convert::Into<crate::model::dashboard_chart::visualization::TableConfig>,
1144        {
1145            self.table_config = std::option::Option::Some(v.into());
1146            self
1147        }
1148
1149        /// Sets or clears the value of [table_config][crate::model::dashboard_chart::Visualization::table_config].
1150        ///
1151        /// # Example
1152        /// ```ignore,no_run
1153        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1154        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::TableConfig;
1155        /// let x = Visualization::new().set_or_clear_table_config(Some(TableConfig::default()/* use setters */));
1156        /// let x = Visualization::new().set_or_clear_table_config(None::<TableConfig>);
1157        /// ```
1158        pub fn set_or_clear_table_config<T>(mut self, v: std::option::Option<T>) -> Self
1159        where
1160            T: std::convert::Into<crate::model::dashboard_chart::visualization::TableConfig>,
1161        {
1162            self.table_config = v.map(|x| x.into());
1163            self
1164        }
1165
1166        /// Sets the value of [button][crate::model::dashboard_chart::Visualization::button].
1167        ///
1168        /// # Example
1169        /// ```ignore,no_run
1170        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1171        /// use google_cloud_chronicle_v1::model::Button;
1172        /// let x = Visualization::new().set_button(Button::default()/* use setters */);
1173        /// ```
1174        pub fn set_button<T>(mut self, v: T) -> Self
1175        where
1176            T: std::convert::Into<crate::model::Button>,
1177        {
1178            self.button = std::option::Option::Some(v.into());
1179            self
1180        }
1181
1182        /// Sets or clears the value of [button][crate::model::dashboard_chart::Visualization::button].
1183        ///
1184        /// # Example
1185        /// ```ignore,no_run
1186        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1187        /// use google_cloud_chronicle_v1::model::Button;
1188        /// let x = Visualization::new().set_or_clear_button(Some(Button::default()/* use setters */));
1189        /// let x = Visualization::new().set_or_clear_button(None::<Button>);
1190        /// ```
1191        pub fn set_or_clear_button<T>(mut self, v: std::option::Option<T>) -> Self
1192        where
1193            T: std::convert::Into<crate::model::Button>,
1194        {
1195            self.button = v.map(|x| x.into());
1196            self
1197        }
1198
1199        /// Sets the value of [markdown][crate::model::dashboard_chart::Visualization::markdown].
1200        ///
1201        /// # Example
1202        /// ```ignore,no_run
1203        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1204        /// use google_cloud_chronicle_v1::model::Markdown;
1205        /// let x = Visualization::new().set_markdown(Markdown::default()/* use setters */);
1206        /// ```
1207        pub fn set_markdown<T>(mut self, v: T) -> Self
1208        where
1209            T: std::convert::Into<crate::model::Markdown>,
1210        {
1211            self.markdown = std::option::Option::Some(v.into());
1212            self
1213        }
1214
1215        /// Sets or clears the value of [markdown][crate::model::dashboard_chart::Visualization::markdown].
1216        ///
1217        /// # Example
1218        /// ```ignore,no_run
1219        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1220        /// use google_cloud_chronicle_v1::model::Markdown;
1221        /// let x = Visualization::new().set_or_clear_markdown(Some(Markdown::default()/* use setters */));
1222        /// let x = Visualization::new().set_or_clear_markdown(None::<Markdown>);
1223        /// ```
1224        pub fn set_or_clear_markdown<T>(mut self, v: std::option::Option<T>) -> Self
1225        where
1226            T: std::convert::Into<crate::model::Markdown>,
1227        {
1228            self.markdown = v.map(|x| x.into());
1229            self
1230        }
1231
1232        /// Sets the value of [series_column][crate::model::dashboard_chart::Visualization::series_column].
1233        ///
1234        /// # Example
1235        /// ```ignore,no_run
1236        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1237        /// let x = Visualization::new().set_series_column(["a", "b", "c"]);
1238        /// ```
1239        pub fn set_series_column<T, V>(mut self, v: T) -> Self
1240        where
1241            T: std::iter::IntoIterator<Item = V>,
1242            V: std::convert::Into<std::string::String>,
1243        {
1244            use std::iter::Iterator;
1245            self.series_column = v.into_iter().map(|i| i.into()).collect();
1246            self
1247        }
1248
1249        /// Sets the value of [grouping_type][crate::model::dashboard_chart::Visualization::grouping_type].
1250        ///
1251        /// # Example
1252        /// ```ignore,no_run
1253        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1254        /// let x = Visualization::new().set_grouping_type("example");
1255        /// ```
1256        pub fn set_grouping_type<T: std::convert::Into<std::string::String>>(
1257            mut self,
1258            v: T,
1259        ) -> Self {
1260            self.grouping_type = v.into();
1261            self
1262        }
1263
1264        /// Sets the value of [google_maps_config][crate::model::dashboard_chart::Visualization::google_maps_config].
1265        ///
1266        /// # Example
1267        /// ```ignore,no_run
1268        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1269        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
1270        /// let x = Visualization::new().set_google_maps_config(GoogleMapsConfig::default()/* use setters */);
1271        /// ```
1272        pub fn set_google_maps_config<T>(mut self, v: T) -> Self
1273        where
1274            T: std::convert::Into<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
1275        {
1276            self.google_maps_config = std::option::Option::Some(v.into());
1277            self
1278        }
1279
1280        /// Sets or clears the value of [google_maps_config][crate::model::dashboard_chart::Visualization::google_maps_config].
1281        ///
1282        /// # Example
1283        /// ```ignore,no_run
1284        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1285        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
1286        /// let x = Visualization::new().set_or_clear_google_maps_config(Some(GoogleMapsConfig::default()/* use setters */));
1287        /// let x = Visualization::new().set_or_clear_google_maps_config(None::<GoogleMapsConfig>);
1288        /// ```
1289        pub fn set_or_clear_google_maps_config<T>(mut self, v: std::option::Option<T>) -> Self
1290        where
1291            T: std::convert::Into<crate::model::dashboard_chart::visualization::GoogleMapsConfig>,
1292        {
1293            self.google_maps_config = v.map(|x| x.into());
1294            self
1295        }
1296
1297        /// Sets the value of [threshold_coloring_enabled][crate::model::dashboard_chart::Visualization::threshold_coloring_enabled].
1298        ///
1299        /// # Example
1300        /// ```ignore,no_run
1301        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1302        /// let x = Visualization::new().set_threshold_coloring_enabled(true);
1303        /// ```
1304        pub fn set_threshold_coloring_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1305            self.threshold_coloring_enabled = v.into();
1306            self
1307        }
1308
1309        /// Sets the value of [visual_maps][crate::model::dashboard_chart::Visualization::visual_maps].
1310        ///
1311        /// # Example
1312        /// ```ignore,no_run
1313        /// # use google_cloud_chronicle_v1::model::dashboard_chart::Visualization;
1314        /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::VisualMap;
1315        /// let x = Visualization::new()
1316        ///     .set_visual_maps([
1317        ///         VisualMap::default()/* use setters */,
1318        ///         VisualMap::default()/* use (different) setters */,
1319        ///     ]);
1320        /// ```
1321        pub fn set_visual_maps<T, V>(mut self, v: T) -> Self
1322        where
1323            T: std::iter::IntoIterator<Item = V>,
1324            V: std::convert::Into<crate::model::dashboard_chart::visualization::VisualMap>,
1325        {
1326            use std::iter::Iterator;
1327            self.visual_maps = v.into_iter().map(|i| i.into()).collect();
1328            self
1329        }
1330    }
1331
1332    impl wkt::message::Message for Visualization {
1333        fn typename() -> &'static str {
1334            "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization"
1335        }
1336    }
1337
1338    /// Defines additional types related to [Visualization].
1339    pub mod visualization {
1340        #[allow(unused_imports)]
1341        use super::*;
1342
1343        #[allow(missing_docs)]
1344        #[derive(Clone, Default, PartialEq)]
1345        #[non_exhaustive]
1346        pub struct Axis {
1347            #[allow(missing_docs)]
1348            pub axis_type: crate::model::AxisType,
1349
1350            #[allow(missing_docs)]
1351            pub display_name: std::string::String,
1352
1353            /// Minimum value to be rendered in ECharts as per
1354            /// <https://echarts.apache.org/en/option.html#xAxis.min>
1355            pub min: std::option::Option<i32>,
1356
1357            /// Maximum value to be rendered in ECharts as per
1358            /// <https://echarts.apache.org/en/option.html#xAxis.max>
1359            pub max: std::option::Option<i32>,
1360
1361            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1362        }
1363
1364        impl Axis {
1365            /// Creates a new default instance.
1366            pub fn new() -> Self {
1367                std::default::Default::default()
1368            }
1369
1370            /// Sets the value of [axis_type][crate::model::dashboard_chart::visualization::Axis::axis_type].
1371            ///
1372            /// # Example
1373            /// ```ignore,no_run
1374            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1375            /// use google_cloud_chronicle_v1::model::AxisType;
1376            /// let x0 = Axis::new().set_axis_type(AxisType::Value);
1377            /// let x1 = Axis::new().set_axis_type(AxisType::Category);
1378            /// let x2 = Axis::new().set_axis_type(AxisType::Time);
1379            /// ```
1380            pub fn set_axis_type<T: std::convert::Into<crate::model::AxisType>>(
1381                mut self,
1382                v: T,
1383            ) -> Self {
1384                self.axis_type = v.into();
1385                self
1386            }
1387
1388            /// Sets the value of [display_name][crate::model::dashboard_chart::visualization::Axis::display_name].
1389            ///
1390            /// # Example
1391            /// ```ignore,no_run
1392            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1393            /// let x = Axis::new().set_display_name("example");
1394            /// ```
1395            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1396                mut self,
1397                v: T,
1398            ) -> Self {
1399                self.display_name = v.into();
1400                self
1401            }
1402
1403            /// Sets the value of [min][crate::model::dashboard_chart::visualization::Axis::min].
1404            ///
1405            /// # Example
1406            /// ```ignore,no_run
1407            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1408            /// let x = Axis::new().set_min(42);
1409            /// ```
1410            pub fn set_min<T>(mut self, v: T) -> Self
1411            where
1412                T: std::convert::Into<i32>,
1413            {
1414                self.min = std::option::Option::Some(v.into());
1415                self
1416            }
1417
1418            /// Sets or clears the value of [min][crate::model::dashboard_chart::visualization::Axis::min].
1419            ///
1420            /// # Example
1421            /// ```ignore,no_run
1422            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1423            /// let x = Axis::new().set_or_clear_min(Some(42));
1424            /// let x = Axis::new().set_or_clear_min(None::<i32>);
1425            /// ```
1426            pub fn set_or_clear_min<T>(mut self, v: std::option::Option<T>) -> Self
1427            where
1428                T: std::convert::Into<i32>,
1429            {
1430                self.min = v.map(|x| x.into());
1431                self
1432            }
1433
1434            /// Sets the value of [max][crate::model::dashboard_chart::visualization::Axis::max].
1435            ///
1436            /// # Example
1437            /// ```ignore,no_run
1438            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1439            /// let x = Axis::new().set_max(42);
1440            /// ```
1441            pub fn set_max<T>(mut self, v: T) -> Self
1442            where
1443                T: std::convert::Into<i32>,
1444            {
1445                self.max = std::option::Option::Some(v.into());
1446                self
1447            }
1448
1449            /// Sets or clears the value of [max][crate::model::dashboard_chart::visualization::Axis::max].
1450            ///
1451            /// # Example
1452            /// ```ignore,no_run
1453            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Axis;
1454            /// let x = Axis::new().set_or_clear_max(Some(42));
1455            /// let x = Axis::new().set_or_clear_max(None::<i32>);
1456            /// ```
1457            pub fn set_or_clear_max<T>(mut self, v: std::option::Option<T>) -> Self
1458            where
1459                T: std::convert::Into<i32>,
1460            {
1461                self.max = v.map(|x| x.into());
1462                self
1463            }
1464        }
1465
1466        impl wkt::message::Message for Axis {
1467            fn typename() -> &'static str {
1468                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Axis"
1469            }
1470        }
1471
1472        #[allow(missing_docs)]
1473        #[derive(Clone, Default, PartialEq)]
1474        #[non_exhaustive]
1475        pub struct Series {
1476            #[allow(missing_docs)]
1477            pub series_type: crate::model::SeriesType,
1478
1479            /// user specified series label
1480            pub series_name: std::string::String,
1481
1482            #[allow(missing_docs)]
1483            pub show_symbol: bool,
1484
1485            #[allow(missing_docs)]
1486            pub show_background: bool,
1487
1488            #[allow(missing_docs)]
1489            pub stack: std::string::String,
1490
1491            #[allow(missing_docs)]
1492            pub series_stack_strategy: crate::model::SeriesStackStrategy,
1493
1494            #[allow(missing_docs)]
1495            pub encode:
1496                std::option::Option<crate::model::dashboard_chart::visualization::series::Encode>,
1497
1498            #[allow(missing_docs)]
1499            pub label: std::string::String,
1500
1501            #[allow(missing_docs)]
1502            pub field: std::string::String,
1503
1504            /// Optional. Data label config for a series.
1505            /// Displays data vaule in the chart
1506            pub data_label: std::option::Option<
1507                crate::model::dashboard_chart::visualization::series::DataLabel,
1508            >,
1509
1510            /// Optional. Used to make a pie chart into a douhnut chart
1511            pub radius: std::vec::Vec<std::string::String>,
1512
1513            /// Optional. Custom styling for chart
1514            pub item_style: std::option::Option<
1515                crate::model::dashboard_chart::visualization::series::ItemStyle,
1516            >,
1517
1518            /// Optional. Series unique value from the query result
1519            pub series_unique_value: std::string::String,
1520
1521            /// Optional. Custom styling for area chart
1522            pub area_style: std::option::Option<
1523                crate::model::dashboard_chart::visualization::series::AreaStyle,
1524            >,
1525
1526            /// Optional. Field to be saved for retrieving slice colors for the chart
1527            pub item_colors: std::option::Option<
1528                crate::model::dashboard_chart::visualization::series::ItemColors,
1529            >,
1530
1531            /// Optional. Field to be saved for retrieving gauge config for gauge chart
1532            pub gauge_config: std::option::Option<
1533                crate::model::dashboard_chart::visualization::series::GaugeConfig,
1534            >,
1535
1536            /// Optional. Fields to capture trend config for metric charts
1537            pub metric_trend_config: std::option::Option<
1538                crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
1539            >,
1540
1541            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1542        }
1543
1544        impl Series {
1545            /// Creates a new default instance.
1546            pub fn new() -> Self {
1547                std::default::Default::default()
1548            }
1549
1550            /// Sets the value of [series_type][crate::model::dashboard_chart::visualization::Series::series_type].
1551            ///
1552            /// # Example
1553            /// ```ignore,no_run
1554            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1555            /// use google_cloud_chronicle_v1::model::SeriesType;
1556            /// let x0 = Series::new().set_series_type(SeriesType::Line);
1557            /// let x1 = Series::new().set_series_type(SeriesType::Bar);
1558            /// let x2 = Series::new().set_series_type(SeriesType::Pie);
1559            /// ```
1560            pub fn set_series_type<T: std::convert::Into<crate::model::SeriesType>>(
1561                mut self,
1562                v: T,
1563            ) -> Self {
1564                self.series_type = v.into();
1565                self
1566            }
1567
1568            /// Sets the value of [series_name][crate::model::dashboard_chart::visualization::Series::series_name].
1569            ///
1570            /// # Example
1571            /// ```ignore,no_run
1572            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1573            /// let x = Series::new().set_series_name("example");
1574            /// ```
1575            pub fn set_series_name<T: std::convert::Into<std::string::String>>(
1576                mut self,
1577                v: T,
1578            ) -> Self {
1579                self.series_name = v.into();
1580                self
1581            }
1582
1583            /// Sets the value of [show_symbol][crate::model::dashboard_chart::visualization::Series::show_symbol].
1584            ///
1585            /// # Example
1586            /// ```ignore,no_run
1587            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1588            /// let x = Series::new().set_show_symbol(true);
1589            /// ```
1590            pub fn set_show_symbol<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1591                self.show_symbol = v.into();
1592                self
1593            }
1594
1595            /// Sets the value of [show_background][crate::model::dashboard_chart::visualization::Series::show_background].
1596            ///
1597            /// # Example
1598            /// ```ignore,no_run
1599            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1600            /// let x = Series::new().set_show_background(true);
1601            /// ```
1602            pub fn set_show_background<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1603                self.show_background = v.into();
1604                self
1605            }
1606
1607            /// Sets the value of [stack][crate::model::dashboard_chart::visualization::Series::stack].
1608            ///
1609            /// # Example
1610            /// ```ignore,no_run
1611            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1612            /// let x = Series::new().set_stack("example");
1613            /// ```
1614            pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1615                self.stack = v.into();
1616                self
1617            }
1618
1619            /// Sets the value of [series_stack_strategy][crate::model::dashboard_chart::visualization::Series::series_stack_strategy].
1620            ///
1621            /// # Example
1622            /// ```ignore,no_run
1623            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1624            /// use google_cloud_chronicle_v1::model::SeriesStackStrategy;
1625            /// let x0 = Series::new().set_series_stack_strategy(SeriesStackStrategy::Samesign);
1626            /// let x1 = Series::new().set_series_stack_strategy(SeriesStackStrategy::All);
1627            /// let x2 = Series::new().set_series_stack_strategy(SeriesStackStrategy::Positive);
1628            /// ```
1629            pub fn set_series_stack_strategy<
1630                T: std::convert::Into<crate::model::SeriesStackStrategy>,
1631            >(
1632                mut self,
1633                v: T,
1634            ) -> Self {
1635                self.series_stack_strategy = v.into();
1636                self
1637            }
1638
1639            /// Sets the value of [encode][crate::model::dashboard_chart::visualization::Series::encode].
1640            ///
1641            /// # Example
1642            /// ```ignore,no_run
1643            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1644            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
1645            /// let x = Series::new().set_encode(Encode::default()/* use setters */);
1646            /// ```
1647            pub fn set_encode<T>(mut self, v: T) -> Self
1648            where
1649                T: std::convert::Into<crate::model::dashboard_chart::visualization::series::Encode>,
1650            {
1651                self.encode = std::option::Option::Some(v.into());
1652                self
1653            }
1654
1655            /// Sets or clears the value of [encode][crate::model::dashboard_chart::visualization::Series::encode].
1656            ///
1657            /// # Example
1658            /// ```ignore,no_run
1659            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1660            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
1661            /// let x = Series::new().set_or_clear_encode(Some(Encode::default()/* use setters */));
1662            /// let x = Series::new().set_or_clear_encode(None::<Encode>);
1663            /// ```
1664            pub fn set_or_clear_encode<T>(mut self, v: std::option::Option<T>) -> Self
1665            where
1666                T: std::convert::Into<crate::model::dashboard_chart::visualization::series::Encode>,
1667            {
1668                self.encode = v.map(|x| x.into());
1669                self
1670            }
1671
1672            /// Sets the value of [label][crate::model::dashboard_chart::visualization::Series::label].
1673            ///
1674            /// # Example
1675            /// ```ignore,no_run
1676            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1677            /// let x = Series::new().set_label("example");
1678            /// ```
1679            pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1680                self.label = v.into();
1681                self
1682            }
1683
1684            /// Sets the value of [field][crate::model::dashboard_chart::visualization::Series::field].
1685            ///
1686            /// # Example
1687            /// ```ignore,no_run
1688            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1689            /// let x = Series::new().set_field("example");
1690            /// ```
1691            pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1692                self.field = v.into();
1693                self
1694            }
1695
1696            /// Sets the value of [data_label][crate::model::dashboard_chart::visualization::Series::data_label].
1697            ///
1698            /// # Example
1699            /// ```ignore,no_run
1700            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1701            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::DataLabel;
1702            /// let x = Series::new().set_data_label(DataLabel::default()/* use setters */);
1703            /// ```
1704            pub fn set_data_label<T>(mut self, v: T) -> Self
1705            where
1706                T: std::convert::Into<
1707                        crate::model::dashboard_chart::visualization::series::DataLabel,
1708                    >,
1709            {
1710                self.data_label = std::option::Option::Some(v.into());
1711                self
1712            }
1713
1714            /// Sets or clears the value of [data_label][crate::model::dashboard_chart::visualization::Series::data_label].
1715            ///
1716            /// # Example
1717            /// ```ignore,no_run
1718            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1719            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::DataLabel;
1720            /// let x = Series::new().set_or_clear_data_label(Some(DataLabel::default()/* use setters */));
1721            /// let x = Series::new().set_or_clear_data_label(None::<DataLabel>);
1722            /// ```
1723            pub fn set_or_clear_data_label<T>(mut self, v: std::option::Option<T>) -> Self
1724            where
1725                T: std::convert::Into<
1726                        crate::model::dashboard_chart::visualization::series::DataLabel,
1727                    >,
1728            {
1729                self.data_label = v.map(|x| x.into());
1730                self
1731            }
1732
1733            /// Sets the value of [radius][crate::model::dashboard_chart::visualization::Series::radius].
1734            ///
1735            /// # Example
1736            /// ```ignore,no_run
1737            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1738            /// let x = Series::new().set_radius(["a", "b", "c"]);
1739            /// ```
1740            pub fn set_radius<T, V>(mut self, v: T) -> Self
1741            where
1742                T: std::iter::IntoIterator<Item = V>,
1743                V: std::convert::Into<std::string::String>,
1744            {
1745                use std::iter::Iterator;
1746                self.radius = v.into_iter().map(|i| i.into()).collect();
1747                self
1748            }
1749
1750            /// Sets the value of [item_style][crate::model::dashboard_chart::visualization::Series::item_style].
1751            ///
1752            /// # Example
1753            /// ```ignore,no_run
1754            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1755            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemStyle;
1756            /// let x = Series::new().set_item_style(ItemStyle::default()/* use setters */);
1757            /// ```
1758            pub fn set_item_style<T>(mut self, v: T) -> Self
1759            where
1760                T: std::convert::Into<
1761                        crate::model::dashboard_chart::visualization::series::ItemStyle,
1762                    >,
1763            {
1764                self.item_style = std::option::Option::Some(v.into());
1765                self
1766            }
1767
1768            /// Sets or clears the value of [item_style][crate::model::dashboard_chart::visualization::Series::item_style].
1769            ///
1770            /// # Example
1771            /// ```ignore,no_run
1772            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1773            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemStyle;
1774            /// let x = Series::new().set_or_clear_item_style(Some(ItemStyle::default()/* use setters */));
1775            /// let x = Series::new().set_or_clear_item_style(None::<ItemStyle>);
1776            /// ```
1777            pub fn set_or_clear_item_style<T>(mut self, v: std::option::Option<T>) -> Self
1778            where
1779                T: std::convert::Into<
1780                        crate::model::dashboard_chart::visualization::series::ItemStyle,
1781                    >,
1782            {
1783                self.item_style = v.map(|x| x.into());
1784                self
1785            }
1786
1787            /// Sets the value of [series_unique_value][crate::model::dashboard_chart::visualization::Series::series_unique_value].
1788            ///
1789            /// # Example
1790            /// ```ignore,no_run
1791            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1792            /// let x = Series::new().set_series_unique_value("example");
1793            /// ```
1794            pub fn set_series_unique_value<T: std::convert::Into<std::string::String>>(
1795                mut self,
1796                v: T,
1797            ) -> Self {
1798                self.series_unique_value = v.into();
1799                self
1800            }
1801
1802            /// Sets the value of [area_style][crate::model::dashboard_chart::visualization::Series::area_style].
1803            ///
1804            /// # Example
1805            /// ```ignore,no_run
1806            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1807            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
1808            /// let x = Series::new().set_area_style(AreaStyle::default()/* use setters */);
1809            /// ```
1810            pub fn set_area_style<T>(mut self, v: T) -> Self
1811            where
1812                T: std::convert::Into<
1813                        crate::model::dashboard_chart::visualization::series::AreaStyle,
1814                    >,
1815            {
1816                self.area_style = std::option::Option::Some(v.into());
1817                self
1818            }
1819
1820            /// Sets or clears the value of [area_style][crate::model::dashboard_chart::visualization::Series::area_style].
1821            ///
1822            /// # Example
1823            /// ```ignore,no_run
1824            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1825            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
1826            /// let x = Series::new().set_or_clear_area_style(Some(AreaStyle::default()/* use setters */));
1827            /// let x = Series::new().set_or_clear_area_style(None::<AreaStyle>);
1828            /// ```
1829            pub fn set_or_clear_area_style<T>(mut self, v: std::option::Option<T>) -> Self
1830            where
1831                T: std::convert::Into<
1832                        crate::model::dashboard_chart::visualization::series::AreaStyle,
1833                    >,
1834            {
1835                self.area_style = v.map(|x| x.into());
1836                self
1837            }
1838
1839            /// Sets the value of [item_colors][crate::model::dashboard_chart::visualization::Series::item_colors].
1840            ///
1841            /// # Example
1842            /// ```ignore,no_run
1843            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1844            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemColors;
1845            /// let x = Series::new().set_item_colors(ItemColors::default()/* use setters */);
1846            /// ```
1847            pub fn set_item_colors<T>(mut self, v: T) -> Self
1848            where
1849                T: std::convert::Into<
1850                        crate::model::dashboard_chart::visualization::series::ItemColors,
1851                    >,
1852            {
1853                self.item_colors = std::option::Option::Some(v.into());
1854                self
1855            }
1856
1857            /// Sets or clears the value of [item_colors][crate::model::dashboard_chart::visualization::Series::item_colors].
1858            ///
1859            /// # Example
1860            /// ```ignore,no_run
1861            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1862            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemColors;
1863            /// let x = Series::new().set_or_clear_item_colors(Some(ItemColors::default()/* use setters */));
1864            /// let x = Series::new().set_or_clear_item_colors(None::<ItemColors>);
1865            /// ```
1866            pub fn set_or_clear_item_colors<T>(mut self, v: std::option::Option<T>) -> Self
1867            where
1868                T: std::convert::Into<
1869                        crate::model::dashboard_chart::visualization::series::ItemColors,
1870                    >,
1871            {
1872                self.item_colors = v.map(|x| x.into());
1873                self
1874            }
1875
1876            /// Sets the value of [gauge_config][crate::model::dashboard_chart::visualization::Series::gauge_config].
1877            ///
1878            /// # Example
1879            /// ```ignore,no_run
1880            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1881            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
1882            /// let x = Series::new().set_gauge_config(GaugeConfig::default()/* use setters */);
1883            /// ```
1884            pub fn set_gauge_config<T>(mut self, v: T) -> Self
1885            where
1886                T: std::convert::Into<
1887                        crate::model::dashboard_chart::visualization::series::GaugeConfig,
1888                    >,
1889            {
1890                self.gauge_config = std::option::Option::Some(v.into());
1891                self
1892            }
1893
1894            /// Sets or clears the value of [gauge_config][crate::model::dashboard_chart::visualization::Series::gauge_config].
1895            ///
1896            /// # Example
1897            /// ```ignore,no_run
1898            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1899            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
1900            /// let x = Series::new().set_or_clear_gauge_config(Some(GaugeConfig::default()/* use setters */));
1901            /// let x = Series::new().set_or_clear_gauge_config(None::<GaugeConfig>);
1902            /// ```
1903            pub fn set_or_clear_gauge_config<T>(mut self, v: std::option::Option<T>) -> Self
1904            where
1905                T: std::convert::Into<
1906                        crate::model::dashboard_chart::visualization::series::GaugeConfig,
1907                    >,
1908            {
1909                self.gauge_config = v.map(|x| x.into());
1910                self
1911            }
1912
1913            /// Sets the value of [metric_trend_config][crate::model::dashboard_chart::visualization::Series::metric_trend_config].
1914            ///
1915            /// # Example
1916            /// ```ignore,no_run
1917            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1918            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
1919            /// let x = Series::new().set_metric_trend_config(MetricTrendConfig::default()/* use setters */);
1920            /// ```
1921            pub fn set_metric_trend_config<T>(mut self, v: T) -> Self
1922            where
1923                T: std::convert::Into<
1924                        crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
1925                    >,
1926            {
1927                self.metric_trend_config = std::option::Option::Some(v.into());
1928                self
1929            }
1930
1931            /// Sets or clears the value of [metric_trend_config][crate::model::dashboard_chart::visualization::Series::metric_trend_config].
1932            ///
1933            /// # Example
1934            /// ```ignore,no_run
1935            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Series;
1936            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
1937            /// let x = Series::new().set_or_clear_metric_trend_config(Some(MetricTrendConfig::default()/* use setters */));
1938            /// let x = Series::new().set_or_clear_metric_trend_config(None::<MetricTrendConfig>);
1939            /// ```
1940            pub fn set_or_clear_metric_trend_config<T>(mut self, v: std::option::Option<T>) -> Self
1941            where
1942                T: std::convert::Into<
1943                        crate::model::dashboard_chart::visualization::series::MetricTrendConfig,
1944                    >,
1945            {
1946                self.metric_trend_config = v.map(|x| x.into());
1947                self
1948            }
1949        }
1950
1951        impl wkt::message::Message for Series {
1952            fn typename() -> &'static str {
1953                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series"
1954            }
1955        }
1956
1957        /// Defines additional types related to [Series].
1958        pub mod series {
1959            #[allow(unused_imports)]
1960            use super::*;
1961
1962            #[allow(missing_docs)]
1963            #[derive(Clone, Default, PartialEq)]
1964            #[non_exhaustive]
1965            pub struct Encode {
1966                #[allow(missing_docs)]
1967                pub x: std::string::String,
1968
1969                #[allow(missing_docs)]
1970                pub y: std::string::String,
1971
1972                /// For some type of series that are not in any coordinate system, like
1973                /// 'pie'
1974                pub value: std::string::String,
1975
1976                /// This is useful in charts like 'pie', where data item name can be
1977                /// displayed in legend.
1978                pub item_name: std::string::String,
1979
1980                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1981            }
1982
1983            impl Encode {
1984                /// Creates a new default instance.
1985                pub fn new() -> Self {
1986                    std::default::Default::default()
1987                }
1988
1989                /// Sets the value of [x][crate::model::dashboard_chart::visualization::series::Encode::x].
1990                ///
1991                /// # Example
1992                /// ```ignore,no_run
1993                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
1994                /// let x = Encode::new().set_x("example");
1995                /// ```
1996                pub fn set_x<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1997                    self.x = v.into();
1998                    self
1999                }
2000
2001                /// Sets the value of [y][crate::model::dashboard_chart::visualization::series::Encode::y].
2002                ///
2003                /// # Example
2004                /// ```ignore,no_run
2005                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
2006                /// let x = Encode::new().set_y("example");
2007                /// ```
2008                pub fn set_y<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2009                    self.y = v.into();
2010                    self
2011                }
2012
2013                /// Sets the value of [value][crate::model::dashboard_chart::visualization::series::Encode::value].
2014                ///
2015                /// # Example
2016                /// ```ignore,no_run
2017                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
2018                /// let x = Encode::new().set_value("example");
2019                /// ```
2020                pub fn set_value<T: std::convert::Into<std::string::String>>(
2021                    mut self,
2022                    v: T,
2023                ) -> Self {
2024                    self.value = v.into();
2025                    self
2026                }
2027
2028                /// Sets the value of [item_name][crate::model::dashboard_chart::visualization::series::Encode::item_name].
2029                ///
2030                /// # Example
2031                /// ```ignore,no_run
2032                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::Encode;
2033                /// let x = Encode::new().set_item_name("example");
2034                /// ```
2035                pub fn set_item_name<T: std::convert::Into<std::string::String>>(
2036                    mut self,
2037                    v: T,
2038                ) -> Self {
2039                    self.item_name = v.into();
2040                    self
2041                }
2042            }
2043
2044            impl wkt::message::Message for Encode {
2045                fn typename() -> &'static str {
2046                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode"
2047                }
2048            }
2049
2050            /// Data label config for a series.
2051            #[derive(Clone, Default, PartialEq)]
2052            #[non_exhaustive]
2053            pub struct DataLabel {
2054                /// Optional. Whether to show data label.
2055                pub show: bool,
2056
2057                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2058            }
2059
2060            impl DataLabel {
2061                /// Creates a new default instance.
2062                pub fn new() -> Self {
2063                    std::default::Default::default()
2064                }
2065
2066                /// Sets the value of [show][crate::model::dashboard_chart::visualization::series::DataLabel::show].
2067                ///
2068                /// # Example
2069                /// ```ignore,no_run
2070                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::DataLabel;
2071                /// let x = DataLabel::new().set_show(true);
2072                /// ```
2073                pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2074                    self.show = v.into();
2075                    self
2076                }
2077            }
2078
2079            impl wkt::message::Message for DataLabel {
2080                fn typename() -> &'static str {
2081                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel"
2082                }
2083            }
2084
2085            /// Custom styling for chart
2086            #[derive(Clone, Default, PartialEq)]
2087            #[non_exhaustive]
2088            pub struct ItemStyle {
2089                /// Optional. Used to add border width
2090                pub border_width: i32,
2091
2092                /// Optional. Used to add border color
2093                pub border_color: std::string::String,
2094
2095                /// Optional. Used to add color
2096                pub color: std::string::String,
2097
2098                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2099            }
2100
2101            impl ItemStyle {
2102                /// Creates a new default instance.
2103                pub fn new() -> Self {
2104                    std::default::Default::default()
2105                }
2106
2107                /// Sets the value of [border_width][crate::model::dashboard_chart::visualization::series::ItemStyle::border_width].
2108                ///
2109                /// # Example
2110                /// ```ignore,no_run
2111                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemStyle;
2112                /// let x = ItemStyle::new().set_border_width(42);
2113                /// ```
2114                pub fn set_border_width<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2115                    self.border_width = v.into();
2116                    self
2117                }
2118
2119                /// Sets the value of [border_color][crate::model::dashboard_chart::visualization::series::ItemStyle::border_color].
2120                ///
2121                /// # Example
2122                /// ```ignore,no_run
2123                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemStyle;
2124                /// let x = ItemStyle::new().set_border_color("example");
2125                /// ```
2126                pub fn set_border_color<T: std::convert::Into<std::string::String>>(
2127                    mut self,
2128                    v: T,
2129                ) -> Self {
2130                    self.border_color = v.into();
2131                    self
2132                }
2133
2134                /// Sets the value of [color][crate::model::dashboard_chart::visualization::series::ItemStyle::color].
2135                ///
2136                /// # Example
2137                /// ```ignore,no_run
2138                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemStyle;
2139                /// let x = ItemStyle::new().set_color("example");
2140                /// ```
2141                pub fn set_color<T: std::convert::Into<std::string::String>>(
2142                    mut self,
2143                    v: T,
2144                ) -> Self {
2145                    self.color = v.into();
2146                    self
2147                }
2148            }
2149
2150            impl wkt::message::Message for ItemStyle {
2151                fn typename() -> &'static str {
2152                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle"
2153                }
2154            }
2155
2156            /// Custom styling for area chart
2157            #[derive(Clone, Default, PartialEq)]
2158            #[non_exhaustive]
2159            pub struct AreaStyle {
2160                /// Optional. Used to add color
2161                pub color: std::string::String,
2162
2163                /// Optional. Used to add origin
2164                pub origin: std::string::String,
2165
2166                /// Optional. Used to add shadow blur
2167                pub shadow_blur: i32,
2168
2169                /// Optional. Used to add shadow color
2170                pub shadow_color: std::string::String,
2171
2172                /// Optional. Used to add shadow offsetX
2173                pub shadow_offset_x: i32,
2174
2175                /// Optional. Used to add shadow offsetY
2176                pub shadow_offset_y: i32,
2177
2178                /// Optional. Used to add opacity
2179                pub opacity: i32,
2180
2181                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2182            }
2183
2184            impl AreaStyle {
2185                /// Creates a new default instance.
2186                pub fn new() -> Self {
2187                    std::default::Default::default()
2188                }
2189
2190                /// Sets the value of [color][crate::model::dashboard_chart::visualization::series::AreaStyle::color].
2191                ///
2192                /// # Example
2193                /// ```ignore,no_run
2194                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2195                /// let x = AreaStyle::new().set_color("example");
2196                /// ```
2197                pub fn set_color<T: std::convert::Into<std::string::String>>(
2198                    mut self,
2199                    v: T,
2200                ) -> Self {
2201                    self.color = v.into();
2202                    self
2203                }
2204
2205                /// Sets the value of [origin][crate::model::dashboard_chart::visualization::series::AreaStyle::origin].
2206                ///
2207                /// # Example
2208                /// ```ignore,no_run
2209                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2210                /// let x = AreaStyle::new().set_origin("example");
2211                /// ```
2212                pub fn set_origin<T: std::convert::Into<std::string::String>>(
2213                    mut self,
2214                    v: T,
2215                ) -> Self {
2216                    self.origin = v.into();
2217                    self
2218                }
2219
2220                /// Sets the value of [shadow_blur][crate::model::dashboard_chart::visualization::series::AreaStyle::shadow_blur].
2221                ///
2222                /// # Example
2223                /// ```ignore,no_run
2224                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2225                /// let x = AreaStyle::new().set_shadow_blur(42);
2226                /// ```
2227                pub fn set_shadow_blur<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2228                    self.shadow_blur = v.into();
2229                    self
2230                }
2231
2232                /// Sets the value of [shadow_color][crate::model::dashboard_chart::visualization::series::AreaStyle::shadow_color].
2233                ///
2234                /// # Example
2235                /// ```ignore,no_run
2236                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2237                /// let x = AreaStyle::new().set_shadow_color("example");
2238                /// ```
2239                pub fn set_shadow_color<T: std::convert::Into<std::string::String>>(
2240                    mut self,
2241                    v: T,
2242                ) -> Self {
2243                    self.shadow_color = v.into();
2244                    self
2245                }
2246
2247                /// Sets the value of [shadow_offset_x][crate::model::dashboard_chart::visualization::series::AreaStyle::shadow_offset_x].
2248                ///
2249                /// # Example
2250                /// ```ignore,no_run
2251                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2252                /// let x = AreaStyle::new().set_shadow_offset_x(42);
2253                /// ```
2254                pub fn set_shadow_offset_x<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2255                    self.shadow_offset_x = v.into();
2256                    self
2257                }
2258
2259                /// Sets the value of [shadow_offset_y][crate::model::dashboard_chart::visualization::series::AreaStyle::shadow_offset_y].
2260                ///
2261                /// # Example
2262                /// ```ignore,no_run
2263                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2264                /// let x = AreaStyle::new().set_shadow_offset_y(42);
2265                /// ```
2266                pub fn set_shadow_offset_y<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2267                    self.shadow_offset_y = v.into();
2268                    self
2269                }
2270
2271                /// Sets the value of [opacity][crate::model::dashboard_chart::visualization::series::AreaStyle::opacity].
2272                ///
2273                /// # Example
2274                /// ```ignore,no_run
2275                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::AreaStyle;
2276                /// let x = AreaStyle::new().set_opacity(42);
2277                /// ```
2278                pub fn set_opacity<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2279                    self.opacity = v.into();
2280                    self
2281                }
2282            }
2283
2284            impl wkt::message::Message for AreaStyle {
2285                fn typename() -> &'static str {
2286                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle"
2287                }
2288            }
2289
2290            /// User selected color and label for the slice of the chart
2291            #[derive(Clone, Default, PartialEq)]
2292            #[non_exhaustive]
2293            pub struct UserSelectedValues {
2294                /// Optional. User specified color of a pie slice
2295                pub color: std::string::String,
2296
2297                /// Optional. User specified label for a pie slice
2298                pub label: std::string::String,
2299
2300                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2301            }
2302
2303            impl UserSelectedValues {
2304                /// Creates a new default instance.
2305                pub fn new() -> Self {
2306                    std::default::Default::default()
2307                }
2308
2309                /// Sets the value of [color][crate::model::dashboard_chart::visualization::series::UserSelectedValues::color].
2310                ///
2311                /// # Example
2312                /// ```ignore,no_run
2313                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::UserSelectedValues;
2314                /// let x = UserSelectedValues::new().set_color("example");
2315                /// ```
2316                pub fn set_color<T: std::convert::Into<std::string::String>>(
2317                    mut self,
2318                    v: T,
2319                ) -> Self {
2320                    self.color = v.into();
2321                    self
2322                }
2323
2324                /// Sets the value of [label][crate::model::dashboard_chart::visualization::series::UserSelectedValues::label].
2325                ///
2326                /// # Example
2327                /// ```ignore,no_run
2328                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::UserSelectedValues;
2329                /// let x = UserSelectedValues::new().set_label("example");
2330                /// ```
2331                pub fn set_label<T: std::convert::Into<std::string::String>>(
2332                    mut self,
2333                    v: T,
2334                ) -> Self {
2335                    self.label = v.into();
2336                    self
2337                }
2338            }
2339
2340            impl wkt::message::Message for UserSelectedValues {
2341                fn typename() -> &'static str {
2342                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues"
2343                }
2344            }
2345
2346            /// Slice containing the key and value for a slice in the chart
2347            #[derive(Clone, Default, PartialEq)]
2348            #[non_exhaustive]
2349            pub struct ChartSliceColor {
2350                /// Optional. Key for the slice
2351                pub key: std::string::String,
2352
2353                /// Optional. Value for the slice
2354                pub value: std::option::Option<
2355                    crate::model::dashboard_chart::visualization::series::UserSelectedValues,
2356                >,
2357
2358                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2359            }
2360
2361            impl ChartSliceColor {
2362                /// Creates a new default instance.
2363                pub fn new() -> Self {
2364                    std::default::Default::default()
2365                }
2366
2367                /// Sets the value of [key][crate::model::dashboard_chart::visualization::series::ChartSliceColor::key].
2368                ///
2369                /// # Example
2370                /// ```ignore,no_run
2371                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ChartSliceColor;
2372                /// let x = ChartSliceColor::new().set_key("example");
2373                /// ```
2374                pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2375                    self.key = v.into();
2376                    self
2377                }
2378
2379                /// Sets the value of [value][crate::model::dashboard_chart::visualization::series::ChartSliceColor::value].
2380                ///
2381                /// # Example
2382                /// ```ignore,no_run
2383                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ChartSliceColor;
2384                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::UserSelectedValues;
2385                /// let x = ChartSliceColor::new().set_value(UserSelectedValues::default()/* use setters */);
2386                /// ```
2387                pub fn set_value<T>(mut self, v: T) -> Self
2388                where T: std::convert::Into<crate::model::dashboard_chart::visualization::series::UserSelectedValues>
2389                {
2390                    self.value = std::option::Option::Some(v.into());
2391                    self
2392                }
2393
2394                /// Sets or clears the value of [value][crate::model::dashboard_chart::visualization::series::ChartSliceColor::value].
2395                ///
2396                /// # Example
2397                /// ```ignore,no_run
2398                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ChartSliceColor;
2399                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::UserSelectedValues;
2400                /// let x = ChartSliceColor::new().set_or_clear_value(Some(UserSelectedValues::default()/* use setters */));
2401                /// let x = ChartSliceColor::new().set_or_clear_value(None::<UserSelectedValues>);
2402                /// ```
2403                pub fn set_or_clear_value<T>(mut self, v: std::option::Option<T>) -> Self
2404                where T: std::convert::Into<crate::model::dashboard_chart::visualization::series::UserSelectedValues>
2405                {
2406                    self.value = v.map(|x| x.into());
2407                    self
2408                }
2409            }
2410
2411            impl wkt::message::Message for ChartSliceColor {
2412                fn typename() -> &'static str {
2413                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor"
2414                }
2415            }
2416
2417            /// Field to be saved for retrieving slice colors for the chart
2418            #[derive(Clone, Default, PartialEq)]
2419            #[non_exhaustive]
2420            pub struct ItemColors {
2421                /// Optional. Slice colors array
2422                pub colors: std::vec::Vec<
2423                    crate::model::dashboard_chart::visualization::series::ChartSliceColor,
2424                >,
2425
2426                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2427            }
2428
2429            impl ItemColors {
2430                /// Creates a new default instance.
2431                pub fn new() -> Self {
2432                    std::default::Default::default()
2433                }
2434
2435                /// Sets the value of [colors][crate::model::dashboard_chart::visualization::series::ItemColors::colors].
2436                ///
2437                /// # Example
2438                /// ```ignore,no_run
2439                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ItemColors;
2440                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::ChartSliceColor;
2441                /// let x = ItemColors::new()
2442                ///     .set_colors([
2443                ///         ChartSliceColor::default()/* use setters */,
2444                ///         ChartSliceColor::default()/* use (different) setters */,
2445                ///     ]);
2446                /// ```
2447                pub fn set_colors<T, V>(mut self, v: T) -> Self
2448                where
2449                    T: std::iter::IntoIterator<Item = V>,
2450                    V: std::convert::Into<
2451                            crate::model::dashboard_chart::visualization::series::ChartSliceColor,
2452                        >,
2453                {
2454                    use std::iter::Iterator;
2455                    self.colors = v.into_iter().map(|i| i.into()).collect();
2456                    self
2457                }
2458            }
2459
2460            impl wkt::message::Message for ItemColors {
2461                fn typename() -> &'static str {
2462                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors"
2463                }
2464            }
2465
2466            /// Field to be saved for retrieving value and color for gauge chart
2467            #[derive(Clone, Default, PartialEq)]
2468            #[non_exhaustive]
2469            pub struct GaugeValue {
2470                /// Optional. Value for gauge chart
2471                pub value: i32,
2472
2473                /// Optional. Color for gauge chart
2474                pub color: std::string::String,
2475
2476                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2477            }
2478
2479            impl GaugeValue {
2480                /// Creates a new default instance.
2481                pub fn new() -> Self {
2482                    std::default::Default::default()
2483                }
2484
2485                /// Sets the value of [value][crate::model::dashboard_chart::visualization::series::GaugeValue::value].
2486                ///
2487                /// # Example
2488                /// ```ignore,no_run
2489                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2490                /// let x = GaugeValue::new().set_value(42);
2491                /// ```
2492                pub fn set_value<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2493                    self.value = v.into();
2494                    self
2495                }
2496
2497                /// Sets the value of [color][crate::model::dashboard_chart::visualization::series::GaugeValue::color].
2498                ///
2499                /// # Example
2500                /// ```ignore,no_run
2501                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2502                /// let x = GaugeValue::new().set_color("example");
2503                /// ```
2504                pub fn set_color<T: std::convert::Into<std::string::String>>(
2505                    mut self,
2506                    v: T,
2507                ) -> Self {
2508                    self.color = v.into();
2509                    self
2510                }
2511            }
2512
2513            impl wkt::message::Message for GaugeValue {
2514                fn typename() -> &'static str {
2515                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue"
2516                }
2517            }
2518
2519            /// Field to be saved for retrieving value and color for gauge chart
2520            #[derive(Clone, Default, PartialEq)]
2521            #[non_exhaustive]
2522            pub struct GaugeConfig {
2523                /// Optional. Base value for gauge chart
2524                pub base_value: std::option::Option<
2525                    crate::model::dashboard_chart::visualization::series::GaugeValue,
2526                >,
2527
2528                /// Optional. Limit value for gauge chart
2529                pub limit_value: std::option::Option<
2530                    crate::model::dashboard_chart::visualization::series::GaugeValue,
2531                >,
2532
2533                /// Optional. Threshold values for gauge chart
2534                pub threshold_values:
2535                    std::vec::Vec<crate::model::dashboard_chart::visualization::series::GaugeValue>,
2536
2537                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2538            }
2539
2540            impl GaugeConfig {
2541                /// Creates a new default instance.
2542                pub fn new() -> Self {
2543                    std::default::Default::default()
2544                }
2545
2546                /// Sets the value of [base_value][crate::model::dashboard_chart::visualization::series::GaugeConfig::base_value].
2547                ///
2548                /// # Example
2549                /// ```ignore,no_run
2550                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
2551                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2552                /// let x = GaugeConfig::new().set_base_value(GaugeValue::default()/* use setters */);
2553                /// ```
2554                pub fn set_base_value<T>(mut self, v: T) -> Self
2555                where
2556                    T: std::convert::Into<
2557                            crate::model::dashboard_chart::visualization::series::GaugeValue,
2558                        >,
2559                {
2560                    self.base_value = std::option::Option::Some(v.into());
2561                    self
2562                }
2563
2564                /// Sets or clears the value of [base_value][crate::model::dashboard_chart::visualization::series::GaugeConfig::base_value].
2565                ///
2566                /// # Example
2567                /// ```ignore,no_run
2568                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
2569                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2570                /// let x = GaugeConfig::new().set_or_clear_base_value(Some(GaugeValue::default()/* use setters */));
2571                /// let x = GaugeConfig::new().set_or_clear_base_value(None::<GaugeValue>);
2572                /// ```
2573                pub fn set_or_clear_base_value<T>(mut self, v: std::option::Option<T>) -> Self
2574                where
2575                    T: std::convert::Into<
2576                            crate::model::dashboard_chart::visualization::series::GaugeValue,
2577                        >,
2578                {
2579                    self.base_value = v.map(|x| x.into());
2580                    self
2581                }
2582
2583                /// Sets the value of [limit_value][crate::model::dashboard_chart::visualization::series::GaugeConfig::limit_value].
2584                ///
2585                /// # Example
2586                /// ```ignore,no_run
2587                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
2588                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2589                /// let x = GaugeConfig::new().set_limit_value(GaugeValue::default()/* use setters */);
2590                /// ```
2591                pub fn set_limit_value<T>(mut self, v: T) -> Self
2592                where
2593                    T: std::convert::Into<
2594                            crate::model::dashboard_chart::visualization::series::GaugeValue,
2595                        >,
2596                {
2597                    self.limit_value = std::option::Option::Some(v.into());
2598                    self
2599                }
2600
2601                /// Sets or clears the value of [limit_value][crate::model::dashboard_chart::visualization::series::GaugeConfig::limit_value].
2602                ///
2603                /// # Example
2604                /// ```ignore,no_run
2605                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
2606                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2607                /// let x = GaugeConfig::new().set_or_clear_limit_value(Some(GaugeValue::default()/* use setters */));
2608                /// let x = GaugeConfig::new().set_or_clear_limit_value(None::<GaugeValue>);
2609                /// ```
2610                pub fn set_or_clear_limit_value<T>(mut self, v: std::option::Option<T>) -> Self
2611                where
2612                    T: std::convert::Into<
2613                            crate::model::dashboard_chart::visualization::series::GaugeValue,
2614                        >,
2615                {
2616                    self.limit_value = v.map(|x| x.into());
2617                    self
2618                }
2619
2620                /// Sets the value of [threshold_values][crate::model::dashboard_chart::visualization::series::GaugeConfig::threshold_values].
2621                ///
2622                /// # Example
2623                /// ```ignore,no_run
2624                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeConfig;
2625                /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::GaugeValue;
2626                /// let x = GaugeConfig::new()
2627                ///     .set_threshold_values([
2628                ///         GaugeValue::default()/* use setters */,
2629                ///         GaugeValue::default()/* use (different) setters */,
2630                ///     ]);
2631                /// ```
2632                pub fn set_threshold_values<T, V>(mut self, v: T) -> Self
2633                where
2634                    T: std::iter::IntoIterator<Item = V>,
2635                    V: std::convert::Into<
2636                            crate::model::dashboard_chart::visualization::series::GaugeValue,
2637                        >,
2638                {
2639                    use std::iter::Iterator;
2640                    self.threshold_values = v.into_iter().map(|i| i.into()).collect();
2641                    self
2642                }
2643            }
2644
2645            impl wkt::message::Message for GaugeConfig {
2646                fn typename() -> &'static str {
2647                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig"
2648                }
2649            }
2650
2651            /// Metric trend config for displaying trend value in Metrics chart
2652            #[derive(Clone, Default, PartialEq)]
2653            #[non_exhaustive]
2654            pub struct MetricTrendConfig {
2655                /// Optional. Metric chart configuration to display metric trend
2656                pub metric_format: crate::model::MetricFormat,
2657
2658                /// Optional. Metric chart configuration to toggle the trend value
2659                /// display
2660                pub show_metric_trend: bool,
2661
2662                /// Optional. Metric chart configuration to display the trend value
2663                pub metric_display_trend: crate::model::MetricDisplayTrend,
2664
2665                /// Optional. Metric chart configuration to display trend type whether
2666                /// regular or inverse
2667                pub metric_trend_type: crate::model::MetricTrendType,
2668
2669                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2670            }
2671
2672            impl MetricTrendConfig {
2673                /// Creates a new default instance.
2674                pub fn new() -> Self {
2675                    std::default::Default::default()
2676                }
2677
2678                /// Sets the value of [metric_format][crate::model::dashboard_chart::visualization::series::MetricTrendConfig::metric_format].
2679                ///
2680                /// # Example
2681                /// ```ignore,no_run
2682                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
2683                /// use google_cloud_chronicle_v1::model::MetricFormat;
2684                /// let x0 = MetricTrendConfig::new().set_metric_format(MetricFormat::Number);
2685                /// let x1 = MetricTrendConfig::new().set_metric_format(MetricFormat::PlainText);
2686                /// ```
2687                pub fn set_metric_format<T: std::convert::Into<crate::model::MetricFormat>>(
2688                    mut self,
2689                    v: T,
2690                ) -> Self {
2691                    self.metric_format = v.into();
2692                    self
2693                }
2694
2695                /// Sets the value of [show_metric_trend][crate::model::dashboard_chart::visualization::series::MetricTrendConfig::show_metric_trend].
2696                ///
2697                /// # Example
2698                /// ```ignore,no_run
2699                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
2700                /// let x = MetricTrendConfig::new().set_show_metric_trend(true);
2701                /// ```
2702                pub fn set_show_metric_trend<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2703                    self.show_metric_trend = v.into();
2704                    self
2705                }
2706
2707                /// Sets the value of [metric_display_trend][crate::model::dashboard_chart::visualization::series::MetricTrendConfig::metric_display_trend].
2708                ///
2709                /// # Example
2710                /// ```ignore,no_run
2711                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
2712                /// use google_cloud_chronicle_v1::model::MetricDisplayTrend;
2713                /// let x0 = MetricTrendConfig::new().set_metric_display_trend(MetricDisplayTrend::AbsoluteValue);
2714                /// let x1 = MetricTrendConfig::new().set_metric_display_trend(MetricDisplayTrend::Percentage);
2715                /// let x2 = MetricTrendConfig::new().set_metric_display_trend(MetricDisplayTrend::AbsoluteValueAndPercentage);
2716                /// ```
2717                pub fn set_metric_display_trend<
2718                    T: std::convert::Into<crate::model::MetricDisplayTrend>,
2719                >(
2720                    mut self,
2721                    v: T,
2722                ) -> Self {
2723                    self.metric_display_trend = v.into();
2724                    self
2725                }
2726
2727                /// Sets the value of [metric_trend_type][crate::model::dashboard_chart::visualization::series::MetricTrendConfig::metric_trend_type].
2728                ///
2729                /// # Example
2730                /// ```ignore,no_run
2731                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::series::MetricTrendConfig;
2732                /// use google_cloud_chronicle_v1::model::MetricTrendType;
2733                /// let x0 = MetricTrendConfig::new().set_metric_trend_type(MetricTrendType::Regular);
2734                /// let x1 = MetricTrendConfig::new().set_metric_trend_type(MetricTrendType::Inverse);
2735                /// ```
2736                pub fn set_metric_trend_type<
2737                    T: std::convert::Into<crate::model::MetricTrendType>,
2738                >(
2739                    mut self,
2740                    v: T,
2741                ) -> Self {
2742                    self.metric_trend_type = v.into();
2743                    self
2744                }
2745            }
2746
2747            impl wkt::message::Message for MetricTrendConfig {
2748                fn typename() -> &'static str {
2749                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig"
2750                }
2751            }
2752        }
2753
2754        #[allow(missing_docs)]
2755        #[derive(Clone, Default, PartialEq)]
2756        #[non_exhaustive]
2757        pub struct Tooltip {
2758            #[allow(missing_docs)]
2759            pub show: bool,
2760
2761            #[allow(missing_docs)]
2762            pub tooltip_trigger: crate::model::ToolTipTrigger,
2763
2764            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2765        }
2766
2767        impl Tooltip {
2768            /// Creates a new default instance.
2769            pub fn new() -> Self {
2770                std::default::Default::default()
2771            }
2772
2773            /// Sets the value of [show][crate::model::dashboard_chart::visualization::Tooltip::show].
2774            ///
2775            /// # Example
2776            /// ```ignore,no_run
2777            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Tooltip;
2778            /// let x = Tooltip::new().set_show(true);
2779            /// ```
2780            pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2781                self.show = v.into();
2782                self
2783            }
2784
2785            /// Sets the value of [tooltip_trigger][crate::model::dashboard_chart::visualization::Tooltip::tooltip_trigger].
2786            ///
2787            /// # Example
2788            /// ```ignore,no_run
2789            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Tooltip;
2790            /// use google_cloud_chronicle_v1::model::ToolTipTrigger;
2791            /// let x0 = Tooltip::new().set_tooltip_trigger(ToolTipTrigger::TooltipTriggerNone);
2792            /// let x1 = Tooltip::new().set_tooltip_trigger(ToolTipTrigger::TooltipTriggerItem);
2793            /// let x2 = Tooltip::new().set_tooltip_trigger(ToolTipTrigger::TooltipTriggerAxis);
2794            /// ```
2795            pub fn set_tooltip_trigger<T: std::convert::Into<crate::model::ToolTipTrigger>>(
2796                mut self,
2797                v: T,
2798            ) -> Self {
2799                self.tooltip_trigger = v.into();
2800                self
2801            }
2802        }
2803
2804        impl wkt::message::Message for Tooltip {
2805            fn typename() -> &'static str {
2806                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip"
2807            }
2808        }
2809
2810        #[allow(missing_docs)]
2811        #[derive(Clone, Default, PartialEq)]
2812        #[non_exhaustive]
2813        pub struct Legend {
2814            #[allow(missing_docs)]
2815            pub id: std::string::String,
2816
2817            #[allow(missing_docs)]
2818            pub show: bool,
2819
2820            #[allow(missing_docs)]
2821            pub z_level: i32,
2822
2823            #[allow(missing_docs)]
2824            pub z: i32,
2825
2826            #[allow(missing_docs)]
2827            pub left: i32,
2828
2829            #[allow(missing_docs)]
2830            pub top: i32,
2831
2832            #[allow(missing_docs)]
2833            pub right: i32,
2834
2835            #[allow(missing_docs)]
2836            pub bottom: i32,
2837
2838            #[allow(missing_docs)]
2839            pub legend_orient: crate::model::LegendOrient,
2840
2841            #[allow(missing_docs)]
2842            pub legend_align: crate::model::LegendAlign,
2843
2844            #[allow(missing_docs)]
2845            pub padding: std::vec::Vec<i32>,
2846
2847            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2848        }
2849
2850        impl Legend {
2851            /// Creates a new default instance.
2852            pub fn new() -> Self {
2853                std::default::Default::default()
2854            }
2855
2856            /// Sets the value of [id][crate::model::dashboard_chart::visualization::Legend::id].
2857            ///
2858            /// # Example
2859            /// ```ignore,no_run
2860            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2861            /// let x = Legend::new().set_id("example");
2862            /// ```
2863            pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2864                self.id = v.into();
2865                self
2866            }
2867
2868            /// Sets the value of [show][crate::model::dashboard_chart::visualization::Legend::show].
2869            ///
2870            /// # Example
2871            /// ```ignore,no_run
2872            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2873            /// let x = Legend::new().set_show(true);
2874            /// ```
2875            pub fn set_show<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2876                self.show = v.into();
2877                self
2878            }
2879
2880            /// Sets the value of [z_level][crate::model::dashboard_chart::visualization::Legend::z_level].
2881            ///
2882            /// # Example
2883            /// ```ignore,no_run
2884            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2885            /// let x = Legend::new().set_z_level(42);
2886            /// ```
2887            pub fn set_z_level<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2888                self.z_level = v.into();
2889                self
2890            }
2891
2892            /// Sets the value of [z][crate::model::dashboard_chart::visualization::Legend::z].
2893            ///
2894            /// # Example
2895            /// ```ignore,no_run
2896            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2897            /// let x = Legend::new().set_z(42);
2898            /// ```
2899            pub fn set_z<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2900                self.z = v.into();
2901                self
2902            }
2903
2904            /// Sets the value of [left][crate::model::dashboard_chart::visualization::Legend::left].
2905            ///
2906            /// # Example
2907            /// ```ignore,no_run
2908            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2909            /// let x = Legend::new().set_left(42);
2910            /// ```
2911            pub fn set_left<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2912                self.left = v.into();
2913                self
2914            }
2915
2916            /// Sets the value of [top][crate::model::dashboard_chart::visualization::Legend::top].
2917            ///
2918            /// # Example
2919            /// ```ignore,no_run
2920            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2921            /// let x = Legend::new().set_top(42);
2922            /// ```
2923            pub fn set_top<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2924                self.top = v.into();
2925                self
2926            }
2927
2928            /// Sets the value of [right][crate::model::dashboard_chart::visualization::Legend::right].
2929            ///
2930            /// # Example
2931            /// ```ignore,no_run
2932            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2933            /// let x = Legend::new().set_right(42);
2934            /// ```
2935            pub fn set_right<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2936                self.right = v.into();
2937                self
2938            }
2939
2940            /// Sets the value of [bottom][crate::model::dashboard_chart::visualization::Legend::bottom].
2941            ///
2942            /// # Example
2943            /// ```ignore,no_run
2944            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2945            /// let x = Legend::new().set_bottom(42);
2946            /// ```
2947            pub fn set_bottom<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2948                self.bottom = v.into();
2949                self
2950            }
2951
2952            /// Sets the value of [legend_orient][crate::model::dashboard_chart::visualization::Legend::legend_orient].
2953            ///
2954            /// # Example
2955            /// ```ignore,no_run
2956            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2957            /// use google_cloud_chronicle_v1::model::LegendOrient;
2958            /// let x0 = Legend::new().set_legend_orient(LegendOrient::Vertical);
2959            /// let x1 = Legend::new().set_legend_orient(LegendOrient::Horizontal);
2960            /// ```
2961            pub fn set_legend_orient<T: std::convert::Into<crate::model::LegendOrient>>(
2962                mut self,
2963                v: T,
2964            ) -> Self {
2965                self.legend_orient = v.into();
2966                self
2967            }
2968
2969            /// Sets the value of [legend_align][crate::model::dashboard_chart::visualization::Legend::legend_align].
2970            ///
2971            /// # Example
2972            /// ```ignore,no_run
2973            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2974            /// use google_cloud_chronicle_v1::model::LegendAlign;
2975            /// let x0 = Legend::new().set_legend_align(LegendAlign::Auto);
2976            /// let x1 = Legend::new().set_legend_align(LegendAlign::Left);
2977            /// let x2 = Legend::new().set_legend_align(LegendAlign::Right);
2978            /// ```
2979            pub fn set_legend_align<T: std::convert::Into<crate::model::LegendAlign>>(
2980                mut self,
2981                v: T,
2982            ) -> Self {
2983                self.legend_align = v.into();
2984                self
2985            }
2986
2987            /// Sets the value of [padding][crate::model::dashboard_chart::visualization::Legend::padding].
2988            ///
2989            /// # Example
2990            /// ```ignore,no_run
2991            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::Legend;
2992            /// let x = Legend::new().set_padding([1, 2, 3]);
2993            /// ```
2994            pub fn set_padding<T, V>(mut self, v: T) -> Self
2995            where
2996                T: std::iter::IntoIterator<Item = V>,
2997                V: std::convert::Into<i32>,
2998            {
2999                use std::iter::Iterator;
3000                self.padding = v.into_iter().map(|i| i.into()).collect();
3001                self
3002            }
3003        }
3004
3005        impl wkt::message::Message for Legend {
3006            fn typename() -> &'static str {
3007                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.Legend"
3008            }
3009        }
3010
3011        /// Column Definition.
3012        #[derive(Clone, Default, PartialEq)]
3013        #[non_exhaustive]
3014        pub struct ColumnDef {
3015            /// Field key in data.
3016            pub field: std::string::String,
3017
3018            /// Header name for column.
3019            pub header: std::string::String,
3020
3021            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3022        }
3023
3024        impl ColumnDef {
3025            /// Creates a new default instance.
3026            pub fn new() -> Self {
3027                std::default::Default::default()
3028            }
3029
3030            /// Sets the value of [field][crate::model::dashboard_chart::visualization::ColumnDef::field].
3031            ///
3032            /// # Example
3033            /// ```ignore,no_run
3034            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnDef;
3035            /// let x = ColumnDef::new().set_field("example");
3036            /// ```
3037            pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3038                self.field = v.into();
3039                self
3040            }
3041
3042            /// Sets the value of [header][crate::model::dashboard_chart::visualization::ColumnDef::header].
3043            ///
3044            /// # Example
3045            /// ```ignore,no_run
3046            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnDef;
3047            /// let x = ColumnDef::new().set_header("example");
3048            /// ```
3049            pub fn set_header<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3050                self.header = v.into();
3051                self
3052            }
3053        }
3054
3055        impl wkt::message::Message for ColumnDef {
3056            fn typename() -> &'static str {
3057                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef"
3058            }
3059        }
3060
3061        /// Column render type settings. This is used to determine the data render
3062        /// type of the column in the table.
3063        #[derive(Clone, Default, PartialEq)]
3064        #[non_exhaustive]
3065        pub struct ColumnRenderTypeSettings {
3066            /// Optional. Field key in data.
3067            pub field: std::string::String,
3068
3069            /// Optional. Column render type.
3070            pub column_render_type: crate::model::RenderType,
3071
3072            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3073        }
3074
3075        impl ColumnRenderTypeSettings {
3076            /// Creates a new default instance.
3077            pub fn new() -> Self {
3078                std::default::Default::default()
3079            }
3080
3081            /// Sets the value of [field][crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings::field].
3082            ///
3083            /// # Example
3084            /// ```ignore,no_run
3085            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnRenderTypeSettings;
3086            /// let x = ColumnRenderTypeSettings::new().set_field("example");
3087            /// ```
3088            pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3089                self.field = v.into();
3090                self
3091            }
3092
3093            /// Sets the value of [column_render_type][crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings::column_render_type].
3094            ///
3095            /// # Example
3096            /// ```ignore,no_run
3097            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnRenderTypeSettings;
3098            /// use google_cloud_chronicle_v1::model::RenderType;
3099            /// let x0 = ColumnRenderTypeSettings::new().set_column_render_type(RenderType::Text);
3100            /// let x1 = ColumnRenderTypeSettings::new().set_column_render_type(RenderType::Icon);
3101            /// let x2 = ColumnRenderTypeSettings::new().set_column_render_type(RenderType::IconAndText);
3102            /// ```
3103            pub fn set_column_render_type<T: std::convert::Into<crate::model::RenderType>>(
3104                mut self,
3105                v: T,
3106            ) -> Self {
3107                self.column_render_type = v.into();
3108                self
3109            }
3110        }
3111
3112        impl wkt::message::Message for ColumnRenderTypeSettings {
3113            fn typename() -> &'static str {
3114                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings"
3115            }
3116        }
3117
3118        /// Settings for tooltip for column header and cell.
3119        #[derive(Clone, Default, PartialEq)]
3120        #[non_exhaustive]
3121        pub struct ColumnTooltipSettings {
3122            /// Required. Field key in data.
3123            pub field: std::string::String,
3124
3125            /// Optional. Column header tooltip text.
3126            pub header_tooltip_text: std::string::String,
3127
3128            /// Optional. Column cell tooltip text.
3129            pub cell_tooltip_text: std::string::String,
3130
3131            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3132        }
3133
3134        impl ColumnTooltipSettings {
3135            /// Creates a new default instance.
3136            pub fn new() -> Self {
3137                std::default::Default::default()
3138            }
3139
3140            /// Sets the value of [field][crate::model::dashboard_chart::visualization::ColumnTooltipSettings::field].
3141            ///
3142            /// # Example
3143            /// ```ignore,no_run
3144            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnTooltipSettings;
3145            /// let x = ColumnTooltipSettings::new().set_field("example");
3146            /// ```
3147            pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3148                self.field = v.into();
3149                self
3150            }
3151
3152            /// Sets the value of [header_tooltip_text][crate::model::dashboard_chart::visualization::ColumnTooltipSettings::header_tooltip_text].
3153            ///
3154            /// # Example
3155            /// ```ignore,no_run
3156            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnTooltipSettings;
3157            /// let x = ColumnTooltipSettings::new().set_header_tooltip_text("example");
3158            /// ```
3159            pub fn set_header_tooltip_text<T: std::convert::Into<std::string::String>>(
3160                mut self,
3161                v: T,
3162            ) -> Self {
3163                self.header_tooltip_text = v.into();
3164                self
3165            }
3166
3167            /// Sets the value of [cell_tooltip_text][crate::model::dashboard_chart::visualization::ColumnTooltipSettings::cell_tooltip_text].
3168            ///
3169            /// # Example
3170            /// ```ignore,no_run
3171            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnTooltipSettings;
3172            /// let x = ColumnTooltipSettings::new().set_cell_tooltip_text("example");
3173            /// ```
3174            pub fn set_cell_tooltip_text<T: std::convert::Into<std::string::String>>(
3175                mut self,
3176                v: T,
3177            ) -> Self {
3178                self.cell_tooltip_text = v.into();
3179                self
3180            }
3181        }
3182
3183        impl wkt::message::Message for ColumnTooltipSettings {
3184            fn typename() -> &'static str {
3185                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings"
3186            }
3187        }
3188
3189        /// Configuration for table appearance.
3190        #[derive(Clone, Default, PartialEq)]
3191        #[non_exhaustive]
3192        pub struct TableConfig {
3193            /// Optional. Whether to show the table.
3194            pub enable_text_wrap: bool,
3195
3196            /// Optional. Column render type settings.
3197            pub column_render_type_settings: std::vec::Vec<
3198                crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings,
3199            >,
3200
3201            /// Optional. Settings for tooltip for column header and cell.
3202            pub column_tooltip_settings:
3203                std::vec::Vec<crate::model::dashboard_chart::visualization::ColumnTooltipSettings>,
3204
3205            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3206        }
3207
3208        impl TableConfig {
3209            /// Creates a new default instance.
3210            pub fn new() -> Self {
3211                std::default::Default::default()
3212            }
3213
3214            /// Sets the value of [enable_text_wrap][crate::model::dashboard_chart::visualization::TableConfig::enable_text_wrap].
3215            ///
3216            /// # Example
3217            /// ```ignore,no_run
3218            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::TableConfig;
3219            /// let x = TableConfig::new().set_enable_text_wrap(true);
3220            /// ```
3221            pub fn set_enable_text_wrap<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3222                self.enable_text_wrap = v.into();
3223                self
3224            }
3225
3226            /// Sets the value of [column_render_type_settings][crate::model::dashboard_chart::visualization::TableConfig::column_render_type_settings].
3227            ///
3228            /// # Example
3229            /// ```ignore,no_run
3230            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::TableConfig;
3231            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnRenderTypeSettings;
3232            /// let x = TableConfig::new()
3233            ///     .set_column_render_type_settings([
3234            ///         ColumnRenderTypeSettings::default()/* use setters */,
3235            ///         ColumnRenderTypeSettings::default()/* use (different) setters */,
3236            ///     ]);
3237            /// ```
3238            pub fn set_column_render_type_settings<T, V>(mut self, v: T) -> Self
3239            where
3240                T: std::iter::IntoIterator<Item = V>,
3241                V: std::convert::Into<
3242                        crate::model::dashboard_chart::visualization::ColumnRenderTypeSettings,
3243                    >,
3244            {
3245                use std::iter::Iterator;
3246                self.column_render_type_settings = v.into_iter().map(|i| i.into()).collect();
3247                self
3248            }
3249
3250            /// Sets the value of [column_tooltip_settings][crate::model::dashboard_chart::visualization::TableConfig::column_tooltip_settings].
3251            ///
3252            /// # Example
3253            /// ```ignore,no_run
3254            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::TableConfig;
3255            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::ColumnTooltipSettings;
3256            /// let x = TableConfig::new()
3257            ///     .set_column_tooltip_settings([
3258            ///         ColumnTooltipSettings::default()/* use setters */,
3259            ///         ColumnTooltipSettings::default()/* use (different) setters */,
3260            ///     ]);
3261            /// ```
3262            pub fn set_column_tooltip_settings<T, V>(mut self, v: T) -> Self
3263            where
3264                T: std::iter::IntoIterator<Item = V>,
3265                V: std::convert::Into<
3266                        crate::model::dashboard_chart::visualization::ColumnTooltipSettings,
3267                    >,
3268            {
3269                use std::iter::Iterator;
3270                self.column_tooltip_settings = v.into_iter().map(|i| i.into()).collect();
3271                self
3272            }
3273        }
3274
3275        impl wkt::message::Message for TableConfig {
3276            fn typename() -> &'static str {
3277                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig"
3278            }
3279        }
3280
3281        /// Google Maps config for a chart if chart type is map.
3282        #[derive(Clone, Default, PartialEq)]
3283        #[non_exhaustive]
3284        pub struct GoogleMapsConfig {
3285            /// Optional. Data settings for the map.
3286            pub data_settings: std::option::Option<
3287                crate::model::dashboard_chart::visualization::google_maps_config::DataSettings,
3288            >,
3289
3290            /// Optional. Plot mode for the map. This is used to determine whether to
3291            /// show points, heatmap or both.
3292            pub plot_mode: crate::model::PlotMode,
3293
3294            /// Optional. Map position settings for the map.
3295            pub map_position: std::option::Option<
3296                crate::model::dashboard_chart::visualization::google_maps_config::MapPosition,
3297            >,
3298
3299            /// Optional. Point settings for the map.
3300            pub point_settings: std::option::Option<
3301                crate::model::dashboard_chart::visualization::google_maps_config::PointSettings,
3302            >,
3303
3304            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3305        }
3306
3307        impl GoogleMapsConfig {
3308            /// Creates a new default instance.
3309            pub fn new() -> Self {
3310                std::default::Default::default()
3311            }
3312
3313            /// Sets the value of [data_settings][crate::model::dashboard_chart::visualization::GoogleMapsConfig::data_settings].
3314            ///
3315            /// # Example
3316            /// ```ignore,no_run
3317            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3318            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::DataSettings;
3319            /// let x = GoogleMapsConfig::new().set_data_settings(DataSettings::default()/* use setters */);
3320            /// ```
3321            pub fn set_data_settings<T>(mut self, v: T) -> Self
3322            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::DataSettings>
3323            {
3324                self.data_settings = std::option::Option::Some(v.into());
3325                self
3326            }
3327
3328            /// Sets or clears the value of [data_settings][crate::model::dashboard_chart::visualization::GoogleMapsConfig::data_settings].
3329            ///
3330            /// # Example
3331            /// ```ignore,no_run
3332            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3333            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::DataSettings;
3334            /// let x = GoogleMapsConfig::new().set_or_clear_data_settings(Some(DataSettings::default()/* use setters */));
3335            /// let x = GoogleMapsConfig::new().set_or_clear_data_settings(None::<DataSettings>);
3336            /// ```
3337            pub fn set_or_clear_data_settings<T>(mut self, v: std::option::Option<T>) -> Self
3338            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::DataSettings>
3339            {
3340                self.data_settings = v.map(|x| x.into());
3341                self
3342            }
3343
3344            /// Sets the value of [plot_mode][crate::model::dashboard_chart::visualization::GoogleMapsConfig::plot_mode].
3345            ///
3346            /// # Example
3347            /// ```ignore,no_run
3348            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3349            /// use google_cloud_chronicle_v1::model::PlotMode;
3350            /// let x0 = GoogleMapsConfig::new().set_plot_mode(PlotMode::Points);
3351            /// let x1 = GoogleMapsConfig::new().set_plot_mode(PlotMode::Heatmap);
3352            /// let x2 = GoogleMapsConfig::new().set_plot_mode(PlotMode::Both);
3353            /// ```
3354            pub fn set_plot_mode<T: std::convert::Into<crate::model::PlotMode>>(
3355                mut self,
3356                v: T,
3357            ) -> Self {
3358                self.plot_mode = v.into();
3359                self
3360            }
3361
3362            /// Sets the value of [map_position][crate::model::dashboard_chart::visualization::GoogleMapsConfig::map_position].
3363            ///
3364            /// # Example
3365            /// ```ignore,no_run
3366            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3367            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3368            /// let x = GoogleMapsConfig::new().set_map_position(MapPosition::default()/* use setters */);
3369            /// ```
3370            pub fn set_map_position<T>(mut self, v: T) -> Self
3371            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::MapPosition>
3372            {
3373                self.map_position = std::option::Option::Some(v.into());
3374                self
3375            }
3376
3377            /// Sets or clears the value of [map_position][crate::model::dashboard_chart::visualization::GoogleMapsConfig::map_position].
3378            ///
3379            /// # Example
3380            /// ```ignore,no_run
3381            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3382            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3383            /// let x = GoogleMapsConfig::new().set_or_clear_map_position(Some(MapPosition::default()/* use setters */));
3384            /// let x = GoogleMapsConfig::new().set_or_clear_map_position(None::<MapPosition>);
3385            /// ```
3386            pub fn set_or_clear_map_position<T>(mut self, v: std::option::Option<T>) -> Self
3387            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::MapPosition>
3388            {
3389                self.map_position = v.map(|x| x.into());
3390                self
3391            }
3392
3393            /// Sets the value of [point_settings][crate::model::dashboard_chart::visualization::GoogleMapsConfig::point_settings].
3394            ///
3395            /// # Example
3396            /// ```ignore,no_run
3397            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3398            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::PointSettings;
3399            /// let x = GoogleMapsConfig::new().set_point_settings(PointSettings::default()/* use setters */);
3400            /// ```
3401            pub fn set_point_settings<T>(mut self, v: T) -> Self
3402            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::PointSettings>
3403            {
3404                self.point_settings = std::option::Option::Some(v.into());
3405                self
3406            }
3407
3408            /// Sets or clears the value of [point_settings][crate::model::dashboard_chart::visualization::GoogleMapsConfig::point_settings].
3409            ///
3410            /// # Example
3411            /// ```ignore,no_run
3412            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::GoogleMapsConfig;
3413            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::PointSettings;
3414            /// let x = GoogleMapsConfig::new().set_or_clear_point_settings(Some(PointSettings::default()/* use setters */));
3415            /// let x = GoogleMapsConfig::new().set_or_clear_point_settings(None::<PointSettings>);
3416            /// ```
3417            pub fn set_or_clear_point_settings<T>(mut self, v: std::option::Option<T>) -> Self
3418            where T: std::convert::Into<crate::model::dashboard_chart::visualization::google_maps_config::PointSettings>
3419            {
3420                self.point_settings = v.map(|x| x.into());
3421                self
3422            }
3423        }
3424
3425        impl wkt::message::Message for GoogleMapsConfig {
3426            fn typename() -> &'static str {
3427                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig"
3428            }
3429        }
3430
3431        /// Defines additional types related to [GoogleMapsConfig].
3432        pub mod google_maps_config {
3433            #[allow(unused_imports)]
3434            use super::*;
3435
3436            /// Data settings for the map.
3437            #[derive(Clone, Default, PartialEq)]
3438            #[non_exhaustive]
3439            pub struct DataSettings {
3440                /// Optional. Latitude column.
3441                pub latitude_column: std::string::String,
3442
3443                /// Optional. Longitude column.
3444                pub longitude_column: std::string::String,
3445
3446                /// Optional. Field to count.
3447                pub count_column: std::string::String,
3448
3449                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3450            }
3451
3452            impl DataSettings {
3453                /// Creates a new default instance.
3454                pub fn new() -> Self {
3455                    std::default::Default::default()
3456                }
3457
3458                /// Sets the value of [latitude_column][crate::model::dashboard_chart::visualization::google_maps_config::DataSettings::latitude_column].
3459                ///
3460                /// # Example
3461                /// ```ignore,no_run
3462                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::DataSettings;
3463                /// let x = DataSettings::new().set_latitude_column("example");
3464                /// ```
3465                pub fn set_latitude_column<T: std::convert::Into<std::string::String>>(
3466                    mut self,
3467                    v: T,
3468                ) -> Self {
3469                    self.latitude_column = v.into();
3470                    self
3471                }
3472
3473                /// Sets the value of [longitude_column][crate::model::dashboard_chart::visualization::google_maps_config::DataSettings::longitude_column].
3474                ///
3475                /// # Example
3476                /// ```ignore,no_run
3477                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::DataSettings;
3478                /// let x = DataSettings::new().set_longitude_column("example");
3479                /// ```
3480                pub fn set_longitude_column<T: std::convert::Into<std::string::String>>(
3481                    mut self,
3482                    v: T,
3483                ) -> Self {
3484                    self.longitude_column = v.into();
3485                    self
3486                }
3487
3488                /// Sets the value of [count_column][crate::model::dashboard_chart::visualization::google_maps_config::DataSettings::count_column].
3489                ///
3490                /// # Example
3491                /// ```ignore,no_run
3492                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::DataSettings;
3493                /// let x = DataSettings::new().set_count_column("example");
3494                /// ```
3495                pub fn set_count_column<T: std::convert::Into<std::string::String>>(
3496                    mut self,
3497                    v: T,
3498                ) -> Self {
3499                    self.count_column = v.into();
3500                    self
3501                }
3502            }
3503
3504            impl wkt::message::Message for DataSettings {
3505                fn typename() -> &'static str {
3506                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings"
3507                }
3508            }
3509
3510            /// Map position settings for the map.
3511            #[derive(Clone, Default, PartialEq)]
3512            #[non_exhaustive]
3513            pub struct MapPosition {
3514                /// Optional. Whether to fit the map to the data.
3515                /// If true, the map will be resized to fit the data.
3516                /// If false, langitude and longitude will be used to set the map size.
3517                pub fit_data: bool,
3518
3519                /// Optional. Latitude of the map.
3520                pub latitude_value: f64,
3521
3522                /// Optional. Longitude of the map.
3523                pub longitude_value: f64,
3524
3525                /// Optional. Scale of the map.
3526                pub zoom_scale_value: f64,
3527
3528                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3529            }
3530
3531            impl MapPosition {
3532                /// Creates a new default instance.
3533                pub fn new() -> Self {
3534                    std::default::Default::default()
3535                }
3536
3537                /// Sets the value of [fit_data][crate::model::dashboard_chart::visualization::google_maps_config::MapPosition::fit_data].
3538                ///
3539                /// # Example
3540                /// ```ignore,no_run
3541                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3542                /// let x = MapPosition::new().set_fit_data(true);
3543                /// ```
3544                pub fn set_fit_data<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3545                    self.fit_data = v.into();
3546                    self
3547                }
3548
3549                /// Sets the value of [latitude_value][crate::model::dashboard_chart::visualization::google_maps_config::MapPosition::latitude_value].
3550                ///
3551                /// # Example
3552                /// ```ignore,no_run
3553                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3554                /// let x = MapPosition::new().set_latitude_value(42.0);
3555                /// ```
3556                pub fn set_latitude_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3557                    self.latitude_value = v.into();
3558                    self
3559                }
3560
3561                /// Sets the value of [longitude_value][crate::model::dashboard_chart::visualization::google_maps_config::MapPosition::longitude_value].
3562                ///
3563                /// # Example
3564                /// ```ignore,no_run
3565                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3566                /// let x = MapPosition::new().set_longitude_value(42.0);
3567                /// ```
3568                pub fn set_longitude_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3569                    self.longitude_value = v.into();
3570                    self
3571                }
3572
3573                /// Sets the value of [zoom_scale_value][crate::model::dashboard_chart::visualization::google_maps_config::MapPosition::zoom_scale_value].
3574                ///
3575                /// # Example
3576                /// ```ignore,no_run
3577                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::MapPosition;
3578                /// let x = MapPosition::new().set_zoom_scale_value(42.0);
3579                /// ```
3580                pub fn set_zoom_scale_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3581                    self.zoom_scale_value = v.into();
3582                    self
3583                }
3584            }
3585
3586            impl wkt::message::Message for MapPosition {
3587                fn typename() -> &'static str {
3588                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition"
3589                }
3590            }
3591
3592            /// Point settings for the map.
3593            #[derive(Clone, Default, PartialEq)]
3594            #[non_exhaustive]
3595            pub struct PointSettings {
3596                /// Optional. Point size type for the map. This is used to
3597                /// determine the size of the points on the map.
3598                pub point_size_type: crate::model::PointSizeType,
3599
3600                /// Optional. Color for the point on the map.
3601                pub color: std::string::String,
3602
3603                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3604            }
3605
3606            impl PointSettings {
3607                /// Creates a new default instance.
3608                pub fn new() -> Self {
3609                    std::default::Default::default()
3610                }
3611
3612                /// Sets the value of [point_size_type][crate::model::dashboard_chart::visualization::google_maps_config::PointSettings::point_size_type].
3613                ///
3614                /// # Example
3615                /// ```ignore,no_run
3616                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::PointSettings;
3617                /// use google_cloud_chronicle_v1::model::PointSizeType;
3618                /// let x0 = PointSettings::new().set_point_size_type(PointSizeType::Fixed);
3619                /// let x1 = PointSettings::new().set_point_size_type(PointSizeType::ProportionalToSize);
3620                /// ```
3621                pub fn set_point_size_type<T: std::convert::Into<crate::model::PointSizeType>>(
3622                    mut self,
3623                    v: T,
3624                ) -> Self {
3625                    self.point_size_type = v.into();
3626                    self
3627                }
3628
3629                /// Sets the value of [color][crate::model::dashboard_chart::visualization::google_maps_config::PointSettings::color].
3630                ///
3631                /// # Example
3632                /// ```ignore,no_run
3633                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::google_maps_config::PointSettings;
3634                /// let x = PointSettings::new().set_color("example");
3635                /// ```
3636                pub fn set_color<T: std::convert::Into<std::string::String>>(
3637                    mut self,
3638                    v: T,
3639                ) -> Self {
3640                    self.color = v.into();
3641                    self
3642                }
3643            }
3644
3645            impl wkt::message::Message for PointSettings {
3646                fn typename() -> &'static str {
3647                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings"
3648                }
3649            }
3650        }
3651
3652        /// Conveys what range of values should be rendered in what color. This field
3653        /// is used when threshold_coloring_enabled is true.
3654        #[derive(Clone, Default, PartialEq)]
3655        #[non_exhaustive]
3656        pub struct VisualMap {
3657            /// Optional. Contains one of the valid visual map types such as
3658            /// 'continuous' or 'piecewise'.
3659            pub visual_map_type: crate::model::VisualMapType,
3660
3661            /// Optional. Pieces of the visual map.
3662            pub pieces: std::vec::Vec<
3663                crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece,
3664            >,
3665
3666            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3667        }
3668
3669        impl VisualMap {
3670            /// Creates a new default instance.
3671            pub fn new() -> Self {
3672                std::default::Default::default()
3673            }
3674
3675            /// Sets the value of [visual_map_type][crate::model::dashboard_chart::visualization::VisualMap::visual_map_type].
3676            ///
3677            /// # Example
3678            /// ```ignore,no_run
3679            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::VisualMap;
3680            /// use google_cloud_chronicle_v1::model::VisualMapType;
3681            /// let x0 = VisualMap::new().set_visual_map_type(VisualMapType::Continuous);
3682            /// let x1 = VisualMap::new().set_visual_map_type(VisualMapType::Piecewise);
3683            /// ```
3684            pub fn set_visual_map_type<T: std::convert::Into<crate::model::VisualMapType>>(
3685                mut self,
3686                v: T,
3687            ) -> Self {
3688                self.visual_map_type = v.into();
3689                self
3690            }
3691
3692            /// Sets the value of [pieces][crate::model::dashboard_chart::visualization::VisualMap::pieces].
3693            ///
3694            /// # Example
3695            /// ```ignore,no_run
3696            /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::VisualMap;
3697            /// use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3698            /// let x = VisualMap::new()
3699            ///     .set_pieces([
3700            ///         VisualMapPiece::default()/* use setters */,
3701            ///         VisualMapPiece::default()/* use (different) setters */,
3702            ///     ]);
3703            /// ```
3704            pub fn set_pieces<T, V>(mut self, v: T) -> Self
3705            where
3706                T: std::iter::IntoIterator<Item = V>,
3707                V: std::convert::Into<
3708                        crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece,
3709                    >,
3710            {
3711                use std::iter::Iterator;
3712                self.pieces = v.into_iter().map(|i| i.into()).collect();
3713                self
3714            }
3715        }
3716
3717        impl wkt::message::Message for VisualMap {
3718            fn typename() -> &'static str {
3719                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap"
3720            }
3721        }
3722
3723        /// Defines additional types related to [VisualMap].
3724        pub mod visual_map {
3725            #[allow(unused_imports)]
3726            use super::*;
3727
3728            /// An ECharts visual map of type 'piecewise' contain many pieces. Each
3729            /// piece has a min, max, and color with which it's rendered.
3730            #[derive(Clone, Default, PartialEq)]
3731            #[non_exhaustive]
3732            pub struct VisualMapPiece {
3733                /// Optional. Minimum value for the piece.
3734                pub min: std::option::Option<i64>,
3735
3736                /// Optional. Minimum value for the piece.
3737                pub max: std::option::Option<i64>,
3738
3739                /// Optional. Color to render the piece in when the value is between min
3740                /// and max.
3741                pub color: std::string::String,
3742
3743                /// Optional. Label used in visual map controller.
3744                pub label: std::string::String,
3745
3746                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3747            }
3748
3749            impl VisualMapPiece {
3750                /// Creates a new default instance.
3751                pub fn new() -> Self {
3752                    std::default::Default::default()
3753                }
3754
3755                /// Sets the value of [min][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::min].
3756                ///
3757                /// # Example
3758                /// ```ignore,no_run
3759                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3760                /// let x = VisualMapPiece::new().set_min(42);
3761                /// ```
3762                pub fn set_min<T>(mut self, v: T) -> Self
3763                where
3764                    T: std::convert::Into<i64>,
3765                {
3766                    self.min = std::option::Option::Some(v.into());
3767                    self
3768                }
3769
3770                /// Sets or clears the value of [min][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::min].
3771                ///
3772                /// # Example
3773                /// ```ignore,no_run
3774                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3775                /// let x = VisualMapPiece::new().set_or_clear_min(Some(42));
3776                /// let x = VisualMapPiece::new().set_or_clear_min(None::<i32>);
3777                /// ```
3778                pub fn set_or_clear_min<T>(mut self, v: std::option::Option<T>) -> Self
3779                where
3780                    T: std::convert::Into<i64>,
3781                {
3782                    self.min = v.map(|x| x.into());
3783                    self
3784                }
3785
3786                /// Sets the value of [max][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::max].
3787                ///
3788                /// # Example
3789                /// ```ignore,no_run
3790                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3791                /// let x = VisualMapPiece::new().set_max(42);
3792                /// ```
3793                pub fn set_max<T>(mut self, v: T) -> Self
3794                where
3795                    T: std::convert::Into<i64>,
3796                {
3797                    self.max = std::option::Option::Some(v.into());
3798                    self
3799                }
3800
3801                /// Sets or clears the value of [max][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::max].
3802                ///
3803                /// # Example
3804                /// ```ignore,no_run
3805                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3806                /// let x = VisualMapPiece::new().set_or_clear_max(Some(42));
3807                /// let x = VisualMapPiece::new().set_or_clear_max(None::<i32>);
3808                /// ```
3809                pub fn set_or_clear_max<T>(mut self, v: std::option::Option<T>) -> Self
3810                where
3811                    T: std::convert::Into<i64>,
3812                {
3813                    self.max = v.map(|x| x.into());
3814                    self
3815                }
3816
3817                /// Sets the value of [color][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::color].
3818                ///
3819                /// # Example
3820                /// ```ignore,no_run
3821                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3822                /// let x = VisualMapPiece::new().set_color("example");
3823                /// ```
3824                pub fn set_color<T: std::convert::Into<std::string::String>>(
3825                    mut self,
3826                    v: T,
3827                ) -> Self {
3828                    self.color = v.into();
3829                    self
3830                }
3831
3832                /// Sets the value of [label][crate::model::dashboard_chart::visualization::visual_map::VisualMapPiece::label].
3833                ///
3834                /// # Example
3835                /// ```ignore,no_run
3836                /// # use google_cloud_chronicle_v1::model::dashboard_chart::visualization::visual_map::VisualMapPiece;
3837                /// let x = VisualMapPiece::new().set_label("example");
3838                /// ```
3839                pub fn set_label<T: std::convert::Into<std::string::String>>(
3840                    mut self,
3841                    v: T,
3842                ) -> Self {
3843                    self.label = v.into();
3844                    self
3845                }
3846            }
3847
3848            impl wkt::message::Message for VisualMapPiece {
3849                fn typename() -> &'static str {
3850                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece"
3851                }
3852            }
3853        }
3854    }
3855
3856    /// Drill down configuration.
3857    #[derive(Clone, Default, PartialEq)]
3858    #[non_exhaustive]
3859    pub struct DrillDownConfig {
3860        /// Required. Left click drill downs.
3861        pub left_drill_downs:
3862            std::vec::Vec<crate::model::dashboard_chart::drill_down_config::DrillDown>,
3863
3864        /// Required. Right click drill downs.
3865        pub right_drill_downs:
3866            std::vec::Vec<crate::model::dashboard_chart::drill_down_config::DrillDown>,
3867
3868        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3869    }
3870
3871    impl DrillDownConfig {
3872        /// Creates a new default instance.
3873        pub fn new() -> Self {
3874            std::default::Default::default()
3875        }
3876
3877        /// Sets the value of [left_drill_downs][crate::model::dashboard_chart::DrillDownConfig::left_drill_downs].
3878        ///
3879        /// # Example
3880        /// ```ignore,no_run
3881        /// # use google_cloud_chronicle_v1::model::dashboard_chart::DrillDownConfig;
3882        /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
3883        /// let x = DrillDownConfig::new()
3884        ///     .set_left_drill_downs([
3885        ///         DrillDown::default()/* use setters */,
3886        ///         DrillDown::default()/* use (different) setters */,
3887        ///     ]);
3888        /// ```
3889        pub fn set_left_drill_downs<T, V>(mut self, v: T) -> Self
3890        where
3891            T: std::iter::IntoIterator<Item = V>,
3892            V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::DrillDown>,
3893        {
3894            use std::iter::Iterator;
3895            self.left_drill_downs = v.into_iter().map(|i| i.into()).collect();
3896            self
3897        }
3898
3899        /// Sets the value of [right_drill_downs][crate::model::dashboard_chart::DrillDownConfig::right_drill_downs].
3900        ///
3901        /// # Example
3902        /// ```ignore,no_run
3903        /// # use google_cloud_chronicle_v1::model::dashboard_chart::DrillDownConfig;
3904        /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
3905        /// let x = DrillDownConfig::new()
3906        ///     .set_right_drill_downs([
3907        ///         DrillDown::default()/* use setters */,
3908        ///         DrillDown::default()/* use (different) setters */,
3909        ///     ]);
3910        /// ```
3911        pub fn set_right_drill_downs<T, V>(mut self, v: T) -> Self
3912        where
3913            T: std::iter::IntoIterator<Item = V>,
3914            V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::DrillDown>,
3915        {
3916            use std::iter::Iterator;
3917            self.right_drill_downs = v.into_iter().map(|i| i.into()).collect();
3918            self
3919        }
3920    }
3921
3922    impl wkt::message::Message for DrillDownConfig {
3923        fn typename() -> &'static str {
3924            "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig"
3925        }
3926    }
3927
3928    /// Defines additional types related to [DrillDownConfig].
3929    pub mod drill_down_config {
3930        #[allow(unused_imports)]
3931        use super::*;
3932
3933        /// Drill down config.
3934        #[derive(Clone, Default, PartialEq)]
3935        #[non_exhaustive]
3936        pub struct DrillDown {
3937            /// Required. ID of the drill down.
3938            pub id: std::string::String,
3939
3940            /// Required. Display name of the drill down.
3941            pub display_name: std::string::String,
3942
3943            /// Drill down settings.
3944            pub settings: std::option::Option<
3945                crate::model::dashboard_chart::drill_down_config::drill_down::Settings,
3946            >,
3947
3948            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3949        }
3950
3951        impl DrillDown {
3952            /// Creates a new default instance.
3953            pub fn new() -> Self {
3954                std::default::Default::default()
3955            }
3956
3957            /// Sets the value of [id][crate::model::dashboard_chart::drill_down_config::DrillDown::id].
3958            ///
3959            /// # Example
3960            /// ```ignore,no_run
3961            /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
3962            /// let x = DrillDown::new().set_id("example");
3963            /// ```
3964            pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3965                self.id = v.into();
3966                self
3967            }
3968
3969            /// Sets the value of [display_name][crate::model::dashboard_chart::drill_down_config::DrillDown::display_name].
3970            ///
3971            /// # Example
3972            /// ```ignore,no_run
3973            /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
3974            /// let x = DrillDown::new().set_display_name("example");
3975            /// ```
3976            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
3977                mut self,
3978                v: T,
3979            ) -> Self {
3980                self.display_name = v.into();
3981                self
3982            }
3983
3984            /// Sets the value of [settings][crate::model::dashboard_chart::drill_down_config::DrillDown::settings].
3985            ///
3986            /// Note that all the setters affecting `settings` are mutually
3987            /// exclusive.
3988            ///
3989            /// # Example
3990            /// ```ignore,no_run
3991            /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
3992            /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings;
3993            /// let x = DrillDown::new().set_settings(Some(
3994            ///     google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::Settings::DefaultSettings(DefaultDrillDownSettings::default().into())));
3995            /// ```
3996            pub fn set_settings<
3997                T: std::convert::Into<
3998                        std::option::Option<
3999                            crate::model::dashboard_chart::drill_down_config::drill_down::Settings,
4000                        >,
4001                    >,
4002            >(
4003                mut self,
4004                v: T,
4005            ) -> Self {
4006                self.settings = v.into();
4007                self
4008            }
4009
4010            /// The value of [settings][crate::model::dashboard_chart::drill_down_config::DrillDown::settings]
4011            /// if it holds a `DefaultSettings`, `None` if the field is not set or
4012            /// holds a different branch.
4013            pub fn default_settings(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings>>{
4014                #[allow(unreachable_patterns)]
4015                self.settings.as_ref().and_then(|v| match v {
4016                    crate::model::dashboard_chart::drill_down_config::drill_down::Settings::DefaultSettings(v) => std::option::Option::Some(v),
4017                    _ => std::option::Option::None,
4018                })
4019            }
4020
4021            /// Sets the value of [settings][crate::model::dashboard_chart::drill_down_config::DrillDown::settings]
4022            /// to hold a `DefaultSettings`.
4023            ///
4024            /// Note that all the setters affecting `settings` are
4025            /// mutually exclusive.
4026            ///
4027            /// # Example
4028            /// ```ignore,no_run
4029            /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
4030            /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings;
4031            /// let x = DrillDown::new().set_default_settings(DefaultDrillDownSettings::default()/* use setters */);
4032            /// assert!(x.default_settings().is_some());
4033            /// assert!(x.custom_settings().is_none());
4034            /// ```
4035            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{
4036                self.settings = std::option::Option::Some(
4037                    crate::model::dashboard_chart::drill_down_config::drill_down::Settings::DefaultSettings(
4038                        v.into()
4039                    )
4040                );
4041                self
4042            }
4043
4044            /// The value of [settings][crate::model::dashboard_chart::drill_down_config::DrillDown::settings]
4045            /// if it holds a `CustomSettings`, `None` if the field is not set or
4046            /// holds a different branch.
4047            pub fn custom_settings(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings>>{
4048                #[allow(unreachable_patterns)]
4049                self.settings.as_ref().and_then(|v| match v {
4050                    crate::model::dashboard_chart::drill_down_config::drill_down::Settings::CustomSettings(v) => std::option::Option::Some(v),
4051                    _ => std::option::Option::None,
4052                })
4053            }
4054
4055            /// Sets the value of [settings][crate::model::dashboard_chart::drill_down_config::DrillDown::settings]
4056            /// to hold a `CustomSettings`.
4057            ///
4058            /// Note that all the setters affecting `settings` are
4059            /// mutually exclusive.
4060            ///
4061            /// # Example
4062            /// ```ignore,no_run
4063            /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::DrillDown;
4064            /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4065            /// let x = DrillDown::new().set_custom_settings(CustomDrillDownSettings::default()/* use setters */);
4066            /// assert!(x.custom_settings().is_some());
4067            /// assert!(x.default_settings().is_none());
4068            /// ```
4069            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{
4070                self.settings = std::option::Option::Some(
4071                    crate::model::dashboard_chart::drill_down_config::drill_down::Settings::CustomSettings(
4072                        v.into()
4073                    )
4074                );
4075                self
4076            }
4077        }
4078
4079        impl wkt::message::Message for DrillDown {
4080            fn typename() -> &'static str {
4081                "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown"
4082            }
4083        }
4084
4085        /// Defines additional types related to [DrillDown].
4086        pub mod drill_down {
4087            #[allow(unused_imports)]
4088            use super::*;
4089
4090            /// Default drill down settings.
4091            #[derive(Clone, Default, PartialEq)]
4092            #[non_exhaustive]
4093            pub struct DefaultDrillDownSettings {
4094                /// Required. Whether the default drill down is enabled.
4095                pub enabled: bool,
4096
4097                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4098            }
4099
4100            impl DefaultDrillDownSettings {
4101                /// Creates a new default instance.
4102                pub fn new() -> Self {
4103                    std::default::Default::default()
4104                }
4105
4106                /// Sets the value of [enabled][crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings::enabled].
4107                ///
4108                /// # Example
4109                /// ```ignore,no_run
4110                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings;
4111                /// let x = DefaultDrillDownSettings::new().set_enabled(true);
4112                /// ```
4113                pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4114                    self.enabled = v.into();
4115                    self
4116                }
4117            }
4118
4119            impl wkt::message::Message for DefaultDrillDownSettings {
4120                fn typename() -> &'static str {
4121                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings"
4122                }
4123            }
4124
4125            /// Custom drill down settings.
4126            #[derive(Clone, Default, PartialEq)]
4127            #[non_exhaustive]
4128            pub struct CustomDrillDownSettings {
4129
4130                /// Required. Whether to open the drill down action in a new tab.
4131                pub new_tab: bool,
4132
4133                /// Optional. Table chart column name to associate the custom drill down
4134                /// action on left click.
4135                pub left_click_column: std::string::String,
4136
4137                /// Action to be performed on drill down.
4138                pub action: std::option::Option<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action>,
4139
4140                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4141            }
4142
4143            impl CustomDrillDownSettings {
4144                /// Creates a new default instance.
4145                pub fn new() -> Self {
4146                    std::default::Default::default()
4147                }
4148
4149                /// Sets the value of [new_tab][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::new_tab].
4150                ///
4151                /// # Example
4152                /// ```ignore,no_run
4153                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4154                /// let x = CustomDrillDownSettings::new().set_new_tab(true);
4155                /// ```
4156                pub fn set_new_tab<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4157                    self.new_tab = v.into();
4158                    self
4159                }
4160
4161                /// Sets the value of [left_click_column][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::left_click_column].
4162                ///
4163                /// # Example
4164                /// ```ignore,no_run
4165                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4166                /// let x = CustomDrillDownSettings::new().set_left_click_column("example");
4167                /// ```
4168                pub fn set_left_click_column<T: std::convert::Into<std::string::String>>(
4169                    mut self,
4170                    v: T,
4171                ) -> Self {
4172                    self.left_click_column = v.into();
4173                    self
4174                }
4175
4176                /// Sets the value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action].
4177                ///
4178                /// Note that all the setters affecting `action` are mutually
4179                /// exclusive.
4180                ///
4181                /// # Example
4182                /// ```ignore,no_run
4183                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4184                /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery;
4185                /// let x = CustomDrillDownSettings::new().set_action(Some(
4186                ///     google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Query(DrillDownQuery::default().into())));
4187                /// ```
4188                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
4189                {
4190                    self.action = v.into();
4191                    self
4192                }
4193
4194                /// The value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4195                /// if it holds a `Query`, `None` if the field is not set or
4196                /// holds a different branch.
4197                pub fn query(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery>>{
4198                    #[allow(unreachable_patterns)]
4199                    self.action.as_ref().and_then(|v| match v {
4200                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Query(v) => std::option::Option::Some(v),
4201                        _ => std::option::Option::None,
4202                    })
4203                }
4204
4205                /// Sets the value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4206                /// to hold a `Query`.
4207                ///
4208                /// Note that all the setters affecting `action` are
4209                /// mutually exclusive.
4210                ///
4211                /// # Example
4212                /// ```ignore,no_run
4213                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4214                /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery;
4215                /// let x = CustomDrillDownSettings::new().set_query(DrillDownQuery::default()/* use setters */);
4216                /// assert!(x.query().is_some());
4217                /// assert!(x.filter().is_none());
4218                /// assert!(x.external_link().is_none());
4219                /// ```
4220                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{
4221                    self.action = std::option::Option::Some(
4222                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Query(
4223                            v.into()
4224                        )
4225                    );
4226                    self
4227                }
4228
4229                /// The value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4230                /// if it holds a `Filter`, `None` if the field is not set or
4231                /// holds a different branch.
4232                pub fn filter(&self) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter>>{
4233                    #[allow(unreachable_patterns)]
4234                    self.action.as_ref().and_then(|v| match v {
4235                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Filter(v) => std::option::Option::Some(v),
4236                        _ => std::option::Option::None,
4237                    })
4238                }
4239
4240                /// Sets the value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4241                /// to hold a `Filter`.
4242                ///
4243                /// Note that all the setters affecting `action` are
4244                /// mutually exclusive.
4245                ///
4246                /// # Example
4247                /// ```ignore,no_run
4248                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4249                /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter;
4250                /// let x = CustomDrillDownSettings::new().set_filter(DrillDownFilter::default()/* use setters */);
4251                /// assert!(x.filter().is_some());
4252                /// assert!(x.query().is_none());
4253                /// assert!(x.external_link().is_none());
4254                /// ```
4255                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{
4256                    self.action = std::option::Option::Some(
4257                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::Filter(
4258                            v.into()
4259                        )
4260                    );
4261                    self
4262                }
4263
4264                /// The value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4265                /// if it holds a `ExternalLink`, `None` if the field is not set or
4266                /// holds a different branch.
4267                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>>{
4268                    #[allow(unreachable_patterns)]
4269                    self.action.as_ref().and_then(|v| match v {
4270                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::ExternalLink(v) => std::option::Option::Some(v),
4271                        _ => std::option::Option::None,
4272                    })
4273                }
4274
4275                /// Sets the value of [action][crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings::action]
4276                /// to hold a `ExternalLink`.
4277                ///
4278                /// Note that all the setters affecting `action` are
4279                /// mutually exclusive.
4280                ///
4281                /// # Example
4282                /// ```ignore,no_run
4283                /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings;
4284                /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink;
4285                /// let x = CustomDrillDownSettings::new().set_external_link(DrillDownExternalLink::default()/* use setters */);
4286                /// assert!(x.external_link().is_some());
4287                /// assert!(x.query().is_none());
4288                /// assert!(x.filter().is_none());
4289                /// ```
4290                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{
4291                    self.action = std::option::Option::Some(
4292                        crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::Action::ExternalLink(
4293                            v.into()
4294                        )
4295                    );
4296                    self
4297                }
4298            }
4299
4300            impl wkt::message::Message for CustomDrillDownSettings {
4301                fn typename() -> &'static str {
4302                    "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings"
4303                }
4304            }
4305
4306            /// Defines additional types related to [CustomDrillDownSettings].
4307            pub mod custom_drill_down_settings {
4308                #[allow(unused_imports)]
4309                use super::*;
4310
4311                /// Drill down query config.
4312                #[derive(Clone, Default, PartialEq)]
4313                #[non_exhaustive]
4314                pub struct DrillDownQuery {
4315                    /// Required. Search query to be executed on drill down.
4316                    pub query: std::string::String,
4317
4318                    pub(crate) _unknown_fields:
4319                        serde_json::Map<std::string::String, serde_json::Value>,
4320                }
4321
4322                impl DrillDownQuery {
4323                    /// Creates a new default instance.
4324                    pub fn new() -> Self {
4325                        std::default::Default::default()
4326                    }
4327
4328                    /// Sets the value of [query][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery::query].
4329                    ///
4330                    /// # Example
4331                    /// ```ignore,no_run
4332                    /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery;
4333                    /// let x = DrillDownQuery::new().set_query("example");
4334                    /// ```
4335                    pub fn set_query<T: std::convert::Into<std::string::String>>(
4336                        mut self,
4337                        v: T,
4338                    ) -> Self {
4339                        self.query = v.into();
4340                        self
4341                    }
4342                }
4343
4344                impl wkt::message::Message for DrillDownQuery {
4345                    fn typename() -> &'static str {
4346                        "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery"
4347                    }
4348                }
4349
4350                /// Drill down filter config.
4351                #[derive(Clone, Default, PartialEq)]
4352                #[non_exhaustive]
4353                pub struct DrillDownFilter {
4354
4355                    /// Required. Dashboard filters to be applied on drill down.
4356                    pub dashboard_filters: std::vec::Vec<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter>,
4357
4358                    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4359                }
4360
4361                impl DrillDownFilter {
4362                    /// Creates a new default instance.
4363                    pub fn new() -> Self {
4364                        std::default::Default::default()
4365                    }
4366
4367                    /// Sets the value of [dashboard_filters][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter::dashboard_filters].
4368                    ///
4369                    /// # Example
4370                    /// ```ignore,no_run
4371                    /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter;
4372                    /// use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter;
4373                    /// let x = DrillDownFilter::new()
4374                    ///     .set_dashboard_filters([
4375                    ///         DrillDownDashboardFilter::default()/* use setters */,
4376                    ///         DrillDownDashboardFilter::default()/* use (different) setters */,
4377                    ///     ]);
4378                    /// ```
4379                    pub fn set_dashboard_filters<T, V>(mut self, v: T) -> Self
4380                    where
4381                        T: std::iter::IntoIterator<Item = V>,
4382                        V: std::convert::Into<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter>
4383                    {
4384                        use std::iter::Iterator;
4385                        self.dashboard_filters = v.into_iter().map(|i| i.into()).collect();
4386                        self
4387                    }
4388                }
4389
4390                impl wkt::message::Message for DrillDownFilter {
4391                    fn typename() -> &'static str {
4392                        "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter"
4393                    }
4394                }
4395
4396                /// Defines additional types related to [DrillDownFilter].
4397                pub mod drill_down_filter {
4398                    #[allow(unused_imports)]
4399                    use super::*;
4400
4401                    /// Drill down dashboard filter config.
4402                    #[derive(Clone, Default, PartialEq)]
4403                    #[non_exhaustive]
4404                    pub struct DrillDownDashboardFilter {
4405                        /// Required. ID of the dashboard filter.
4406                        pub dashboard_filter_id: std::string::String,
4407
4408                        /// Required. Filter operator and field values for the dashboard
4409                        /// filter.
4410                        pub filter_operator_and_values:
4411                            std::vec::Vec<crate::model::FilterOperatorAndValues>,
4412
4413                        pub(crate) _unknown_fields:
4414                            serde_json::Map<std::string::String, serde_json::Value>,
4415                    }
4416
4417                    impl DrillDownDashboardFilter {
4418                        /// Creates a new default instance.
4419                        pub fn new() -> Self {
4420                            std::default::Default::default()
4421                        }
4422
4423                        /// Sets the value of [dashboard_filter_id][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter::dashboard_filter_id].
4424                        ///
4425                        /// # Example
4426                        /// ```ignore,no_run
4427                        /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter;
4428                        /// let x = DrillDownDashboardFilter::new().set_dashboard_filter_id("example");
4429                        /// ```
4430                        pub fn set_dashboard_filter_id<
4431                            T: std::convert::Into<std::string::String>,
4432                        >(
4433                            mut self,
4434                            v: T,
4435                        ) -> Self {
4436                            self.dashboard_filter_id = v.into();
4437                            self
4438                        }
4439
4440                        /// Sets the value of [filter_operator_and_values][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter::filter_operator_and_values].
4441                        ///
4442                        /// # Example
4443                        /// ```ignore,no_run
4444                        /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::drill_down_filter::DrillDownDashboardFilter;
4445                        /// use google_cloud_chronicle_v1::model::FilterOperatorAndValues;
4446                        /// let x = DrillDownDashboardFilter::new()
4447                        ///     .set_filter_operator_and_values([
4448                        ///         FilterOperatorAndValues::default()/* use setters */,
4449                        ///         FilterOperatorAndValues::default()/* use (different) setters */,
4450                        ///     ]);
4451                        /// ```
4452                        pub fn set_filter_operator_and_values<T, V>(mut self, v: T) -> Self
4453                        where
4454                            T: std::iter::IntoIterator<Item = V>,
4455                            V: std::convert::Into<crate::model::FilterOperatorAndValues>,
4456                        {
4457                            use std::iter::Iterator;
4458                            self.filter_operator_and_values =
4459                                v.into_iter().map(|i| i.into()).collect();
4460                            self
4461                        }
4462                    }
4463
4464                    impl wkt::message::Message for DrillDownDashboardFilter {
4465                        fn typename() -> &'static str {
4466                            "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter"
4467                        }
4468                    }
4469                }
4470
4471                /// Drill down external link config.
4472                #[derive(Clone, Default, PartialEq)]
4473                #[non_exhaustive]
4474                pub struct DrillDownExternalLink {
4475                    /// Required. External link the drill down action should redirect to.
4476                    pub link: std::string::String,
4477
4478                    /// Optional. Description of the external link.
4479                    pub description: std::string::String,
4480
4481                    pub(crate) _unknown_fields:
4482                        serde_json::Map<std::string::String, serde_json::Value>,
4483                }
4484
4485                impl DrillDownExternalLink {
4486                    /// Creates a new default instance.
4487                    pub fn new() -> Self {
4488                        std::default::Default::default()
4489                    }
4490
4491                    /// Sets the value of [link][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink::link].
4492                    ///
4493                    /// # Example
4494                    /// ```ignore,no_run
4495                    /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink;
4496                    /// let x = DrillDownExternalLink::new().set_link("example");
4497                    /// ```
4498                    pub fn set_link<T: std::convert::Into<std::string::String>>(
4499                        mut self,
4500                        v: T,
4501                    ) -> Self {
4502                        self.link = v.into();
4503                        self
4504                    }
4505
4506                    /// Sets the value of [description][crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink::description].
4507                    ///
4508                    /// # Example
4509                    /// ```ignore,no_run
4510                    /// # use google_cloud_chronicle_v1::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink;
4511                    /// let x = DrillDownExternalLink::new().set_description("example");
4512                    /// ```
4513                    pub fn set_description<T: std::convert::Into<std::string::String>>(
4514                        mut self,
4515                        v: T,
4516                    ) -> Self {
4517                        self.description = v.into();
4518                        self
4519                    }
4520                }
4521
4522                impl wkt::message::Message for DrillDownExternalLink {
4523                    fn typename() -> &'static str {
4524                        "type.googleapis.com/google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink"
4525                    }
4526                }
4527
4528                /// Action to be performed on drill down.
4529                #[derive(Clone, Debug, PartialEq)]
4530                #[non_exhaustive]
4531                pub enum Action {
4532                    /// Drill down query action config.
4533                    Query(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownQuery>),
4534                    /// Drill down filter action config.
4535                    Filter(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownFilter>),
4536                    /// Drill down external link action config.
4537                    ExternalLink(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::custom_drill_down_settings::DrillDownExternalLink>),
4538                }
4539            }
4540
4541            /// Drill down settings.
4542            #[derive(Clone, Debug, PartialEq)]
4543            #[non_exhaustive]
4544            pub enum Settings {
4545                /// Default drill down settings.
4546                DefaultSettings(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::DefaultDrillDownSettings>),
4547                /// Custom drill down settings.
4548                CustomSettings(std::boxed::Box<crate::model::dashboard_chart::drill_down_config::drill_down::CustomDrillDownSettings>),
4549            }
4550        }
4551    }
4552}
4553
4554/// Button config for a chart.
4555#[derive(Clone, Default, PartialEq)]
4556#[non_exhaustive]
4557pub struct Button {
4558    #[allow(missing_docs)]
4559    pub label: std::string::String,
4560
4561    #[allow(missing_docs)]
4562    pub hyperlink: std::string::String,
4563
4564    #[allow(missing_docs)]
4565    pub description: std::string::String,
4566
4567    /// Optional. Whether to open the link in a new tab.
4568    pub new_tab: bool,
4569
4570    #[allow(missing_docs)]
4571    pub properties: std::option::Option<crate::model::button::Properties>,
4572
4573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4574}
4575
4576impl Button {
4577    /// Creates a new default instance.
4578    pub fn new() -> Self {
4579        std::default::Default::default()
4580    }
4581
4582    /// Sets the value of [label][crate::model::Button::label].
4583    ///
4584    /// # Example
4585    /// ```ignore,no_run
4586    /// # use google_cloud_chronicle_v1::model::Button;
4587    /// let x = Button::new().set_label("example");
4588    /// ```
4589    pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4590        self.label = v.into();
4591        self
4592    }
4593
4594    /// Sets the value of [hyperlink][crate::model::Button::hyperlink].
4595    ///
4596    /// # Example
4597    /// ```ignore,no_run
4598    /// # use google_cloud_chronicle_v1::model::Button;
4599    /// let x = Button::new().set_hyperlink("example");
4600    /// ```
4601    pub fn set_hyperlink<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4602        self.hyperlink = v.into();
4603        self
4604    }
4605
4606    /// Sets the value of [description][crate::model::Button::description].
4607    ///
4608    /// # Example
4609    /// ```ignore,no_run
4610    /// # use google_cloud_chronicle_v1::model::Button;
4611    /// let x = Button::new().set_description("example");
4612    /// ```
4613    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4614        self.description = v.into();
4615        self
4616    }
4617
4618    /// Sets the value of [new_tab][crate::model::Button::new_tab].
4619    ///
4620    /// # Example
4621    /// ```ignore,no_run
4622    /// # use google_cloud_chronicle_v1::model::Button;
4623    /// let x = Button::new().set_new_tab(true);
4624    /// ```
4625    pub fn set_new_tab<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4626        self.new_tab = v.into();
4627        self
4628    }
4629
4630    /// Sets the value of [properties][crate::model::Button::properties].
4631    ///
4632    /// # Example
4633    /// ```ignore,no_run
4634    /// # use google_cloud_chronicle_v1::model::Button;
4635    /// use google_cloud_chronicle_v1::model::button::Properties;
4636    /// let x = Button::new().set_properties(Properties::default()/* use setters */);
4637    /// ```
4638    pub fn set_properties<T>(mut self, v: T) -> Self
4639    where
4640        T: std::convert::Into<crate::model::button::Properties>,
4641    {
4642        self.properties = std::option::Option::Some(v.into());
4643        self
4644    }
4645
4646    /// Sets or clears the value of [properties][crate::model::Button::properties].
4647    ///
4648    /// # Example
4649    /// ```ignore,no_run
4650    /// # use google_cloud_chronicle_v1::model::Button;
4651    /// use google_cloud_chronicle_v1::model::button::Properties;
4652    /// let x = Button::new().set_or_clear_properties(Some(Properties::default()/* use setters */));
4653    /// let x = Button::new().set_or_clear_properties(None::<Properties>);
4654    /// ```
4655    pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
4656    where
4657        T: std::convert::Into<crate::model::button::Properties>,
4658    {
4659        self.properties = v.map(|x| x.into());
4660        self
4661    }
4662}
4663
4664impl wkt::message::Message for Button {
4665    fn typename() -> &'static str {
4666        "type.googleapis.com/google.cloud.chronicle.v1.Button"
4667    }
4668}
4669
4670/// Defines additional types related to [Button].
4671pub mod button {
4672    #[allow(unused_imports)]
4673    use super::*;
4674
4675    #[allow(missing_docs)]
4676    #[derive(Clone, Default, PartialEq)]
4677    #[non_exhaustive]
4678    pub struct Properties {
4679        #[allow(missing_docs)]
4680        pub color: std::string::String,
4681
4682        #[allow(missing_docs)]
4683        pub button_style: crate::model::ButtonStyle,
4684
4685        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4686    }
4687
4688    impl Properties {
4689        /// Creates a new default instance.
4690        pub fn new() -> Self {
4691            std::default::Default::default()
4692        }
4693
4694        /// Sets the value of [color][crate::model::button::Properties::color].
4695        ///
4696        /// # Example
4697        /// ```ignore,no_run
4698        /// # use google_cloud_chronicle_v1::model::button::Properties;
4699        /// let x = Properties::new().set_color("example");
4700        /// ```
4701        pub fn set_color<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4702            self.color = v.into();
4703            self
4704        }
4705
4706        /// Sets the value of [button_style][crate::model::button::Properties::button_style].
4707        ///
4708        /// # Example
4709        /// ```ignore,no_run
4710        /// # use google_cloud_chronicle_v1::model::button::Properties;
4711        /// use google_cloud_chronicle_v1::model::ButtonStyle;
4712        /// let x0 = Properties::new().set_button_style(ButtonStyle::Filled);
4713        /// let x1 = Properties::new().set_button_style(ButtonStyle::Outlined);
4714        /// let x2 = Properties::new().set_button_style(ButtonStyle::Transparent);
4715        /// ```
4716        pub fn set_button_style<T: std::convert::Into<crate::model::ButtonStyle>>(
4717            mut self,
4718            v: T,
4719        ) -> Self {
4720            self.button_style = v.into();
4721            self
4722        }
4723    }
4724
4725    impl wkt::message::Message for Properties {
4726        fn typename() -> &'static str {
4727            "type.googleapis.com/google.cloud.chronicle.v1.Button.Properties"
4728        }
4729    }
4730}
4731
4732/// Markdown config for a dashboard tile.
4733#[derive(Clone, Default, PartialEq)]
4734#[non_exhaustive]
4735pub struct Markdown {
4736    /// Required. Markdown content.
4737    pub content: std::string::String,
4738
4739    /// Optional. Properties for the markdown.
4740    pub properties: std::option::Option<crate::model::markdown::MarkdownProperties>,
4741
4742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4743}
4744
4745impl Markdown {
4746    /// Creates a new default instance.
4747    pub fn new() -> Self {
4748        std::default::Default::default()
4749    }
4750
4751    /// Sets the value of [content][crate::model::Markdown::content].
4752    ///
4753    /// # Example
4754    /// ```ignore,no_run
4755    /// # use google_cloud_chronicle_v1::model::Markdown;
4756    /// let x = Markdown::new().set_content("example");
4757    /// ```
4758    pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4759        self.content = v.into();
4760        self
4761    }
4762
4763    /// Sets the value of [properties][crate::model::Markdown::properties].
4764    ///
4765    /// # Example
4766    /// ```ignore,no_run
4767    /// # use google_cloud_chronicle_v1::model::Markdown;
4768    /// use google_cloud_chronicle_v1::model::markdown::MarkdownProperties;
4769    /// let x = Markdown::new().set_properties(MarkdownProperties::default()/* use setters */);
4770    /// ```
4771    pub fn set_properties<T>(mut self, v: T) -> Self
4772    where
4773        T: std::convert::Into<crate::model::markdown::MarkdownProperties>,
4774    {
4775        self.properties = std::option::Option::Some(v.into());
4776        self
4777    }
4778
4779    /// Sets or clears the value of [properties][crate::model::Markdown::properties].
4780    ///
4781    /// # Example
4782    /// ```ignore,no_run
4783    /// # use google_cloud_chronicle_v1::model::Markdown;
4784    /// use google_cloud_chronicle_v1::model::markdown::MarkdownProperties;
4785    /// let x = Markdown::new().set_or_clear_properties(Some(MarkdownProperties::default()/* use setters */));
4786    /// let x = Markdown::new().set_or_clear_properties(None::<MarkdownProperties>);
4787    /// ```
4788    pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
4789    where
4790        T: std::convert::Into<crate::model::markdown::MarkdownProperties>,
4791    {
4792        self.properties = v.map(|x| x.into());
4793        self
4794    }
4795}
4796
4797impl wkt::message::Message for Markdown {
4798    fn typename() -> &'static str {
4799        "type.googleapis.com/google.cloud.chronicle.v1.Markdown"
4800    }
4801}
4802
4803/// Defines additional types related to [Markdown].
4804pub mod markdown {
4805    #[allow(unused_imports)]
4806    use super::*;
4807
4808    /// Properties for the markdown.
4809    #[derive(Clone, Default, PartialEq)]
4810    #[non_exhaustive]
4811    pub struct MarkdownProperties {
4812        /// Optional. Background color of the markdown.
4813        pub background_color: std::string::String,
4814
4815        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4816    }
4817
4818    impl MarkdownProperties {
4819        /// Creates a new default instance.
4820        pub fn new() -> Self {
4821            std::default::Default::default()
4822        }
4823
4824        /// Sets the value of [background_color][crate::model::markdown::MarkdownProperties::background_color].
4825        ///
4826        /// # Example
4827        /// ```ignore,no_run
4828        /// # use google_cloud_chronicle_v1::model::markdown::MarkdownProperties;
4829        /// let x = MarkdownProperties::new().set_background_color("example");
4830        /// ```
4831        pub fn set_background_color<T: std::convert::Into<std::string::String>>(
4832            mut self,
4833            v: T,
4834        ) -> Self {
4835            self.background_color = v.into();
4836            self
4837        }
4838    }
4839
4840    impl wkt::message::Message for MarkdownProperties {
4841        fn typename() -> &'static str {
4842            "type.googleapis.com/google.cloud.chronicle.v1.Markdown.MarkdownProperties"
4843        }
4844    }
4845}
4846
4847/// Request message to get a dashboard chart.
4848#[derive(Clone, Default, PartialEq)]
4849#[non_exhaustive]
4850pub struct GetDashboardChartRequest {
4851    /// Required. The name of the dashboardChart to retrieve.
4852    /// Format:
4853    /// projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}
4854    pub name: std::string::String,
4855
4856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4857}
4858
4859impl GetDashboardChartRequest {
4860    /// Creates a new default instance.
4861    pub fn new() -> Self {
4862        std::default::Default::default()
4863    }
4864
4865    /// Sets the value of [name][crate::model::GetDashboardChartRequest::name].
4866    ///
4867    /// # Example
4868    /// ```ignore,no_run
4869    /// # use google_cloud_chronicle_v1::model::GetDashboardChartRequest;
4870    /// # let project_id = "project_id";
4871    /// # let location_id = "location_id";
4872    /// # let instance_id = "instance_id";
4873    /// # let chart_id = "chart_id";
4874    /// let x = GetDashboardChartRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
4875    /// ```
4876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4877        self.name = v.into();
4878        self
4879    }
4880}
4881
4882impl wkt::message::Message for GetDashboardChartRequest {
4883    fn typename() -> &'static str {
4884        "type.googleapis.com/google.cloud.chronicle.v1.GetDashboardChartRequest"
4885    }
4886}
4887
4888/// Request message to get dashboard charts in batch.
4889#[derive(Clone, Default, PartialEq)]
4890#[non_exhaustive]
4891pub struct BatchGetDashboardChartsRequest {
4892    /// Required. The parent resource shared by all dashboard charts being
4893    /// retrieved. Format:
4894    /// projects/{project}/locations/{location}/instances/{instance} If this is
4895    /// set, the parent of all of the dashboard charts specified in `names` must
4896    /// match this field.
4897    pub parent: std::string::String,
4898
4899    /// Required. The names of the dashboard charts to get.
4900    pub names: std::vec::Vec<std::string::String>,
4901
4902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4903}
4904
4905impl BatchGetDashboardChartsRequest {
4906    /// Creates a new default instance.
4907    pub fn new() -> Self {
4908        std::default::Default::default()
4909    }
4910
4911    /// Sets the value of [parent][crate::model::BatchGetDashboardChartsRequest::parent].
4912    ///
4913    /// # Example
4914    /// ```ignore,no_run
4915    /// # use google_cloud_chronicle_v1::model::BatchGetDashboardChartsRequest;
4916    /// # let project_id = "project_id";
4917    /// # let location_id = "location_id";
4918    /// # let instance_id = "instance_id";
4919    /// let x = BatchGetDashboardChartsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
4920    /// ```
4921    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4922        self.parent = v.into();
4923        self
4924    }
4925
4926    /// Sets the value of [names][crate::model::BatchGetDashboardChartsRequest::names].
4927    ///
4928    /// # Example
4929    /// ```ignore,no_run
4930    /// # use google_cloud_chronicle_v1::model::BatchGetDashboardChartsRequest;
4931    /// let x = BatchGetDashboardChartsRequest::new().set_names(["a", "b", "c"]);
4932    /// ```
4933    pub fn set_names<T, V>(mut self, v: T) -> Self
4934    where
4935        T: std::iter::IntoIterator<Item = V>,
4936        V: std::convert::Into<std::string::String>,
4937    {
4938        use std::iter::Iterator;
4939        self.names = v.into_iter().map(|i| i.into()).collect();
4940        self
4941    }
4942}
4943
4944impl wkt::message::Message for BatchGetDashboardChartsRequest {
4945    fn typename() -> &'static str {
4946        "type.googleapis.com/google.cloud.chronicle.v1.BatchGetDashboardChartsRequest"
4947    }
4948}
4949
4950/// Response message for getting dashboard charts in batch.
4951#[derive(Clone, Default, PartialEq)]
4952#[non_exhaustive]
4953pub struct BatchGetDashboardChartsResponse {
4954    /// The dashboardCharts from the specified chronicle instance.
4955    pub dashboard_charts: std::vec::Vec<crate::model::DashboardChart>,
4956
4957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4958}
4959
4960impl BatchGetDashboardChartsResponse {
4961    /// Creates a new default instance.
4962    pub fn new() -> Self {
4963        std::default::Default::default()
4964    }
4965
4966    /// Sets the value of [dashboard_charts][crate::model::BatchGetDashboardChartsResponse::dashboard_charts].
4967    ///
4968    /// # Example
4969    /// ```ignore,no_run
4970    /// # use google_cloud_chronicle_v1::model::BatchGetDashboardChartsResponse;
4971    /// use google_cloud_chronicle_v1::model::DashboardChart;
4972    /// let x = BatchGetDashboardChartsResponse::new()
4973    ///     .set_dashboard_charts([
4974    ///         DashboardChart::default()/* use setters */,
4975    ///         DashboardChart::default()/* use (different) setters */,
4976    ///     ]);
4977    /// ```
4978    pub fn set_dashboard_charts<T, V>(mut self, v: T) -> Self
4979    where
4980        T: std::iter::IntoIterator<Item = V>,
4981        V: std::convert::Into<crate::model::DashboardChart>,
4982    {
4983        use std::iter::Iterator;
4984        self.dashboard_charts = v.into_iter().map(|i| i.into()).collect();
4985        self
4986    }
4987}
4988
4989impl wkt::message::Message for BatchGetDashboardChartsResponse {
4990    fn typename() -> &'static str {
4991        "type.googleapis.com/google.cloud.chronicle.v1.BatchGetDashboardChartsResponse"
4992    }
4993}
4994
4995/// DashboardQuery resource.
4996#[derive(Clone, Default, PartialEq)]
4997#[non_exhaustive]
4998pub struct DashboardQuery {
4999    /// Output only. Name of the dashboardQuery.
5000    pub name: std::string::String,
5001
5002    /// Required. Search query string.
5003    pub query: std::string::String,
5004
5005    /// Required. Inputs to the query.
5006    pub input: std::option::Option<crate::model::dashboard_query::Input>,
5007
5008    /// Output only. DashboardChart this query belongs to.
5009    pub dashboard_chart: std::string::String,
5010
5011    /// Optional. This checksum is computed by the server based on the value of
5012    /// other fields, and may be sent on update and delete requests to ensure the
5013    /// client has an up-to-date value before proceeding.
5014    pub etag: std::string::String,
5015
5016    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5017}
5018
5019impl DashboardQuery {
5020    /// Creates a new default instance.
5021    pub fn new() -> Self {
5022        std::default::Default::default()
5023    }
5024
5025    /// Sets the value of [name][crate::model::DashboardQuery::name].
5026    ///
5027    /// # Example
5028    /// ```ignore,no_run
5029    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5030    /// # let project_id = "project_id";
5031    /// # let location_id = "location_id";
5032    /// # let instance_id = "instance_id";
5033    /// # let query_id = "query_id";
5034    /// let x = DashboardQuery::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardQueries/{query_id}"));
5035    /// ```
5036    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5037        self.name = v.into();
5038        self
5039    }
5040
5041    /// Sets the value of [query][crate::model::DashboardQuery::query].
5042    ///
5043    /// # Example
5044    /// ```ignore,no_run
5045    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5046    /// let x = DashboardQuery::new().set_query("example");
5047    /// ```
5048    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5049        self.query = v.into();
5050        self
5051    }
5052
5053    /// Sets the value of [input][crate::model::DashboardQuery::input].
5054    ///
5055    /// # Example
5056    /// ```ignore,no_run
5057    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5058    /// use google_cloud_chronicle_v1::model::dashboard_query::Input;
5059    /// let x = DashboardQuery::new().set_input(Input::default()/* use setters */);
5060    /// ```
5061    pub fn set_input<T>(mut self, v: T) -> Self
5062    where
5063        T: std::convert::Into<crate::model::dashboard_query::Input>,
5064    {
5065        self.input = std::option::Option::Some(v.into());
5066        self
5067    }
5068
5069    /// Sets or clears the value of [input][crate::model::DashboardQuery::input].
5070    ///
5071    /// # Example
5072    /// ```ignore,no_run
5073    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5074    /// use google_cloud_chronicle_v1::model::dashboard_query::Input;
5075    /// let x = DashboardQuery::new().set_or_clear_input(Some(Input::default()/* use setters */));
5076    /// let x = DashboardQuery::new().set_or_clear_input(None::<Input>);
5077    /// ```
5078    pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
5079    where
5080        T: std::convert::Into<crate::model::dashboard_query::Input>,
5081    {
5082        self.input = v.map(|x| x.into());
5083        self
5084    }
5085
5086    /// Sets the value of [dashboard_chart][crate::model::DashboardQuery::dashboard_chart].
5087    ///
5088    /// # Example
5089    /// ```ignore,no_run
5090    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5091    /// # let project_id = "project_id";
5092    /// # let location_id = "location_id";
5093    /// # let instance_id = "instance_id";
5094    /// # let chart_id = "chart_id";
5095    /// let x = DashboardQuery::new().set_dashboard_chart(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
5096    /// ```
5097    pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5098        self.dashboard_chart = v.into();
5099        self
5100    }
5101
5102    /// Sets the value of [etag][crate::model::DashboardQuery::etag].
5103    ///
5104    /// # Example
5105    /// ```ignore,no_run
5106    /// # use google_cloud_chronicle_v1::model::DashboardQuery;
5107    /// let x = DashboardQuery::new().set_etag("example");
5108    /// ```
5109    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5110        self.etag = v.into();
5111        self
5112    }
5113}
5114
5115impl wkt::message::Message for DashboardQuery {
5116    fn typename() -> &'static str {
5117        "type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery"
5118    }
5119}
5120
5121/// Defines additional types related to [DashboardQuery].
5122pub mod dashboard_query {
5123    #[allow(unused_imports)]
5124    use super::*;
5125
5126    /// Input to the query like time window.
5127    #[derive(Clone, Default, PartialEq)]
5128    #[non_exhaustive]
5129    pub struct Input {
5130        #[allow(missing_docs)]
5131        pub time_input: std::option::Option<crate::model::dashboard_query::input::TimeInput>,
5132
5133        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5134    }
5135
5136    impl Input {
5137        /// Creates a new default instance.
5138        pub fn new() -> Self {
5139            std::default::Default::default()
5140        }
5141
5142        /// Sets the value of [time_input][crate::model::dashboard_query::Input::time_input].
5143        ///
5144        /// Note that all the setters affecting `time_input` are mutually
5145        /// exclusive.
5146        ///
5147        /// # Example
5148        /// ```ignore,no_run
5149        /// # use google_cloud_chronicle_v1::model::dashboard_query::Input;
5150        /// use google_cloud_type::model::Interval;
5151        /// let x = Input::new().set_time_input(Some(
5152        ///     google_cloud_chronicle_v1::model::dashboard_query::input::TimeInput::TimeWindow(Interval::default().into())));
5153        /// ```
5154        pub fn set_time_input<
5155            T: std::convert::Into<
5156                    std::option::Option<crate::model::dashboard_query::input::TimeInput>,
5157                >,
5158        >(
5159            mut self,
5160            v: T,
5161        ) -> Self {
5162            self.time_input = v.into();
5163            self
5164        }
5165
5166        /// The value of [time_input][crate::model::dashboard_query::Input::time_input]
5167        /// if it holds a `TimeWindow`, `None` if the field is not set or
5168        /// holds a different branch.
5169        pub fn time_window(
5170            &self,
5171        ) -> std::option::Option<&std::boxed::Box<google_cloud_type::model::Interval>> {
5172            #[allow(unreachable_patterns)]
5173            self.time_input.as_ref().and_then(|v| match v {
5174                crate::model::dashboard_query::input::TimeInput::TimeWindow(v) => {
5175                    std::option::Option::Some(v)
5176                }
5177                _ => std::option::Option::None,
5178            })
5179        }
5180
5181        /// Sets the value of [time_input][crate::model::dashboard_query::Input::time_input]
5182        /// to hold a `TimeWindow`.
5183        ///
5184        /// Note that all the setters affecting `time_input` are
5185        /// mutually exclusive.
5186        ///
5187        /// # Example
5188        /// ```ignore,no_run
5189        /// # use google_cloud_chronicle_v1::model::dashboard_query::Input;
5190        /// use google_cloud_type::model::Interval;
5191        /// let x = Input::new().set_time_window(Interval::default()/* use setters */);
5192        /// assert!(x.time_window().is_some());
5193        /// assert!(x.relative_time().is_none());
5194        /// ```
5195        pub fn set_time_window<
5196            T: std::convert::Into<std::boxed::Box<google_cloud_type::model::Interval>>,
5197        >(
5198            mut self,
5199            v: T,
5200        ) -> Self {
5201            self.time_input = std::option::Option::Some(
5202                crate::model::dashboard_query::input::TimeInput::TimeWindow(v.into()),
5203            );
5204            self
5205        }
5206
5207        /// The value of [time_input][crate::model::dashboard_query::Input::time_input]
5208        /// if it holds a `RelativeTime`, `None` if the field is not set or
5209        /// holds a different branch.
5210        pub fn relative_time(
5211            &self,
5212        ) -> std::option::Option<&std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>>
5213        {
5214            #[allow(unreachable_patterns)]
5215            self.time_input.as_ref().and_then(|v| match v {
5216                crate::model::dashboard_query::input::TimeInput::RelativeTime(v) => {
5217                    std::option::Option::Some(v)
5218                }
5219                _ => std::option::Option::None,
5220            })
5221        }
5222
5223        /// Sets the value of [time_input][crate::model::dashboard_query::Input::time_input]
5224        /// to hold a `RelativeTime`.
5225        ///
5226        /// Note that all the setters affecting `time_input` are
5227        /// mutually exclusive.
5228        ///
5229        /// # Example
5230        /// ```ignore,no_run
5231        /// # use google_cloud_chronicle_v1::model::dashboard_query::Input;
5232        /// use google_cloud_chronicle_v1::model::dashboard_query::input::RelativeTime;
5233        /// let x = Input::new().set_relative_time(RelativeTime::default()/* use setters */);
5234        /// assert!(x.relative_time().is_some());
5235        /// assert!(x.time_window().is_none());
5236        /// ```
5237        pub fn set_relative_time<
5238            T: std::convert::Into<std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>>,
5239        >(
5240            mut self,
5241            v: T,
5242        ) -> Self {
5243            self.time_input = std::option::Option::Some(
5244                crate::model::dashboard_query::input::TimeInput::RelativeTime(v.into()),
5245            );
5246            self
5247        }
5248    }
5249
5250    impl wkt::message::Message for Input {
5251        fn typename() -> &'static str {
5252            "type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery.Input"
5253        }
5254    }
5255
5256    /// Defines additional types related to [Input].
5257    pub mod input {
5258        #[allow(unused_imports)]
5259        use super::*;
5260
5261        /// time representation for last x units.
5262        #[derive(Clone, Default, PartialEq)]
5263        #[non_exhaustive]
5264        pub struct RelativeTime {
5265            #[allow(missing_docs)]
5266            pub time_unit: crate::model::TimeUnit,
5267
5268            #[allow(missing_docs)]
5269            pub start_time_val: i64,
5270
5271            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5272        }
5273
5274        impl RelativeTime {
5275            /// Creates a new default instance.
5276            pub fn new() -> Self {
5277                std::default::Default::default()
5278            }
5279
5280            /// Sets the value of [time_unit][crate::model::dashboard_query::input::RelativeTime::time_unit].
5281            ///
5282            /// # Example
5283            /// ```ignore,no_run
5284            /// # use google_cloud_chronicle_v1::model::dashboard_query::input::RelativeTime;
5285            /// use google_cloud_chronicle_v1::model::TimeUnit;
5286            /// let x0 = RelativeTime::new().set_time_unit(TimeUnit::Second);
5287            /// let x1 = RelativeTime::new().set_time_unit(TimeUnit::Minute);
5288            /// let x2 = RelativeTime::new().set_time_unit(TimeUnit::Hour);
5289            /// ```
5290            pub fn set_time_unit<T: std::convert::Into<crate::model::TimeUnit>>(
5291                mut self,
5292                v: T,
5293            ) -> Self {
5294                self.time_unit = v.into();
5295                self
5296            }
5297
5298            /// Sets the value of [start_time_val][crate::model::dashboard_query::input::RelativeTime::start_time_val].
5299            ///
5300            /// # Example
5301            /// ```ignore,no_run
5302            /// # use google_cloud_chronicle_v1::model::dashboard_query::input::RelativeTime;
5303            /// let x = RelativeTime::new().set_start_time_val(42);
5304            /// ```
5305            pub fn set_start_time_val<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5306                self.start_time_val = v.into();
5307                self
5308            }
5309        }
5310
5311        impl wkt::message::Message for RelativeTime {
5312            fn typename() -> &'static str {
5313                "type.googleapis.com/google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime"
5314            }
5315        }
5316
5317        #[allow(missing_docs)]
5318        #[derive(Clone, Debug, PartialEq)]
5319        #[non_exhaustive]
5320        pub enum TimeInput {
5321            /// time range to fetch the data for.
5322            TimeWindow(std::boxed::Box<google_cloud_type::model::Interval>),
5323            /// time range for last x units.
5324            RelativeTime(std::boxed::Box<crate::model::dashboard_query::input::RelativeTime>),
5325        }
5326    }
5327}
5328
5329/// Request message to get a dashboard query.
5330#[derive(Clone, Default, PartialEq)]
5331#[non_exhaustive]
5332pub struct GetDashboardQueryRequest {
5333    /// Required. The name of the dashboardQuery to retrieve.
5334    /// Format:
5335    /// projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}
5336    pub name: std::string::String,
5337
5338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5339}
5340
5341impl GetDashboardQueryRequest {
5342    /// Creates a new default instance.
5343    pub fn new() -> Self {
5344        std::default::Default::default()
5345    }
5346
5347    /// Sets the value of [name][crate::model::GetDashboardQueryRequest::name].
5348    ///
5349    /// # Example
5350    /// ```ignore,no_run
5351    /// # use google_cloud_chronicle_v1::model::GetDashboardQueryRequest;
5352    /// # let project_id = "project_id";
5353    /// # let location_id = "location_id";
5354    /// # let instance_id = "instance_id";
5355    /// # let query_id = "query_id";
5356    /// let x = GetDashboardQueryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardQueries/{query_id}"));
5357    /// ```
5358    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5359        self.name = v.into();
5360        self
5361    }
5362}
5363
5364impl wkt::message::Message for GetDashboardQueryRequest {
5365    fn typename() -> &'static str {
5366        "type.googleapis.com/google.cloud.chronicle.v1.GetDashboardQueryRequest"
5367    }
5368}
5369
5370/// Request message to execute a dashboard query.
5371#[derive(Clone, Default, PartialEq)]
5372#[non_exhaustive]
5373pub struct ExecuteDashboardQueryRequest {
5374    /// Required. The parent, under which to run this dashboardQuery.
5375    /// Format: projects/{project}/locations/{location}/instances/{instance}
5376    pub parent: std::string::String,
5377
5378    /// Required. The query to execute and get results back for.
5379    /// QueryID or 'query', 'input.time_window' fields will be used. Use
5380    /// 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard
5381    /// query.
5382    pub query: std::option::Option<crate::model::DashboardQuery>,
5383
5384    /// Optional. Dashboard level filters other than query string.
5385    pub filters: std::vec::Vec<crate::model::DashboardFilter>,
5386
5387    /// Optional. When true, the backend would read from the database, rather than
5388    /// fetching data directly from the cache.
5389    pub clear_cache: bool,
5390
5391    /// Optional. When true, the backend will execute the query against the
5392    /// previous time range of the query.
5393    pub use_previous_time_range: bool,
5394
5395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5396}
5397
5398impl ExecuteDashboardQueryRequest {
5399    /// Creates a new default instance.
5400    pub fn new() -> Self {
5401        std::default::Default::default()
5402    }
5403
5404    /// Sets the value of [parent][crate::model::ExecuteDashboardQueryRequest::parent].
5405    ///
5406    /// # Example
5407    /// ```ignore,no_run
5408    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5409    /// # let project_id = "project_id";
5410    /// # let location_id = "location_id";
5411    /// # let instance_id = "instance_id";
5412    /// let x = ExecuteDashboardQueryRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
5413    /// ```
5414    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5415        self.parent = v.into();
5416        self
5417    }
5418
5419    /// Sets the value of [query][crate::model::ExecuteDashboardQueryRequest::query].
5420    ///
5421    /// # Example
5422    /// ```ignore,no_run
5423    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5424    /// use google_cloud_chronicle_v1::model::DashboardQuery;
5425    /// let x = ExecuteDashboardQueryRequest::new().set_query(DashboardQuery::default()/* use setters */);
5426    /// ```
5427    pub fn set_query<T>(mut self, v: T) -> Self
5428    where
5429        T: std::convert::Into<crate::model::DashboardQuery>,
5430    {
5431        self.query = std::option::Option::Some(v.into());
5432        self
5433    }
5434
5435    /// Sets or clears the value of [query][crate::model::ExecuteDashboardQueryRequest::query].
5436    ///
5437    /// # Example
5438    /// ```ignore,no_run
5439    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5440    /// use google_cloud_chronicle_v1::model::DashboardQuery;
5441    /// let x = ExecuteDashboardQueryRequest::new().set_or_clear_query(Some(DashboardQuery::default()/* use setters */));
5442    /// let x = ExecuteDashboardQueryRequest::new().set_or_clear_query(None::<DashboardQuery>);
5443    /// ```
5444    pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
5445    where
5446        T: std::convert::Into<crate::model::DashboardQuery>,
5447    {
5448        self.query = v.map(|x| x.into());
5449        self
5450    }
5451
5452    /// Sets the value of [filters][crate::model::ExecuteDashboardQueryRequest::filters].
5453    ///
5454    /// # Example
5455    /// ```ignore,no_run
5456    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5457    /// use google_cloud_chronicle_v1::model::DashboardFilter;
5458    /// let x = ExecuteDashboardQueryRequest::new()
5459    ///     .set_filters([
5460    ///         DashboardFilter::default()/* use setters */,
5461    ///         DashboardFilter::default()/* use (different) setters */,
5462    ///     ]);
5463    /// ```
5464    pub fn set_filters<T, V>(mut self, v: T) -> Self
5465    where
5466        T: std::iter::IntoIterator<Item = V>,
5467        V: std::convert::Into<crate::model::DashboardFilter>,
5468    {
5469        use std::iter::Iterator;
5470        self.filters = v.into_iter().map(|i| i.into()).collect();
5471        self
5472    }
5473
5474    /// Sets the value of [clear_cache][crate::model::ExecuteDashboardQueryRequest::clear_cache].
5475    ///
5476    /// # Example
5477    /// ```ignore,no_run
5478    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5479    /// let x = ExecuteDashboardQueryRequest::new().set_clear_cache(true);
5480    /// ```
5481    pub fn set_clear_cache<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5482        self.clear_cache = v.into();
5483        self
5484    }
5485
5486    /// Sets the value of [use_previous_time_range][crate::model::ExecuteDashboardQueryRequest::use_previous_time_range].
5487    ///
5488    /// # Example
5489    /// ```ignore,no_run
5490    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryRequest;
5491    /// let x = ExecuteDashboardQueryRequest::new().set_use_previous_time_range(true);
5492    /// ```
5493    pub fn set_use_previous_time_range<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5494        self.use_previous_time_range = v.into();
5495        self
5496    }
5497}
5498
5499impl wkt::message::Message for ExecuteDashboardQueryRequest {
5500    fn typename() -> &'static str {
5501        "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryRequest"
5502    }
5503}
5504
5505/// Runtime error for a dashboard query.
5506#[derive(Clone, Default, PartialEq)]
5507#[non_exhaustive]
5508pub struct QueryRuntimeError {
5509    /// Short Description of the error.
5510    pub error_title: std::string::String,
5511
5512    /// Error message
5513    pub error_description: std::string::String,
5514
5515    /// Severity of the error.
5516    pub error_severity: crate::model::query_runtime_error::ErrorSeverity,
5517
5518    /// Metadata for the error.
5519    pub metadata: std::vec::Vec<crate::model::query_runtime_error::QueryRuntimeErrorMetadata>,
5520
5521    /// Reason for the error.
5522    pub warning_reason: crate::model::query_runtime_error::WarningReason,
5523
5524    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5525}
5526
5527impl QueryRuntimeError {
5528    /// Creates a new default instance.
5529    pub fn new() -> Self {
5530        std::default::Default::default()
5531    }
5532
5533    /// Sets the value of [error_title][crate::model::QueryRuntimeError::error_title].
5534    ///
5535    /// # Example
5536    /// ```ignore,no_run
5537    /// # use google_cloud_chronicle_v1::model::QueryRuntimeError;
5538    /// let x = QueryRuntimeError::new().set_error_title("example");
5539    /// ```
5540    pub fn set_error_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5541        self.error_title = v.into();
5542        self
5543    }
5544
5545    /// Sets the value of [error_description][crate::model::QueryRuntimeError::error_description].
5546    ///
5547    /// # Example
5548    /// ```ignore,no_run
5549    /// # use google_cloud_chronicle_v1::model::QueryRuntimeError;
5550    /// let x = QueryRuntimeError::new().set_error_description("example");
5551    /// ```
5552    pub fn set_error_description<T: std::convert::Into<std::string::String>>(
5553        mut self,
5554        v: T,
5555    ) -> Self {
5556        self.error_description = v.into();
5557        self
5558    }
5559
5560    /// Sets the value of [error_severity][crate::model::QueryRuntimeError::error_severity].
5561    ///
5562    /// # Example
5563    /// ```ignore,no_run
5564    /// # use google_cloud_chronicle_v1::model::QueryRuntimeError;
5565    /// use google_cloud_chronicle_v1::model::query_runtime_error::ErrorSeverity;
5566    /// let x0 = QueryRuntimeError::new().set_error_severity(ErrorSeverity::Warning);
5567    /// let x1 = QueryRuntimeError::new().set_error_severity(ErrorSeverity::Severe);
5568    /// ```
5569    pub fn set_error_severity<
5570        T: std::convert::Into<crate::model::query_runtime_error::ErrorSeverity>,
5571    >(
5572        mut self,
5573        v: T,
5574    ) -> Self {
5575        self.error_severity = v.into();
5576        self
5577    }
5578
5579    /// Sets the value of [metadata][crate::model::QueryRuntimeError::metadata].
5580    ///
5581    /// # Example
5582    /// ```ignore,no_run
5583    /// # use google_cloud_chronicle_v1::model::QueryRuntimeError;
5584    /// use google_cloud_chronicle_v1::model::query_runtime_error::QueryRuntimeErrorMetadata;
5585    /// let x = QueryRuntimeError::new()
5586    ///     .set_metadata([
5587    ///         QueryRuntimeErrorMetadata::default()/* use setters */,
5588    ///         QueryRuntimeErrorMetadata::default()/* use (different) setters */,
5589    ///     ]);
5590    /// ```
5591    pub fn set_metadata<T, V>(mut self, v: T) -> Self
5592    where
5593        T: std::iter::IntoIterator<Item = V>,
5594        V: std::convert::Into<crate::model::query_runtime_error::QueryRuntimeErrorMetadata>,
5595    {
5596        use std::iter::Iterator;
5597        self.metadata = v.into_iter().map(|i| i.into()).collect();
5598        self
5599    }
5600
5601    /// Sets the value of [warning_reason][crate::model::QueryRuntimeError::warning_reason].
5602    ///
5603    /// # Example
5604    /// ```ignore,no_run
5605    /// # use google_cloud_chronicle_v1::model::QueryRuntimeError;
5606    /// use google_cloud_chronicle_v1::model::query_runtime_error::WarningReason;
5607    /// let x0 = QueryRuntimeError::new().set_warning_reason(WarningReason::RowLimitExceeded);
5608    /// let x1 = QueryRuntimeError::new().set_warning_reason(WarningReason::DefaultRowLimitExceeded);
5609    /// let x2 = QueryRuntimeError::new().set_warning_reason(WarningReason::CuratedQueryDefaultRowLimitExceeded);
5610    /// ```
5611    pub fn set_warning_reason<
5612        T: std::convert::Into<crate::model::query_runtime_error::WarningReason>,
5613    >(
5614        mut self,
5615        v: T,
5616    ) -> Self {
5617        self.warning_reason = v.into();
5618        self
5619    }
5620}
5621
5622impl wkt::message::Message for QueryRuntimeError {
5623    fn typename() -> &'static str {
5624        "type.googleapis.com/google.cloud.chronicle.v1.QueryRuntimeError"
5625    }
5626}
5627
5628/// Defines additional types related to [QueryRuntimeError].
5629pub mod query_runtime_error {
5630    #[allow(unused_imports)]
5631    use super::*;
5632
5633    /// Metadata for the error.
5634    #[derive(Clone, Default, PartialEq)]
5635    #[non_exhaustive]
5636    pub struct QueryRuntimeErrorMetadata {
5637        /// Metadata key.
5638        pub key: crate::model::query_runtime_error::MetadataKey,
5639
5640        /// Metadata value.
5641        pub value: std::string::String,
5642
5643        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5644    }
5645
5646    impl QueryRuntimeErrorMetadata {
5647        /// Creates a new default instance.
5648        pub fn new() -> Self {
5649            std::default::Default::default()
5650        }
5651
5652        /// Sets the value of [key][crate::model::query_runtime_error::QueryRuntimeErrorMetadata::key].
5653        ///
5654        /// # Example
5655        /// ```ignore,no_run
5656        /// # use google_cloud_chronicle_v1::model::query_runtime_error::QueryRuntimeErrorMetadata;
5657        /// use google_cloud_chronicle_v1::model::query_runtime_error::MetadataKey;
5658        /// let x0 = QueryRuntimeErrorMetadata::new().set_key(MetadataKey::RowLimit);
5659        /// ```
5660        pub fn set_key<T: std::convert::Into<crate::model::query_runtime_error::MetadataKey>>(
5661            mut self,
5662            v: T,
5663        ) -> Self {
5664            self.key = v.into();
5665            self
5666        }
5667
5668        /// Sets the value of [value][crate::model::query_runtime_error::QueryRuntimeErrorMetadata::value].
5669        ///
5670        /// # Example
5671        /// ```ignore,no_run
5672        /// # use google_cloud_chronicle_v1::model::query_runtime_error::QueryRuntimeErrorMetadata;
5673        /// let x = QueryRuntimeErrorMetadata::new().set_value("example");
5674        /// ```
5675        pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5676            self.value = v.into();
5677            self
5678        }
5679    }
5680
5681    impl wkt::message::Message for QueryRuntimeErrorMetadata {
5682        fn typename() -> &'static str {
5683            "type.googleapis.com/google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata"
5684        }
5685    }
5686
5687    /// Based on ErrorSeverity, UI will choose to format the error differently.
5688    ///
5689    /// # Working with unknown values
5690    ///
5691    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5692    /// additional enum variants at any time. Adding new variants is not considered
5693    /// a breaking change. Applications should write their code in anticipation of:
5694    ///
5695    /// - New values appearing in future releases of the client library, **and**
5696    /// - New values received dynamically, without application changes.
5697    ///
5698    /// Please consult the [Working with enums] section in the user guide for some
5699    /// guidelines.
5700    ///
5701    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5702    #[derive(Clone, Debug, PartialEq)]
5703    #[non_exhaustive]
5704    pub enum ErrorSeverity {
5705        /// Severity is unknown.
5706        Unspecified,
5707        /// Severity is warning.
5708        Warning,
5709        /// Error is severe.
5710        Severe,
5711        /// If set, the enum was initialized with an unknown value.
5712        ///
5713        /// Applications can examine the value using [ErrorSeverity::value] or
5714        /// [ErrorSeverity::name].
5715        UnknownValue(error_severity::UnknownValue),
5716    }
5717
5718    #[doc(hidden)]
5719    pub mod error_severity {
5720        #[allow(unused_imports)]
5721        use super::*;
5722        #[derive(Clone, Debug, PartialEq)]
5723        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5724    }
5725
5726    impl ErrorSeverity {
5727        /// Gets the enum value.
5728        ///
5729        /// Returns `None` if the enum contains an unknown value deserialized from
5730        /// the string representation of enums.
5731        pub fn value(&self) -> std::option::Option<i32> {
5732            match self {
5733                Self::Unspecified => std::option::Option::Some(0),
5734                Self::Warning => std::option::Option::Some(1),
5735                Self::Severe => std::option::Option::Some(2),
5736                Self::UnknownValue(u) => u.0.value(),
5737            }
5738        }
5739
5740        /// Gets the enum value as a string.
5741        ///
5742        /// Returns `None` if the enum contains an unknown value deserialized from
5743        /// the integer representation of enums.
5744        pub fn name(&self) -> std::option::Option<&str> {
5745            match self {
5746                Self::Unspecified => std::option::Option::Some("ERROR_SEVERITY_UNSPECIFIED"),
5747                Self::Warning => std::option::Option::Some("WARNING"),
5748                Self::Severe => std::option::Option::Some("SEVERE"),
5749                Self::UnknownValue(u) => u.0.name(),
5750            }
5751        }
5752    }
5753
5754    impl std::default::Default for ErrorSeverity {
5755        fn default() -> Self {
5756            use std::convert::From;
5757            Self::from(0)
5758        }
5759    }
5760
5761    impl std::fmt::Display for ErrorSeverity {
5762        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5763            wkt::internal::display_enum(f, self.name(), self.value())
5764        }
5765    }
5766
5767    impl std::convert::From<i32> for ErrorSeverity {
5768        fn from(value: i32) -> Self {
5769            match value {
5770                0 => Self::Unspecified,
5771                1 => Self::Warning,
5772                2 => Self::Severe,
5773                _ => Self::UnknownValue(error_severity::UnknownValue(
5774                    wkt::internal::UnknownEnumValue::Integer(value),
5775                )),
5776            }
5777        }
5778    }
5779
5780    impl std::convert::From<&str> for ErrorSeverity {
5781        fn from(value: &str) -> Self {
5782            use std::string::ToString;
5783            match value {
5784                "ERROR_SEVERITY_UNSPECIFIED" => Self::Unspecified,
5785                "WARNING" => Self::Warning,
5786                "SEVERE" => Self::Severe,
5787                _ => Self::UnknownValue(error_severity::UnknownValue(
5788                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5789                )),
5790            }
5791        }
5792    }
5793
5794    impl serde::ser::Serialize for ErrorSeverity {
5795        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5796        where
5797            S: serde::Serializer,
5798        {
5799            match self {
5800                Self::Unspecified => serializer.serialize_i32(0),
5801                Self::Warning => serializer.serialize_i32(1),
5802                Self::Severe => serializer.serialize_i32(2),
5803                Self::UnknownValue(u) => u.0.serialize(serializer),
5804            }
5805        }
5806    }
5807
5808    impl<'de> serde::de::Deserialize<'de> for ErrorSeverity {
5809        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5810        where
5811            D: serde::Deserializer<'de>,
5812        {
5813            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorSeverity>::new(
5814                ".google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity",
5815            ))
5816        }
5817    }
5818
5819    /// Metadata enum to identify the metadata key.
5820    ///
5821    /// # Working with unknown values
5822    ///
5823    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5824    /// additional enum variants at any time. Adding new variants is not considered
5825    /// a breaking change. Applications should write their code in anticipation of:
5826    ///
5827    /// - New values appearing in future releases of the client library, **and**
5828    /// - New values received dynamically, without application changes.
5829    ///
5830    /// Please consult the [Working with enums] section in the user guide for some
5831    /// guidelines.
5832    ///
5833    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5834    #[derive(Clone, Debug, PartialEq)]
5835    #[non_exhaustive]
5836    pub enum MetadataKey {
5837        /// Key is unknown.
5838        Unspecified,
5839        /// Key is row limit.
5840        RowLimit,
5841        /// If set, the enum was initialized with an unknown value.
5842        ///
5843        /// Applications can examine the value using [MetadataKey::value] or
5844        /// [MetadataKey::name].
5845        UnknownValue(metadata_key::UnknownValue),
5846    }
5847
5848    #[doc(hidden)]
5849    pub mod metadata_key {
5850        #[allow(unused_imports)]
5851        use super::*;
5852        #[derive(Clone, Debug, PartialEq)]
5853        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5854    }
5855
5856    impl MetadataKey {
5857        /// Gets the enum value.
5858        ///
5859        /// Returns `None` if the enum contains an unknown value deserialized from
5860        /// the string representation of enums.
5861        pub fn value(&self) -> std::option::Option<i32> {
5862            match self {
5863                Self::Unspecified => std::option::Option::Some(0),
5864                Self::RowLimit => std::option::Option::Some(1),
5865                Self::UnknownValue(u) => u.0.value(),
5866            }
5867        }
5868
5869        /// Gets the enum value as a string.
5870        ///
5871        /// Returns `None` if the enum contains an unknown value deserialized from
5872        /// the integer representation of enums.
5873        pub fn name(&self) -> std::option::Option<&str> {
5874            match self {
5875                Self::Unspecified => std::option::Option::Some("METADATA_KEY_UNSPECIFIED"),
5876                Self::RowLimit => std::option::Option::Some("ROW_LIMIT"),
5877                Self::UnknownValue(u) => u.0.name(),
5878            }
5879        }
5880    }
5881
5882    impl std::default::Default for MetadataKey {
5883        fn default() -> Self {
5884            use std::convert::From;
5885            Self::from(0)
5886        }
5887    }
5888
5889    impl std::fmt::Display for MetadataKey {
5890        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5891            wkt::internal::display_enum(f, self.name(), self.value())
5892        }
5893    }
5894
5895    impl std::convert::From<i32> for MetadataKey {
5896        fn from(value: i32) -> Self {
5897            match value {
5898                0 => Self::Unspecified,
5899                1 => Self::RowLimit,
5900                _ => Self::UnknownValue(metadata_key::UnknownValue(
5901                    wkt::internal::UnknownEnumValue::Integer(value),
5902                )),
5903            }
5904        }
5905    }
5906
5907    impl std::convert::From<&str> for MetadataKey {
5908        fn from(value: &str) -> Self {
5909            use std::string::ToString;
5910            match value {
5911                "METADATA_KEY_UNSPECIFIED" => Self::Unspecified,
5912                "ROW_LIMIT" => Self::RowLimit,
5913                _ => Self::UnknownValue(metadata_key::UnknownValue(
5914                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5915                )),
5916            }
5917        }
5918    }
5919
5920    impl serde::ser::Serialize for MetadataKey {
5921        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5922        where
5923            S: serde::Serializer,
5924        {
5925            match self {
5926                Self::Unspecified => serializer.serialize_i32(0),
5927                Self::RowLimit => serializer.serialize_i32(1),
5928                Self::UnknownValue(u) => u.0.serialize(serializer),
5929            }
5930        }
5931    }
5932
5933    impl<'de> serde::de::Deserialize<'de> for MetadataKey {
5934        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5935        where
5936            D: serde::Deserializer<'de>,
5937        {
5938            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetadataKey>::new(
5939                ".google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey",
5940            ))
5941        }
5942    }
5943
5944    /// Warning reason.
5945    ///
5946    /// # Working with unknown values
5947    ///
5948    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5949    /// additional enum variants at any time. Adding new variants is not considered
5950    /// a breaking change. Applications should write their code in anticipation of:
5951    ///
5952    /// - New values appearing in future releases of the client library, **and**
5953    /// - New values received dynamically, without application changes.
5954    ///
5955    /// Please consult the [Working with enums] section in the user guide for some
5956    /// guidelines.
5957    ///
5958    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5959    #[derive(Clone, Debug, PartialEq)]
5960    #[non_exhaustive]
5961    pub enum WarningReason {
5962        /// Reason is unknown.
5963        Unspecified,
5964        /// Reason is row limit exceeded.
5965        RowLimitExceeded,
5966        /// Reason is default row limit exceeded.
5967        DefaultRowLimitExceeded,
5968        /// Reason is curated query default row limit exceeded.
5969        CuratedQueryDefaultRowLimitExceeded,
5970        /// If set, the enum was initialized with an unknown value.
5971        ///
5972        /// Applications can examine the value using [WarningReason::value] or
5973        /// [WarningReason::name].
5974        UnknownValue(warning_reason::UnknownValue),
5975    }
5976
5977    #[doc(hidden)]
5978    pub mod warning_reason {
5979        #[allow(unused_imports)]
5980        use super::*;
5981        #[derive(Clone, Debug, PartialEq)]
5982        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5983    }
5984
5985    impl WarningReason {
5986        /// Gets the enum value.
5987        ///
5988        /// Returns `None` if the enum contains an unknown value deserialized from
5989        /// the string representation of enums.
5990        pub fn value(&self) -> std::option::Option<i32> {
5991            match self {
5992                Self::Unspecified => std::option::Option::Some(0),
5993                Self::RowLimitExceeded => std::option::Option::Some(1),
5994                Self::DefaultRowLimitExceeded => std::option::Option::Some(2),
5995                Self::CuratedQueryDefaultRowLimitExceeded => std::option::Option::Some(3),
5996                Self::UnknownValue(u) => u.0.value(),
5997            }
5998        }
5999
6000        /// Gets the enum value as a string.
6001        ///
6002        /// Returns `None` if the enum contains an unknown value deserialized from
6003        /// the integer representation of enums.
6004        pub fn name(&self) -> std::option::Option<&str> {
6005            match self {
6006                Self::Unspecified => std::option::Option::Some("WARNING_REASON_UNSPECIFIED"),
6007                Self::RowLimitExceeded => std::option::Option::Some("ROW_LIMIT_EXCEEDED"),
6008                Self::DefaultRowLimitExceeded => {
6009                    std::option::Option::Some("DEFAULT_ROW_LIMIT_EXCEEDED")
6010                }
6011                Self::CuratedQueryDefaultRowLimitExceeded => {
6012                    std::option::Option::Some("CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED")
6013                }
6014                Self::UnknownValue(u) => u.0.name(),
6015            }
6016        }
6017    }
6018
6019    impl std::default::Default for WarningReason {
6020        fn default() -> Self {
6021            use std::convert::From;
6022            Self::from(0)
6023        }
6024    }
6025
6026    impl std::fmt::Display for WarningReason {
6027        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6028            wkt::internal::display_enum(f, self.name(), self.value())
6029        }
6030    }
6031
6032    impl std::convert::From<i32> for WarningReason {
6033        fn from(value: i32) -> Self {
6034            match value {
6035                0 => Self::Unspecified,
6036                1 => Self::RowLimitExceeded,
6037                2 => Self::DefaultRowLimitExceeded,
6038                3 => Self::CuratedQueryDefaultRowLimitExceeded,
6039                _ => Self::UnknownValue(warning_reason::UnknownValue(
6040                    wkt::internal::UnknownEnumValue::Integer(value),
6041                )),
6042            }
6043        }
6044    }
6045
6046    impl std::convert::From<&str> for WarningReason {
6047        fn from(value: &str) -> Self {
6048            use std::string::ToString;
6049            match value {
6050                "WARNING_REASON_UNSPECIFIED" => Self::Unspecified,
6051                "ROW_LIMIT_EXCEEDED" => Self::RowLimitExceeded,
6052                "DEFAULT_ROW_LIMIT_EXCEEDED" => Self::DefaultRowLimitExceeded,
6053                "CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED" => {
6054                    Self::CuratedQueryDefaultRowLimitExceeded
6055                }
6056                _ => Self::UnknownValue(warning_reason::UnknownValue(
6057                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6058                )),
6059            }
6060        }
6061    }
6062
6063    impl serde::ser::Serialize for WarningReason {
6064        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6065        where
6066            S: serde::Serializer,
6067        {
6068            match self {
6069                Self::Unspecified => serializer.serialize_i32(0),
6070                Self::RowLimitExceeded => serializer.serialize_i32(1),
6071                Self::DefaultRowLimitExceeded => serializer.serialize_i32(2),
6072                Self::CuratedQueryDefaultRowLimitExceeded => serializer.serialize_i32(3),
6073                Self::UnknownValue(u) => u.0.serialize(serializer),
6074            }
6075        }
6076    }
6077
6078    impl<'de> serde::de::Deserialize<'de> for WarningReason {
6079        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6080        where
6081            D: serde::Deserializer<'de>,
6082        {
6083            deserializer.deserialize_any(wkt::internal::EnumVisitor::<WarningReason>::new(
6084                ".google.cloud.chronicle.v1.QueryRuntimeError.WarningReason",
6085            ))
6086        }
6087    }
6088}
6089
6090/// Response message for executing a dashboard query.
6091#[derive(Clone, Default, PartialEq)]
6092#[non_exhaustive]
6093pub struct ExecuteDashboardQueryResponse {
6094    /// Result rows that are queried.
6095    pub results: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnData>,
6096
6097    /// Datasource of the query and results.
6098    pub data_sources: std::vec::Vec<crate::model::DataSource>,
6099
6100    /// Optional. Last time the cache was refreshed. This would be used by the UI
6101    /// to show the last updated time.
6102    pub last_backend_cache_refreshed_time: std::option::Option<wkt::Timestamp>,
6103
6104    /// Time window against which query was executed.
6105    pub time_window: std::option::Option<google_cloud_type::model::Interval>,
6106
6107    /// Runtime errors
6108    pub query_runtime_errors: std::vec::Vec<crate::model::QueryRuntimeError>,
6109
6110    /// Optional. Language features found in the query.
6111    pub language_features: std::vec::Vec<crate::model::LanguageFeature>,
6112
6113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6114}
6115
6116impl ExecuteDashboardQueryResponse {
6117    /// Creates a new default instance.
6118    pub fn new() -> Self {
6119        std::default::Default::default()
6120    }
6121
6122    /// Sets the value of [results][crate::model::ExecuteDashboardQueryResponse::results].
6123    ///
6124    /// # Example
6125    /// ```ignore,no_run
6126    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6127    /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnData;
6128    /// let x = ExecuteDashboardQueryResponse::new()
6129    ///     .set_results([
6130    ///         ColumnData::default()/* use setters */,
6131    ///         ColumnData::default()/* use (different) setters */,
6132    ///     ]);
6133    /// ```
6134    pub fn set_results<T, V>(mut self, v: T) -> Self
6135    where
6136        T: std::iter::IntoIterator<Item = V>,
6137        V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnData>,
6138    {
6139        use std::iter::Iterator;
6140        self.results = v.into_iter().map(|i| i.into()).collect();
6141        self
6142    }
6143
6144    /// Sets the value of [data_sources][crate::model::ExecuteDashboardQueryResponse::data_sources].
6145    ///
6146    /// # Example
6147    /// ```ignore,no_run
6148    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6149    /// use google_cloud_chronicle_v1::model::DataSource;
6150    /// let x = ExecuteDashboardQueryResponse::new().set_data_sources([
6151    ///     DataSource::Udm,
6152    ///     DataSource::Entity,
6153    ///     DataSource::IngestionMetrics,
6154    /// ]);
6155    /// ```
6156    pub fn set_data_sources<T, V>(mut self, v: T) -> Self
6157    where
6158        T: std::iter::IntoIterator<Item = V>,
6159        V: std::convert::Into<crate::model::DataSource>,
6160    {
6161        use std::iter::Iterator;
6162        self.data_sources = v.into_iter().map(|i| i.into()).collect();
6163        self
6164    }
6165
6166    /// Sets the value of [last_backend_cache_refreshed_time][crate::model::ExecuteDashboardQueryResponse::last_backend_cache_refreshed_time].
6167    ///
6168    /// # Example
6169    /// ```ignore,no_run
6170    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6171    /// use wkt::Timestamp;
6172    /// let x = ExecuteDashboardQueryResponse::new().set_last_backend_cache_refreshed_time(Timestamp::default()/* use setters */);
6173    /// ```
6174    pub fn set_last_backend_cache_refreshed_time<T>(mut self, v: T) -> Self
6175    where
6176        T: std::convert::Into<wkt::Timestamp>,
6177    {
6178        self.last_backend_cache_refreshed_time = std::option::Option::Some(v.into());
6179        self
6180    }
6181
6182    /// Sets or clears the value of [last_backend_cache_refreshed_time][crate::model::ExecuteDashboardQueryResponse::last_backend_cache_refreshed_time].
6183    ///
6184    /// # Example
6185    /// ```ignore,no_run
6186    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6187    /// use wkt::Timestamp;
6188    /// let x = ExecuteDashboardQueryResponse::new().set_or_clear_last_backend_cache_refreshed_time(Some(Timestamp::default()/* use setters */));
6189    /// let x = ExecuteDashboardQueryResponse::new().set_or_clear_last_backend_cache_refreshed_time(None::<Timestamp>);
6190    /// ```
6191    pub fn set_or_clear_last_backend_cache_refreshed_time<T>(
6192        mut self,
6193        v: std::option::Option<T>,
6194    ) -> Self
6195    where
6196        T: std::convert::Into<wkt::Timestamp>,
6197    {
6198        self.last_backend_cache_refreshed_time = v.map(|x| x.into());
6199        self
6200    }
6201
6202    /// Sets the value of [time_window][crate::model::ExecuteDashboardQueryResponse::time_window].
6203    ///
6204    /// # Example
6205    /// ```ignore,no_run
6206    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6207    /// use google_cloud_type::model::Interval;
6208    /// let x = ExecuteDashboardQueryResponse::new().set_time_window(Interval::default()/* use setters */);
6209    /// ```
6210    pub fn set_time_window<T>(mut self, v: T) -> Self
6211    where
6212        T: std::convert::Into<google_cloud_type::model::Interval>,
6213    {
6214        self.time_window = std::option::Option::Some(v.into());
6215        self
6216    }
6217
6218    /// Sets or clears the value of [time_window][crate::model::ExecuteDashboardQueryResponse::time_window].
6219    ///
6220    /// # Example
6221    /// ```ignore,no_run
6222    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6223    /// use google_cloud_type::model::Interval;
6224    /// let x = ExecuteDashboardQueryResponse::new().set_or_clear_time_window(Some(Interval::default()/* use setters */));
6225    /// let x = ExecuteDashboardQueryResponse::new().set_or_clear_time_window(None::<Interval>);
6226    /// ```
6227    pub fn set_or_clear_time_window<T>(mut self, v: std::option::Option<T>) -> Self
6228    where
6229        T: std::convert::Into<google_cloud_type::model::Interval>,
6230    {
6231        self.time_window = v.map(|x| x.into());
6232        self
6233    }
6234
6235    /// Sets the value of [query_runtime_errors][crate::model::ExecuteDashboardQueryResponse::query_runtime_errors].
6236    ///
6237    /// # Example
6238    /// ```ignore,no_run
6239    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6240    /// use google_cloud_chronicle_v1::model::QueryRuntimeError;
6241    /// let x = ExecuteDashboardQueryResponse::new()
6242    ///     .set_query_runtime_errors([
6243    ///         QueryRuntimeError::default()/* use setters */,
6244    ///         QueryRuntimeError::default()/* use (different) setters */,
6245    ///     ]);
6246    /// ```
6247    pub fn set_query_runtime_errors<T, V>(mut self, v: T) -> Self
6248    where
6249        T: std::iter::IntoIterator<Item = V>,
6250        V: std::convert::Into<crate::model::QueryRuntimeError>,
6251    {
6252        use std::iter::Iterator;
6253        self.query_runtime_errors = v.into_iter().map(|i| i.into()).collect();
6254        self
6255    }
6256
6257    /// Sets the value of [language_features][crate::model::ExecuteDashboardQueryResponse::language_features].
6258    ///
6259    /// # Example
6260    /// ```ignore,no_run
6261    /// # use google_cloud_chronicle_v1::model::ExecuteDashboardQueryResponse;
6262    /// use google_cloud_chronicle_v1::model::LanguageFeature;
6263    /// let x = ExecuteDashboardQueryResponse::new().set_language_features([
6264    ///     LanguageFeature::Joins,
6265    ///     LanguageFeature::Stages,
6266    ///     LanguageFeature::DataTables,
6267    /// ]);
6268    /// ```
6269    pub fn set_language_features<T, V>(mut self, v: T) -> Self
6270    where
6271        T: std::iter::IntoIterator<Item = V>,
6272        V: std::convert::Into<crate::model::LanguageFeature>,
6273    {
6274        use std::iter::Iterator;
6275        self.language_features = v.into_iter().map(|i| i.into()).collect();
6276        self
6277    }
6278}
6279
6280impl wkt::message::Message for ExecuteDashboardQueryResponse {
6281    fn typename() -> &'static str {
6282        "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse"
6283    }
6284}
6285
6286/// Defines additional types related to [ExecuteDashboardQueryResponse].
6287pub mod execute_dashboard_query_response {
6288    #[allow(unused_imports)]
6289    use super::*;
6290
6291    /// LINT.IfChange(stats_data)
6292    /// Value of the column based on data type.
6293    #[derive(Clone, Default, PartialEq)]
6294    #[non_exhaustive]
6295    pub struct ColumnValue {
6296        #[allow(missing_docs)]
6297        pub metadata: std::option::Option<
6298            crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
6299        >,
6300
6301        #[allow(missing_docs)]
6302        pub value: std::option::Option<
6303            crate::model::execute_dashboard_query_response::column_value::Value,
6304        >,
6305
6306        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6307    }
6308
6309    impl ColumnValue {
6310        /// Creates a new default instance.
6311        pub fn new() -> Self {
6312            std::default::Default::default()
6313        }
6314
6315        /// Sets the value of [metadata][crate::model::execute_dashboard_query_response::ColumnValue::metadata].
6316        ///
6317        /// # Example
6318        /// ```ignore,no_run
6319        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6320        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6321        /// let x = ColumnValue::new().set_metadata(ValueMetadata::default()/* use setters */);
6322        /// ```
6323        pub fn set_metadata<T>(mut self, v: T) -> Self
6324        where
6325            T: std::convert::Into<
6326                    crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
6327                >,
6328        {
6329            self.metadata = std::option::Option::Some(v.into());
6330            self
6331        }
6332
6333        /// Sets or clears the value of [metadata][crate::model::execute_dashboard_query_response::ColumnValue::metadata].
6334        ///
6335        /// # Example
6336        /// ```ignore,no_run
6337        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6338        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6339        /// let x = ColumnValue::new().set_or_clear_metadata(Some(ValueMetadata::default()/* use setters */));
6340        /// let x = ColumnValue::new().set_or_clear_metadata(None::<ValueMetadata>);
6341        /// ```
6342        pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6343        where
6344            T: std::convert::Into<
6345                    crate::model::execute_dashboard_query_response::column_value::ValueMetadata,
6346                >,
6347        {
6348            self.metadata = v.map(|x| x.into());
6349            self
6350        }
6351
6352        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value].
6353        ///
6354        /// Note that all the setters affecting `value` are mutually
6355        /// exclusive.
6356        ///
6357        /// # Example
6358        /// ```ignore,no_run
6359        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6360        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::Value;
6361        /// let x = ColumnValue::new().set_value(Some(Value::NullVal(true)));
6362        /// ```
6363        pub fn set_value<
6364            T: std::convert::Into<
6365                    std::option::Option<
6366                        crate::model::execute_dashboard_query_response::column_value::Value,
6367                    >,
6368                >,
6369        >(
6370            mut self,
6371            v: T,
6372        ) -> Self {
6373            self.value = v.into();
6374            self
6375        }
6376
6377        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6378        /// if it holds a `NullVal`, `None` if the field is not set or
6379        /// holds a different branch.
6380        pub fn null_val(&self) -> std::option::Option<&bool> {
6381            #[allow(unreachable_patterns)]
6382            self.value.as_ref().and_then(|v| match v {
6383                crate::model::execute_dashboard_query_response::column_value::Value::NullVal(v) => {
6384                    std::option::Option::Some(v)
6385                }
6386                _ => std::option::Option::None,
6387            })
6388        }
6389
6390        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6391        /// to hold a `NullVal`.
6392        ///
6393        /// Note that all the setters affecting `value` are
6394        /// mutually exclusive.
6395        ///
6396        /// # Example
6397        /// ```ignore,no_run
6398        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6399        /// let x = ColumnValue::new().set_null_val(true);
6400        /// assert!(x.null_val().is_some());
6401        /// assert!(x.bool_val().is_none());
6402        /// assert!(x.bytes_val().is_none());
6403        /// assert!(x.double_val().is_none());
6404        /// assert!(x.int64_val().is_none());
6405        /// assert!(x.uint64_val().is_none());
6406        /// assert!(x.string_val().is_none());
6407        /// assert!(x.timestamp_val().is_none());
6408        /// assert!(x.date_val().is_none());
6409        /// assert!(x.proto_val().is_none());
6410        /// ```
6411        pub fn set_null_val<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6412            self.value = std::option::Option::Some(
6413                crate::model::execute_dashboard_query_response::column_value::Value::NullVal(
6414                    v.into(),
6415                ),
6416            );
6417            self
6418        }
6419
6420        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6421        /// if it holds a `BoolVal`, `None` if the field is not set or
6422        /// holds a different branch.
6423        pub fn bool_val(&self) -> std::option::Option<&bool> {
6424            #[allow(unreachable_patterns)]
6425            self.value.as_ref().and_then(|v| match v {
6426                crate::model::execute_dashboard_query_response::column_value::Value::BoolVal(v) => {
6427                    std::option::Option::Some(v)
6428                }
6429                _ => std::option::Option::None,
6430            })
6431        }
6432
6433        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6434        /// to hold a `BoolVal`.
6435        ///
6436        /// Note that all the setters affecting `value` are
6437        /// mutually exclusive.
6438        ///
6439        /// # Example
6440        /// ```ignore,no_run
6441        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6442        /// let x = ColumnValue::new().set_bool_val(true);
6443        /// assert!(x.bool_val().is_some());
6444        /// assert!(x.null_val().is_none());
6445        /// assert!(x.bytes_val().is_none());
6446        /// assert!(x.double_val().is_none());
6447        /// assert!(x.int64_val().is_none());
6448        /// assert!(x.uint64_val().is_none());
6449        /// assert!(x.string_val().is_none());
6450        /// assert!(x.timestamp_val().is_none());
6451        /// assert!(x.date_val().is_none());
6452        /// assert!(x.proto_val().is_none());
6453        /// ```
6454        pub fn set_bool_val<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6455            self.value = std::option::Option::Some(
6456                crate::model::execute_dashboard_query_response::column_value::Value::BoolVal(
6457                    v.into(),
6458                ),
6459            );
6460            self
6461        }
6462
6463        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6464        /// if it holds a `BytesVal`, `None` if the field is not set or
6465        /// holds a different branch.
6466        pub fn bytes_val(&self) -> std::option::Option<&::bytes::Bytes> {
6467            #[allow(unreachable_patterns)]
6468            self.value.as_ref().and_then(|v| match v {
6469                crate::model::execute_dashboard_query_response::column_value::Value::BytesVal(
6470                    v,
6471                ) => std::option::Option::Some(v),
6472                _ => std::option::Option::None,
6473            })
6474        }
6475
6476        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6477        /// to hold a `BytesVal`.
6478        ///
6479        /// Note that all the setters affecting `value` are
6480        /// mutually exclusive.
6481        ///
6482        /// # Example
6483        /// ```ignore,no_run
6484        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6485        /// let x = ColumnValue::new().set_bytes_val(bytes::Bytes::from_static(b"example"));
6486        /// assert!(x.bytes_val().is_some());
6487        /// assert!(x.null_val().is_none());
6488        /// assert!(x.bool_val().is_none());
6489        /// assert!(x.double_val().is_none());
6490        /// assert!(x.int64_val().is_none());
6491        /// assert!(x.uint64_val().is_none());
6492        /// assert!(x.string_val().is_none());
6493        /// assert!(x.timestamp_val().is_none());
6494        /// assert!(x.date_val().is_none());
6495        /// assert!(x.proto_val().is_none());
6496        /// ```
6497        pub fn set_bytes_val<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
6498            self.value = std::option::Option::Some(
6499                crate::model::execute_dashboard_query_response::column_value::Value::BytesVal(
6500                    v.into(),
6501                ),
6502            );
6503            self
6504        }
6505
6506        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6507        /// if it holds a `DoubleVal`, `None` if the field is not set or
6508        /// holds a different branch.
6509        pub fn double_val(&self) -> std::option::Option<&f64> {
6510            #[allow(unreachable_patterns)]
6511            self.value.as_ref().and_then(|v| match v {
6512                crate::model::execute_dashboard_query_response::column_value::Value::DoubleVal(
6513                    v,
6514                ) => std::option::Option::Some(v),
6515                _ => std::option::Option::None,
6516            })
6517        }
6518
6519        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6520        /// to hold a `DoubleVal`.
6521        ///
6522        /// Note that all the setters affecting `value` are
6523        /// mutually exclusive.
6524        ///
6525        /// # Example
6526        /// ```ignore,no_run
6527        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6528        /// let x = ColumnValue::new().set_double_val(42.0);
6529        /// assert!(x.double_val().is_some());
6530        /// assert!(x.null_val().is_none());
6531        /// assert!(x.bool_val().is_none());
6532        /// assert!(x.bytes_val().is_none());
6533        /// assert!(x.int64_val().is_none());
6534        /// assert!(x.uint64_val().is_none());
6535        /// assert!(x.string_val().is_none());
6536        /// assert!(x.timestamp_val().is_none());
6537        /// assert!(x.date_val().is_none());
6538        /// assert!(x.proto_val().is_none());
6539        /// ```
6540        pub fn set_double_val<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
6541            self.value = std::option::Option::Some(
6542                crate::model::execute_dashboard_query_response::column_value::Value::DoubleVal(
6543                    v.into(),
6544                ),
6545            );
6546            self
6547        }
6548
6549        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6550        /// if it holds a `Int64Val`, `None` if the field is not set or
6551        /// holds a different branch.
6552        pub fn int64_val(&self) -> std::option::Option<&i64> {
6553            #[allow(unreachable_patterns)]
6554            self.value.as_ref().and_then(|v| match v {
6555                crate::model::execute_dashboard_query_response::column_value::Value::Int64Val(
6556                    v,
6557                ) => std::option::Option::Some(v),
6558                _ => std::option::Option::None,
6559            })
6560        }
6561
6562        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6563        /// to hold a `Int64Val`.
6564        ///
6565        /// Note that all the setters affecting `value` are
6566        /// mutually exclusive.
6567        ///
6568        /// # Example
6569        /// ```ignore,no_run
6570        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6571        /// let x = ColumnValue::new().set_int64_val(42);
6572        /// assert!(x.int64_val().is_some());
6573        /// assert!(x.null_val().is_none());
6574        /// assert!(x.bool_val().is_none());
6575        /// assert!(x.bytes_val().is_none());
6576        /// assert!(x.double_val().is_none());
6577        /// assert!(x.uint64_val().is_none());
6578        /// assert!(x.string_val().is_none());
6579        /// assert!(x.timestamp_val().is_none());
6580        /// assert!(x.date_val().is_none());
6581        /// assert!(x.proto_val().is_none());
6582        /// ```
6583        pub fn set_int64_val<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6584            self.value = std::option::Option::Some(
6585                crate::model::execute_dashboard_query_response::column_value::Value::Int64Val(
6586                    v.into(),
6587                ),
6588            );
6589            self
6590        }
6591
6592        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6593        /// if it holds a `Uint64Val`, `None` if the field is not set or
6594        /// holds a different branch.
6595        pub fn uint64_val(&self) -> std::option::Option<&u64> {
6596            #[allow(unreachable_patterns)]
6597            self.value.as_ref().and_then(|v| match v {
6598                crate::model::execute_dashboard_query_response::column_value::Value::Uint64Val(
6599                    v,
6600                ) => std::option::Option::Some(v),
6601                _ => std::option::Option::None,
6602            })
6603        }
6604
6605        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6606        /// to hold a `Uint64Val`.
6607        ///
6608        /// Note that all the setters affecting `value` are
6609        /// mutually exclusive.
6610        ///
6611        /// # Example
6612        /// ```ignore,no_run
6613        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6614        /// let x = ColumnValue::new().set_uint64_val(42_u32);
6615        /// assert!(x.uint64_val().is_some());
6616        /// assert!(x.null_val().is_none());
6617        /// assert!(x.bool_val().is_none());
6618        /// assert!(x.bytes_val().is_none());
6619        /// assert!(x.double_val().is_none());
6620        /// assert!(x.int64_val().is_none());
6621        /// assert!(x.string_val().is_none());
6622        /// assert!(x.timestamp_val().is_none());
6623        /// assert!(x.date_val().is_none());
6624        /// assert!(x.proto_val().is_none());
6625        /// ```
6626        pub fn set_uint64_val<T: std::convert::Into<u64>>(mut self, v: T) -> Self {
6627            self.value = std::option::Option::Some(
6628                crate::model::execute_dashboard_query_response::column_value::Value::Uint64Val(
6629                    v.into(),
6630                ),
6631            );
6632            self
6633        }
6634
6635        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6636        /// if it holds a `StringVal`, `None` if the field is not set or
6637        /// holds a different branch.
6638        pub fn string_val(&self) -> std::option::Option<&std::string::String> {
6639            #[allow(unreachable_patterns)]
6640            self.value.as_ref().and_then(|v| match v {
6641                crate::model::execute_dashboard_query_response::column_value::Value::StringVal(
6642                    v,
6643                ) => std::option::Option::Some(v),
6644                _ => std::option::Option::None,
6645            })
6646        }
6647
6648        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6649        /// to hold a `StringVal`.
6650        ///
6651        /// Note that all the setters affecting `value` are
6652        /// mutually exclusive.
6653        ///
6654        /// # Example
6655        /// ```ignore,no_run
6656        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6657        /// let x = ColumnValue::new().set_string_val("example");
6658        /// assert!(x.string_val().is_some());
6659        /// assert!(x.null_val().is_none());
6660        /// assert!(x.bool_val().is_none());
6661        /// assert!(x.bytes_val().is_none());
6662        /// assert!(x.double_val().is_none());
6663        /// assert!(x.int64_val().is_none());
6664        /// assert!(x.uint64_val().is_none());
6665        /// assert!(x.timestamp_val().is_none());
6666        /// assert!(x.date_val().is_none());
6667        /// assert!(x.proto_val().is_none());
6668        /// ```
6669        pub fn set_string_val<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6670            self.value = std::option::Option::Some(
6671                crate::model::execute_dashboard_query_response::column_value::Value::StringVal(
6672                    v.into(),
6673                ),
6674            );
6675            self
6676        }
6677
6678        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6679        /// if it holds a `TimestampVal`, `None` if the field is not set or
6680        /// holds a different branch.
6681        pub fn timestamp_val(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
6682            #[allow(unreachable_patterns)]
6683            self.value.as_ref().and_then(|v| match v {
6684                crate::model::execute_dashboard_query_response::column_value::Value::TimestampVal(v) => std::option::Option::Some(v),
6685                _ => std::option::Option::None,
6686            })
6687        }
6688
6689        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6690        /// to hold a `TimestampVal`.
6691        ///
6692        /// Note that all the setters affecting `value` are
6693        /// mutually exclusive.
6694        ///
6695        /// # Example
6696        /// ```ignore,no_run
6697        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6698        /// use wkt::Timestamp;
6699        /// let x = ColumnValue::new().set_timestamp_val(Timestamp::default()/* use setters */);
6700        /// assert!(x.timestamp_val().is_some());
6701        /// assert!(x.null_val().is_none());
6702        /// assert!(x.bool_val().is_none());
6703        /// assert!(x.bytes_val().is_none());
6704        /// assert!(x.double_val().is_none());
6705        /// assert!(x.int64_val().is_none());
6706        /// assert!(x.uint64_val().is_none());
6707        /// assert!(x.string_val().is_none());
6708        /// assert!(x.date_val().is_none());
6709        /// assert!(x.proto_val().is_none());
6710        /// ```
6711        pub fn set_timestamp_val<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
6712            mut self,
6713            v: T,
6714        ) -> Self {
6715            self.value = std::option::Option::Some(
6716                crate::model::execute_dashboard_query_response::column_value::Value::TimestampVal(
6717                    v.into(),
6718                ),
6719            );
6720            self
6721        }
6722
6723        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6724        /// if it holds a `DateVal`, `None` if the field is not set or
6725        /// holds a different branch.
6726        pub fn date_val(
6727            &self,
6728        ) -> std::option::Option<&std::boxed::Box<google_cloud_type::model::Date>> {
6729            #[allow(unreachable_patterns)]
6730            self.value.as_ref().and_then(|v| match v {
6731                crate::model::execute_dashboard_query_response::column_value::Value::DateVal(v) => {
6732                    std::option::Option::Some(v)
6733                }
6734                _ => std::option::Option::None,
6735            })
6736        }
6737
6738        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6739        /// to hold a `DateVal`.
6740        ///
6741        /// Note that all the setters affecting `value` are
6742        /// mutually exclusive.
6743        ///
6744        /// # Example
6745        /// ```ignore,no_run
6746        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6747        /// use google_cloud_type::model::Date;
6748        /// let x = ColumnValue::new().set_date_val(Date::default()/* use setters */);
6749        /// assert!(x.date_val().is_some());
6750        /// assert!(x.null_val().is_none());
6751        /// assert!(x.bool_val().is_none());
6752        /// assert!(x.bytes_val().is_none());
6753        /// assert!(x.double_val().is_none());
6754        /// assert!(x.int64_val().is_none());
6755        /// assert!(x.uint64_val().is_none());
6756        /// assert!(x.string_val().is_none());
6757        /// assert!(x.timestamp_val().is_none());
6758        /// assert!(x.proto_val().is_none());
6759        /// ```
6760        pub fn set_date_val<
6761            T: std::convert::Into<std::boxed::Box<google_cloud_type::model::Date>>,
6762        >(
6763            mut self,
6764            v: T,
6765        ) -> Self {
6766            self.value = std::option::Option::Some(
6767                crate::model::execute_dashboard_query_response::column_value::Value::DateVal(
6768                    v.into(),
6769                ),
6770            );
6771            self
6772        }
6773
6774        /// The value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6775        /// if it holds a `ProtoVal`, `None` if the field is not set or
6776        /// holds a different branch.
6777        pub fn proto_val(&self) -> std::option::Option<&std::boxed::Box<wkt::Any>> {
6778            #[allow(unreachable_patterns)]
6779            self.value.as_ref().and_then(|v| match v {
6780                crate::model::execute_dashboard_query_response::column_value::Value::ProtoVal(
6781                    v,
6782                ) => std::option::Option::Some(v),
6783                _ => std::option::Option::None,
6784            })
6785        }
6786
6787        /// Sets the value of [value][crate::model::execute_dashboard_query_response::ColumnValue::value]
6788        /// to hold a `ProtoVal`.
6789        ///
6790        /// Note that all the setters affecting `value` are
6791        /// mutually exclusive.
6792        ///
6793        /// # Example
6794        /// ```ignore,no_run
6795        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6796        /// use wkt::Any;
6797        /// let x = ColumnValue::new().set_proto_val(Any::default()/* use setters */);
6798        /// assert!(x.proto_val().is_some());
6799        /// assert!(x.null_val().is_none());
6800        /// assert!(x.bool_val().is_none());
6801        /// assert!(x.bytes_val().is_none());
6802        /// assert!(x.double_val().is_none());
6803        /// assert!(x.int64_val().is_none());
6804        /// assert!(x.uint64_val().is_none());
6805        /// assert!(x.string_val().is_none());
6806        /// assert!(x.timestamp_val().is_none());
6807        /// assert!(x.date_val().is_none());
6808        /// ```
6809        pub fn set_proto_val<T: std::convert::Into<std::boxed::Box<wkt::Any>>>(
6810            mut self,
6811            v: T,
6812        ) -> Self {
6813            self.value = std::option::Option::Some(
6814                crate::model::execute_dashboard_query_response::column_value::Value::ProtoVal(
6815                    v.into(),
6816                ),
6817            );
6818            self
6819        }
6820    }
6821
6822    impl wkt::message::Message for ColumnValue {
6823        fn typename() -> &'static str {
6824            "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue"
6825        }
6826    }
6827
6828    /// Defines additional types related to [ColumnValue].
6829    pub mod column_value {
6830        #[allow(unused_imports)]
6831        use super::*;
6832
6833        #[allow(missing_docs)]
6834        #[derive(Clone, Default, PartialEq)]
6835        #[non_exhaustive]
6836        pub struct ValueMetadata {
6837            /// "Auto" generated In-app links.
6838            pub links: std::vec::Vec<crate::model::InAppLink>,
6839
6840            #[allow(missing_docs)]
6841            pub field_paths: std::vec::Vec<std::string::String>,
6842
6843            /// Timestamp value to store the timestamp for the case of the date and
6844            /// time data type.
6845            pub timestamp_val: std::option::Option<wkt::Timestamp>,
6846
6847            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6848        }
6849
6850        impl ValueMetadata {
6851            /// Creates a new default instance.
6852            pub fn new() -> Self {
6853                std::default::Default::default()
6854            }
6855
6856            /// Sets the value of [links][crate::model::execute_dashboard_query_response::column_value::ValueMetadata::links].
6857            ///
6858            /// # Example
6859            /// ```ignore,no_run
6860            /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6861            /// use google_cloud_chronicle_v1::model::InAppLink;
6862            /// let x = ValueMetadata::new()
6863            ///     .set_links([
6864            ///         InAppLink::default()/* use setters */,
6865            ///         InAppLink::default()/* use (different) setters */,
6866            ///     ]);
6867            /// ```
6868            pub fn set_links<T, V>(mut self, v: T) -> Self
6869            where
6870                T: std::iter::IntoIterator<Item = V>,
6871                V: std::convert::Into<crate::model::InAppLink>,
6872            {
6873                use std::iter::Iterator;
6874                self.links = v.into_iter().map(|i| i.into()).collect();
6875                self
6876            }
6877
6878            /// Sets the value of [field_paths][crate::model::execute_dashboard_query_response::column_value::ValueMetadata::field_paths].
6879            ///
6880            /// # Example
6881            /// ```ignore,no_run
6882            /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6883            /// let x = ValueMetadata::new().set_field_paths(["a", "b", "c"]);
6884            /// ```
6885            pub fn set_field_paths<T, V>(mut self, v: T) -> Self
6886            where
6887                T: std::iter::IntoIterator<Item = V>,
6888                V: std::convert::Into<std::string::String>,
6889            {
6890                use std::iter::Iterator;
6891                self.field_paths = v.into_iter().map(|i| i.into()).collect();
6892                self
6893            }
6894
6895            /// Sets the value of [timestamp_val][crate::model::execute_dashboard_query_response::column_value::ValueMetadata::timestamp_val].
6896            ///
6897            /// # Example
6898            /// ```ignore,no_run
6899            /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6900            /// use wkt::Timestamp;
6901            /// let x = ValueMetadata::new().set_timestamp_val(Timestamp::default()/* use setters */);
6902            /// ```
6903            pub fn set_timestamp_val<T>(mut self, v: T) -> Self
6904            where
6905                T: std::convert::Into<wkt::Timestamp>,
6906            {
6907                self.timestamp_val = std::option::Option::Some(v.into());
6908                self
6909            }
6910
6911            /// Sets or clears the value of [timestamp_val][crate::model::execute_dashboard_query_response::column_value::ValueMetadata::timestamp_val].
6912            ///
6913            /// # Example
6914            /// ```ignore,no_run
6915            /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_value::ValueMetadata;
6916            /// use wkt::Timestamp;
6917            /// let x = ValueMetadata::new().set_or_clear_timestamp_val(Some(Timestamp::default()/* use setters */));
6918            /// let x = ValueMetadata::new().set_or_clear_timestamp_val(None::<Timestamp>);
6919            /// ```
6920            pub fn set_or_clear_timestamp_val<T>(mut self, v: std::option::Option<T>) -> Self
6921            where
6922                T: std::convert::Into<wkt::Timestamp>,
6923            {
6924                self.timestamp_val = v.map(|x| x.into());
6925                self
6926            }
6927        }
6928
6929        impl wkt::message::Message for ValueMetadata {
6930            fn typename() -> &'static str {
6931                "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata"
6932            }
6933        }
6934
6935        #[allow(missing_docs)]
6936        #[derive(Clone, Debug, PartialEq)]
6937        #[non_exhaustive]
6938        pub enum Value {
6939            /// True if the value is NULL.
6940            NullVal(bool),
6941            /// Boolean value.
6942            BoolVal(bool),
6943            /// Bytes value.
6944            BytesVal(::bytes::Bytes),
6945            /// Double value.
6946            DoubleVal(f64),
6947            /// Integer value (signed).
6948            Int64Val(i64),
6949            /// Un-signed integer value.
6950            Uint64Val(u64),
6951            /// String value. Enum values are returned as strings.
6952            StringVal(std::string::String),
6953            /// Timestamp values. Does not handle `interval`.
6954            TimestampVal(std::boxed::Box<wkt::Timestamp>),
6955            /// Date values.
6956            DateVal(std::boxed::Box<google_cloud_type::model::Date>),
6957            /// For any proto values that are not any of the above.
6958            ProtoVal(std::boxed::Box<wkt::Any>),
6959        }
6960    }
6961
6962    /// Singular vs list of values in a column.
6963    #[derive(Clone, Default, PartialEq)]
6964    #[non_exhaustive]
6965    pub struct ColumnType {
6966        #[allow(missing_docs)]
6967        pub r#type:
6968            std::option::Option<crate::model::execute_dashboard_query_response::column_type::Type>,
6969
6970        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6971    }
6972
6973    impl ColumnType {
6974        /// Creates a new default instance.
6975        pub fn new() -> Self {
6976            std::default::Default::default()
6977        }
6978
6979        /// Sets the value of [r#type][crate::model::execute_dashboard_query_response::ColumnType::type].
6980        ///
6981        /// Note that all the setters affecting `r#type` are mutually
6982        /// exclusive.
6983        ///
6984        /// # Example
6985        /// ```ignore,no_run
6986        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnType;
6987        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
6988        /// let x = ColumnType::new().set_type(Some(
6989        ///     google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_type::Type::Value(ColumnValue::default().into())));
6990        /// ```
6991        pub fn set_type<
6992            T: std::convert::Into<
6993                    std::option::Option<
6994                        crate::model::execute_dashboard_query_response::column_type::Type,
6995                    >,
6996                >,
6997        >(
6998            mut self,
6999            v: T,
7000        ) -> Self {
7001            self.r#type = v.into();
7002            self
7003        }
7004
7005        /// The value of [r#type][crate::model::execute_dashboard_query_response::ColumnType::r#type]
7006        /// if it holds a `Value`, `None` if the field is not set or
7007        /// holds a different branch.
7008        pub fn value(
7009            &self,
7010        ) -> std::option::Option<
7011            &std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>,
7012        > {
7013            #[allow(unreachable_patterns)]
7014            self.r#type.as_ref().and_then(|v| match v {
7015                crate::model::execute_dashboard_query_response::column_type::Type::Value(v) => {
7016                    std::option::Option::Some(v)
7017                }
7018                _ => std::option::Option::None,
7019            })
7020        }
7021
7022        /// Sets the value of [r#type][crate::model::execute_dashboard_query_response::ColumnType::r#type]
7023        /// to hold a `Value`.
7024        ///
7025        /// Note that all the setters affecting `r#type` are
7026        /// mutually exclusive.
7027        ///
7028        /// # Example
7029        /// ```ignore,no_run
7030        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnType;
7031        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
7032        /// let x = ColumnType::new().set_value(ColumnValue::default()/* use setters */);
7033        /// assert!(x.value().is_some());
7034        /// assert!(x.list().is_none());
7035        /// ```
7036        pub fn set_value<
7037            T: std::convert::Into<
7038                    std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>,
7039                >,
7040        >(
7041            mut self,
7042            v: T,
7043        ) -> Self {
7044            self.r#type = std::option::Option::Some(
7045                crate::model::execute_dashboard_query_response::column_type::Type::Value(v.into()),
7046            );
7047            self
7048        }
7049
7050        /// The value of [r#type][crate::model::execute_dashboard_query_response::ColumnType::r#type]
7051        /// if it holds a `List`, `None` if the field is not set or
7052        /// holds a different branch.
7053        pub fn list(
7054            &self,
7055        ) -> std::option::Option<
7056            &std::boxed::Box<crate::model::execute_dashboard_query_response::column_type::List>,
7057        > {
7058            #[allow(unreachable_patterns)]
7059            self.r#type.as_ref().and_then(|v| match v {
7060                crate::model::execute_dashboard_query_response::column_type::Type::List(v) => {
7061                    std::option::Option::Some(v)
7062                }
7063                _ => std::option::Option::None,
7064            })
7065        }
7066
7067        /// Sets the value of [r#type][crate::model::execute_dashboard_query_response::ColumnType::r#type]
7068        /// to hold a `List`.
7069        ///
7070        /// Note that all the setters affecting `r#type` are
7071        /// mutually exclusive.
7072        ///
7073        /// # Example
7074        /// ```ignore,no_run
7075        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnType;
7076        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_type::List;
7077        /// let x = ColumnType::new().set_list(List::default()/* use setters */);
7078        /// assert!(x.list().is_some());
7079        /// assert!(x.value().is_none());
7080        /// ```
7081        pub fn set_list<
7082            T: std::convert::Into<
7083                    std::boxed::Box<
7084                        crate::model::execute_dashboard_query_response::column_type::List,
7085                    >,
7086                >,
7087        >(
7088            mut self,
7089            v: T,
7090        ) -> Self {
7091            self.r#type = std::option::Option::Some(
7092                crate::model::execute_dashboard_query_response::column_type::Type::List(v.into()),
7093            );
7094            self
7095        }
7096    }
7097
7098    impl wkt::message::Message for ColumnType {
7099        fn typename() -> &'static str {
7100            "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType"
7101        }
7102    }
7103
7104    /// Defines additional types related to [ColumnType].
7105    pub mod column_type {
7106        #[allow(unused_imports)]
7107        use super::*;
7108
7109        /// Store list of values in a column.
7110        #[derive(Clone, Default, PartialEq)]
7111        #[non_exhaustive]
7112        pub struct List {
7113            #[allow(missing_docs)]
7114            pub values: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnValue>,
7115
7116            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7117        }
7118
7119        impl List {
7120            /// Creates a new default instance.
7121            pub fn new() -> Self {
7122                std::default::Default::default()
7123            }
7124
7125            /// Sets the value of [values][crate::model::execute_dashboard_query_response::column_type::List::values].
7126            ///
7127            /// # Example
7128            /// ```ignore,no_run
7129            /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::column_type::List;
7130            /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnValue;
7131            /// let x = List::new()
7132            ///     .set_values([
7133            ///         ColumnValue::default()/* use setters */,
7134            ///         ColumnValue::default()/* use (different) setters */,
7135            ///     ]);
7136            /// ```
7137            pub fn set_values<T, V>(mut self, v: T) -> Self
7138            where
7139                T: std::iter::IntoIterator<Item = V>,
7140                V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnValue>,
7141            {
7142                use std::iter::Iterator;
7143                self.values = v.into_iter().map(|i| i.into()).collect();
7144                self
7145            }
7146        }
7147
7148        impl wkt::message::Message for List {
7149            fn typename() -> &'static str {
7150                "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List"
7151            }
7152        }
7153
7154        #[allow(missing_docs)]
7155        #[derive(Clone, Debug, PartialEq)]
7156        #[non_exhaustive]
7157        pub enum Type {
7158            /// Single value in a column.
7159            Value(std::boxed::Box<crate::model::execute_dashboard_query_response::ColumnValue>),
7160            /// List of values in a column e.g. IPs
7161            List(
7162                std::boxed::Box<crate::model::execute_dashboard_query_response::column_type::List>,
7163            ),
7164        }
7165    }
7166
7167    #[allow(missing_docs)]
7168    #[derive(Clone, Default, PartialEq)]
7169    #[non_exhaustive]
7170    pub struct ColumnData {
7171        /// Used to store column names.
7172        pub column: std::string::String,
7173
7174        /// To store column data.
7175        pub values: std::vec::Vec<crate::model::execute_dashboard_query_response::ColumnType>,
7176
7177        /// To store column metadata.
7178        pub metadata: std::option::Option<crate::model::ColumnMetadata>,
7179
7180        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7181    }
7182
7183    impl ColumnData {
7184        /// Creates a new default instance.
7185        pub fn new() -> Self {
7186            std::default::Default::default()
7187        }
7188
7189        /// Sets the value of [column][crate::model::execute_dashboard_query_response::ColumnData::column].
7190        ///
7191        /// # Example
7192        /// ```ignore,no_run
7193        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnData;
7194        /// let x = ColumnData::new().set_column("example");
7195        /// ```
7196        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7197            self.column = v.into();
7198            self
7199        }
7200
7201        /// Sets the value of [values][crate::model::execute_dashboard_query_response::ColumnData::values].
7202        ///
7203        /// # Example
7204        /// ```ignore,no_run
7205        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnData;
7206        /// use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnType;
7207        /// let x = ColumnData::new()
7208        ///     .set_values([
7209        ///         ColumnType::default()/* use setters */,
7210        ///         ColumnType::default()/* use (different) setters */,
7211        ///     ]);
7212        /// ```
7213        pub fn set_values<T, V>(mut self, v: T) -> Self
7214        where
7215            T: std::iter::IntoIterator<Item = V>,
7216            V: std::convert::Into<crate::model::execute_dashboard_query_response::ColumnType>,
7217        {
7218            use std::iter::Iterator;
7219            self.values = v.into_iter().map(|i| i.into()).collect();
7220            self
7221        }
7222
7223        /// Sets the value of [metadata][crate::model::execute_dashboard_query_response::ColumnData::metadata].
7224        ///
7225        /// # Example
7226        /// ```ignore,no_run
7227        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnData;
7228        /// use google_cloud_chronicle_v1::model::ColumnMetadata;
7229        /// let x = ColumnData::new().set_metadata(ColumnMetadata::default()/* use setters */);
7230        /// ```
7231        pub fn set_metadata<T>(mut self, v: T) -> Self
7232        where
7233            T: std::convert::Into<crate::model::ColumnMetadata>,
7234        {
7235            self.metadata = std::option::Option::Some(v.into());
7236            self
7237        }
7238
7239        /// Sets or clears the value of [metadata][crate::model::execute_dashboard_query_response::ColumnData::metadata].
7240        ///
7241        /// # Example
7242        /// ```ignore,no_run
7243        /// # use google_cloud_chronicle_v1::model::execute_dashboard_query_response::ColumnData;
7244        /// use google_cloud_chronicle_v1::model::ColumnMetadata;
7245        /// let x = ColumnData::new().set_or_clear_metadata(Some(ColumnMetadata::default()/* use setters */));
7246        /// let x = ColumnData::new().set_or_clear_metadata(None::<ColumnMetadata>);
7247        /// ```
7248        pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7249        where
7250            T: std::convert::Into<crate::model::ColumnMetadata>,
7251        {
7252            self.metadata = v.map(|x| x.into());
7253            self
7254        }
7255    }
7256
7257    impl wkt::message::Message for ColumnData {
7258        fn typename() -> &'static str {
7259            "type.googleapis.com/google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData"
7260        }
7261    }
7262}
7263
7264/// Dashboard level filter that can be used in native dashboards as well as
7265/// inputs to execute query.
7266#[derive(Clone, Default, PartialEq)]
7267#[non_exhaustive]
7268pub struct DashboardFilter {
7269    /// ID of the filter.
7270    pub id: std::string::String,
7271
7272    /// Datasource the filter is applicable for.
7273    pub data_source: crate::model::DataSource,
7274
7275    /// Filter field path.
7276    pub field_path: std::string::String,
7277
7278    /// Operator and values. Can include multiple modifiers.
7279    pub filter_operator_and_field_values: std::vec::Vec<crate::model::FilterOperatorAndValues>,
7280
7281    /// Display name of the filter.
7282    pub display_name: std::string::String,
7283
7284    /// Chart IDs the filter is applicable for.
7285    pub chart_ids: std::vec::Vec<std::string::String>,
7286
7287    /// Optional. Whether the filter is a standard time range filter,
7288    /// meaning that it has to be used as the query time range,
7289    /// and not as a predicate in the query.
7290    /// A chart can have at most one standard time range filter applied.
7291    pub is_standard_time_range_filter: bool,
7292
7293    /// Optional. Whether this filter is required to be populated by the
7294    /// dashboard consumer prior to the dashboard loading.
7295    pub is_mandatory: bool,
7296
7297    /// Optional. Whether this standard time range filter is enabled.
7298    pub is_standard_time_range_filter_enabled: std::option::Option<bool>,
7299
7300    /// Optional. Advanced filter configuration for the filter widget.
7301    pub advanced_filter_config: std::option::Option<crate::model::AdvancedFilterConfig>,
7302
7303    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7304}
7305
7306impl DashboardFilter {
7307    /// Creates a new default instance.
7308    pub fn new() -> Self {
7309        std::default::Default::default()
7310    }
7311
7312    /// Sets the value of [id][crate::model::DashboardFilter::id].
7313    ///
7314    /// # Example
7315    /// ```ignore,no_run
7316    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7317    /// let x = DashboardFilter::new().set_id("example");
7318    /// ```
7319    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7320        self.id = v.into();
7321        self
7322    }
7323
7324    /// Sets the value of [data_source][crate::model::DashboardFilter::data_source].
7325    ///
7326    /// # Example
7327    /// ```ignore,no_run
7328    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7329    /// use google_cloud_chronicle_v1::model::DataSource;
7330    /// let x0 = DashboardFilter::new().set_data_source(DataSource::Udm);
7331    /// let x1 = DashboardFilter::new().set_data_source(DataSource::Entity);
7332    /// let x2 = DashboardFilter::new().set_data_source(DataSource::IngestionMetrics);
7333    /// ```
7334    pub fn set_data_source<T: std::convert::Into<crate::model::DataSource>>(
7335        mut self,
7336        v: T,
7337    ) -> Self {
7338        self.data_source = v.into();
7339        self
7340    }
7341
7342    /// Sets the value of [field_path][crate::model::DashboardFilter::field_path].
7343    ///
7344    /// # Example
7345    /// ```ignore,no_run
7346    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7347    /// let x = DashboardFilter::new().set_field_path("example");
7348    /// ```
7349    pub fn set_field_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7350        self.field_path = v.into();
7351        self
7352    }
7353
7354    /// Sets the value of [filter_operator_and_field_values][crate::model::DashboardFilter::filter_operator_and_field_values].
7355    ///
7356    /// # Example
7357    /// ```ignore,no_run
7358    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7359    /// use google_cloud_chronicle_v1::model::FilterOperatorAndValues;
7360    /// let x = DashboardFilter::new()
7361    ///     .set_filter_operator_and_field_values([
7362    ///         FilterOperatorAndValues::default()/* use setters */,
7363    ///         FilterOperatorAndValues::default()/* use (different) setters */,
7364    ///     ]);
7365    /// ```
7366    pub fn set_filter_operator_and_field_values<T, V>(mut self, v: T) -> Self
7367    where
7368        T: std::iter::IntoIterator<Item = V>,
7369        V: std::convert::Into<crate::model::FilterOperatorAndValues>,
7370    {
7371        use std::iter::Iterator;
7372        self.filter_operator_and_field_values = v.into_iter().map(|i| i.into()).collect();
7373        self
7374    }
7375
7376    /// Sets the value of [display_name][crate::model::DashboardFilter::display_name].
7377    ///
7378    /// # Example
7379    /// ```ignore,no_run
7380    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7381    /// let x = DashboardFilter::new().set_display_name("example");
7382    /// ```
7383    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7384        self.display_name = v.into();
7385        self
7386    }
7387
7388    /// Sets the value of [chart_ids][crate::model::DashboardFilter::chart_ids].
7389    ///
7390    /// # Example
7391    /// ```ignore,no_run
7392    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7393    /// let x = DashboardFilter::new().set_chart_ids(["a", "b", "c"]);
7394    /// ```
7395    pub fn set_chart_ids<T, V>(mut self, v: T) -> Self
7396    where
7397        T: std::iter::IntoIterator<Item = V>,
7398        V: std::convert::Into<std::string::String>,
7399    {
7400        use std::iter::Iterator;
7401        self.chart_ids = v.into_iter().map(|i| i.into()).collect();
7402        self
7403    }
7404
7405    /// Sets the value of [is_standard_time_range_filter][crate::model::DashboardFilter::is_standard_time_range_filter].
7406    ///
7407    /// # Example
7408    /// ```ignore,no_run
7409    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7410    /// let x = DashboardFilter::new().set_is_standard_time_range_filter(true);
7411    /// ```
7412    pub fn set_is_standard_time_range_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7413        self.is_standard_time_range_filter = v.into();
7414        self
7415    }
7416
7417    /// Sets the value of [is_mandatory][crate::model::DashboardFilter::is_mandatory].
7418    ///
7419    /// # Example
7420    /// ```ignore,no_run
7421    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7422    /// let x = DashboardFilter::new().set_is_mandatory(true);
7423    /// ```
7424    pub fn set_is_mandatory<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7425        self.is_mandatory = v.into();
7426        self
7427    }
7428
7429    /// Sets the value of [is_standard_time_range_filter_enabled][crate::model::DashboardFilter::is_standard_time_range_filter_enabled].
7430    ///
7431    /// # Example
7432    /// ```ignore,no_run
7433    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7434    /// let x = DashboardFilter::new().set_is_standard_time_range_filter_enabled(true);
7435    /// ```
7436    pub fn set_is_standard_time_range_filter_enabled<T>(mut self, v: T) -> Self
7437    where
7438        T: std::convert::Into<bool>,
7439    {
7440        self.is_standard_time_range_filter_enabled = std::option::Option::Some(v.into());
7441        self
7442    }
7443
7444    /// Sets or clears the value of [is_standard_time_range_filter_enabled][crate::model::DashboardFilter::is_standard_time_range_filter_enabled].
7445    ///
7446    /// # Example
7447    /// ```ignore,no_run
7448    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7449    /// let x = DashboardFilter::new().set_or_clear_is_standard_time_range_filter_enabled(Some(false));
7450    /// let x = DashboardFilter::new().set_or_clear_is_standard_time_range_filter_enabled(None::<bool>);
7451    /// ```
7452    pub fn set_or_clear_is_standard_time_range_filter_enabled<T>(
7453        mut self,
7454        v: std::option::Option<T>,
7455    ) -> Self
7456    where
7457        T: std::convert::Into<bool>,
7458    {
7459        self.is_standard_time_range_filter_enabled = v.map(|x| x.into());
7460        self
7461    }
7462
7463    /// Sets the value of [advanced_filter_config][crate::model::DashboardFilter::advanced_filter_config].
7464    ///
7465    /// # Example
7466    /// ```ignore,no_run
7467    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7468    /// use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7469    /// let x = DashboardFilter::new().set_advanced_filter_config(AdvancedFilterConfig::default()/* use setters */);
7470    /// ```
7471    pub fn set_advanced_filter_config<T>(mut self, v: T) -> Self
7472    where
7473        T: std::convert::Into<crate::model::AdvancedFilterConfig>,
7474    {
7475        self.advanced_filter_config = std::option::Option::Some(v.into());
7476        self
7477    }
7478
7479    /// Sets or clears the value of [advanced_filter_config][crate::model::DashboardFilter::advanced_filter_config].
7480    ///
7481    /// # Example
7482    /// ```ignore,no_run
7483    /// # use google_cloud_chronicle_v1::model::DashboardFilter;
7484    /// use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7485    /// let x = DashboardFilter::new().set_or_clear_advanced_filter_config(Some(AdvancedFilterConfig::default()/* use setters */));
7486    /// let x = DashboardFilter::new().set_or_clear_advanced_filter_config(None::<AdvancedFilterConfig>);
7487    /// ```
7488    pub fn set_or_clear_advanced_filter_config<T>(mut self, v: std::option::Option<T>) -> Self
7489    where
7490        T: std::convert::Into<crate::model::AdvancedFilterConfig>,
7491    {
7492        self.advanced_filter_config = v.map(|x| x.into());
7493        self
7494    }
7495}
7496
7497impl wkt::message::Message for DashboardFilter {
7498    fn typename() -> &'static str {
7499        "type.googleapis.com/google.cloud.chronicle.v1.DashboardFilter"
7500    }
7501}
7502
7503#[allow(missing_docs)]
7504#[derive(Clone, Default, PartialEq)]
7505#[non_exhaustive]
7506pub struct FilterOperatorAndValues {
7507    /// Operator for a single filter modifier.
7508    pub filter_operator: crate::model::FilterOperator,
7509
7510    /// Values for the modifier. All operators should have a single value other
7511    /// than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds
7512    /// like -86400 is past 1 day.
7513    pub field_values: std::vec::Vec<std::string::String>,
7514
7515    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7516}
7517
7518impl FilterOperatorAndValues {
7519    /// Creates a new default instance.
7520    pub fn new() -> Self {
7521        std::default::Default::default()
7522    }
7523
7524    /// Sets the value of [filter_operator][crate::model::FilterOperatorAndValues::filter_operator].
7525    ///
7526    /// # Example
7527    /// ```ignore,no_run
7528    /// # use google_cloud_chronicle_v1::model::FilterOperatorAndValues;
7529    /// use google_cloud_chronicle_v1::model::FilterOperator;
7530    /// let x0 = FilterOperatorAndValues::new().set_filter_operator(FilterOperator::Equal);
7531    /// let x1 = FilterOperatorAndValues::new().set_filter_operator(FilterOperator::NotEqual);
7532    /// let x2 = FilterOperatorAndValues::new().set_filter_operator(FilterOperator::In);
7533    /// ```
7534    pub fn set_filter_operator<T: std::convert::Into<crate::model::FilterOperator>>(
7535        mut self,
7536        v: T,
7537    ) -> Self {
7538        self.filter_operator = v.into();
7539        self
7540    }
7541
7542    /// Sets the value of [field_values][crate::model::FilterOperatorAndValues::field_values].
7543    ///
7544    /// # Example
7545    /// ```ignore,no_run
7546    /// # use google_cloud_chronicle_v1::model::FilterOperatorAndValues;
7547    /// let x = FilterOperatorAndValues::new().set_field_values(["a", "b", "c"]);
7548    /// ```
7549    pub fn set_field_values<T, V>(mut self, v: T) -> Self
7550    where
7551        T: std::iter::IntoIterator<Item = V>,
7552        V: std::convert::Into<std::string::String>,
7553    {
7554        use std::iter::Iterator;
7555        self.field_values = v.into_iter().map(|i| i.into()).collect();
7556        self
7557    }
7558}
7559
7560impl wkt::message::Message for FilterOperatorAndValues {
7561    fn typename() -> &'static str {
7562        "type.googleapis.com/google.cloud.chronicle.v1.FilterOperatorAndValues"
7563    }
7564}
7565
7566/// Advanced filter configuration for the filter widget.
7567#[derive(Clone, Default, PartialEq)]
7568#[non_exhaustive]
7569pub struct AdvancedFilterConfig {
7570    /// Required. The token name to look for in the query (e.g., "hostname").
7571    /// The system will automatically wrap this in '$' (e.g., "$hostname$").
7572    pub token: std::string::String,
7573
7574    /// Optional. String to prepend to the final replaced value (e.g., "/", "^(",
7575    /// "\"").
7576    pub prefix: std::string::String,
7577
7578    /// Optional. String to append to the final replaced value (e.g., "/", ")$",
7579    /// "\"").
7580    pub suffix: std::string::String,
7581
7582    /// Optional. Delimiter to join multiple selected values (e.g., "|", " OR field
7583    /// = ").
7584    pub separator: std::string::String,
7585
7586    /// Optional. Whether to allow selection of multiple values.
7587    pub multiple_allowed: bool,
7588
7589    /// Optional. Default values to use if no value is selected/provided.
7590    pub default_values: std::vec::Vec<std::string::String>,
7591
7592    /// Optional. Whether to skip the configured prefix and suffix when using
7593    /// default values. If true, default values are inserted raw (joined by the
7594    /// separator).
7595    pub skip_default_affixes: bool,
7596
7597    /// Required. Source of the values for the filter.
7598    pub value_source: std::option::Option<crate::model::advanced_filter_config::ValueSource>,
7599
7600    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7601}
7602
7603impl AdvancedFilterConfig {
7604    /// Creates a new default instance.
7605    pub fn new() -> Self {
7606        std::default::Default::default()
7607    }
7608
7609    /// Sets the value of [token][crate::model::AdvancedFilterConfig::token].
7610    ///
7611    /// # Example
7612    /// ```ignore,no_run
7613    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7614    /// let x = AdvancedFilterConfig::new().set_token("example");
7615    /// ```
7616    pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7617        self.token = v.into();
7618        self
7619    }
7620
7621    /// Sets the value of [prefix][crate::model::AdvancedFilterConfig::prefix].
7622    ///
7623    /// # Example
7624    /// ```ignore,no_run
7625    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7626    /// let x = AdvancedFilterConfig::new().set_prefix("example");
7627    /// ```
7628    pub fn set_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7629        self.prefix = v.into();
7630        self
7631    }
7632
7633    /// Sets the value of [suffix][crate::model::AdvancedFilterConfig::suffix].
7634    ///
7635    /// # Example
7636    /// ```ignore,no_run
7637    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7638    /// let x = AdvancedFilterConfig::new().set_suffix("example");
7639    /// ```
7640    pub fn set_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7641        self.suffix = v.into();
7642        self
7643    }
7644
7645    /// Sets the value of [separator][crate::model::AdvancedFilterConfig::separator].
7646    ///
7647    /// # Example
7648    /// ```ignore,no_run
7649    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7650    /// let x = AdvancedFilterConfig::new().set_separator("example");
7651    /// ```
7652    pub fn set_separator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7653        self.separator = v.into();
7654        self
7655    }
7656
7657    /// Sets the value of [multiple_allowed][crate::model::AdvancedFilterConfig::multiple_allowed].
7658    ///
7659    /// # Example
7660    /// ```ignore,no_run
7661    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7662    /// let x = AdvancedFilterConfig::new().set_multiple_allowed(true);
7663    /// ```
7664    pub fn set_multiple_allowed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7665        self.multiple_allowed = v.into();
7666        self
7667    }
7668
7669    /// Sets the value of [default_values][crate::model::AdvancedFilterConfig::default_values].
7670    ///
7671    /// # Example
7672    /// ```ignore,no_run
7673    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7674    /// let x = AdvancedFilterConfig::new().set_default_values(["a", "b", "c"]);
7675    /// ```
7676    pub fn set_default_values<T, V>(mut self, v: T) -> Self
7677    where
7678        T: std::iter::IntoIterator<Item = V>,
7679        V: std::convert::Into<std::string::String>,
7680    {
7681        use std::iter::Iterator;
7682        self.default_values = v.into_iter().map(|i| i.into()).collect();
7683        self
7684    }
7685
7686    /// Sets the value of [skip_default_affixes][crate::model::AdvancedFilterConfig::skip_default_affixes].
7687    ///
7688    /// # Example
7689    /// ```ignore,no_run
7690    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7691    /// let x = AdvancedFilterConfig::new().set_skip_default_affixes(true);
7692    /// ```
7693    pub fn set_skip_default_affixes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7694        self.skip_default_affixes = v.into();
7695        self
7696    }
7697
7698    /// Sets the value of [value_source][crate::model::AdvancedFilterConfig::value_source].
7699    ///
7700    /// # Example
7701    /// ```ignore,no_run
7702    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7703    /// use google_cloud_chronicle_v1::model::advanced_filter_config::ValueSource;
7704    /// let x = AdvancedFilterConfig::new().set_value_source(ValueSource::default()/* use setters */);
7705    /// ```
7706    pub fn set_value_source<T>(mut self, v: T) -> Self
7707    where
7708        T: std::convert::Into<crate::model::advanced_filter_config::ValueSource>,
7709    {
7710        self.value_source = std::option::Option::Some(v.into());
7711        self
7712    }
7713
7714    /// Sets or clears the value of [value_source][crate::model::AdvancedFilterConfig::value_source].
7715    ///
7716    /// # Example
7717    /// ```ignore,no_run
7718    /// # use google_cloud_chronicle_v1::model::AdvancedFilterConfig;
7719    /// use google_cloud_chronicle_v1::model::advanced_filter_config::ValueSource;
7720    /// let x = AdvancedFilterConfig::new().set_or_clear_value_source(Some(ValueSource::default()/* use setters */));
7721    /// let x = AdvancedFilterConfig::new().set_or_clear_value_source(None::<ValueSource>);
7722    /// ```
7723    pub fn set_or_clear_value_source<T>(mut self, v: std::option::Option<T>) -> Self
7724    where
7725        T: std::convert::Into<crate::model::advanced_filter_config::ValueSource>,
7726    {
7727        self.value_source = v.map(|x| x.into());
7728        self
7729    }
7730}
7731
7732impl wkt::message::Message for AdvancedFilterConfig {
7733    fn typename() -> &'static str {
7734        "type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig"
7735    }
7736}
7737
7738/// Defines additional types related to [AdvancedFilterConfig].
7739pub mod advanced_filter_config {
7740    #[allow(unused_imports)]
7741    use super::*;
7742
7743    /// Source of the values for the filter.
7744    #[derive(Clone, Default, PartialEq)]
7745    #[non_exhaustive]
7746    pub struct ValueSource {
7747        /// Source of the values for the filter.
7748        pub source: std::option::Option<crate::model::advanced_filter_config::value_source::Source>,
7749
7750        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7751    }
7752
7753    impl ValueSource {
7754        /// Creates a new default instance.
7755        pub fn new() -> Self {
7756            std::default::Default::default()
7757        }
7758
7759        /// Sets the value of [source][crate::model::advanced_filter_config::ValueSource::source].
7760        ///
7761        /// Note that all the setters affecting `source` are mutually
7762        /// exclusive.
7763        ///
7764        /// # Example
7765        /// ```ignore,no_run
7766        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::ValueSource;
7767        /// use google_cloud_chronicle_v1::model::advanced_filter_config::ManualOptions;
7768        /// let x = ValueSource::new().set_source(Some(
7769        ///     google_cloud_chronicle_v1::model::advanced_filter_config::value_source::Source::ManualOptions(ManualOptions::default().into())));
7770        /// ```
7771        pub fn set_source<
7772            T: std::convert::Into<
7773                    std::option::Option<crate::model::advanced_filter_config::value_source::Source>,
7774                >,
7775        >(
7776            mut self,
7777            v: T,
7778        ) -> Self {
7779            self.source = v.into();
7780            self
7781        }
7782
7783        /// The value of [source][crate::model::advanced_filter_config::ValueSource::source]
7784        /// if it holds a `ManualOptions`, `None` if the field is not set or
7785        /// holds a different branch.
7786        pub fn manual_options(
7787            &self,
7788        ) -> std::option::Option<
7789            &std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>,
7790        > {
7791            #[allow(unreachable_patterns)]
7792            self.source.as_ref().and_then(|v| match v {
7793                crate::model::advanced_filter_config::value_source::Source::ManualOptions(v) => {
7794                    std::option::Option::Some(v)
7795                }
7796                _ => std::option::Option::None,
7797            })
7798        }
7799
7800        /// Sets the value of [source][crate::model::advanced_filter_config::ValueSource::source]
7801        /// to hold a `ManualOptions`.
7802        ///
7803        /// Note that all the setters affecting `source` are
7804        /// mutually exclusive.
7805        ///
7806        /// # Example
7807        /// ```ignore,no_run
7808        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::ValueSource;
7809        /// use google_cloud_chronicle_v1::model::advanced_filter_config::ManualOptions;
7810        /// let x = ValueSource::new().set_manual_options(ManualOptions::default()/* use setters */);
7811        /// assert!(x.manual_options().is_some());
7812        /// assert!(x.query_options().is_none());
7813        /// ```
7814        pub fn set_manual_options<
7815            T: std::convert::Into<
7816                    std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>,
7817                >,
7818        >(
7819            mut self,
7820            v: T,
7821        ) -> Self {
7822            self.source = std::option::Option::Some(
7823                crate::model::advanced_filter_config::value_source::Source::ManualOptions(v.into()),
7824            );
7825            self
7826        }
7827
7828        /// The value of [source][crate::model::advanced_filter_config::ValueSource::source]
7829        /// if it holds a `QueryOptions`, `None` if the field is not set or
7830        /// holds a different branch.
7831        pub fn query_options(
7832            &self,
7833        ) -> std::option::Option<&std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>>
7834        {
7835            #[allow(unreachable_patterns)]
7836            self.source.as_ref().and_then(|v| match v {
7837                crate::model::advanced_filter_config::value_source::Source::QueryOptions(v) => {
7838                    std::option::Option::Some(v)
7839                }
7840                _ => std::option::Option::None,
7841            })
7842        }
7843
7844        /// Sets the value of [source][crate::model::advanced_filter_config::ValueSource::source]
7845        /// to hold a `QueryOptions`.
7846        ///
7847        /// Note that all the setters affecting `source` are
7848        /// mutually exclusive.
7849        ///
7850        /// # Example
7851        /// ```ignore,no_run
7852        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::ValueSource;
7853        /// use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
7854        /// let x = ValueSource::new().set_query_options(QueryOptions::default()/* use setters */);
7855        /// assert!(x.query_options().is_some());
7856        /// assert!(x.manual_options().is_none());
7857        /// ```
7858        pub fn set_query_options<
7859            T: std::convert::Into<std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>>,
7860        >(
7861            mut self,
7862            v: T,
7863        ) -> Self {
7864            self.source = std::option::Option::Some(
7865                crate::model::advanced_filter_config::value_source::Source::QueryOptions(v.into()),
7866            );
7867            self
7868        }
7869    }
7870
7871    impl wkt::message::Message for ValueSource {
7872        fn typename() -> &'static str {
7873            "type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource"
7874        }
7875    }
7876
7877    /// Defines additional types related to [ValueSource].
7878    pub mod value_source {
7879        #[allow(unused_imports)]
7880        use super::*;
7881
7882        /// Source of the values for the filter.
7883        #[derive(Clone, Debug, PartialEq)]
7884        #[non_exhaustive]
7885        pub enum Source {
7886            /// Optional. Manual options provided by the user.
7887            ManualOptions(std::boxed::Box<crate::model::advanced_filter_config::ManualOptions>),
7888            /// Optional. Query options to fetch the values from the query engine.
7889            /// This is used for the filter's population query.
7890            QueryOptions(std::boxed::Box<crate::model::advanced_filter_config::QueryOptions>),
7891        }
7892    }
7893
7894    /// Manual options provided by the user.
7895    #[derive(Clone, Default, PartialEq)]
7896    #[non_exhaustive]
7897    pub struct ManualOptions {
7898        /// Optional. The options provided by the user.
7899        /// The max number of options is limited to 10000.
7900        pub options: std::vec::Vec<std::string::String>,
7901
7902        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7903    }
7904
7905    impl ManualOptions {
7906        /// Creates a new default instance.
7907        pub fn new() -> Self {
7908            std::default::Default::default()
7909        }
7910
7911        /// Sets the value of [options][crate::model::advanced_filter_config::ManualOptions::options].
7912        ///
7913        /// # Example
7914        /// ```ignore,no_run
7915        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::ManualOptions;
7916        /// let x = ManualOptions::new().set_options(["a", "b", "c"]);
7917        /// ```
7918        pub fn set_options<T, V>(mut self, v: T) -> Self
7919        where
7920            T: std::iter::IntoIterator<Item = V>,
7921            V: std::convert::Into<std::string::String>,
7922        {
7923            use std::iter::Iterator;
7924            self.options = v.into_iter().map(|i| i.into()).collect();
7925            self
7926        }
7927    }
7928
7929    impl wkt::message::Message for ManualOptions {
7930        fn typename() -> &'static str {
7931            "type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions"
7932        }
7933    }
7934
7935    /// Query options to fetch the values from the query engine.
7936    /// This is used for the filter's population query.
7937    #[derive(Clone, Default, PartialEq)]
7938    #[non_exhaustive]
7939    pub struct QueryOptions {
7940        /// Required. The query to execute to fetch the values.
7941        pub query: std::string::String,
7942
7943        /// Required. The column name to use for the values.
7944        pub column: std::string::String,
7945
7946        /// Optional. Enable global time filter
7947        pub global_time_filter_enabled: bool,
7948
7949        /// Optional. Time range input specifically for the filter's population
7950        /// query.
7951        pub input: std::option::Option<crate::model::dashboard_query::Input>,
7952
7953        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7954    }
7955
7956    impl QueryOptions {
7957        /// Creates a new default instance.
7958        pub fn new() -> Self {
7959            std::default::Default::default()
7960        }
7961
7962        /// Sets the value of [query][crate::model::advanced_filter_config::QueryOptions::query].
7963        ///
7964        /// # Example
7965        /// ```ignore,no_run
7966        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
7967        /// let x = QueryOptions::new().set_query("example");
7968        /// ```
7969        pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7970            self.query = v.into();
7971            self
7972        }
7973
7974        /// Sets the value of [column][crate::model::advanced_filter_config::QueryOptions::column].
7975        ///
7976        /// # Example
7977        /// ```ignore,no_run
7978        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
7979        /// let x = QueryOptions::new().set_column("example");
7980        /// ```
7981        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7982            self.column = v.into();
7983            self
7984        }
7985
7986        /// Sets the value of [global_time_filter_enabled][crate::model::advanced_filter_config::QueryOptions::global_time_filter_enabled].
7987        ///
7988        /// # Example
7989        /// ```ignore,no_run
7990        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
7991        /// let x = QueryOptions::new().set_global_time_filter_enabled(true);
7992        /// ```
7993        pub fn set_global_time_filter_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7994            self.global_time_filter_enabled = v.into();
7995            self
7996        }
7997
7998        /// Sets the value of [input][crate::model::advanced_filter_config::QueryOptions::input].
7999        ///
8000        /// # Example
8001        /// ```ignore,no_run
8002        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
8003        /// use google_cloud_chronicle_v1::model::dashboard_query::Input;
8004        /// let x = QueryOptions::new().set_input(Input::default()/* use setters */);
8005        /// ```
8006        pub fn set_input<T>(mut self, v: T) -> Self
8007        where
8008            T: std::convert::Into<crate::model::dashboard_query::Input>,
8009        {
8010            self.input = std::option::Option::Some(v.into());
8011            self
8012        }
8013
8014        /// Sets or clears the value of [input][crate::model::advanced_filter_config::QueryOptions::input].
8015        ///
8016        /// # Example
8017        /// ```ignore,no_run
8018        /// # use google_cloud_chronicle_v1::model::advanced_filter_config::QueryOptions;
8019        /// use google_cloud_chronicle_v1::model::dashboard_query::Input;
8020        /// let x = QueryOptions::new().set_or_clear_input(Some(Input::default()/* use setters */));
8021        /// let x = QueryOptions::new().set_or_clear_input(None::<Input>);
8022        /// ```
8023        pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
8024        where
8025            T: std::convert::Into<crate::model::dashboard_query::Input>,
8026        {
8027            self.input = v.map(|x| x.into());
8028            self
8029        }
8030    }
8031
8032    impl wkt::message::Message for QueryOptions {
8033        fn typename() -> &'static str {
8034            "type.googleapis.com/google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions"
8035        }
8036    }
8037}
8038
8039/// In app linking start
8040#[derive(Clone, Default, PartialEq)]
8041#[non_exhaustive]
8042pub struct InAppLink {
8043    /// URL to redirect to.
8044    pub url: std::string::String,
8045
8046    /// Label for the link.
8047    pub label: std::string::String,
8048
8049    /// Icon url for the link.
8050    pub icon_url: std::string::String,
8051
8052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8053}
8054
8055impl InAppLink {
8056    /// Creates a new default instance.
8057    pub fn new() -> Self {
8058        std::default::Default::default()
8059    }
8060
8061    /// Sets the value of [url][crate::model::InAppLink::url].
8062    ///
8063    /// # Example
8064    /// ```ignore,no_run
8065    /// # use google_cloud_chronicle_v1::model::InAppLink;
8066    /// let x = InAppLink::new().set_url("example");
8067    /// ```
8068    pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8069        self.url = v.into();
8070        self
8071    }
8072
8073    /// Sets the value of [label][crate::model::InAppLink::label].
8074    ///
8075    /// # Example
8076    /// ```ignore,no_run
8077    /// # use google_cloud_chronicle_v1::model::InAppLink;
8078    /// let x = InAppLink::new().set_label("example");
8079    /// ```
8080    pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8081        self.label = v.into();
8082        self
8083    }
8084
8085    /// Sets the value of [icon_url][crate::model::InAppLink::icon_url].
8086    ///
8087    /// # Example
8088    /// ```ignore,no_run
8089    /// # use google_cloud_chronicle_v1::model::InAppLink;
8090    /// let x = InAppLink::new().set_icon_url("example");
8091    /// ```
8092    pub fn set_icon_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8093        self.icon_url = v.into();
8094        self
8095    }
8096}
8097
8098impl wkt::message::Message for InAppLink {
8099    fn typename() -> &'static str {
8100        "type.googleapis.com/google.cloud.chronicle.v1.InAppLink"
8101    }
8102}
8103
8104/// Metadata of the column.
8105#[derive(Clone, Default, PartialEq)]
8106#[non_exhaustive]
8107pub struct ColumnMetadata {
8108    /// Name of the column.
8109    pub column: std::string::String,
8110
8111    /// Field path of the queried field, if any.
8112    pub field_path: std::string::String,
8113
8114    /// Name of the function used to query the field, if any.
8115    pub function_name: std::string::String,
8116
8117    /// Module of the function used to query the field, if any.
8118    pub function_module: std::string::String,
8119
8120    /// Data source queried.
8121    pub data_source: crate::model::DataSource,
8122
8123    /// Timestamp Metadata
8124    pub timestamp_metadata: std::option::Option<crate::model::TimestampMetadata>,
8125
8126    /// Whether the column is a longitude field.
8127    pub longitude: bool,
8128
8129    /// Whether the column is a latitude field.
8130    pub latitude: bool,
8131
8132    /// Whether the column is selected in the final response.
8133    pub selected: bool,
8134
8135    /// Whether the column is unselected in the final response.
8136    pub unselected: bool,
8137
8138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8139}
8140
8141impl ColumnMetadata {
8142    /// Creates a new default instance.
8143    pub fn new() -> Self {
8144        std::default::Default::default()
8145    }
8146
8147    /// Sets the value of [column][crate::model::ColumnMetadata::column].
8148    ///
8149    /// # Example
8150    /// ```ignore,no_run
8151    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8152    /// let x = ColumnMetadata::new().set_column("example");
8153    /// ```
8154    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8155        self.column = v.into();
8156        self
8157    }
8158
8159    /// Sets the value of [field_path][crate::model::ColumnMetadata::field_path].
8160    ///
8161    /// # Example
8162    /// ```ignore,no_run
8163    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8164    /// let x = ColumnMetadata::new().set_field_path("example");
8165    /// ```
8166    pub fn set_field_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8167        self.field_path = v.into();
8168        self
8169    }
8170
8171    /// Sets the value of [function_name][crate::model::ColumnMetadata::function_name].
8172    ///
8173    /// # Example
8174    /// ```ignore,no_run
8175    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8176    /// let x = ColumnMetadata::new().set_function_name("example");
8177    /// ```
8178    pub fn set_function_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8179        self.function_name = v.into();
8180        self
8181    }
8182
8183    /// Sets the value of [function_module][crate::model::ColumnMetadata::function_module].
8184    ///
8185    /// # Example
8186    /// ```ignore,no_run
8187    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8188    /// let x = ColumnMetadata::new().set_function_module("example");
8189    /// ```
8190    pub fn set_function_module<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8191        self.function_module = v.into();
8192        self
8193    }
8194
8195    /// Sets the value of [data_source][crate::model::ColumnMetadata::data_source].
8196    ///
8197    /// # Example
8198    /// ```ignore,no_run
8199    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8200    /// use google_cloud_chronicle_v1::model::DataSource;
8201    /// let x0 = ColumnMetadata::new().set_data_source(DataSource::Udm);
8202    /// let x1 = ColumnMetadata::new().set_data_source(DataSource::Entity);
8203    /// let x2 = ColumnMetadata::new().set_data_source(DataSource::IngestionMetrics);
8204    /// ```
8205    pub fn set_data_source<T: std::convert::Into<crate::model::DataSource>>(
8206        mut self,
8207        v: T,
8208    ) -> Self {
8209        self.data_source = v.into();
8210        self
8211    }
8212
8213    /// Sets the value of [timestamp_metadata][crate::model::ColumnMetadata::timestamp_metadata].
8214    ///
8215    /// # Example
8216    /// ```ignore,no_run
8217    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8218    /// use google_cloud_chronicle_v1::model::TimestampMetadata;
8219    /// let x = ColumnMetadata::new().set_timestamp_metadata(TimestampMetadata::default()/* use setters */);
8220    /// ```
8221    pub fn set_timestamp_metadata<T>(mut self, v: T) -> Self
8222    where
8223        T: std::convert::Into<crate::model::TimestampMetadata>,
8224    {
8225        self.timestamp_metadata = std::option::Option::Some(v.into());
8226        self
8227    }
8228
8229    /// Sets or clears the value of [timestamp_metadata][crate::model::ColumnMetadata::timestamp_metadata].
8230    ///
8231    /// # Example
8232    /// ```ignore,no_run
8233    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8234    /// use google_cloud_chronicle_v1::model::TimestampMetadata;
8235    /// let x = ColumnMetadata::new().set_or_clear_timestamp_metadata(Some(TimestampMetadata::default()/* use setters */));
8236    /// let x = ColumnMetadata::new().set_or_clear_timestamp_metadata(None::<TimestampMetadata>);
8237    /// ```
8238    pub fn set_or_clear_timestamp_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8239    where
8240        T: std::convert::Into<crate::model::TimestampMetadata>,
8241    {
8242        self.timestamp_metadata = v.map(|x| x.into());
8243        self
8244    }
8245
8246    /// Sets the value of [longitude][crate::model::ColumnMetadata::longitude].
8247    ///
8248    /// # Example
8249    /// ```ignore,no_run
8250    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8251    /// let x = ColumnMetadata::new().set_longitude(true);
8252    /// ```
8253    pub fn set_longitude<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8254        self.longitude = v.into();
8255        self
8256    }
8257
8258    /// Sets the value of [latitude][crate::model::ColumnMetadata::latitude].
8259    ///
8260    /// # Example
8261    /// ```ignore,no_run
8262    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8263    /// let x = ColumnMetadata::new().set_latitude(true);
8264    /// ```
8265    pub fn set_latitude<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8266        self.latitude = v.into();
8267        self
8268    }
8269
8270    /// Sets the value of [selected][crate::model::ColumnMetadata::selected].
8271    ///
8272    /// # Example
8273    /// ```ignore,no_run
8274    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8275    /// let x = ColumnMetadata::new().set_selected(true);
8276    /// ```
8277    pub fn set_selected<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8278        self.selected = v.into();
8279        self
8280    }
8281
8282    /// Sets the value of [unselected][crate::model::ColumnMetadata::unselected].
8283    ///
8284    /// # Example
8285    /// ```ignore,no_run
8286    /// # use google_cloud_chronicle_v1::model::ColumnMetadata;
8287    /// let x = ColumnMetadata::new().set_unselected(true);
8288    /// ```
8289    pub fn set_unselected<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8290        self.unselected = v.into();
8291        self
8292    }
8293}
8294
8295impl wkt::message::Message for ColumnMetadata {
8296    fn typename() -> &'static str {
8297        "type.googleapis.com/google.cloud.chronicle.v1.ColumnMetadata"
8298    }
8299}
8300
8301/// Metadata of the timestamp column.
8302#[derive(Clone, Default, PartialEq)]
8303#[non_exhaustive]
8304pub struct TimestampMetadata {
8305    /// Time format of the timestamp column.
8306    pub time_format: std::string::String,
8307
8308    /// Time zone of the timestamp column.
8309    pub time_zone: std::string::String,
8310
8311    /// Time granularity of the timestamp column.
8312    pub time_granularity: std::string::String,
8313
8314    /// Whether the timestamp column is sortable in UI.
8315    pub is_sortable: bool,
8316
8317    /// Whether the timestamp column is interpolable in UI.
8318    pub is_interpolable: bool,
8319
8320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8321}
8322
8323impl TimestampMetadata {
8324    /// Creates a new default instance.
8325    pub fn new() -> Self {
8326        std::default::Default::default()
8327    }
8328
8329    /// Sets the value of [time_format][crate::model::TimestampMetadata::time_format].
8330    ///
8331    /// # Example
8332    /// ```ignore,no_run
8333    /// # use google_cloud_chronicle_v1::model::TimestampMetadata;
8334    /// let x = TimestampMetadata::new().set_time_format("example");
8335    /// ```
8336    pub fn set_time_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8337        self.time_format = v.into();
8338        self
8339    }
8340
8341    /// Sets the value of [time_zone][crate::model::TimestampMetadata::time_zone].
8342    ///
8343    /// # Example
8344    /// ```ignore,no_run
8345    /// # use google_cloud_chronicle_v1::model::TimestampMetadata;
8346    /// let x = TimestampMetadata::new().set_time_zone("example");
8347    /// ```
8348    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8349        self.time_zone = v.into();
8350        self
8351    }
8352
8353    /// Sets the value of [time_granularity][crate::model::TimestampMetadata::time_granularity].
8354    ///
8355    /// # Example
8356    /// ```ignore,no_run
8357    /// # use google_cloud_chronicle_v1::model::TimestampMetadata;
8358    /// let x = TimestampMetadata::new().set_time_granularity("example");
8359    /// ```
8360    pub fn set_time_granularity<T: std::convert::Into<std::string::String>>(
8361        mut self,
8362        v: T,
8363    ) -> Self {
8364        self.time_granularity = v.into();
8365        self
8366    }
8367
8368    /// Sets the value of [is_sortable][crate::model::TimestampMetadata::is_sortable].
8369    ///
8370    /// # Example
8371    /// ```ignore,no_run
8372    /// # use google_cloud_chronicle_v1::model::TimestampMetadata;
8373    /// let x = TimestampMetadata::new().set_is_sortable(true);
8374    /// ```
8375    pub fn set_is_sortable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8376        self.is_sortable = v.into();
8377        self
8378    }
8379
8380    /// Sets the value of [is_interpolable][crate::model::TimestampMetadata::is_interpolable].
8381    ///
8382    /// # Example
8383    /// ```ignore,no_run
8384    /// # use google_cloud_chronicle_v1::model::TimestampMetadata;
8385    /// let x = TimestampMetadata::new().set_is_interpolable(true);
8386    /// ```
8387    pub fn set_is_interpolable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8388        self.is_interpolable = v.into();
8389        self
8390    }
8391}
8392
8393impl wkt::message::Message for TimestampMetadata {
8394    fn typename() -> &'static str {
8395        "type.googleapis.com/google.cloud.chronicle.v1.TimestampMetadata"
8396    }
8397}
8398
8399/// Request message for CreateDataAccessLabel.
8400#[derive(Clone, Default, PartialEq)]
8401#[non_exhaustive]
8402pub struct CreateDataAccessLabelRequest {
8403    /// Required. The parent resource where this Data Access Label will be created.
8404    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
8405    pub parent: std::string::String,
8406
8407    /// Required. Data access label to create.
8408    pub data_access_label: std::option::Option<crate::model::DataAccessLabel>,
8409
8410    /// Required. The ID to use for the data access label, which will become the
8411    /// label's display name and the final component of the label's resource name.
8412    /// The maximum number of characters should be 63. Regex pattern is as per AIP:
8413    /// <https://google.aip.dev/122#resource-id-segments>
8414    pub data_access_label_id: std::string::String,
8415
8416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8417}
8418
8419impl CreateDataAccessLabelRequest {
8420    /// Creates a new default instance.
8421    pub fn new() -> Self {
8422        std::default::Default::default()
8423    }
8424
8425    /// Sets the value of [parent][crate::model::CreateDataAccessLabelRequest::parent].
8426    ///
8427    /// # Example
8428    /// ```ignore,no_run
8429    /// # use google_cloud_chronicle_v1::model::CreateDataAccessLabelRequest;
8430    /// # let project_id = "project_id";
8431    /// # let location_id = "location_id";
8432    /// # let instance_id = "instance_id";
8433    /// let x = CreateDataAccessLabelRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
8434    /// ```
8435    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8436        self.parent = v.into();
8437        self
8438    }
8439
8440    /// Sets the value of [data_access_label][crate::model::CreateDataAccessLabelRequest::data_access_label].
8441    ///
8442    /// # Example
8443    /// ```ignore,no_run
8444    /// # use google_cloud_chronicle_v1::model::CreateDataAccessLabelRequest;
8445    /// use google_cloud_chronicle_v1::model::DataAccessLabel;
8446    /// let x = CreateDataAccessLabelRequest::new().set_data_access_label(DataAccessLabel::default()/* use setters */);
8447    /// ```
8448    pub fn set_data_access_label<T>(mut self, v: T) -> Self
8449    where
8450        T: std::convert::Into<crate::model::DataAccessLabel>,
8451    {
8452        self.data_access_label = std::option::Option::Some(v.into());
8453        self
8454    }
8455
8456    /// Sets or clears the value of [data_access_label][crate::model::CreateDataAccessLabelRequest::data_access_label].
8457    ///
8458    /// # Example
8459    /// ```ignore,no_run
8460    /// # use google_cloud_chronicle_v1::model::CreateDataAccessLabelRequest;
8461    /// use google_cloud_chronicle_v1::model::DataAccessLabel;
8462    /// let x = CreateDataAccessLabelRequest::new().set_or_clear_data_access_label(Some(DataAccessLabel::default()/* use setters */));
8463    /// let x = CreateDataAccessLabelRequest::new().set_or_clear_data_access_label(None::<DataAccessLabel>);
8464    /// ```
8465    pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
8466    where
8467        T: std::convert::Into<crate::model::DataAccessLabel>,
8468    {
8469        self.data_access_label = v.map(|x| x.into());
8470        self
8471    }
8472
8473    /// Sets the value of [data_access_label_id][crate::model::CreateDataAccessLabelRequest::data_access_label_id].
8474    ///
8475    /// # Example
8476    /// ```ignore,no_run
8477    /// # use google_cloud_chronicle_v1::model::CreateDataAccessLabelRequest;
8478    /// let x = CreateDataAccessLabelRequest::new().set_data_access_label_id("example");
8479    /// ```
8480    pub fn set_data_access_label_id<T: std::convert::Into<std::string::String>>(
8481        mut self,
8482        v: T,
8483    ) -> Self {
8484        self.data_access_label_id = v.into();
8485        self
8486    }
8487}
8488
8489impl wkt::message::Message for CreateDataAccessLabelRequest {
8490    fn typename() -> &'static str {
8491        "type.googleapis.com/google.cloud.chronicle.v1.CreateDataAccessLabelRequest"
8492    }
8493}
8494
8495/// Request message to retrieve a data access label.
8496#[derive(Clone, Default, PartialEq)]
8497#[non_exhaustive]
8498pub struct GetDataAccessLabelRequest {
8499    /// Required. The ID of the data access label to retrieve.
8500    /// Format:
8501    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
8502    pub name: std::string::String,
8503
8504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8505}
8506
8507impl GetDataAccessLabelRequest {
8508    /// Creates a new default instance.
8509    pub fn new() -> Self {
8510        std::default::Default::default()
8511    }
8512
8513    /// Sets the value of [name][crate::model::GetDataAccessLabelRequest::name].
8514    ///
8515    /// # Example
8516    /// ```ignore,no_run
8517    /// # use google_cloud_chronicle_v1::model::GetDataAccessLabelRequest;
8518    /// # let project_id = "project_id";
8519    /// # let location_id = "location_id";
8520    /// # let instance_id = "instance_id";
8521    /// # let data_access_label_id = "data_access_label_id";
8522    /// let x = GetDataAccessLabelRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessLabels/{data_access_label_id}"));
8523    /// ```
8524    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8525        self.name = v.into();
8526        self
8527    }
8528}
8529
8530impl wkt::message::Message for GetDataAccessLabelRequest {
8531    fn typename() -> &'static str {
8532        "type.googleapis.com/google.cloud.chronicle.v1.GetDataAccessLabelRequest"
8533    }
8534}
8535
8536/// Request message for ListDataAccessLabels.
8537#[derive(Clone, Default, PartialEq)]
8538#[non_exhaustive]
8539pub struct ListDataAccessLabelsRequest {
8540    /// Required. The parent resource where this data access label will be created.
8541    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
8542    pub parent: std::string::String,
8543
8544    /// The maximum number of data access labels to return. The service may return
8545    /// fewer than this value. If unspecified, at most 100 data access labels will
8546    /// be returned. The maximum value is 1000; values above 1000 will be coerced
8547    /// to 1000.
8548    pub page_size: i32,
8549
8550    /// A page token, received from a previous `ListDataAccessLabelsRequest` call.
8551    /// Provide this to retrieve the subsequent page.
8552    pub page_token: std::string::String,
8553
8554    /// Optional. A filter which should follow the guidelines of AIP-160.
8555    /// Supports filtering on all fieds of DataAccessLabel and all operations as
8556    /// mentioned in <https://google.aip.dev/160>.
8557    /// example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR
8558    /// display_name:\"-21-1\"".
8559    pub filter: std::string::String,
8560
8561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8562}
8563
8564impl ListDataAccessLabelsRequest {
8565    /// Creates a new default instance.
8566    pub fn new() -> Self {
8567        std::default::Default::default()
8568    }
8569
8570    /// Sets the value of [parent][crate::model::ListDataAccessLabelsRequest::parent].
8571    ///
8572    /// # Example
8573    /// ```ignore,no_run
8574    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsRequest;
8575    /// # let project_id = "project_id";
8576    /// # let location_id = "location_id";
8577    /// # let instance_id = "instance_id";
8578    /// let x = ListDataAccessLabelsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
8579    /// ```
8580    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8581        self.parent = v.into();
8582        self
8583    }
8584
8585    /// Sets the value of [page_size][crate::model::ListDataAccessLabelsRequest::page_size].
8586    ///
8587    /// # Example
8588    /// ```ignore,no_run
8589    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsRequest;
8590    /// let x = ListDataAccessLabelsRequest::new().set_page_size(42);
8591    /// ```
8592    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8593        self.page_size = v.into();
8594        self
8595    }
8596
8597    /// Sets the value of [page_token][crate::model::ListDataAccessLabelsRequest::page_token].
8598    ///
8599    /// # Example
8600    /// ```ignore,no_run
8601    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsRequest;
8602    /// let x = ListDataAccessLabelsRequest::new().set_page_token("example");
8603    /// ```
8604    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8605        self.page_token = v.into();
8606        self
8607    }
8608
8609    /// Sets the value of [filter][crate::model::ListDataAccessLabelsRequest::filter].
8610    ///
8611    /// # Example
8612    /// ```ignore,no_run
8613    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsRequest;
8614    /// let x = ListDataAccessLabelsRequest::new().set_filter("example");
8615    /// ```
8616    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8617        self.filter = v.into();
8618        self
8619    }
8620}
8621
8622impl wkt::message::Message for ListDataAccessLabelsRequest {
8623    fn typename() -> &'static str {
8624        "type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessLabelsRequest"
8625    }
8626}
8627
8628/// Response message for ListDataAccessLabels.
8629#[derive(Clone, Default, PartialEq)]
8630#[non_exhaustive]
8631pub struct ListDataAccessLabelsResponse {
8632    /// List of data access labels.
8633    pub data_access_labels: std::vec::Vec<crate::model::DataAccessLabel>,
8634
8635    /// A token, which can be sent as `page_token` to retrieve the next page.
8636    /// If this field is omitted, there are no subsequent pages.
8637    pub next_page_token: std::string::String,
8638
8639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8640}
8641
8642impl ListDataAccessLabelsResponse {
8643    /// Creates a new default instance.
8644    pub fn new() -> Self {
8645        std::default::Default::default()
8646    }
8647
8648    /// Sets the value of [data_access_labels][crate::model::ListDataAccessLabelsResponse::data_access_labels].
8649    ///
8650    /// # Example
8651    /// ```ignore,no_run
8652    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsResponse;
8653    /// use google_cloud_chronicle_v1::model::DataAccessLabel;
8654    /// let x = ListDataAccessLabelsResponse::new()
8655    ///     .set_data_access_labels([
8656    ///         DataAccessLabel::default()/* use setters */,
8657    ///         DataAccessLabel::default()/* use (different) setters */,
8658    ///     ]);
8659    /// ```
8660    pub fn set_data_access_labels<T, V>(mut self, v: T) -> Self
8661    where
8662        T: std::iter::IntoIterator<Item = V>,
8663        V: std::convert::Into<crate::model::DataAccessLabel>,
8664    {
8665        use std::iter::Iterator;
8666        self.data_access_labels = v.into_iter().map(|i| i.into()).collect();
8667        self
8668    }
8669
8670    /// Sets the value of [next_page_token][crate::model::ListDataAccessLabelsResponse::next_page_token].
8671    ///
8672    /// # Example
8673    /// ```ignore,no_run
8674    /// # use google_cloud_chronicle_v1::model::ListDataAccessLabelsResponse;
8675    /// let x = ListDataAccessLabelsResponse::new().set_next_page_token("example");
8676    /// ```
8677    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8678        self.next_page_token = v.into();
8679        self
8680    }
8681}
8682
8683impl wkt::message::Message for ListDataAccessLabelsResponse {
8684    fn typename() -> &'static str {
8685        "type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessLabelsResponse"
8686    }
8687}
8688
8689#[doc(hidden)]
8690impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAccessLabelsResponse {
8691    type PageItem = crate::model::DataAccessLabel;
8692
8693    fn items(self) -> std::vec::Vec<Self::PageItem> {
8694        self.data_access_labels
8695    }
8696
8697    fn next_page_token(&self) -> std::string::String {
8698        use std::clone::Clone;
8699        self.next_page_token.clone()
8700    }
8701}
8702
8703/// Request message for UpdateDataAccessLabel method.
8704#[derive(Clone, Default, PartialEq)]
8705#[non_exhaustive]
8706pub struct UpdateDataAccessLabelRequest {
8707    /// Required. The data access label to update.
8708    ///
8709    /// The label's `name` field is used to identify the label to update.
8710    /// Format:
8711    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
8712    pub data_access_label: std::option::Option<crate::model::DataAccessLabel>,
8713
8714    /// The list of fields to update. If not included, all fields with a non-empty
8715    /// value will be overwritten. Currently, only the description and definition
8716    /// fields are supported for update; an update call that attempts to update any
8717    /// other fields will return INVALID_ARGUMENT.
8718    pub update_mask: std::option::Option<wkt::FieldMask>,
8719
8720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8721}
8722
8723impl UpdateDataAccessLabelRequest {
8724    /// Creates a new default instance.
8725    pub fn new() -> Self {
8726        std::default::Default::default()
8727    }
8728
8729    /// Sets the value of [data_access_label][crate::model::UpdateDataAccessLabelRequest::data_access_label].
8730    ///
8731    /// # Example
8732    /// ```ignore,no_run
8733    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessLabelRequest;
8734    /// use google_cloud_chronicle_v1::model::DataAccessLabel;
8735    /// let x = UpdateDataAccessLabelRequest::new().set_data_access_label(DataAccessLabel::default()/* use setters */);
8736    /// ```
8737    pub fn set_data_access_label<T>(mut self, v: T) -> Self
8738    where
8739        T: std::convert::Into<crate::model::DataAccessLabel>,
8740    {
8741        self.data_access_label = std::option::Option::Some(v.into());
8742        self
8743    }
8744
8745    /// Sets or clears the value of [data_access_label][crate::model::UpdateDataAccessLabelRequest::data_access_label].
8746    ///
8747    /// # Example
8748    /// ```ignore,no_run
8749    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessLabelRequest;
8750    /// use google_cloud_chronicle_v1::model::DataAccessLabel;
8751    /// let x = UpdateDataAccessLabelRequest::new().set_or_clear_data_access_label(Some(DataAccessLabel::default()/* use setters */));
8752    /// let x = UpdateDataAccessLabelRequest::new().set_or_clear_data_access_label(None::<DataAccessLabel>);
8753    /// ```
8754    pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
8755    where
8756        T: std::convert::Into<crate::model::DataAccessLabel>,
8757    {
8758        self.data_access_label = v.map(|x| x.into());
8759        self
8760    }
8761
8762    /// Sets the value of [update_mask][crate::model::UpdateDataAccessLabelRequest::update_mask].
8763    ///
8764    /// # Example
8765    /// ```ignore,no_run
8766    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessLabelRequest;
8767    /// use wkt::FieldMask;
8768    /// let x = UpdateDataAccessLabelRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8769    /// ```
8770    pub fn set_update_mask<T>(mut self, v: T) -> Self
8771    where
8772        T: std::convert::Into<wkt::FieldMask>,
8773    {
8774        self.update_mask = std::option::Option::Some(v.into());
8775        self
8776    }
8777
8778    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAccessLabelRequest::update_mask].
8779    ///
8780    /// # Example
8781    /// ```ignore,no_run
8782    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessLabelRequest;
8783    /// use wkt::FieldMask;
8784    /// let x = UpdateDataAccessLabelRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8785    /// let x = UpdateDataAccessLabelRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8786    /// ```
8787    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8788    where
8789        T: std::convert::Into<wkt::FieldMask>,
8790    {
8791        self.update_mask = v.map(|x| x.into());
8792        self
8793    }
8794}
8795
8796impl wkt::message::Message for UpdateDataAccessLabelRequest {
8797    fn typename() -> &'static str {
8798        "type.googleapis.com/google.cloud.chronicle.v1.UpdateDataAccessLabelRequest"
8799    }
8800}
8801
8802/// Request message to delete a data access label.
8803#[derive(Clone, Default, PartialEq)]
8804#[non_exhaustive]
8805pub struct DeleteDataAccessLabelRequest {
8806    /// Required. The ID of the data access label to delete.
8807    /// Format:
8808    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
8809    pub name: std::string::String,
8810
8811    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8812}
8813
8814impl DeleteDataAccessLabelRequest {
8815    /// Creates a new default instance.
8816    pub fn new() -> Self {
8817        std::default::Default::default()
8818    }
8819
8820    /// Sets the value of [name][crate::model::DeleteDataAccessLabelRequest::name].
8821    ///
8822    /// # Example
8823    /// ```ignore,no_run
8824    /// # use google_cloud_chronicle_v1::model::DeleteDataAccessLabelRequest;
8825    /// # let project_id = "project_id";
8826    /// # let location_id = "location_id";
8827    /// # let instance_id = "instance_id";
8828    /// # let data_access_label_id = "data_access_label_id";
8829    /// let x = DeleteDataAccessLabelRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessLabels/{data_access_label_id}"));
8830    /// ```
8831    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8832        self.name = v.into();
8833        self
8834    }
8835}
8836
8837impl wkt::message::Message for DeleteDataAccessLabelRequest {
8838    fn typename() -> &'static str {
8839        "type.googleapis.com/google.cloud.chronicle.v1.DeleteDataAccessLabelRequest"
8840    }
8841}
8842
8843/// Request message for CreateDataAccessScope.
8844#[derive(Clone, Default, PartialEq)]
8845#[non_exhaustive]
8846pub struct CreateDataAccessScopeRequest {
8847    /// Required. The parent resource where this Data Access Scope will be created.
8848    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
8849    pub parent: std::string::String,
8850
8851    /// Required. Data access scope to create.
8852    pub data_access_scope: std::option::Option<crate::model::DataAccessScope>,
8853
8854    /// Required. The user provided scope id which will become the last part of the
8855    /// name of the scope resource. Needs to be compliant with
8856    /// <https://google.aip.dev/122>
8857    pub data_access_scope_id: std::string::String,
8858
8859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8860}
8861
8862impl CreateDataAccessScopeRequest {
8863    /// Creates a new default instance.
8864    pub fn new() -> Self {
8865        std::default::Default::default()
8866    }
8867
8868    /// Sets the value of [parent][crate::model::CreateDataAccessScopeRequest::parent].
8869    ///
8870    /// # Example
8871    /// ```ignore,no_run
8872    /// # use google_cloud_chronicle_v1::model::CreateDataAccessScopeRequest;
8873    /// # let project_id = "project_id";
8874    /// # let location_id = "location_id";
8875    /// # let instance_id = "instance_id";
8876    /// let x = CreateDataAccessScopeRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
8877    /// ```
8878    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8879        self.parent = v.into();
8880        self
8881    }
8882
8883    /// Sets the value of [data_access_scope][crate::model::CreateDataAccessScopeRequest::data_access_scope].
8884    ///
8885    /// # Example
8886    /// ```ignore,no_run
8887    /// # use google_cloud_chronicle_v1::model::CreateDataAccessScopeRequest;
8888    /// use google_cloud_chronicle_v1::model::DataAccessScope;
8889    /// let x = CreateDataAccessScopeRequest::new().set_data_access_scope(DataAccessScope::default()/* use setters */);
8890    /// ```
8891    pub fn set_data_access_scope<T>(mut self, v: T) -> Self
8892    where
8893        T: std::convert::Into<crate::model::DataAccessScope>,
8894    {
8895        self.data_access_scope = std::option::Option::Some(v.into());
8896        self
8897    }
8898
8899    /// Sets or clears the value of [data_access_scope][crate::model::CreateDataAccessScopeRequest::data_access_scope].
8900    ///
8901    /// # Example
8902    /// ```ignore,no_run
8903    /// # use google_cloud_chronicle_v1::model::CreateDataAccessScopeRequest;
8904    /// use google_cloud_chronicle_v1::model::DataAccessScope;
8905    /// let x = CreateDataAccessScopeRequest::new().set_or_clear_data_access_scope(Some(DataAccessScope::default()/* use setters */));
8906    /// let x = CreateDataAccessScopeRequest::new().set_or_clear_data_access_scope(None::<DataAccessScope>);
8907    /// ```
8908    pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
8909    where
8910        T: std::convert::Into<crate::model::DataAccessScope>,
8911    {
8912        self.data_access_scope = v.map(|x| x.into());
8913        self
8914    }
8915
8916    /// Sets the value of [data_access_scope_id][crate::model::CreateDataAccessScopeRequest::data_access_scope_id].
8917    ///
8918    /// # Example
8919    /// ```ignore,no_run
8920    /// # use google_cloud_chronicle_v1::model::CreateDataAccessScopeRequest;
8921    /// let x = CreateDataAccessScopeRequest::new().set_data_access_scope_id("example");
8922    /// ```
8923    pub fn set_data_access_scope_id<T: std::convert::Into<std::string::String>>(
8924        mut self,
8925        v: T,
8926    ) -> Self {
8927        self.data_access_scope_id = v.into();
8928        self
8929    }
8930}
8931
8932impl wkt::message::Message for CreateDataAccessScopeRequest {
8933    fn typename() -> &'static str {
8934        "type.googleapis.com/google.cloud.chronicle.v1.CreateDataAccessScopeRequest"
8935    }
8936}
8937
8938/// Request message to retrieve a data access scope.
8939#[derive(Clone, Default, PartialEq)]
8940#[non_exhaustive]
8941pub struct GetDataAccessScopeRequest {
8942    /// Required. The ID of the data access scope to retrieve.
8943    /// Format:
8944    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}`
8945    pub name: std::string::String,
8946
8947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8948}
8949
8950impl GetDataAccessScopeRequest {
8951    /// Creates a new default instance.
8952    pub fn new() -> Self {
8953        std::default::Default::default()
8954    }
8955
8956    /// Sets the value of [name][crate::model::GetDataAccessScopeRequest::name].
8957    ///
8958    /// # Example
8959    /// ```ignore,no_run
8960    /// # use google_cloud_chronicle_v1::model::GetDataAccessScopeRequest;
8961    /// # let project_id = "project_id";
8962    /// # let location_id = "location_id";
8963    /// # let instance_id = "instance_id";
8964    /// # let data_access_scope_id = "data_access_scope_id";
8965    /// let x = GetDataAccessScopeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessScopes/{data_access_scope_id}"));
8966    /// ```
8967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8968        self.name = v.into();
8969        self
8970    }
8971}
8972
8973impl wkt::message::Message for GetDataAccessScopeRequest {
8974    fn typename() -> &'static str {
8975        "type.googleapis.com/google.cloud.chronicle.v1.GetDataAccessScopeRequest"
8976    }
8977}
8978
8979/// Request message for ListDataAccessScopes.
8980#[derive(Clone, Default, PartialEq)]
8981#[non_exhaustive]
8982pub struct ListDataAccessScopesRequest {
8983    /// Required. The parent resource where this data access scope will be created.
8984    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
8985    pub parent: std::string::String,
8986
8987    /// The maximum number of data access scopes to return. The service may return
8988    /// fewer than this value. If unspecified, at most 100 data access scopes will
8989    /// be returned. The maximum value is 1000; values above 1000 will be coerced
8990    /// to 1000.
8991    pub page_size: i32,
8992
8993    /// A page token, received from a previous `ListDataAccessScopesRequest` call.
8994    /// Provide this to retrieve the subsequent page.
8995    pub page_token: std::string::String,
8996
8997    /// Optional. A filter which should follow the guidelines of AIP-160.
8998    /// Supports filtering on all fieds of DataAccessScope and all operations as
8999    /// mentioned in <https://google.aip.dev/160>.
9000    /// example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR
9001    /// display_name:\"-21-1\"".
9002    pub filter: std::string::String,
9003
9004    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9005}
9006
9007impl ListDataAccessScopesRequest {
9008    /// Creates a new default instance.
9009    pub fn new() -> Self {
9010        std::default::Default::default()
9011    }
9012
9013    /// Sets the value of [parent][crate::model::ListDataAccessScopesRequest::parent].
9014    ///
9015    /// # Example
9016    /// ```ignore,no_run
9017    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesRequest;
9018    /// # let project_id = "project_id";
9019    /// # let location_id = "location_id";
9020    /// # let instance_id = "instance_id";
9021    /// let x = ListDataAccessScopesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
9022    /// ```
9023    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9024        self.parent = v.into();
9025        self
9026    }
9027
9028    /// Sets the value of [page_size][crate::model::ListDataAccessScopesRequest::page_size].
9029    ///
9030    /// # Example
9031    /// ```ignore,no_run
9032    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesRequest;
9033    /// let x = ListDataAccessScopesRequest::new().set_page_size(42);
9034    /// ```
9035    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9036        self.page_size = v.into();
9037        self
9038    }
9039
9040    /// Sets the value of [page_token][crate::model::ListDataAccessScopesRequest::page_token].
9041    ///
9042    /// # Example
9043    /// ```ignore,no_run
9044    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesRequest;
9045    /// let x = ListDataAccessScopesRequest::new().set_page_token("example");
9046    /// ```
9047    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9048        self.page_token = v.into();
9049        self
9050    }
9051
9052    /// Sets the value of [filter][crate::model::ListDataAccessScopesRequest::filter].
9053    ///
9054    /// # Example
9055    /// ```ignore,no_run
9056    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesRequest;
9057    /// let x = ListDataAccessScopesRequest::new().set_filter("example");
9058    /// ```
9059    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9060        self.filter = v.into();
9061        self
9062    }
9063}
9064
9065impl wkt::message::Message for ListDataAccessScopesRequest {
9066    fn typename() -> &'static str {
9067        "type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessScopesRequest"
9068    }
9069}
9070
9071/// Response message for ListDataAccessScopes.
9072#[derive(Clone, Default, PartialEq)]
9073#[non_exhaustive]
9074pub struct ListDataAccessScopesResponse {
9075    /// List of data access scopes.
9076    pub data_access_scopes: std::vec::Vec<crate::model::DataAccessScope>,
9077
9078    /// Whether or not global scope is granted to the user.
9079    pub global_data_access_scope_granted: std::option::Option<bool>,
9080
9081    /// A token, which can be sent as `page_token` to retrieve the next page.
9082    /// If this field is omitted, there are no subsequent pages.
9083    pub next_page_token: std::string::String,
9084
9085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9086}
9087
9088impl ListDataAccessScopesResponse {
9089    /// Creates a new default instance.
9090    pub fn new() -> Self {
9091        std::default::Default::default()
9092    }
9093
9094    /// Sets the value of [data_access_scopes][crate::model::ListDataAccessScopesResponse::data_access_scopes].
9095    ///
9096    /// # Example
9097    /// ```ignore,no_run
9098    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesResponse;
9099    /// use google_cloud_chronicle_v1::model::DataAccessScope;
9100    /// let x = ListDataAccessScopesResponse::new()
9101    ///     .set_data_access_scopes([
9102    ///         DataAccessScope::default()/* use setters */,
9103    ///         DataAccessScope::default()/* use (different) setters */,
9104    ///     ]);
9105    /// ```
9106    pub fn set_data_access_scopes<T, V>(mut self, v: T) -> Self
9107    where
9108        T: std::iter::IntoIterator<Item = V>,
9109        V: std::convert::Into<crate::model::DataAccessScope>,
9110    {
9111        use std::iter::Iterator;
9112        self.data_access_scopes = v.into_iter().map(|i| i.into()).collect();
9113        self
9114    }
9115
9116    /// Sets the value of [global_data_access_scope_granted][crate::model::ListDataAccessScopesResponse::global_data_access_scope_granted].
9117    ///
9118    /// # Example
9119    /// ```ignore,no_run
9120    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesResponse;
9121    /// let x = ListDataAccessScopesResponse::new().set_global_data_access_scope_granted(true);
9122    /// ```
9123    pub fn set_global_data_access_scope_granted<T>(mut self, v: T) -> Self
9124    where
9125        T: std::convert::Into<bool>,
9126    {
9127        self.global_data_access_scope_granted = std::option::Option::Some(v.into());
9128        self
9129    }
9130
9131    /// Sets or clears the value of [global_data_access_scope_granted][crate::model::ListDataAccessScopesResponse::global_data_access_scope_granted].
9132    ///
9133    /// # Example
9134    /// ```ignore,no_run
9135    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesResponse;
9136    /// let x = ListDataAccessScopesResponse::new().set_or_clear_global_data_access_scope_granted(Some(false));
9137    /// let x = ListDataAccessScopesResponse::new().set_or_clear_global_data_access_scope_granted(None::<bool>);
9138    /// ```
9139    pub fn set_or_clear_global_data_access_scope_granted<T>(
9140        mut self,
9141        v: std::option::Option<T>,
9142    ) -> Self
9143    where
9144        T: std::convert::Into<bool>,
9145    {
9146        self.global_data_access_scope_granted = v.map(|x| x.into());
9147        self
9148    }
9149
9150    /// Sets the value of [next_page_token][crate::model::ListDataAccessScopesResponse::next_page_token].
9151    ///
9152    /// # Example
9153    /// ```ignore,no_run
9154    /// # use google_cloud_chronicle_v1::model::ListDataAccessScopesResponse;
9155    /// let x = ListDataAccessScopesResponse::new().set_next_page_token("example");
9156    /// ```
9157    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9158        self.next_page_token = v.into();
9159        self
9160    }
9161}
9162
9163impl wkt::message::Message for ListDataAccessScopesResponse {
9164    fn typename() -> &'static str {
9165        "type.googleapis.com/google.cloud.chronicle.v1.ListDataAccessScopesResponse"
9166    }
9167}
9168
9169#[doc(hidden)]
9170impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAccessScopesResponse {
9171    type PageItem = crate::model::DataAccessScope;
9172
9173    fn items(self) -> std::vec::Vec<Self::PageItem> {
9174        self.data_access_scopes
9175    }
9176
9177    fn next_page_token(&self) -> std::string::String {
9178        use std::clone::Clone;
9179        self.next_page_token.clone()
9180    }
9181}
9182
9183/// Request message for UpdateDataAccessScope method.
9184#[derive(Clone, Default, PartialEq)]
9185#[non_exhaustive]
9186pub struct UpdateDataAccessScopeRequest {
9187    /// Required. The data access scope to update.
9188    ///
9189    /// The scope's `name` field is used to identify the scope to update.
9190    /// Format:
9191    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}`
9192    pub data_access_scope: std::option::Option<crate::model::DataAccessScope>,
9193
9194    /// The list of fields to update. If not included, all fields with a non-empty
9195    /// value will be overwritten. Currently, only the description, the allowed
9196    /// and denied labels list fields are supported for update;
9197    /// an update call that attempts to update any
9198    /// other fields will return INVALID_ARGUMENT.
9199    pub update_mask: std::option::Option<wkt::FieldMask>,
9200
9201    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9202}
9203
9204impl UpdateDataAccessScopeRequest {
9205    /// Creates a new default instance.
9206    pub fn new() -> Self {
9207        std::default::Default::default()
9208    }
9209
9210    /// Sets the value of [data_access_scope][crate::model::UpdateDataAccessScopeRequest::data_access_scope].
9211    ///
9212    /// # Example
9213    /// ```ignore,no_run
9214    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessScopeRequest;
9215    /// use google_cloud_chronicle_v1::model::DataAccessScope;
9216    /// let x = UpdateDataAccessScopeRequest::new().set_data_access_scope(DataAccessScope::default()/* use setters */);
9217    /// ```
9218    pub fn set_data_access_scope<T>(mut self, v: T) -> Self
9219    where
9220        T: std::convert::Into<crate::model::DataAccessScope>,
9221    {
9222        self.data_access_scope = std::option::Option::Some(v.into());
9223        self
9224    }
9225
9226    /// Sets or clears the value of [data_access_scope][crate::model::UpdateDataAccessScopeRequest::data_access_scope].
9227    ///
9228    /// # Example
9229    /// ```ignore,no_run
9230    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessScopeRequest;
9231    /// use google_cloud_chronicle_v1::model::DataAccessScope;
9232    /// let x = UpdateDataAccessScopeRequest::new().set_or_clear_data_access_scope(Some(DataAccessScope::default()/* use setters */));
9233    /// let x = UpdateDataAccessScopeRequest::new().set_or_clear_data_access_scope(None::<DataAccessScope>);
9234    /// ```
9235    pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
9236    where
9237        T: std::convert::Into<crate::model::DataAccessScope>,
9238    {
9239        self.data_access_scope = v.map(|x| x.into());
9240        self
9241    }
9242
9243    /// Sets the value of [update_mask][crate::model::UpdateDataAccessScopeRequest::update_mask].
9244    ///
9245    /// # Example
9246    /// ```ignore,no_run
9247    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessScopeRequest;
9248    /// use wkt::FieldMask;
9249    /// let x = UpdateDataAccessScopeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
9250    /// ```
9251    pub fn set_update_mask<T>(mut self, v: T) -> Self
9252    where
9253        T: std::convert::Into<wkt::FieldMask>,
9254    {
9255        self.update_mask = std::option::Option::Some(v.into());
9256        self
9257    }
9258
9259    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAccessScopeRequest::update_mask].
9260    ///
9261    /// # Example
9262    /// ```ignore,no_run
9263    /// # use google_cloud_chronicle_v1::model::UpdateDataAccessScopeRequest;
9264    /// use wkt::FieldMask;
9265    /// let x = UpdateDataAccessScopeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
9266    /// let x = UpdateDataAccessScopeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
9267    /// ```
9268    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9269    where
9270        T: std::convert::Into<wkt::FieldMask>,
9271    {
9272        self.update_mask = v.map(|x| x.into());
9273        self
9274    }
9275}
9276
9277impl wkt::message::Message for UpdateDataAccessScopeRequest {
9278    fn typename() -> &'static str {
9279        "type.googleapis.com/google.cloud.chronicle.v1.UpdateDataAccessScopeRequest"
9280    }
9281}
9282
9283/// Request message to delete a data access scope.
9284#[derive(Clone, Default, PartialEq)]
9285#[non_exhaustive]
9286pub struct DeleteDataAccessScopeRequest {
9287    /// Required. The ID of the data access scope to delete.
9288    /// Format:
9289    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}`
9290    pub name: std::string::String,
9291
9292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9293}
9294
9295impl DeleteDataAccessScopeRequest {
9296    /// Creates a new default instance.
9297    pub fn new() -> Self {
9298        std::default::Default::default()
9299    }
9300
9301    /// Sets the value of [name][crate::model::DeleteDataAccessScopeRequest::name].
9302    ///
9303    /// # Example
9304    /// ```ignore,no_run
9305    /// # use google_cloud_chronicle_v1::model::DeleteDataAccessScopeRequest;
9306    /// # let project_id = "project_id";
9307    /// # let location_id = "location_id";
9308    /// # let instance_id = "instance_id";
9309    /// # let data_access_scope_id = "data_access_scope_id";
9310    /// let x = DeleteDataAccessScopeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessScopes/{data_access_scope_id}"));
9311    /// ```
9312    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9313        self.name = v.into();
9314        self
9315    }
9316}
9317
9318impl wkt::message::Message for DeleteDataAccessScopeRequest {
9319    fn typename() -> &'static str {
9320        "type.googleapis.com/google.cloud.chronicle.v1.DeleteDataAccessScopeRequest"
9321    }
9322}
9323
9324/// A DataAccessLabel is a label on events to define user access to data.
9325#[derive(Clone, Default, PartialEq)]
9326#[non_exhaustive]
9327pub struct DataAccessLabel {
9328    /// The unique resource name of the data access label.
9329    pub name: std::string::String,
9330
9331    /// Output only. The short name displayed for the label as it appears on event
9332    /// data.
9333    pub display_name: std::string::String,
9334
9335    /// Output only. The time at which the data access label was created.
9336    pub create_time: std::option::Option<wkt::Timestamp>,
9337
9338    /// Output only. The time at which the data access label was last updated.
9339    pub update_time: std::option::Option<wkt::Timestamp>,
9340
9341    /// Output only. The user who created the data access label.
9342    pub author: std::string::String,
9343
9344    /// Output only. The user who last updated the data access label.
9345    pub last_editor: std::string::String,
9346
9347    /// Optional. A description of the data access label for a human reader.
9348    pub description: std::string::String,
9349
9350    /// Required.
9351    /// The definition of the data access label that determines which
9352    /// data gets tagged with this label.
9353    pub definition: std::option::Option<crate::model::data_access_label::Definition>,
9354
9355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9356}
9357
9358impl DataAccessLabel {
9359    /// Creates a new default instance.
9360    pub fn new() -> Self {
9361        std::default::Default::default()
9362    }
9363
9364    /// Sets the value of [name][crate::model::DataAccessLabel::name].
9365    ///
9366    /// # Example
9367    /// ```ignore,no_run
9368    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9369    /// # let project_id = "project_id";
9370    /// # let location_id = "location_id";
9371    /// # let instance_id = "instance_id";
9372    /// # let data_access_label_id = "data_access_label_id";
9373    /// let x = DataAccessLabel::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessLabels/{data_access_label_id}"));
9374    /// ```
9375    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9376        self.name = v.into();
9377        self
9378    }
9379
9380    /// Sets the value of [display_name][crate::model::DataAccessLabel::display_name].
9381    ///
9382    /// # Example
9383    /// ```ignore,no_run
9384    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9385    /// let x = DataAccessLabel::new().set_display_name("example");
9386    /// ```
9387    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9388        self.display_name = v.into();
9389        self
9390    }
9391
9392    /// Sets the value of [create_time][crate::model::DataAccessLabel::create_time].
9393    ///
9394    /// # Example
9395    /// ```ignore,no_run
9396    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9397    /// use wkt::Timestamp;
9398    /// let x = DataAccessLabel::new().set_create_time(Timestamp::default()/* use setters */);
9399    /// ```
9400    pub fn set_create_time<T>(mut self, v: T) -> Self
9401    where
9402        T: std::convert::Into<wkt::Timestamp>,
9403    {
9404        self.create_time = std::option::Option::Some(v.into());
9405        self
9406    }
9407
9408    /// Sets or clears the value of [create_time][crate::model::DataAccessLabel::create_time].
9409    ///
9410    /// # Example
9411    /// ```ignore,no_run
9412    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9413    /// use wkt::Timestamp;
9414    /// let x = DataAccessLabel::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9415    /// let x = DataAccessLabel::new().set_or_clear_create_time(None::<Timestamp>);
9416    /// ```
9417    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9418    where
9419        T: std::convert::Into<wkt::Timestamp>,
9420    {
9421        self.create_time = v.map(|x| x.into());
9422        self
9423    }
9424
9425    /// Sets the value of [update_time][crate::model::DataAccessLabel::update_time].
9426    ///
9427    /// # Example
9428    /// ```ignore,no_run
9429    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9430    /// use wkt::Timestamp;
9431    /// let x = DataAccessLabel::new().set_update_time(Timestamp::default()/* use setters */);
9432    /// ```
9433    pub fn set_update_time<T>(mut self, v: T) -> Self
9434    where
9435        T: std::convert::Into<wkt::Timestamp>,
9436    {
9437        self.update_time = std::option::Option::Some(v.into());
9438        self
9439    }
9440
9441    /// Sets or clears the value of [update_time][crate::model::DataAccessLabel::update_time].
9442    ///
9443    /// # Example
9444    /// ```ignore,no_run
9445    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9446    /// use wkt::Timestamp;
9447    /// let x = DataAccessLabel::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9448    /// let x = DataAccessLabel::new().set_or_clear_update_time(None::<Timestamp>);
9449    /// ```
9450    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9451    where
9452        T: std::convert::Into<wkt::Timestamp>,
9453    {
9454        self.update_time = v.map(|x| x.into());
9455        self
9456    }
9457
9458    /// Sets the value of [author][crate::model::DataAccessLabel::author].
9459    ///
9460    /// # Example
9461    /// ```ignore,no_run
9462    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9463    /// let x = DataAccessLabel::new().set_author("example");
9464    /// ```
9465    pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9466        self.author = v.into();
9467        self
9468    }
9469
9470    /// Sets the value of [last_editor][crate::model::DataAccessLabel::last_editor].
9471    ///
9472    /// # Example
9473    /// ```ignore,no_run
9474    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9475    /// let x = DataAccessLabel::new().set_last_editor("example");
9476    /// ```
9477    pub fn set_last_editor<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9478        self.last_editor = v.into();
9479        self
9480    }
9481
9482    /// Sets the value of [description][crate::model::DataAccessLabel::description].
9483    ///
9484    /// # Example
9485    /// ```ignore,no_run
9486    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9487    /// let x = DataAccessLabel::new().set_description("example");
9488    /// ```
9489    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9490        self.description = v.into();
9491        self
9492    }
9493
9494    /// Sets the value of [definition][crate::model::DataAccessLabel::definition].
9495    ///
9496    /// Note that all the setters affecting `definition` are mutually
9497    /// exclusive.
9498    ///
9499    /// # Example
9500    /// ```ignore,no_run
9501    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9502    /// use google_cloud_chronicle_v1::model::data_access_label::Definition;
9503    /// let x = DataAccessLabel::new().set_definition(Some(Definition::UdmQuery("example".to_string())));
9504    /// ```
9505    pub fn set_definition<
9506        T: std::convert::Into<std::option::Option<crate::model::data_access_label::Definition>>,
9507    >(
9508        mut self,
9509        v: T,
9510    ) -> Self {
9511        self.definition = v.into();
9512        self
9513    }
9514
9515    /// The value of [definition][crate::model::DataAccessLabel::definition]
9516    /// if it holds a `UdmQuery`, `None` if the field is not set or
9517    /// holds a different branch.
9518    pub fn udm_query(&self) -> std::option::Option<&std::string::String> {
9519        #[allow(unreachable_patterns)]
9520        self.definition.as_ref().and_then(|v| match v {
9521            crate::model::data_access_label::Definition::UdmQuery(v) => {
9522                std::option::Option::Some(v)
9523            }
9524            _ => std::option::Option::None,
9525        })
9526    }
9527
9528    /// Sets the value of [definition][crate::model::DataAccessLabel::definition]
9529    /// to hold a `UdmQuery`.
9530    ///
9531    /// Note that all the setters affecting `definition` are
9532    /// mutually exclusive.
9533    ///
9534    /// # Example
9535    /// ```ignore,no_run
9536    /// # use google_cloud_chronicle_v1::model::DataAccessLabel;
9537    /// let x = DataAccessLabel::new().set_udm_query("example");
9538    /// assert!(x.udm_query().is_some());
9539    /// ```
9540    pub fn set_udm_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9541        self.definition = std::option::Option::Some(
9542            crate::model::data_access_label::Definition::UdmQuery(v.into()),
9543        );
9544        self
9545    }
9546}
9547
9548impl wkt::message::Message for DataAccessLabel {
9549    fn typename() -> &'static str {
9550        "type.googleapis.com/google.cloud.chronicle.v1.DataAccessLabel"
9551    }
9552}
9553
9554/// Defines additional types related to [DataAccessLabel].
9555pub mod data_access_label {
9556    #[allow(unused_imports)]
9557    use super::*;
9558
9559    /// Required.
9560    /// The definition of the data access label that determines which
9561    /// data gets tagged with this label.
9562    #[derive(Clone, Debug, PartialEq)]
9563    #[non_exhaustive]
9564    pub enum Definition {
9565        /// A UDM query over event data.
9566        UdmQuery(std::string::String),
9567    }
9568}
9569
9570/// A DataAccessScope is a boolean expression of data access labels used
9571/// to restrict access to data for users.
9572#[derive(Clone, Default, PartialEq)]
9573#[non_exhaustive]
9574pub struct DataAccessScope {
9575    /// Required. The unique full name of the data access scope.
9576    /// The name should comply with <https://google.aip.dev/122> standards.
9577    pub name: std::string::String,
9578
9579    /// Optional. The allowed labels for the scope.
9580    /// Either allow_all or allowed_data_access_labels needs to be provided.
9581    /// When provided, there has to be at least one label allowed for the scope to
9582    /// be valid.
9583    /// The logical operator for evaluation of the allowed labels is OR.
9584    /// E.g.: A customer with scope with allowed labels A and B will be able
9585    /// to see data with labeled with A or B or (A and B).
9586    pub allowed_data_access_labels: std::vec::Vec<crate::model::DataAccessLabelReference>,
9587
9588    /// Optional. The denied labels for the scope.
9589    /// The logical operator for evaluation of the denied labels is AND.
9590    /// E.g.: A customer with scope with denied labels A and B won't be able
9591    /// to see data labeled with A and data labeled with B
9592    /// and data with labels A and B.
9593    pub denied_data_access_labels: std::vec::Vec<crate::model::DataAccessLabelReference>,
9594
9595    /// Output only. The name to be used for display to customers of the data
9596    /// access scope.
9597    pub display_name: std::string::String,
9598
9599    /// Output only. The time at which the data access scope was created.
9600    pub create_time: std::option::Option<wkt::Timestamp>,
9601
9602    /// Output only. The time at which the data access scope was last updated.
9603    pub update_time: std::option::Option<wkt::Timestamp>,
9604
9605    /// Output only. The user who created the data access scope.
9606    pub author: std::string::String,
9607
9608    /// Output only. The user who last updated the data access scope.
9609    pub last_editor: std::string::String,
9610
9611    /// Optional. A description of the data access scope for a human reader.
9612    pub description: std::string::String,
9613
9614    /// Optional. Whether or not the scope allows all labels, allow_all and
9615    /// allowed_data_access_labels are mutually exclusive and one of them must be
9616    /// present. denied_data_access_labels can still be used along with allow_all.
9617    /// When combined with denied_data_access_labels, access will be granted to all
9618    /// data that doesn't have labels mentioned in denied_data_access_labels. E.g.:
9619    /// A customer with scope with denied labels A and B and allow_all will be able
9620    /// to see all data except data labeled with A and data labeled with B and data
9621    /// with labels A and B.
9622    pub allow_all: bool,
9623
9624    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9625}
9626
9627impl DataAccessScope {
9628    /// Creates a new default instance.
9629    pub fn new() -> Self {
9630        std::default::Default::default()
9631    }
9632
9633    /// Sets the value of [name][crate::model::DataAccessScope::name].
9634    ///
9635    /// # Example
9636    /// ```ignore,no_run
9637    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9638    /// # let project_id = "project_id";
9639    /// # let location_id = "location_id";
9640    /// # let instance_id = "instance_id";
9641    /// # let data_access_scope_id = "data_access_scope_id";
9642    /// let x = DataAccessScope::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessScopes/{data_access_scope_id}"));
9643    /// ```
9644    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9645        self.name = v.into();
9646        self
9647    }
9648
9649    /// Sets the value of [allowed_data_access_labels][crate::model::DataAccessScope::allowed_data_access_labels].
9650    ///
9651    /// # Example
9652    /// ```ignore,no_run
9653    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9654    /// use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9655    /// let x = DataAccessScope::new()
9656    ///     .set_allowed_data_access_labels([
9657    ///         DataAccessLabelReference::default()/* use setters */,
9658    ///         DataAccessLabelReference::default()/* use (different) setters */,
9659    ///     ]);
9660    /// ```
9661    pub fn set_allowed_data_access_labels<T, V>(mut self, v: T) -> Self
9662    where
9663        T: std::iter::IntoIterator<Item = V>,
9664        V: std::convert::Into<crate::model::DataAccessLabelReference>,
9665    {
9666        use std::iter::Iterator;
9667        self.allowed_data_access_labels = v.into_iter().map(|i| i.into()).collect();
9668        self
9669    }
9670
9671    /// Sets the value of [denied_data_access_labels][crate::model::DataAccessScope::denied_data_access_labels].
9672    ///
9673    /// # Example
9674    /// ```ignore,no_run
9675    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9676    /// use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9677    /// let x = DataAccessScope::new()
9678    ///     .set_denied_data_access_labels([
9679    ///         DataAccessLabelReference::default()/* use setters */,
9680    ///         DataAccessLabelReference::default()/* use (different) setters */,
9681    ///     ]);
9682    /// ```
9683    pub fn set_denied_data_access_labels<T, V>(mut self, v: T) -> Self
9684    where
9685        T: std::iter::IntoIterator<Item = V>,
9686        V: std::convert::Into<crate::model::DataAccessLabelReference>,
9687    {
9688        use std::iter::Iterator;
9689        self.denied_data_access_labels = v.into_iter().map(|i| i.into()).collect();
9690        self
9691    }
9692
9693    /// Sets the value of [display_name][crate::model::DataAccessScope::display_name].
9694    ///
9695    /// # Example
9696    /// ```ignore,no_run
9697    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9698    /// let x = DataAccessScope::new().set_display_name("example");
9699    /// ```
9700    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9701        self.display_name = v.into();
9702        self
9703    }
9704
9705    /// Sets the value of [create_time][crate::model::DataAccessScope::create_time].
9706    ///
9707    /// # Example
9708    /// ```ignore,no_run
9709    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9710    /// use wkt::Timestamp;
9711    /// let x = DataAccessScope::new().set_create_time(Timestamp::default()/* use setters */);
9712    /// ```
9713    pub fn set_create_time<T>(mut self, v: T) -> Self
9714    where
9715        T: std::convert::Into<wkt::Timestamp>,
9716    {
9717        self.create_time = std::option::Option::Some(v.into());
9718        self
9719    }
9720
9721    /// Sets or clears the value of [create_time][crate::model::DataAccessScope::create_time].
9722    ///
9723    /// # Example
9724    /// ```ignore,no_run
9725    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9726    /// use wkt::Timestamp;
9727    /// let x = DataAccessScope::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9728    /// let x = DataAccessScope::new().set_or_clear_create_time(None::<Timestamp>);
9729    /// ```
9730    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9731    where
9732        T: std::convert::Into<wkt::Timestamp>,
9733    {
9734        self.create_time = v.map(|x| x.into());
9735        self
9736    }
9737
9738    /// Sets the value of [update_time][crate::model::DataAccessScope::update_time].
9739    ///
9740    /// # Example
9741    /// ```ignore,no_run
9742    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9743    /// use wkt::Timestamp;
9744    /// let x = DataAccessScope::new().set_update_time(Timestamp::default()/* use setters */);
9745    /// ```
9746    pub fn set_update_time<T>(mut self, v: T) -> Self
9747    where
9748        T: std::convert::Into<wkt::Timestamp>,
9749    {
9750        self.update_time = std::option::Option::Some(v.into());
9751        self
9752    }
9753
9754    /// Sets or clears the value of [update_time][crate::model::DataAccessScope::update_time].
9755    ///
9756    /// # Example
9757    /// ```ignore,no_run
9758    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9759    /// use wkt::Timestamp;
9760    /// let x = DataAccessScope::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9761    /// let x = DataAccessScope::new().set_or_clear_update_time(None::<Timestamp>);
9762    /// ```
9763    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9764    where
9765        T: std::convert::Into<wkt::Timestamp>,
9766    {
9767        self.update_time = v.map(|x| x.into());
9768        self
9769    }
9770
9771    /// Sets the value of [author][crate::model::DataAccessScope::author].
9772    ///
9773    /// # Example
9774    /// ```ignore,no_run
9775    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9776    /// let x = DataAccessScope::new().set_author("example");
9777    /// ```
9778    pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9779        self.author = v.into();
9780        self
9781    }
9782
9783    /// Sets the value of [last_editor][crate::model::DataAccessScope::last_editor].
9784    ///
9785    /// # Example
9786    /// ```ignore,no_run
9787    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9788    /// let x = DataAccessScope::new().set_last_editor("example");
9789    /// ```
9790    pub fn set_last_editor<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9791        self.last_editor = v.into();
9792        self
9793    }
9794
9795    /// Sets the value of [description][crate::model::DataAccessScope::description].
9796    ///
9797    /// # Example
9798    /// ```ignore,no_run
9799    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9800    /// let x = DataAccessScope::new().set_description("example");
9801    /// ```
9802    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9803        self.description = v.into();
9804        self
9805    }
9806
9807    /// Sets the value of [allow_all][crate::model::DataAccessScope::allow_all].
9808    ///
9809    /// # Example
9810    /// ```ignore,no_run
9811    /// # use google_cloud_chronicle_v1::model::DataAccessScope;
9812    /// let x = DataAccessScope::new().set_allow_all(true);
9813    /// ```
9814    pub fn set_allow_all<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9815        self.allow_all = v.into();
9816        self
9817    }
9818}
9819
9820impl wkt::message::Message for DataAccessScope {
9821    fn typename() -> &'static str {
9822        "type.googleapis.com/google.cloud.chronicle.v1.DataAccessScope"
9823    }
9824}
9825
9826/// Reference object to a data access label.
9827#[derive(Clone, Default, PartialEq)]
9828#[non_exhaustive]
9829pub struct DataAccessLabelReference {
9830    /// Output only. The display name of the label.
9831    /// Data access label and log types's name
9832    /// will match the display name of the resource.
9833    /// The asset namespace will match the namespace itself.
9834    /// The ingestion key value pair will match the key of the tuple.
9835    pub display_name: std::string::String,
9836
9837    /// The unique identifier for the label.
9838    pub label: std::option::Option<crate::model::data_access_label_reference::Label>,
9839
9840    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9841}
9842
9843impl DataAccessLabelReference {
9844    /// Creates a new default instance.
9845    pub fn new() -> Self {
9846        std::default::Default::default()
9847    }
9848
9849    /// Sets the value of [display_name][crate::model::DataAccessLabelReference::display_name].
9850    ///
9851    /// # Example
9852    /// ```ignore,no_run
9853    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9854    /// let x = DataAccessLabelReference::new().set_display_name("example");
9855    /// ```
9856    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9857        self.display_name = v.into();
9858        self
9859    }
9860
9861    /// Sets the value of [label][crate::model::DataAccessLabelReference::label].
9862    ///
9863    /// Note that all the setters affecting `label` are mutually
9864    /// exclusive.
9865    ///
9866    /// # Example
9867    /// ```ignore,no_run
9868    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9869    /// use google_cloud_chronicle_v1::model::data_access_label_reference::Label;
9870    /// let x = DataAccessLabelReference::new().set_label(Some(Label::DataAccessLabel("example".to_string())));
9871    /// ```
9872    pub fn set_label<
9873        T: std::convert::Into<std::option::Option<crate::model::data_access_label_reference::Label>>,
9874    >(
9875        mut self,
9876        v: T,
9877    ) -> Self {
9878        self.label = v.into();
9879        self
9880    }
9881
9882    /// The value of [label][crate::model::DataAccessLabelReference::label]
9883    /// if it holds a `DataAccessLabel`, `None` if the field is not set or
9884    /// holds a different branch.
9885    pub fn data_access_label(&self) -> std::option::Option<&std::string::String> {
9886        #[allow(unreachable_patterns)]
9887        self.label.as_ref().and_then(|v| match v {
9888            crate::model::data_access_label_reference::Label::DataAccessLabel(v) => {
9889                std::option::Option::Some(v)
9890            }
9891            _ => std::option::Option::None,
9892        })
9893    }
9894
9895    /// Sets the value of [label][crate::model::DataAccessLabelReference::label]
9896    /// to hold a `DataAccessLabel`.
9897    ///
9898    /// Note that all the setters affecting `label` are
9899    /// mutually exclusive.
9900    ///
9901    /// # Example
9902    /// ```ignore,no_run
9903    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9904    /// let x = DataAccessLabelReference::new().set_data_access_label("example");
9905    /// assert!(x.data_access_label().is_some());
9906    /// assert!(x.log_type().is_none());
9907    /// assert!(x.asset_namespace().is_none());
9908    /// assert!(x.ingestion_label().is_none());
9909    /// ```
9910    pub fn set_data_access_label<T: std::convert::Into<std::string::String>>(
9911        mut self,
9912        v: T,
9913    ) -> Self {
9914        self.label = std::option::Option::Some(
9915            crate::model::data_access_label_reference::Label::DataAccessLabel(v.into()),
9916        );
9917        self
9918    }
9919
9920    /// The value of [label][crate::model::DataAccessLabelReference::label]
9921    /// if it holds a `LogType`, `None` if the field is not set or
9922    /// holds a different branch.
9923    pub fn log_type(&self) -> std::option::Option<&std::string::String> {
9924        #[allow(unreachable_patterns)]
9925        self.label.as_ref().and_then(|v| match v {
9926            crate::model::data_access_label_reference::Label::LogType(v) => {
9927                std::option::Option::Some(v)
9928            }
9929            _ => std::option::Option::None,
9930        })
9931    }
9932
9933    /// Sets the value of [label][crate::model::DataAccessLabelReference::label]
9934    /// to hold a `LogType`.
9935    ///
9936    /// Note that all the setters affecting `label` are
9937    /// mutually exclusive.
9938    ///
9939    /// # Example
9940    /// ```ignore,no_run
9941    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9942    /// let x = DataAccessLabelReference::new().set_log_type("example");
9943    /// assert!(x.log_type().is_some());
9944    /// assert!(x.data_access_label().is_none());
9945    /// assert!(x.asset_namespace().is_none());
9946    /// assert!(x.ingestion_label().is_none());
9947    /// ```
9948    pub fn set_log_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9949        self.label = std::option::Option::Some(
9950            crate::model::data_access_label_reference::Label::LogType(v.into()),
9951        );
9952        self
9953    }
9954
9955    /// The value of [label][crate::model::DataAccessLabelReference::label]
9956    /// if it holds a `AssetNamespace`, `None` if the field is not set or
9957    /// holds a different branch.
9958    pub fn asset_namespace(&self) -> std::option::Option<&std::string::String> {
9959        #[allow(unreachable_patterns)]
9960        self.label.as_ref().and_then(|v| match v {
9961            crate::model::data_access_label_reference::Label::AssetNamespace(v) => {
9962                std::option::Option::Some(v)
9963            }
9964            _ => std::option::Option::None,
9965        })
9966    }
9967
9968    /// Sets the value of [label][crate::model::DataAccessLabelReference::label]
9969    /// to hold a `AssetNamespace`.
9970    ///
9971    /// Note that all the setters affecting `label` are
9972    /// mutually exclusive.
9973    ///
9974    /// # Example
9975    /// ```ignore,no_run
9976    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
9977    /// let x = DataAccessLabelReference::new().set_asset_namespace("example");
9978    /// assert!(x.asset_namespace().is_some());
9979    /// assert!(x.data_access_label().is_none());
9980    /// assert!(x.log_type().is_none());
9981    /// assert!(x.ingestion_label().is_none());
9982    /// ```
9983    pub fn set_asset_namespace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9984        self.label = std::option::Option::Some(
9985            crate::model::data_access_label_reference::Label::AssetNamespace(v.into()),
9986        );
9987        self
9988    }
9989
9990    /// The value of [label][crate::model::DataAccessLabelReference::label]
9991    /// if it holds a `IngestionLabel`, `None` if the field is not set or
9992    /// holds a different branch.
9993    pub fn ingestion_label(
9994        &self,
9995    ) -> std::option::Option<&std::boxed::Box<crate::model::IngestionLabel>> {
9996        #[allow(unreachable_patterns)]
9997        self.label.as_ref().and_then(|v| match v {
9998            crate::model::data_access_label_reference::Label::IngestionLabel(v) => {
9999                std::option::Option::Some(v)
10000            }
10001            _ => std::option::Option::None,
10002        })
10003    }
10004
10005    /// Sets the value of [label][crate::model::DataAccessLabelReference::label]
10006    /// to hold a `IngestionLabel`.
10007    ///
10008    /// Note that all the setters affecting `label` are
10009    /// mutually exclusive.
10010    ///
10011    /// # Example
10012    /// ```ignore,no_run
10013    /// # use google_cloud_chronicle_v1::model::DataAccessLabelReference;
10014    /// use google_cloud_chronicle_v1::model::IngestionLabel;
10015    /// let x = DataAccessLabelReference::new().set_ingestion_label(IngestionLabel::default()/* use setters */);
10016    /// assert!(x.ingestion_label().is_some());
10017    /// assert!(x.data_access_label().is_none());
10018    /// assert!(x.log_type().is_none());
10019    /// assert!(x.asset_namespace().is_none());
10020    /// ```
10021    pub fn set_ingestion_label<
10022        T: std::convert::Into<std::boxed::Box<crate::model::IngestionLabel>>,
10023    >(
10024        mut self,
10025        v: T,
10026    ) -> Self {
10027        self.label = std::option::Option::Some(
10028            crate::model::data_access_label_reference::Label::IngestionLabel(v.into()),
10029        );
10030        self
10031    }
10032}
10033
10034impl wkt::message::Message for DataAccessLabelReference {
10035    fn typename() -> &'static str {
10036        "type.googleapis.com/google.cloud.chronicle.v1.DataAccessLabelReference"
10037    }
10038}
10039
10040/// Defines additional types related to [DataAccessLabelReference].
10041pub mod data_access_label_reference {
10042    #[allow(unused_imports)]
10043    use super::*;
10044
10045    /// The unique identifier for the label.
10046    #[derive(Clone, Debug, PartialEq)]
10047    #[non_exhaustive]
10048    pub enum Label {
10049        /// The name of the data access label.
10050        DataAccessLabel(std::string::String),
10051        /// The name of the log type.
10052        LogType(std::string::String),
10053        /// The asset namespace configured in the forwarder
10054        /// of the customer's events.
10055        AssetNamespace(std::string::String),
10056        /// The ingestion label configured in the forwarder of the customer's events.
10057        IngestionLabel(std::boxed::Box<crate::model::IngestionLabel>),
10058    }
10059}
10060
10061/// Representation of an ingestion label type.
10062#[derive(Clone, Default, PartialEq)]
10063#[non_exhaustive]
10064pub struct IngestionLabel {
10065    /// Required. The key of the ingestion label. Always required.
10066    pub ingestion_label_key: std::string::String,
10067
10068    /// Optional. The value of the ingestion label. Optional. An object
10069    /// with no provided value and some key provided would match
10070    /// against the given key and ANY value.
10071    pub ingestion_label_value: std::string::String,
10072
10073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10074}
10075
10076impl IngestionLabel {
10077    /// Creates a new default instance.
10078    pub fn new() -> Self {
10079        std::default::Default::default()
10080    }
10081
10082    /// Sets the value of [ingestion_label_key][crate::model::IngestionLabel::ingestion_label_key].
10083    ///
10084    /// # Example
10085    /// ```ignore,no_run
10086    /// # use google_cloud_chronicle_v1::model::IngestionLabel;
10087    /// let x = IngestionLabel::new().set_ingestion_label_key("example");
10088    /// ```
10089    pub fn set_ingestion_label_key<T: std::convert::Into<std::string::String>>(
10090        mut self,
10091        v: T,
10092    ) -> Self {
10093        self.ingestion_label_key = v.into();
10094        self
10095    }
10096
10097    /// Sets the value of [ingestion_label_value][crate::model::IngestionLabel::ingestion_label_value].
10098    ///
10099    /// # Example
10100    /// ```ignore,no_run
10101    /// # use google_cloud_chronicle_v1::model::IngestionLabel;
10102    /// let x = IngestionLabel::new().set_ingestion_label_value("example");
10103    /// ```
10104    pub fn set_ingestion_label_value<T: std::convert::Into<std::string::String>>(
10105        mut self,
10106        v: T,
10107    ) -> Self {
10108        self.ingestion_label_value = v.into();
10109        self
10110    }
10111}
10112
10113impl wkt::message::Message for IngestionLabel {
10114    fn typename() -> &'static str {
10115        "type.googleapis.com/google.cloud.chronicle.v1.IngestionLabel"
10116    }
10117}
10118
10119/// A request to create DataTable.
10120#[derive(Clone, Default, PartialEq)]
10121#[non_exhaustive]
10122pub struct CreateDataTableRequest {
10123    /// Required. The parent resource where this data table will be created.
10124    /// Format: projects/{project}/locations/{location}/instances/{instance}
10125    pub parent: std::string::String,
10126
10127    /// Required. The data table being created.
10128    pub data_table: std::option::Option<crate::model::DataTable>,
10129
10130    /// Required. The ID to use for the data table. This is also the display name
10131    /// for the data table. It must satisfy the following requirements:
10132    ///
10133    /// - Starts with letter.
10134    /// - Contains only letters, numbers and underscore.
10135    /// - Must be unique and has length < 256.
10136    pub data_table_id: std::string::String,
10137
10138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10139}
10140
10141impl CreateDataTableRequest {
10142    /// Creates a new default instance.
10143    pub fn new() -> Self {
10144        std::default::Default::default()
10145    }
10146
10147    /// Sets the value of [parent][crate::model::CreateDataTableRequest::parent].
10148    ///
10149    /// # Example
10150    /// ```ignore,no_run
10151    /// # use google_cloud_chronicle_v1::model::CreateDataTableRequest;
10152    /// # let project_id = "project_id";
10153    /// # let location_id = "location_id";
10154    /// # let instance_id = "instance_id";
10155    /// let x = CreateDataTableRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
10156    /// ```
10157    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10158        self.parent = v.into();
10159        self
10160    }
10161
10162    /// Sets the value of [data_table][crate::model::CreateDataTableRequest::data_table].
10163    ///
10164    /// # Example
10165    /// ```ignore,no_run
10166    /// # use google_cloud_chronicle_v1::model::CreateDataTableRequest;
10167    /// use google_cloud_chronicle_v1::model::DataTable;
10168    /// let x = CreateDataTableRequest::new().set_data_table(DataTable::default()/* use setters */);
10169    /// ```
10170    pub fn set_data_table<T>(mut self, v: T) -> Self
10171    where
10172        T: std::convert::Into<crate::model::DataTable>,
10173    {
10174        self.data_table = std::option::Option::Some(v.into());
10175        self
10176    }
10177
10178    /// Sets or clears the value of [data_table][crate::model::CreateDataTableRequest::data_table].
10179    ///
10180    /// # Example
10181    /// ```ignore,no_run
10182    /// # use google_cloud_chronicle_v1::model::CreateDataTableRequest;
10183    /// use google_cloud_chronicle_v1::model::DataTable;
10184    /// let x = CreateDataTableRequest::new().set_or_clear_data_table(Some(DataTable::default()/* use setters */));
10185    /// let x = CreateDataTableRequest::new().set_or_clear_data_table(None::<DataTable>);
10186    /// ```
10187    pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
10188    where
10189        T: std::convert::Into<crate::model::DataTable>,
10190    {
10191        self.data_table = v.map(|x| x.into());
10192        self
10193    }
10194
10195    /// Sets the value of [data_table_id][crate::model::CreateDataTableRequest::data_table_id].
10196    ///
10197    /// # Example
10198    /// ```ignore,no_run
10199    /// # use google_cloud_chronicle_v1::model::CreateDataTableRequest;
10200    /// let x = CreateDataTableRequest::new().set_data_table_id("example");
10201    /// ```
10202    pub fn set_data_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10203        self.data_table_id = v.into();
10204        self
10205    }
10206}
10207
10208impl wkt::message::Message for CreateDataTableRequest {
10209    fn typename() -> &'static str {
10210        "type.googleapis.com/google.cloud.chronicle.v1.CreateDataTableRequest"
10211    }
10212}
10213
10214/// A request to get details about a data table.
10215#[derive(Clone, Default, PartialEq)]
10216#[non_exhaustive]
10217pub struct GetDataTableRequest {
10218    /// Required. The resource name of the data table to retrieve.
10219    /// Format:
10220    /// projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table}
10221    pub name: std::string::String,
10222
10223    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10224}
10225
10226impl GetDataTableRequest {
10227    /// Creates a new default instance.
10228    pub fn new() -> Self {
10229        std::default::Default::default()
10230    }
10231
10232    /// Sets the value of [name][crate::model::GetDataTableRequest::name].
10233    ///
10234    /// # Example
10235    /// ```ignore,no_run
10236    /// # use google_cloud_chronicle_v1::model::GetDataTableRequest;
10237    /// # let project_id = "project_id";
10238    /// # let location_id = "location_id";
10239    /// # let instance_id = "instance_id";
10240    /// # let data_table_id = "data_table_id";
10241    /// let x = GetDataTableRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
10242    /// ```
10243    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10244        self.name = v.into();
10245        self
10246    }
10247}
10248
10249impl wkt::message::Message for GetDataTableRequest {
10250    fn typename() -> &'static str {
10251        "type.googleapis.com/google.cloud.chronicle.v1.GetDataTableRequest"
10252    }
10253}
10254
10255/// A request to update details of data table.
10256#[derive(Clone, Default, PartialEq)]
10257#[non_exhaustive]
10258pub struct UpdateDataTableRequest {
10259    /// Required. This field is used to identify the datatable to update.
10260    /// Format:
10261    /// projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table}
10262    pub data_table: std::option::Option<crate::model::DataTable>,
10263
10264    /// Optional. The list of metadata fields to update. Currently data tables only
10265    /// support updating the `description`, `row_time_to_live` and `scope_info`
10266    /// fields. When no field mask is supplied, all non-empty fields will be
10267    /// updated. A field mask of "*" will update all fields, whether empty or not.
10268    pub update_mask: std::option::Option<wkt::FieldMask>,
10269
10270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10271}
10272
10273impl UpdateDataTableRequest {
10274    /// Creates a new default instance.
10275    pub fn new() -> Self {
10276        std::default::Default::default()
10277    }
10278
10279    /// Sets the value of [data_table][crate::model::UpdateDataTableRequest::data_table].
10280    ///
10281    /// # Example
10282    /// ```ignore,no_run
10283    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRequest;
10284    /// use google_cloud_chronicle_v1::model::DataTable;
10285    /// let x = UpdateDataTableRequest::new().set_data_table(DataTable::default()/* use setters */);
10286    /// ```
10287    pub fn set_data_table<T>(mut self, v: T) -> Self
10288    where
10289        T: std::convert::Into<crate::model::DataTable>,
10290    {
10291        self.data_table = std::option::Option::Some(v.into());
10292        self
10293    }
10294
10295    /// Sets or clears the value of [data_table][crate::model::UpdateDataTableRequest::data_table].
10296    ///
10297    /// # Example
10298    /// ```ignore,no_run
10299    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRequest;
10300    /// use google_cloud_chronicle_v1::model::DataTable;
10301    /// let x = UpdateDataTableRequest::new().set_or_clear_data_table(Some(DataTable::default()/* use setters */));
10302    /// let x = UpdateDataTableRequest::new().set_or_clear_data_table(None::<DataTable>);
10303    /// ```
10304    pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
10305    where
10306        T: std::convert::Into<crate::model::DataTable>,
10307    {
10308        self.data_table = v.map(|x| x.into());
10309        self
10310    }
10311
10312    /// Sets the value of [update_mask][crate::model::UpdateDataTableRequest::update_mask].
10313    ///
10314    /// # Example
10315    /// ```ignore,no_run
10316    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRequest;
10317    /// use wkt::FieldMask;
10318    /// let x = UpdateDataTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
10319    /// ```
10320    pub fn set_update_mask<T>(mut self, v: T) -> Self
10321    where
10322        T: std::convert::Into<wkt::FieldMask>,
10323    {
10324        self.update_mask = std::option::Option::Some(v.into());
10325        self
10326    }
10327
10328    /// Sets or clears the value of [update_mask][crate::model::UpdateDataTableRequest::update_mask].
10329    ///
10330    /// # Example
10331    /// ```ignore,no_run
10332    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRequest;
10333    /// use wkt::FieldMask;
10334    /// let x = UpdateDataTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
10335    /// let x = UpdateDataTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
10336    /// ```
10337    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10338    where
10339        T: std::convert::Into<wkt::FieldMask>,
10340    {
10341        self.update_mask = v.map(|x| x.into());
10342        self
10343    }
10344}
10345
10346impl wkt::message::Message for UpdateDataTableRequest {
10347    fn typename() -> &'static str {
10348        "type.googleapis.com/google.cloud.chronicle.v1.UpdateDataTableRequest"
10349    }
10350}
10351
10352/// A request for a list of data tables.
10353#[derive(Clone, Default, PartialEq)]
10354#[non_exhaustive]
10355pub struct ListDataTablesRequest {
10356    /// Required. The parent resource where this data table will be created.
10357    /// Format: projects/{project}/locations/{location}/instances/{instance}
10358    pub parent: std::string::String,
10359
10360    /// Optional. The maximum number of data tables to return. The service may
10361    /// return fewer than this value. If unspecified, at most 100 data tables will
10362    /// be returned. The maximum value is 1000; values above 1000 will be coerced
10363    /// to 1000.
10364    pub page_size: i32,
10365
10366    /// Optional. A page token, received from a previous `ListDataTables` call.
10367    /// Provide this to retrieve the subsequent page.
10368    /// When paginating, all other parameters provided to
10369    /// `ListDataTables` must match the call that provided the page
10370    /// token.
10371    pub page_token: std::string::String,
10372
10373    /// Optional. Configures ordering of DataTables in the response.
10374    /// Note: Our implementation currently supports order by "create_time asc" only
10375    pub order_by: std::string::String,
10376
10377    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10378}
10379
10380impl ListDataTablesRequest {
10381    /// Creates a new default instance.
10382    pub fn new() -> Self {
10383        std::default::Default::default()
10384    }
10385
10386    /// Sets the value of [parent][crate::model::ListDataTablesRequest::parent].
10387    ///
10388    /// # Example
10389    /// ```ignore,no_run
10390    /// # use google_cloud_chronicle_v1::model::ListDataTablesRequest;
10391    /// # let project_id = "project_id";
10392    /// # let location_id = "location_id";
10393    /// # let instance_id = "instance_id";
10394    /// let x = ListDataTablesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
10395    /// ```
10396    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10397        self.parent = v.into();
10398        self
10399    }
10400
10401    /// Sets the value of [page_size][crate::model::ListDataTablesRequest::page_size].
10402    ///
10403    /// # Example
10404    /// ```ignore,no_run
10405    /// # use google_cloud_chronicle_v1::model::ListDataTablesRequest;
10406    /// let x = ListDataTablesRequest::new().set_page_size(42);
10407    /// ```
10408    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10409        self.page_size = v.into();
10410        self
10411    }
10412
10413    /// Sets the value of [page_token][crate::model::ListDataTablesRequest::page_token].
10414    ///
10415    /// # Example
10416    /// ```ignore,no_run
10417    /// # use google_cloud_chronicle_v1::model::ListDataTablesRequest;
10418    /// let x = ListDataTablesRequest::new().set_page_token("example");
10419    /// ```
10420    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10421        self.page_token = v.into();
10422        self
10423    }
10424
10425    /// Sets the value of [order_by][crate::model::ListDataTablesRequest::order_by].
10426    ///
10427    /// # Example
10428    /// ```ignore,no_run
10429    /// # use google_cloud_chronicle_v1::model::ListDataTablesRequest;
10430    /// let x = ListDataTablesRequest::new().set_order_by("example");
10431    /// ```
10432    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10433        self.order_by = v.into();
10434        self
10435    }
10436}
10437
10438impl wkt::message::Message for ListDataTablesRequest {
10439    fn typename() -> &'static str {
10440        "type.googleapis.com/google.cloud.chronicle.v1.ListDataTablesRequest"
10441    }
10442}
10443
10444/// Request message for deleting data tables.
10445#[derive(Clone, Default, PartialEq)]
10446#[non_exhaustive]
10447pub struct DeleteDataTableRequest {
10448    /// Required. The resource name of the data table to delete.
10449    /// Format
10450    /// projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table}
10451    pub name: std::string::String,
10452
10453    /// Optional. If set to true, any rows under this data table will also be
10454    /// deleted. (Otherwise, the request will only work if the data table has no
10455    /// rows.)
10456    pub force: bool,
10457
10458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10459}
10460
10461impl DeleteDataTableRequest {
10462    /// Creates a new default instance.
10463    pub fn new() -> Self {
10464        std::default::Default::default()
10465    }
10466
10467    /// Sets the value of [name][crate::model::DeleteDataTableRequest::name].
10468    ///
10469    /// # Example
10470    /// ```ignore,no_run
10471    /// # use google_cloud_chronicle_v1::model::DeleteDataTableRequest;
10472    /// # let project_id = "project_id";
10473    /// # let location_id = "location_id";
10474    /// # let instance_id = "instance_id";
10475    /// # let data_table_id = "data_table_id";
10476    /// let x = DeleteDataTableRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
10477    /// ```
10478    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10479        self.name = v.into();
10480        self
10481    }
10482
10483    /// Sets the value of [force][crate::model::DeleteDataTableRequest::force].
10484    ///
10485    /// # Example
10486    /// ```ignore,no_run
10487    /// # use google_cloud_chronicle_v1::model::DeleteDataTableRequest;
10488    /// let x = DeleteDataTableRequest::new().set_force(true);
10489    /// ```
10490    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10491        self.force = v.into();
10492        self
10493    }
10494}
10495
10496impl wkt::message::Message for DeleteDataTableRequest {
10497    fn typename() -> &'static str {
10498        "type.googleapis.com/google.cloud.chronicle.v1.DeleteDataTableRequest"
10499    }
10500}
10501
10502/// Response message for listing data tables.
10503#[derive(Clone, Default, PartialEq)]
10504#[non_exhaustive]
10505pub struct ListDataTablesResponse {
10506    /// The list of the data tables returned.
10507    pub data_tables: std::vec::Vec<crate::model::DataTable>,
10508
10509    /// A token, which can be sent as `page_token` to retrieve the next page.
10510    /// If this field is omitted, there are no subsequent pages.
10511    pub next_page_token: std::string::String,
10512
10513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10514}
10515
10516impl ListDataTablesResponse {
10517    /// Creates a new default instance.
10518    pub fn new() -> Self {
10519        std::default::Default::default()
10520    }
10521
10522    /// Sets the value of [data_tables][crate::model::ListDataTablesResponse::data_tables].
10523    ///
10524    /// # Example
10525    /// ```ignore,no_run
10526    /// # use google_cloud_chronicle_v1::model::ListDataTablesResponse;
10527    /// use google_cloud_chronicle_v1::model::DataTable;
10528    /// let x = ListDataTablesResponse::new()
10529    ///     .set_data_tables([
10530    ///         DataTable::default()/* use setters */,
10531    ///         DataTable::default()/* use (different) setters */,
10532    ///     ]);
10533    /// ```
10534    pub fn set_data_tables<T, V>(mut self, v: T) -> Self
10535    where
10536        T: std::iter::IntoIterator<Item = V>,
10537        V: std::convert::Into<crate::model::DataTable>,
10538    {
10539        use std::iter::Iterator;
10540        self.data_tables = v.into_iter().map(|i| i.into()).collect();
10541        self
10542    }
10543
10544    /// Sets the value of [next_page_token][crate::model::ListDataTablesResponse::next_page_token].
10545    ///
10546    /// # Example
10547    /// ```ignore,no_run
10548    /// # use google_cloud_chronicle_v1::model::ListDataTablesResponse;
10549    /// let x = ListDataTablesResponse::new().set_next_page_token("example");
10550    /// ```
10551    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10552        self.next_page_token = v.into();
10553        self
10554    }
10555}
10556
10557impl wkt::message::Message for ListDataTablesResponse {
10558    fn typename() -> &'static str {
10559        "type.googleapis.com/google.cloud.chronicle.v1.ListDataTablesResponse"
10560    }
10561}
10562
10563#[doc(hidden)]
10564impl google_cloud_gax::paginator::internal::PageableResponse for ListDataTablesResponse {
10565    type PageItem = crate::model::DataTable;
10566
10567    fn items(self) -> std::vec::Vec<Self::PageItem> {
10568        self.data_tables
10569    }
10570
10571    fn next_page_token(&self) -> std::string::String {
10572        use std::clone::Clone;
10573        self.next_page_token.clone()
10574    }
10575}
10576
10577/// Request to create data table row.
10578#[derive(Clone, Default, PartialEq)]
10579#[non_exhaustive]
10580pub struct CreateDataTableRowRequest {
10581    /// Required. The resource id of the data table.
10582    /// Format:
10583    /// /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}
10584    pub parent: std::string::String,
10585
10586    /// Required. The data table row to create.
10587    pub data_table_row: std::option::Option<crate::model::DataTableRow>,
10588
10589    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10590}
10591
10592impl CreateDataTableRowRequest {
10593    /// Creates a new default instance.
10594    pub fn new() -> Self {
10595        std::default::Default::default()
10596    }
10597
10598    /// Sets the value of [parent][crate::model::CreateDataTableRowRequest::parent].
10599    ///
10600    /// # Example
10601    /// ```ignore,no_run
10602    /// # use google_cloud_chronicle_v1::model::CreateDataTableRowRequest;
10603    /// # let project_id = "project_id";
10604    /// # let location_id = "location_id";
10605    /// # let instance_id = "instance_id";
10606    /// # let data_table_id = "data_table_id";
10607    /// let x = CreateDataTableRowRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
10608    /// ```
10609    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10610        self.parent = v.into();
10611        self
10612    }
10613
10614    /// Sets the value of [data_table_row][crate::model::CreateDataTableRowRequest::data_table_row].
10615    ///
10616    /// # Example
10617    /// ```ignore,no_run
10618    /// # use google_cloud_chronicle_v1::model::CreateDataTableRowRequest;
10619    /// use google_cloud_chronicle_v1::model::DataTableRow;
10620    /// let x = CreateDataTableRowRequest::new().set_data_table_row(DataTableRow::default()/* use setters */);
10621    /// ```
10622    pub fn set_data_table_row<T>(mut self, v: T) -> Self
10623    where
10624        T: std::convert::Into<crate::model::DataTableRow>,
10625    {
10626        self.data_table_row = std::option::Option::Some(v.into());
10627        self
10628    }
10629
10630    /// Sets or clears the value of [data_table_row][crate::model::CreateDataTableRowRequest::data_table_row].
10631    ///
10632    /// # Example
10633    /// ```ignore,no_run
10634    /// # use google_cloud_chronicle_v1::model::CreateDataTableRowRequest;
10635    /// use google_cloud_chronicle_v1::model::DataTableRow;
10636    /// let x = CreateDataTableRowRequest::new().set_or_clear_data_table_row(Some(DataTableRow::default()/* use setters */));
10637    /// let x = CreateDataTableRowRequest::new().set_or_clear_data_table_row(None::<DataTableRow>);
10638    /// ```
10639    pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
10640    where
10641        T: std::convert::Into<crate::model::DataTableRow>,
10642    {
10643        self.data_table_row = v.map(|x| x.into());
10644        self
10645    }
10646}
10647
10648impl wkt::message::Message for CreateDataTableRowRequest {
10649    fn typename() -> &'static str {
10650        "type.googleapis.com/google.cloud.chronicle.v1.CreateDataTableRowRequest"
10651    }
10652}
10653
10654/// Request to update data table row.
10655#[derive(Clone, Default, PartialEq)]
10656#[non_exhaustive]
10657pub struct UpdateDataTableRowRequest {
10658    /// Required. Format:
10659    /// projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}
10660    pub data_table_row: std::option::Option<crate::model::DataTableRow>,
10661
10662    /// Optional. The list of fields to update. Currently data table rows only
10663    /// support updating the `values` field. When no field mask is supplied, all
10664    /// non-empty fields will be updated. A field mask of "*" will update all
10665    /// fields, whether empty or not.
10666    pub update_mask: std::option::Option<wkt::FieldMask>,
10667
10668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10669}
10670
10671impl UpdateDataTableRowRequest {
10672    /// Creates a new default instance.
10673    pub fn new() -> Self {
10674        std::default::Default::default()
10675    }
10676
10677    /// Sets the value of [data_table_row][crate::model::UpdateDataTableRowRequest::data_table_row].
10678    ///
10679    /// # Example
10680    /// ```ignore,no_run
10681    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRowRequest;
10682    /// use google_cloud_chronicle_v1::model::DataTableRow;
10683    /// let x = UpdateDataTableRowRequest::new().set_data_table_row(DataTableRow::default()/* use setters */);
10684    /// ```
10685    pub fn set_data_table_row<T>(mut self, v: T) -> Self
10686    where
10687        T: std::convert::Into<crate::model::DataTableRow>,
10688    {
10689        self.data_table_row = std::option::Option::Some(v.into());
10690        self
10691    }
10692
10693    /// Sets or clears the value of [data_table_row][crate::model::UpdateDataTableRowRequest::data_table_row].
10694    ///
10695    /// # Example
10696    /// ```ignore,no_run
10697    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRowRequest;
10698    /// use google_cloud_chronicle_v1::model::DataTableRow;
10699    /// let x = UpdateDataTableRowRequest::new().set_or_clear_data_table_row(Some(DataTableRow::default()/* use setters */));
10700    /// let x = UpdateDataTableRowRequest::new().set_or_clear_data_table_row(None::<DataTableRow>);
10701    /// ```
10702    pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
10703    where
10704        T: std::convert::Into<crate::model::DataTableRow>,
10705    {
10706        self.data_table_row = v.map(|x| x.into());
10707        self
10708    }
10709
10710    /// Sets the value of [update_mask][crate::model::UpdateDataTableRowRequest::update_mask].
10711    ///
10712    /// # Example
10713    /// ```ignore,no_run
10714    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRowRequest;
10715    /// use wkt::FieldMask;
10716    /// let x = UpdateDataTableRowRequest::new().set_update_mask(FieldMask::default()/* use setters */);
10717    /// ```
10718    pub fn set_update_mask<T>(mut self, v: T) -> Self
10719    where
10720        T: std::convert::Into<wkt::FieldMask>,
10721    {
10722        self.update_mask = std::option::Option::Some(v.into());
10723        self
10724    }
10725
10726    /// Sets or clears the value of [update_mask][crate::model::UpdateDataTableRowRequest::update_mask].
10727    ///
10728    /// # Example
10729    /// ```ignore,no_run
10730    /// # use google_cloud_chronicle_v1::model::UpdateDataTableRowRequest;
10731    /// use wkt::FieldMask;
10732    /// let x = UpdateDataTableRowRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
10733    /// let x = UpdateDataTableRowRequest::new().set_or_clear_update_mask(None::<FieldMask>);
10734    /// ```
10735    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10736    where
10737        T: std::convert::Into<wkt::FieldMask>,
10738    {
10739        self.update_mask = v.map(|x| x.into());
10740        self
10741    }
10742}
10743
10744impl wkt::message::Message for UpdateDataTableRowRequest {
10745    fn typename() -> &'static str {
10746        "type.googleapis.com/google.cloud.chronicle.v1.UpdateDataTableRowRequest"
10747    }
10748}
10749
10750/// Request to list data table rows.
10751#[derive(Clone, Default, PartialEq)]
10752#[non_exhaustive]
10753pub struct ListDataTableRowsRequest {
10754    /// Required. The resource id of the data table.
10755    /// Format:
10756    /// projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table}
10757    pub parent: std::string::String,
10758
10759    /// Optional. The maximum number of data table rows to return. The service may
10760    /// return fewer than this value. If unspecified, at most 100 data table rows
10761    /// will be returned. The maximum value is 1000; values above 1000 will be
10762    /// coerced to 1000.
10763    pub page_size: i32,
10764
10765    /// Optional. A page token, received from a previous `ListDataTableRows` call.
10766    pub page_token: std::string::String,
10767
10768    /// Optional. Configures ordering of DataTables in the response.
10769    /// Note: Our implementation currently supports order by "create_time asc" only
10770    pub order_by: std::string::String,
10771
10772    /// Optional. Filter facilitating search over data table rows. This filter
10773    /// performs a case-insensitive substring match on the row values.
10774    pub filter: std::string::String,
10775
10776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10777}
10778
10779impl ListDataTableRowsRequest {
10780    /// Creates a new default instance.
10781    pub fn new() -> Self {
10782        std::default::Default::default()
10783    }
10784
10785    /// Sets the value of [parent][crate::model::ListDataTableRowsRequest::parent].
10786    ///
10787    /// # Example
10788    /// ```ignore,no_run
10789    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsRequest;
10790    /// # let project_id = "project_id";
10791    /// # let location_id = "location_id";
10792    /// # let instance_id = "instance_id";
10793    /// # let data_table_id = "data_table_id";
10794    /// let x = ListDataTableRowsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
10795    /// ```
10796    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10797        self.parent = v.into();
10798        self
10799    }
10800
10801    /// Sets the value of [page_size][crate::model::ListDataTableRowsRequest::page_size].
10802    ///
10803    /// # Example
10804    /// ```ignore,no_run
10805    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsRequest;
10806    /// let x = ListDataTableRowsRequest::new().set_page_size(42);
10807    /// ```
10808    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10809        self.page_size = v.into();
10810        self
10811    }
10812
10813    /// Sets the value of [page_token][crate::model::ListDataTableRowsRequest::page_token].
10814    ///
10815    /// # Example
10816    /// ```ignore,no_run
10817    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsRequest;
10818    /// let x = ListDataTableRowsRequest::new().set_page_token("example");
10819    /// ```
10820    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10821        self.page_token = v.into();
10822        self
10823    }
10824
10825    /// Sets the value of [order_by][crate::model::ListDataTableRowsRequest::order_by].
10826    ///
10827    /// # Example
10828    /// ```ignore,no_run
10829    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsRequest;
10830    /// let x = ListDataTableRowsRequest::new().set_order_by("example");
10831    /// ```
10832    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10833        self.order_by = v.into();
10834        self
10835    }
10836
10837    /// Sets the value of [filter][crate::model::ListDataTableRowsRequest::filter].
10838    ///
10839    /// # Example
10840    /// ```ignore,no_run
10841    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsRequest;
10842    /// let x = ListDataTableRowsRequest::new().set_filter("example");
10843    /// ```
10844    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10845        self.filter = v.into();
10846        self
10847    }
10848}
10849
10850impl wkt::message::Message for ListDataTableRowsRequest {
10851    fn typename() -> &'static str {
10852        "type.googleapis.com/google.cloud.chronicle.v1.ListDataTableRowsRequest"
10853    }
10854}
10855
10856/// Response message for listing data table rows.
10857#[derive(Clone, Default, PartialEq)]
10858#[non_exhaustive]
10859pub struct ListDataTableRowsResponse {
10860    /// The list of the data table rows returned.
10861    pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
10862
10863    /// Optional. A token, which can be sent as `page_token` to retrieve the next
10864    /// page. If this field is omitted, there are no subsequent pages.
10865    pub next_page_token: std::string::String,
10866
10867    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10868}
10869
10870impl ListDataTableRowsResponse {
10871    /// Creates a new default instance.
10872    pub fn new() -> Self {
10873        std::default::Default::default()
10874    }
10875
10876    /// Sets the value of [data_table_rows][crate::model::ListDataTableRowsResponse::data_table_rows].
10877    ///
10878    /// # Example
10879    /// ```ignore,no_run
10880    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsResponse;
10881    /// use google_cloud_chronicle_v1::model::DataTableRow;
10882    /// let x = ListDataTableRowsResponse::new()
10883    ///     .set_data_table_rows([
10884    ///         DataTableRow::default()/* use setters */,
10885    ///         DataTableRow::default()/* use (different) setters */,
10886    ///     ]);
10887    /// ```
10888    pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
10889    where
10890        T: std::iter::IntoIterator<Item = V>,
10891        V: std::convert::Into<crate::model::DataTableRow>,
10892    {
10893        use std::iter::Iterator;
10894        self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
10895        self
10896    }
10897
10898    /// Sets the value of [next_page_token][crate::model::ListDataTableRowsResponse::next_page_token].
10899    ///
10900    /// # Example
10901    /// ```ignore,no_run
10902    /// # use google_cloud_chronicle_v1::model::ListDataTableRowsResponse;
10903    /// let x = ListDataTableRowsResponse::new().set_next_page_token("example");
10904    /// ```
10905    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10906        self.next_page_token = v.into();
10907        self
10908    }
10909}
10910
10911impl wkt::message::Message for ListDataTableRowsResponse {
10912    fn typename() -> &'static str {
10913        "type.googleapis.com/google.cloud.chronicle.v1.ListDataTableRowsResponse"
10914    }
10915}
10916
10917#[doc(hidden)]
10918impl google_cloud_gax::paginator::internal::PageableResponse for ListDataTableRowsResponse {
10919    type PageItem = crate::model::DataTableRow;
10920
10921    fn items(self) -> std::vec::Vec<Self::PageItem> {
10922        self.data_table_rows
10923    }
10924
10925    fn next_page_token(&self) -> std::string::String {
10926        use std::clone::Clone;
10927        self.next_page_token.clone()
10928    }
10929}
10930
10931/// Request to get data table row.
10932#[derive(Clone, Default, PartialEq)]
10933#[non_exhaustive]
10934pub struct GetDataTableRowRequest {
10935    /// Required. The resource name of the data table row i,e row_id.
10936    /// Format:
10937    /// projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}
10938    pub name: std::string::String,
10939
10940    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10941}
10942
10943impl GetDataTableRowRequest {
10944    /// Creates a new default instance.
10945    pub fn new() -> Self {
10946        std::default::Default::default()
10947    }
10948
10949    /// Sets the value of [name][crate::model::GetDataTableRowRequest::name].
10950    ///
10951    /// # Example
10952    /// ```ignore,no_run
10953    /// # use google_cloud_chronicle_v1::model::GetDataTableRowRequest;
10954    /// # let project_id = "project_id";
10955    /// # let location_id = "location_id";
10956    /// # let instance_id = "instance_id";
10957    /// # let data_table_id = "data_table_id";
10958    /// # let data_table_row_id = "data_table_row_id";
10959    /// let x = GetDataTableRowRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}/dataTableRows/{data_table_row_id}"));
10960    /// ```
10961    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10962        self.name = v.into();
10963        self
10964    }
10965}
10966
10967impl wkt::message::Message for GetDataTableRowRequest {
10968    fn typename() -> &'static str {
10969        "type.googleapis.com/google.cloud.chronicle.v1.GetDataTableRowRequest"
10970    }
10971}
10972
10973/// Request to delete data table row.
10974#[derive(Clone, Default, PartialEq)]
10975#[non_exhaustive]
10976pub struct DeleteDataTableRowRequest {
10977    /// Required. The resource name of the data table row i,e row_id.
10978    /// Format:
10979    /// projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}
10980    pub name: std::string::String,
10981
10982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10983}
10984
10985impl DeleteDataTableRowRequest {
10986    /// Creates a new default instance.
10987    pub fn new() -> Self {
10988        std::default::Default::default()
10989    }
10990
10991    /// Sets the value of [name][crate::model::DeleteDataTableRowRequest::name].
10992    ///
10993    /// # Example
10994    /// ```ignore,no_run
10995    /// # use google_cloud_chronicle_v1::model::DeleteDataTableRowRequest;
10996    /// # let project_id = "project_id";
10997    /// # let location_id = "location_id";
10998    /// # let instance_id = "instance_id";
10999    /// # let data_table_id = "data_table_id";
11000    /// # let data_table_row_id = "data_table_row_id";
11001    /// let x = DeleteDataTableRowRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}/dataTableRows/{data_table_row_id}"));
11002    /// ```
11003    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11004        self.name = v.into();
11005        self
11006    }
11007}
11008
11009impl wkt::message::Message for DeleteDataTableRowRequest {
11010    fn typename() -> &'static str {
11011        "type.googleapis.com/google.cloud.chronicle.v1.DeleteDataTableRowRequest"
11012    }
11013}
11014
11015/// Request to create data table rows in bulk.
11016#[derive(Clone, Default, PartialEq)]
11017#[non_exhaustive]
11018pub struct BulkCreateDataTableRowsRequest {
11019    /// Required. The resource id of the data table.
11020    /// Format:
11021    /// /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}
11022    pub parent: std::string::String,
11023
11024    /// Required. Data table rows to create. A maximum of 1000 rows (for sync
11025    /// requests) or 2000 rows (for async requests) can be created in a single
11026    /// request. Total size of the rows should be less than 4MB.
11027    pub requests: std::vec::Vec<crate::model::CreateDataTableRowRequest>,
11028
11029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11030}
11031
11032impl BulkCreateDataTableRowsRequest {
11033    /// Creates a new default instance.
11034    pub fn new() -> Self {
11035        std::default::Default::default()
11036    }
11037
11038    /// Sets the value of [parent][crate::model::BulkCreateDataTableRowsRequest::parent].
11039    ///
11040    /// # Example
11041    /// ```ignore,no_run
11042    /// # use google_cloud_chronicle_v1::model::BulkCreateDataTableRowsRequest;
11043    /// # let project_id = "project_id";
11044    /// # let location_id = "location_id";
11045    /// # let instance_id = "instance_id";
11046    /// # let data_table_id = "data_table_id";
11047    /// let x = BulkCreateDataTableRowsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
11048    /// ```
11049    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11050        self.parent = v.into();
11051        self
11052    }
11053
11054    /// Sets the value of [requests][crate::model::BulkCreateDataTableRowsRequest::requests].
11055    ///
11056    /// # Example
11057    /// ```ignore,no_run
11058    /// # use google_cloud_chronicle_v1::model::BulkCreateDataTableRowsRequest;
11059    /// use google_cloud_chronicle_v1::model::CreateDataTableRowRequest;
11060    /// let x = BulkCreateDataTableRowsRequest::new()
11061    ///     .set_requests([
11062    ///         CreateDataTableRowRequest::default()/* use setters */,
11063    ///         CreateDataTableRowRequest::default()/* use (different) setters */,
11064    ///     ]);
11065    /// ```
11066    pub fn set_requests<T, V>(mut self, v: T) -> Self
11067    where
11068        T: std::iter::IntoIterator<Item = V>,
11069        V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
11070    {
11071        use std::iter::Iterator;
11072        self.requests = v.into_iter().map(|i| i.into()).collect();
11073        self
11074    }
11075}
11076
11077impl wkt::message::Message for BulkCreateDataTableRowsRequest {
11078    fn typename() -> &'static str {
11079        "type.googleapis.com/google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest"
11080    }
11081}
11082
11083/// Response message with created data table rows.
11084#[derive(Clone, Default, PartialEq)]
11085#[non_exhaustive]
11086pub struct BulkCreateDataTableRowsResponse {
11087    /// DataTableRows created
11088    pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
11089
11090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11091}
11092
11093impl BulkCreateDataTableRowsResponse {
11094    /// Creates a new default instance.
11095    pub fn new() -> Self {
11096        std::default::Default::default()
11097    }
11098
11099    /// Sets the value of [data_table_rows][crate::model::BulkCreateDataTableRowsResponse::data_table_rows].
11100    ///
11101    /// # Example
11102    /// ```ignore,no_run
11103    /// # use google_cloud_chronicle_v1::model::BulkCreateDataTableRowsResponse;
11104    /// use google_cloud_chronicle_v1::model::DataTableRow;
11105    /// let x = BulkCreateDataTableRowsResponse::new()
11106    ///     .set_data_table_rows([
11107    ///         DataTableRow::default()/* use setters */,
11108    ///         DataTableRow::default()/* use (different) setters */,
11109    ///     ]);
11110    /// ```
11111    pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
11112    where
11113        T: std::iter::IntoIterator<Item = V>,
11114        V: std::convert::Into<crate::model::DataTableRow>,
11115    {
11116        use std::iter::Iterator;
11117        self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
11118        self
11119    }
11120}
11121
11122impl wkt::message::Message for BulkCreateDataTableRowsResponse {
11123    fn typename() -> &'static str {
11124        "type.googleapis.com/google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse"
11125    }
11126}
11127
11128/// Request to get data table rows in bulk.
11129#[derive(Clone, Default, PartialEq)]
11130#[non_exhaustive]
11131pub struct BulkGetDataTableRowsRequest {
11132    /// Required. The resource id of the data table.
11133    /// Format:
11134    /// /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}
11135    pub parent: std::string::String,
11136
11137    /// Required. Data table rows to get. At max 1,000 rows can be there in a
11138    /// request.
11139    pub requests: std::vec::Vec<crate::model::GetDataTableRowRequest>,
11140
11141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11142}
11143
11144impl BulkGetDataTableRowsRequest {
11145    /// Creates a new default instance.
11146    pub fn new() -> Self {
11147        std::default::Default::default()
11148    }
11149
11150    /// Sets the value of [parent][crate::model::BulkGetDataTableRowsRequest::parent].
11151    ///
11152    /// # Example
11153    /// ```ignore,no_run
11154    /// # use google_cloud_chronicle_v1::model::BulkGetDataTableRowsRequest;
11155    /// # let project_id = "project_id";
11156    /// # let location_id = "location_id";
11157    /// # let instance_id = "instance_id";
11158    /// # let data_table_id = "data_table_id";
11159    /// let x = BulkGetDataTableRowsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
11160    /// ```
11161    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11162        self.parent = v.into();
11163        self
11164    }
11165
11166    /// Sets the value of [requests][crate::model::BulkGetDataTableRowsRequest::requests].
11167    ///
11168    /// # Example
11169    /// ```ignore,no_run
11170    /// # use google_cloud_chronicle_v1::model::BulkGetDataTableRowsRequest;
11171    /// use google_cloud_chronicle_v1::model::GetDataTableRowRequest;
11172    /// let x = BulkGetDataTableRowsRequest::new()
11173    ///     .set_requests([
11174    ///         GetDataTableRowRequest::default()/* use setters */,
11175    ///         GetDataTableRowRequest::default()/* use (different) setters */,
11176    ///     ]);
11177    /// ```
11178    pub fn set_requests<T, V>(mut self, v: T) -> Self
11179    where
11180        T: std::iter::IntoIterator<Item = V>,
11181        V: std::convert::Into<crate::model::GetDataTableRowRequest>,
11182    {
11183        use std::iter::Iterator;
11184        self.requests = v.into_iter().map(|i| i.into()).collect();
11185        self
11186    }
11187}
11188
11189impl wkt::message::Message for BulkGetDataTableRowsRequest {
11190    fn typename() -> &'static str {
11191        "type.googleapis.com/google.cloud.chronicle.v1.BulkGetDataTableRowsRequest"
11192    }
11193}
11194
11195/// Response message with data table rows.
11196#[derive(Clone, Default, PartialEq)]
11197#[non_exhaustive]
11198pub struct BulkGetDataTableRowsResponse {
11199    /// The requested data table rows.
11200    pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
11201
11202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11203}
11204
11205impl BulkGetDataTableRowsResponse {
11206    /// Creates a new default instance.
11207    pub fn new() -> Self {
11208        std::default::Default::default()
11209    }
11210
11211    /// Sets the value of [data_table_rows][crate::model::BulkGetDataTableRowsResponse::data_table_rows].
11212    ///
11213    /// # Example
11214    /// ```ignore,no_run
11215    /// # use google_cloud_chronicle_v1::model::BulkGetDataTableRowsResponse;
11216    /// use google_cloud_chronicle_v1::model::DataTableRow;
11217    /// let x = BulkGetDataTableRowsResponse::new()
11218    ///     .set_data_table_rows([
11219    ///         DataTableRow::default()/* use setters */,
11220    ///         DataTableRow::default()/* use (different) setters */,
11221    ///     ]);
11222    /// ```
11223    pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
11224    where
11225        T: std::iter::IntoIterator<Item = V>,
11226        V: std::convert::Into<crate::model::DataTableRow>,
11227    {
11228        use std::iter::Iterator;
11229        self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
11230        self
11231    }
11232}
11233
11234impl wkt::message::Message for BulkGetDataTableRowsResponse {
11235    fn typename() -> &'static str {
11236        "type.googleapis.com/google.cloud.chronicle.v1.BulkGetDataTableRowsResponse"
11237    }
11238}
11239
11240/// Request to replace data table rows in bulk.
11241#[derive(Clone, Default, PartialEq)]
11242#[non_exhaustive]
11243pub struct BulkReplaceDataTableRowsRequest {
11244    /// Required. The resource id of the data table.
11245    /// Format:
11246    /// /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}
11247    pub parent: std::string::String,
11248
11249    /// Required. Data table rows to replace the existing data table rows. A
11250    /// maximum of 1000 rows (for sync requests) or 2000 rows (for async requests)
11251    /// can be replaced in a single request. Total size of the rows should be less
11252    /// than 4MB.
11253    pub requests: std::vec::Vec<crate::model::CreateDataTableRowRequest>,
11254
11255    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11256}
11257
11258impl BulkReplaceDataTableRowsRequest {
11259    /// Creates a new default instance.
11260    pub fn new() -> Self {
11261        std::default::Default::default()
11262    }
11263
11264    /// Sets the value of [parent][crate::model::BulkReplaceDataTableRowsRequest::parent].
11265    ///
11266    /// # Example
11267    /// ```ignore,no_run
11268    /// # use google_cloud_chronicle_v1::model::BulkReplaceDataTableRowsRequest;
11269    /// # let project_id = "project_id";
11270    /// # let location_id = "location_id";
11271    /// # let instance_id = "instance_id";
11272    /// # let data_table_id = "data_table_id";
11273    /// let x = BulkReplaceDataTableRowsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
11274    /// ```
11275    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11276        self.parent = v.into();
11277        self
11278    }
11279
11280    /// Sets the value of [requests][crate::model::BulkReplaceDataTableRowsRequest::requests].
11281    ///
11282    /// # Example
11283    /// ```ignore,no_run
11284    /// # use google_cloud_chronicle_v1::model::BulkReplaceDataTableRowsRequest;
11285    /// use google_cloud_chronicle_v1::model::CreateDataTableRowRequest;
11286    /// let x = BulkReplaceDataTableRowsRequest::new()
11287    ///     .set_requests([
11288    ///         CreateDataTableRowRequest::default()/* use setters */,
11289    ///         CreateDataTableRowRequest::default()/* use (different) setters */,
11290    ///     ]);
11291    /// ```
11292    pub fn set_requests<T, V>(mut self, v: T) -> Self
11293    where
11294        T: std::iter::IntoIterator<Item = V>,
11295        V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
11296    {
11297        use std::iter::Iterator;
11298        self.requests = v.into_iter().map(|i| i.into()).collect();
11299        self
11300    }
11301}
11302
11303impl wkt::message::Message for BulkReplaceDataTableRowsRequest {
11304    fn typename() -> &'static str {
11305        "type.googleapis.com/google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest"
11306    }
11307}
11308
11309/// Response message with data table rows that replaced existing data table rows.
11310#[derive(Clone, Default, PartialEq)]
11311#[non_exhaustive]
11312pub struct BulkReplaceDataTableRowsResponse {
11313    /// DataTableRows that replaced existing data table rows
11314    pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
11315
11316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11317}
11318
11319impl BulkReplaceDataTableRowsResponse {
11320    /// Creates a new default instance.
11321    pub fn new() -> Self {
11322        std::default::Default::default()
11323    }
11324
11325    /// Sets the value of [data_table_rows][crate::model::BulkReplaceDataTableRowsResponse::data_table_rows].
11326    ///
11327    /// # Example
11328    /// ```ignore,no_run
11329    /// # use google_cloud_chronicle_v1::model::BulkReplaceDataTableRowsResponse;
11330    /// use google_cloud_chronicle_v1::model::DataTableRow;
11331    /// let x = BulkReplaceDataTableRowsResponse::new()
11332    ///     .set_data_table_rows([
11333    ///         DataTableRow::default()/* use setters */,
11334    ///         DataTableRow::default()/* use (different) setters */,
11335    ///     ]);
11336    /// ```
11337    pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
11338    where
11339        T: std::iter::IntoIterator<Item = V>,
11340        V: std::convert::Into<crate::model::DataTableRow>,
11341    {
11342        use std::iter::Iterator;
11343        self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
11344        self
11345    }
11346}
11347
11348impl wkt::message::Message for BulkReplaceDataTableRowsResponse {
11349    fn typename() -> &'static str {
11350        "type.googleapis.com/google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse"
11351    }
11352}
11353
11354/// Request to update data table rows in bulk.
11355#[derive(Clone, Default, PartialEq)]
11356#[non_exhaustive]
11357pub struct BulkUpdateDataTableRowsRequest {
11358    /// Required. The resource id of the data table.
11359    /// Format:
11360    /// /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}
11361    pub parent: std::string::String,
11362
11363    /// Required. Data table rows to update. At max 1,000 rows (or rows with size
11364    /// less than 2MB) can be there in a request.
11365    pub requests: std::vec::Vec<crate::model::UpdateDataTableRowRequest>,
11366
11367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11368}
11369
11370impl BulkUpdateDataTableRowsRequest {
11371    /// Creates a new default instance.
11372    pub fn new() -> Self {
11373        std::default::Default::default()
11374    }
11375
11376    /// Sets the value of [parent][crate::model::BulkUpdateDataTableRowsRequest::parent].
11377    ///
11378    /// # Example
11379    /// ```ignore,no_run
11380    /// # use google_cloud_chronicle_v1::model::BulkUpdateDataTableRowsRequest;
11381    /// # let project_id = "project_id";
11382    /// # let location_id = "location_id";
11383    /// # let instance_id = "instance_id";
11384    /// # let data_table_id = "data_table_id";
11385    /// let x = BulkUpdateDataTableRowsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
11386    /// ```
11387    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11388        self.parent = v.into();
11389        self
11390    }
11391
11392    /// Sets the value of [requests][crate::model::BulkUpdateDataTableRowsRequest::requests].
11393    ///
11394    /// # Example
11395    /// ```ignore,no_run
11396    /// # use google_cloud_chronicle_v1::model::BulkUpdateDataTableRowsRequest;
11397    /// use google_cloud_chronicle_v1::model::UpdateDataTableRowRequest;
11398    /// let x = BulkUpdateDataTableRowsRequest::new()
11399    ///     .set_requests([
11400    ///         UpdateDataTableRowRequest::default()/* use setters */,
11401    ///         UpdateDataTableRowRequest::default()/* use (different) setters */,
11402    ///     ]);
11403    /// ```
11404    pub fn set_requests<T, V>(mut self, v: T) -> Self
11405    where
11406        T: std::iter::IntoIterator<Item = V>,
11407        V: std::convert::Into<crate::model::UpdateDataTableRowRequest>,
11408    {
11409        use std::iter::Iterator;
11410        self.requests = v.into_iter().map(|i| i.into()).collect();
11411        self
11412    }
11413}
11414
11415impl wkt::message::Message for BulkUpdateDataTableRowsRequest {
11416    fn typename() -> &'static str {
11417        "type.googleapis.com/google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest"
11418    }
11419}
11420
11421/// Response message with updated data table rows.
11422#[derive(Clone, Default, PartialEq)]
11423#[non_exhaustive]
11424pub struct BulkUpdateDataTableRowsResponse {
11425    /// DataTableRows updated
11426    pub data_table_rows: std::vec::Vec<crate::model::DataTableRow>,
11427
11428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11429}
11430
11431impl BulkUpdateDataTableRowsResponse {
11432    /// Creates a new default instance.
11433    pub fn new() -> Self {
11434        std::default::Default::default()
11435    }
11436
11437    /// Sets the value of [data_table_rows][crate::model::BulkUpdateDataTableRowsResponse::data_table_rows].
11438    ///
11439    /// # Example
11440    /// ```ignore,no_run
11441    /// # use google_cloud_chronicle_v1::model::BulkUpdateDataTableRowsResponse;
11442    /// use google_cloud_chronicle_v1::model::DataTableRow;
11443    /// let x = BulkUpdateDataTableRowsResponse::new()
11444    ///     .set_data_table_rows([
11445    ///         DataTableRow::default()/* use setters */,
11446    ///         DataTableRow::default()/* use (different) setters */,
11447    ///     ]);
11448    /// ```
11449    pub fn set_data_table_rows<T, V>(mut self, v: T) -> Self
11450    where
11451        T: std::iter::IntoIterator<Item = V>,
11452        V: std::convert::Into<crate::model::DataTableRow>,
11453    {
11454        use std::iter::Iterator;
11455        self.data_table_rows = v.into_iter().map(|i| i.into()).collect();
11456        self
11457    }
11458}
11459
11460impl wkt::message::Message for BulkUpdateDataTableRowsResponse {
11461    fn typename() -> &'static str {
11462        "type.googleapis.com/google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse"
11463    }
11464}
11465
11466/// DataTableScopeInfo specifies the scope info of the data table.
11467#[derive(Clone, Default, PartialEq)]
11468#[non_exhaustive]
11469pub struct DataTableScopeInfo {
11470    /// Required. Contains the list of scope names of the data table. If the list
11471    /// is empty, the data table is treated as unscoped. The scope names should be
11472    /// full resource names and should be of the format:
11473    /// "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}"
11474    pub data_access_scopes: std::vec::Vec<std::string::String>,
11475
11476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11477}
11478
11479impl DataTableScopeInfo {
11480    /// Creates a new default instance.
11481    pub fn new() -> Self {
11482        std::default::Default::default()
11483    }
11484
11485    /// Sets the value of [data_access_scopes][crate::model::DataTableScopeInfo::data_access_scopes].
11486    ///
11487    /// # Example
11488    /// ```ignore,no_run
11489    /// # use google_cloud_chronicle_v1::model::DataTableScopeInfo;
11490    /// let x = DataTableScopeInfo::new().set_data_access_scopes(["a", "b", "c"]);
11491    /// ```
11492    pub fn set_data_access_scopes<T, V>(mut self, v: T) -> Self
11493    where
11494        T: std::iter::IntoIterator<Item = V>,
11495        V: std::convert::Into<std::string::String>,
11496    {
11497        use std::iter::Iterator;
11498        self.data_access_scopes = v.into_iter().map(|i| i.into()).collect();
11499        self
11500    }
11501}
11502
11503impl wkt::message::Message for DataTableScopeInfo {
11504    fn typename() -> &'static str {
11505        "type.googleapis.com/google.cloud.chronicle.v1.DataTableScopeInfo"
11506    }
11507}
11508
11509/// DataTable represents the data table resource.
11510#[derive(Clone, Default, PartialEq)]
11511#[non_exhaustive]
11512pub struct DataTable {
11513    /// Identifier. The resource name of the data table
11514    /// Format:
11515    /// "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}"
11516    pub name: std::string::String,
11517
11518    /// Output only. The unique display name of the data table.
11519    pub display_name: std::string::String,
11520
11521    /// Required. A user-provided description of the data table.
11522    pub description: std::string::String,
11523
11524    /// Output only. Table create time
11525    pub create_time: std::option::Option<wkt::Timestamp>,
11526
11527    /// Output only. Table update time
11528    pub update_time: std::option::Option<wkt::Timestamp>,
11529
11530    /// Immutable. Details of all the columns in the table
11531    pub column_info: std::vec::Vec<crate::model::DataTableColumnInfo>,
11532
11533    /// Output only. Data table unique id
11534    pub data_table_uuid: std::string::String,
11535
11536    /// Output only. The resource names for the associated Rules that use this
11537    /// data table. Format:
11538    /// projects/{project}/locations/{location}/instances/{instance}/rules/{rule}.
11539    /// {rule} here refers to the rule id.
11540    pub rules: std::vec::Vec<std::string::String>,
11541
11542    /// Output only. The count of rules using the data table.
11543    pub rule_associations_count: i32,
11544
11545    /// Optional. User-provided TTL of the data table.
11546    pub row_time_to_live: std::string::String,
11547
11548    /// Output only. The count of rows in the data table.
11549    pub approximate_row_count: i64,
11550
11551    /// Optional. The scope info of the data table.
11552    /// During data table creation, if this field is not set, the data
11553    /// table without scopes (an unscoped table) will be created for a global
11554    /// user. For a scoped user, this field must be set. During data table
11555    /// update, if scope_info is requested to be updated, this field must be set.
11556    pub scope_info: std::option::Option<crate::model::DataTableScopeInfo>,
11557
11558    /// Output only. Source of the data table update.
11559    pub update_source: crate::model::DataTableUpdateSource,
11560
11561    /// Output only. Last update time of the TTL of the data table.
11562    pub row_time_to_live_update_time: std::option::Option<wkt::Timestamp>,
11563
11564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11565}
11566
11567impl DataTable {
11568    /// Creates a new default instance.
11569    pub fn new() -> Self {
11570        std::default::Default::default()
11571    }
11572
11573    /// Sets the value of [name][crate::model::DataTable::name].
11574    ///
11575    /// # Example
11576    /// ```ignore,no_run
11577    /// # use google_cloud_chronicle_v1::model::DataTable;
11578    /// # let project_id = "project_id";
11579    /// # let location_id = "location_id";
11580    /// # let instance_id = "instance_id";
11581    /// # let data_table_id = "data_table_id";
11582    /// let x = DataTable::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}"));
11583    /// ```
11584    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11585        self.name = v.into();
11586        self
11587    }
11588
11589    /// Sets the value of [display_name][crate::model::DataTable::display_name].
11590    ///
11591    /// # Example
11592    /// ```ignore,no_run
11593    /// # use google_cloud_chronicle_v1::model::DataTable;
11594    /// let x = DataTable::new().set_display_name("example");
11595    /// ```
11596    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11597        self.display_name = v.into();
11598        self
11599    }
11600
11601    /// Sets the value of [description][crate::model::DataTable::description].
11602    ///
11603    /// # Example
11604    /// ```ignore,no_run
11605    /// # use google_cloud_chronicle_v1::model::DataTable;
11606    /// let x = DataTable::new().set_description("example");
11607    /// ```
11608    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11609        self.description = v.into();
11610        self
11611    }
11612
11613    /// Sets the value of [create_time][crate::model::DataTable::create_time].
11614    ///
11615    /// # Example
11616    /// ```ignore,no_run
11617    /// # use google_cloud_chronicle_v1::model::DataTable;
11618    /// use wkt::Timestamp;
11619    /// let x = DataTable::new().set_create_time(Timestamp::default()/* use setters */);
11620    /// ```
11621    pub fn set_create_time<T>(mut self, v: T) -> Self
11622    where
11623        T: std::convert::Into<wkt::Timestamp>,
11624    {
11625        self.create_time = std::option::Option::Some(v.into());
11626        self
11627    }
11628
11629    /// Sets or clears the value of [create_time][crate::model::DataTable::create_time].
11630    ///
11631    /// # Example
11632    /// ```ignore,no_run
11633    /// # use google_cloud_chronicle_v1::model::DataTable;
11634    /// use wkt::Timestamp;
11635    /// let x = DataTable::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11636    /// let x = DataTable::new().set_or_clear_create_time(None::<Timestamp>);
11637    /// ```
11638    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11639    where
11640        T: std::convert::Into<wkt::Timestamp>,
11641    {
11642        self.create_time = v.map(|x| x.into());
11643        self
11644    }
11645
11646    /// Sets the value of [update_time][crate::model::DataTable::update_time].
11647    ///
11648    /// # Example
11649    /// ```ignore,no_run
11650    /// # use google_cloud_chronicle_v1::model::DataTable;
11651    /// use wkt::Timestamp;
11652    /// let x = DataTable::new().set_update_time(Timestamp::default()/* use setters */);
11653    /// ```
11654    pub fn set_update_time<T>(mut self, v: T) -> Self
11655    where
11656        T: std::convert::Into<wkt::Timestamp>,
11657    {
11658        self.update_time = std::option::Option::Some(v.into());
11659        self
11660    }
11661
11662    /// Sets or clears the value of [update_time][crate::model::DataTable::update_time].
11663    ///
11664    /// # Example
11665    /// ```ignore,no_run
11666    /// # use google_cloud_chronicle_v1::model::DataTable;
11667    /// use wkt::Timestamp;
11668    /// let x = DataTable::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11669    /// let x = DataTable::new().set_or_clear_update_time(None::<Timestamp>);
11670    /// ```
11671    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11672    where
11673        T: std::convert::Into<wkt::Timestamp>,
11674    {
11675        self.update_time = v.map(|x| x.into());
11676        self
11677    }
11678
11679    /// Sets the value of [column_info][crate::model::DataTable::column_info].
11680    ///
11681    /// # Example
11682    /// ```ignore,no_run
11683    /// # use google_cloud_chronicle_v1::model::DataTable;
11684    /// use google_cloud_chronicle_v1::model::DataTableColumnInfo;
11685    /// let x = DataTable::new()
11686    ///     .set_column_info([
11687    ///         DataTableColumnInfo::default()/* use setters */,
11688    ///         DataTableColumnInfo::default()/* use (different) setters */,
11689    ///     ]);
11690    /// ```
11691    pub fn set_column_info<T, V>(mut self, v: T) -> Self
11692    where
11693        T: std::iter::IntoIterator<Item = V>,
11694        V: std::convert::Into<crate::model::DataTableColumnInfo>,
11695    {
11696        use std::iter::Iterator;
11697        self.column_info = v.into_iter().map(|i| i.into()).collect();
11698        self
11699    }
11700
11701    /// Sets the value of [data_table_uuid][crate::model::DataTable::data_table_uuid].
11702    ///
11703    /// # Example
11704    /// ```ignore,no_run
11705    /// # use google_cloud_chronicle_v1::model::DataTable;
11706    /// let x = DataTable::new().set_data_table_uuid("example");
11707    /// ```
11708    pub fn set_data_table_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11709        self.data_table_uuid = v.into();
11710        self
11711    }
11712
11713    /// Sets the value of [rules][crate::model::DataTable::rules].
11714    ///
11715    /// # Example
11716    /// ```ignore,no_run
11717    /// # use google_cloud_chronicle_v1::model::DataTable;
11718    /// let x = DataTable::new().set_rules(["a", "b", "c"]);
11719    /// ```
11720    pub fn set_rules<T, V>(mut self, v: T) -> Self
11721    where
11722        T: std::iter::IntoIterator<Item = V>,
11723        V: std::convert::Into<std::string::String>,
11724    {
11725        use std::iter::Iterator;
11726        self.rules = v.into_iter().map(|i| i.into()).collect();
11727        self
11728    }
11729
11730    /// Sets the value of [rule_associations_count][crate::model::DataTable::rule_associations_count].
11731    ///
11732    /// # Example
11733    /// ```ignore,no_run
11734    /// # use google_cloud_chronicle_v1::model::DataTable;
11735    /// let x = DataTable::new().set_rule_associations_count(42);
11736    /// ```
11737    pub fn set_rule_associations_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11738        self.rule_associations_count = v.into();
11739        self
11740    }
11741
11742    /// Sets the value of [row_time_to_live][crate::model::DataTable::row_time_to_live].
11743    ///
11744    /// # Example
11745    /// ```ignore,no_run
11746    /// # use google_cloud_chronicle_v1::model::DataTable;
11747    /// let x = DataTable::new().set_row_time_to_live("example");
11748    /// ```
11749    pub fn set_row_time_to_live<T: std::convert::Into<std::string::String>>(
11750        mut self,
11751        v: T,
11752    ) -> Self {
11753        self.row_time_to_live = v.into();
11754        self
11755    }
11756
11757    /// Sets the value of [approximate_row_count][crate::model::DataTable::approximate_row_count].
11758    ///
11759    /// # Example
11760    /// ```ignore,no_run
11761    /// # use google_cloud_chronicle_v1::model::DataTable;
11762    /// let x = DataTable::new().set_approximate_row_count(42);
11763    /// ```
11764    pub fn set_approximate_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11765        self.approximate_row_count = v.into();
11766        self
11767    }
11768
11769    /// Sets the value of [scope_info][crate::model::DataTable::scope_info].
11770    ///
11771    /// # Example
11772    /// ```ignore,no_run
11773    /// # use google_cloud_chronicle_v1::model::DataTable;
11774    /// use google_cloud_chronicle_v1::model::DataTableScopeInfo;
11775    /// let x = DataTable::new().set_scope_info(DataTableScopeInfo::default()/* use setters */);
11776    /// ```
11777    pub fn set_scope_info<T>(mut self, v: T) -> Self
11778    where
11779        T: std::convert::Into<crate::model::DataTableScopeInfo>,
11780    {
11781        self.scope_info = std::option::Option::Some(v.into());
11782        self
11783    }
11784
11785    /// Sets or clears the value of [scope_info][crate::model::DataTable::scope_info].
11786    ///
11787    /// # Example
11788    /// ```ignore,no_run
11789    /// # use google_cloud_chronicle_v1::model::DataTable;
11790    /// use google_cloud_chronicle_v1::model::DataTableScopeInfo;
11791    /// let x = DataTable::new().set_or_clear_scope_info(Some(DataTableScopeInfo::default()/* use setters */));
11792    /// let x = DataTable::new().set_or_clear_scope_info(None::<DataTableScopeInfo>);
11793    /// ```
11794    pub fn set_or_clear_scope_info<T>(mut self, v: std::option::Option<T>) -> Self
11795    where
11796        T: std::convert::Into<crate::model::DataTableScopeInfo>,
11797    {
11798        self.scope_info = v.map(|x| x.into());
11799        self
11800    }
11801
11802    /// Sets the value of [update_source][crate::model::DataTable::update_source].
11803    ///
11804    /// # Example
11805    /// ```ignore,no_run
11806    /// # use google_cloud_chronicle_v1::model::DataTable;
11807    /// use google_cloud_chronicle_v1::model::DataTableUpdateSource;
11808    /// let x0 = DataTable::new().set_update_source(DataTableUpdateSource::User);
11809    /// let x1 = DataTable::new().set_update_source(DataTableUpdateSource::Rule);
11810    /// let x2 = DataTable::new().set_update_source(DataTableUpdateSource::Search);
11811    /// ```
11812    pub fn set_update_source<T: std::convert::Into<crate::model::DataTableUpdateSource>>(
11813        mut self,
11814        v: T,
11815    ) -> Self {
11816        self.update_source = v.into();
11817        self
11818    }
11819
11820    /// Sets the value of [row_time_to_live_update_time][crate::model::DataTable::row_time_to_live_update_time].
11821    ///
11822    /// # Example
11823    /// ```ignore,no_run
11824    /// # use google_cloud_chronicle_v1::model::DataTable;
11825    /// use wkt::Timestamp;
11826    /// let x = DataTable::new().set_row_time_to_live_update_time(Timestamp::default()/* use setters */);
11827    /// ```
11828    pub fn set_row_time_to_live_update_time<T>(mut self, v: T) -> Self
11829    where
11830        T: std::convert::Into<wkt::Timestamp>,
11831    {
11832        self.row_time_to_live_update_time = std::option::Option::Some(v.into());
11833        self
11834    }
11835
11836    /// Sets or clears the value of [row_time_to_live_update_time][crate::model::DataTable::row_time_to_live_update_time].
11837    ///
11838    /// # Example
11839    /// ```ignore,no_run
11840    /// # use google_cloud_chronicle_v1::model::DataTable;
11841    /// use wkt::Timestamp;
11842    /// let x = DataTable::new().set_or_clear_row_time_to_live_update_time(Some(Timestamp::default()/* use setters */));
11843    /// let x = DataTable::new().set_or_clear_row_time_to_live_update_time(None::<Timestamp>);
11844    /// ```
11845    pub fn set_or_clear_row_time_to_live_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11846    where
11847        T: std::convert::Into<wkt::Timestamp>,
11848    {
11849        self.row_time_to_live_update_time = v.map(|x| x.into());
11850        self
11851    }
11852}
11853
11854impl wkt::message::Message for DataTable {
11855    fn typename() -> &'static str {
11856        "type.googleapis.com/google.cloud.chronicle.v1.DataTable"
11857    }
11858}
11859
11860/// DataTableRow represents a single row in a data table.
11861#[derive(Clone, Default, PartialEq)]
11862#[non_exhaustive]
11863pub struct DataTableRow {
11864    /// Identifier. The resource name of the data table
11865    /// Format:
11866    /// projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}
11867    pub name: std::string::String,
11868
11869    /// Required. All column values for a single row. The values should be in the
11870    /// same order as the columns of the data tables.
11871    pub values: std::vec::Vec<std::string::String>,
11872
11873    /// Output only. DataTableRow create time
11874    pub create_time: std::option::Option<wkt::Timestamp>,
11875
11876    /// Output only. DataTableRow update time
11877    pub update_time: std::option::Option<wkt::Timestamp>,
11878
11879    /// Optional. User-provided TTL of the data table row.
11880    pub row_time_to_live: std::string::String,
11881
11882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11883}
11884
11885impl DataTableRow {
11886    /// Creates a new default instance.
11887    pub fn new() -> Self {
11888        std::default::Default::default()
11889    }
11890
11891    /// Sets the value of [name][crate::model::DataTableRow::name].
11892    ///
11893    /// # Example
11894    /// ```ignore,no_run
11895    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11896    /// # let project_id = "project_id";
11897    /// # let location_id = "location_id";
11898    /// # let instance_id = "instance_id";
11899    /// # let data_table_id = "data_table_id";
11900    /// # let data_table_row_id = "data_table_row_id";
11901    /// let x = DataTableRow::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTables/{data_table_id}/dataTableRows/{data_table_row_id}"));
11902    /// ```
11903    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11904        self.name = v.into();
11905        self
11906    }
11907
11908    /// Sets the value of [values][crate::model::DataTableRow::values].
11909    ///
11910    /// # Example
11911    /// ```ignore,no_run
11912    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11913    /// let x = DataTableRow::new().set_values(["a", "b", "c"]);
11914    /// ```
11915    pub fn set_values<T, V>(mut self, v: T) -> Self
11916    where
11917        T: std::iter::IntoIterator<Item = V>,
11918        V: std::convert::Into<std::string::String>,
11919    {
11920        use std::iter::Iterator;
11921        self.values = v.into_iter().map(|i| i.into()).collect();
11922        self
11923    }
11924
11925    /// Sets the value of [create_time][crate::model::DataTableRow::create_time].
11926    ///
11927    /// # Example
11928    /// ```ignore,no_run
11929    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11930    /// use wkt::Timestamp;
11931    /// let x = DataTableRow::new().set_create_time(Timestamp::default()/* use setters */);
11932    /// ```
11933    pub fn set_create_time<T>(mut self, v: T) -> Self
11934    where
11935        T: std::convert::Into<wkt::Timestamp>,
11936    {
11937        self.create_time = std::option::Option::Some(v.into());
11938        self
11939    }
11940
11941    /// Sets or clears the value of [create_time][crate::model::DataTableRow::create_time].
11942    ///
11943    /// # Example
11944    /// ```ignore,no_run
11945    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11946    /// use wkt::Timestamp;
11947    /// let x = DataTableRow::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11948    /// let x = DataTableRow::new().set_or_clear_create_time(None::<Timestamp>);
11949    /// ```
11950    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11951    where
11952        T: std::convert::Into<wkt::Timestamp>,
11953    {
11954        self.create_time = v.map(|x| x.into());
11955        self
11956    }
11957
11958    /// Sets the value of [update_time][crate::model::DataTableRow::update_time].
11959    ///
11960    /// # Example
11961    /// ```ignore,no_run
11962    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11963    /// use wkt::Timestamp;
11964    /// let x = DataTableRow::new().set_update_time(Timestamp::default()/* use setters */);
11965    /// ```
11966    pub fn set_update_time<T>(mut self, v: T) -> Self
11967    where
11968        T: std::convert::Into<wkt::Timestamp>,
11969    {
11970        self.update_time = std::option::Option::Some(v.into());
11971        self
11972    }
11973
11974    /// Sets or clears the value of [update_time][crate::model::DataTableRow::update_time].
11975    ///
11976    /// # Example
11977    /// ```ignore,no_run
11978    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11979    /// use wkt::Timestamp;
11980    /// let x = DataTableRow::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11981    /// let x = DataTableRow::new().set_or_clear_update_time(None::<Timestamp>);
11982    /// ```
11983    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11984    where
11985        T: std::convert::Into<wkt::Timestamp>,
11986    {
11987        self.update_time = v.map(|x| x.into());
11988        self
11989    }
11990
11991    /// Sets the value of [row_time_to_live][crate::model::DataTableRow::row_time_to_live].
11992    ///
11993    /// # Example
11994    /// ```ignore,no_run
11995    /// # use google_cloud_chronicle_v1::model::DataTableRow;
11996    /// let x = DataTableRow::new().set_row_time_to_live("example");
11997    /// ```
11998    pub fn set_row_time_to_live<T: std::convert::Into<std::string::String>>(
11999        mut self,
12000        v: T,
12001    ) -> Self {
12002        self.row_time_to_live = v.into();
12003        self
12004    }
12005}
12006
12007impl wkt::message::Message for DataTableRow {
12008    fn typename() -> &'static str {
12009        "type.googleapis.com/google.cloud.chronicle.v1.DataTableRow"
12010    }
12011}
12012
12013/// DataTableColumnInfo represents the column metadata of the
12014/// datatable. The column_index represents the ordering of the
12015/// values in DataTableRow.
12016#[derive(Clone, Default, PartialEq)]
12017#[non_exhaustive]
12018pub struct DataTableColumnInfo {
12019    /// Required. Column Index. 0,1,2...
12020    pub column_index: i32,
12021
12022    /// Required. Original column name of the Data Table (present in the CSV header
12023    /// in case of creation of data tables using file uploads). It must satisfy the
12024    /// following requirements:
12025    ///
12026    /// - Starts with letter.
12027    /// - Contains only letters, numbers and underscore.
12028    /// - Must be unique and has length < 256.
12029    pub original_column: std::string::String,
12030
12031    /// Optional. Whether to include this column in the calculation of the row ID.
12032    /// If no columns have key_column = true, all columns will be included in the
12033    /// calculation of the row ID.
12034    pub key_column: bool,
12035
12036    /// Optional. Whether the column is a repeated values column.
12037    pub repeated_values: bool,
12038
12039    #[allow(missing_docs)]
12040    pub path_or_type: std::option::Option<crate::model::data_table_column_info::PathOrType>,
12041
12042    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12043}
12044
12045impl DataTableColumnInfo {
12046    /// Creates a new default instance.
12047    pub fn new() -> Self {
12048        std::default::Default::default()
12049    }
12050
12051    /// Sets the value of [column_index][crate::model::DataTableColumnInfo::column_index].
12052    ///
12053    /// # Example
12054    /// ```ignore,no_run
12055    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12056    /// let x = DataTableColumnInfo::new().set_column_index(42);
12057    /// ```
12058    pub fn set_column_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12059        self.column_index = v.into();
12060        self
12061    }
12062
12063    /// Sets the value of [original_column][crate::model::DataTableColumnInfo::original_column].
12064    ///
12065    /// # Example
12066    /// ```ignore,no_run
12067    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12068    /// let x = DataTableColumnInfo::new().set_original_column("example");
12069    /// ```
12070    pub fn set_original_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12071        self.original_column = v.into();
12072        self
12073    }
12074
12075    /// Sets the value of [key_column][crate::model::DataTableColumnInfo::key_column].
12076    ///
12077    /// # Example
12078    /// ```ignore,no_run
12079    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12080    /// let x = DataTableColumnInfo::new().set_key_column(true);
12081    /// ```
12082    pub fn set_key_column<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12083        self.key_column = v.into();
12084        self
12085    }
12086
12087    /// Sets the value of [repeated_values][crate::model::DataTableColumnInfo::repeated_values].
12088    ///
12089    /// # Example
12090    /// ```ignore,no_run
12091    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12092    /// let x = DataTableColumnInfo::new().set_repeated_values(true);
12093    /// ```
12094    pub fn set_repeated_values<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12095        self.repeated_values = v.into();
12096        self
12097    }
12098
12099    /// Sets the value of [path_or_type][crate::model::DataTableColumnInfo::path_or_type].
12100    ///
12101    /// Note that all the setters affecting `path_or_type` are mutually
12102    /// exclusive.
12103    ///
12104    /// # Example
12105    /// ```ignore,no_run
12106    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12107    /// use google_cloud_chronicle_v1::model::data_table_column_info::PathOrType;
12108    /// let x = DataTableColumnInfo::new().set_path_or_type(Some(PathOrType::MappedColumnPath("example".to_string())));
12109    /// ```
12110    pub fn set_path_or_type<
12111        T: std::convert::Into<std::option::Option<crate::model::data_table_column_info::PathOrType>>,
12112    >(
12113        mut self,
12114        v: T,
12115    ) -> Self {
12116        self.path_or_type = v.into();
12117        self
12118    }
12119
12120    /// The value of [path_or_type][crate::model::DataTableColumnInfo::path_or_type]
12121    /// if it holds a `MappedColumnPath`, `None` if the field is not set or
12122    /// holds a different branch.
12123    pub fn mapped_column_path(&self) -> std::option::Option<&std::string::String> {
12124        #[allow(unreachable_patterns)]
12125        self.path_or_type.as_ref().and_then(|v| match v {
12126            crate::model::data_table_column_info::PathOrType::MappedColumnPath(v) => {
12127                std::option::Option::Some(v)
12128            }
12129            _ => std::option::Option::None,
12130        })
12131    }
12132
12133    /// Sets the value of [path_or_type][crate::model::DataTableColumnInfo::path_or_type]
12134    /// to hold a `MappedColumnPath`.
12135    ///
12136    /// Note that all the setters affecting `path_or_type` are
12137    /// mutually exclusive.
12138    ///
12139    /// # Example
12140    /// ```ignore,no_run
12141    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12142    /// let x = DataTableColumnInfo::new().set_mapped_column_path("example");
12143    /// assert!(x.mapped_column_path().is_some());
12144    /// assert!(x.column_type().is_none());
12145    /// ```
12146    pub fn set_mapped_column_path<T: std::convert::Into<std::string::String>>(
12147        mut self,
12148        v: T,
12149    ) -> Self {
12150        self.path_or_type = std::option::Option::Some(
12151            crate::model::data_table_column_info::PathOrType::MappedColumnPath(v.into()),
12152        );
12153        self
12154    }
12155
12156    /// The value of [path_or_type][crate::model::DataTableColumnInfo::path_or_type]
12157    /// if it holds a `ColumnType`, `None` if the field is not set or
12158    /// holds a different branch.
12159    pub fn column_type(
12160        &self,
12161    ) -> std::option::Option<&crate::model::data_table_column_info::DataTableColumnType> {
12162        #[allow(unreachable_patterns)]
12163        self.path_or_type.as_ref().and_then(|v| match v {
12164            crate::model::data_table_column_info::PathOrType::ColumnType(v) => {
12165                std::option::Option::Some(v)
12166            }
12167            _ => std::option::Option::None,
12168        })
12169    }
12170
12171    /// Sets the value of [path_or_type][crate::model::DataTableColumnInfo::path_or_type]
12172    /// to hold a `ColumnType`.
12173    ///
12174    /// Note that all the setters affecting `path_or_type` are
12175    /// mutually exclusive.
12176    ///
12177    /// # Example
12178    /// ```ignore,no_run
12179    /// # use google_cloud_chronicle_v1::model::DataTableColumnInfo;
12180    /// use google_cloud_chronicle_v1::model::data_table_column_info::DataTableColumnType;
12181    /// let x0 = DataTableColumnInfo::new().set_column_type(DataTableColumnType::String);
12182    /// let x1 = DataTableColumnInfo::new().set_column_type(DataTableColumnType::Regex);
12183    /// let x2 = DataTableColumnInfo::new().set_column_type(DataTableColumnType::Cidr);
12184    /// assert!(x0.column_type().is_some());
12185    /// assert!(x0.mapped_column_path().is_none());
12186    /// assert!(x1.column_type().is_some());
12187    /// assert!(x1.mapped_column_path().is_none());
12188    /// assert!(x2.column_type().is_some());
12189    /// assert!(x2.mapped_column_path().is_none());
12190    /// ```
12191    pub fn set_column_type<
12192        T: std::convert::Into<crate::model::data_table_column_info::DataTableColumnType>,
12193    >(
12194        mut self,
12195        v: T,
12196    ) -> Self {
12197        self.path_or_type = std::option::Option::Some(
12198            crate::model::data_table_column_info::PathOrType::ColumnType(v.into()),
12199        );
12200        self
12201    }
12202}
12203
12204impl wkt::message::Message for DataTableColumnInfo {
12205    fn typename() -> &'static str {
12206        "type.googleapis.com/google.cloud.chronicle.v1.DataTableColumnInfo"
12207    }
12208}
12209
12210/// Defines additional types related to [DataTableColumnInfo].
12211pub mod data_table_column_info {
12212    #[allow(unused_imports)]
12213    use super::*;
12214
12215    /// DataTableColumnType denotes the type of the column to be referenced in the
12216    /// rule.
12217    ///
12218    /// # Working with unknown values
12219    ///
12220    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12221    /// additional enum variants at any time. Adding new variants is not considered
12222    /// a breaking change. Applications should write their code in anticipation of:
12223    ///
12224    /// - New values appearing in future releases of the client library, **and**
12225    /// - New values received dynamically, without application changes.
12226    ///
12227    /// Please consult the [Working with enums] section in the user guide for some
12228    /// guidelines.
12229    ///
12230    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12231    #[derive(Clone, Debug, PartialEq)]
12232    #[non_exhaustive]
12233    pub enum DataTableColumnType {
12234        /// The default Data Table Column Type.
12235        Unspecified,
12236        /// Denotes the type of the column as STRING.
12237        String,
12238        /// Denotes the type of the column as REGEX.
12239        Regex,
12240        /// Denotes the type of the column as CIDR.
12241        Cidr,
12242        /// Denotes the type of the column as NUMBER (includes int and float).
12243        Number,
12244        /// If set, the enum was initialized with an unknown value.
12245        ///
12246        /// Applications can examine the value using [DataTableColumnType::value] or
12247        /// [DataTableColumnType::name].
12248        UnknownValue(data_table_column_type::UnknownValue),
12249    }
12250
12251    #[doc(hidden)]
12252    pub mod data_table_column_type {
12253        #[allow(unused_imports)]
12254        use super::*;
12255        #[derive(Clone, Debug, PartialEq)]
12256        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12257    }
12258
12259    impl DataTableColumnType {
12260        /// Gets the enum value.
12261        ///
12262        /// Returns `None` if the enum contains an unknown value deserialized from
12263        /// the string representation of enums.
12264        pub fn value(&self) -> std::option::Option<i32> {
12265            match self {
12266                Self::Unspecified => std::option::Option::Some(0),
12267                Self::String => std::option::Option::Some(1),
12268                Self::Regex => std::option::Option::Some(2),
12269                Self::Cidr => std::option::Option::Some(3),
12270                Self::Number => std::option::Option::Some(4),
12271                Self::UnknownValue(u) => u.0.value(),
12272            }
12273        }
12274
12275        /// Gets the enum value as a string.
12276        ///
12277        /// Returns `None` if the enum contains an unknown value deserialized from
12278        /// the integer representation of enums.
12279        pub fn name(&self) -> std::option::Option<&str> {
12280            match self {
12281                Self::Unspecified => {
12282                    std::option::Option::Some("DATA_TABLE_COLUMN_TYPE_UNSPECIFIED")
12283                }
12284                Self::String => std::option::Option::Some("STRING"),
12285                Self::Regex => std::option::Option::Some("REGEX"),
12286                Self::Cidr => std::option::Option::Some("CIDR"),
12287                Self::Number => std::option::Option::Some("NUMBER"),
12288                Self::UnknownValue(u) => u.0.name(),
12289            }
12290        }
12291    }
12292
12293    impl std::default::Default for DataTableColumnType {
12294        fn default() -> Self {
12295            use std::convert::From;
12296            Self::from(0)
12297        }
12298    }
12299
12300    impl std::fmt::Display for DataTableColumnType {
12301        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12302            wkt::internal::display_enum(f, self.name(), self.value())
12303        }
12304    }
12305
12306    impl std::convert::From<i32> for DataTableColumnType {
12307        fn from(value: i32) -> Self {
12308            match value {
12309                0 => Self::Unspecified,
12310                1 => Self::String,
12311                2 => Self::Regex,
12312                3 => Self::Cidr,
12313                4 => Self::Number,
12314                _ => Self::UnknownValue(data_table_column_type::UnknownValue(
12315                    wkt::internal::UnknownEnumValue::Integer(value),
12316                )),
12317            }
12318        }
12319    }
12320
12321    impl std::convert::From<&str> for DataTableColumnType {
12322        fn from(value: &str) -> Self {
12323            use std::string::ToString;
12324            match value {
12325                "DATA_TABLE_COLUMN_TYPE_UNSPECIFIED" => Self::Unspecified,
12326                "STRING" => Self::String,
12327                "REGEX" => Self::Regex,
12328                "CIDR" => Self::Cidr,
12329                "NUMBER" => Self::Number,
12330                _ => Self::UnknownValue(data_table_column_type::UnknownValue(
12331                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12332                )),
12333            }
12334        }
12335    }
12336
12337    impl serde::ser::Serialize for DataTableColumnType {
12338        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12339        where
12340            S: serde::Serializer,
12341        {
12342            match self {
12343                Self::Unspecified => serializer.serialize_i32(0),
12344                Self::String => serializer.serialize_i32(1),
12345                Self::Regex => serializer.serialize_i32(2),
12346                Self::Cidr => serializer.serialize_i32(3),
12347                Self::Number => serializer.serialize_i32(4),
12348                Self::UnknownValue(u) => u.0.serialize(serializer),
12349            }
12350        }
12351    }
12352
12353    impl<'de> serde::de::Deserialize<'de> for DataTableColumnType {
12354        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12355        where
12356            D: serde::Deserializer<'de>,
12357        {
12358            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataTableColumnType>::new(
12359                ".google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType",
12360            ))
12361        }
12362    }
12363
12364    #[allow(missing_docs)]
12365    #[derive(Clone, Debug, PartialEq)]
12366    #[non_exhaustive]
12367    pub enum PathOrType {
12368        /// Entity proto field path that the column is mapped to
12369        MappedColumnPath(std::string::String),
12370        /// Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX
12371        ColumnType(crate::model::data_table_column_info::DataTableColumnType),
12372    }
12373}
12374
12375/// The request message for GetDataTableOperationErrors.
12376#[derive(Clone, Default, PartialEq)]
12377#[non_exhaustive]
12378pub struct GetDataTableOperationErrorsRequest {
12379    /// Required. Resource name for the data table operation errors.
12380    /// Format:
12381    /// projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}
12382    pub name: std::string::String,
12383
12384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12385}
12386
12387impl GetDataTableOperationErrorsRequest {
12388    /// Creates a new default instance.
12389    pub fn new() -> Self {
12390        std::default::Default::default()
12391    }
12392
12393    /// Sets the value of [name][crate::model::GetDataTableOperationErrorsRequest::name].
12394    ///
12395    /// # Example
12396    /// ```ignore,no_run
12397    /// # use google_cloud_chronicle_v1::model::GetDataTableOperationErrorsRequest;
12398    /// # let project_id = "project_id";
12399    /// # let location_id = "location_id";
12400    /// # let instance_id = "instance_id";
12401    /// # let data_table_operation_errors_id = "data_table_operation_errors_id";
12402    /// let x = GetDataTableOperationErrorsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTableOperationErrors/{data_table_operation_errors_id}"));
12403    /// ```
12404    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12405        self.name = v.into();
12406        self
12407    }
12408}
12409
12410impl wkt::message::Message for GetDataTableOperationErrorsRequest {
12411    fn typename() -> &'static str {
12412        "type.googleapis.com/google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest"
12413    }
12414}
12415
12416/// The message containing the errors for a data table operation.
12417#[derive(Clone, Default, PartialEq)]
12418#[non_exhaustive]
12419pub struct DataTableOperationErrors {
12420    /// Identifier. Resource name for the data table operation errors.
12421    /// Format:
12422    /// projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}
12423    pub name: std::string::String,
12424
12425    /// The list of errors.
12426    /// Replaces the deprecated `errors` field.
12427    pub rpc_errors: std::vec::Vec<google_cloud_rpc::model::Status>,
12428
12429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12430}
12431
12432impl DataTableOperationErrors {
12433    /// Creates a new default instance.
12434    pub fn new() -> Self {
12435        std::default::Default::default()
12436    }
12437
12438    /// Sets the value of [name][crate::model::DataTableOperationErrors::name].
12439    ///
12440    /// # Example
12441    /// ```ignore,no_run
12442    /// # use google_cloud_chronicle_v1::model::DataTableOperationErrors;
12443    /// # let project_id = "project_id";
12444    /// # let location_id = "location_id";
12445    /// # let instance_id = "instance_id";
12446    /// # let data_table_operation_errors_id = "data_table_operation_errors_id";
12447    /// let x = DataTableOperationErrors::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataTableOperationErrors/{data_table_operation_errors_id}"));
12448    /// ```
12449    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12450        self.name = v.into();
12451        self
12452    }
12453
12454    /// Sets the value of [rpc_errors][crate::model::DataTableOperationErrors::rpc_errors].
12455    ///
12456    /// # Example
12457    /// ```ignore,no_run
12458    /// # use google_cloud_chronicle_v1::model::DataTableOperationErrors;
12459    /// use google_cloud_rpc::model::Status;
12460    /// let x = DataTableOperationErrors::new()
12461    ///     .set_rpc_errors([
12462    ///         Status::default()/* use setters */,
12463    ///         Status::default()/* use (different) setters */,
12464    ///     ]);
12465    /// ```
12466    pub fn set_rpc_errors<T, V>(mut self, v: T) -> Self
12467    where
12468        T: std::iter::IntoIterator<Item = V>,
12469        V: std::convert::Into<google_cloud_rpc::model::Status>,
12470    {
12471        use std::iter::Iterator;
12472        self.rpc_errors = v.into_iter().map(|i| i.into()).collect();
12473        self
12474    }
12475}
12476
12477impl wkt::message::Message for DataTableOperationErrors {
12478    fn typename() -> &'static str {
12479        "type.googleapis.com/google.cloud.chronicle.v1.DataTableOperationErrors"
12480    }
12481}
12482
12483/// A watchlist is a list of entities that allows for bulk operations over the
12484/// included entities.
12485#[derive(Clone, Default, PartialEq)]
12486#[non_exhaustive]
12487pub struct Watchlist {
12488    /// Identifier. Resource name of the watchlist.
12489    /// Format:
12490    /// `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}`
12491    pub name: std::string::String,
12492
12493    /// Required. Display name of the watchlist.
12494    /// Note that it must be at least one character and less than 63 characters
12495    /// (<https://google.aip.dev/148>).
12496    pub display_name: std::string::String,
12497
12498    /// Optional. Description of the watchlist.
12499    pub description: std::string::String,
12500
12501    /// Optional. Weight applied to the risk score for entities
12502    /// in this watchlist.
12503    /// The default is 1.0 if it is not specified.
12504    pub multiplying_factor: f32,
12505
12506    /// Required. Mechanism to populate entities in the watchlist.
12507    pub entity_population_mechanism:
12508        std::option::Option<crate::model::watchlist::EntityPopulationMechanism>,
12509
12510    /// Output only. Entity count in the watchlist.
12511    pub entity_count: std::option::Option<crate::model::watchlist::EntityCount>,
12512
12513    /// Output only. Time the watchlist was created.
12514    pub create_time: std::option::Option<wkt::Timestamp>,
12515
12516    /// Output only. Time the watchlist was last updated.
12517    pub update_time: std::option::Option<wkt::Timestamp>,
12518
12519    /// Optional. User preferences for watchlist configuration.
12520    pub watchlist_user_preferences: std::option::Option<crate::model::WatchlistUserPreferences>,
12521
12522    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12523}
12524
12525impl Watchlist {
12526    /// Creates a new default instance.
12527    pub fn new() -> Self {
12528        std::default::Default::default()
12529    }
12530
12531    /// Sets the value of [name][crate::model::Watchlist::name].
12532    ///
12533    /// # Example
12534    /// ```ignore,no_run
12535    /// # use google_cloud_chronicle_v1::model::Watchlist;
12536    /// # let project_id = "project_id";
12537    /// # let location_id = "location_id";
12538    /// # let instance_id = "instance_id";
12539    /// # let watchlist_id = "watchlist_id";
12540    /// let x = Watchlist::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/watchlists/{watchlist_id}"));
12541    /// ```
12542    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12543        self.name = v.into();
12544        self
12545    }
12546
12547    /// Sets the value of [display_name][crate::model::Watchlist::display_name].
12548    ///
12549    /// # Example
12550    /// ```ignore,no_run
12551    /// # use google_cloud_chronicle_v1::model::Watchlist;
12552    /// let x = Watchlist::new().set_display_name("example");
12553    /// ```
12554    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12555        self.display_name = v.into();
12556        self
12557    }
12558
12559    /// Sets the value of [description][crate::model::Watchlist::description].
12560    ///
12561    /// # Example
12562    /// ```ignore,no_run
12563    /// # use google_cloud_chronicle_v1::model::Watchlist;
12564    /// let x = Watchlist::new().set_description("example");
12565    /// ```
12566    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12567        self.description = v.into();
12568        self
12569    }
12570
12571    /// Sets the value of [multiplying_factor][crate::model::Watchlist::multiplying_factor].
12572    ///
12573    /// # Example
12574    /// ```ignore,no_run
12575    /// # use google_cloud_chronicle_v1::model::Watchlist;
12576    /// let x = Watchlist::new().set_multiplying_factor(42.0);
12577    /// ```
12578    pub fn set_multiplying_factor<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12579        self.multiplying_factor = v.into();
12580        self
12581    }
12582
12583    /// Sets the value of [entity_population_mechanism][crate::model::Watchlist::entity_population_mechanism].
12584    ///
12585    /// # Example
12586    /// ```ignore,no_run
12587    /// # use google_cloud_chronicle_v1::model::Watchlist;
12588    /// use google_cloud_chronicle_v1::model::watchlist::EntityPopulationMechanism;
12589    /// let x = Watchlist::new().set_entity_population_mechanism(EntityPopulationMechanism::default()/* use setters */);
12590    /// ```
12591    pub fn set_entity_population_mechanism<T>(mut self, v: T) -> Self
12592    where
12593        T: std::convert::Into<crate::model::watchlist::EntityPopulationMechanism>,
12594    {
12595        self.entity_population_mechanism = std::option::Option::Some(v.into());
12596        self
12597    }
12598
12599    /// Sets or clears the value of [entity_population_mechanism][crate::model::Watchlist::entity_population_mechanism].
12600    ///
12601    /// # Example
12602    /// ```ignore,no_run
12603    /// # use google_cloud_chronicle_v1::model::Watchlist;
12604    /// use google_cloud_chronicle_v1::model::watchlist::EntityPopulationMechanism;
12605    /// let x = Watchlist::new().set_or_clear_entity_population_mechanism(Some(EntityPopulationMechanism::default()/* use setters */));
12606    /// let x = Watchlist::new().set_or_clear_entity_population_mechanism(None::<EntityPopulationMechanism>);
12607    /// ```
12608    pub fn set_or_clear_entity_population_mechanism<T>(mut self, v: std::option::Option<T>) -> Self
12609    where
12610        T: std::convert::Into<crate::model::watchlist::EntityPopulationMechanism>,
12611    {
12612        self.entity_population_mechanism = v.map(|x| x.into());
12613        self
12614    }
12615
12616    /// Sets the value of [entity_count][crate::model::Watchlist::entity_count].
12617    ///
12618    /// # Example
12619    /// ```ignore,no_run
12620    /// # use google_cloud_chronicle_v1::model::Watchlist;
12621    /// use google_cloud_chronicle_v1::model::watchlist::EntityCount;
12622    /// let x = Watchlist::new().set_entity_count(EntityCount::default()/* use setters */);
12623    /// ```
12624    pub fn set_entity_count<T>(mut self, v: T) -> Self
12625    where
12626        T: std::convert::Into<crate::model::watchlist::EntityCount>,
12627    {
12628        self.entity_count = std::option::Option::Some(v.into());
12629        self
12630    }
12631
12632    /// Sets or clears the value of [entity_count][crate::model::Watchlist::entity_count].
12633    ///
12634    /// # Example
12635    /// ```ignore,no_run
12636    /// # use google_cloud_chronicle_v1::model::Watchlist;
12637    /// use google_cloud_chronicle_v1::model::watchlist::EntityCount;
12638    /// let x = Watchlist::new().set_or_clear_entity_count(Some(EntityCount::default()/* use setters */));
12639    /// let x = Watchlist::new().set_or_clear_entity_count(None::<EntityCount>);
12640    /// ```
12641    pub fn set_or_clear_entity_count<T>(mut self, v: std::option::Option<T>) -> Self
12642    where
12643        T: std::convert::Into<crate::model::watchlist::EntityCount>,
12644    {
12645        self.entity_count = v.map(|x| x.into());
12646        self
12647    }
12648
12649    /// Sets the value of [create_time][crate::model::Watchlist::create_time].
12650    ///
12651    /// # Example
12652    /// ```ignore,no_run
12653    /// # use google_cloud_chronicle_v1::model::Watchlist;
12654    /// use wkt::Timestamp;
12655    /// let x = Watchlist::new().set_create_time(Timestamp::default()/* use setters */);
12656    /// ```
12657    pub fn set_create_time<T>(mut self, v: T) -> Self
12658    where
12659        T: std::convert::Into<wkt::Timestamp>,
12660    {
12661        self.create_time = std::option::Option::Some(v.into());
12662        self
12663    }
12664
12665    /// Sets or clears the value of [create_time][crate::model::Watchlist::create_time].
12666    ///
12667    /// # Example
12668    /// ```ignore,no_run
12669    /// # use google_cloud_chronicle_v1::model::Watchlist;
12670    /// use wkt::Timestamp;
12671    /// let x = Watchlist::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
12672    /// let x = Watchlist::new().set_or_clear_create_time(None::<Timestamp>);
12673    /// ```
12674    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12675    where
12676        T: std::convert::Into<wkt::Timestamp>,
12677    {
12678        self.create_time = v.map(|x| x.into());
12679        self
12680    }
12681
12682    /// Sets the value of [update_time][crate::model::Watchlist::update_time].
12683    ///
12684    /// # Example
12685    /// ```ignore,no_run
12686    /// # use google_cloud_chronicle_v1::model::Watchlist;
12687    /// use wkt::Timestamp;
12688    /// let x = Watchlist::new().set_update_time(Timestamp::default()/* use setters */);
12689    /// ```
12690    pub fn set_update_time<T>(mut self, v: T) -> Self
12691    where
12692        T: std::convert::Into<wkt::Timestamp>,
12693    {
12694        self.update_time = std::option::Option::Some(v.into());
12695        self
12696    }
12697
12698    /// Sets or clears the value of [update_time][crate::model::Watchlist::update_time].
12699    ///
12700    /// # Example
12701    /// ```ignore,no_run
12702    /// # use google_cloud_chronicle_v1::model::Watchlist;
12703    /// use wkt::Timestamp;
12704    /// let x = Watchlist::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
12705    /// let x = Watchlist::new().set_or_clear_update_time(None::<Timestamp>);
12706    /// ```
12707    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12708    where
12709        T: std::convert::Into<wkt::Timestamp>,
12710    {
12711        self.update_time = v.map(|x| x.into());
12712        self
12713    }
12714
12715    /// Sets the value of [watchlist_user_preferences][crate::model::Watchlist::watchlist_user_preferences].
12716    ///
12717    /// # Example
12718    /// ```ignore,no_run
12719    /// # use google_cloud_chronicle_v1::model::Watchlist;
12720    /// use google_cloud_chronicle_v1::model::WatchlistUserPreferences;
12721    /// let x = Watchlist::new().set_watchlist_user_preferences(WatchlistUserPreferences::default()/* use setters */);
12722    /// ```
12723    pub fn set_watchlist_user_preferences<T>(mut self, v: T) -> Self
12724    where
12725        T: std::convert::Into<crate::model::WatchlistUserPreferences>,
12726    {
12727        self.watchlist_user_preferences = std::option::Option::Some(v.into());
12728        self
12729    }
12730
12731    /// Sets or clears the value of [watchlist_user_preferences][crate::model::Watchlist::watchlist_user_preferences].
12732    ///
12733    /// # Example
12734    /// ```ignore,no_run
12735    /// # use google_cloud_chronicle_v1::model::Watchlist;
12736    /// use google_cloud_chronicle_v1::model::WatchlistUserPreferences;
12737    /// let x = Watchlist::new().set_or_clear_watchlist_user_preferences(Some(WatchlistUserPreferences::default()/* use setters */));
12738    /// let x = Watchlist::new().set_or_clear_watchlist_user_preferences(None::<WatchlistUserPreferences>);
12739    /// ```
12740    pub fn set_or_clear_watchlist_user_preferences<T>(mut self, v: std::option::Option<T>) -> Self
12741    where
12742        T: std::convert::Into<crate::model::WatchlistUserPreferences>,
12743    {
12744        self.watchlist_user_preferences = v.map(|x| x.into());
12745        self
12746    }
12747}
12748
12749impl wkt::message::Message for Watchlist {
12750    fn typename() -> &'static str {
12751        "type.googleapis.com/google.cloud.chronicle.v1.Watchlist"
12752    }
12753}
12754
12755/// Defines additional types related to [Watchlist].
12756pub mod watchlist {
12757    #[allow(unused_imports)]
12758    use super::*;
12759
12760    /// Mechanism to populate entities in the watchlist.
12761    #[derive(Clone, Default, PartialEq)]
12762    #[non_exhaustive]
12763    pub struct EntityPopulationMechanism {
12764        /// Ways to populate entities in watchlist.
12765        /// Currently, only manual is supported.
12766        pub mechanism:
12767            std::option::Option<crate::model::watchlist::entity_population_mechanism::Mechanism>,
12768
12769        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12770    }
12771
12772    impl EntityPopulationMechanism {
12773        /// Creates a new default instance.
12774        pub fn new() -> Self {
12775            std::default::Default::default()
12776        }
12777
12778        /// Sets the value of [mechanism][crate::model::watchlist::EntityPopulationMechanism::mechanism].
12779        ///
12780        /// Note that all the setters affecting `mechanism` are mutually
12781        /// exclusive.
12782        ///
12783        /// # Example
12784        /// ```ignore,no_run
12785        /// # use google_cloud_chronicle_v1::model::watchlist::EntityPopulationMechanism;
12786        /// use google_cloud_chronicle_v1::model::watchlist::entity_population_mechanism::Manual;
12787        /// let x = EntityPopulationMechanism::new().set_mechanism(Some(
12788        ///     google_cloud_chronicle_v1::model::watchlist::entity_population_mechanism::Mechanism::Manual(Manual::default().into())));
12789        /// ```
12790        pub fn set_mechanism<
12791            T: std::convert::Into<
12792                    std::option::Option<
12793                        crate::model::watchlist::entity_population_mechanism::Mechanism,
12794                    >,
12795                >,
12796        >(
12797            mut self,
12798            v: T,
12799        ) -> Self {
12800            self.mechanism = v.into();
12801            self
12802        }
12803
12804        /// The value of [mechanism][crate::model::watchlist::EntityPopulationMechanism::mechanism]
12805        /// if it holds a `Manual`, `None` if the field is not set or
12806        /// holds a different branch.
12807        pub fn manual(
12808            &self,
12809        ) -> std::option::Option<
12810            &std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>,
12811        > {
12812            #[allow(unreachable_patterns)]
12813            self.mechanism.as_ref().and_then(|v| match v {
12814                crate::model::watchlist::entity_population_mechanism::Mechanism::Manual(v) => {
12815                    std::option::Option::Some(v)
12816                }
12817                _ => std::option::Option::None,
12818            })
12819        }
12820
12821        /// Sets the value of [mechanism][crate::model::watchlist::EntityPopulationMechanism::mechanism]
12822        /// to hold a `Manual`.
12823        ///
12824        /// Note that all the setters affecting `mechanism` are
12825        /// mutually exclusive.
12826        ///
12827        /// # Example
12828        /// ```ignore,no_run
12829        /// # use google_cloud_chronicle_v1::model::watchlist::EntityPopulationMechanism;
12830        /// use google_cloud_chronicle_v1::model::watchlist::entity_population_mechanism::Manual;
12831        /// let x = EntityPopulationMechanism::new().set_manual(Manual::default()/* use setters */);
12832        /// assert!(x.manual().is_some());
12833        /// ```
12834        pub fn set_manual<
12835            T: std::convert::Into<
12836                    std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>,
12837                >,
12838        >(
12839            mut self,
12840            v: T,
12841        ) -> Self {
12842            self.mechanism = std::option::Option::Some(
12843                crate::model::watchlist::entity_population_mechanism::Mechanism::Manual(v.into()),
12844            );
12845            self
12846        }
12847    }
12848
12849    impl wkt::message::Message for EntityPopulationMechanism {
12850        fn typename() -> &'static str {
12851            "type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism"
12852        }
12853    }
12854
12855    /// Defines additional types related to [EntityPopulationMechanism].
12856    pub mod entity_population_mechanism {
12857        #[allow(unused_imports)]
12858        use super::*;
12859
12860        /// Entities are added manually.
12861        #[derive(Clone, Default, PartialEq)]
12862        #[non_exhaustive]
12863        pub struct Manual {
12864            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12865        }
12866
12867        impl Manual {
12868            /// Creates a new default instance.
12869            pub fn new() -> Self {
12870                std::default::Default::default()
12871            }
12872        }
12873
12874        impl wkt::message::Message for Manual {
12875            fn typename() -> &'static str {
12876                "type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual"
12877            }
12878        }
12879
12880        /// Ways to populate entities in watchlist.
12881        /// Currently, only manual is supported.
12882        #[derive(Clone, Debug, PartialEq)]
12883        #[non_exhaustive]
12884        pub enum Mechanism {
12885            /// Optional. Entities are added manually.
12886            Manual(std::boxed::Box<crate::model::watchlist::entity_population_mechanism::Manual>),
12887        }
12888    }
12889
12890    /// Count of different types of entities in the watchlist.
12891    #[derive(Clone, Default, PartialEq)]
12892    #[non_exhaustive]
12893    pub struct EntityCount {
12894        /// Output only. Count of user type entities in the watchlist.
12895        pub user: i32,
12896
12897        /// Output only. Count of asset type entities in the watchlist.
12898        pub asset: i32,
12899
12900        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12901    }
12902
12903    impl EntityCount {
12904        /// Creates a new default instance.
12905        pub fn new() -> Self {
12906            std::default::Default::default()
12907        }
12908
12909        /// Sets the value of [user][crate::model::watchlist::EntityCount::user].
12910        ///
12911        /// # Example
12912        /// ```ignore,no_run
12913        /// # use google_cloud_chronicle_v1::model::watchlist::EntityCount;
12914        /// let x = EntityCount::new().set_user(42);
12915        /// ```
12916        pub fn set_user<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12917            self.user = v.into();
12918            self
12919        }
12920
12921        /// Sets the value of [asset][crate::model::watchlist::EntityCount::asset].
12922        ///
12923        /// # Example
12924        /// ```ignore,no_run
12925        /// # use google_cloud_chronicle_v1::model::watchlist::EntityCount;
12926        /// let x = EntityCount::new().set_asset(42);
12927        /// ```
12928        pub fn set_asset<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12929            self.asset = v.into();
12930            self
12931        }
12932    }
12933
12934    impl wkt::message::Message for EntityCount {
12935        fn typename() -> &'static str {
12936            "type.googleapis.com/google.cloud.chronicle.v1.Watchlist.EntityCount"
12937        }
12938    }
12939}
12940
12941/// A collection of user preferences for watchlist UI configuration.
12942#[derive(Clone, Default, PartialEq)]
12943#[non_exhaustive]
12944pub struct WatchlistUserPreferences {
12945    /// Optional. Whether the watchlist is pinned on the dashboard.
12946    pub pinned: bool,
12947
12948    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12949}
12950
12951impl WatchlistUserPreferences {
12952    /// Creates a new default instance.
12953    pub fn new() -> Self {
12954        std::default::Default::default()
12955    }
12956
12957    /// Sets the value of [pinned][crate::model::WatchlistUserPreferences::pinned].
12958    ///
12959    /// # Example
12960    /// ```ignore,no_run
12961    /// # use google_cloud_chronicle_v1::model::WatchlistUserPreferences;
12962    /// let x = WatchlistUserPreferences::new().set_pinned(true);
12963    /// ```
12964    pub fn set_pinned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12965        self.pinned = v.into();
12966        self
12967    }
12968}
12969
12970impl wkt::message::Message for WatchlistUserPreferences {
12971    fn typename() -> &'static str {
12972        "type.googleapis.com/google.cloud.chronicle.v1.WatchlistUserPreferences"
12973    }
12974}
12975
12976/// Request message for getting a watchlist.
12977#[derive(Clone, Default, PartialEq)]
12978#[non_exhaustive]
12979pub struct GetWatchlistRequest {
12980    /// Required. The parent, which owns this collection of watchlists.
12981    /// The name of the watchlist to retrieve.
12982    /// Format:
12983    /// `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}`
12984    pub name: std::string::String,
12985
12986    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12987}
12988
12989impl GetWatchlistRequest {
12990    /// Creates a new default instance.
12991    pub fn new() -> Self {
12992        std::default::Default::default()
12993    }
12994
12995    /// Sets the value of [name][crate::model::GetWatchlistRequest::name].
12996    ///
12997    /// # Example
12998    /// ```ignore,no_run
12999    /// # use google_cloud_chronicle_v1::model::GetWatchlistRequest;
13000    /// # let project_id = "project_id";
13001    /// # let location_id = "location_id";
13002    /// # let instance_id = "instance_id";
13003    /// # let watchlist_id = "watchlist_id";
13004    /// let x = GetWatchlistRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/watchlists/{watchlist_id}"));
13005    /// ```
13006    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13007        self.name = v.into();
13008        self
13009    }
13010}
13011
13012impl wkt::message::Message for GetWatchlistRequest {
13013    fn typename() -> &'static str {
13014        "type.googleapis.com/google.cloud.chronicle.v1.GetWatchlistRequest"
13015    }
13016}
13017
13018/// Request message for listing watchlists.
13019#[derive(Clone, Default, PartialEq)]
13020#[non_exhaustive]
13021pub struct ListWatchlistsRequest {
13022    /// Required. The parent, which owns this collection of watchlists.
13023    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
13024    pub parent: std::string::String,
13025
13026    /// Optional. The maximum number of watchlists to return.
13027    /// The service may return fewer than this value.
13028    /// If unspecified, at most 200 watchlists will be returned.
13029    /// The maximum value is 200; values above 200 will be coerced to 200.
13030    pub page_size: i32,
13031
13032    /// Optional. A page token, received from a previous `ListWatchlists` call.
13033    /// Provide this to retrieve the subsequent page.
13034    ///
13035    /// When paginating, all other parameters provided to
13036    /// `ListWatchlists` must match the call that provided the page
13037    /// token.
13038    pub page_token: std::string::String,
13039
13040    /// Optional. Which watchlist to return in aip.dev/160 form.
13041    /// Currently, only the following filters are supported:
13042    ///
13043    /// - `watchlist_user_preferences.pinned=true`
13044    /// - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])`
13045    /// - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])`
13046    pub filter: std::string::String,
13047
13048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13049}
13050
13051impl ListWatchlistsRequest {
13052    /// Creates a new default instance.
13053    pub fn new() -> Self {
13054        std::default::Default::default()
13055    }
13056
13057    /// Sets the value of [parent][crate::model::ListWatchlistsRequest::parent].
13058    ///
13059    /// # Example
13060    /// ```ignore,no_run
13061    /// # use google_cloud_chronicle_v1::model::ListWatchlistsRequest;
13062    /// # let project_id = "project_id";
13063    /// # let location_id = "location_id";
13064    /// # let instance_id = "instance_id";
13065    /// let x = ListWatchlistsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
13066    /// ```
13067    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13068        self.parent = v.into();
13069        self
13070    }
13071
13072    /// Sets the value of [page_size][crate::model::ListWatchlistsRequest::page_size].
13073    ///
13074    /// # Example
13075    /// ```ignore,no_run
13076    /// # use google_cloud_chronicle_v1::model::ListWatchlistsRequest;
13077    /// let x = ListWatchlistsRequest::new().set_page_size(42);
13078    /// ```
13079    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13080        self.page_size = v.into();
13081        self
13082    }
13083
13084    /// Sets the value of [page_token][crate::model::ListWatchlistsRequest::page_token].
13085    ///
13086    /// # Example
13087    /// ```ignore,no_run
13088    /// # use google_cloud_chronicle_v1::model::ListWatchlistsRequest;
13089    /// let x = ListWatchlistsRequest::new().set_page_token("example");
13090    /// ```
13091    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13092        self.page_token = v.into();
13093        self
13094    }
13095
13096    /// Sets the value of [filter][crate::model::ListWatchlistsRequest::filter].
13097    ///
13098    /// # Example
13099    /// ```ignore,no_run
13100    /// # use google_cloud_chronicle_v1::model::ListWatchlistsRequest;
13101    /// let x = ListWatchlistsRequest::new().set_filter("example");
13102    /// ```
13103    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13104        self.filter = v.into();
13105        self
13106    }
13107}
13108
13109impl wkt::message::Message for ListWatchlistsRequest {
13110    fn typename() -> &'static str {
13111        "type.googleapis.com/google.cloud.chronicle.v1.ListWatchlistsRequest"
13112    }
13113}
13114
13115/// Response message for listing watchlists.
13116#[derive(Clone, Default, PartialEq)]
13117#[non_exhaustive]
13118pub struct ListWatchlistsResponse {
13119    /// Optional. The watchlists from the specified instance.
13120    pub watchlists: std::vec::Vec<crate::model::Watchlist>,
13121
13122    /// Optional. A token, which can be sent as `page_token` to retrieve the next
13123    /// page. If this field is omitted, there are no subsequent pages.
13124    pub next_page_token: std::string::String,
13125
13126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13127}
13128
13129impl ListWatchlistsResponse {
13130    /// Creates a new default instance.
13131    pub fn new() -> Self {
13132        std::default::Default::default()
13133    }
13134
13135    /// Sets the value of [watchlists][crate::model::ListWatchlistsResponse::watchlists].
13136    ///
13137    /// # Example
13138    /// ```ignore,no_run
13139    /// # use google_cloud_chronicle_v1::model::ListWatchlistsResponse;
13140    /// use google_cloud_chronicle_v1::model::Watchlist;
13141    /// let x = ListWatchlistsResponse::new()
13142    ///     .set_watchlists([
13143    ///         Watchlist::default()/* use setters */,
13144    ///         Watchlist::default()/* use (different) setters */,
13145    ///     ]);
13146    /// ```
13147    pub fn set_watchlists<T, V>(mut self, v: T) -> Self
13148    where
13149        T: std::iter::IntoIterator<Item = V>,
13150        V: std::convert::Into<crate::model::Watchlist>,
13151    {
13152        use std::iter::Iterator;
13153        self.watchlists = v.into_iter().map(|i| i.into()).collect();
13154        self
13155    }
13156
13157    /// Sets the value of [next_page_token][crate::model::ListWatchlistsResponse::next_page_token].
13158    ///
13159    /// # Example
13160    /// ```ignore,no_run
13161    /// # use google_cloud_chronicle_v1::model::ListWatchlistsResponse;
13162    /// let x = ListWatchlistsResponse::new().set_next_page_token("example");
13163    /// ```
13164    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13165        self.next_page_token = v.into();
13166        self
13167    }
13168}
13169
13170impl wkt::message::Message for ListWatchlistsResponse {
13171    fn typename() -> &'static str {
13172        "type.googleapis.com/google.cloud.chronicle.v1.ListWatchlistsResponse"
13173    }
13174}
13175
13176#[doc(hidden)]
13177impl google_cloud_gax::paginator::internal::PageableResponse for ListWatchlistsResponse {
13178    type PageItem = crate::model::Watchlist;
13179
13180    fn items(self) -> std::vec::Vec<Self::PageItem> {
13181        self.watchlists
13182    }
13183
13184    fn next_page_token(&self) -> std::string::String {
13185        use std::clone::Clone;
13186        self.next_page_token.clone()
13187    }
13188}
13189
13190/// Request message for creating watchlist.
13191#[derive(Clone, Default, PartialEq)]
13192#[non_exhaustive]
13193pub struct CreateWatchlistRequest {
13194    /// Required. The parent resource where this watchlist will be created.
13195    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
13196    pub parent: std::string::String,
13197
13198    /// Optional. The ID to use for the watchlist,
13199    /// which will become the final component of the watchlist's resource name.
13200    ///
13201    /// This value should be 4-63 characters, and valid characters
13202    /// are /[a-z][0-9]-/.
13203    pub watchlist_id: std::string::String,
13204
13205    /// Required. The watchlist to create.
13206    pub watchlist: std::option::Option<crate::model::Watchlist>,
13207
13208    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13209}
13210
13211impl CreateWatchlistRequest {
13212    /// Creates a new default instance.
13213    pub fn new() -> Self {
13214        std::default::Default::default()
13215    }
13216
13217    /// Sets the value of [parent][crate::model::CreateWatchlistRequest::parent].
13218    ///
13219    /// # Example
13220    /// ```ignore,no_run
13221    /// # use google_cloud_chronicle_v1::model::CreateWatchlistRequest;
13222    /// # let project_id = "project_id";
13223    /// # let location_id = "location_id";
13224    /// # let instance_id = "instance_id";
13225    /// let x = CreateWatchlistRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
13226    /// ```
13227    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13228        self.parent = v.into();
13229        self
13230    }
13231
13232    /// Sets the value of [watchlist_id][crate::model::CreateWatchlistRequest::watchlist_id].
13233    ///
13234    /// # Example
13235    /// ```ignore,no_run
13236    /// # use google_cloud_chronicle_v1::model::CreateWatchlistRequest;
13237    /// let x = CreateWatchlistRequest::new().set_watchlist_id("example");
13238    /// ```
13239    pub fn set_watchlist_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13240        self.watchlist_id = v.into();
13241        self
13242    }
13243
13244    /// Sets the value of [watchlist][crate::model::CreateWatchlistRequest::watchlist].
13245    ///
13246    /// # Example
13247    /// ```ignore,no_run
13248    /// # use google_cloud_chronicle_v1::model::CreateWatchlistRequest;
13249    /// use google_cloud_chronicle_v1::model::Watchlist;
13250    /// let x = CreateWatchlistRequest::new().set_watchlist(Watchlist::default()/* use setters */);
13251    /// ```
13252    pub fn set_watchlist<T>(mut self, v: T) -> Self
13253    where
13254        T: std::convert::Into<crate::model::Watchlist>,
13255    {
13256        self.watchlist = std::option::Option::Some(v.into());
13257        self
13258    }
13259
13260    /// Sets or clears the value of [watchlist][crate::model::CreateWatchlistRequest::watchlist].
13261    ///
13262    /// # Example
13263    /// ```ignore,no_run
13264    /// # use google_cloud_chronicle_v1::model::CreateWatchlistRequest;
13265    /// use google_cloud_chronicle_v1::model::Watchlist;
13266    /// let x = CreateWatchlistRequest::new().set_or_clear_watchlist(Some(Watchlist::default()/* use setters */));
13267    /// let x = CreateWatchlistRequest::new().set_or_clear_watchlist(None::<Watchlist>);
13268    /// ```
13269    pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
13270    where
13271        T: std::convert::Into<crate::model::Watchlist>,
13272    {
13273        self.watchlist = v.map(|x| x.into());
13274        self
13275    }
13276}
13277
13278impl wkt::message::Message for CreateWatchlistRequest {
13279    fn typename() -> &'static str {
13280        "type.googleapis.com/google.cloud.chronicle.v1.CreateWatchlistRequest"
13281    }
13282}
13283
13284/// Request message for updating watchlist.
13285#[derive(Clone, Default, PartialEq)]
13286#[non_exhaustive]
13287pub struct UpdateWatchlistRequest {
13288    /// Required. The watchlist to update.
13289    ///
13290    /// The watchlist's `name` field is used to identify the watchlist to update.
13291    /// Format:
13292    /// `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}`
13293    pub watchlist: std::option::Option<crate::model::Watchlist>,
13294
13295    /// Optional. The list of fields to update.
13296    pub update_mask: std::option::Option<wkt::FieldMask>,
13297
13298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13299}
13300
13301impl UpdateWatchlistRequest {
13302    /// Creates a new default instance.
13303    pub fn new() -> Self {
13304        std::default::Default::default()
13305    }
13306
13307    /// Sets the value of [watchlist][crate::model::UpdateWatchlistRequest::watchlist].
13308    ///
13309    /// # Example
13310    /// ```ignore,no_run
13311    /// # use google_cloud_chronicle_v1::model::UpdateWatchlistRequest;
13312    /// use google_cloud_chronicle_v1::model::Watchlist;
13313    /// let x = UpdateWatchlistRequest::new().set_watchlist(Watchlist::default()/* use setters */);
13314    /// ```
13315    pub fn set_watchlist<T>(mut self, v: T) -> Self
13316    where
13317        T: std::convert::Into<crate::model::Watchlist>,
13318    {
13319        self.watchlist = std::option::Option::Some(v.into());
13320        self
13321    }
13322
13323    /// Sets or clears the value of [watchlist][crate::model::UpdateWatchlistRequest::watchlist].
13324    ///
13325    /// # Example
13326    /// ```ignore,no_run
13327    /// # use google_cloud_chronicle_v1::model::UpdateWatchlistRequest;
13328    /// use google_cloud_chronicle_v1::model::Watchlist;
13329    /// let x = UpdateWatchlistRequest::new().set_or_clear_watchlist(Some(Watchlist::default()/* use setters */));
13330    /// let x = UpdateWatchlistRequest::new().set_or_clear_watchlist(None::<Watchlist>);
13331    /// ```
13332    pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
13333    where
13334        T: std::convert::Into<crate::model::Watchlist>,
13335    {
13336        self.watchlist = v.map(|x| x.into());
13337        self
13338    }
13339
13340    /// Sets the value of [update_mask][crate::model::UpdateWatchlistRequest::update_mask].
13341    ///
13342    /// # Example
13343    /// ```ignore,no_run
13344    /// # use google_cloud_chronicle_v1::model::UpdateWatchlistRequest;
13345    /// use wkt::FieldMask;
13346    /// let x = UpdateWatchlistRequest::new().set_update_mask(FieldMask::default()/* use setters */);
13347    /// ```
13348    pub fn set_update_mask<T>(mut self, v: T) -> Self
13349    where
13350        T: std::convert::Into<wkt::FieldMask>,
13351    {
13352        self.update_mask = std::option::Option::Some(v.into());
13353        self
13354    }
13355
13356    /// Sets or clears the value of [update_mask][crate::model::UpdateWatchlistRequest::update_mask].
13357    ///
13358    /// # Example
13359    /// ```ignore,no_run
13360    /// # use google_cloud_chronicle_v1::model::UpdateWatchlistRequest;
13361    /// use wkt::FieldMask;
13362    /// let x = UpdateWatchlistRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
13363    /// let x = UpdateWatchlistRequest::new().set_or_clear_update_mask(None::<FieldMask>);
13364    /// ```
13365    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13366    where
13367        T: std::convert::Into<wkt::FieldMask>,
13368    {
13369        self.update_mask = v.map(|x| x.into());
13370        self
13371    }
13372}
13373
13374impl wkt::message::Message for UpdateWatchlistRequest {
13375    fn typename() -> &'static str {
13376        "type.googleapis.com/google.cloud.chronicle.v1.UpdateWatchlistRequest"
13377    }
13378}
13379
13380/// Request message for deleting watchlist.
13381#[derive(Clone, Default, PartialEq)]
13382#[non_exhaustive]
13383pub struct DeleteWatchlistRequest {
13384    /// Required. The name of the watchlist to delete.
13385    /// Format:
13386    /// `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}`
13387    pub name: std::string::String,
13388
13389    /// Optional. If set to true, any entities under this watchlist will also be
13390    /// deleted. (Otherwise, the request will only work if the watchlist has no
13391    /// entities.)
13392    pub force: bool,
13393
13394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13395}
13396
13397impl DeleteWatchlistRequest {
13398    /// Creates a new default instance.
13399    pub fn new() -> Self {
13400        std::default::Default::default()
13401    }
13402
13403    /// Sets the value of [name][crate::model::DeleteWatchlistRequest::name].
13404    ///
13405    /// # Example
13406    /// ```ignore,no_run
13407    /// # use google_cloud_chronicle_v1::model::DeleteWatchlistRequest;
13408    /// # let project_id = "project_id";
13409    /// # let location_id = "location_id";
13410    /// # let instance_id = "instance_id";
13411    /// # let watchlist_id = "watchlist_id";
13412    /// let x = DeleteWatchlistRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/watchlists/{watchlist_id}"));
13413    /// ```
13414    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13415        self.name = v.into();
13416        self
13417    }
13418
13419    /// Sets the value of [force][crate::model::DeleteWatchlistRequest::force].
13420    ///
13421    /// # Example
13422    /// ```ignore,no_run
13423    /// # use google_cloud_chronicle_v1::model::DeleteWatchlistRequest;
13424    /// let x = DeleteWatchlistRequest::new().set_force(true);
13425    /// ```
13426    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13427        self.force = v.into();
13428        self
13429    }
13430}
13431
13432impl wkt::message::Message for DeleteWatchlistRequest {
13433    fn typename() -> &'static str {
13434        "type.googleapis.com/google.cloud.chronicle.v1.DeleteWatchlistRequest"
13435    }
13436}
13437
13438/// FeaturedContentMetadata holds metadata about the Featured Content.
13439#[derive(Clone, Default, PartialEq)]
13440#[non_exhaustive]
13441pub struct FeaturedContentMetadata {
13442    /// Required. Unique identifier of the featured content.
13443    pub id: std::string::String,
13444
13445    /// Output only. The display name of the featured content.
13446    pub display_name: std::string::String,
13447
13448    /// Output only. Timestamp indicating when the item was created.
13449    pub create_time: std::option::Option<wkt::Timestamp>,
13450
13451    /// Output only. Timestamp indicating when the item was updated.
13452    pub update_time: std::option::Option<wkt::Timestamp>,
13453
13454    /// Output only. Content item author full name.
13455    pub author: std::string::String,
13456
13457    /// Output only. Determine if this content item is officially certified by
13458    /// Google or created by the community.
13459    pub certified: bool,
13460
13461    /// Output only. The description of the content item.
13462    pub description: std::string::String,
13463
13464    /// Output only. Categories the content is associated with.
13465    pub categories: std::vec::Vec<std::string::String>,
13466
13467    /// Output only. Featured content version (Major.Minor.Patch).
13468    pub version: std::string::String,
13469
13470    /// Output only. Whether the content is verified by Google (applicable for 3rd
13471    /// party content).
13472    pub verified: std::option::Option<bool>,
13473
13474    /// Output only. The source type of the content.
13475    pub source_type: crate::model::featured_content_metadata::ContentSourceType,
13476
13477    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13478}
13479
13480impl FeaturedContentMetadata {
13481    /// Creates a new default instance.
13482    pub fn new() -> Self {
13483        std::default::Default::default()
13484    }
13485
13486    /// Sets the value of [id][crate::model::FeaturedContentMetadata::id].
13487    ///
13488    /// # Example
13489    /// ```ignore,no_run
13490    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13491    /// let x = FeaturedContentMetadata::new().set_id("example");
13492    /// ```
13493    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13494        self.id = v.into();
13495        self
13496    }
13497
13498    /// Sets the value of [display_name][crate::model::FeaturedContentMetadata::display_name].
13499    ///
13500    /// # Example
13501    /// ```ignore,no_run
13502    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13503    /// let x = FeaturedContentMetadata::new().set_display_name("example");
13504    /// ```
13505    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13506        self.display_name = v.into();
13507        self
13508    }
13509
13510    /// Sets the value of [create_time][crate::model::FeaturedContentMetadata::create_time].
13511    ///
13512    /// # Example
13513    /// ```ignore,no_run
13514    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13515    /// use wkt::Timestamp;
13516    /// let x = FeaturedContentMetadata::new().set_create_time(Timestamp::default()/* use setters */);
13517    /// ```
13518    pub fn set_create_time<T>(mut self, v: T) -> Self
13519    where
13520        T: std::convert::Into<wkt::Timestamp>,
13521    {
13522        self.create_time = std::option::Option::Some(v.into());
13523        self
13524    }
13525
13526    /// Sets or clears the value of [create_time][crate::model::FeaturedContentMetadata::create_time].
13527    ///
13528    /// # Example
13529    /// ```ignore,no_run
13530    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13531    /// use wkt::Timestamp;
13532    /// let x = FeaturedContentMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13533    /// let x = FeaturedContentMetadata::new().set_or_clear_create_time(None::<Timestamp>);
13534    /// ```
13535    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13536    where
13537        T: std::convert::Into<wkt::Timestamp>,
13538    {
13539        self.create_time = v.map(|x| x.into());
13540        self
13541    }
13542
13543    /// Sets the value of [update_time][crate::model::FeaturedContentMetadata::update_time].
13544    ///
13545    /// # Example
13546    /// ```ignore,no_run
13547    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13548    /// use wkt::Timestamp;
13549    /// let x = FeaturedContentMetadata::new().set_update_time(Timestamp::default()/* use setters */);
13550    /// ```
13551    pub fn set_update_time<T>(mut self, v: T) -> Self
13552    where
13553        T: std::convert::Into<wkt::Timestamp>,
13554    {
13555        self.update_time = std::option::Option::Some(v.into());
13556        self
13557    }
13558
13559    /// Sets or clears the value of [update_time][crate::model::FeaturedContentMetadata::update_time].
13560    ///
13561    /// # Example
13562    /// ```ignore,no_run
13563    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13564    /// use wkt::Timestamp;
13565    /// let x = FeaturedContentMetadata::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
13566    /// let x = FeaturedContentMetadata::new().set_or_clear_update_time(None::<Timestamp>);
13567    /// ```
13568    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13569    where
13570        T: std::convert::Into<wkt::Timestamp>,
13571    {
13572        self.update_time = v.map(|x| x.into());
13573        self
13574    }
13575
13576    /// Sets the value of [author][crate::model::FeaturedContentMetadata::author].
13577    ///
13578    /// # Example
13579    /// ```ignore,no_run
13580    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13581    /// let x = FeaturedContentMetadata::new().set_author("example");
13582    /// ```
13583    pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13584        self.author = v.into();
13585        self
13586    }
13587
13588    /// Sets the value of [certified][crate::model::FeaturedContentMetadata::certified].
13589    ///
13590    /// # Example
13591    /// ```ignore,no_run
13592    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13593    /// let x = FeaturedContentMetadata::new().set_certified(true);
13594    /// ```
13595    pub fn set_certified<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13596        self.certified = v.into();
13597        self
13598    }
13599
13600    /// Sets the value of [description][crate::model::FeaturedContentMetadata::description].
13601    ///
13602    /// # Example
13603    /// ```ignore,no_run
13604    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13605    /// let x = FeaturedContentMetadata::new().set_description("example");
13606    /// ```
13607    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13608        self.description = v.into();
13609        self
13610    }
13611
13612    /// Sets the value of [categories][crate::model::FeaturedContentMetadata::categories].
13613    ///
13614    /// # Example
13615    /// ```ignore,no_run
13616    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13617    /// let x = FeaturedContentMetadata::new().set_categories(["a", "b", "c"]);
13618    /// ```
13619    pub fn set_categories<T, V>(mut self, v: T) -> Self
13620    where
13621        T: std::iter::IntoIterator<Item = V>,
13622        V: std::convert::Into<std::string::String>,
13623    {
13624        use std::iter::Iterator;
13625        self.categories = v.into_iter().map(|i| i.into()).collect();
13626        self
13627    }
13628
13629    /// Sets the value of [version][crate::model::FeaturedContentMetadata::version].
13630    ///
13631    /// # Example
13632    /// ```ignore,no_run
13633    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13634    /// let x = FeaturedContentMetadata::new().set_version("example");
13635    /// ```
13636    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13637        self.version = v.into();
13638        self
13639    }
13640
13641    /// Sets the value of [verified][crate::model::FeaturedContentMetadata::verified].
13642    ///
13643    /// # Example
13644    /// ```ignore,no_run
13645    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13646    /// let x = FeaturedContentMetadata::new().set_verified(true);
13647    /// ```
13648    pub fn set_verified<T>(mut self, v: T) -> Self
13649    where
13650        T: std::convert::Into<bool>,
13651    {
13652        self.verified = std::option::Option::Some(v.into());
13653        self
13654    }
13655
13656    /// Sets or clears the value of [verified][crate::model::FeaturedContentMetadata::verified].
13657    ///
13658    /// # Example
13659    /// ```ignore,no_run
13660    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13661    /// let x = FeaturedContentMetadata::new().set_or_clear_verified(Some(false));
13662    /// let x = FeaturedContentMetadata::new().set_or_clear_verified(None::<bool>);
13663    /// ```
13664    pub fn set_or_clear_verified<T>(mut self, v: std::option::Option<T>) -> Self
13665    where
13666        T: std::convert::Into<bool>,
13667    {
13668        self.verified = v.map(|x| x.into());
13669        self
13670    }
13671
13672    /// Sets the value of [source_type][crate::model::FeaturedContentMetadata::source_type].
13673    ///
13674    /// # Example
13675    /// ```ignore,no_run
13676    /// # use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13677    /// use google_cloud_chronicle_v1::model::featured_content_metadata::ContentSourceType;
13678    /// let x0 = FeaturedContentMetadata::new().set_source_type(ContentSourceType::Google);
13679    /// let x1 = FeaturedContentMetadata::new().set_source_type(ContentSourceType::Community);
13680    /// let x2 = FeaturedContentMetadata::new().set_source_type(ContentSourceType::Partner);
13681    /// ```
13682    pub fn set_source_type<
13683        T: std::convert::Into<crate::model::featured_content_metadata::ContentSourceType>,
13684    >(
13685        mut self,
13686        v: T,
13687    ) -> Self {
13688        self.source_type = v.into();
13689        self
13690    }
13691}
13692
13693impl wkt::message::Message for FeaturedContentMetadata {
13694    fn typename() -> &'static str {
13695        "type.googleapis.com/google.cloud.chronicle.v1.FeaturedContentMetadata"
13696    }
13697}
13698
13699/// Defines additional types related to [FeaturedContentMetadata].
13700pub mod featured_content_metadata {
13701    #[allow(unused_imports)]
13702    use super::*;
13703
13704    /// ContentSourceType specifying the content source of origin
13705    ///
13706    /// # Working with unknown values
13707    ///
13708    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13709    /// additional enum variants at any time. Adding new variants is not considered
13710    /// a breaking change. Applications should write their code in anticipation of:
13711    ///
13712    /// - New values appearing in future releases of the client library, **and**
13713    /// - New values received dynamically, without application changes.
13714    ///
13715    /// Please consult the [Working with enums] section in the user guide for some
13716    /// guidelines.
13717    ///
13718    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13719    #[derive(Clone, Debug, PartialEq)]
13720    #[non_exhaustive]
13721    pub enum ContentSourceType {
13722        /// Unspecified content source type
13723        Unspecified,
13724        /// Certified Google content source type
13725        Google,
13726        /// Community content source type
13727        Community,
13728        /// Partner content source type
13729        Partner,
13730        /// If set, the enum was initialized with an unknown value.
13731        ///
13732        /// Applications can examine the value using [ContentSourceType::value] or
13733        /// [ContentSourceType::name].
13734        UnknownValue(content_source_type::UnknownValue),
13735    }
13736
13737    #[doc(hidden)]
13738    pub mod content_source_type {
13739        #[allow(unused_imports)]
13740        use super::*;
13741        #[derive(Clone, Debug, PartialEq)]
13742        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13743    }
13744
13745    impl ContentSourceType {
13746        /// Gets the enum value.
13747        ///
13748        /// Returns `None` if the enum contains an unknown value deserialized from
13749        /// the string representation of enums.
13750        pub fn value(&self) -> std::option::Option<i32> {
13751            match self {
13752                Self::Unspecified => std::option::Option::Some(0),
13753                Self::Google => std::option::Option::Some(1),
13754                Self::Community => std::option::Option::Some(2),
13755                Self::Partner => std::option::Option::Some(3),
13756                Self::UnknownValue(u) => u.0.value(),
13757            }
13758        }
13759
13760        /// Gets the enum value as a string.
13761        ///
13762        /// Returns `None` if the enum contains an unknown value deserialized from
13763        /// the integer representation of enums.
13764        pub fn name(&self) -> std::option::Option<&str> {
13765            match self {
13766                Self::Unspecified => std::option::Option::Some("CONTENT_SOURCE_TYPE_UNSPECIFIED"),
13767                Self::Google => std::option::Option::Some("GOOGLE"),
13768                Self::Community => std::option::Option::Some("COMMUNITY"),
13769                Self::Partner => std::option::Option::Some("PARTNER"),
13770                Self::UnknownValue(u) => u.0.name(),
13771            }
13772        }
13773    }
13774
13775    impl std::default::Default for ContentSourceType {
13776        fn default() -> Self {
13777            use std::convert::From;
13778            Self::from(0)
13779        }
13780    }
13781
13782    impl std::fmt::Display for ContentSourceType {
13783        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13784            wkt::internal::display_enum(f, self.name(), self.value())
13785        }
13786    }
13787
13788    impl std::convert::From<i32> for ContentSourceType {
13789        fn from(value: i32) -> Self {
13790            match value {
13791                0 => Self::Unspecified,
13792                1 => Self::Google,
13793                2 => Self::Community,
13794                3 => Self::Partner,
13795                _ => Self::UnknownValue(content_source_type::UnknownValue(
13796                    wkt::internal::UnknownEnumValue::Integer(value),
13797                )),
13798            }
13799        }
13800    }
13801
13802    impl std::convert::From<&str> for ContentSourceType {
13803        fn from(value: &str) -> Self {
13804            use std::string::ToString;
13805            match value {
13806                "CONTENT_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
13807                "GOOGLE" => Self::Google,
13808                "COMMUNITY" => Self::Community,
13809                "PARTNER" => Self::Partner,
13810                _ => Self::UnknownValue(content_source_type::UnknownValue(
13811                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13812                )),
13813            }
13814        }
13815    }
13816
13817    impl serde::ser::Serialize for ContentSourceType {
13818        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13819        where
13820            S: serde::Serializer,
13821        {
13822            match self {
13823                Self::Unspecified => serializer.serialize_i32(0),
13824                Self::Google => serializer.serialize_i32(1),
13825                Self::Community => serializer.serialize_i32(2),
13826                Self::Partner => serializer.serialize_i32(3),
13827                Self::UnknownValue(u) => u.0.serialize(serializer),
13828            }
13829        }
13830    }
13831
13832    impl<'de> serde::de::Deserialize<'de> for ContentSourceType {
13833        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13834        where
13835            D: serde::Deserializer<'de>,
13836        {
13837            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentSourceType>::new(
13838                ".google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType",
13839            ))
13840        }
13841    }
13842}
13843
13844/// FeaturedContentNativeDashboard resource.
13845#[derive(Clone, Default, PartialEq)]
13846#[non_exhaustive]
13847pub struct FeaturedContentNativeDashboard {
13848    /// Identifier. The resource name of the FeaturedContentNativeDashboard.
13849    /// Format:
13850    /// projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}
13851    pub name: std::string::String,
13852
13853    /// Output only. Metadata about the FeaturedContentNativeDashboard.
13854    pub content_metadata: std::option::Option<crate::model::FeaturedContentMetadata>,
13855
13856    /// Optional. The dashboard content.
13857    pub dashboard_content: std::option::Option<crate::model::NativeDashboardWithChartsAndQueries>,
13858
13859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13860}
13861
13862impl FeaturedContentNativeDashboard {
13863    /// Creates a new default instance.
13864    pub fn new() -> Self {
13865        std::default::Default::default()
13866    }
13867
13868    /// Sets the value of [name][crate::model::FeaturedContentNativeDashboard::name].
13869    ///
13870    /// # Example
13871    /// ```ignore,no_run
13872    /// # use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
13873    /// # let project_id = "project_id";
13874    /// # let location_id = "location_id";
13875    /// # let instance_id = "instance_id";
13876    /// # let featured_content_native_dashboard_id = "featured_content_native_dashboard_id";
13877    /// let x = FeaturedContentNativeDashboard::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard_id}"));
13878    /// ```
13879    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13880        self.name = v.into();
13881        self
13882    }
13883
13884    /// Sets the value of [content_metadata][crate::model::FeaturedContentNativeDashboard::content_metadata].
13885    ///
13886    /// # Example
13887    /// ```ignore,no_run
13888    /// # use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
13889    /// use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13890    /// let x = FeaturedContentNativeDashboard::new().set_content_metadata(FeaturedContentMetadata::default()/* use setters */);
13891    /// ```
13892    pub fn set_content_metadata<T>(mut self, v: T) -> Self
13893    where
13894        T: std::convert::Into<crate::model::FeaturedContentMetadata>,
13895    {
13896        self.content_metadata = std::option::Option::Some(v.into());
13897        self
13898    }
13899
13900    /// Sets or clears the value of [content_metadata][crate::model::FeaturedContentNativeDashboard::content_metadata].
13901    ///
13902    /// # Example
13903    /// ```ignore,no_run
13904    /// # use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
13905    /// use google_cloud_chronicle_v1::model::FeaturedContentMetadata;
13906    /// let x = FeaturedContentNativeDashboard::new().set_or_clear_content_metadata(Some(FeaturedContentMetadata::default()/* use setters */));
13907    /// let x = FeaturedContentNativeDashboard::new().set_or_clear_content_metadata(None::<FeaturedContentMetadata>);
13908    /// ```
13909    pub fn set_or_clear_content_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13910    where
13911        T: std::convert::Into<crate::model::FeaturedContentMetadata>,
13912    {
13913        self.content_metadata = v.map(|x| x.into());
13914        self
13915    }
13916
13917    /// Sets the value of [dashboard_content][crate::model::FeaturedContentNativeDashboard::dashboard_content].
13918    ///
13919    /// # Example
13920    /// ```ignore,no_run
13921    /// # use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
13922    /// use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
13923    /// let x = FeaturedContentNativeDashboard::new().set_dashboard_content(NativeDashboardWithChartsAndQueries::default()/* use setters */);
13924    /// ```
13925    pub fn set_dashboard_content<T>(mut self, v: T) -> Self
13926    where
13927        T: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
13928    {
13929        self.dashboard_content = std::option::Option::Some(v.into());
13930        self
13931    }
13932
13933    /// Sets or clears the value of [dashboard_content][crate::model::FeaturedContentNativeDashboard::dashboard_content].
13934    ///
13935    /// # Example
13936    /// ```ignore,no_run
13937    /// # use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
13938    /// use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
13939    /// let x = FeaturedContentNativeDashboard::new().set_or_clear_dashboard_content(Some(NativeDashboardWithChartsAndQueries::default()/* use setters */));
13940    /// let x = FeaturedContentNativeDashboard::new().set_or_clear_dashboard_content(None::<NativeDashboardWithChartsAndQueries>);
13941    /// ```
13942    pub fn set_or_clear_dashboard_content<T>(mut self, v: std::option::Option<T>) -> Self
13943    where
13944        T: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
13945    {
13946        self.dashboard_content = v.map(|x| x.into());
13947        self
13948    }
13949}
13950
13951impl wkt::message::Message for FeaturedContentNativeDashboard {
13952    fn typename() -> &'static str {
13953        "type.googleapis.com/google.cloud.chronicle.v1.FeaturedContentNativeDashboard"
13954    }
13955}
13956
13957/// Request message to get a FeaturedContentNativeDashboard.
13958#[derive(Clone, Default, PartialEq)]
13959#[non_exhaustive]
13960pub struct GetFeaturedContentNativeDashboardRequest {
13961    /// Required. The resource name of the FeaturedContentNativeDashboard to
13962    /// retrieve. Format:
13963    /// projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}
13964    pub name: std::string::String,
13965
13966    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13967}
13968
13969impl GetFeaturedContentNativeDashboardRequest {
13970    /// Creates a new default instance.
13971    pub fn new() -> Self {
13972        std::default::Default::default()
13973    }
13974
13975    /// Sets the value of [name][crate::model::GetFeaturedContentNativeDashboardRequest::name].
13976    ///
13977    /// # Example
13978    /// ```ignore,no_run
13979    /// # use google_cloud_chronicle_v1::model::GetFeaturedContentNativeDashboardRequest;
13980    /// # let project_id = "project_id";
13981    /// # let location_id = "location_id";
13982    /// # let instance_id = "instance_id";
13983    /// # let featured_content_native_dashboard_id = "featured_content_native_dashboard_id";
13984    /// let x = GetFeaturedContentNativeDashboardRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard_id}"));
13985    /// ```
13986    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13987        self.name = v.into();
13988        self
13989    }
13990}
13991
13992impl wkt::message::Message for GetFeaturedContentNativeDashboardRequest {
13993    fn typename() -> &'static str {
13994        "type.googleapis.com/google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest"
13995    }
13996}
13997
13998/// Request message to list FeaturedContentNativeDashboards.
13999#[derive(Clone, Default, PartialEq)]
14000#[non_exhaustive]
14001pub struct ListFeaturedContentNativeDashboardsRequest {
14002    /// Required. The parent, which owns this collection of
14003    /// FeaturedContentNativeDashboards. Format:
14004    /// projects/{project}/locations/{location}/instances/{instance}/contentHub
14005    pub parent: std::string::String,
14006
14007    /// Optional. The maximum number of FeaturedContentNativeDashboards to return.
14008    /// The service may return fewer than this value. If unspecified, at most 100
14009    /// FeaturedContentNativeDashboards will be returned. The maximum value is 100;
14010    /// values above 100 will be coerced to 100.
14011    pub page_size: i32,
14012
14013    /// Optional. A page token, received from a previous
14014    /// `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the
14015    /// subsequent page.
14016    ///
14017    /// When paginating, all other parameters provided to
14018    /// `ListFeaturedContentNativeDashboards` must match the call that provided the
14019    /// page token.
14020    pub page_token: std::string::String,
14021
14022    /// Optional. The filter to apply to list the FeaturedContentNativeDashboards.
14023    ///
14024    /// The filter syntax follows Google Cloud syntax: <https://google.aip.dev/160>.
14025    ///
14026    /// Supported fields for filtering:
14027    ///
14028    /// * `name`: The resource name of the featured content.
14029    /// * `content_metadata.description`: The description of the featured
14030    ///   content.
14031    ///
14032    /// When a literal value is provided without a field, it will perform a
14033    /// substring search across both `name` and `content_metadata.description`.
14034    ///
14035    /// Examples:
14036    ///
14037    /// * `"test"`: Matches featured content where either the name or description
14038    ///   contains "test" as a substring.
14039    /// * `name="test"`: Matches featured content where the name contains "test".
14040    /// * `content_metadata.description="test"`: Matches featured content where
14041    ///   the description contains "test".
14042    pub filter: std::string::String,
14043
14044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14045}
14046
14047impl ListFeaturedContentNativeDashboardsRequest {
14048    /// Creates a new default instance.
14049    pub fn new() -> Self {
14050        std::default::Default::default()
14051    }
14052
14053    /// Sets the value of [parent][crate::model::ListFeaturedContentNativeDashboardsRequest::parent].
14054    ///
14055    /// # Example
14056    /// ```ignore,no_run
14057    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsRequest;
14058    /// # let project_id = "project_id";
14059    /// # let location_id = "location_id";
14060    /// # let instance_id = "instance_id";
14061    /// let x = ListFeaturedContentNativeDashboardsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub"));
14062    /// ```
14063    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14064        self.parent = v.into();
14065        self
14066    }
14067
14068    /// Sets the value of [page_size][crate::model::ListFeaturedContentNativeDashboardsRequest::page_size].
14069    ///
14070    /// # Example
14071    /// ```ignore,no_run
14072    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsRequest;
14073    /// let x = ListFeaturedContentNativeDashboardsRequest::new().set_page_size(42);
14074    /// ```
14075    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14076        self.page_size = v.into();
14077        self
14078    }
14079
14080    /// Sets the value of [page_token][crate::model::ListFeaturedContentNativeDashboardsRequest::page_token].
14081    ///
14082    /// # Example
14083    /// ```ignore,no_run
14084    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsRequest;
14085    /// let x = ListFeaturedContentNativeDashboardsRequest::new().set_page_token("example");
14086    /// ```
14087    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14088        self.page_token = v.into();
14089        self
14090    }
14091
14092    /// Sets the value of [filter][crate::model::ListFeaturedContentNativeDashboardsRequest::filter].
14093    ///
14094    /// # Example
14095    /// ```ignore,no_run
14096    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsRequest;
14097    /// let x = ListFeaturedContentNativeDashboardsRequest::new().set_filter("example");
14098    /// ```
14099    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14100        self.filter = v.into();
14101        self
14102    }
14103}
14104
14105impl wkt::message::Message for ListFeaturedContentNativeDashboardsRequest {
14106    fn typename() -> &'static str {
14107        "type.googleapis.com/google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest"
14108    }
14109}
14110
14111/// Response message for listing FeaturedContentNativeDashboards.
14112#[derive(Clone, Default, PartialEq)]
14113#[non_exhaustive]
14114pub struct ListFeaturedContentNativeDashboardsResponse {
14115    /// The list of FeaturedContentNativeDashboards.
14116    /// Ordered by name by default.
14117    pub featured_content_native_dashboards:
14118        std::vec::Vec<crate::model::FeaturedContentNativeDashboard>,
14119
14120    /// A token, which can be sent as `page_token` to retrieve the next page.
14121    /// If this field is omitted, there are no subsequent pages.
14122    pub next_page_token: std::string::String,
14123
14124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14125}
14126
14127impl ListFeaturedContentNativeDashboardsResponse {
14128    /// Creates a new default instance.
14129    pub fn new() -> Self {
14130        std::default::Default::default()
14131    }
14132
14133    /// Sets the value of [featured_content_native_dashboards][crate::model::ListFeaturedContentNativeDashboardsResponse::featured_content_native_dashboards].
14134    ///
14135    /// # Example
14136    /// ```ignore,no_run
14137    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsResponse;
14138    /// use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
14139    /// let x = ListFeaturedContentNativeDashboardsResponse::new()
14140    ///     .set_featured_content_native_dashboards([
14141    ///         FeaturedContentNativeDashboard::default()/* use setters */,
14142    ///         FeaturedContentNativeDashboard::default()/* use (different) setters */,
14143    ///     ]);
14144    /// ```
14145    pub fn set_featured_content_native_dashboards<T, V>(mut self, v: T) -> Self
14146    where
14147        T: std::iter::IntoIterator<Item = V>,
14148        V: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
14149    {
14150        use std::iter::Iterator;
14151        self.featured_content_native_dashboards = v.into_iter().map(|i| i.into()).collect();
14152        self
14153    }
14154
14155    /// Sets the value of [next_page_token][crate::model::ListFeaturedContentNativeDashboardsResponse::next_page_token].
14156    ///
14157    /// # Example
14158    /// ```ignore,no_run
14159    /// # use google_cloud_chronicle_v1::model::ListFeaturedContentNativeDashboardsResponse;
14160    /// let x = ListFeaturedContentNativeDashboardsResponse::new().set_next_page_token("example");
14161    /// ```
14162    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14163        self.next_page_token = v.into();
14164        self
14165    }
14166}
14167
14168impl wkt::message::Message for ListFeaturedContentNativeDashboardsResponse {
14169    fn typename() -> &'static str {
14170        "type.googleapis.com/google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse"
14171    }
14172}
14173
14174#[doc(hidden)]
14175impl google_cloud_gax::paginator::internal::PageableResponse
14176    for ListFeaturedContentNativeDashboardsResponse
14177{
14178    type PageItem = crate::model::FeaturedContentNativeDashboard;
14179
14180    fn items(self) -> std::vec::Vec<Self::PageItem> {
14181        self.featured_content_native_dashboards
14182    }
14183
14184    fn next_page_token(&self) -> std::string::String {
14185        use std::clone::Clone;
14186        self.next_page_token.clone()
14187    }
14188}
14189
14190/// Request message to install a FeaturedContentNativeDashboard.
14191#[derive(Clone, Default, PartialEq)]
14192#[non_exhaustive]
14193pub struct InstallFeaturedContentNativeDashboardRequest {
14194    /// Required. The resource name of the FeaturedContentNativeDashboard to
14195    /// install. Format:
14196    /// projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}
14197    pub name: std::string::String,
14198
14199    /// Optional. The FeaturedContentNativeDashboard to install.
14200    pub featured_content_native_dashboard:
14201        std::option::Option<crate::model::FeaturedContentNativeDashboard>,
14202
14203    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14204}
14205
14206impl InstallFeaturedContentNativeDashboardRequest {
14207    /// Creates a new default instance.
14208    pub fn new() -> Self {
14209        std::default::Default::default()
14210    }
14211
14212    /// Sets the value of [name][crate::model::InstallFeaturedContentNativeDashboardRequest::name].
14213    ///
14214    /// # Example
14215    /// ```ignore,no_run
14216    /// # use google_cloud_chronicle_v1::model::InstallFeaturedContentNativeDashboardRequest;
14217    /// # let project_id = "project_id";
14218    /// # let location_id = "location_id";
14219    /// # let instance_id = "instance_id";
14220    /// # let featured_content_native_dashboard_id = "featured_content_native_dashboard_id";
14221    /// let x = InstallFeaturedContentNativeDashboardRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard_id}"));
14222    /// ```
14223    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14224        self.name = v.into();
14225        self
14226    }
14227
14228    /// Sets the value of [featured_content_native_dashboard][crate::model::InstallFeaturedContentNativeDashboardRequest::featured_content_native_dashboard].
14229    ///
14230    /// # Example
14231    /// ```ignore,no_run
14232    /// # use google_cloud_chronicle_v1::model::InstallFeaturedContentNativeDashboardRequest;
14233    /// use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
14234    /// let x = InstallFeaturedContentNativeDashboardRequest::new().set_featured_content_native_dashboard(FeaturedContentNativeDashboard::default()/* use setters */);
14235    /// ```
14236    pub fn set_featured_content_native_dashboard<T>(mut self, v: T) -> Self
14237    where
14238        T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
14239    {
14240        self.featured_content_native_dashboard = std::option::Option::Some(v.into());
14241        self
14242    }
14243
14244    /// Sets or clears the value of [featured_content_native_dashboard][crate::model::InstallFeaturedContentNativeDashboardRequest::featured_content_native_dashboard].
14245    ///
14246    /// # Example
14247    /// ```ignore,no_run
14248    /// # use google_cloud_chronicle_v1::model::InstallFeaturedContentNativeDashboardRequest;
14249    /// use google_cloud_chronicle_v1::model::FeaturedContentNativeDashboard;
14250    /// let x = InstallFeaturedContentNativeDashboardRequest::new().set_or_clear_featured_content_native_dashboard(Some(FeaturedContentNativeDashboard::default()/* use setters */));
14251    /// let x = InstallFeaturedContentNativeDashboardRequest::new().set_or_clear_featured_content_native_dashboard(None::<FeaturedContentNativeDashboard>);
14252    /// ```
14253    pub fn set_or_clear_featured_content_native_dashboard<T>(
14254        mut self,
14255        v: std::option::Option<T>,
14256    ) -> Self
14257    where
14258        T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
14259    {
14260        self.featured_content_native_dashboard = v.map(|x| x.into());
14261        self
14262    }
14263}
14264
14265impl wkt::message::Message for InstallFeaturedContentNativeDashboardRequest {
14266    fn typename() -> &'static str {
14267        "type.googleapis.com/google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest"
14268    }
14269}
14270
14271/// Response message for installing a FeaturedContentNativeDashboard.
14272#[derive(Clone, Default, PartialEq)]
14273#[non_exhaustive]
14274pub struct InstallFeaturedContentNativeDashboardResponse {
14275    /// Optional. The resource name of the NativeDashboard created.
14276    /// Format:
14277    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{native_dashboard_id}
14278    pub native_dashboard: std::string::String,
14279
14280    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14281}
14282
14283impl InstallFeaturedContentNativeDashboardResponse {
14284    /// Creates a new default instance.
14285    pub fn new() -> Self {
14286        std::default::Default::default()
14287    }
14288
14289    /// Sets the value of [native_dashboard][crate::model::InstallFeaturedContentNativeDashboardResponse::native_dashboard].
14290    ///
14291    /// # Example
14292    /// ```ignore,no_run
14293    /// # use google_cloud_chronicle_v1::model::InstallFeaturedContentNativeDashboardResponse;
14294    /// # let project_id = "project_id";
14295    /// # let location_id = "location_id";
14296    /// # let instance_id = "instance_id";
14297    /// # let dashboard_id = "dashboard_id";
14298    /// let x = InstallFeaturedContentNativeDashboardResponse::new().set_native_dashboard(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
14299    /// ```
14300    pub fn set_native_dashboard<T: std::convert::Into<std::string::String>>(
14301        mut self,
14302        v: T,
14303    ) -> Self {
14304        self.native_dashboard = v.into();
14305        self
14306    }
14307}
14308
14309impl wkt::message::Message for InstallFeaturedContentNativeDashboardResponse {
14310    fn typename() -> &'static str {
14311        "type.googleapis.com/google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse"
14312    }
14313}
14314
14315/// A Instance represents an instantiation of the Instance product.
14316#[derive(Clone, Default, PartialEq)]
14317#[non_exhaustive]
14318pub struct Instance {
14319    /// Identifier. The resource name of this instance.
14320    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
14321    pub name: std::string::String,
14322
14323    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14324}
14325
14326impl Instance {
14327    /// Creates a new default instance.
14328    pub fn new() -> Self {
14329        std::default::Default::default()
14330    }
14331
14332    /// Sets the value of [name][crate::model::Instance::name].
14333    ///
14334    /// # Example
14335    /// ```ignore,no_run
14336    /// # use google_cloud_chronicle_v1::model::Instance;
14337    /// # let project_id = "project_id";
14338    /// # let location_id = "location_id";
14339    /// # let instance_id = "instance_id";
14340    /// let x = Instance::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
14341    /// ```
14342    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14343        self.name = v.into();
14344        self
14345    }
14346}
14347
14348impl wkt::message::Message for Instance {
14349    fn typename() -> &'static str {
14350        "type.googleapis.com/google.cloud.chronicle.v1.Instance"
14351    }
14352}
14353
14354/// Request to get a Instance.
14355#[derive(Clone, Default, PartialEq)]
14356#[non_exhaustive]
14357pub struct GetInstanceRequest {
14358    /// Required. The name of the instance to retrieve.
14359    /// Format:
14360    /// `projects/{project_id}/locations/{location}/instances/{instance}`
14361    pub name: std::string::String,
14362
14363    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14364}
14365
14366impl GetInstanceRequest {
14367    /// Creates a new default instance.
14368    pub fn new() -> Self {
14369        std::default::Default::default()
14370    }
14371
14372    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
14373    ///
14374    /// # Example
14375    /// ```ignore,no_run
14376    /// # use google_cloud_chronicle_v1::model::GetInstanceRequest;
14377    /// # let project_id = "project_id";
14378    /// # let location_id = "location_id";
14379    /// # let instance_id = "instance_id";
14380    /// let x = GetInstanceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
14381    /// ```
14382    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14383        self.name = v.into();
14384        self
14385    }
14386}
14387
14388impl wkt::message::Message for GetInstanceRequest {
14389    fn typename() -> &'static str {
14390        "type.googleapis.com/google.cloud.chronicle.v1.GetInstanceRequest"
14391    }
14392}
14393
14394/// Request message to export list of dashboard.
14395#[derive(Clone, Default, PartialEq)]
14396#[non_exhaustive]
14397pub struct ExportNativeDashboardsRequest {
14398    /// Required. The parent resource that the dashboards to be exported belong to.
14399    /// Format: projects/{project}/locations/{location}/instances/{instance}
14400    pub parent: std::string::String,
14401
14402    /// Required. The resource names of the dashboards to export.
14403    pub names: std::vec::Vec<std::string::String>,
14404
14405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14406}
14407
14408impl ExportNativeDashboardsRequest {
14409    /// Creates a new default instance.
14410    pub fn new() -> Self {
14411        std::default::Default::default()
14412    }
14413
14414    /// Sets the value of [parent][crate::model::ExportNativeDashboardsRequest::parent].
14415    ///
14416    /// # Example
14417    /// ```ignore,no_run
14418    /// # use google_cloud_chronicle_v1::model::ExportNativeDashboardsRequest;
14419    /// # let project_id = "project_id";
14420    /// # let location_id = "location_id";
14421    /// # let instance_id = "instance_id";
14422    /// let x = ExportNativeDashboardsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
14423    /// ```
14424    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14425        self.parent = v.into();
14426        self
14427    }
14428
14429    /// Sets the value of [names][crate::model::ExportNativeDashboardsRequest::names].
14430    ///
14431    /// # Example
14432    /// ```ignore,no_run
14433    /// # use google_cloud_chronicle_v1::model::ExportNativeDashboardsRequest;
14434    /// let x = ExportNativeDashboardsRequest::new().set_names(["a", "b", "c"]);
14435    /// ```
14436    pub fn set_names<T, V>(mut self, v: T) -> Self
14437    where
14438        T: std::iter::IntoIterator<Item = V>,
14439        V: std::convert::Into<std::string::String>,
14440    {
14441        use std::iter::Iterator;
14442        self.names = v.into_iter().map(|i| i.into()).collect();
14443        self
14444    }
14445}
14446
14447impl wkt::message::Message for ExportNativeDashboardsRequest {
14448    fn typename() -> &'static str {
14449        "type.googleapis.com/google.cloud.chronicle.v1.ExportNativeDashboardsRequest"
14450    }
14451}
14452
14453/// Response message for exporting a dashboard.
14454#[derive(Clone, Default, PartialEq)]
14455#[non_exhaustive]
14456pub struct ExportNativeDashboardsResponse {
14457    /// Destination for the exported data.
14458    pub destination:
14459        std::option::Option<crate::model::export_native_dashboards_response::Destination>,
14460
14461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14462}
14463
14464impl ExportNativeDashboardsResponse {
14465    /// Creates a new default instance.
14466    pub fn new() -> Self {
14467        std::default::Default::default()
14468    }
14469
14470    /// Sets the value of [destination][crate::model::ExportNativeDashboardsResponse::destination].
14471    ///
14472    /// Note that all the setters affecting `destination` are mutually
14473    /// exclusive.
14474    ///
14475    /// # Example
14476    /// ```ignore,no_run
14477    /// # use google_cloud_chronicle_v1::model::ExportNativeDashboardsResponse;
14478    /// use google_cloud_chronicle_v1::model::InlineDestination;
14479    /// let x = ExportNativeDashboardsResponse::new().set_destination(Some(
14480    ///     google_cloud_chronicle_v1::model::export_native_dashboards_response::Destination::InlineDestination(InlineDestination::default().into())));
14481    /// ```
14482    pub fn set_destination<
14483        T: std::convert::Into<
14484                std::option::Option<crate::model::export_native_dashboards_response::Destination>,
14485            >,
14486    >(
14487        mut self,
14488        v: T,
14489    ) -> Self {
14490        self.destination = v.into();
14491        self
14492    }
14493
14494    /// The value of [destination][crate::model::ExportNativeDashboardsResponse::destination]
14495    /// if it holds a `InlineDestination`, `None` if the field is not set or
14496    /// holds a different branch.
14497    pub fn inline_destination(
14498        &self,
14499    ) -> std::option::Option<&std::boxed::Box<crate::model::InlineDestination>> {
14500        #[allow(unreachable_patterns)]
14501        self.destination.as_ref().and_then(|v| match v {
14502            crate::model::export_native_dashboards_response::Destination::InlineDestination(v) => {
14503                std::option::Option::Some(v)
14504            }
14505            _ => std::option::Option::None,
14506        })
14507    }
14508
14509    /// Sets the value of [destination][crate::model::ExportNativeDashboardsResponse::destination]
14510    /// to hold a `InlineDestination`.
14511    ///
14512    /// Note that all the setters affecting `destination` are
14513    /// mutually exclusive.
14514    ///
14515    /// # Example
14516    /// ```ignore,no_run
14517    /// # use google_cloud_chronicle_v1::model::ExportNativeDashboardsResponse;
14518    /// use google_cloud_chronicle_v1::model::InlineDestination;
14519    /// let x = ExportNativeDashboardsResponse::new().set_inline_destination(InlineDestination::default()/* use setters */);
14520    /// assert!(x.inline_destination().is_some());
14521    /// ```
14522    pub fn set_inline_destination<
14523        T: std::convert::Into<std::boxed::Box<crate::model::InlineDestination>>,
14524    >(
14525        mut self,
14526        v: T,
14527    ) -> Self {
14528        self.destination = std::option::Option::Some(
14529            crate::model::export_native_dashboards_response::Destination::InlineDestination(
14530                v.into(),
14531            ),
14532        );
14533        self
14534    }
14535}
14536
14537impl wkt::message::Message for ExportNativeDashboardsResponse {
14538    fn typename() -> &'static str {
14539        "type.googleapis.com/google.cloud.chronicle.v1.ExportNativeDashboardsResponse"
14540    }
14541}
14542
14543/// Defines additional types related to [ExportNativeDashboardsResponse].
14544pub mod export_native_dashboards_response {
14545    #[allow(unused_imports)]
14546    use super::*;
14547
14548    /// Destination for the exported data.
14549    #[derive(Clone, Debug, PartialEq)]
14550    #[non_exhaustive]
14551    pub enum Destination {
14552        /// The data for the exported dashboards included directly in the response.
14553        InlineDestination(std::boxed::Box<crate::model::InlineDestination>),
14554    }
14555}
14556
14557/// InlineDestination for exporting a dashboard.
14558#[derive(Clone, Default, PartialEq)]
14559#[non_exhaustive]
14560pub struct InlineDestination {
14561    /// Dashboards with charts and queries.
14562    pub dashboards: std::vec::Vec<crate::model::NativeDashboardWithChartsAndQueries>,
14563
14564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14565}
14566
14567impl InlineDestination {
14568    /// Creates a new default instance.
14569    pub fn new() -> Self {
14570        std::default::Default::default()
14571    }
14572
14573    /// Sets the value of [dashboards][crate::model::InlineDestination::dashboards].
14574    ///
14575    /// # Example
14576    /// ```ignore,no_run
14577    /// # use google_cloud_chronicle_v1::model::InlineDestination;
14578    /// use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14579    /// let x = InlineDestination::new()
14580    ///     .set_dashboards([
14581    ///         NativeDashboardWithChartsAndQueries::default()/* use setters */,
14582    ///         NativeDashboardWithChartsAndQueries::default()/* use (different) setters */,
14583    ///     ]);
14584    /// ```
14585    pub fn set_dashboards<T, V>(mut self, v: T) -> Self
14586    where
14587        T: std::iter::IntoIterator<Item = V>,
14588        V: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
14589    {
14590        use std::iter::Iterator;
14591        self.dashboards = v.into_iter().map(|i| i.into()).collect();
14592        self
14593    }
14594}
14595
14596impl wkt::message::Message for InlineDestination {
14597    fn typename() -> &'static str {
14598        "type.googleapis.com/google.cloud.chronicle.v1.InlineDestination"
14599    }
14600}
14601
14602/// NativeDashboardWithChartsAndQueries for exporting a dashboard.
14603#[derive(Clone, Default, PartialEq)]
14604#[non_exhaustive]
14605pub struct NativeDashboardWithChartsAndQueries {
14606    /// Optional. Native dashboard.
14607    pub dashboard: std::option::Option<crate::model::NativeDashboard>,
14608
14609    /// Optional. Charts in the dashboard.
14610    pub dashboard_charts: std::vec::Vec<crate::model::DashboardChart>,
14611
14612    /// Optional. Queries in the dashboard.
14613    pub dashboard_queries: std::vec::Vec<crate::model::DashboardQuery>,
14614
14615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14616}
14617
14618impl NativeDashboardWithChartsAndQueries {
14619    /// Creates a new default instance.
14620    pub fn new() -> Self {
14621        std::default::Default::default()
14622    }
14623
14624    /// Sets the value of [dashboard][crate::model::NativeDashboardWithChartsAndQueries::dashboard].
14625    ///
14626    /// # Example
14627    /// ```ignore,no_run
14628    /// # use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14629    /// use google_cloud_chronicle_v1::model::NativeDashboard;
14630    /// let x = NativeDashboardWithChartsAndQueries::new().set_dashboard(NativeDashboard::default()/* use setters */);
14631    /// ```
14632    pub fn set_dashboard<T>(mut self, v: T) -> Self
14633    where
14634        T: std::convert::Into<crate::model::NativeDashboard>,
14635    {
14636        self.dashboard = std::option::Option::Some(v.into());
14637        self
14638    }
14639
14640    /// Sets or clears the value of [dashboard][crate::model::NativeDashboardWithChartsAndQueries::dashboard].
14641    ///
14642    /// # Example
14643    /// ```ignore,no_run
14644    /// # use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14645    /// use google_cloud_chronicle_v1::model::NativeDashboard;
14646    /// let x = NativeDashboardWithChartsAndQueries::new().set_or_clear_dashboard(Some(NativeDashboard::default()/* use setters */));
14647    /// let x = NativeDashboardWithChartsAndQueries::new().set_or_clear_dashboard(None::<NativeDashboard>);
14648    /// ```
14649    pub fn set_or_clear_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
14650    where
14651        T: std::convert::Into<crate::model::NativeDashboard>,
14652    {
14653        self.dashboard = v.map(|x| x.into());
14654        self
14655    }
14656
14657    /// Sets the value of [dashboard_charts][crate::model::NativeDashboardWithChartsAndQueries::dashboard_charts].
14658    ///
14659    /// # Example
14660    /// ```ignore,no_run
14661    /// # use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14662    /// use google_cloud_chronicle_v1::model::DashboardChart;
14663    /// let x = NativeDashboardWithChartsAndQueries::new()
14664    ///     .set_dashboard_charts([
14665    ///         DashboardChart::default()/* use setters */,
14666    ///         DashboardChart::default()/* use (different) setters */,
14667    ///     ]);
14668    /// ```
14669    pub fn set_dashboard_charts<T, V>(mut self, v: T) -> Self
14670    where
14671        T: std::iter::IntoIterator<Item = V>,
14672        V: std::convert::Into<crate::model::DashboardChart>,
14673    {
14674        use std::iter::Iterator;
14675        self.dashboard_charts = v.into_iter().map(|i| i.into()).collect();
14676        self
14677    }
14678
14679    /// Sets the value of [dashboard_queries][crate::model::NativeDashboardWithChartsAndQueries::dashboard_queries].
14680    ///
14681    /// # Example
14682    /// ```ignore,no_run
14683    /// # use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14684    /// use google_cloud_chronicle_v1::model::DashboardQuery;
14685    /// let x = NativeDashboardWithChartsAndQueries::new()
14686    ///     .set_dashboard_queries([
14687    ///         DashboardQuery::default()/* use setters */,
14688    ///         DashboardQuery::default()/* use (different) setters */,
14689    ///     ]);
14690    /// ```
14691    pub fn set_dashboard_queries<T, V>(mut self, v: T) -> Self
14692    where
14693        T: std::iter::IntoIterator<Item = V>,
14694        V: std::convert::Into<crate::model::DashboardQuery>,
14695    {
14696        use std::iter::Iterator;
14697        self.dashboard_queries = v.into_iter().map(|i| i.into()).collect();
14698        self
14699    }
14700}
14701
14702impl wkt::message::Message for NativeDashboardWithChartsAndQueries {
14703    fn typename() -> &'static str {
14704        "type.googleapis.com/google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries"
14705    }
14706}
14707
14708/// Request message to import dashboards.
14709#[derive(Clone, Default, PartialEq)]
14710#[non_exhaustive]
14711pub struct ImportNativeDashboardsRequest {
14712    /// Required. The parent resource where this dashboard will be created.
14713    /// Format: projects/{project}/locations/{location}/instances/{instance}
14714    pub parent: std::string::String,
14715
14716    /// Required. The data will imported from this proto.
14717    pub source: std::option::Option<crate::model::ImportNativeDashboardsInlineSource>,
14718
14719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14720}
14721
14722impl ImportNativeDashboardsRequest {
14723    /// Creates a new default instance.
14724    pub fn new() -> Self {
14725        std::default::Default::default()
14726    }
14727
14728    /// Sets the value of [parent][crate::model::ImportNativeDashboardsRequest::parent].
14729    ///
14730    /// # Example
14731    /// ```ignore,no_run
14732    /// # use google_cloud_chronicle_v1::model::ImportNativeDashboardsRequest;
14733    /// # let project_id = "project_id";
14734    /// # let location_id = "location_id";
14735    /// # let instance_id = "instance_id";
14736    /// let x = ImportNativeDashboardsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
14737    /// ```
14738    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14739        self.parent = v.into();
14740        self
14741    }
14742
14743    /// Sets the value of [source][crate::model::ImportNativeDashboardsRequest::source].
14744    ///
14745    /// # Example
14746    /// ```ignore,no_run
14747    /// # use google_cloud_chronicle_v1::model::ImportNativeDashboardsRequest;
14748    /// use google_cloud_chronicle_v1::model::ImportNativeDashboardsInlineSource;
14749    /// let x = ImportNativeDashboardsRequest::new().set_source(ImportNativeDashboardsInlineSource::default()/* use setters */);
14750    /// ```
14751    pub fn set_source<T>(mut self, v: T) -> Self
14752    where
14753        T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
14754    {
14755        self.source = std::option::Option::Some(v.into());
14756        self
14757    }
14758
14759    /// Sets or clears the value of [source][crate::model::ImportNativeDashboardsRequest::source].
14760    ///
14761    /// # Example
14762    /// ```ignore,no_run
14763    /// # use google_cloud_chronicle_v1::model::ImportNativeDashboardsRequest;
14764    /// use google_cloud_chronicle_v1::model::ImportNativeDashboardsInlineSource;
14765    /// let x = ImportNativeDashboardsRequest::new().set_or_clear_source(Some(ImportNativeDashboardsInlineSource::default()/* use setters */));
14766    /// let x = ImportNativeDashboardsRequest::new().set_or_clear_source(None::<ImportNativeDashboardsInlineSource>);
14767    /// ```
14768    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
14769    where
14770        T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
14771    {
14772        self.source = v.map(|x| x.into());
14773        self
14774    }
14775}
14776
14777impl wkt::message::Message for ImportNativeDashboardsRequest {
14778    fn typename() -> &'static str {
14779        "type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsRequest"
14780    }
14781}
14782
14783/// Inline source for importing dashboards.
14784#[derive(Clone, Default, PartialEq)]
14785#[non_exhaustive]
14786pub struct ImportNativeDashboardsInlineSource {
14787    /// Required. Dashboards with charts and queries.
14788    pub dashboards: std::vec::Vec<crate::model::NativeDashboardWithChartsAndQueries>,
14789
14790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14791}
14792
14793impl ImportNativeDashboardsInlineSource {
14794    /// Creates a new default instance.
14795    pub fn new() -> Self {
14796        std::default::Default::default()
14797    }
14798
14799    /// Sets the value of [dashboards][crate::model::ImportNativeDashboardsInlineSource::dashboards].
14800    ///
14801    /// # Example
14802    /// ```ignore,no_run
14803    /// # use google_cloud_chronicle_v1::model::ImportNativeDashboardsInlineSource;
14804    /// use google_cloud_chronicle_v1::model::NativeDashboardWithChartsAndQueries;
14805    /// let x = ImportNativeDashboardsInlineSource::new()
14806    ///     .set_dashboards([
14807    ///         NativeDashboardWithChartsAndQueries::default()/* use setters */,
14808    ///         NativeDashboardWithChartsAndQueries::default()/* use (different) setters */,
14809    ///     ]);
14810    /// ```
14811    pub fn set_dashboards<T, V>(mut self, v: T) -> Self
14812    where
14813        T: std::iter::IntoIterator<Item = V>,
14814        V: std::convert::Into<crate::model::NativeDashboardWithChartsAndQueries>,
14815    {
14816        use std::iter::Iterator;
14817        self.dashboards = v.into_iter().map(|i| i.into()).collect();
14818        self
14819    }
14820}
14821
14822impl wkt::message::Message for ImportNativeDashboardsInlineSource {
14823    fn typename() -> &'static str {
14824        "type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource"
14825    }
14826}
14827
14828/// Response message for importing dashboards.
14829#[derive(Clone, Default, PartialEq)]
14830#[non_exhaustive]
14831pub struct ImportNativeDashboardsResponse {
14832    /// Output only. Represents the status of an import operation for multiple
14833    /// dashboards. Each dashboard's import status is tracked. A status of OK
14834    /// indicates the dashboard was ready for import. Otherwise, an appropriate
14835    /// error code and message are provided. Importantly, the import process is
14836    /// all-or-nothing: if even one dashboard fails to import, the entire import
14837    /// operation is aborted, and none of the dashboards are imported. The order of
14838    /// the statuses will be the same as in the import request.
14839    pub results: std::vec::Vec<crate::model::ImportExportStatus>,
14840
14841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14842}
14843
14844impl ImportNativeDashboardsResponse {
14845    /// Creates a new default instance.
14846    pub fn new() -> Self {
14847        std::default::Default::default()
14848    }
14849
14850    /// Sets the value of [results][crate::model::ImportNativeDashboardsResponse::results].
14851    ///
14852    /// # Example
14853    /// ```ignore,no_run
14854    /// # use google_cloud_chronicle_v1::model::ImportNativeDashboardsResponse;
14855    /// use google_cloud_chronicle_v1::model::ImportExportStatus;
14856    /// let x = ImportNativeDashboardsResponse::new()
14857    ///     .set_results([
14858    ///         ImportExportStatus::default()/* use setters */,
14859    ///         ImportExportStatus::default()/* use (different) setters */,
14860    ///     ]);
14861    /// ```
14862    pub fn set_results<T, V>(mut self, v: T) -> Self
14863    where
14864        T: std::iter::IntoIterator<Item = V>,
14865        V: std::convert::Into<crate::model::ImportExportStatus>,
14866    {
14867        use std::iter::Iterator;
14868        self.results = v.into_iter().map(|i| i.into()).collect();
14869        self
14870    }
14871}
14872
14873impl wkt::message::Message for ImportNativeDashboardsResponse {
14874    fn typename() -> &'static str {
14875        "type.googleapis.com/google.cloud.chronicle.v1.ImportNativeDashboardsResponse"
14876    }
14877}
14878
14879/// ImportExportStatus is a wrapper for dashboard name and status.
14880#[derive(Clone, Default, PartialEq)]
14881#[non_exhaustive]
14882pub struct ImportExportStatus {
14883    /// The resource name of the dashboard if it was supplied in the request.
14884    pub dashboard: std::string::String,
14885
14886    /// Output only. Status of the import/export operation.
14887    pub status: std::option::Option<google_cloud_rpc::model::Status>,
14888
14889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14890}
14891
14892impl ImportExportStatus {
14893    /// Creates a new default instance.
14894    pub fn new() -> Self {
14895        std::default::Default::default()
14896    }
14897
14898    /// Sets the value of [dashboard][crate::model::ImportExportStatus::dashboard].
14899    ///
14900    /// # Example
14901    /// ```ignore,no_run
14902    /// # use google_cloud_chronicle_v1::model::ImportExportStatus;
14903    /// let x = ImportExportStatus::new().set_dashboard("example");
14904    /// ```
14905    pub fn set_dashboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14906        self.dashboard = v.into();
14907        self
14908    }
14909
14910    /// Sets the value of [status][crate::model::ImportExportStatus::status].
14911    ///
14912    /// # Example
14913    /// ```ignore,no_run
14914    /// # use google_cloud_chronicle_v1::model::ImportExportStatus;
14915    /// use google_cloud_rpc::model::Status;
14916    /// let x = ImportExportStatus::new().set_status(Status::default()/* use setters */);
14917    /// ```
14918    pub fn set_status<T>(mut self, v: T) -> Self
14919    where
14920        T: std::convert::Into<google_cloud_rpc::model::Status>,
14921    {
14922        self.status = std::option::Option::Some(v.into());
14923        self
14924    }
14925
14926    /// Sets or clears the value of [status][crate::model::ImportExportStatus::status].
14927    ///
14928    /// # Example
14929    /// ```ignore,no_run
14930    /// # use google_cloud_chronicle_v1::model::ImportExportStatus;
14931    /// use google_cloud_rpc::model::Status;
14932    /// let x = ImportExportStatus::new().set_or_clear_status(Some(Status::default()/* use setters */));
14933    /// let x = ImportExportStatus::new().set_or_clear_status(None::<Status>);
14934    /// ```
14935    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
14936    where
14937        T: std::convert::Into<google_cloud_rpc::model::Status>,
14938    {
14939        self.status = v.map(|x| x.into());
14940        self
14941    }
14942}
14943
14944impl wkt::message::Message for ImportExportStatus {
14945    fn typename() -> &'static str {
14946        "type.googleapis.com/google.cloud.chronicle.v1.ImportExportStatus"
14947    }
14948}
14949
14950/// NativeDashboard resource.
14951#[derive(Clone, Default, PartialEq)]
14952#[non_exhaustive]
14953pub struct NativeDashboard {
14954    /// Output only. Name of the dashboard.
14955    pub name: std::string::String,
14956
14957    /// Required. Dashboard display name/title visible to users.
14958    pub display_name: std::string::String,
14959
14960    /// Optional. Description of the dashboard.
14961    pub description: std::string::String,
14962
14963    /// Optional. Definition of the dashboard like metadata, visualization and
14964    /// datasource configuration etc.
14965    pub definition: std::option::Option<crate::model::DashboardDefinition>,
14966
14967    /// Output only. Whether it's an out of the box or custom created dashboard.
14968    pub r#type: crate::model::DashboardType,
14969
14970    /// Output only. Creation time of dashboard.
14971    pub create_time: std::option::Option<wkt::Timestamp>,
14972
14973    /// Output only. Time the dashboard was last edited.
14974    pub update_time: std::option::Option<wkt::Timestamp>,
14975
14976    /// Output only. User who created the dashboard.
14977    pub create_user_id: std::string::String,
14978
14979    /// Output only. User who last edited the dashboard.
14980    pub update_user_id: std::string::String,
14981
14982    /// Output only. User Preferences for a dashboard
14983    pub dashboard_user_data: std::option::Option<crate::model::DashboardUserData>,
14984
14985    /// Optional. This checksum is computed by the server based on the value of
14986    /// other fields, and may be sent on update and delete requests to ensure the
14987    /// client has an up-to-date value before proceeding.
14988    pub etag: std::string::String,
14989
14990    /// Output only. Access of the dashboard
14991    pub access: crate::model::DashboardAccess,
14992
14993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14994}
14995
14996impl NativeDashboard {
14997    /// Creates a new default instance.
14998    pub fn new() -> Self {
14999        std::default::Default::default()
15000    }
15001
15002    /// Sets the value of [name][crate::model::NativeDashboard::name].
15003    ///
15004    /// # Example
15005    /// ```ignore,no_run
15006    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15007    /// # let project_id = "project_id";
15008    /// # let location_id = "location_id";
15009    /// # let instance_id = "instance_id";
15010    /// # let dashboard_id = "dashboard_id";
15011    /// let x = NativeDashboard::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
15012    /// ```
15013    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15014        self.name = v.into();
15015        self
15016    }
15017
15018    /// Sets the value of [display_name][crate::model::NativeDashboard::display_name].
15019    ///
15020    /// # Example
15021    /// ```ignore,no_run
15022    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15023    /// let x = NativeDashboard::new().set_display_name("example");
15024    /// ```
15025    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15026        self.display_name = v.into();
15027        self
15028    }
15029
15030    /// Sets the value of [description][crate::model::NativeDashboard::description].
15031    ///
15032    /// # Example
15033    /// ```ignore,no_run
15034    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15035    /// let x = NativeDashboard::new().set_description("example");
15036    /// ```
15037    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15038        self.description = v.into();
15039        self
15040    }
15041
15042    /// Sets the value of [definition][crate::model::NativeDashboard::definition].
15043    ///
15044    /// # Example
15045    /// ```ignore,no_run
15046    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15047    /// use google_cloud_chronicle_v1::model::DashboardDefinition;
15048    /// let x = NativeDashboard::new().set_definition(DashboardDefinition::default()/* use setters */);
15049    /// ```
15050    pub fn set_definition<T>(mut self, v: T) -> Self
15051    where
15052        T: std::convert::Into<crate::model::DashboardDefinition>,
15053    {
15054        self.definition = std::option::Option::Some(v.into());
15055        self
15056    }
15057
15058    /// Sets or clears the value of [definition][crate::model::NativeDashboard::definition].
15059    ///
15060    /// # Example
15061    /// ```ignore,no_run
15062    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15063    /// use google_cloud_chronicle_v1::model::DashboardDefinition;
15064    /// let x = NativeDashboard::new().set_or_clear_definition(Some(DashboardDefinition::default()/* use setters */));
15065    /// let x = NativeDashboard::new().set_or_clear_definition(None::<DashboardDefinition>);
15066    /// ```
15067    pub fn set_or_clear_definition<T>(mut self, v: std::option::Option<T>) -> Self
15068    where
15069        T: std::convert::Into<crate::model::DashboardDefinition>,
15070    {
15071        self.definition = v.map(|x| x.into());
15072        self
15073    }
15074
15075    /// Sets the value of [r#type][crate::model::NativeDashboard::type].
15076    ///
15077    /// # Example
15078    /// ```ignore,no_run
15079    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15080    /// use google_cloud_chronicle_v1::model::DashboardType;
15081    /// let x0 = NativeDashboard::new().set_type(DashboardType::Curated);
15082    /// let x1 = NativeDashboard::new().set_type(DashboardType::Private);
15083    /// let x2 = NativeDashboard::new().set_type(DashboardType::Public);
15084    /// ```
15085    pub fn set_type<T: std::convert::Into<crate::model::DashboardType>>(mut self, v: T) -> Self {
15086        self.r#type = v.into();
15087        self
15088    }
15089
15090    /// Sets the value of [create_time][crate::model::NativeDashboard::create_time].
15091    ///
15092    /// # Example
15093    /// ```ignore,no_run
15094    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15095    /// use wkt::Timestamp;
15096    /// let x = NativeDashboard::new().set_create_time(Timestamp::default()/* use setters */);
15097    /// ```
15098    pub fn set_create_time<T>(mut self, v: T) -> Self
15099    where
15100        T: std::convert::Into<wkt::Timestamp>,
15101    {
15102        self.create_time = std::option::Option::Some(v.into());
15103        self
15104    }
15105
15106    /// Sets or clears the value of [create_time][crate::model::NativeDashboard::create_time].
15107    ///
15108    /// # Example
15109    /// ```ignore,no_run
15110    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15111    /// use wkt::Timestamp;
15112    /// let x = NativeDashboard::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15113    /// let x = NativeDashboard::new().set_or_clear_create_time(None::<Timestamp>);
15114    /// ```
15115    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15116    where
15117        T: std::convert::Into<wkt::Timestamp>,
15118    {
15119        self.create_time = v.map(|x| x.into());
15120        self
15121    }
15122
15123    /// Sets the value of [update_time][crate::model::NativeDashboard::update_time].
15124    ///
15125    /// # Example
15126    /// ```ignore,no_run
15127    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15128    /// use wkt::Timestamp;
15129    /// let x = NativeDashboard::new().set_update_time(Timestamp::default()/* use setters */);
15130    /// ```
15131    pub fn set_update_time<T>(mut self, v: T) -> Self
15132    where
15133        T: std::convert::Into<wkt::Timestamp>,
15134    {
15135        self.update_time = std::option::Option::Some(v.into());
15136        self
15137    }
15138
15139    /// Sets or clears the value of [update_time][crate::model::NativeDashboard::update_time].
15140    ///
15141    /// # Example
15142    /// ```ignore,no_run
15143    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15144    /// use wkt::Timestamp;
15145    /// let x = NativeDashboard::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
15146    /// let x = NativeDashboard::new().set_or_clear_update_time(None::<Timestamp>);
15147    /// ```
15148    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15149    where
15150        T: std::convert::Into<wkt::Timestamp>,
15151    {
15152        self.update_time = v.map(|x| x.into());
15153        self
15154    }
15155
15156    /// Sets the value of [create_user_id][crate::model::NativeDashboard::create_user_id].
15157    ///
15158    /// # Example
15159    /// ```ignore,no_run
15160    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15161    /// let x = NativeDashboard::new().set_create_user_id("example");
15162    /// ```
15163    pub fn set_create_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15164        self.create_user_id = v.into();
15165        self
15166    }
15167
15168    /// Sets the value of [update_user_id][crate::model::NativeDashboard::update_user_id].
15169    ///
15170    /// # Example
15171    /// ```ignore,no_run
15172    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15173    /// let x = NativeDashboard::new().set_update_user_id("example");
15174    /// ```
15175    pub fn set_update_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15176        self.update_user_id = v.into();
15177        self
15178    }
15179
15180    /// Sets the value of [dashboard_user_data][crate::model::NativeDashboard::dashboard_user_data].
15181    ///
15182    /// # Example
15183    /// ```ignore,no_run
15184    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15185    /// use google_cloud_chronicle_v1::model::DashboardUserData;
15186    /// let x = NativeDashboard::new().set_dashboard_user_data(DashboardUserData::default()/* use setters */);
15187    /// ```
15188    pub fn set_dashboard_user_data<T>(mut self, v: T) -> Self
15189    where
15190        T: std::convert::Into<crate::model::DashboardUserData>,
15191    {
15192        self.dashboard_user_data = std::option::Option::Some(v.into());
15193        self
15194    }
15195
15196    /// Sets or clears the value of [dashboard_user_data][crate::model::NativeDashboard::dashboard_user_data].
15197    ///
15198    /// # Example
15199    /// ```ignore,no_run
15200    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15201    /// use google_cloud_chronicle_v1::model::DashboardUserData;
15202    /// let x = NativeDashboard::new().set_or_clear_dashboard_user_data(Some(DashboardUserData::default()/* use setters */));
15203    /// let x = NativeDashboard::new().set_or_clear_dashboard_user_data(None::<DashboardUserData>);
15204    /// ```
15205    pub fn set_or_clear_dashboard_user_data<T>(mut self, v: std::option::Option<T>) -> Self
15206    where
15207        T: std::convert::Into<crate::model::DashboardUserData>,
15208    {
15209        self.dashboard_user_data = v.map(|x| x.into());
15210        self
15211    }
15212
15213    /// Sets the value of [etag][crate::model::NativeDashboard::etag].
15214    ///
15215    /// # Example
15216    /// ```ignore,no_run
15217    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15218    /// let x = NativeDashboard::new().set_etag("example");
15219    /// ```
15220    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15221        self.etag = v.into();
15222        self
15223    }
15224
15225    /// Sets the value of [access][crate::model::NativeDashboard::access].
15226    ///
15227    /// # Example
15228    /// ```ignore,no_run
15229    /// # use google_cloud_chronicle_v1::model::NativeDashboard;
15230    /// use google_cloud_chronicle_v1::model::DashboardAccess;
15231    /// let x0 = NativeDashboard::new().set_access(DashboardAccess::DashboardPrivate);
15232    /// let x1 = NativeDashboard::new().set_access(DashboardAccess::DashboardPublic);
15233    /// ```
15234    pub fn set_access<T: std::convert::Into<crate::model::DashboardAccess>>(
15235        mut self,
15236        v: T,
15237    ) -> Self {
15238        self.access = v.into();
15239        self
15240    }
15241}
15242
15243impl wkt::message::Message for NativeDashboard {
15244    fn typename() -> &'static str {
15245        "type.googleapis.com/google.cloud.chronicle.v1.NativeDashboard"
15246    }
15247}
15248
15249/// Request message to create a dashboard.
15250#[derive(Clone, Default, PartialEq)]
15251#[non_exhaustive]
15252pub struct CreateNativeDashboardRequest {
15253    /// Required. The parent resource where this dashboard will be created.
15254    /// Format: projects/{project}/locations/{location}/instances/{instance}
15255    pub parent: std::string::String,
15256
15257    /// Required. The dashboard to create.
15258    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
15259
15260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15261}
15262
15263impl CreateNativeDashboardRequest {
15264    /// Creates a new default instance.
15265    pub fn new() -> Self {
15266        std::default::Default::default()
15267    }
15268
15269    /// Sets the value of [parent][crate::model::CreateNativeDashboardRequest::parent].
15270    ///
15271    /// # Example
15272    /// ```ignore,no_run
15273    /// # use google_cloud_chronicle_v1::model::CreateNativeDashboardRequest;
15274    /// # let project_id = "project_id";
15275    /// # let location_id = "location_id";
15276    /// # let instance_id = "instance_id";
15277    /// let x = CreateNativeDashboardRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
15278    /// ```
15279    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15280        self.parent = v.into();
15281        self
15282    }
15283
15284    /// Sets the value of [native_dashboard][crate::model::CreateNativeDashboardRequest::native_dashboard].
15285    ///
15286    /// # Example
15287    /// ```ignore,no_run
15288    /// # use google_cloud_chronicle_v1::model::CreateNativeDashboardRequest;
15289    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15290    /// let x = CreateNativeDashboardRequest::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
15291    /// ```
15292    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
15293    where
15294        T: std::convert::Into<crate::model::NativeDashboard>,
15295    {
15296        self.native_dashboard = std::option::Option::Some(v.into());
15297        self
15298    }
15299
15300    /// Sets or clears the value of [native_dashboard][crate::model::CreateNativeDashboardRequest::native_dashboard].
15301    ///
15302    /// # Example
15303    /// ```ignore,no_run
15304    /// # use google_cloud_chronicle_v1::model::CreateNativeDashboardRequest;
15305    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15306    /// let x = CreateNativeDashboardRequest::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
15307    /// let x = CreateNativeDashboardRequest::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
15308    /// ```
15309    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
15310    where
15311        T: std::convert::Into<crate::model::NativeDashboard>,
15312    {
15313        self.native_dashboard = v.map(|x| x.into());
15314        self
15315    }
15316}
15317
15318impl wkt::message::Message for CreateNativeDashboardRequest {
15319    fn typename() -> &'static str {
15320        "type.googleapis.com/google.cloud.chronicle.v1.CreateNativeDashboardRequest"
15321    }
15322}
15323
15324/// Request message to get a dashboard.
15325#[derive(Clone, Default, PartialEq)]
15326#[non_exhaustive]
15327pub struct GetNativeDashboardRequest {
15328    /// Required. The dashboard name to fetch.
15329    /// Format:
15330    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
15331    pub name: std::string::String,
15332
15333    /// Optional. View indicates the scope of fields to populate when returning the
15334    /// dashboard resource. If unspecified, defaults to the basic view.
15335    pub view: crate::model::NativeDashboardView,
15336
15337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15338}
15339
15340impl GetNativeDashboardRequest {
15341    /// Creates a new default instance.
15342    pub fn new() -> Self {
15343        std::default::Default::default()
15344    }
15345
15346    /// Sets the value of [name][crate::model::GetNativeDashboardRequest::name].
15347    ///
15348    /// # Example
15349    /// ```ignore,no_run
15350    /// # use google_cloud_chronicle_v1::model::GetNativeDashboardRequest;
15351    /// # let project_id = "project_id";
15352    /// # let location_id = "location_id";
15353    /// # let instance_id = "instance_id";
15354    /// # let dashboard_id = "dashboard_id";
15355    /// let x = GetNativeDashboardRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
15356    /// ```
15357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15358        self.name = v.into();
15359        self
15360    }
15361
15362    /// Sets the value of [view][crate::model::GetNativeDashboardRequest::view].
15363    ///
15364    /// # Example
15365    /// ```ignore,no_run
15366    /// # use google_cloud_chronicle_v1::model::GetNativeDashboardRequest;
15367    /// use google_cloud_chronicle_v1::model::NativeDashboardView;
15368    /// let x0 = GetNativeDashboardRequest::new().set_view(NativeDashboardView::Basic);
15369    /// let x1 = GetNativeDashboardRequest::new().set_view(NativeDashboardView::Full);
15370    /// ```
15371    pub fn set_view<T: std::convert::Into<crate::model::NativeDashboardView>>(
15372        mut self,
15373        v: T,
15374    ) -> Self {
15375        self.view = v.into();
15376        self
15377    }
15378}
15379
15380impl wkt::message::Message for GetNativeDashboardRequest {
15381    fn typename() -> &'static str {
15382        "type.googleapis.com/google.cloud.chronicle.v1.GetNativeDashboardRequest"
15383    }
15384}
15385
15386/// Request message to list dashboards.
15387#[derive(Clone, Default, PartialEq)]
15388#[non_exhaustive]
15389pub struct ListNativeDashboardsRequest {
15390    /// Required. The parent owning this dashboard collection.
15391    /// Format: projects/{project}/locations/{location}/instances/{instance}
15392    pub parent: std::string::String,
15393
15394    /// Optional. The maximum number of dashboards to return. The service may
15395    /// return fewer than this value.
15396    pub page_size: i32,
15397
15398    /// Optional. A page token, received from a previous `ListDashboards` call.
15399    /// Provide this to retrieve the subsequent page.
15400    ///
15401    /// When paginating, all other parameters provided to `ListDashboards` must
15402    /// match the call that provided the page token.
15403    pub page_token: std::string::String,
15404
15405    /// Optional. View indicates the scope of fields to populate when returning the
15406    /// dashboard resource. If unspecified, defaults to the basic view.
15407    pub view: crate::model::NativeDashboardView,
15408
15409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15410}
15411
15412impl ListNativeDashboardsRequest {
15413    /// Creates a new default instance.
15414    pub fn new() -> Self {
15415        std::default::Default::default()
15416    }
15417
15418    /// Sets the value of [parent][crate::model::ListNativeDashboardsRequest::parent].
15419    ///
15420    /// # Example
15421    /// ```ignore,no_run
15422    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsRequest;
15423    /// # let project_id = "project_id";
15424    /// # let location_id = "location_id";
15425    /// # let instance_id = "instance_id";
15426    /// let x = ListNativeDashboardsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
15427    /// ```
15428    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15429        self.parent = v.into();
15430        self
15431    }
15432
15433    /// Sets the value of [page_size][crate::model::ListNativeDashboardsRequest::page_size].
15434    ///
15435    /// # Example
15436    /// ```ignore,no_run
15437    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsRequest;
15438    /// let x = ListNativeDashboardsRequest::new().set_page_size(42);
15439    /// ```
15440    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15441        self.page_size = v.into();
15442        self
15443    }
15444
15445    /// Sets the value of [page_token][crate::model::ListNativeDashboardsRequest::page_token].
15446    ///
15447    /// # Example
15448    /// ```ignore,no_run
15449    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsRequest;
15450    /// let x = ListNativeDashboardsRequest::new().set_page_token("example");
15451    /// ```
15452    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15453        self.page_token = v.into();
15454        self
15455    }
15456
15457    /// Sets the value of [view][crate::model::ListNativeDashboardsRequest::view].
15458    ///
15459    /// # Example
15460    /// ```ignore,no_run
15461    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsRequest;
15462    /// use google_cloud_chronicle_v1::model::NativeDashboardView;
15463    /// let x0 = ListNativeDashboardsRequest::new().set_view(NativeDashboardView::Basic);
15464    /// let x1 = ListNativeDashboardsRequest::new().set_view(NativeDashboardView::Full);
15465    /// ```
15466    pub fn set_view<T: std::convert::Into<crate::model::NativeDashboardView>>(
15467        mut self,
15468        v: T,
15469    ) -> Self {
15470        self.view = v.into();
15471        self
15472    }
15473}
15474
15475impl wkt::message::Message for ListNativeDashboardsRequest {
15476    fn typename() -> &'static str {
15477        "type.googleapis.com/google.cloud.chronicle.v1.ListNativeDashboardsRequest"
15478    }
15479}
15480
15481/// Response message for listing dashboards.
15482#[derive(Clone, Default, PartialEq)]
15483#[non_exhaustive]
15484pub struct ListNativeDashboardsResponse {
15485    /// The dashboards from the specified chronicle instance.
15486    pub native_dashboards: std::vec::Vec<crate::model::NativeDashboard>,
15487
15488    /// A token, which can be sent as `page_token` to retrieve the next page.
15489    /// If this field is omitted, there are no subsequent pages.
15490    pub next_page_token: std::string::String,
15491
15492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15493}
15494
15495impl ListNativeDashboardsResponse {
15496    /// Creates a new default instance.
15497    pub fn new() -> Self {
15498        std::default::Default::default()
15499    }
15500
15501    /// Sets the value of [native_dashboards][crate::model::ListNativeDashboardsResponse::native_dashboards].
15502    ///
15503    /// # Example
15504    /// ```ignore,no_run
15505    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsResponse;
15506    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15507    /// let x = ListNativeDashboardsResponse::new()
15508    ///     .set_native_dashboards([
15509    ///         NativeDashboard::default()/* use setters */,
15510    ///         NativeDashboard::default()/* use (different) setters */,
15511    ///     ]);
15512    /// ```
15513    pub fn set_native_dashboards<T, V>(mut self, v: T) -> Self
15514    where
15515        T: std::iter::IntoIterator<Item = V>,
15516        V: std::convert::Into<crate::model::NativeDashboard>,
15517    {
15518        use std::iter::Iterator;
15519        self.native_dashboards = v.into_iter().map(|i| i.into()).collect();
15520        self
15521    }
15522
15523    /// Sets the value of [next_page_token][crate::model::ListNativeDashboardsResponse::next_page_token].
15524    ///
15525    /// # Example
15526    /// ```ignore,no_run
15527    /// # use google_cloud_chronicle_v1::model::ListNativeDashboardsResponse;
15528    /// let x = ListNativeDashboardsResponse::new().set_next_page_token("example");
15529    /// ```
15530    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15531        self.next_page_token = v.into();
15532        self
15533    }
15534}
15535
15536impl wkt::message::Message for ListNativeDashboardsResponse {
15537    fn typename() -> &'static str {
15538        "type.googleapis.com/google.cloud.chronicle.v1.ListNativeDashboardsResponse"
15539    }
15540}
15541
15542#[doc(hidden)]
15543impl google_cloud_gax::paginator::internal::PageableResponse for ListNativeDashboardsResponse {
15544    type PageItem = crate::model::NativeDashboard;
15545
15546    fn items(self) -> std::vec::Vec<Self::PageItem> {
15547        self.native_dashboards
15548    }
15549
15550    fn next_page_token(&self) -> std::string::String {
15551        use std::clone::Clone;
15552        self.next_page_token.clone()
15553    }
15554}
15555
15556/// Request message to update a dashboard.
15557#[derive(Clone, Default, PartialEq)]
15558#[non_exhaustive]
15559pub struct UpdateNativeDashboardRequest {
15560    /// Required. The dashboard to update.
15561    ///
15562    /// The dashboard's `name` field is used to identify the dashboard to update.
15563    /// Format:
15564    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
15565    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
15566
15567    /// Required. LINT.IfChange(update_mask_values)
15568    /// The list of fields to update.
15569    /// Supported paths are -
15570    /// display_name
15571    /// description
15572    /// definition.filters
15573    /// definition.charts
15574    /// type
15575    /// access
15576    /// dashboard_user_data.is_pinned
15577    pub update_mask: std::option::Option<wkt::FieldMask>,
15578
15579    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15580}
15581
15582impl UpdateNativeDashboardRequest {
15583    /// Creates a new default instance.
15584    pub fn new() -> Self {
15585        std::default::Default::default()
15586    }
15587
15588    /// Sets the value of [native_dashboard][crate::model::UpdateNativeDashboardRequest::native_dashboard].
15589    ///
15590    /// # Example
15591    /// ```ignore,no_run
15592    /// # use google_cloud_chronicle_v1::model::UpdateNativeDashboardRequest;
15593    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15594    /// let x = UpdateNativeDashboardRequest::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
15595    /// ```
15596    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
15597    where
15598        T: std::convert::Into<crate::model::NativeDashboard>,
15599    {
15600        self.native_dashboard = std::option::Option::Some(v.into());
15601        self
15602    }
15603
15604    /// Sets or clears the value of [native_dashboard][crate::model::UpdateNativeDashboardRequest::native_dashboard].
15605    ///
15606    /// # Example
15607    /// ```ignore,no_run
15608    /// # use google_cloud_chronicle_v1::model::UpdateNativeDashboardRequest;
15609    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15610    /// let x = UpdateNativeDashboardRequest::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
15611    /// let x = UpdateNativeDashboardRequest::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
15612    /// ```
15613    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
15614    where
15615        T: std::convert::Into<crate::model::NativeDashboard>,
15616    {
15617        self.native_dashboard = v.map(|x| x.into());
15618        self
15619    }
15620
15621    /// Sets the value of [update_mask][crate::model::UpdateNativeDashboardRequest::update_mask].
15622    ///
15623    /// # Example
15624    /// ```ignore,no_run
15625    /// # use google_cloud_chronicle_v1::model::UpdateNativeDashboardRequest;
15626    /// use wkt::FieldMask;
15627    /// let x = UpdateNativeDashboardRequest::new().set_update_mask(FieldMask::default()/* use setters */);
15628    /// ```
15629    pub fn set_update_mask<T>(mut self, v: T) -> Self
15630    where
15631        T: std::convert::Into<wkt::FieldMask>,
15632    {
15633        self.update_mask = std::option::Option::Some(v.into());
15634        self
15635    }
15636
15637    /// Sets or clears the value of [update_mask][crate::model::UpdateNativeDashboardRequest::update_mask].
15638    ///
15639    /// # Example
15640    /// ```ignore,no_run
15641    /// # use google_cloud_chronicle_v1::model::UpdateNativeDashboardRequest;
15642    /// use wkt::FieldMask;
15643    /// let x = UpdateNativeDashboardRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
15644    /// let x = UpdateNativeDashboardRequest::new().set_or_clear_update_mask(None::<FieldMask>);
15645    /// ```
15646    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15647    where
15648        T: std::convert::Into<wkt::FieldMask>,
15649    {
15650        self.update_mask = v.map(|x| x.into());
15651        self
15652    }
15653}
15654
15655impl wkt::message::Message for UpdateNativeDashboardRequest {
15656    fn typename() -> &'static str {
15657        "type.googleapis.com/google.cloud.chronicle.v1.UpdateNativeDashboardRequest"
15658    }
15659}
15660
15661/// Request message to duplicate a dashboard.
15662#[derive(Clone, Default, PartialEq)]
15663#[non_exhaustive]
15664pub struct DuplicateNativeDashboardRequest {
15665    /// Required. The dashboard name to duplicate.
15666    /// Format:
15667    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
15668    pub name: std::string::String,
15669
15670    /// Required. Any fields that need modification can be passed through this like
15671    /// name, description etc.
15672    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
15673
15674    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15675}
15676
15677impl DuplicateNativeDashboardRequest {
15678    /// Creates a new default instance.
15679    pub fn new() -> Self {
15680        std::default::Default::default()
15681    }
15682
15683    /// Sets the value of [name][crate::model::DuplicateNativeDashboardRequest::name].
15684    ///
15685    /// # Example
15686    /// ```ignore,no_run
15687    /// # use google_cloud_chronicle_v1::model::DuplicateNativeDashboardRequest;
15688    /// # let project_id = "project_id";
15689    /// # let location_id = "location_id";
15690    /// # let instance_id = "instance_id";
15691    /// # let dashboard_id = "dashboard_id";
15692    /// let x = DuplicateNativeDashboardRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
15693    /// ```
15694    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15695        self.name = v.into();
15696        self
15697    }
15698
15699    /// Sets the value of [native_dashboard][crate::model::DuplicateNativeDashboardRequest::native_dashboard].
15700    ///
15701    /// # Example
15702    /// ```ignore,no_run
15703    /// # use google_cloud_chronicle_v1::model::DuplicateNativeDashboardRequest;
15704    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15705    /// let x = DuplicateNativeDashboardRequest::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
15706    /// ```
15707    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
15708    where
15709        T: std::convert::Into<crate::model::NativeDashboard>,
15710    {
15711        self.native_dashboard = std::option::Option::Some(v.into());
15712        self
15713    }
15714
15715    /// Sets or clears the value of [native_dashboard][crate::model::DuplicateNativeDashboardRequest::native_dashboard].
15716    ///
15717    /// # Example
15718    /// ```ignore,no_run
15719    /// # use google_cloud_chronicle_v1::model::DuplicateNativeDashboardRequest;
15720    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15721    /// let x = DuplicateNativeDashboardRequest::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
15722    /// let x = DuplicateNativeDashboardRequest::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
15723    /// ```
15724    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
15725    where
15726        T: std::convert::Into<crate::model::NativeDashboard>,
15727    {
15728        self.native_dashboard = v.map(|x| x.into());
15729        self
15730    }
15731}
15732
15733impl wkt::message::Message for DuplicateNativeDashboardRequest {
15734    fn typename() -> &'static str {
15735        "type.googleapis.com/google.cloud.chronicle.v1.DuplicateNativeDashboardRequest"
15736    }
15737}
15738
15739/// Request message to delete a dashboard.
15740#[derive(Clone, Default, PartialEq)]
15741#[non_exhaustive]
15742pub struct DeleteNativeDashboardRequest {
15743    /// Required. The dashboard name to delete.
15744    /// Format:
15745    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
15746    pub name: std::string::String,
15747
15748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15749}
15750
15751impl DeleteNativeDashboardRequest {
15752    /// Creates a new default instance.
15753    pub fn new() -> Self {
15754        std::default::Default::default()
15755    }
15756
15757    /// Sets the value of [name][crate::model::DeleteNativeDashboardRequest::name].
15758    ///
15759    /// # Example
15760    /// ```ignore,no_run
15761    /// # use google_cloud_chronicle_v1::model::DeleteNativeDashboardRequest;
15762    /// # let project_id = "project_id";
15763    /// # let location_id = "location_id";
15764    /// # let instance_id = "instance_id";
15765    /// # let dashboard_id = "dashboard_id";
15766    /// let x = DeleteNativeDashboardRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
15767    /// ```
15768    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15769        self.name = v.into();
15770        self
15771    }
15772}
15773
15774impl wkt::message::Message for DeleteNativeDashboardRequest {
15775    fn typename() -> &'static str {
15776        "type.googleapis.com/google.cloud.chronicle.v1.DeleteNativeDashboardRequest"
15777    }
15778}
15779
15780/// Request message to add chart in a dashboard.
15781#[derive(Clone, Default, PartialEq)]
15782#[non_exhaustive]
15783pub struct AddChartRequest {
15784    /// Required. The dashboard name to add chart in.
15785    /// Format:
15786    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
15787    pub name: std::string::String,
15788
15789    /// Optional. Query used to create the chart.
15790    pub dashboard_query: std::option::Option<crate::model::DashboardQuery>,
15791
15792    /// Required. Chart to be added to the dashboard.
15793    pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
15794
15795    /// Required. ChartLayout for newly added chart.
15796    pub chart_layout:
15797        std::option::Option<crate::model::dashboard_definition::chart_config::ChartLayout>,
15798
15799    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15800}
15801
15802impl AddChartRequest {
15803    /// Creates a new default instance.
15804    pub fn new() -> Self {
15805        std::default::Default::default()
15806    }
15807
15808    /// Sets the value of [name][crate::model::AddChartRequest::name].
15809    ///
15810    /// # Example
15811    /// ```ignore,no_run
15812    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15813    /// # let project_id = "project_id";
15814    /// # let location_id = "location_id";
15815    /// # let instance_id = "instance_id";
15816    /// # let dashboard_id = "dashboard_id";
15817    /// let x = AddChartRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
15818    /// ```
15819    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15820        self.name = v.into();
15821        self
15822    }
15823
15824    /// Sets the value of [dashboard_query][crate::model::AddChartRequest::dashboard_query].
15825    ///
15826    /// # Example
15827    /// ```ignore,no_run
15828    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15829    /// use google_cloud_chronicle_v1::model::DashboardQuery;
15830    /// let x = AddChartRequest::new().set_dashboard_query(DashboardQuery::default()/* use setters */);
15831    /// ```
15832    pub fn set_dashboard_query<T>(mut self, v: T) -> Self
15833    where
15834        T: std::convert::Into<crate::model::DashboardQuery>,
15835    {
15836        self.dashboard_query = std::option::Option::Some(v.into());
15837        self
15838    }
15839
15840    /// Sets or clears the value of [dashboard_query][crate::model::AddChartRequest::dashboard_query].
15841    ///
15842    /// # Example
15843    /// ```ignore,no_run
15844    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15845    /// use google_cloud_chronicle_v1::model::DashboardQuery;
15846    /// let x = AddChartRequest::new().set_or_clear_dashboard_query(Some(DashboardQuery::default()/* use setters */));
15847    /// let x = AddChartRequest::new().set_or_clear_dashboard_query(None::<DashboardQuery>);
15848    /// ```
15849    pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
15850    where
15851        T: std::convert::Into<crate::model::DashboardQuery>,
15852    {
15853        self.dashboard_query = v.map(|x| x.into());
15854        self
15855    }
15856
15857    /// Sets the value of [dashboard_chart][crate::model::AddChartRequest::dashboard_chart].
15858    ///
15859    /// # Example
15860    /// ```ignore,no_run
15861    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15862    /// use google_cloud_chronicle_v1::model::DashboardChart;
15863    /// let x = AddChartRequest::new().set_dashboard_chart(DashboardChart::default()/* use setters */);
15864    /// ```
15865    pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
15866    where
15867        T: std::convert::Into<crate::model::DashboardChart>,
15868    {
15869        self.dashboard_chart = std::option::Option::Some(v.into());
15870        self
15871    }
15872
15873    /// Sets or clears the value of [dashboard_chart][crate::model::AddChartRequest::dashboard_chart].
15874    ///
15875    /// # Example
15876    /// ```ignore,no_run
15877    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15878    /// use google_cloud_chronicle_v1::model::DashboardChart;
15879    /// let x = AddChartRequest::new().set_or_clear_dashboard_chart(Some(DashboardChart::default()/* use setters */));
15880    /// let x = AddChartRequest::new().set_or_clear_dashboard_chart(None::<DashboardChart>);
15881    /// ```
15882    pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
15883    where
15884        T: std::convert::Into<crate::model::DashboardChart>,
15885    {
15886        self.dashboard_chart = v.map(|x| x.into());
15887        self
15888    }
15889
15890    /// Sets the value of [chart_layout][crate::model::AddChartRequest::chart_layout].
15891    ///
15892    /// # Example
15893    /// ```ignore,no_run
15894    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15895    /// use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
15896    /// let x = AddChartRequest::new().set_chart_layout(ChartLayout::default()/* use setters */);
15897    /// ```
15898    pub fn set_chart_layout<T>(mut self, v: T) -> Self
15899    where
15900        T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
15901    {
15902        self.chart_layout = std::option::Option::Some(v.into());
15903        self
15904    }
15905
15906    /// Sets or clears the value of [chart_layout][crate::model::AddChartRequest::chart_layout].
15907    ///
15908    /// # Example
15909    /// ```ignore,no_run
15910    /// # use google_cloud_chronicle_v1::model::AddChartRequest;
15911    /// use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
15912    /// let x = AddChartRequest::new().set_or_clear_chart_layout(Some(ChartLayout::default()/* use setters */));
15913    /// let x = AddChartRequest::new().set_or_clear_chart_layout(None::<ChartLayout>);
15914    /// ```
15915    pub fn set_or_clear_chart_layout<T>(mut self, v: std::option::Option<T>) -> Self
15916    where
15917        T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
15918    {
15919        self.chart_layout = v.map(|x| x.into());
15920        self
15921    }
15922}
15923
15924impl wkt::message::Message for AddChartRequest {
15925    fn typename() -> &'static str {
15926        "type.googleapis.com/google.cloud.chronicle.v1.AddChartRequest"
15927    }
15928}
15929
15930/// Response message for adding chart in a dashboard.
15931#[derive(Clone, Default, PartialEq)]
15932#[non_exhaustive]
15933pub struct AddChartResponse {
15934    /// Dashboard with chart added in definition.
15935    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
15936
15937    /// Created chart resource.
15938    pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
15939
15940    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15941}
15942
15943impl AddChartResponse {
15944    /// Creates a new default instance.
15945    pub fn new() -> Self {
15946        std::default::Default::default()
15947    }
15948
15949    /// Sets the value of [native_dashboard][crate::model::AddChartResponse::native_dashboard].
15950    ///
15951    /// # Example
15952    /// ```ignore,no_run
15953    /// # use google_cloud_chronicle_v1::model::AddChartResponse;
15954    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15955    /// let x = AddChartResponse::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
15956    /// ```
15957    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
15958    where
15959        T: std::convert::Into<crate::model::NativeDashboard>,
15960    {
15961        self.native_dashboard = std::option::Option::Some(v.into());
15962        self
15963    }
15964
15965    /// Sets or clears the value of [native_dashboard][crate::model::AddChartResponse::native_dashboard].
15966    ///
15967    /// # Example
15968    /// ```ignore,no_run
15969    /// # use google_cloud_chronicle_v1::model::AddChartResponse;
15970    /// use google_cloud_chronicle_v1::model::NativeDashboard;
15971    /// let x = AddChartResponse::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
15972    /// let x = AddChartResponse::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
15973    /// ```
15974    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
15975    where
15976        T: std::convert::Into<crate::model::NativeDashboard>,
15977    {
15978        self.native_dashboard = v.map(|x| x.into());
15979        self
15980    }
15981
15982    /// Sets the value of [dashboard_chart][crate::model::AddChartResponse::dashboard_chart].
15983    ///
15984    /// # Example
15985    /// ```ignore,no_run
15986    /// # use google_cloud_chronicle_v1::model::AddChartResponse;
15987    /// use google_cloud_chronicle_v1::model::DashboardChart;
15988    /// let x = AddChartResponse::new().set_dashboard_chart(DashboardChart::default()/* use setters */);
15989    /// ```
15990    pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
15991    where
15992        T: std::convert::Into<crate::model::DashboardChart>,
15993    {
15994        self.dashboard_chart = std::option::Option::Some(v.into());
15995        self
15996    }
15997
15998    /// Sets or clears the value of [dashboard_chart][crate::model::AddChartResponse::dashboard_chart].
15999    ///
16000    /// # Example
16001    /// ```ignore,no_run
16002    /// # use google_cloud_chronicle_v1::model::AddChartResponse;
16003    /// use google_cloud_chronicle_v1::model::DashboardChart;
16004    /// let x = AddChartResponse::new().set_or_clear_dashboard_chart(Some(DashboardChart::default()/* use setters */));
16005    /// let x = AddChartResponse::new().set_or_clear_dashboard_chart(None::<DashboardChart>);
16006    /// ```
16007    pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
16008    where
16009        T: std::convert::Into<crate::model::DashboardChart>,
16010    {
16011        self.dashboard_chart = v.map(|x| x.into());
16012        self
16013    }
16014}
16015
16016impl wkt::message::Message for AddChartResponse {
16017    fn typename() -> &'static str {
16018        "type.googleapis.com/google.cloud.chronicle.v1.AddChartResponse"
16019    }
16020}
16021
16022/// Request message to edit chart in a dashboard.
16023#[derive(Clone, Default, PartialEq)]
16024#[non_exhaustive]
16025pub struct EditChartRequest {
16026    /// Required. The dashboard name to edit chart in.
16027    /// Format:
16028    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
16029    pub name: std::string::String,
16030
16031    /// Optional. Query for the edited chart.
16032    pub dashboard_query: std::option::Option<crate::model::DashboardQuery>,
16033
16034    /// Optional. Edited chart.
16035    pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
16036
16037    /// Required. The list of fields to edit for chart and query.
16038    /// Supported paths in chart are -
16039    /// dashboard_chart.display_name
16040    /// dashboard_chart.description
16041    /// dashboard_chart.chart_datasource.data_sources
16042    /// dashboard_chart.visualization
16043    /// dashboard_chart.visualization.button
16044    /// dashboard_chart.visualization.markdown
16045    /// dashboard_chart.drill_down_config
16046    /// Supported paths in query are -
16047    /// dashboard_query.query
16048    /// dashboard_query.input
16049    pub edit_mask: std::option::Option<wkt::FieldMask>,
16050
16051    /// Optional. Language Features present in the query.
16052    pub language_features: std::vec::Vec<crate::model::LanguageFeature>,
16053
16054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16055}
16056
16057impl EditChartRequest {
16058    /// Creates a new default instance.
16059    pub fn new() -> Self {
16060        std::default::Default::default()
16061    }
16062
16063    /// Sets the value of [name][crate::model::EditChartRequest::name].
16064    ///
16065    /// # Example
16066    /// ```ignore,no_run
16067    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16068    /// # let project_id = "project_id";
16069    /// # let location_id = "location_id";
16070    /// # let instance_id = "instance_id";
16071    /// # let dashboard_id = "dashboard_id";
16072    /// let x = EditChartRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
16073    /// ```
16074    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16075        self.name = v.into();
16076        self
16077    }
16078
16079    /// Sets the value of [dashboard_query][crate::model::EditChartRequest::dashboard_query].
16080    ///
16081    /// # Example
16082    /// ```ignore,no_run
16083    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16084    /// use google_cloud_chronicle_v1::model::DashboardQuery;
16085    /// let x = EditChartRequest::new().set_dashboard_query(DashboardQuery::default()/* use setters */);
16086    /// ```
16087    pub fn set_dashboard_query<T>(mut self, v: T) -> Self
16088    where
16089        T: std::convert::Into<crate::model::DashboardQuery>,
16090    {
16091        self.dashboard_query = std::option::Option::Some(v.into());
16092        self
16093    }
16094
16095    /// Sets or clears the value of [dashboard_query][crate::model::EditChartRequest::dashboard_query].
16096    ///
16097    /// # Example
16098    /// ```ignore,no_run
16099    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16100    /// use google_cloud_chronicle_v1::model::DashboardQuery;
16101    /// let x = EditChartRequest::new().set_or_clear_dashboard_query(Some(DashboardQuery::default()/* use setters */));
16102    /// let x = EditChartRequest::new().set_or_clear_dashboard_query(None::<DashboardQuery>);
16103    /// ```
16104    pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
16105    where
16106        T: std::convert::Into<crate::model::DashboardQuery>,
16107    {
16108        self.dashboard_query = v.map(|x| x.into());
16109        self
16110    }
16111
16112    /// Sets the value of [dashboard_chart][crate::model::EditChartRequest::dashboard_chart].
16113    ///
16114    /// # Example
16115    /// ```ignore,no_run
16116    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16117    /// use google_cloud_chronicle_v1::model::DashboardChart;
16118    /// let x = EditChartRequest::new().set_dashboard_chart(DashboardChart::default()/* use setters */);
16119    /// ```
16120    pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
16121    where
16122        T: std::convert::Into<crate::model::DashboardChart>,
16123    {
16124        self.dashboard_chart = std::option::Option::Some(v.into());
16125        self
16126    }
16127
16128    /// Sets or clears the value of [dashboard_chart][crate::model::EditChartRequest::dashboard_chart].
16129    ///
16130    /// # Example
16131    /// ```ignore,no_run
16132    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16133    /// use google_cloud_chronicle_v1::model::DashboardChart;
16134    /// let x = EditChartRequest::new().set_or_clear_dashboard_chart(Some(DashboardChart::default()/* use setters */));
16135    /// let x = EditChartRequest::new().set_or_clear_dashboard_chart(None::<DashboardChart>);
16136    /// ```
16137    pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
16138    where
16139        T: std::convert::Into<crate::model::DashboardChart>,
16140    {
16141        self.dashboard_chart = v.map(|x| x.into());
16142        self
16143    }
16144
16145    /// Sets the value of [edit_mask][crate::model::EditChartRequest::edit_mask].
16146    ///
16147    /// # Example
16148    /// ```ignore,no_run
16149    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16150    /// use wkt::FieldMask;
16151    /// let x = EditChartRequest::new().set_edit_mask(FieldMask::default()/* use setters */);
16152    /// ```
16153    pub fn set_edit_mask<T>(mut self, v: T) -> Self
16154    where
16155        T: std::convert::Into<wkt::FieldMask>,
16156    {
16157        self.edit_mask = std::option::Option::Some(v.into());
16158        self
16159    }
16160
16161    /// Sets or clears the value of [edit_mask][crate::model::EditChartRequest::edit_mask].
16162    ///
16163    /// # Example
16164    /// ```ignore,no_run
16165    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16166    /// use wkt::FieldMask;
16167    /// let x = EditChartRequest::new().set_or_clear_edit_mask(Some(FieldMask::default()/* use setters */));
16168    /// let x = EditChartRequest::new().set_or_clear_edit_mask(None::<FieldMask>);
16169    /// ```
16170    pub fn set_or_clear_edit_mask<T>(mut self, v: std::option::Option<T>) -> Self
16171    where
16172        T: std::convert::Into<wkt::FieldMask>,
16173    {
16174        self.edit_mask = v.map(|x| x.into());
16175        self
16176    }
16177
16178    /// Sets the value of [language_features][crate::model::EditChartRequest::language_features].
16179    ///
16180    /// # Example
16181    /// ```ignore,no_run
16182    /// # use google_cloud_chronicle_v1::model::EditChartRequest;
16183    /// use google_cloud_chronicle_v1::model::LanguageFeature;
16184    /// let x = EditChartRequest::new().set_language_features([
16185    ///     LanguageFeature::Joins,
16186    ///     LanguageFeature::Stages,
16187    ///     LanguageFeature::DataTables,
16188    /// ]);
16189    /// ```
16190    pub fn set_language_features<T, V>(mut self, v: T) -> Self
16191    where
16192        T: std::iter::IntoIterator<Item = V>,
16193        V: std::convert::Into<crate::model::LanguageFeature>,
16194    {
16195        use std::iter::Iterator;
16196        self.language_features = v.into_iter().map(|i| i.into()).collect();
16197        self
16198    }
16199}
16200
16201impl wkt::message::Message for EditChartRequest {
16202    fn typename() -> &'static str {
16203        "type.googleapis.com/google.cloud.chronicle.v1.EditChartRequest"
16204    }
16205}
16206
16207/// Response message for editing chart in a dashboard.
16208#[derive(Clone, Default, PartialEq)]
16209#[non_exhaustive]
16210pub struct EditChartResponse {
16211    /// Edited dashboard.
16212    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
16213
16214    /// Edited chart resource.
16215    pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
16216
16217    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16218}
16219
16220impl EditChartResponse {
16221    /// Creates a new default instance.
16222    pub fn new() -> Self {
16223        std::default::Default::default()
16224    }
16225
16226    /// Sets the value of [native_dashboard][crate::model::EditChartResponse::native_dashboard].
16227    ///
16228    /// # Example
16229    /// ```ignore,no_run
16230    /// # use google_cloud_chronicle_v1::model::EditChartResponse;
16231    /// use google_cloud_chronicle_v1::model::NativeDashboard;
16232    /// let x = EditChartResponse::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
16233    /// ```
16234    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
16235    where
16236        T: std::convert::Into<crate::model::NativeDashboard>,
16237    {
16238        self.native_dashboard = std::option::Option::Some(v.into());
16239        self
16240    }
16241
16242    /// Sets or clears the value of [native_dashboard][crate::model::EditChartResponse::native_dashboard].
16243    ///
16244    /// # Example
16245    /// ```ignore,no_run
16246    /// # use google_cloud_chronicle_v1::model::EditChartResponse;
16247    /// use google_cloud_chronicle_v1::model::NativeDashboard;
16248    /// let x = EditChartResponse::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
16249    /// let x = EditChartResponse::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
16250    /// ```
16251    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
16252    where
16253        T: std::convert::Into<crate::model::NativeDashboard>,
16254    {
16255        self.native_dashboard = v.map(|x| x.into());
16256        self
16257    }
16258
16259    /// Sets the value of [dashboard_chart][crate::model::EditChartResponse::dashboard_chart].
16260    ///
16261    /// # Example
16262    /// ```ignore,no_run
16263    /// # use google_cloud_chronicle_v1::model::EditChartResponse;
16264    /// use google_cloud_chronicle_v1::model::DashboardChart;
16265    /// let x = EditChartResponse::new().set_dashboard_chart(DashboardChart::default()/* use setters */);
16266    /// ```
16267    pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
16268    where
16269        T: std::convert::Into<crate::model::DashboardChart>,
16270    {
16271        self.dashboard_chart = std::option::Option::Some(v.into());
16272        self
16273    }
16274
16275    /// Sets or clears the value of [dashboard_chart][crate::model::EditChartResponse::dashboard_chart].
16276    ///
16277    /// # Example
16278    /// ```ignore,no_run
16279    /// # use google_cloud_chronicle_v1::model::EditChartResponse;
16280    /// use google_cloud_chronicle_v1::model::DashboardChart;
16281    /// let x = EditChartResponse::new().set_or_clear_dashboard_chart(Some(DashboardChart::default()/* use setters */));
16282    /// let x = EditChartResponse::new().set_or_clear_dashboard_chart(None::<DashboardChart>);
16283    /// ```
16284    pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
16285    where
16286        T: std::convert::Into<crate::model::DashboardChart>,
16287    {
16288        self.dashboard_chart = v.map(|x| x.into());
16289        self
16290    }
16291}
16292
16293impl wkt::message::Message for EditChartResponse {
16294    fn typename() -> &'static str {
16295        "type.googleapis.com/google.cloud.chronicle.v1.EditChartResponse"
16296    }
16297}
16298
16299/// Request message to remove chart from a dashboard.
16300#[derive(Clone, Default, PartialEq)]
16301#[non_exhaustive]
16302pub struct RemoveChartRequest {
16303    /// Required. The dashboard name to remove chart from.
16304    /// Format:
16305    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
16306    pub name: std::string::String,
16307
16308    /// Required. The dashboard chart name to remove.
16309    pub dashboard_chart: std::string::String,
16310
16311    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16312}
16313
16314impl RemoveChartRequest {
16315    /// Creates a new default instance.
16316    pub fn new() -> Self {
16317        std::default::Default::default()
16318    }
16319
16320    /// Sets the value of [name][crate::model::RemoveChartRequest::name].
16321    ///
16322    /// # Example
16323    /// ```ignore,no_run
16324    /// # use google_cloud_chronicle_v1::model::RemoveChartRequest;
16325    /// # let project_id = "project_id";
16326    /// # let location_id = "location_id";
16327    /// # let instance_id = "instance_id";
16328    /// # let dashboard_id = "dashboard_id";
16329    /// let x = RemoveChartRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
16330    /// ```
16331    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16332        self.name = v.into();
16333        self
16334    }
16335
16336    /// Sets the value of [dashboard_chart][crate::model::RemoveChartRequest::dashboard_chart].
16337    ///
16338    /// # Example
16339    /// ```ignore,no_run
16340    /// # use google_cloud_chronicle_v1::model::RemoveChartRequest;
16341    /// # let project_id = "project_id";
16342    /// # let location_id = "location_id";
16343    /// # let instance_id = "instance_id";
16344    /// # let chart_id = "chart_id";
16345    /// let x = RemoveChartRequest::new().set_dashboard_chart(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
16346    /// ```
16347    pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16348        self.dashboard_chart = v.into();
16349        self
16350    }
16351}
16352
16353impl wkt::message::Message for RemoveChartRequest {
16354    fn typename() -> &'static str {
16355        "type.googleapis.com/google.cloud.chronicle.v1.RemoveChartRequest"
16356    }
16357}
16358
16359/// Request message to duplicate chart in a dashboard.
16360#[derive(Clone, Default, PartialEq)]
16361#[non_exhaustive]
16362pub struct DuplicateChartRequest {
16363    /// Required. The dashboard name that involves chart duplication.
16364    /// Format:
16365    /// projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}
16366    pub name: std::string::String,
16367
16368    /// Required. The dashboard chart name to duplicate.
16369    pub dashboard_chart: std::string::String,
16370
16371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16372}
16373
16374impl DuplicateChartRequest {
16375    /// Creates a new default instance.
16376    pub fn new() -> Self {
16377        std::default::Default::default()
16378    }
16379
16380    /// Sets the value of [name][crate::model::DuplicateChartRequest::name].
16381    ///
16382    /// # Example
16383    /// ```ignore,no_run
16384    /// # use google_cloud_chronicle_v1::model::DuplicateChartRequest;
16385    /// # let project_id = "project_id";
16386    /// # let location_id = "location_id";
16387    /// # let instance_id = "instance_id";
16388    /// # let dashboard_id = "dashboard_id";
16389    /// let x = DuplicateChartRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"));
16390    /// ```
16391    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16392        self.name = v.into();
16393        self
16394    }
16395
16396    /// Sets the value of [dashboard_chart][crate::model::DuplicateChartRequest::dashboard_chart].
16397    ///
16398    /// # Example
16399    /// ```ignore,no_run
16400    /// # use google_cloud_chronicle_v1::model::DuplicateChartRequest;
16401    /// # let project_id = "project_id";
16402    /// # let location_id = "location_id";
16403    /// # let instance_id = "instance_id";
16404    /// # let chart_id = "chart_id";
16405    /// let x = DuplicateChartRequest::new().set_dashboard_chart(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
16406    /// ```
16407    pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16408        self.dashboard_chart = v.into();
16409        self
16410    }
16411}
16412
16413impl wkt::message::Message for DuplicateChartRequest {
16414    fn typename() -> &'static str {
16415        "type.googleapis.com/google.cloud.chronicle.v1.DuplicateChartRequest"
16416    }
16417}
16418
16419/// Response message for duplicating chart in a dashboard.
16420#[derive(Clone, Default, PartialEq)]
16421#[non_exhaustive]
16422pub struct DuplicateChartResponse {
16423    /// Dashboard with chart added in definition.
16424    pub native_dashboard: std::option::Option<crate::model::NativeDashboard>,
16425
16426    /// Duplicated chart resource.
16427    pub dashboard_chart: std::option::Option<crate::model::DashboardChart>,
16428
16429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16430}
16431
16432impl DuplicateChartResponse {
16433    /// Creates a new default instance.
16434    pub fn new() -> Self {
16435        std::default::Default::default()
16436    }
16437
16438    /// Sets the value of [native_dashboard][crate::model::DuplicateChartResponse::native_dashboard].
16439    ///
16440    /// # Example
16441    /// ```ignore,no_run
16442    /// # use google_cloud_chronicle_v1::model::DuplicateChartResponse;
16443    /// use google_cloud_chronicle_v1::model::NativeDashboard;
16444    /// let x = DuplicateChartResponse::new().set_native_dashboard(NativeDashboard::default()/* use setters */);
16445    /// ```
16446    pub fn set_native_dashboard<T>(mut self, v: T) -> Self
16447    where
16448        T: std::convert::Into<crate::model::NativeDashboard>,
16449    {
16450        self.native_dashboard = std::option::Option::Some(v.into());
16451        self
16452    }
16453
16454    /// Sets or clears the value of [native_dashboard][crate::model::DuplicateChartResponse::native_dashboard].
16455    ///
16456    /// # Example
16457    /// ```ignore,no_run
16458    /// # use google_cloud_chronicle_v1::model::DuplicateChartResponse;
16459    /// use google_cloud_chronicle_v1::model::NativeDashboard;
16460    /// let x = DuplicateChartResponse::new().set_or_clear_native_dashboard(Some(NativeDashboard::default()/* use setters */));
16461    /// let x = DuplicateChartResponse::new().set_or_clear_native_dashboard(None::<NativeDashboard>);
16462    /// ```
16463    pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
16464    where
16465        T: std::convert::Into<crate::model::NativeDashboard>,
16466    {
16467        self.native_dashboard = v.map(|x| x.into());
16468        self
16469    }
16470
16471    /// Sets the value of [dashboard_chart][crate::model::DuplicateChartResponse::dashboard_chart].
16472    ///
16473    /// # Example
16474    /// ```ignore,no_run
16475    /// # use google_cloud_chronicle_v1::model::DuplicateChartResponse;
16476    /// use google_cloud_chronicle_v1::model::DashboardChart;
16477    /// let x = DuplicateChartResponse::new().set_dashboard_chart(DashboardChart::default()/* use setters */);
16478    /// ```
16479    pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
16480    where
16481        T: std::convert::Into<crate::model::DashboardChart>,
16482    {
16483        self.dashboard_chart = std::option::Option::Some(v.into());
16484        self
16485    }
16486
16487    /// Sets or clears the value of [dashboard_chart][crate::model::DuplicateChartResponse::dashboard_chart].
16488    ///
16489    /// # Example
16490    /// ```ignore,no_run
16491    /// # use google_cloud_chronicle_v1::model::DuplicateChartResponse;
16492    /// use google_cloud_chronicle_v1::model::DashboardChart;
16493    /// let x = DuplicateChartResponse::new().set_or_clear_dashboard_chart(Some(DashboardChart::default()/* use setters */));
16494    /// let x = DuplicateChartResponse::new().set_or_clear_dashboard_chart(None::<DashboardChart>);
16495    /// ```
16496    pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
16497    where
16498        T: std::convert::Into<crate::model::DashboardChart>,
16499    {
16500        self.dashboard_chart = v.map(|x| x.into());
16501        self
16502    }
16503}
16504
16505impl wkt::message::Message for DuplicateChartResponse {
16506    fn typename() -> &'static str {
16507        "type.googleapis.com/google.cloud.chronicle.v1.DuplicateChartResponse"
16508    }
16509}
16510
16511/// User Data for Native Dashboard
16512#[derive(Clone, Default, PartialEq)]
16513#[non_exhaustive]
16514pub struct DashboardUserData {
16515    /// time when this dashboard is last viewed
16516    pub last_viewed_time: std::option::Option<wkt::Timestamp>,
16517
16518    /// is dashboard pinned by user
16519    pub is_pinned: bool,
16520
16521    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16522}
16523
16524impl DashboardUserData {
16525    /// Creates a new default instance.
16526    pub fn new() -> Self {
16527        std::default::Default::default()
16528    }
16529
16530    /// Sets the value of [last_viewed_time][crate::model::DashboardUserData::last_viewed_time].
16531    ///
16532    /// # Example
16533    /// ```ignore,no_run
16534    /// # use google_cloud_chronicle_v1::model::DashboardUserData;
16535    /// use wkt::Timestamp;
16536    /// let x = DashboardUserData::new().set_last_viewed_time(Timestamp::default()/* use setters */);
16537    /// ```
16538    pub fn set_last_viewed_time<T>(mut self, v: T) -> Self
16539    where
16540        T: std::convert::Into<wkt::Timestamp>,
16541    {
16542        self.last_viewed_time = std::option::Option::Some(v.into());
16543        self
16544    }
16545
16546    /// Sets or clears the value of [last_viewed_time][crate::model::DashboardUserData::last_viewed_time].
16547    ///
16548    /// # Example
16549    /// ```ignore,no_run
16550    /// # use google_cloud_chronicle_v1::model::DashboardUserData;
16551    /// use wkt::Timestamp;
16552    /// let x = DashboardUserData::new().set_or_clear_last_viewed_time(Some(Timestamp::default()/* use setters */));
16553    /// let x = DashboardUserData::new().set_or_clear_last_viewed_time(None::<Timestamp>);
16554    /// ```
16555    pub fn set_or_clear_last_viewed_time<T>(mut self, v: std::option::Option<T>) -> Self
16556    where
16557        T: std::convert::Into<wkt::Timestamp>,
16558    {
16559        self.last_viewed_time = v.map(|x| x.into());
16560        self
16561    }
16562
16563    /// Sets the value of [is_pinned][crate::model::DashboardUserData::is_pinned].
16564    ///
16565    /// # Example
16566    /// ```ignore,no_run
16567    /// # use google_cloud_chronicle_v1::model::DashboardUserData;
16568    /// let x = DashboardUserData::new().set_is_pinned(true);
16569    /// ```
16570    pub fn set_is_pinned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16571        self.is_pinned = v.into();
16572        self
16573    }
16574}
16575
16576impl wkt::message::Message for DashboardUserData {
16577    fn typename() -> &'static str {
16578        "type.googleapis.com/google.cloud.chronicle.v1.DashboardUserData"
16579    }
16580}
16581
16582/// Definition of the dashboard including filters, layout, charts'
16583/// configurations.
16584#[derive(Clone, Default, PartialEq)]
16585#[non_exhaustive]
16586pub struct DashboardDefinition {
16587    /// Filters for the dashboard.
16588    pub filters: std::vec::Vec<crate::model::DashboardFilter>,
16589
16590    /// Fingerprint of the dashboard definition.
16591    pub fingerprint: std::string::String,
16592
16593    /// Charts in the dashboard.
16594    pub charts: std::vec::Vec<crate::model::dashboard_definition::ChartConfig>,
16595
16596    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16597}
16598
16599impl DashboardDefinition {
16600    /// Creates a new default instance.
16601    pub fn new() -> Self {
16602        std::default::Default::default()
16603    }
16604
16605    /// Sets the value of [filters][crate::model::DashboardDefinition::filters].
16606    ///
16607    /// # Example
16608    /// ```ignore,no_run
16609    /// # use google_cloud_chronicle_v1::model::DashboardDefinition;
16610    /// use google_cloud_chronicle_v1::model::DashboardFilter;
16611    /// let x = DashboardDefinition::new()
16612    ///     .set_filters([
16613    ///         DashboardFilter::default()/* use setters */,
16614    ///         DashboardFilter::default()/* use (different) setters */,
16615    ///     ]);
16616    /// ```
16617    pub fn set_filters<T, V>(mut self, v: T) -> Self
16618    where
16619        T: std::iter::IntoIterator<Item = V>,
16620        V: std::convert::Into<crate::model::DashboardFilter>,
16621    {
16622        use std::iter::Iterator;
16623        self.filters = v.into_iter().map(|i| i.into()).collect();
16624        self
16625    }
16626
16627    /// Sets the value of [fingerprint][crate::model::DashboardDefinition::fingerprint].
16628    ///
16629    /// # Example
16630    /// ```ignore,no_run
16631    /// # use google_cloud_chronicle_v1::model::DashboardDefinition;
16632    /// let x = DashboardDefinition::new().set_fingerprint("example");
16633    /// ```
16634    pub fn set_fingerprint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16635        self.fingerprint = v.into();
16636        self
16637    }
16638
16639    /// Sets the value of [charts][crate::model::DashboardDefinition::charts].
16640    ///
16641    /// # Example
16642    /// ```ignore,no_run
16643    /// # use google_cloud_chronicle_v1::model::DashboardDefinition;
16644    /// use google_cloud_chronicle_v1::model::dashboard_definition::ChartConfig;
16645    /// let x = DashboardDefinition::new()
16646    ///     .set_charts([
16647    ///         ChartConfig::default()/* use setters */,
16648    ///         ChartConfig::default()/* use (different) setters */,
16649    ///     ]);
16650    /// ```
16651    pub fn set_charts<T, V>(mut self, v: T) -> Self
16652    where
16653        T: std::iter::IntoIterator<Item = V>,
16654        V: std::convert::Into<crate::model::dashboard_definition::ChartConfig>,
16655    {
16656        use std::iter::Iterator;
16657        self.charts = v.into_iter().map(|i| i.into()).collect();
16658        self
16659    }
16660}
16661
16662impl wkt::message::Message for DashboardDefinition {
16663    fn typename() -> &'static str {
16664        "type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition"
16665    }
16666}
16667
16668/// Defines additional types related to [DashboardDefinition].
16669pub mod dashboard_definition {
16670    #[allow(unused_imports)]
16671    use super::*;
16672
16673    /// Configuration of the chart including chart reference, layout and filters.
16674    #[derive(Clone, Default, PartialEq)]
16675    #[non_exhaustive]
16676    pub struct ChartConfig {
16677        #[allow(missing_docs)]
16678        pub dashboard_chart: std::string::String,
16679
16680        #[allow(missing_docs)]
16681        pub chart_layout:
16682            std::option::Option<crate::model::dashboard_definition::chart_config::ChartLayout>,
16683
16684        /// Dashboard filters applied to the chart.
16685        pub filters_ids: std::vec::Vec<std::string::String>,
16686
16687        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16688    }
16689
16690    impl ChartConfig {
16691        /// Creates a new default instance.
16692        pub fn new() -> Self {
16693            std::default::Default::default()
16694        }
16695
16696        /// Sets the value of [dashboard_chart][crate::model::dashboard_definition::ChartConfig::dashboard_chart].
16697        ///
16698        /// # Example
16699        /// ```ignore,no_run
16700        /// # use google_cloud_chronicle_v1::model::dashboard_definition::ChartConfig;
16701        /// # let project_id = "project_id";
16702        /// # let location_id = "location_id";
16703        /// # let instance_id = "instance_id";
16704        /// # let chart_id = "chart_id";
16705        /// let x = ChartConfig::new().set_dashboard_chart(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dashboardCharts/{chart_id}"));
16706        /// ```
16707        pub fn set_dashboard_chart<T: std::convert::Into<std::string::String>>(
16708            mut self,
16709            v: T,
16710        ) -> Self {
16711            self.dashboard_chart = v.into();
16712            self
16713        }
16714
16715        /// Sets the value of [chart_layout][crate::model::dashboard_definition::ChartConfig::chart_layout].
16716        ///
16717        /// # Example
16718        /// ```ignore,no_run
16719        /// # use google_cloud_chronicle_v1::model::dashboard_definition::ChartConfig;
16720        /// use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16721        /// let x = ChartConfig::new().set_chart_layout(ChartLayout::default()/* use setters */);
16722        /// ```
16723        pub fn set_chart_layout<T>(mut self, v: T) -> Self
16724        where
16725            T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
16726        {
16727            self.chart_layout = std::option::Option::Some(v.into());
16728            self
16729        }
16730
16731        /// Sets or clears the value of [chart_layout][crate::model::dashboard_definition::ChartConfig::chart_layout].
16732        ///
16733        /// # Example
16734        /// ```ignore,no_run
16735        /// # use google_cloud_chronicle_v1::model::dashboard_definition::ChartConfig;
16736        /// use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16737        /// let x = ChartConfig::new().set_or_clear_chart_layout(Some(ChartLayout::default()/* use setters */));
16738        /// let x = ChartConfig::new().set_or_clear_chart_layout(None::<ChartLayout>);
16739        /// ```
16740        pub fn set_or_clear_chart_layout<T>(mut self, v: std::option::Option<T>) -> Self
16741        where
16742            T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
16743        {
16744            self.chart_layout = v.map(|x| x.into());
16745            self
16746        }
16747
16748        /// Sets the value of [filters_ids][crate::model::dashboard_definition::ChartConfig::filters_ids].
16749        ///
16750        /// # Example
16751        /// ```ignore,no_run
16752        /// # use google_cloud_chronicle_v1::model::dashboard_definition::ChartConfig;
16753        /// let x = ChartConfig::new().set_filters_ids(["a", "b", "c"]);
16754        /// ```
16755        pub fn set_filters_ids<T, V>(mut self, v: T) -> Self
16756        where
16757            T: std::iter::IntoIterator<Item = V>,
16758            V: std::convert::Into<std::string::String>,
16759        {
16760            use std::iter::Iterator;
16761            self.filters_ids = v.into_iter().map(|i| i.into()).collect();
16762            self
16763        }
16764    }
16765
16766    impl wkt::message::Message for ChartConfig {
16767        fn typename() -> &'static str {
16768            "type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition.ChartConfig"
16769        }
16770    }
16771
16772    /// Defines additional types related to [ChartConfig].
16773    pub mod chart_config {
16774        #[allow(unused_imports)]
16775        use super::*;
16776
16777        /// Layout of the chart.
16778        #[derive(Clone, Default, PartialEq)]
16779        #[non_exhaustive]
16780        pub struct ChartLayout {
16781            #[allow(missing_docs)]
16782            pub start_x: std::option::Option<i32>,
16783
16784            #[allow(missing_docs)]
16785            pub span_x: i32,
16786
16787            #[allow(missing_docs)]
16788            pub start_y: std::option::Option<i32>,
16789
16790            #[allow(missing_docs)]
16791            pub span_y: i32,
16792
16793            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16794        }
16795
16796        impl ChartLayout {
16797            /// Creates a new default instance.
16798            pub fn new() -> Self {
16799                std::default::Default::default()
16800            }
16801
16802            /// Sets the value of [start_x][crate::model::dashboard_definition::chart_config::ChartLayout::start_x].
16803            ///
16804            /// # Example
16805            /// ```ignore,no_run
16806            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16807            /// let x = ChartLayout::new().set_start_x(42);
16808            /// ```
16809            pub fn set_start_x<T>(mut self, v: T) -> Self
16810            where
16811                T: std::convert::Into<i32>,
16812            {
16813                self.start_x = std::option::Option::Some(v.into());
16814                self
16815            }
16816
16817            /// Sets or clears the value of [start_x][crate::model::dashboard_definition::chart_config::ChartLayout::start_x].
16818            ///
16819            /// # Example
16820            /// ```ignore,no_run
16821            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16822            /// let x = ChartLayout::new().set_or_clear_start_x(Some(42));
16823            /// let x = ChartLayout::new().set_or_clear_start_x(None::<i32>);
16824            /// ```
16825            pub fn set_or_clear_start_x<T>(mut self, v: std::option::Option<T>) -> Self
16826            where
16827                T: std::convert::Into<i32>,
16828            {
16829                self.start_x = v.map(|x| x.into());
16830                self
16831            }
16832
16833            /// Sets the value of [span_x][crate::model::dashboard_definition::chart_config::ChartLayout::span_x].
16834            ///
16835            /// # Example
16836            /// ```ignore,no_run
16837            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16838            /// let x = ChartLayout::new().set_span_x(42);
16839            /// ```
16840            pub fn set_span_x<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16841                self.span_x = v.into();
16842                self
16843            }
16844
16845            /// Sets the value of [start_y][crate::model::dashboard_definition::chart_config::ChartLayout::start_y].
16846            ///
16847            /// # Example
16848            /// ```ignore,no_run
16849            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16850            /// let x = ChartLayout::new().set_start_y(42);
16851            /// ```
16852            pub fn set_start_y<T>(mut self, v: T) -> Self
16853            where
16854                T: std::convert::Into<i32>,
16855            {
16856                self.start_y = std::option::Option::Some(v.into());
16857                self
16858            }
16859
16860            /// Sets or clears the value of [start_y][crate::model::dashboard_definition::chart_config::ChartLayout::start_y].
16861            ///
16862            /// # Example
16863            /// ```ignore,no_run
16864            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16865            /// let x = ChartLayout::new().set_or_clear_start_y(Some(42));
16866            /// let x = ChartLayout::new().set_or_clear_start_y(None::<i32>);
16867            /// ```
16868            pub fn set_or_clear_start_y<T>(mut self, v: std::option::Option<T>) -> Self
16869            where
16870                T: std::convert::Into<i32>,
16871            {
16872                self.start_y = v.map(|x| x.into());
16873                self
16874            }
16875
16876            /// Sets the value of [span_y][crate::model::dashboard_definition::chart_config::ChartLayout::span_y].
16877            ///
16878            /// # Example
16879            /// ```ignore,no_run
16880            /// # use google_cloud_chronicle_v1::model::dashboard_definition::chart_config::ChartLayout;
16881            /// let x = ChartLayout::new().set_span_y(42);
16882            /// ```
16883            pub fn set_span_y<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16884                self.span_y = v.into();
16885                self
16886            }
16887        }
16888
16889        impl wkt::message::Message for ChartLayout {
16890            fn typename() -> &'static str {
16891                "type.googleapis.com/google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout"
16892            }
16893        }
16894    }
16895}
16896
16897/// ScopeInfo specifies the scope info of the reference list.
16898#[derive(Clone, Default, PartialEq)]
16899#[non_exhaustive]
16900pub struct ScopeInfo {
16901    /// Required. The list of scope names of the reference list, if the list is
16902    /// empty the reference list is treated as unscoped.
16903    pub reference_list_scope: std::option::Option<crate::model::ReferenceListScope>,
16904
16905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16906}
16907
16908impl ScopeInfo {
16909    /// Creates a new default instance.
16910    pub fn new() -> Self {
16911        std::default::Default::default()
16912    }
16913
16914    /// Sets the value of [reference_list_scope][crate::model::ScopeInfo::reference_list_scope].
16915    ///
16916    /// # Example
16917    /// ```ignore,no_run
16918    /// # use google_cloud_chronicle_v1::model::ScopeInfo;
16919    /// use google_cloud_chronicle_v1::model::ReferenceListScope;
16920    /// let x = ScopeInfo::new().set_reference_list_scope(ReferenceListScope::default()/* use setters */);
16921    /// ```
16922    pub fn set_reference_list_scope<T>(mut self, v: T) -> Self
16923    where
16924        T: std::convert::Into<crate::model::ReferenceListScope>,
16925    {
16926        self.reference_list_scope = std::option::Option::Some(v.into());
16927        self
16928    }
16929
16930    /// Sets or clears the value of [reference_list_scope][crate::model::ScopeInfo::reference_list_scope].
16931    ///
16932    /// # Example
16933    /// ```ignore,no_run
16934    /// # use google_cloud_chronicle_v1::model::ScopeInfo;
16935    /// use google_cloud_chronicle_v1::model::ReferenceListScope;
16936    /// let x = ScopeInfo::new().set_or_clear_reference_list_scope(Some(ReferenceListScope::default()/* use setters */));
16937    /// let x = ScopeInfo::new().set_or_clear_reference_list_scope(None::<ReferenceListScope>);
16938    /// ```
16939    pub fn set_or_clear_reference_list_scope<T>(mut self, v: std::option::Option<T>) -> Self
16940    where
16941        T: std::convert::Into<crate::model::ReferenceListScope>,
16942    {
16943        self.reference_list_scope = v.map(|x| x.into());
16944        self
16945    }
16946}
16947
16948impl wkt::message::Message for ScopeInfo {
16949    fn typename() -> &'static str {
16950        "type.googleapis.com/google.cloud.chronicle.v1.ScopeInfo"
16951    }
16952}
16953
16954/// ReferenceListScope specifies the list of scope names of the reference list.
16955#[derive(Clone, Default, PartialEq)]
16956#[non_exhaustive]
16957pub struct ReferenceListScope {
16958    /// Optional. The list of scope names of the reference list. The scope names
16959    /// should be full resource names and should be of the format:
16960    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`.
16961    pub scope_names: std::vec::Vec<std::string::String>,
16962
16963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16964}
16965
16966impl ReferenceListScope {
16967    /// Creates a new default instance.
16968    pub fn new() -> Self {
16969        std::default::Default::default()
16970    }
16971
16972    /// Sets the value of [scope_names][crate::model::ReferenceListScope::scope_names].
16973    ///
16974    /// # Example
16975    /// ```ignore,no_run
16976    /// # use google_cloud_chronicle_v1::model::ReferenceListScope;
16977    /// let x = ReferenceListScope::new().set_scope_names(["a", "b", "c"]);
16978    /// ```
16979    pub fn set_scope_names<T, V>(mut self, v: T) -> Self
16980    where
16981        T: std::iter::IntoIterator<Item = V>,
16982        V: std::convert::Into<std::string::String>,
16983    {
16984        use std::iter::Iterator;
16985        self.scope_names = v.into_iter().map(|i| i.into()).collect();
16986        self
16987    }
16988}
16989
16990impl wkt::message::Message for ReferenceListScope {
16991    fn typename() -> &'static str {
16992        "type.googleapis.com/google.cloud.chronicle.v1.ReferenceListScope"
16993    }
16994}
16995
16996/// A request to get details about a reference list.
16997#[derive(Clone, Default, PartialEq)]
16998#[non_exhaustive]
16999pub struct GetReferenceListRequest {
17000    /// Required. The resource name of the reference list to retrieve.
17001    /// Format:
17002    /// `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}`
17003    pub name: std::string::String,
17004
17005    /// How much of the ReferenceList to view. Defaults to
17006    /// REFERENCE_LIST_VIEW_FULL.
17007    pub view: crate::model::ReferenceListView,
17008
17009    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17010}
17011
17012impl GetReferenceListRequest {
17013    /// Creates a new default instance.
17014    pub fn new() -> Self {
17015        std::default::Default::default()
17016    }
17017
17018    /// Sets the value of [name][crate::model::GetReferenceListRequest::name].
17019    ///
17020    /// # Example
17021    /// ```ignore,no_run
17022    /// # use google_cloud_chronicle_v1::model::GetReferenceListRequest;
17023    /// # let project_id = "project_id";
17024    /// # let location_id = "location_id";
17025    /// # let instance_id = "instance_id";
17026    /// # let reference_list_id = "reference_list_id";
17027    /// let x = GetReferenceListRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/referenceLists/{reference_list_id}"));
17028    /// ```
17029    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17030        self.name = v.into();
17031        self
17032    }
17033
17034    /// Sets the value of [view][crate::model::GetReferenceListRequest::view].
17035    ///
17036    /// # Example
17037    /// ```ignore,no_run
17038    /// # use google_cloud_chronicle_v1::model::GetReferenceListRequest;
17039    /// use google_cloud_chronicle_v1::model::ReferenceListView;
17040    /// let x0 = GetReferenceListRequest::new().set_view(ReferenceListView::Basic);
17041    /// let x1 = GetReferenceListRequest::new().set_view(ReferenceListView::Full);
17042    /// ```
17043    pub fn set_view<T: std::convert::Into<crate::model::ReferenceListView>>(
17044        mut self,
17045        v: T,
17046    ) -> Self {
17047        self.view = v.into();
17048        self
17049    }
17050}
17051
17052impl wkt::message::Message for GetReferenceListRequest {
17053    fn typename() -> &'static str {
17054        "type.googleapis.com/google.cloud.chronicle.v1.GetReferenceListRequest"
17055    }
17056}
17057
17058/// A request for a list of reference lists.
17059#[derive(Clone, Default, PartialEq)]
17060#[non_exhaustive]
17061pub struct ListReferenceListsRequest {
17062    /// Required. The parent, which owns this collection of reference lists.
17063    /// Format:
17064    /// `projects/{project}/locations/{location}/instances/{instance}`
17065    pub parent: std::string::String,
17066
17067    /// The maximum number of reference lists to return.
17068    /// The service may return fewer than this value.
17069    /// If unspecified, at most 100 reference lists will be returned.
17070    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
17071    pub page_size: i32,
17072
17073    /// A page token, received from a previous `ListReferenceLists` call.
17074    /// Provide this to retrieve the subsequent page.
17075    /// When paginating, all other parameters provided to `ListReferenceLists` must
17076    /// match the call that provided the page token.
17077    pub page_token: std::string::String,
17078
17079    /// How much of each ReferenceList to view. Defaults to
17080    /// REFERENCE_LIST_VIEW_BASIC.
17081    pub view: crate::model::ReferenceListView,
17082
17083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17084}
17085
17086impl ListReferenceListsRequest {
17087    /// Creates a new default instance.
17088    pub fn new() -> Self {
17089        std::default::Default::default()
17090    }
17091
17092    /// Sets the value of [parent][crate::model::ListReferenceListsRequest::parent].
17093    ///
17094    /// # Example
17095    /// ```ignore,no_run
17096    /// # use google_cloud_chronicle_v1::model::ListReferenceListsRequest;
17097    /// # let project_id = "project_id";
17098    /// # let location_id = "location_id";
17099    /// # let instance_id = "instance_id";
17100    /// let x = ListReferenceListsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
17101    /// ```
17102    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17103        self.parent = v.into();
17104        self
17105    }
17106
17107    /// Sets the value of [page_size][crate::model::ListReferenceListsRequest::page_size].
17108    ///
17109    /// # Example
17110    /// ```ignore,no_run
17111    /// # use google_cloud_chronicle_v1::model::ListReferenceListsRequest;
17112    /// let x = ListReferenceListsRequest::new().set_page_size(42);
17113    /// ```
17114    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17115        self.page_size = v.into();
17116        self
17117    }
17118
17119    /// Sets the value of [page_token][crate::model::ListReferenceListsRequest::page_token].
17120    ///
17121    /// # Example
17122    /// ```ignore,no_run
17123    /// # use google_cloud_chronicle_v1::model::ListReferenceListsRequest;
17124    /// let x = ListReferenceListsRequest::new().set_page_token("example");
17125    /// ```
17126    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17127        self.page_token = v.into();
17128        self
17129    }
17130
17131    /// Sets the value of [view][crate::model::ListReferenceListsRequest::view].
17132    ///
17133    /// # Example
17134    /// ```ignore,no_run
17135    /// # use google_cloud_chronicle_v1::model::ListReferenceListsRequest;
17136    /// use google_cloud_chronicle_v1::model::ReferenceListView;
17137    /// let x0 = ListReferenceListsRequest::new().set_view(ReferenceListView::Basic);
17138    /// let x1 = ListReferenceListsRequest::new().set_view(ReferenceListView::Full);
17139    /// ```
17140    pub fn set_view<T: std::convert::Into<crate::model::ReferenceListView>>(
17141        mut self,
17142        v: T,
17143    ) -> Self {
17144        self.view = v.into();
17145        self
17146    }
17147}
17148
17149impl wkt::message::Message for ListReferenceListsRequest {
17150    fn typename() -> &'static str {
17151        "type.googleapis.com/google.cloud.chronicle.v1.ListReferenceListsRequest"
17152    }
17153}
17154
17155/// A response to a request for a list of reference lists.
17156#[derive(Clone, Default, PartialEq)]
17157#[non_exhaustive]
17158pub struct ListReferenceListsResponse {
17159    /// The reference lists.
17160    /// Ordered in ascending alphabetical order by name.
17161    pub reference_lists: std::vec::Vec<crate::model::ReferenceList>,
17162
17163    /// A token, which can be sent as `page_token` to retrieve the next page.
17164    /// If this field is omitted, there are no subsequent pages.
17165    pub next_page_token: std::string::String,
17166
17167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17168}
17169
17170impl ListReferenceListsResponse {
17171    /// Creates a new default instance.
17172    pub fn new() -> Self {
17173        std::default::Default::default()
17174    }
17175
17176    /// Sets the value of [reference_lists][crate::model::ListReferenceListsResponse::reference_lists].
17177    ///
17178    /// # Example
17179    /// ```ignore,no_run
17180    /// # use google_cloud_chronicle_v1::model::ListReferenceListsResponse;
17181    /// use google_cloud_chronicle_v1::model::ReferenceList;
17182    /// let x = ListReferenceListsResponse::new()
17183    ///     .set_reference_lists([
17184    ///         ReferenceList::default()/* use setters */,
17185    ///         ReferenceList::default()/* use (different) setters */,
17186    ///     ]);
17187    /// ```
17188    pub fn set_reference_lists<T, V>(mut self, v: T) -> Self
17189    where
17190        T: std::iter::IntoIterator<Item = V>,
17191        V: std::convert::Into<crate::model::ReferenceList>,
17192    {
17193        use std::iter::Iterator;
17194        self.reference_lists = v.into_iter().map(|i| i.into()).collect();
17195        self
17196    }
17197
17198    /// Sets the value of [next_page_token][crate::model::ListReferenceListsResponse::next_page_token].
17199    ///
17200    /// # Example
17201    /// ```ignore,no_run
17202    /// # use google_cloud_chronicle_v1::model::ListReferenceListsResponse;
17203    /// let x = ListReferenceListsResponse::new().set_next_page_token("example");
17204    /// ```
17205    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17206        self.next_page_token = v.into();
17207        self
17208    }
17209}
17210
17211impl wkt::message::Message for ListReferenceListsResponse {
17212    fn typename() -> &'static str {
17213        "type.googleapis.com/google.cloud.chronicle.v1.ListReferenceListsResponse"
17214    }
17215}
17216
17217#[doc(hidden)]
17218impl google_cloud_gax::paginator::internal::PageableResponse for ListReferenceListsResponse {
17219    type PageItem = crate::model::ReferenceList;
17220
17221    fn items(self) -> std::vec::Vec<Self::PageItem> {
17222        self.reference_lists
17223    }
17224
17225    fn next_page_token(&self) -> std::string::String {
17226        use std::clone::Clone;
17227        self.next_page_token.clone()
17228    }
17229}
17230
17231/// A request to create a reference list.
17232#[derive(Clone, Default, PartialEq)]
17233#[non_exhaustive]
17234pub struct CreateReferenceListRequest {
17235    /// Required. The parent resource where this reference list will be created.
17236    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
17237    pub parent: std::string::String,
17238
17239    /// Required. The reference list to create.
17240    pub reference_list: std::option::Option<crate::model::ReferenceList>,
17241
17242    /// Required. The ID to use for the reference list. This is also the display
17243    /// name for the reference list. It must satisfy the following requirements:
17244    ///
17245    /// - Starts with letter.
17246    /// - Contains only letters, numbers and underscore.
17247    /// - Has length less than 256.
17248    /// - Must be unique.
17249    pub reference_list_id: std::string::String,
17250
17251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17252}
17253
17254impl CreateReferenceListRequest {
17255    /// Creates a new default instance.
17256    pub fn new() -> Self {
17257        std::default::Default::default()
17258    }
17259
17260    /// Sets the value of [parent][crate::model::CreateReferenceListRequest::parent].
17261    ///
17262    /// # Example
17263    /// ```ignore,no_run
17264    /// # use google_cloud_chronicle_v1::model::CreateReferenceListRequest;
17265    /// # let project_id = "project_id";
17266    /// # let location_id = "location_id";
17267    /// # let instance_id = "instance_id";
17268    /// let x = CreateReferenceListRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
17269    /// ```
17270    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17271        self.parent = v.into();
17272        self
17273    }
17274
17275    /// Sets the value of [reference_list][crate::model::CreateReferenceListRequest::reference_list].
17276    ///
17277    /// # Example
17278    /// ```ignore,no_run
17279    /// # use google_cloud_chronicle_v1::model::CreateReferenceListRequest;
17280    /// use google_cloud_chronicle_v1::model::ReferenceList;
17281    /// let x = CreateReferenceListRequest::new().set_reference_list(ReferenceList::default()/* use setters */);
17282    /// ```
17283    pub fn set_reference_list<T>(mut self, v: T) -> Self
17284    where
17285        T: std::convert::Into<crate::model::ReferenceList>,
17286    {
17287        self.reference_list = std::option::Option::Some(v.into());
17288        self
17289    }
17290
17291    /// Sets or clears the value of [reference_list][crate::model::CreateReferenceListRequest::reference_list].
17292    ///
17293    /// # Example
17294    /// ```ignore,no_run
17295    /// # use google_cloud_chronicle_v1::model::CreateReferenceListRequest;
17296    /// use google_cloud_chronicle_v1::model::ReferenceList;
17297    /// let x = CreateReferenceListRequest::new().set_or_clear_reference_list(Some(ReferenceList::default()/* use setters */));
17298    /// let x = CreateReferenceListRequest::new().set_or_clear_reference_list(None::<ReferenceList>);
17299    /// ```
17300    pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
17301    where
17302        T: std::convert::Into<crate::model::ReferenceList>,
17303    {
17304        self.reference_list = v.map(|x| x.into());
17305        self
17306    }
17307
17308    /// Sets the value of [reference_list_id][crate::model::CreateReferenceListRequest::reference_list_id].
17309    ///
17310    /// # Example
17311    /// ```ignore,no_run
17312    /// # use google_cloud_chronicle_v1::model::CreateReferenceListRequest;
17313    /// let x = CreateReferenceListRequest::new().set_reference_list_id("example");
17314    /// ```
17315    pub fn set_reference_list_id<T: std::convert::Into<std::string::String>>(
17316        mut self,
17317        v: T,
17318    ) -> Self {
17319        self.reference_list_id = v.into();
17320        self
17321    }
17322}
17323
17324impl wkt::message::Message for CreateReferenceListRequest {
17325    fn typename() -> &'static str {
17326        "type.googleapis.com/google.cloud.chronicle.v1.CreateReferenceListRequest"
17327    }
17328}
17329
17330/// A request to update a reference list.
17331#[derive(Clone, Default, PartialEq)]
17332#[non_exhaustive]
17333pub struct UpdateReferenceListRequest {
17334    /// Required. The reference list to update.
17335    ///
17336    /// The reference list's `name` field is used to identify the reference list to
17337    /// update.
17338    /// Format:
17339    /// `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}`
17340    pub reference_list: std::option::Option<crate::model::ReferenceList>,
17341
17342    /// The list of fields to update.
17343    /// When no field mask is supplied, all non-empty fields will be updated.
17344    /// A field mask of "*" will update all fields, whether empty or not.
17345    pub update_mask: std::option::Option<wkt::FieldMask>,
17346
17347    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17348}
17349
17350impl UpdateReferenceListRequest {
17351    /// Creates a new default instance.
17352    pub fn new() -> Self {
17353        std::default::Default::default()
17354    }
17355
17356    /// Sets the value of [reference_list][crate::model::UpdateReferenceListRequest::reference_list].
17357    ///
17358    /// # Example
17359    /// ```ignore,no_run
17360    /// # use google_cloud_chronicle_v1::model::UpdateReferenceListRequest;
17361    /// use google_cloud_chronicle_v1::model::ReferenceList;
17362    /// let x = UpdateReferenceListRequest::new().set_reference_list(ReferenceList::default()/* use setters */);
17363    /// ```
17364    pub fn set_reference_list<T>(mut self, v: T) -> Self
17365    where
17366        T: std::convert::Into<crate::model::ReferenceList>,
17367    {
17368        self.reference_list = std::option::Option::Some(v.into());
17369        self
17370    }
17371
17372    /// Sets or clears the value of [reference_list][crate::model::UpdateReferenceListRequest::reference_list].
17373    ///
17374    /// # Example
17375    /// ```ignore,no_run
17376    /// # use google_cloud_chronicle_v1::model::UpdateReferenceListRequest;
17377    /// use google_cloud_chronicle_v1::model::ReferenceList;
17378    /// let x = UpdateReferenceListRequest::new().set_or_clear_reference_list(Some(ReferenceList::default()/* use setters */));
17379    /// let x = UpdateReferenceListRequest::new().set_or_clear_reference_list(None::<ReferenceList>);
17380    /// ```
17381    pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
17382    where
17383        T: std::convert::Into<crate::model::ReferenceList>,
17384    {
17385        self.reference_list = v.map(|x| x.into());
17386        self
17387    }
17388
17389    /// Sets the value of [update_mask][crate::model::UpdateReferenceListRequest::update_mask].
17390    ///
17391    /// # Example
17392    /// ```ignore,no_run
17393    /// # use google_cloud_chronicle_v1::model::UpdateReferenceListRequest;
17394    /// use wkt::FieldMask;
17395    /// let x = UpdateReferenceListRequest::new().set_update_mask(FieldMask::default()/* use setters */);
17396    /// ```
17397    pub fn set_update_mask<T>(mut self, v: T) -> Self
17398    where
17399        T: std::convert::Into<wkt::FieldMask>,
17400    {
17401        self.update_mask = std::option::Option::Some(v.into());
17402        self
17403    }
17404
17405    /// Sets or clears the value of [update_mask][crate::model::UpdateReferenceListRequest::update_mask].
17406    ///
17407    /// # Example
17408    /// ```ignore,no_run
17409    /// # use google_cloud_chronicle_v1::model::UpdateReferenceListRequest;
17410    /// use wkt::FieldMask;
17411    /// let x = UpdateReferenceListRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
17412    /// let x = UpdateReferenceListRequest::new().set_or_clear_update_mask(None::<FieldMask>);
17413    /// ```
17414    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17415    where
17416        T: std::convert::Into<wkt::FieldMask>,
17417    {
17418        self.update_mask = v.map(|x| x.into());
17419        self
17420    }
17421}
17422
17423impl wkt::message::Message for UpdateReferenceListRequest {
17424    fn typename() -> &'static str {
17425        "type.googleapis.com/google.cloud.chronicle.v1.UpdateReferenceListRequest"
17426    }
17427}
17428
17429/// A reference list.
17430/// Reference lists are user-defined lists of values which users can
17431/// use in multiple Rules.
17432#[derive(Clone, Default, PartialEq)]
17433#[non_exhaustive]
17434pub struct ReferenceList {
17435    /// Identifier. The resource name of the reference list.
17436    /// Format:
17437    /// `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}`
17438    pub name: std::string::String,
17439
17440    /// Output only. The unique display name of the reference list.
17441    pub display_name: std::string::String,
17442
17443    /// Output only. The timestamp when the reference list was last updated.
17444    pub revision_create_time: std::option::Option<wkt::Timestamp>,
17445
17446    /// Required. A user-provided description of the reference list.
17447    pub description: std::string::String,
17448
17449    /// Required. The entries of the reference list.
17450    /// When listed, they are returned in the order that was specified at creation
17451    /// or update. The combined size of the values of the reference list may not
17452    /// exceed 6MB.
17453    /// This is returned only when the view is REFERENCE_LIST_VIEW_FULL.
17454    pub entries: std::vec::Vec<crate::model::ReferenceListEntry>,
17455
17456    /// Output only. The resource names for the associated self-authored Rules that
17457    /// use this reference list. This is returned only when the view is
17458    /// REFERENCE_LIST_VIEW_FULL.
17459    pub rules: std::vec::Vec<std::string::String>,
17460
17461    /// Required. The syntax type indicating how list entries should be validated.
17462    pub syntax_type: crate::model::ReferenceListSyntaxType,
17463
17464    /// Output only. The count of self-authored rules using the reference list.
17465    pub rule_associations_count: i32,
17466
17467    /// The scope info of the reference list.
17468    /// During reference list creation, if this field is not set, the reference
17469    /// list without scopes (an unscoped list) will be created for an unscoped
17470    /// user. For a scoped user, this field must be set. During reference list
17471    /// update, if scope_info is requested to be updated, this field must be set.
17472    pub scope_info: std::option::Option<crate::model::ScopeInfo>,
17473
17474    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17475}
17476
17477impl ReferenceList {
17478    /// Creates a new default instance.
17479    pub fn new() -> Self {
17480        std::default::Default::default()
17481    }
17482
17483    /// Sets the value of [name][crate::model::ReferenceList::name].
17484    ///
17485    /// # Example
17486    /// ```ignore,no_run
17487    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17488    /// # let project_id = "project_id";
17489    /// # let location_id = "location_id";
17490    /// # let instance_id = "instance_id";
17491    /// # let reference_list_id = "reference_list_id";
17492    /// let x = ReferenceList::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/referenceLists/{reference_list_id}"));
17493    /// ```
17494    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17495        self.name = v.into();
17496        self
17497    }
17498
17499    /// Sets the value of [display_name][crate::model::ReferenceList::display_name].
17500    ///
17501    /// # Example
17502    /// ```ignore,no_run
17503    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17504    /// let x = ReferenceList::new().set_display_name("example");
17505    /// ```
17506    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17507        self.display_name = v.into();
17508        self
17509    }
17510
17511    /// Sets the value of [revision_create_time][crate::model::ReferenceList::revision_create_time].
17512    ///
17513    /// # Example
17514    /// ```ignore,no_run
17515    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17516    /// use wkt::Timestamp;
17517    /// let x = ReferenceList::new().set_revision_create_time(Timestamp::default()/* use setters */);
17518    /// ```
17519    pub fn set_revision_create_time<T>(mut self, v: T) -> Self
17520    where
17521        T: std::convert::Into<wkt::Timestamp>,
17522    {
17523        self.revision_create_time = std::option::Option::Some(v.into());
17524        self
17525    }
17526
17527    /// Sets or clears the value of [revision_create_time][crate::model::ReferenceList::revision_create_time].
17528    ///
17529    /// # Example
17530    /// ```ignore,no_run
17531    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17532    /// use wkt::Timestamp;
17533    /// let x = ReferenceList::new().set_or_clear_revision_create_time(Some(Timestamp::default()/* use setters */));
17534    /// let x = ReferenceList::new().set_or_clear_revision_create_time(None::<Timestamp>);
17535    /// ```
17536    pub fn set_or_clear_revision_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17537    where
17538        T: std::convert::Into<wkt::Timestamp>,
17539    {
17540        self.revision_create_time = v.map(|x| x.into());
17541        self
17542    }
17543
17544    /// Sets the value of [description][crate::model::ReferenceList::description].
17545    ///
17546    /// # Example
17547    /// ```ignore,no_run
17548    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17549    /// let x = ReferenceList::new().set_description("example");
17550    /// ```
17551    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17552        self.description = v.into();
17553        self
17554    }
17555
17556    /// Sets the value of [entries][crate::model::ReferenceList::entries].
17557    ///
17558    /// # Example
17559    /// ```ignore,no_run
17560    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17561    /// use google_cloud_chronicle_v1::model::ReferenceListEntry;
17562    /// let x = ReferenceList::new()
17563    ///     .set_entries([
17564    ///         ReferenceListEntry::default()/* use setters */,
17565    ///         ReferenceListEntry::default()/* use (different) setters */,
17566    ///     ]);
17567    /// ```
17568    pub fn set_entries<T, V>(mut self, v: T) -> Self
17569    where
17570        T: std::iter::IntoIterator<Item = V>,
17571        V: std::convert::Into<crate::model::ReferenceListEntry>,
17572    {
17573        use std::iter::Iterator;
17574        self.entries = v.into_iter().map(|i| i.into()).collect();
17575        self
17576    }
17577
17578    /// Sets the value of [rules][crate::model::ReferenceList::rules].
17579    ///
17580    /// # Example
17581    /// ```ignore,no_run
17582    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17583    /// let x = ReferenceList::new().set_rules(["a", "b", "c"]);
17584    /// ```
17585    pub fn set_rules<T, V>(mut self, v: T) -> Self
17586    where
17587        T: std::iter::IntoIterator<Item = V>,
17588        V: std::convert::Into<std::string::String>,
17589    {
17590        use std::iter::Iterator;
17591        self.rules = v.into_iter().map(|i| i.into()).collect();
17592        self
17593    }
17594
17595    /// Sets the value of [syntax_type][crate::model::ReferenceList::syntax_type].
17596    ///
17597    /// # Example
17598    /// ```ignore,no_run
17599    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17600    /// use google_cloud_chronicle_v1::model::ReferenceListSyntaxType;
17601    /// let x0 = ReferenceList::new().set_syntax_type(ReferenceListSyntaxType::PlainTextString);
17602    /// let x1 = ReferenceList::new().set_syntax_type(ReferenceListSyntaxType::Regex);
17603    /// let x2 = ReferenceList::new().set_syntax_type(ReferenceListSyntaxType::Cidr);
17604    /// ```
17605    pub fn set_syntax_type<T: std::convert::Into<crate::model::ReferenceListSyntaxType>>(
17606        mut self,
17607        v: T,
17608    ) -> Self {
17609        self.syntax_type = v.into();
17610        self
17611    }
17612
17613    /// Sets the value of [rule_associations_count][crate::model::ReferenceList::rule_associations_count].
17614    ///
17615    /// # Example
17616    /// ```ignore,no_run
17617    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17618    /// let x = ReferenceList::new().set_rule_associations_count(42);
17619    /// ```
17620    pub fn set_rule_associations_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17621        self.rule_associations_count = v.into();
17622        self
17623    }
17624
17625    /// Sets the value of [scope_info][crate::model::ReferenceList::scope_info].
17626    ///
17627    /// # Example
17628    /// ```ignore,no_run
17629    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17630    /// use google_cloud_chronicle_v1::model::ScopeInfo;
17631    /// let x = ReferenceList::new().set_scope_info(ScopeInfo::default()/* use setters */);
17632    /// ```
17633    pub fn set_scope_info<T>(mut self, v: T) -> Self
17634    where
17635        T: std::convert::Into<crate::model::ScopeInfo>,
17636    {
17637        self.scope_info = std::option::Option::Some(v.into());
17638        self
17639    }
17640
17641    /// Sets or clears the value of [scope_info][crate::model::ReferenceList::scope_info].
17642    ///
17643    /// # Example
17644    /// ```ignore,no_run
17645    /// # use google_cloud_chronicle_v1::model::ReferenceList;
17646    /// use google_cloud_chronicle_v1::model::ScopeInfo;
17647    /// let x = ReferenceList::new().set_or_clear_scope_info(Some(ScopeInfo::default()/* use setters */));
17648    /// let x = ReferenceList::new().set_or_clear_scope_info(None::<ScopeInfo>);
17649    /// ```
17650    pub fn set_or_clear_scope_info<T>(mut self, v: std::option::Option<T>) -> Self
17651    where
17652        T: std::convert::Into<crate::model::ScopeInfo>,
17653    {
17654        self.scope_info = v.map(|x| x.into());
17655        self
17656    }
17657}
17658
17659impl wkt::message::Message for ReferenceList {
17660    fn typename() -> &'static str {
17661        "type.googleapis.com/google.cloud.chronicle.v1.ReferenceList"
17662    }
17663}
17664
17665/// An entry in a reference list.
17666#[derive(Clone, Default, PartialEq)]
17667#[non_exhaustive]
17668pub struct ReferenceListEntry {
17669    /// Required. The value of the entry. Maximum length is 512 characters.
17670    pub value: std::string::String,
17671
17672    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17673}
17674
17675impl ReferenceListEntry {
17676    /// Creates a new default instance.
17677    pub fn new() -> Self {
17678        std::default::Default::default()
17679    }
17680
17681    /// Sets the value of [value][crate::model::ReferenceListEntry::value].
17682    ///
17683    /// # Example
17684    /// ```ignore,no_run
17685    /// # use google_cloud_chronicle_v1::model::ReferenceListEntry;
17686    /// let x = ReferenceListEntry::new().set_value("example");
17687    /// ```
17688    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17689        self.value = v.into();
17690        self
17691    }
17692}
17693
17694impl wkt::message::Message for ReferenceListEntry {
17695    fn typename() -> &'static str {
17696        "type.googleapis.com/google.cloud.chronicle.v1.ReferenceListEntry"
17697    }
17698}
17699
17700/// The Rule resource represents a user-created rule.
17701/// NEXT TAG: 21
17702#[derive(Clone, Default, PartialEq)]
17703#[non_exhaustive]
17704pub struct Rule {
17705    /// Identifier. Full resource name for the rule.
17706    /// Format:
17707    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
17708    pub name: std::string::String,
17709
17710    /// Output only. The revision ID of the rule.
17711    /// A new revision is created whenever the rule text is changed in any way.
17712    /// Format: `v_{10 digits}_{9 digits}`
17713    /// Populated in REVISION_METADATA_ONLY view and FULL view.
17714    pub revision_id: std::string::String,
17715
17716    /// Output only. Display name of the rule.
17717    /// Populated in BASIC view and FULL view.
17718    pub display_name: std::string::String,
17719
17720    /// The YARA-L content of the rule.
17721    /// Populated in FULL view.
17722    pub text: std::string::String,
17723
17724    /// Output only. The author of the rule. Extracted from the meta section of
17725    /// text. Populated in BASIC view and FULL view.
17726    pub author: std::string::String,
17727
17728    /// Output only. The severity of the rule as specified in the meta section of
17729    /// text. Populated in BASIC view and FULL view.
17730    pub severity: std::option::Option<crate::model::Severity>,
17731
17732    /// Output only. Additional metadata specified in the meta section of text.
17733    /// Populated in FULL view.
17734    pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
17735
17736    /// Output only. The timestamp of when the rule was created.
17737    /// Populated in FULL view.
17738    pub create_time: std::option::Option<wkt::Timestamp>,
17739
17740    /// Output only. The timestamp of when the rule revision was created.
17741    /// Populated in FULL, REVISION_METADATA_ONLY views.
17742    pub revision_create_time: std::option::Option<wkt::Timestamp>,
17743
17744    /// Output only. The current compilation state of the rule.
17745    /// Populated in FULL view.
17746    pub compilation_state: crate::model::rule::CompilationState,
17747
17748    /// Output only. User-facing type of the rule. Extracted from the events
17749    /// section of rule text. Populated in BASIC view and FULL view.
17750    pub r#type: crate::model::RuleType,
17751
17752    /// Output only. Resource names of the reference lists used in this rule.
17753    /// Populated in FULL view.
17754    pub reference_lists: std::vec::Vec<std::string::String>,
17755
17756    /// Output only. The run frequencies that are allowed for the rule.
17757    /// Populated in BASIC view and FULL view.
17758    pub allowed_run_frequencies: std::vec::Vec<crate::model::RunFrequency>,
17759
17760    /// The etag for this rule.
17761    /// If this is provided on update, the request will succeed if and only if it
17762    /// matches the server-computed value, and will fail with an ABORTED error
17763    /// otherwise.
17764    /// Populated in BASIC view and FULL view.
17765    pub etag: std::string::String,
17766
17767    /// Resource name of the DataAccessScope bound to this rule.
17768    /// Populated in BASIC view and FULL view.
17769    /// If reference lists are used in the rule, validations will be performed
17770    /// against this scope to ensure that the reference lists are compatible with
17771    /// both the user's and the rule's scopes.
17772    /// The scope should be in the format:
17773    /// `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`.
17774    pub scope: std::string::String,
17775
17776    /// Output only. A list of a rule's corresponding compilation diagnostic
17777    /// messages such as compilation errors and compilation warnings. Populated in
17778    /// FULL view.
17779    pub compilation_diagnostics: std::vec::Vec<crate::model::CompilationDiagnostic>,
17780
17781    /// Output only. Indicate the rule can run in near real time live rule.
17782    /// If this is true, the rule uses the near real time live rule when the run
17783    /// frequency is set to LIVE.
17784    pub near_real_time_live_rule_eligible: bool,
17785
17786    /// Output only. The set of inputs used in the rule. For example, if the rule
17787    /// uses $e.principal.hostname, then the uses_udm field will be true.
17788    pub inputs_used: std::option::Option<crate::model::InputsUsed>,
17789
17790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17791}
17792
17793impl Rule {
17794    /// Creates a new default instance.
17795    pub fn new() -> Self {
17796        std::default::Default::default()
17797    }
17798
17799    /// Sets the value of [name][crate::model::Rule::name].
17800    ///
17801    /// # Example
17802    /// ```ignore,no_run
17803    /// # use google_cloud_chronicle_v1::model::Rule;
17804    /// # let project_id = "project_id";
17805    /// # let location_id = "location_id";
17806    /// # let instance_id = "instance_id";
17807    /// # let rule_id = "rule_id";
17808    /// let x = Rule::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
17809    /// ```
17810    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17811        self.name = v.into();
17812        self
17813    }
17814
17815    /// Sets the value of [revision_id][crate::model::Rule::revision_id].
17816    ///
17817    /// # Example
17818    /// ```ignore,no_run
17819    /// # use google_cloud_chronicle_v1::model::Rule;
17820    /// let x = Rule::new().set_revision_id("example");
17821    /// ```
17822    pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17823        self.revision_id = v.into();
17824        self
17825    }
17826
17827    /// Sets the value of [display_name][crate::model::Rule::display_name].
17828    ///
17829    /// # Example
17830    /// ```ignore,no_run
17831    /// # use google_cloud_chronicle_v1::model::Rule;
17832    /// let x = Rule::new().set_display_name("example");
17833    /// ```
17834    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17835        self.display_name = v.into();
17836        self
17837    }
17838
17839    /// Sets the value of [text][crate::model::Rule::text].
17840    ///
17841    /// # Example
17842    /// ```ignore,no_run
17843    /// # use google_cloud_chronicle_v1::model::Rule;
17844    /// let x = Rule::new().set_text("example");
17845    /// ```
17846    pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17847        self.text = v.into();
17848        self
17849    }
17850
17851    /// Sets the value of [author][crate::model::Rule::author].
17852    ///
17853    /// # Example
17854    /// ```ignore,no_run
17855    /// # use google_cloud_chronicle_v1::model::Rule;
17856    /// let x = Rule::new().set_author("example");
17857    /// ```
17858    pub fn set_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17859        self.author = v.into();
17860        self
17861    }
17862
17863    /// Sets the value of [severity][crate::model::Rule::severity].
17864    ///
17865    /// # Example
17866    /// ```ignore,no_run
17867    /// # use google_cloud_chronicle_v1::model::Rule;
17868    /// use google_cloud_chronicle_v1::model::Severity;
17869    /// let x = Rule::new().set_severity(Severity::default()/* use setters */);
17870    /// ```
17871    pub fn set_severity<T>(mut self, v: T) -> Self
17872    where
17873        T: std::convert::Into<crate::model::Severity>,
17874    {
17875        self.severity = std::option::Option::Some(v.into());
17876        self
17877    }
17878
17879    /// Sets or clears the value of [severity][crate::model::Rule::severity].
17880    ///
17881    /// # Example
17882    /// ```ignore,no_run
17883    /// # use google_cloud_chronicle_v1::model::Rule;
17884    /// use google_cloud_chronicle_v1::model::Severity;
17885    /// let x = Rule::new().set_or_clear_severity(Some(Severity::default()/* use setters */));
17886    /// let x = Rule::new().set_or_clear_severity(None::<Severity>);
17887    /// ```
17888    pub fn set_or_clear_severity<T>(mut self, v: std::option::Option<T>) -> Self
17889    where
17890        T: std::convert::Into<crate::model::Severity>,
17891    {
17892        self.severity = v.map(|x| x.into());
17893        self
17894    }
17895
17896    /// Sets the value of [metadata][crate::model::Rule::metadata].
17897    ///
17898    /// # Example
17899    /// ```ignore,no_run
17900    /// # use google_cloud_chronicle_v1::model::Rule;
17901    /// let x = Rule::new().set_metadata([
17902    ///     ("key0", "abc"),
17903    ///     ("key1", "xyz"),
17904    /// ]);
17905    /// ```
17906    pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
17907    where
17908        T: std::iter::IntoIterator<Item = (K, V)>,
17909        K: std::convert::Into<std::string::String>,
17910        V: std::convert::Into<std::string::String>,
17911    {
17912        use std::iter::Iterator;
17913        self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17914        self
17915    }
17916
17917    /// Sets the value of [create_time][crate::model::Rule::create_time].
17918    ///
17919    /// # Example
17920    /// ```ignore,no_run
17921    /// # use google_cloud_chronicle_v1::model::Rule;
17922    /// use wkt::Timestamp;
17923    /// let x = Rule::new().set_create_time(Timestamp::default()/* use setters */);
17924    /// ```
17925    pub fn set_create_time<T>(mut self, v: T) -> Self
17926    where
17927        T: std::convert::Into<wkt::Timestamp>,
17928    {
17929        self.create_time = std::option::Option::Some(v.into());
17930        self
17931    }
17932
17933    /// Sets or clears the value of [create_time][crate::model::Rule::create_time].
17934    ///
17935    /// # Example
17936    /// ```ignore,no_run
17937    /// # use google_cloud_chronicle_v1::model::Rule;
17938    /// use wkt::Timestamp;
17939    /// let x = Rule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17940    /// let x = Rule::new().set_or_clear_create_time(None::<Timestamp>);
17941    /// ```
17942    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17943    where
17944        T: std::convert::Into<wkt::Timestamp>,
17945    {
17946        self.create_time = v.map(|x| x.into());
17947        self
17948    }
17949
17950    /// Sets the value of [revision_create_time][crate::model::Rule::revision_create_time].
17951    ///
17952    /// # Example
17953    /// ```ignore,no_run
17954    /// # use google_cloud_chronicle_v1::model::Rule;
17955    /// use wkt::Timestamp;
17956    /// let x = Rule::new().set_revision_create_time(Timestamp::default()/* use setters */);
17957    /// ```
17958    pub fn set_revision_create_time<T>(mut self, v: T) -> Self
17959    where
17960        T: std::convert::Into<wkt::Timestamp>,
17961    {
17962        self.revision_create_time = std::option::Option::Some(v.into());
17963        self
17964    }
17965
17966    /// Sets or clears the value of [revision_create_time][crate::model::Rule::revision_create_time].
17967    ///
17968    /// # Example
17969    /// ```ignore,no_run
17970    /// # use google_cloud_chronicle_v1::model::Rule;
17971    /// use wkt::Timestamp;
17972    /// let x = Rule::new().set_or_clear_revision_create_time(Some(Timestamp::default()/* use setters */));
17973    /// let x = Rule::new().set_or_clear_revision_create_time(None::<Timestamp>);
17974    /// ```
17975    pub fn set_or_clear_revision_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17976    where
17977        T: std::convert::Into<wkt::Timestamp>,
17978    {
17979        self.revision_create_time = v.map(|x| x.into());
17980        self
17981    }
17982
17983    /// Sets the value of [compilation_state][crate::model::Rule::compilation_state].
17984    ///
17985    /// # Example
17986    /// ```ignore,no_run
17987    /// # use google_cloud_chronicle_v1::model::Rule;
17988    /// use google_cloud_chronicle_v1::model::rule::CompilationState;
17989    /// let x0 = Rule::new().set_compilation_state(CompilationState::Succeeded);
17990    /// let x1 = Rule::new().set_compilation_state(CompilationState::Failed);
17991    /// ```
17992    pub fn set_compilation_state<T: std::convert::Into<crate::model::rule::CompilationState>>(
17993        mut self,
17994        v: T,
17995    ) -> Self {
17996        self.compilation_state = v.into();
17997        self
17998    }
17999
18000    /// Sets the value of [r#type][crate::model::Rule::type].
18001    ///
18002    /// # Example
18003    /// ```ignore,no_run
18004    /// # use google_cloud_chronicle_v1::model::Rule;
18005    /// use google_cloud_chronicle_v1::model::RuleType;
18006    /// let x0 = Rule::new().set_type(RuleType::SingleEvent);
18007    /// let x1 = Rule::new().set_type(RuleType::MultiEvent);
18008    /// ```
18009    pub fn set_type<T: std::convert::Into<crate::model::RuleType>>(mut self, v: T) -> Self {
18010        self.r#type = v.into();
18011        self
18012    }
18013
18014    /// Sets the value of [reference_lists][crate::model::Rule::reference_lists].
18015    ///
18016    /// # Example
18017    /// ```ignore,no_run
18018    /// # use google_cloud_chronicle_v1::model::Rule;
18019    /// let x = Rule::new().set_reference_lists(["a", "b", "c"]);
18020    /// ```
18021    pub fn set_reference_lists<T, V>(mut self, v: T) -> Self
18022    where
18023        T: std::iter::IntoIterator<Item = V>,
18024        V: std::convert::Into<std::string::String>,
18025    {
18026        use std::iter::Iterator;
18027        self.reference_lists = v.into_iter().map(|i| i.into()).collect();
18028        self
18029    }
18030
18031    /// Sets the value of [allowed_run_frequencies][crate::model::Rule::allowed_run_frequencies].
18032    ///
18033    /// # Example
18034    /// ```ignore,no_run
18035    /// # use google_cloud_chronicle_v1::model::Rule;
18036    /// use google_cloud_chronicle_v1::model::RunFrequency;
18037    /// let x = Rule::new().set_allowed_run_frequencies([
18038    ///     RunFrequency::Live,
18039    ///     RunFrequency::Hourly,
18040    ///     RunFrequency::Daily,
18041    /// ]);
18042    /// ```
18043    pub fn set_allowed_run_frequencies<T, V>(mut self, v: T) -> Self
18044    where
18045        T: std::iter::IntoIterator<Item = V>,
18046        V: std::convert::Into<crate::model::RunFrequency>,
18047    {
18048        use std::iter::Iterator;
18049        self.allowed_run_frequencies = v.into_iter().map(|i| i.into()).collect();
18050        self
18051    }
18052
18053    /// Sets the value of [etag][crate::model::Rule::etag].
18054    ///
18055    /// # Example
18056    /// ```ignore,no_run
18057    /// # use google_cloud_chronicle_v1::model::Rule;
18058    /// let x = Rule::new().set_etag("example");
18059    /// ```
18060    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18061        self.etag = v.into();
18062        self
18063    }
18064
18065    /// Sets the value of [scope][crate::model::Rule::scope].
18066    ///
18067    /// # Example
18068    /// ```ignore,no_run
18069    /// # use google_cloud_chronicle_v1::model::Rule;
18070    /// # let project_id = "project_id";
18071    /// # let location_id = "location_id";
18072    /// # let instance_id = "instance_id";
18073    /// # let data_access_scope_id = "data_access_scope_id";
18074    /// let x = Rule::new().set_scope(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/dataAccessScopes/{data_access_scope_id}"));
18075    /// ```
18076    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18077        self.scope = v.into();
18078        self
18079    }
18080
18081    /// Sets the value of [compilation_diagnostics][crate::model::Rule::compilation_diagnostics].
18082    ///
18083    /// # Example
18084    /// ```ignore,no_run
18085    /// # use google_cloud_chronicle_v1::model::Rule;
18086    /// use google_cloud_chronicle_v1::model::CompilationDiagnostic;
18087    /// let x = Rule::new()
18088    ///     .set_compilation_diagnostics([
18089    ///         CompilationDiagnostic::default()/* use setters */,
18090    ///         CompilationDiagnostic::default()/* use (different) setters */,
18091    ///     ]);
18092    /// ```
18093    pub fn set_compilation_diagnostics<T, V>(mut self, v: T) -> Self
18094    where
18095        T: std::iter::IntoIterator<Item = V>,
18096        V: std::convert::Into<crate::model::CompilationDiagnostic>,
18097    {
18098        use std::iter::Iterator;
18099        self.compilation_diagnostics = v.into_iter().map(|i| i.into()).collect();
18100        self
18101    }
18102
18103    /// Sets the value of [near_real_time_live_rule_eligible][crate::model::Rule::near_real_time_live_rule_eligible].
18104    ///
18105    /// # Example
18106    /// ```ignore,no_run
18107    /// # use google_cloud_chronicle_v1::model::Rule;
18108    /// let x = Rule::new().set_near_real_time_live_rule_eligible(true);
18109    /// ```
18110    pub fn set_near_real_time_live_rule_eligible<T: std::convert::Into<bool>>(
18111        mut self,
18112        v: T,
18113    ) -> Self {
18114        self.near_real_time_live_rule_eligible = v.into();
18115        self
18116    }
18117
18118    /// Sets the value of [inputs_used][crate::model::Rule::inputs_used].
18119    ///
18120    /// # Example
18121    /// ```ignore,no_run
18122    /// # use google_cloud_chronicle_v1::model::Rule;
18123    /// use google_cloud_chronicle_v1::model::InputsUsed;
18124    /// let x = Rule::new().set_inputs_used(InputsUsed::default()/* use setters */);
18125    /// ```
18126    pub fn set_inputs_used<T>(mut self, v: T) -> Self
18127    where
18128        T: std::convert::Into<crate::model::InputsUsed>,
18129    {
18130        self.inputs_used = std::option::Option::Some(v.into());
18131        self
18132    }
18133
18134    /// Sets or clears the value of [inputs_used][crate::model::Rule::inputs_used].
18135    ///
18136    /// # Example
18137    /// ```ignore,no_run
18138    /// # use google_cloud_chronicle_v1::model::Rule;
18139    /// use google_cloud_chronicle_v1::model::InputsUsed;
18140    /// let x = Rule::new().set_or_clear_inputs_used(Some(InputsUsed::default()/* use setters */));
18141    /// let x = Rule::new().set_or_clear_inputs_used(None::<InputsUsed>);
18142    /// ```
18143    pub fn set_or_clear_inputs_used<T>(mut self, v: std::option::Option<T>) -> Self
18144    where
18145        T: std::convert::Into<crate::model::InputsUsed>,
18146    {
18147        self.inputs_used = v.map(|x| x.into());
18148        self
18149    }
18150}
18151
18152impl wkt::message::Message for Rule {
18153    fn typename() -> &'static str {
18154        "type.googleapis.com/google.cloud.chronicle.v1.Rule"
18155    }
18156}
18157
18158/// Defines additional types related to [Rule].
18159pub mod rule {
18160    #[allow(unused_imports)]
18161    use super::*;
18162
18163    /// The current compilation state of the rule.
18164    ///
18165    /// # Working with unknown values
18166    ///
18167    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18168    /// additional enum variants at any time. Adding new variants is not considered
18169    /// a breaking change. Applications should write their code in anticipation of:
18170    ///
18171    /// - New values appearing in future releases of the client library, **and**
18172    /// - New values received dynamically, without application changes.
18173    ///
18174    /// Please consult the [Working with enums] section in the user guide for some
18175    /// guidelines.
18176    ///
18177    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18178    #[derive(Clone, Debug, PartialEq)]
18179    #[non_exhaustive]
18180    pub enum CompilationState {
18181        /// The compilation state is unspecified/unknown.
18182        Unspecified,
18183        /// The Rule can successfully compile.
18184        Succeeded,
18185        /// The Rule cannot successfully compile.
18186        /// This is possible if a backwards-incompatible change was made to the
18187        /// compiler.
18188        Failed,
18189        /// If set, the enum was initialized with an unknown value.
18190        ///
18191        /// Applications can examine the value using [CompilationState::value] or
18192        /// [CompilationState::name].
18193        UnknownValue(compilation_state::UnknownValue),
18194    }
18195
18196    #[doc(hidden)]
18197    pub mod compilation_state {
18198        #[allow(unused_imports)]
18199        use super::*;
18200        #[derive(Clone, Debug, PartialEq)]
18201        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18202    }
18203
18204    impl CompilationState {
18205        /// Gets the enum value.
18206        ///
18207        /// Returns `None` if the enum contains an unknown value deserialized from
18208        /// the string representation of enums.
18209        pub fn value(&self) -> std::option::Option<i32> {
18210            match self {
18211                Self::Unspecified => std::option::Option::Some(0),
18212                Self::Succeeded => std::option::Option::Some(1),
18213                Self::Failed => std::option::Option::Some(2),
18214                Self::UnknownValue(u) => u.0.value(),
18215            }
18216        }
18217
18218        /// Gets the enum value as a string.
18219        ///
18220        /// Returns `None` if the enum contains an unknown value deserialized from
18221        /// the integer representation of enums.
18222        pub fn name(&self) -> std::option::Option<&str> {
18223            match self {
18224                Self::Unspecified => std::option::Option::Some("COMPILATION_STATE_UNSPECIFIED"),
18225                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
18226                Self::Failed => std::option::Option::Some("FAILED"),
18227                Self::UnknownValue(u) => u.0.name(),
18228            }
18229        }
18230    }
18231
18232    impl std::default::Default for CompilationState {
18233        fn default() -> Self {
18234            use std::convert::From;
18235            Self::from(0)
18236        }
18237    }
18238
18239    impl std::fmt::Display for CompilationState {
18240        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18241            wkt::internal::display_enum(f, self.name(), self.value())
18242        }
18243    }
18244
18245    impl std::convert::From<i32> for CompilationState {
18246        fn from(value: i32) -> Self {
18247            match value {
18248                0 => Self::Unspecified,
18249                1 => Self::Succeeded,
18250                2 => Self::Failed,
18251                _ => Self::UnknownValue(compilation_state::UnknownValue(
18252                    wkt::internal::UnknownEnumValue::Integer(value),
18253                )),
18254            }
18255        }
18256    }
18257
18258    impl std::convert::From<&str> for CompilationState {
18259        fn from(value: &str) -> Self {
18260            use std::string::ToString;
18261            match value {
18262                "COMPILATION_STATE_UNSPECIFIED" => Self::Unspecified,
18263                "SUCCEEDED" => Self::Succeeded,
18264                "FAILED" => Self::Failed,
18265                _ => Self::UnknownValue(compilation_state::UnknownValue(
18266                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18267                )),
18268            }
18269        }
18270    }
18271
18272    impl serde::ser::Serialize for CompilationState {
18273        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18274        where
18275            S: serde::Serializer,
18276        {
18277            match self {
18278                Self::Unspecified => serializer.serialize_i32(0),
18279                Self::Succeeded => serializer.serialize_i32(1),
18280                Self::Failed => serializer.serialize_i32(2),
18281                Self::UnknownValue(u) => u.0.serialize(serializer),
18282            }
18283        }
18284    }
18285
18286    impl<'de> serde::de::Deserialize<'de> for CompilationState {
18287        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18288        where
18289            D: serde::Deserializer<'de>,
18290        {
18291            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompilationState>::new(
18292                ".google.cloud.chronicle.v1.Rule.CompilationState",
18293            ))
18294        }
18295    }
18296}
18297
18298/// The RuleDeployment resource represents the deployment state of a Rule.
18299#[derive(Clone, Default, PartialEq)]
18300#[non_exhaustive]
18301pub struct RuleDeployment {
18302    /// Required. The resource name of the rule deployment.
18303    /// Note that RuleDeployment is a child of the overall Rule, not any individual
18304    /// revision, so the resource ID segment for the Rule resource must not
18305    /// reference a specific revision.
18306    /// Format:
18307    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`
18308    pub name: std::string::String,
18309
18310    /// Whether the rule is currently deployed continuously against incoming data.
18311    pub enabled: bool,
18312
18313    /// Whether detections resulting from this deployment should be considered
18314    /// alerts.
18315    pub alerting: bool,
18316
18317    /// The archive state of the rule deployment.
18318    /// Cannot be set to true unless enabled is set to false.
18319    /// If set to true, alerting will automatically be set to false.
18320    /// If currently set to true, enabled, alerting, and run_frequency cannot be
18321    /// updated.
18322    pub archived: bool,
18323
18324    /// Output only. The timestamp when the rule deployment archive state was last
18325    /// set to true. If the rule deployment's current archive state is not set to
18326    /// true, the field will be empty.
18327    pub archive_time: std::option::Option<wkt::Timestamp>,
18328
18329    /// The run frequency of the rule deployment.
18330    pub run_frequency: crate::model::RunFrequency,
18331
18332    /// Output only. The execution state of the rule deployment.
18333    pub execution_state: crate::model::rule_deployment::ExecutionState,
18334
18335    /// Output only. The names of the associated/chained producer rules. Rules are
18336    /// considered producers for this rule if this rule explicitly filters on their
18337    /// ruleid. Format:
18338    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
18339    pub producer_rules: std::vec::Vec<std::string::String>,
18340
18341    /// Output only. The names of the associated/chained consumer rules. Rules are
18342    /// considered consumers of this rule if their rule text explicitly filters on
18343    /// this rule's ruleid. Format:
18344    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
18345    pub consumer_rules: std::vec::Vec<std::string::String>,
18346
18347    /// Output only. The timestamp when the rule deployment alert state was lastly
18348    /// changed. This is filled regardless of the current alert state. E.g. if the
18349    /// current alert status is false, this timestamp will be the timestamp when
18350    /// the alert status was changed to false.
18351    pub last_alert_status_change_time: std::option::Option<wkt::Timestamp>,
18352
18353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18354}
18355
18356impl RuleDeployment {
18357    /// Creates a new default instance.
18358    pub fn new() -> Self {
18359        std::default::Default::default()
18360    }
18361
18362    /// Sets the value of [name][crate::model::RuleDeployment::name].
18363    ///
18364    /// # Example
18365    /// ```ignore,no_run
18366    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18367    /// # let project_id = "project_id";
18368    /// # let location_id = "location_id";
18369    /// # let instance_id = "instance_id";
18370    /// # let rule_id = "rule_id";
18371    /// let x = RuleDeployment::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}/deployment"));
18372    /// ```
18373    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18374        self.name = v.into();
18375        self
18376    }
18377
18378    /// Sets the value of [enabled][crate::model::RuleDeployment::enabled].
18379    ///
18380    /// # Example
18381    /// ```ignore,no_run
18382    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18383    /// let x = RuleDeployment::new().set_enabled(true);
18384    /// ```
18385    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18386        self.enabled = v.into();
18387        self
18388    }
18389
18390    /// Sets the value of [alerting][crate::model::RuleDeployment::alerting].
18391    ///
18392    /// # Example
18393    /// ```ignore,no_run
18394    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18395    /// let x = RuleDeployment::new().set_alerting(true);
18396    /// ```
18397    pub fn set_alerting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18398        self.alerting = v.into();
18399        self
18400    }
18401
18402    /// Sets the value of [archived][crate::model::RuleDeployment::archived].
18403    ///
18404    /// # Example
18405    /// ```ignore,no_run
18406    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18407    /// let x = RuleDeployment::new().set_archived(true);
18408    /// ```
18409    pub fn set_archived<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18410        self.archived = v.into();
18411        self
18412    }
18413
18414    /// Sets the value of [archive_time][crate::model::RuleDeployment::archive_time].
18415    ///
18416    /// # Example
18417    /// ```ignore,no_run
18418    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18419    /// use wkt::Timestamp;
18420    /// let x = RuleDeployment::new().set_archive_time(Timestamp::default()/* use setters */);
18421    /// ```
18422    pub fn set_archive_time<T>(mut self, v: T) -> Self
18423    where
18424        T: std::convert::Into<wkt::Timestamp>,
18425    {
18426        self.archive_time = std::option::Option::Some(v.into());
18427        self
18428    }
18429
18430    /// Sets or clears the value of [archive_time][crate::model::RuleDeployment::archive_time].
18431    ///
18432    /// # Example
18433    /// ```ignore,no_run
18434    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18435    /// use wkt::Timestamp;
18436    /// let x = RuleDeployment::new().set_or_clear_archive_time(Some(Timestamp::default()/* use setters */));
18437    /// let x = RuleDeployment::new().set_or_clear_archive_time(None::<Timestamp>);
18438    /// ```
18439    pub fn set_or_clear_archive_time<T>(mut self, v: std::option::Option<T>) -> Self
18440    where
18441        T: std::convert::Into<wkt::Timestamp>,
18442    {
18443        self.archive_time = v.map(|x| x.into());
18444        self
18445    }
18446
18447    /// Sets the value of [run_frequency][crate::model::RuleDeployment::run_frequency].
18448    ///
18449    /// # Example
18450    /// ```ignore,no_run
18451    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18452    /// use google_cloud_chronicle_v1::model::RunFrequency;
18453    /// let x0 = RuleDeployment::new().set_run_frequency(RunFrequency::Live);
18454    /// let x1 = RuleDeployment::new().set_run_frequency(RunFrequency::Hourly);
18455    /// let x2 = RuleDeployment::new().set_run_frequency(RunFrequency::Daily);
18456    /// ```
18457    pub fn set_run_frequency<T: std::convert::Into<crate::model::RunFrequency>>(
18458        mut self,
18459        v: T,
18460    ) -> Self {
18461        self.run_frequency = v.into();
18462        self
18463    }
18464
18465    /// Sets the value of [execution_state][crate::model::RuleDeployment::execution_state].
18466    ///
18467    /// # Example
18468    /// ```ignore,no_run
18469    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18470    /// use google_cloud_chronicle_v1::model::rule_deployment::ExecutionState;
18471    /// let x0 = RuleDeployment::new().set_execution_state(ExecutionState::Default);
18472    /// let x1 = RuleDeployment::new().set_execution_state(ExecutionState::Limited);
18473    /// let x2 = RuleDeployment::new().set_execution_state(ExecutionState::Paused);
18474    /// ```
18475    pub fn set_execution_state<
18476        T: std::convert::Into<crate::model::rule_deployment::ExecutionState>,
18477    >(
18478        mut self,
18479        v: T,
18480    ) -> Self {
18481        self.execution_state = v.into();
18482        self
18483    }
18484
18485    /// Sets the value of [producer_rules][crate::model::RuleDeployment::producer_rules].
18486    ///
18487    /// # Example
18488    /// ```ignore,no_run
18489    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18490    /// let x = RuleDeployment::new().set_producer_rules(["a", "b", "c"]);
18491    /// ```
18492    pub fn set_producer_rules<T, V>(mut self, v: T) -> Self
18493    where
18494        T: std::iter::IntoIterator<Item = V>,
18495        V: std::convert::Into<std::string::String>,
18496    {
18497        use std::iter::Iterator;
18498        self.producer_rules = v.into_iter().map(|i| i.into()).collect();
18499        self
18500    }
18501
18502    /// Sets the value of [consumer_rules][crate::model::RuleDeployment::consumer_rules].
18503    ///
18504    /// # Example
18505    /// ```ignore,no_run
18506    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18507    /// let x = RuleDeployment::new().set_consumer_rules(["a", "b", "c"]);
18508    /// ```
18509    pub fn set_consumer_rules<T, V>(mut self, v: T) -> Self
18510    where
18511        T: std::iter::IntoIterator<Item = V>,
18512        V: std::convert::Into<std::string::String>,
18513    {
18514        use std::iter::Iterator;
18515        self.consumer_rules = v.into_iter().map(|i| i.into()).collect();
18516        self
18517    }
18518
18519    /// Sets the value of [last_alert_status_change_time][crate::model::RuleDeployment::last_alert_status_change_time].
18520    ///
18521    /// # Example
18522    /// ```ignore,no_run
18523    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18524    /// use wkt::Timestamp;
18525    /// let x = RuleDeployment::new().set_last_alert_status_change_time(Timestamp::default()/* use setters */);
18526    /// ```
18527    pub fn set_last_alert_status_change_time<T>(mut self, v: T) -> Self
18528    where
18529        T: std::convert::Into<wkt::Timestamp>,
18530    {
18531        self.last_alert_status_change_time = std::option::Option::Some(v.into());
18532        self
18533    }
18534
18535    /// Sets or clears the value of [last_alert_status_change_time][crate::model::RuleDeployment::last_alert_status_change_time].
18536    ///
18537    /// # Example
18538    /// ```ignore,no_run
18539    /// # use google_cloud_chronicle_v1::model::RuleDeployment;
18540    /// use wkt::Timestamp;
18541    /// let x = RuleDeployment::new().set_or_clear_last_alert_status_change_time(Some(Timestamp::default()/* use setters */));
18542    /// let x = RuleDeployment::new().set_or_clear_last_alert_status_change_time(None::<Timestamp>);
18543    /// ```
18544    pub fn set_or_clear_last_alert_status_change_time<T>(
18545        mut self,
18546        v: std::option::Option<T>,
18547    ) -> Self
18548    where
18549        T: std::convert::Into<wkt::Timestamp>,
18550    {
18551        self.last_alert_status_change_time = v.map(|x| x.into());
18552        self
18553    }
18554}
18555
18556impl wkt::message::Message for RuleDeployment {
18557    fn typename() -> &'static str {
18558        "type.googleapis.com/google.cloud.chronicle.v1.RuleDeployment"
18559    }
18560}
18561
18562/// Defines additional types related to [RuleDeployment].
18563pub mod rule_deployment {
18564    #[allow(unused_imports)]
18565    use super::*;
18566
18567    /// The possible execution states the rule deployment can be in.
18568    ///
18569    /// # Working with unknown values
18570    ///
18571    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18572    /// additional enum variants at any time. Adding new variants is not considered
18573    /// a breaking change. Applications should write their code in anticipation of:
18574    ///
18575    /// - New values appearing in future releases of the client library, **and**
18576    /// - New values received dynamically, without application changes.
18577    ///
18578    /// Please consult the [Working with enums] section in the user guide for some
18579    /// guidelines.
18580    ///
18581    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18582    #[derive(Clone, Debug, PartialEq)]
18583    #[non_exhaustive]
18584    pub enum ExecutionState {
18585        /// Unspecified or unknown execution state.
18586        Unspecified,
18587        /// Default execution state.
18588        Default,
18589        /// Rules in limited state may not have their executions guaranteed.
18590        Limited,
18591        /// Paused rules are not executed at all.
18592        Paused,
18593        /// If set, the enum was initialized with an unknown value.
18594        ///
18595        /// Applications can examine the value using [ExecutionState::value] or
18596        /// [ExecutionState::name].
18597        UnknownValue(execution_state::UnknownValue),
18598    }
18599
18600    #[doc(hidden)]
18601    pub mod execution_state {
18602        #[allow(unused_imports)]
18603        use super::*;
18604        #[derive(Clone, Debug, PartialEq)]
18605        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18606    }
18607
18608    impl ExecutionState {
18609        /// Gets the enum value.
18610        ///
18611        /// Returns `None` if the enum contains an unknown value deserialized from
18612        /// the string representation of enums.
18613        pub fn value(&self) -> std::option::Option<i32> {
18614            match self {
18615                Self::Unspecified => std::option::Option::Some(0),
18616                Self::Default => std::option::Option::Some(1),
18617                Self::Limited => std::option::Option::Some(2),
18618                Self::Paused => std::option::Option::Some(3),
18619                Self::UnknownValue(u) => u.0.value(),
18620            }
18621        }
18622
18623        /// Gets the enum value as a string.
18624        ///
18625        /// Returns `None` if the enum contains an unknown value deserialized from
18626        /// the integer representation of enums.
18627        pub fn name(&self) -> std::option::Option<&str> {
18628            match self {
18629                Self::Unspecified => std::option::Option::Some("EXECUTION_STATE_UNSPECIFIED"),
18630                Self::Default => std::option::Option::Some("DEFAULT"),
18631                Self::Limited => std::option::Option::Some("LIMITED"),
18632                Self::Paused => std::option::Option::Some("PAUSED"),
18633                Self::UnknownValue(u) => u.0.name(),
18634            }
18635        }
18636    }
18637
18638    impl std::default::Default for ExecutionState {
18639        fn default() -> Self {
18640            use std::convert::From;
18641            Self::from(0)
18642        }
18643    }
18644
18645    impl std::fmt::Display for ExecutionState {
18646        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18647            wkt::internal::display_enum(f, self.name(), self.value())
18648        }
18649    }
18650
18651    impl std::convert::From<i32> for ExecutionState {
18652        fn from(value: i32) -> Self {
18653            match value {
18654                0 => Self::Unspecified,
18655                1 => Self::Default,
18656                2 => Self::Limited,
18657                3 => Self::Paused,
18658                _ => Self::UnknownValue(execution_state::UnknownValue(
18659                    wkt::internal::UnknownEnumValue::Integer(value),
18660                )),
18661            }
18662        }
18663    }
18664
18665    impl std::convert::From<&str> for ExecutionState {
18666        fn from(value: &str) -> Self {
18667            use std::string::ToString;
18668            match value {
18669                "EXECUTION_STATE_UNSPECIFIED" => Self::Unspecified,
18670                "DEFAULT" => Self::Default,
18671                "LIMITED" => Self::Limited,
18672                "PAUSED" => Self::Paused,
18673                _ => Self::UnknownValue(execution_state::UnknownValue(
18674                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18675                )),
18676            }
18677        }
18678    }
18679
18680    impl serde::ser::Serialize for ExecutionState {
18681        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18682        where
18683            S: serde::Serializer,
18684        {
18685            match self {
18686                Self::Unspecified => serializer.serialize_i32(0),
18687                Self::Default => serializer.serialize_i32(1),
18688                Self::Limited => serializer.serialize_i32(2),
18689                Self::Paused => serializer.serialize_i32(3),
18690                Self::UnknownValue(u) => u.0.serialize(serializer),
18691            }
18692        }
18693    }
18694
18695    impl<'de> serde::de::Deserialize<'de> for ExecutionState {
18696        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18697        where
18698            D: serde::Deserializer<'de>,
18699        {
18700            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionState>::new(
18701                ".google.cloud.chronicle.v1.RuleDeployment.ExecutionState",
18702            ))
18703        }
18704    }
18705}
18706
18707/// Retrohunt is an execution of a Rule over a time range in the past.
18708#[derive(Clone, Default, PartialEq)]
18709#[non_exhaustive]
18710pub struct Retrohunt {
18711    /// The resource name of the retrohunt.
18712    /// Retrohunt is the child of a rule revision. {rule} in the format below is
18713    /// structured as {rule_id@revision_id}.
18714    /// Format:
18715    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}`
18716    pub name: std::string::String,
18717
18718    /// Required. The start and end time of the event time range this retrohunt
18719    /// processes.
18720    pub process_interval: std::option::Option<google_cloud_type::model::Interval>,
18721
18722    /// Output only. The start and end time of the retrohunt execution. If the
18723    /// retrohunt is not yet finished, the end time of the interval will not be
18724    /// populated.
18725    pub execution_interval: std::option::Option<google_cloud_type::model::Interval>,
18726
18727    /// Output only. The state of the retrohunt.
18728    pub state: crate::model::retrohunt::State,
18729
18730    /// Output only. Percent progress of the retrohunt towards completion, from
18731    /// 0.00 to 100.00.
18732    pub progress_percentage: f32,
18733
18734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18735}
18736
18737impl Retrohunt {
18738    /// Creates a new default instance.
18739    pub fn new() -> Self {
18740        std::default::Default::default()
18741    }
18742
18743    /// Sets the value of [name][crate::model::Retrohunt::name].
18744    ///
18745    /// # Example
18746    /// ```ignore,no_run
18747    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18748    /// # let project_id = "project_id";
18749    /// # let location_id = "location_id";
18750    /// # let instance_id = "instance_id";
18751    /// # let rule_id = "rule_id";
18752    /// # let retrohunt_id = "retrohunt_id";
18753    /// let x = Retrohunt::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}/retrohunts/{retrohunt_id}"));
18754    /// ```
18755    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18756        self.name = v.into();
18757        self
18758    }
18759
18760    /// Sets the value of [process_interval][crate::model::Retrohunt::process_interval].
18761    ///
18762    /// # Example
18763    /// ```ignore,no_run
18764    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18765    /// use google_cloud_type::model::Interval;
18766    /// let x = Retrohunt::new().set_process_interval(Interval::default()/* use setters */);
18767    /// ```
18768    pub fn set_process_interval<T>(mut self, v: T) -> Self
18769    where
18770        T: std::convert::Into<google_cloud_type::model::Interval>,
18771    {
18772        self.process_interval = std::option::Option::Some(v.into());
18773        self
18774    }
18775
18776    /// Sets or clears the value of [process_interval][crate::model::Retrohunt::process_interval].
18777    ///
18778    /// # Example
18779    /// ```ignore,no_run
18780    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18781    /// use google_cloud_type::model::Interval;
18782    /// let x = Retrohunt::new().set_or_clear_process_interval(Some(Interval::default()/* use setters */));
18783    /// let x = Retrohunt::new().set_or_clear_process_interval(None::<Interval>);
18784    /// ```
18785    pub fn set_or_clear_process_interval<T>(mut self, v: std::option::Option<T>) -> Self
18786    where
18787        T: std::convert::Into<google_cloud_type::model::Interval>,
18788    {
18789        self.process_interval = v.map(|x| x.into());
18790        self
18791    }
18792
18793    /// Sets the value of [execution_interval][crate::model::Retrohunt::execution_interval].
18794    ///
18795    /// # Example
18796    /// ```ignore,no_run
18797    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18798    /// use google_cloud_type::model::Interval;
18799    /// let x = Retrohunt::new().set_execution_interval(Interval::default()/* use setters */);
18800    /// ```
18801    pub fn set_execution_interval<T>(mut self, v: T) -> Self
18802    where
18803        T: std::convert::Into<google_cloud_type::model::Interval>,
18804    {
18805        self.execution_interval = std::option::Option::Some(v.into());
18806        self
18807    }
18808
18809    /// Sets or clears the value of [execution_interval][crate::model::Retrohunt::execution_interval].
18810    ///
18811    /// # Example
18812    /// ```ignore,no_run
18813    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18814    /// use google_cloud_type::model::Interval;
18815    /// let x = Retrohunt::new().set_or_clear_execution_interval(Some(Interval::default()/* use setters */));
18816    /// let x = Retrohunt::new().set_or_clear_execution_interval(None::<Interval>);
18817    /// ```
18818    pub fn set_or_clear_execution_interval<T>(mut self, v: std::option::Option<T>) -> Self
18819    where
18820        T: std::convert::Into<google_cloud_type::model::Interval>,
18821    {
18822        self.execution_interval = v.map(|x| x.into());
18823        self
18824    }
18825
18826    /// Sets the value of [state][crate::model::Retrohunt::state].
18827    ///
18828    /// # Example
18829    /// ```ignore,no_run
18830    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18831    /// use google_cloud_chronicle_v1::model::retrohunt::State;
18832    /// let x0 = Retrohunt::new().set_state(State::Running);
18833    /// let x1 = Retrohunt::new().set_state(State::Done);
18834    /// let x2 = Retrohunt::new().set_state(State::Cancelled);
18835    /// ```
18836    pub fn set_state<T: std::convert::Into<crate::model::retrohunt::State>>(
18837        mut self,
18838        v: T,
18839    ) -> Self {
18840        self.state = v.into();
18841        self
18842    }
18843
18844    /// Sets the value of [progress_percentage][crate::model::Retrohunt::progress_percentage].
18845    ///
18846    /// # Example
18847    /// ```ignore,no_run
18848    /// # use google_cloud_chronicle_v1::model::Retrohunt;
18849    /// let x = Retrohunt::new().set_progress_percentage(42.0);
18850    /// ```
18851    pub fn set_progress_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
18852        self.progress_percentage = v.into();
18853        self
18854    }
18855}
18856
18857impl wkt::message::Message for Retrohunt {
18858    fn typename() -> &'static str {
18859        "type.googleapis.com/google.cloud.chronicle.v1.Retrohunt"
18860    }
18861}
18862
18863/// Defines additional types related to [Retrohunt].
18864pub mod retrohunt {
18865    #[allow(unused_imports)]
18866    use super::*;
18867
18868    /// The possible states a retrohunt can be in.
18869    ///
18870    /// # Working with unknown values
18871    ///
18872    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18873    /// additional enum variants at any time. Adding new variants is not considered
18874    /// a breaking change. Applications should write their code in anticipation of:
18875    ///
18876    /// - New values appearing in future releases of the client library, **and**
18877    /// - New values received dynamically, without application changes.
18878    ///
18879    /// Please consult the [Working with enums] section in the user guide for some
18880    /// guidelines.
18881    ///
18882    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18883    #[derive(Clone, Debug, PartialEq)]
18884    #[non_exhaustive]
18885    pub enum State {
18886        /// Unspecified or unknown retrohunt state.
18887        Unspecified,
18888        /// Running state.
18889        Running,
18890        /// Done state.
18891        Done,
18892        /// Cancelled state.
18893        Cancelled,
18894        /// Failed state.
18895        Failed,
18896        /// If set, the enum was initialized with an unknown value.
18897        ///
18898        /// Applications can examine the value using [State::value] or
18899        /// [State::name].
18900        UnknownValue(state::UnknownValue),
18901    }
18902
18903    #[doc(hidden)]
18904    pub mod state {
18905        #[allow(unused_imports)]
18906        use super::*;
18907        #[derive(Clone, Debug, PartialEq)]
18908        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18909    }
18910
18911    impl State {
18912        /// Gets the enum value.
18913        ///
18914        /// Returns `None` if the enum contains an unknown value deserialized from
18915        /// the string representation of enums.
18916        pub fn value(&self) -> std::option::Option<i32> {
18917            match self {
18918                Self::Unspecified => std::option::Option::Some(0),
18919                Self::Running => std::option::Option::Some(1),
18920                Self::Done => std::option::Option::Some(2),
18921                Self::Cancelled => std::option::Option::Some(3),
18922                Self::Failed => std::option::Option::Some(4),
18923                Self::UnknownValue(u) => u.0.value(),
18924            }
18925        }
18926
18927        /// Gets the enum value as a string.
18928        ///
18929        /// Returns `None` if the enum contains an unknown value deserialized from
18930        /// the integer representation of enums.
18931        pub fn name(&self) -> std::option::Option<&str> {
18932            match self {
18933                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18934                Self::Running => std::option::Option::Some("RUNNING"),
18935                Self::Done => std::option::Option::Some("DONE"),
18936                Self::Cancelled => std::option::Option::Some("CANCELLED"),
18937                Self::Failed => std::option::Option::Some("FAILED"),
18938                Self::UnknownValue(u) => u.0.name(),
18939            }
18940        }
18941    }
18942
18943    impl std::default::Default for State {
18944        fn default() -> Self {
18945            use std::convert::From;
18946            Self::from(0)
18947        }
18948    }
18949
18950    impl std::fmt::Display for State {
18951        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18952            wkt::internal::display_enum(f, self.name(), self.value())
18953        }
18954    }
18955
18956    impl std::convert::From<i32> for State {
18957        fn from(value: i32) -> Self {
18958            match value {
18959                0 => Self::Unspecified,
18960                1 => Self::Running,
18961                2 => Self::Done,
18962                3 => Self::Cancelled,
18963                4 => Self::Failed,
18964                _ => Self::UnknownValue(state::UnknownValue(
18965                    wkt::internal::UnknownEnumValue::Integer(value),
18966                )),
18967            }
18968        }
18969    }
18970
18971    impl std::convert::From<&str> for State {
18972        fn from(value: &str) -> Self {
18973            use std::string::ToString;
18974            match value {
18975                "STATE_UNSPECIFIED" => Self::Unspecified,
18976                "RUNNING" => Self::Running,
18977                "DONE" => Self::Done,
18978                "CANCELLED" => Self::Cancelled,
18979                "FAILED" => Self::Failed,
18980                _ => Self::UnknownValue(state::UnknownValue(
18981                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18982                )),
18983            }
18984        }
18985    }
18986
18987    impl serde::ser::Serialize for State {
18988        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18989        where
18990            S: serde::Serializer,
18991        {
18992            match self {
18993                Self::Unspecified => serializer.serialize_i32(0),
18994                Self::Running => serializer.serialize_i32(1),
18995                Self::Done => serializer.serialize_i32(2),
18996                Self::Cancelled => serializer.serialize_i32(3),
18997                Self::Failed => serializer.serialize_i32(4),
18998                Self::UnknownValue(u) => u.0.serialize(serializer),
18999            }
19000        }
19001    }
19002
19003    impl<'de> serde::de::Deserialize<'de> for State {
19004        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19005        where
19006            D: serde::Deserializer<'de>,
19007        {
19008            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
19009                ".google.cloud.chronicle.v1.Retrohunt.State",
19010            ))
19011        }
19012    }
19013}
19014
19015/// Request message for CreateRule method.
19016#[derive(Clone, Default, PartialEq)]
19017#[non_exhaustive]
19018pub struct CreateRuleRequest {
19019    /// Required. The parent resource where this rule will be created.
19020    /// Format: `projects/{project}/locations/{location}/instances/{instance}`
19021    pub parent: std::string::String,
19022
19023    /// Required. The rule to create.
19024    pub rule: std::option::Option<crate::model::Rule>,
19025
19026    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19027}
19028
19029impl CreateRuleRequest {
19030    /// Creates a new default instance.
19031    pub fn new() -> Self {
19032        std::default::Default::default()
19033    }
19034
19035    /// Sets the value of [parent][crate::model::CreateRuleRequest::parent].
19036    ///
19037    /// # Example
19038    /// ```ignore,no_run
19039    /// # use google_cloud_chronicle_v1::model::CreateRuleRequest;
19040    /// # let project_id = "project_id";
19041    /// # let location_id = "location_id";
19042    /// # let instance_id = "instance_id";
19043    /// let x = CreateRuleRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
19044    /// ```
19045    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19046        self.parent = v.into();
19047        self
19048    }
19049
19050    /// Sets the value of [rule][crate::model::CreateRuleRequest::rule].
19051    ///
19052    /// # Example
19053    /// ```ignore,no_run
19054    /// # use google_cloud_chronicle_v1::model::CreateRuleRequest;
19055    /// use google_cloud_chronicle_v1::model::Rule;
19056    /// let x = CreateRuleRequest::new().set_rule(Rule::default()/* use setters */);
19057    /// ```
19058    pub fn set_rule<T>(mut self, v: T) -> Self
19059    where
19060        T: std::convert::Into<crate::model::Rule>,
19061    {
19062        self.rule = std::option::Option::Some(v.into());
19063        self
19064    }
19065
19066    /// Sets or clears the value of [rule][crate::model::CreateRuleRequest::rule].
19067    ///
19068    /// # Example
19069    /// ```ignore,no_run
19070    /// # use google_cloud_chronicle_v1::model::CreateRuleRequest;
19071    /// use google_cloud_chronicle_v1::model::Rule;
19072    /// let x = CreateRuleRequest::new().set_or_clear_rule(Some(Rule::default()/* use setters */));
19073    /// let x = CreateRuleRequest::new().set_or_clear_rule(None::<Rule>);
19074    /// ```
19075    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
19076    where
19077        T: std::convert::Into<crate::model::Rule>,
19078    {
19079        self.rule = v.map(|x| x.into());
19080        self
19081    }
19082}
19083
19084impl wkt::message::Message for CreateRuleRequest {
19085    fn typename() -> &'static str {
19086        "type.googleapis.com/google.cloud.chronicle.v1.CreateRuleRequest"
19087    }
19088}
19089
19090/// Request message for GetRule method.
19091#[derive(Clone, Default, PartialEq)]
19092#[non_exhaustive]
19093pub struct GetRuleRequest {
19094    /// Required. The name of the rule to retrieve.
19095    /// Format:
19096    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19097    pub name: std::string::String,
19098
19099    /// The view field indicates the scope of fields to populate for the Rule being
19100    /// returned. If unspecified, defaults to FULL.
19101    pub view: crate::model::RuleView,
19102
19103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19104}
19105
19106impl GetRuleRequest {
19107    /// Creates a new default instance.
19108    pub fn new() -> Self {
19109        std::default::Default::default()
19110    }
19111
19112    /// Sets the value of [name][crate::model::GetRuleRequest::name].
19113    ///
19114    /// # Example
19115    /// ```ignore,no_run
19116    /// # use google_cloud_chronicle_v1::model::GetRuleRequest;
19117    /// # let project_id = "project_id";
19118    /// # let location_id = "location_id";
19119    /// # let instance_id = "instance_id";
19120    /// # let rule_id = "rule_id";
19121    /// let x = GetRuleRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
19122    /// ```
19123    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19124        self.name = v.into();
19125        self
19126    }
19127
19128    /// Sets the value of [view][crate::model::GetRuleRequest::view].
19129    ///
19130    /// # Example
19131    /// ```ignore,no_run
19132    /// # use google_cloud_chronicle_v1::model::GetRuleRequest;
19133    /// use google_cloud_chronicle_v1::model::RuleView;
19134    /// let x0 = GetRuleRequest::new().set_view(RuleView::Basic);
19135    /// let x1 = GetRuleRequest::new().set_view(RuleView::Full);
19136    /// let x2 = GetRuleRequest::new().set_view(RuleView::RevisionMetadataOnly);
19137    /// ```
19138    pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
19139        self.view = v.into();
19140        self
19141    }
19142}
19143
19144impl wkt::message::Message for GetRuleRequest {
19145    fn typename() -> &'static str {
19146        "type.googleapis.com/google.cloud.chronicle.v1.GetRuleRequest"
19147    }
19148}
19149
19150/// Request message for ListRules method.
19151#[derive(Clone, Default, PartialEq)]
19152#[non_exhaustive]
19153pub struct ListRulesRequest {
19154    /// Required. The parent, which owns this collection of rules.
19155    /// Format:
19156    /// `projects/{project}/locations/{location}/instances/{instance}`
19157    pub parent: std::string::String,
19158
19159    /// The maximum number of rules to return. The service may return fewer than
19160    /// this value. If unspecified, at most 100 rules will be returned. The
19161    /// maximum value is 1000; values above 1000 will be coerced to 1000.
19162    pub page_size: i32,
19163
19164    /// A page token, received from a previous `ListRules` call.
19165    /// Provide this to retrieve the subsequent page.
19166    ///
19167    /// When paginating, all other parameters provided to `ListRules`
19168    /// must match the call that provided the page token.
19169    pub page_token: std::string::String,
19170
19171    /// view indicates the scope of fields to populate for the Rule being returned.
19172    /// If unspecified, defaults to BASIC.
19173    pub view: crate::model::RuleView,
19174
19175    /// Only the following filters are allowed:
19176    /// "reference_lists:{reference_list_name}"
19177    /// "data_tables:{data_table_name}"
19178    /// "display_name:{display_name}"
19179    pub filter: std::string::String,
19180
19181    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19182}
19183
19184impl ListRulesRequest {
19185    /// Creates a new default instance.
19186    pub fn new() -> Self {
19187        std::default::Default::default()
19188    }
19189
19190    /// Sets the value of [parent][crate::model::ListRulesRequest::parent].
19191    ///
19192    /// # Example
19193    /// ```ignore,no_run
19194    /// # use google_cloud_chronicle_v1::model::ListRulesRequest;
19195    /// # let project_id = "project_id";
19196    /// # let location_id = "location_id";
19197    /// # let instance_id = "instance_id";
19198    /// let x = ListRulesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
19199    /// ```
19200    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19201        self.parent = v.into();
19202        self
19203    }
19204
19205    /// Sets the value of [page_size][crate::model::ListRulesRequest::page_size].
19206    ///
19207    /// # Example
19208    /// ```ignore,no_run
19209    /// # use google_cloud_chronicle_v1::model::ListRulesRequest;
19210    /// let x = ListRulesRequest::new().set_page_size(42);
19211    /// ```
19212    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19213        self.page_size = v.into();
19214        self
19215    }
19216
19217    /// Sets the value of [page_token][crate::model::ListRulesRequest::page_token].
19218    ///
19219    /// # Example
19220    /// ```ignore,no_run
19221    /// # use google_cloud_chronicle_v1::model::ListRulesRequest;
19222    /// let x = ListRulesRequest::new().set_page_token("example");
19223    /// ```
19224    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19225        self.page_token = v.into();
19226        self
19227    }
19228
19229    /// Sets the value of [view][crate::model::ListRulesRequest::view].
19230    ///
19231    /// # Example
19232    /// ```ignore,no_run
19233    /// # use google_cloud_chronicle_v1::model::ListRulesRequest;
19234    /// use google_cloud_chronicle_v1::model::RuleView;
19235    /// let x0 = ListRulesRequest::new().set_view(RuleView::Basic);
19236    /// let x1 = ListRulesRequest::new().set_view(RuleView::Full);
19237    /// let x2 = ListRulesRequest::new().set_view(RuleView::RevisionMetadataOnly);
19238    /// ```
19239    pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
19240        self.view = v.into();
19241        self
19242    }
19243
19244    /// Sets the value of [filter][crate::model::ListRulesRequest::filter].
19245    ///
19246    /// # Example
19247    /// ```ignore,no_run
19248    /// # use google_cloud_chronicle_v1::model::ListRulesRequest;
19249    /// let x = ListRulesRequest::new().set_filter("example");
19250    /// ```
19251    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19252        self.filter = v.into();
19253        self
19254    }
19255}
19256
19257impl wkt::message::Message for ListRulesRequest {
19258    fn typename() -> &'static str {
19259        "type.googleapis.com/google.cloud.chronicle.v1.ListRulesRequest"
19260    }
19261}
19262
19263/// Response message for ListRules method.
19264#[derive(Clone, Default, PartialEq)]
19265#[non_exhaustive]
19266pub struct ListRulesResponse {
19267    /// The rules from the specified instance.
19268    pub rules: std::vec::Vec<crate::model::Rule>,
19269
19270    /// A token, which can be sent as `page_token` to retrieve the next page.
19271    /// If this field is omitted, there are no subsequent pages.
19272    pub next_page_token: std::string::String,
19273
19274    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19275}
19276
19277impl ListRulesResponse {
19278    /// Creates a new default instance.
19279    pub fn new() -> Self {
19280        std::default::Default::default()
19281    }
19282
19283    /// Sets the value of [rules][crate::model::ListRulesResponse::rules].
19284    ///
19285    /// # Example
19286    /// ```ignore,no_run
19287    /// # use google_cloud_chronicle_v1::model::ListRulesResponse;
19288    /// use google_cloud_chronicle_v1::model::Rule;
19289    /// let x = ListRulesResponse::new()
19290    ///     .set_rules([
19291    ///         Rule::default()/* use setters */,
19292    ///         Rule::default()/* use (different) setters */,
19293    ///     ]);
19294    /// ```
19295    pub fn set_rules<T, V>(mut self, v: T) -> Self
19296    where
19297        T: std::iter::IntoIterator<Item = V>,
19298        V: std::convert::Into<crate::model::Rule>,
19299    {
19300        use std::iter::Iterator;
19301        self.rules = v.into_iter().map(|i| i.into()).collect();
19302        self
19303    }
19304
19305    /// Sets the value of [next_page_token][crate::model::ListRulesResponse::next_page_token].
19306    ///
19307    /// # Example
19308    /// ```ignore,no_run
19309    /// # use google_cloud_chronicle_v1::model::ListRulesResponse;
19310    /// let x = ListRulesResponse::new().set_next_page_token("example");
19311    /// ```
19312    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19313        self.next_page_token = v.into();
19314        self
19315    }
19316}
19317
19318impl wkt::message::Message for ListRulesResponse {
19319    fn typename() -> &'static str {
19320        "type.googleapis.com/google.cloud.chronicle.v1.ListRulesResponse"
19321    }
19322}
19323
19324#[doc(hidden)]
19325impl google_cloud_gax::paginator::internal::PageableResponse for ListRulesResponse {
19326    type PageItem = crate::model::Rule;
19327
19328    fn items(self) -> std::vec::Vec<Self::PageItem> {
19329        self.rules
19330    }
19331
19332    fn next_page_token(&self) -> std::string::String {
19333        use std::clone::Clone;
19334        self.next_page_token.clone()
19335    }
19336}
19337
19338/// Request message for UpdateRule method.
19339#[derive(Clone, Default, PartialEq)]
19340#[non_exhaustive]
19341pub struct UpdateRuleRequest {
19342    /// Required. The rule to update.
19343    ///
19344    /// The rule's `name` field is used to identify the rule to update.
19345    /// Format:
19346    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19347    pub rule: std::option::Option<crate::model::Rule>,
19348
19349    /// The list of fields to update. If not included, all fields with a non-empty
19350    /// value will be overwritten.
19351    pub update_mask: std::option::Option<wkt::FieldMask>,
19352
19353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19354}
19355
19356impl UpdateRuleRequest {
19357    /// Creates a new default instance.
19358    pub fn new() -> Self {
19359        std::default::Default::default()
19360    }
19361
19362    /// Sets the value of [rule][crate::model::UpdateRuleRequest::rule].
19363    ///
19364    /// # Example
19365    /// ```ignore,no_run
19366    /// # use google_cloud_chronicle_v1::model::UpdateRuleRequest;
19367    /// use google_cloud_chronicle_v1::model::Rule;
19368    /// let x = UpdateRuleRequest::new().set_rule(Rule::default()/* use setters */);
19369    /// ```
19370    pub fn set_rule<T>(mut self, v: T) -> Self
19371    where
19372        T: std::convert::Into<crate::model::Rule>,
19373    {
19374        self.rule = std::option::Option::Some(v.into());
19375        self
19376    }
19377
19378    /// Sets or clears the value of [rule][crate::model::UpdateRuleRequest::rule].
19379    ///
19380    /// # Example
19381    /// ```ignore,no_run
19382    /// # use google_cloud_chronicle_v1::model::UpdateRuleRequest;
19383    /// use google_cloud_chronicle_v1::model::Rule;
19384    /// let x = UpdateRuleRequest::new().set_or_clear_rule(Some(Rule::default()/* use setters */));
19385    /// let x = UpdateRuleRequest::new().set_or_clear_rule(None::<Rule>);
19386    /// ```
19387    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
19388    where
19389        T: std::convert::Into<crate::model::Rule>,
19390    {
19391        self.rule = v.map(|x| x.into());
19392        self
19393    }
19394
19395    /// Sets the value of [update_mask][crate::model::UpdateRuleRequest::update_mask].
19396    ///
19397    /// # Example
19398    /// ```ignore,no_run
19399    /// # use google_cloud_chronicle_v1::model::UpdateRuleRequest;
19400    /// use wkt::FieldMask;
19401    /// let x = UpdateRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
19402    /// ```
19403    pub fn set_update_mask<T>(mut self, v: T) -> Self
19404    where
19405        T: std::convert::Into<wkt::FieldMask>,
19406    {
19407        self.update_mask = std::option::Option::Some(v.into());
19408        self
19409    }
19410
19411    /// Sets or clears the value of [update_mask][crate::model::UpdateRuleRequest::update_mask].
19412    ///
19413    /// # Example
19414    /// ```ignore,no_run
19415    /// # use google_cloud_chronicle_v1::model::UpdateRuleRequest;
19416    /// use wkt::FieldMask;
19417    /// let x = UpdateRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
19418    /// let x = UpdateRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
19419    /// ```
19420    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19421    where
19422        T: std::convert::Into<wkt::FieldMask>,
19423    {
19424        self.update_mask = v.map(|x| x.into());
19425        self
19426    }
19427}
19428
19429impl wkt::message::Message for UpdateRuleRequest {
19430    fn typename() -> &'static str {
19431        "type.googleapis.com/google.cloud.chronicle.v1.UpdateRuleRequest"
19432    }
19433}
19434
19435/// Request message for the DeleteRule method.
19436#[derive(Clone, Default, PartialEq)]
19437#[non_exhaustive]
19438pub struct DeleteRuleRequest {
19439    /// Required. The name of the rule to delete. A rule revision timestamp cannot
19440    /// be specified as part of the name, as deleting specific revisions is not
19441    /// supported.
19442    /// Format:
19443    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19444    pub name: std::string::String,
19445
19446    /// Optional. If set to true, any retrohunts and any detections associated with
19447    /// the rule will also be deleted. If set to false, the call will only succeed
19448    /// if the rule has no associated retrohunts, including completed retrohunts,
19449    /// and no associated detections. Regardless of this field's value, the rule
19450    /// deployment associated with this rule will also be deleted.
19451    pub force: bool,
19452
19453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19454}
19455
19456impl DeleteRuleRequest {
19457    /// Creates a new default instance.
19458    pub fn new() -> Self {
19459        std::default::Default::default()
19460    }
19461
19462    /// Sets the value of [name][crate::model::DeleteRuleRequest::name].
19463    ///
19464    /// # Example
19465    /// ```ignore,no_run
19466    /// # use google_cloud_chronicle_v1::model::DeleteRuleRequest;
19467    /// # let project_id = "project_id";
19468    /// # let location_id = "location_id";
19469    /// # let instance_id = "instance_id";
19470    /// # let rule_id = "rule_id";
19471    /// let x = DeleteRuleRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
19472    /// ```
19473    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19474        self.name = v.into();
19475        self
19476    }
19477
19478    /// Sets the value of [force][crate::model::DeleteRuleRequest::force].
19479    ///
19480    /// # Example
19481    /// ```ignore,no_run
19482    /// # use google_cloud_chronicle_v1::model::DeleteRuleRequest;
19483    /// let x = DeleteRuleRequest::new().set_force(true);
19484    /// ```
19485    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19486        self.force = v.into();
19487        self
19488    }
19489}
19490
19491impl wkt::message::Message for DeleteRuleRequest {
19492    fn typename() -> &'static str {
19493        "type.googleapis.com/google.cloud.chronicle.v1.DeleteRuleRequest"
19494    }
19495}
19496
19497/// Request message for ListRuleRevisions method.
19498#[derive(Clone, Default, PartialEq)]
19499#[non_exhaustive]
19500pub struct ListRuleRevisionsRequest {
19501    /// Required. The name of the rule to list revisions for.
19502    /// Format:
19503    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19504    pub name: std::string::String,
19505
19506    /// The maximum number of revisions to return per page. The service may return
19507    /// fewer than this value. If unspecified, at most 100 revisions will be
19508    /// returned. The maximum value is 1000; values above 1000 will be coerced to
19509    /// 1000.
19510    pub page_size: i32,
19511
19512    /// The page token, received from a previous `ListRuleRevisions` call.
19513    /// Provide this to retrieve the subsequent page.
19514    ///
19515    /// When paginating, all other parameters provided to `ListRuleRevisions`
19516    /// must match the call that provided the page token.
19517    pub page_token: std::string::String,
19518
19519    /// The view field indicates the scope of fields to populate for the revision
19520    /// being returned. If unspecified, defaults to BASIC.
19521    pub view: crate::model::RuleView,
19522
19523    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19524}
19525
19526impl ListRuleRevisionsRequest {
19527    /// Creates a new default instance.
19528    pub fn new() -> Self {
19529        std::default::Default::default()
19530    }
19531
19532    /// Sets the value of [name][crate::model::ListRuleRevisionsRequest::name].
19533    ///
19534    /// # Example
19535    /// ```ignore,no_run
19536    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsRequest;
19537    /// # let project_id = "project_id";
19538    /// # let location_id = "location_id";
19539    /// # let instance_id = "instance_id";
19540    /// # let rule_id = "rule_id";
19541    /// let x = ListRuleRevisionsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
19542    /// ```
19543    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19544        self.name = v.into();
19545        self
19546    }
19547
19548    /// Sets the value of [page_size][crate::model::ListRuleRevisionsRequest::page_size].
19549    ///
19550    /// # Example
19551    /// ```ignore,no_run
19552    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsRequest;
19553    /// let x = ListRuleRevisionsRequest::new().set_page_size(42);
19554    /// ```
19555    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19556        self.page_size = v.into();
19557        self
19558    }
19559
19560    /// Sets the value of [page_token][crate::model::ListRuleRevisionsRequest::page_token].
19561    ///
19562    /// # Example
19563    /// ```ignore,no_run
19564    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsRequest;
19565    /// let x = ListRuleRevisionsRequest::new().set_page_token("example");
19566    /// ```
19567    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19568        self.page_token = v.into();
19569        self
19570    }
19571
19572    /// Sets the value of [view][crate::model::ListRuleRevisionsRequest::view].
19573    ///
19574    /// # Example
19575    /// ```ignore,no_run
19576    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsRequest;
19577    /// use google_cloud_chronicle_v1::model::RuleView;
19578    /// let x0 = ListRuleRevisionsRequest::new().set_view(RuleView::Basic);
19579    /// let x1 = ListRuleRevisionsRequest::new().set_view(RuleView::Full);
19580    /// let x2 = ListRuleRevisionsRequest::new().set_view(RuleView::RevisionMetadataOnly);
19581    /// ```
19582    pub fn set_view<T: std::convert::Into<crate::model::RuleView>>(mut self, v: T) -> Self {
19583        self.view = v.into();
19584        self
19585    }
19586}
19587
19588impl wkt::message::Message for ListRuleRevisionsRequest {
19589    fn typename() -> &'static str {
19590        "type.googleapis.com/google.cloud.chronicle.v1.ListRuleRevisionsRequest"
19591    }
19592}
19593
19594/// Response message for ListRuleRevisions method.
19595#[derive(Clone, Default, PartialEq)]
19596#[non_exhaustive]
19597pub struct ListRuleRevisionsResponse {
19598    /// The revisions of the rule.
19599    pub rules: std::vec::Vec<crate::model::Rule>,
19600
19601    /// A token that can be sent as `page_token` to retrieve the next page.
19602    /// If this field is omitted, there are no subsequent pages.
19603    pub next_page_token: std::string::String,
19604
19605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19606}
19607
19608impl ListRuleRevisionsResponse {
19609    /// Creates a new default instance.
19610    pub fn new() -> Self {
19611        std::default::Default::default()
19612    }
19613
19614    /// Sets the value of [rules][crate::model::ListRuleRevisionsResponse::rules].
19615    ///
19616    /// # Example
19617    /// ```ignore,no_run
19618    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsResponse;
19619    /// use google_cloud_chronicle_v1::model::Rule;
19620    /// let x = ListRuleRevisionsResponse::new()
19621    ///     .set_rules([
19622    ///         Rule::default()/* use setters */,
19623    ///         Rule::default()/* use (different) setters */,
19624    ///     ]);
19625    /// ```
19626    pub fn set_rules<T, V>(mut self, v: T) -> Self
19627    where
19628        T: std::iter::IntoIterator<Item = V>,
19629        V: std::convert::Into<crate::model::Rule>,
19630    {
19631        use std::iter::Iterator;
19632        self.rules = v.into_iter().map(|i| i.into()).collect();
19633        self
19634    }
19635
19636    /// Sets the value of [next_page_token][crate::model::ListRuleRevisionsResponse::next_page_token].
19637    ///
19638    /// # Example
19639    /// ```ignore,no_run
19640    /// # use google_cloud_chronicle_v1::model::ListRuleRevisionsResponse;
19641    /// let x = ListRuleRevisionsResponse::new().set_next_page_token("example");
19642    /// ```
19643    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19644        self.next_page_token = v.into();
19645        self
19646    }
19647}
19648
19649impl wkt::message::Message for ListRuleRevisionsResponse {
19650    fn typename() -> &'static str {
19651        "type.googleapis.com/google.cloud.chronicle.v1.ListRuleRevisionsResponse"
19652    }
19653}
19654
19655#[doc(hidden)]
19656impl google_cloud_gax::paginator::internal::PageableResponse for ListRuleRevisionsResponse {
19657    type PageItem = crate::model::Rule;
19658
19659    fn items(self) -> std::vec::Vec<Self::PageItem> {
19660        self.rules
19661    }
19662
19663    fn next_page_token(&self) -> std::string::String {
19664        use std::clone::Clone;
19665        self.next_page_token.clone()
19666    }
19667}
19668
19669/// Request message for CreateRetrohunt method.
19670#[derive(Clone, Default, PartialEq)]
19671#[non_exhaustive]
19672pub struct CreateRetrohuntRequest {
19673    /// Required. The parent of retrohunt, which is a rule.
19674    /// Format:
19675    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19676    pub parent: std::string::String,
19677
19678    /// Required. The retrohunt to create.
19679    pub retrohunt: std::option::Option<crate::model::Retrohunt>,
19680
19681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19682}
19683
19684impl CreateRetrohuntRequest {
19685    /// Creates a new default instance.
19686    pub fn new() -> Self {
19687        std::default::Default::default()
19688    }
19689
19690    /// Sets the value of [parent][crate::model::CreateRetrohuntRequest::parent].
19691    ///
19692    /// # Example
19693    /// ```ignore,no_run
19694    /// # use google_cloud_chronicle_v1::model::CreateRetrohuntRequest;
19695    /// # let project_id = "project_id";
19696    /// # let location_id = "location_id";
19697    /// # let instance_id = "instance_id";
19698    /// # let rule_id = "rule_id";
19699    /// let x = CreateRetrohuntRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
19700    /// ```
19701    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19702        self.parent = v.into();
19703        self
19704    }
19705
19706    /// Sets the value of [retrohunt][crate::model::CreateRetrohuntRequest::retrohunt].
19707    ///
19708    /// # Example
19709    /// ```ignore,no_run
19710    /// # use google_cloud_chronicle_v1::model::CreateRetrohuntRequest;
19711    /// use google_cloud_chronicle_v1::model::Retrohunt;
19712    /// let x = CreateRetrohuntRequest::new().set_retrohunt(Retrohunt::default()/* use setters */);
19713    /// ```
19714    pub fn set_retrohunt<T>(mut self, v: T) -> Self
19715    where
19716        T: std::convert::Into<crate::model::Retrohunt>,
19717    {
19718        self.retrohunt = std::option::Option::Some(v.into());
19719        self
19720    }
19721
19722    /// Sets or clears the value of [retrohunt][crate::model::CreateRetrohuntRequest::retrohunt].
19723    ///
19724    /// # Example
19725    /// ```ignore,no_run
19726    /// # use google_cloud_chronicle_v1::model::CreateRetrohuntRequest;
19727    /// use google_cloud_chronicle_v1::model::Retrohunt;
19728    /// let x = CreateRetrohuntRequest::new().set_or_clear_retrohunt(Some(Retrohunt::default()/* use setters */));
19729    /// let x = CreateRetrohuntRequest::new().set_or_clear_retrohunt(None::<Retrohunt>);
19730    /// ```
19731    pub fn set_or_clear_retrohunt<T>(mut self, v: std::option::Option<T>) -> Self
19732    where
19733        T: std::convert::Into<crate::model::Retrohunt>,
19734    {
19735        self.retrohunt = v.map(|x| x.into());
19736        self
19737    }
19738}
19739
19740impl wkt::message::Message for CreateRetrohuntRequest {
19741    fn typename() -> &'static str {
19742        "type.googleapis.com/google.cloud.chronicle.v1.CreateRetrohuntRequest"
19743    }
19744}
19745
19746/// Request message for GetRetrohunt method.
19747#[derive(Clone, Default, PartialEq)]
19748#[non_exhaustive]
19749pub struct GetRetrohuntRequest {
19750    /// Required. The name of the retrohunt to retrieve.
19751    /// Format:
19752    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}`
19753    pub name: std::string::String,
19754
19755    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19756}
19757
19758impl GetRetrohuntRequest {
19759    /// Creates a new default instance.
19760    pub fn new() -> Self {
19761        std::default::Default::default()
19762    }
19763
19764    /// Sets the value of [name][crate::model::GetRetrohuntRequest::name].
19765    ///
19766    /// # Example
19767    /// ```ignore,no_run
19768    /// # use google_cloud_chronicle_v1::model::GetRetrohuntRequest;
19769    /// # let project_id = "project_id";
19770    /// # let location_id = "location_id";
19771    /// # let instance_id = "instance_id";
19772    /// # let rule_id = "rule_id";
19773    /// # let retrohunt_id = "retrohunt_id";
19774    /// let x = GetRetrohuntRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}/retrohunts/{retrohunt_id}"));
19775    /// ```
19776    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19777        self.name = v.into();
19778        self
19779    }
19780}
19781
19782impl wkt::message::Message for GetRetrohuntRequest {
19783    fn typename() -> &'static str {
19784        "type.googleapis.com/google.cloud.chronicle.v1.GetRetrohuntRequest"
19785    }
19786}
19787
19788/// Request message for ListRetrohunts method.
19789#[derive(Clone, Default, PartialEq)]
19790#[non_exhaustive]
19791pub struct ListRetrohuntsRequest {
19792    /// Required. The rule that the retrohunts belong to.
19793    /// Format:
19794    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
19795    pub parent: std::string::String,
19796
19797    /// The maximum number of retrohunt to return. The service may return fewer
19798    /// than this value. If unspecified, at most 100 retrohunts will be returned.
19799    /// The maximum value is 1000; values above 1000 will be coerced to
19800    /// 1000.
19801    pub page_size: i32,
19802
19803    /// A page token, received from a previous `ListRetrohunts` call.
19804    /// Provide this to retrieve the subsequent page.
19805    ///
19806    /// When paginating, all other parameters provided to `ListRetrohunts` must
19807    /// match the call that provided the page token.
19808    pub page_token: std::string::String,
19809
19810    /// A filter that can be used to retrieve specific rule deployments.
19811    /// The following fields are filterable:
19812    /// state
19813    pub filter: std::string::String,
19814
19815    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19816}
19817
19818impl ListRetrohuntsRequest {
19819    /// Creates a new default instance.
19820    pub fn new() -> Self {
19821        std::default::Default::default()
19822    }
19823
19824    /// Sets the value of [parent][crate::model::ListRetrohuntsRequest::parent].
19825    ///
19826    /// # Example
19827    /// ```ignore,no_run
19828    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsRequest;
19829    /// # let project_id = "project_id";
19830    /// # let location_id = "location_id";
19831    /// # let instance_id = "instance_id";
19832    /// # let rule_id = "rule_id";
19833    /// let x = ListRetrohuntsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
19834    /// ```
19835    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19836        self.parent = v.into();
19837        self
19838    }
19839
19840    /// Sets the value of [page_size][crate::model::ListRetrohuntsRequest::page_size].
19841    ///
19842    /// # Example
19843    /// ```ignore,no_run
19844    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsRequest;
19845    /// let x = ListRetrohuntsRequest::new().set_page_size(42);
19846    /// ```
19847    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19848        self.page_size = v.into();
19849        self
19850    }
19851
19852    /// Sets the value of [page_token][crate::model::ListRetrohuntsRequest::page_token].
19853    ///
19854    /// # Example
19855    /// ```ignore,no_run
19856    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsRequest;
19857    /// let x = ListRetrohuntsRequest::new().set_page_token("example");
19858    /// ```
19859    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19860        self.page_token = v.into();
19861        self
19862    }
19863
19864    /// Sets the value of [filter][crate::model::ListRetrohuntsRequest::filter].
19865    ///
19866    /// # Example
19867    /// ```ignore,no_run
19868    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsRequest;
19869    /// let x = ListRetrohuntsRequest::new().set_filter("example");
19870    /// ```
19871    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19872        self.filter = v.into();
19873        self
19874    }
19875}
19876
19877impl wkt::message::Message for ListRetrohuntsRequest {
19878    fn typename() -> &'static str {
19879        "type.googleapis.com/google.cloud.chronicle.v1.ListRetrohuntsRequest"
19880    }
19881}
19882
19883/// Response message for ListRetrohunts method.
19884#[derive(Clone, Default, PartialEq)]
19885#[non_exhaustive]
19886pub struct ListRetrohuntsResponse {
19887    /// The retrohunts from the specified rule.
19888    pub retrohunts: std::vec::Vec<crate::model::Retrohunt>,
19889
19890    /// A token, which can be sent as `page_token` to retrieve the next page.
19891    /// If this field is omitted, there are no subsequent pages.
19892    pub next_page_token: std::string::String,
19893
19894    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19895}
19896
19897impl ListRetrohuntsResponse {
19898    /// Creates a new default instance.
19899    pub fn new() -> Self {
19900        std::default::Default::default()
19901    }
19902
19903    /// Sets the value of [retrohunts][crate::model::ListRetrohuntsResponse::retrohunts].
19904    ///
19905    /// # Example
19906    /// ```ignore,no_run
19907    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsResponse;
19908    /// use google_cloud_chronicle_v1::model::Retrohunt;
19909    /// let x = ListRetrohuntsResponse::new()
19910    ///     .set_retrohunts([
19911    ///         Retrohunt::default()/* use setters */,
19912    ///         Retrohunt::default()/* use (different) setters */,
19913    ///     ]);
19914    /// ```
19915    pub fn set_retrohunts<T, V>(mut self, v: T) -> Self
19916    where
19917        T: std::iter::IntoIterator<Item = V>,
19918        V: std::convert::Into<crate::model::Retrohunt>,
19919    {
19920        use std::iter::Iterator;
19921        self.retrohunts = v.into_iter().map(|i| i.into()).collect();
19922        self
19923    }
19924
19925    /// Sets the value of [next_page_token][crate::model::ListRetrohuntsResponse::next_page_token].
19926    ///
19927    /// # Example
19928    /// ```ignore,no_run
19929    /// # use google_cloud_chronicle_v1::model::ListRetrohuntsResponse;
19930    /// let x = ListRetrohuntsResponse::new().set_next_page_token("example");
19931    /// ```
19932    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19933        self.next_page_token = v.into();
19934        self
19935    }
19936}
19937
19938impl wkt::message::Message for ListRetrohuntsResponse {
19939    fn typename() -> &'static str {
19940        "type.googleapis.com/google.cloud.chronicle.v1.ListRetrohuntsResponse"
19941    }
19942}
19943
19944#[doc(hidden)]
19945impl google_cloud_gax::paginator::internal::PageableResponse for ListRetrohuntsResponse {
19946    type PageItem = crate::model::Retrohunt;
19947
19948    fn items(self) -> std::vec::Vec<Self::PageItem> {
19949        self.retrohunts
19950    }
19951
19952    fn next_page_token(&self) -> std::string::String {
19953        use std::clone::Clone;
19954        self.next_page_token.clone()
19955    }
19956}
19957
19958/// Request message for GetRuleDeployment.
19959#[derive(Clone, Default, PartialEq)]
19960#[non_exhaustive]
19961pub struct GetRuleDeploymentRequest {
19962    /// Required. The name of the rule deployment to retrieve.
19963    /// Format:
19964    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`
19965    pub name: std::string::String,
19966
19967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19968}
19969
19970impl GetRuleDeploymentRequest {
19971    /// Creates a new default instance.
19972    pub fn new() -> Self {
19973        std::default::Default::default()
19974    }
19975
19976    /// Sets the value of [name][crate::model::GetRuleDeploymentRequest::name].
19977    ///
19978    /// # Example
19979    /// ```ignore,no_run
19980    /// # use google_cloud_chronicle_v1::model::GetRuleDeploymentRequest;
19981    /// # let project_id = "project_id";
19982    /// # let location_id = "location_id";
19983    /// # let instance_id = "instance_id";
19984    /// # let rule_id = "rule_id";
19985    /// let x = GetRuleDeploymentRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}/deployment"));
19986    /// ```
19987    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19988        self.name = v.into();
19989        self
19990    }
19991}
19992
19993impl wkt::message::Message for GetRuleDeploymentRequest {
19994    fn typename() -> &'static str {
19995        "type.googleapis.com/google.cloud.chronicle.v1.GetRuleDeploymentRequest"
19996    }
19997}
19998
19999/// Request message for ListRuleDeployments.
20000#[derive(Clone, Default, PartialEq)]
20001#[non_exhaustive]
20002pub struct ListRuleDeploymentsRequest {
20003    /// Required. The collection of all parents which own all rule deployments. The
20004    /// "-" wildcard token must be used as the rule identifier in the resource
20005    /// path. Format:
20006    /// `projects/{project}/locations/{location}/instances/{instance}/rules/-`
20007    pub parent: std::string::String,
20008
20009    /// The maximum number of rule deployments to return. The service may return
20010    /// fewer than this value. If unspecified, at most 100 rule deployments will be
20011    /// returned. The maximum value is 1000; values above 1000 will be coerced to
20012    /// 1000.
20013    pub page_size: i32,
20014
20015    /// A page token, received from a previous `ListRuleDeployments` call.
20016    /// Provide this to retrieve the subsequent page.
20017    ///
20018    /// When paginating, all other parameters provided to `ListRuleDeployments`
20019    /// must match the call that provided the page token.
20020    pub page_token: std::string::String,
20021
20022    /// A filter that can be used to retrieve specific rule deployments.
20023    /// The following fields are filterable:
20024    /// archived, name
20025    pub filter: std::string::String,
20026
20027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20028}
20029
20030impl ListRuleDeploymentsRequest {
20031    /// Creates a new default instance.
20032    pub fn new() -> Self {
20033        std::default::Default::default()
20034    }
20035
20036    /// Sets the value of [parent][crate::model::ListRuleDeploymentsRequest::parent].
20037    ///
20038    /// # Example
20039    /// ```ignore,no_run
20040    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsRequest;
20041    /// # let project_id = "project_id";
20042    /// # let location_id = "location_id";
20043    /// # let instance_id = "instance_id";
20044    /// # let rule_id = "rule_id";
20045    /// let x = ListRuleDeploymentsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
20046    /// ```
20047    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20048        self.parent = v.into();
20049        self
20050    }
20051
20052    /// Sets the value of [page_size][crate::model::ListRuleDeploymentsRequest::page_size].
20053    ///
20054    /// # Example
20055    /// ```ignore,no_run
20056    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsRequest;
20057    /// let x = ListRuleDeploymentsRequest::new().set_page_size(42);
20058    /// ```
20059    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20060        self.page_size = v.into();
20061        self
20062    }
20063
20064    /// Sets the value of [page_token][crate::model::ListRuleDeploymentsRequest::page_token].
20065    ///
20066    /// # Example
20067    /// ```ignore,no_run
20068    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsRequest;
20069    /// let x = ListRuleDeploymentsRequest::new().set_page_token("example");
20070    /// ```
20071    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20072        self.page_token = v.into();
20073        self
20074    }
20075
20076    /// Sets the value of [filter][crate::model::ListRuleDeploymentsRequest::filter].
20077    ///
20078    /// # Example
20079    /// ```ignore,no_run
20080    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsRequest;
20081    /// let x = ListRuleDeploymentsRequest::new().set_filter("example");
20082    /// ```
20083    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20084        self.filter = v.into();
20085        self
20086    }
20087}
20088
20089impl wkt::message::Message for ListRuleDeploymentsRequest {
20090    fn typename() -> &'static str {
20091        "type.googleapis.com/google.cloud.chronicle.v1.ListRuleDeploymentsRequest"
20092    }
20093}
20094
20095/// Response message for ListRuleDeployments.
20096#[derive(Clone, Default, PartialEq)]
20097#[non_exhaustive]
20098pub struct ListRuleDeploymentsResponse {
20099    /// The rule deployments from all rules.
20100    pub rule_deployments: std::vec::Vec<crate::model::RuleDeployment>,
20101
20102    /// A token, which can be sent as `page_token` to retrieve the next page.
20103    /// If this field is omitted, there are no subsequent pages.
20104    pub next_page_token: std::string::String,
20105
20106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20107}
20108
20109impl ListRuleDeploymentsResponse {
20110    /// Creates a new default instance.
20111    pub fn new() -> Self {
20112        std::default::Default::default()
20113    }
20114
20115    /// Sets the value of [rule_deployments][crate::model::ListRuleDeploymentsResponse::rule_deployments].
20116    ///
20117    /// # Example
20118    /// ```ignore,no_run
20119    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsResponse;
20120    /// use google_cloud_chronicle_v1::model::RuleDeployment;
20121    /// let x = ListRuleDeploymentsResponse::new()
20122    ///     .set_rule_deployments([
20123    ///         RuleDeployment::default()/* use setters */,
20124    ///         RuleDeployment::default()/* use (different) setters */,
20125    ///     ]);
20126    /// ```
20127    pub fn set_rule_deployments<T, V>(mut self, v: T) -> Self
20128    where
20129        T: std::iter::IntoIterator<Item = V>,
20130        V: std::convert::Into<crate::model::RuleDeployment>,
20131    {
20132        use std::iter::Iterator;
20133        self.rule_deployments = v.into_iter().map(|i| i.into()).collect();
20134        self
20135    }
20136
20137    /// Sets the value of [next_page_token][crate::model::ListRuleDeploymentsResponse::next_page_token].
20138    ///
20139    /// # Example
20140    /// ```ignore,no_run
20141    /// # use google_cloud_chronicle_v1::model::ListRuleDeploymentsResponse;
20142    /// let x = ListRuleDeploymentsResponse::new().set_next_page_token("example");
20143    /// ```
20144    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20145        self.next_page_token = v.into();
20146        self
20147    }
20148}
20149
20150impl wkt::message::Message for ListRuleDeploymentsResponse {
20151    fn typename() -> &'static str {
20152        "type.googleapis.com/google.cloud.chronicle.v1.ListRuleDeploymentsResponse"
20153    }
20154}
20155
20156#[doc(hidden)]
20157impl google_cloud_gax::paginator::internal::PageableResponse for ListRuleDeploymentsResponse {
20158    type PageItem = crate::model::RuleDeployment;
20159
20160    fn items(self) -> std::vec::Vec<Self::PageItem> {
20161        self.rule_deployments
20162    }
20163
20164    fn next_page_token(&self) -> std::string::String {
20165        use std::clone::Clone;
20166        self.next_page_token.clone()
20167    }
20168}
20169
20170/// Request message for UpdateRuleDeployment.
20171#[derive(Clone, Default, PartialEq)]
20172#[non_exhaustive]
20173pub struct UpdateRuleDeploymentRequest {
20174    /// Required. The rule deployment to update.
20175    ///
20176    /// The rule deployment's `name` field is used to identify the rule deployment
20177    /// to update. Format:
20178    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`
20179    pub rule_deployment: std::option::Option<crate::model::RuleDeployment>,
20180
20181    /// Required. The list of fields to update.
20182    pub update_mask: std::option::Option<wkt::FieldMask>,
20183
20184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20185}
20186
20187impl UpdateRuleDeploymentRequest {
20188    /// Creates a new default instance.
20189    pub fn new() -> Self {
20190        std::default::Default::default()
20191    }
20192
20193    /// Sets the value of [rule_deployment][crate::model::UpdateRuleDeploymentRequest::rule_deployment].
20194    ///
20195    /// # Example
20196    /// ```ignore,no_run
20197    /// # use google_cloud_chronicle_v1::model::UpdateRuleDeploymentRequest;
20198    /// use google_cloud_chronicle_v1::model::RuleDeployment;
20199    /// let x = UpdateRuleDeploymentRequest::new().set_rule_deployment(RuleDeployment::default()/* use setters */);
20200    /// ```
20201    pub fn set_rule_deployment<T>(mut self, v: T) -> Self
20202    where
20203        T: std::convert::Into<crate::model::RuleDeployment>,
20204    {
20205        self.rule_deployment = std::option::Option::Some(v.into());
20206        self
20207    }
20208
20209    /// Sets or clears the value of [rule_deployment][crate::model::UpdateRuleDeploymentRequest::rule_deployment].
20210    ///
20211    /// # Example
20212    /// ```ignore,no_run
20213    /// # use google_cloud_chronicle_v1::model::UpdateRuleDeploymentRequest;
20214    /// use google_cloud_chronicle_v1::model::RuleDeployment;
20215    /// let x = UpdateRuleDeploymentRequest::new().set_or_clear_rule_deployment(Some(RuleDeployment::default()/* use setters */));
20216    /// let x = UpdateRuleDeploymentRequest::new().set_or_clear_rule_deployment(None::<RuleDeployment>);
20217    /// ```
20218    pub fn set_or_clear_rule_deployment<T>(mut self, v: std::option::Option<T>) -> Self
20219    where
20220        T: std::convert::Into<crate::model::RuleDeployment>,
20221    {
20222        self.rule_deployment = v.map(|x| x.into());
20223        self
20224    }
20225
20226    /// Sets the value of [update_mask][crate::model::UpdateRuleDeploymentRequest::update_mask].
20227    ///
20228    /// # Example
20229    /// ```ignore,no_run
20230    /// # use google_cloud_chronicle_v1::model::UpdateRuleDeploymentRequest;
20231    /// use wkt::FieldMask;
20232    /// let x = UpdateRuleDeploymentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20233    /// ```
20234    pub fn set_update_mask<T>(mut self, v: T) -> Self
20235    where
20236        T: std::convert::Into<wkt::FieldMask>,
20237    {
20238        self.update_mask = std::option::Option::Some(v.into());
20239        self
20240    }
20241
20242    /// Sets or clears the value of [update_mask][crate::model::UpdateRuleDeploymentRequest::update_mask].
20243    ///
20244    /// # Example
20245    /// ```ignore,no_run
20246    /// # use google_cloud_chronicle_v1::model::UpdateRuleDeploymentRequest;
20247    /// use wkt::FieldMask;
20248    /// let x = UpdateRuleDeploymentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20249    /// let x = UpdateRuleDeploymentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20250    /// ```
20251    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20252    where
20253        T: std::convert::Into<wkt::FieldMask>,
20254    {
20255        self.update_mask = v.map(|x| x.into());
20256        self
20257    }
20258}
20259
20260impl wkt::message::Message for UpdateRuleDeploymentRequest {
20261    fn typename() -> &'static str {
20262        "type.googleapis.com/google.cloud.chronicle.v1.UpdateRuleDeploymentRequest"
20263    }
20264}
20265
20266/// CompilationPosition represents the location of a compilation diagnostic in
20267/// rule text.
20268#[derive(Clone, Default, PartialEq)]
20269#[non_exhaustive]
20270pub struct CompilationPosition {
20271    /// Output only. Start line number, beginning at 1.
20272    pub start_line: i32,
20273
20274    /// Output only. Start column number, beginning at 1.
20275    pub start_column: i32,
20276
20277    /// Output only. End line number, beginning at 1.
20278    pub end_line: i32,
20279
20280    /// Output only. End column number, beginning at 1.
20281    pub end_column: i32,
20282
20283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20284}
20285
20286impl CompilationPosition {
20287    /// Creates a new default instance.
20288    pub fn new() -> Self {
20289        std::default::Default::default()
20290    }
20291
20292    /// Sets the value of [start_line][crate::model::CompilationPosition::start_line].
20293    ///
20294    /// # Example
20295    /// ```ignore,no_run
20296    /// # use google_cloud_chronicle_v1::model::CompilationPosition;
20297    /// let x = CompilationPosition::new().set_start_line(42);
20298    /// ```
20299    pub fn set_start_line<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20300        self.start_line = v.into();
20301        self
20302    }
20303
20304    /// Sets the value of [start_column][crate::model::CompilationPosition::start_column].
20305    ///
20306    /// # Example
20307    /// ```ignore,no_run
20308    /// # use google_cloud_chronicle_v1::model::CompilationPosition;
20309    /// let x = CompilationPosition::new().set_start_column(42);
20310    /// ```
20311    pub fn set_start_column<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20312        self.start_column = v.into();
20313        self
20314    }
20315
20316    /// Sets the value of [end_line][crate::model::CompilationPosition::end_line].
20317    ///
20318    /// # Example
20319    /// ```ignore,no_run
20320    /// # use google_cloud_chronicle_v1::model::CompilationPosition;
20321    /// let x = CompilationPosition::new().set_end_line(42);
20322    /// ```
20323    pub fn set_end_line<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20324        self.end_line = v.into();
20325        self
20326    }
20327
20328    /// Sets the value of [end_column][crate::model::CompilationPosition::end_column].
20329    ///
20330    /// # Example
20331    /// ```ignore,no_run
20332    /// # use google_cloud_chronicle_v1::model::CompilationPosition;
20333    /// let x = CompilationPosition::new().set_end_column(42);
20334    /// ```
20335    pub fn set_end_column<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20336        self.end_column = v.into();
20337        self
20338    }
20339}
20340
20341impl wkt::message::Message for CompilationPosition {
20342    fn typename() -> &'static str {
20343        "type.googleapis.com/google.cloud.chronicle.v1.CompilationPosition"
20344    }
20345}
20346
20347/// CompilationDiagnostic represents a compilation diagnostic generated
20348/// during a rule's compilation, such as a compilation error or a compilation
20349/// warning.
20350#[derive(Clone, Default, PartialEq)]
20351#[non_exhaustive]
20352pub struct CompilationDiagnostic {
20353    /// Output only. The diagnostic message.
20354    pub message: std::string::String,
20355
20356    /// Output only. The approximate position in the rule text associated with the
20357    /// compilation diagnostic.
20358    /// Compilation Position may be empty.
20359    pub position: std::option::Option<crate::model::CompilationPosition>,
20360
20361    /// Output only. The severity of a rule's compilation diagnostic.
20362    pub severity: crate::model::compilation_diagnostic::Severity,
20363
20364    /// Output only. Link to documentation that describes a diagnostic in more
20365    /// detail.
20366    pub uri: std::string::String,
20367
20368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20369}
20370
20371impl CompilationDiagnostic {
20372    /// Creates a new default instance.
20373    pub fn new() -> Self {
20374        std::default::Default::default()
20375    }
20376
20377    /// Sets the value of [message][crate::model::CompilationDiagnostic::message].
20378    ///
20379    /// # Example
20380    /// ```ignore,no_run
20381    /// # use google_cloud_chronicle_v1::model::CompilationDiagnostic;
20382    /// let x = CompilationDiagnostic::new().set_message("example");
20383    /// ```
20384    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20385        self.message = v.into();
20386        self
20387    }
20388
20389    /// Sets the value of [position][crate::model::CompilationDiagnostic::position].
20390    ///
20391    /// # Example
20392    /// ```ignore,no_run
20393    /// # use google_cloud_chronicle_v1::model::CompilationDiagnostic;
20394    /// use google_cloud_chronicle_v1::model::CompilationPosition;
20395    /// let x = CompilationDiagnostic::new().set_position(CompilationPosition::default()/* use setters */);
20396    /// ```
20397    pub fn set_position<T>(mut self, v: T) -> Self
20398    where
20399        T: std::convert::Into<crate::model::CompilationPosition>,
20400    {
20401        self.position = std::option::Option::Some(v.into());
20402        self
20403    }
20404
20405    /// Sets or clears the value of [position][crate::model::CompilationDiagnostic::position].
20406    ///
20407    /// # Example
20408    /// ```ignore,no_run
20409    /// # use google_cloud_chronicle_v1::model::CompilationDiagnostic;
20410    /// use google_cloud_chronicle_v1::model::CompilationPosition;
20411    /// let x = CompilationDiagnostic::new().set_or_clear_position(Some(CompilationPosition::default()/* use setters */));
20412    /// let x = CompilationDiagnostic::new().set_or_clear_position(None::<CompilationPosition>);
20413    /// ```
20414    pub fn set_or_clear_position<T>(mut self, v: std::option::Option<T>) -> Self
20415    where
20416        T: std::convert::Into<crate::model::CompilationPosition>,
20417    {
20418        self.position = v.map(|x| x.into());
20419        self
20420    }
20421
20422    /// Sets the value of [severity][crate::model::CompilationDiagnostic::severity].
20423    ///
20424    /// # Example
20425    /// ```ignore,no_run
20426    /// # use google_cloud_chronicle_v1::model::CompilationDiagnostic;
20427    /// use google_cloud_chronicle_v1::model::compilation_diagnostic::Severity;
20428    /// let x0 = CompilationDiagnostic::new().set_severity(Severity::Warning);
20429    /// let x1 = CompilationDiagnostic::new().set_severity(Severity::Error);
20430    /// ```
20431    pub fn set_severity<T: std::convert::Into<crate::model::compilation_diagnostic::Severity>>(
20432        mut self,
20433        v: T,
20434    ) -> Self {
20435        self.severity = v.into();
20436        self
20437    }
20438
20439    /// Sets the value of [uri][crate::model::CompilationDiagnostic::uri].
20440    ///
20441    /// # Example
20442    /// ```ignore,no_run
20443    /// # use google_cloud_chronicle_v1::model::CompilationDiagnostic;
20444    /// let x = CompilationDiagnostic::new().set_uri("example");
20445    /// ```
20446    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20447        self.uri = v.into();
20448        self
20449    }
20450}
20451
20452impl wkt::message::Message for CompilationDiagnostic {
20453    fn typename() -> &'static str {
20454        "type.googleapis.com/google.cloud.chronicle.v1.CompilationDiagnostic"
20455    }
20456}
20457
20458/// Defines additional types related to [CompilationDiagnostic].
20459pub mod compilation_diagnostic {
20460    #[allow(unused_imports)]
20461    use super::*;
20462
20463    /// The severity level of the compilation diagnostic.
20464    ///
20465    /// # Working with unknown values
20466    ///
20467    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20468    /// additional enum variants at any time. Adding new variants is not considered
20469    /// a breaking change. Applications should write their code in anticipation of:
20470    ///
20471    /// - New values appearing in future releases of the client library, **and**
20472    /// - New values received dynamically, without application changes.
20473    ///
20474    /// Please consult the [Working with enums] section in the user guide for some
20475    /// guidelines.
20476    ///
20477    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
20478    #[derive(Clone, Debug, PartialEq)]
20479    #[non_exhaustive]
20480    pub enum Severity {
20481        /// An unspecified severity level.
20482        Unspecified,
20483        /// A compilation warning.
20484        Warning,
20485        /// A compilation error.
20486        Error,
20487        /// If set, the enum was initialized with an unknown value.
20488        ///
20489        /// Applications can examine the value using [Severity::value] or
20490        /// [Severity::name].
20491        UnknownValue(severity::UnknownValue),
20492    }
20493
20494    #[doc(hidden)]
20495    pub mod severity {
20496        #[allow(unused_imports)]
20497        use super::*;
20498        #[derive(Clone, Debug, PartialEq)]
20499        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20500    }
20501
20502    impl Severity {
20503        /// Gets the enum value.
20504        ///
20505        /// Returns `None` if the enum contains an unknown value deserialized from
20506        /// the string representation of enums.
20507        pub fn value(&self) -> std::option::Option<i32> {
20508            match self {
20509                Self::Unspecified => std::option::Option::Some(0),
20510                Self::Warning => std::option::Option::Some(1),
20511                Self::Error => std::option::Option::Some(2),
20512                Self::UnknownValue(u) => u.0.value(),
20513            }
20514        }
20515
20516        /// Gets the enum value as a string.
20517        ///
20518        /// Returns `None` if the enum contains an unknown value deserialized from
20519        /// the integer representation of enums.
20520        pub fn name(&self) -> std::option::Option<&str> {
20521            match self {
20522                Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
20523                Self::Warning => std::option::Option::Some("WARNING"),
20524                Self::Error => std::option::Option::Some("ERROR"),
20525                Self::UnknownValue(u) => u.0.name(),
20526            }
20527        }
20528    }
20529
20530    impl std::default::Default for Severity {
20531        fn default() -> Self {
20532            use std::convert::From;
20533            Self::from(0)
20534        }
20535    }
20536
20537    impl std::fmt::Display for Severity {
20538        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20539            wkt::internal::display_enum(f, self.name(), self.value())
20540        }
20541    }
20542
20543    impl std::convert::From<i32> for Severity {
20544        fn from(value: i32) -> Self {
20545            match value {
20546                0 => Self::Unspecified,
20547                1 => Self::Warning,
20548                2 => Self::Error,
20549                _ => Self::UnknownValue(severity::UnknownValue(
20550                    wkt::internal::UnknownEnumValue::Integer(value),
20551                )),
20552            }
20553        }
20554    }
20555
20556    impl std::convert::From<&str> for Severity {
20557        fn from(value: &str) -> Self {
20558            use std::string::ToString;
20559            match value {
20560                "SEVERITY_UNSPECIFIED" => Self::Unspecified,
20561                "WARNING" => Self::Warning,
20562                "ERROR" => Self::Error,
20563                _ => Self::UnknownValue(severity::UnknownValue(
20564                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20565                )),
20566            }
20567        }
20568    }
20569
20570    impl serde::ser::Serialize for Severity {
20571        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20572        where
20573            S: serde::Serializer,
20574        {
20575            match self {
20576                Self::Unspecified => serializer.serialize_i32(0),
20577                Self::Warning => serializer.serialize_i32(1),
20578                Self::Error => serializer.serialize_i32(2),
20579                Self::UnknownValue(u) => u.0.serialize(serializer),
20580            }
20581        }
20582    }
20583
20584    impl<'de> serde::de::Deserialize<'de> for Severity {
20585        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20586        where
20587            D: serde::Deserializer<'de>,
20588        {
20589            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
20590                ".google.cloud.chronicle.v1.CompilationDiagnostic.Severity",
20591            ))
20592        }
20593    }
20594}
20595
20596/// Severity represents the severity level of the rule.
20597#[derive(Clone, Default, PartialEq)]
20598#[non_exhaustive]
20599pub struct Severity {
20600    /// The display name of the severity level. Extracted from the meta section of
20601    /// the rule text.
20602    pub display_name: std::string::String,
20603
20604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20605}
20606
20607impl Severity {
20608    /// Creates a new default instance.
20609    pub fn new() -> Self {
20610        std::default::Default::default()
20611    }
20612
20613    /// Sets the value of [display_name][crate::model::Severity::display_name].
20614    ///
20615    /// # Example
20616    /// ```ignore,no_run
20617    /// # use google_cloud_chronicle_v1::model::Severity;
20618    /// let x = Severity::new().set_display_name("example");
20619    /// ```
20620    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20621        self.display_name = v.into();
20622        self
20623    }
20624}
20625
20626impl wkt::message::Message for Severity {
20627    fn typename() -> &'static str {
20628        "type.googleapis.com/google.cloud.chronicle.v1.Severity"
20629    }
20630}
20631
20632/// Operation Metadata for Retrohunts.
20633#[derive(Clone, Default, PartialEq)]
20634#[non_exhaustive]
20635pub struct RetrohuntMetadata {
20636    /// The name of the retrohunt.
20637    /// Format:
20638    /// `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}`
20639    pub retrohunt: std::string::String,
20640
20641    /// The start and end time of the retrohunt execution. If the retrohunt is not
20642    /// yet finished, the end time of the interval will not be filled.
20643    pub execution_interval: std::option::Option<google_cloud_type::model::Interval>,
20644
20645    /// Percent progress of the retrohunt towards completion, from 0.00 to 100.00.
20646    pub progress_percentage: f32,
20647
20648    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20649}
20650
20651impl RetrohuntMetadata {
20652    /// Creates a new default instance.
20653    pub fn new() -> Self {
20654        std::default::Default::default()
20655    }
20656
20657    /// Sets the value of [retrohunt][crate::model::RetrohuntMetadata::retrohunt].
20658    ///
20659    /// # Example
20660    /// ```ignore,no_run
20661    /// # use google_cloud_chronicle_v1::model::RetrohuntMetadata;
20662    /// # let project_id = "project_id";
20663    /// # let location_id = "location_id";
20664    /// # let instance_id = "instance_id";
20665    /// # let rule_id = "rule_id";
20666    /// let x = RetrohuntMetadata::new().set_retrohunt(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/rules/{rule_id}"));
20667    /// ```
20668    pub fn set_retrohunt<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20669        self.retrohunt = v.into();
20670        self
20671    }
20672
20673    /// Sets the value of [execution_interval][crate::model::RetrohuntMetadata::execution_interval].
20674    ///
20675    /// # Example
20676    /// ```ignore,no_run
20677    /// # use google_cloud_chronicle_v1::model::RetrohuntMetadata;
20678    /// use google_cloud_type::model::Interval;
20679    /// let x = RetrohuntMetadata::new().set_execution_interval(Interval::default()/* use setters */);
20680    /// ```
20681    pub fn set_execution_interval<T>(mut self, v: T) -> Self
20682    where
20683        T: std::convert::Into<google_cloud_type::model::Interval>,
20684    {
20685        self.execution_interval = std::option::Option::Some(v.into());
20686        self
20687    }
20688
20689    /// Sets or clears the value of [execution_interval][crate::model::RetrohuntMetadata::execution_interval].
20690    ///
20691    /// # Example
20692    /// ```ignore,no_run
20693    /// # use google_cloud_chronicle_v1::model::RetrohuntMetadata;
20694    /// use google_cloud_type::model::Interval;
20695    /// let x = RetrohuntMetadata::new().set_or_clear_execution_interval(Some(Interval::default()/* use setters */));
20696    /// let x = RetrohuntMetadata::new().set_or_clear_execution_interval(None::<Interval>);
20697    /// ```
20698    pub fn set_or_clear_execution_interval<T>(mut self, v: std::option::Option<T>) -> Self
20699    where
20700        T: std::convert::Into<google_cloud_type::model::Interval>,
20701    {
20702        self.execution_interval = v.map(|x| x.into());
20703        self
20704    }
20705
20706    /// Sets the value of [progress_percentage][crate::model::RetrohuntMetadata::progress_percentage].
20707    ///
20708    /// # Example
20709    /// ```ignore,no_run
20710    /// # use google_cloud_chronicle_v1::model::RetrohuntMetadata;
20711    /// let x = RetrohuntMetadata::new().set_progress_percentage(42.0);
20712    /// ```
20713    pub fn set_progress_percentage<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
20714        self.progress_percentage = v.into();
20715        self
20716    }
20717}
20718
20719impl wkt::message::Message for RetrohuntMetadata {
20720    fn typename() -> &'static str {
20721        "type.googleapis.com/google.cloud.chronicle.v1.RetrohuntMetadata"
20722    }
20723}
20724
20725/// InputsUsed is a convenience field that tells us which sources
20726/// of events (if any) were used in the rule.
20727/// NEXT TAG: 4
20728#[derive(Clone, Default, PartialEq)]
20729#[non_exhaustive]
20730pub struct InputsUsed {
20731    /// Optional. Whether the rule queries UDM events.
20732    pub uses_udm: bool,
20733
20734    /// Optional. Whether the rule queries entity events.
20735    pub uses_entity: bool,
20736
20737    /// Optional. Whether the rule queries detections.
20738    pub uses_detection: bool,
20739
20740    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20741}
20742
20743impl InputsUsed {
20744    /// Creates a new default instance.
20745    pub fn new() -> Self {
20746        std::default::Default::default()
20747    }
20748
20749    /// Sets the value of [uses_udm][crate::model::InputsUsed::uses_udm].
20750    ///
20751    /// # Example
20752    /// ```ignore,no_run
20753    /// # use google_cloud_chronicle_v1::model::InputsUsed;
20754    /// let x = InputsUsed::new().set_uses_udm(true);
20755    /// ```
20756    pub fn set_uses_udm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20757        self.uses_udm = v.into();
20758        self
20759    }
20760
20761    /// Sets the value of [uses_entity][crate::model::InputsUsed::uses_entity].
20762    ///
20763    /// # Example
20764    /// ```ignore,no_run
20765    /// # use google_cloud_chronicle_v1::model::InputsUsed;
20766    /// let x = InputsUsed::new().set_uses_entity(true);
20767    /// ```
20768    pub fn set_uses_entity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20769        self.uses_entity = v.into();
20770        self
20771    }
20772
20773    /// Sets the value of [uses_detection][crate::model::InputsUsed::uses_detection].
20774    ///
20775    /// # Example
20776    /// ```ignore,no_run
20777    /// # use google_cloud_chronicle_v1::model::InputsUsed;
20778    /// let x = InputsUsed::new().set_uses_detection(true);
20779    /// ```
20780    pub fn set_uses_detection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20781        self.uses_detection = v.into();
20782        self
20783    }
20784}
20785
20786impl wkt::message::Message for InputsUsed {
20787    fn typename() -> &'static str {
20788        "type.googleapis.com/google.cloud.chronicle.v1.InputsUsed"
20789    }
20790}
20791
20792/// The BigQueryExportPackage entitled for the Chronicle instance.
20793///
20794/// # Working with unknown values
20795///
20796/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20797/// additional enum variants at any time. Adding new variants is not considered
20798/// a breaking change. Applications should write their code in anticipation of:
20799///
20800/// - New values appearing in future releases of the client library, **and**
20801/// - New values received dynamically, without application changes.
20802///
20803/// Please consult the [Working with enums] section in the user guide for some
20804/// guidelines.
20805///
20806/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
20807#[derive(Clone, Debug, PartialEq)]
20808#[non_exhaustive]
20809pub enum BigQueryExportPackage {
20810    /// The BigQueryExportPackage is unspecified.
20811    Unspecified,
20812    /// The BigQueryExportPackage is Bring Your Own BigQuery.
20813    Byobq,
20814    /// The BigQueryExportPackage is Advanced BigQuery.
20815    Advanced,
20816    /// If set, the enum was initialized with an unknown value.
20817    ///
20818    /// Applications can examine the value using [BigQueryExportPackage::value] or
20819    /// [BigQueryExportPackage::name].
20820    UnknownValue(big_query_export_package::UnknownValue),
20821}
20822
20823#[doc(hidden)]
20824pub mod big_query_export_package {
20825    #[allow(unused_imports)]
20826    use super::*;
20827    #[derive(Clone, Debug, PartialEq)]
20828    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20829}
20830
20831impl BigQueryExportPackage {
20832    /// Gets the enum value.
20833    ///
20834    /// Returns `None` if the enum contains an unknown value deserialized from
20835    /// the string representation of enums.
20836    pub fn value(&self) -> std::option::Option<i32> {
20837        match self {
20838            Self::Unspecified => std::option::Option::Some(0),
20839            Self::Byobq => std::option::Option::Some(1),
20840            Self::Advanced => std::option::Option::Some(2),
20841            Self::UnknownValue(u) => u.0.value(),
20842        }
20843    }
20844
20845    /// Gets the enum value as a string.
20846    ///
20847    /// Returns `None` if the enum contains an unknown value deserialized from
20848    /// the integer representation of enums.
20849    pub fn name(&self) -> std::option::Option<&str> {
20850        match self {
20851            Self::Unspecified => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED"),
20852            Self::Byobq => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_BYOBQ"),
20853            Self::Advanced => std::option::Option::Some("BIG_QUERY_EXPORT_PACKAGE_ADVANCED"),
20854            Self::UnknownValue(u) => u.0.name(),
20855        }
20856    }
20857}
20858
20859impl std::default::Default for BigQueryExportPackage {
20860    fn default() -> Self {
20861        use std::convert::From;
20862        Self::from(0)
20863    }
20864}
20865
20866impl std::fmt::Display for BigQueryExportPackage {
20867    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20868        wkt::internal::display_enum(f, self.name(), self.value())
20869    }
20870}
20871
20872impl std::convert::From<i32> for BigQueryExportPackage {
20873    fn from(value: i32) -> Self {
20874        match value {
20875            0 => Self::Unspecified,
20876            1 => Self::Byobq,
20877            2 => Self::Advanced,
20878            _ => Self::UnknownValue(big_query_export_package::UnknownValue(
20879                wkt::internal::UnknownEnumValue::Integer(value),
20880            )),
20881        }
20882    }
20883}
20884
20885impl std::convert::From<&str> for BigQueryExportPackage {
20886    fn from(value: &str) -> Self {
20887        use std::string::ToString;
20888        match value {
20889            "BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED" => Self::Unspecified,
20890            "BIG_QUERY_EXPORT_PACKAGE_BYOBQ" => Self::Byobq,
20891            "BIG_QUERY_EXPORT_PACKAGE_ADVANCED" => Self::Advanced,
20892            _ => Self::UnknownValue(big_query_export_package::UnknownValue(
20893                wkt::internal::UnknownEnumValue::String(value.to_string()),
20894            )),
20895        }
20896    }
20897}
20898
20899impl serde::ser::Serialize for BigQueryExportPackage {
20900    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20901    where
20902        S: serde::Serializer,
20903    {
20904        match self {
20905            Self::Unspecified => serializer.serialize_i32(0),
20906            Self::Byobq => serializer.serialize_i32(1),
20907            Self::Advanced => serializer.serialize_i32(2),
20908            Self::UnknownValue(u) => u.0.serialize(serializer),
20909        }
20910    }
20911}
20912
20913impl<'de> serde::de::Deserialize<'de> for BigQueryExportPackage {
20914    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20915    where
20916        D: serde::Deserializer<'de>,
20917    {
20918        deserializer.deserialize_any(wkt::internal::EnumVisitor::<BigQueryExportPackage>::new(
20919            ".google.cloud.chronicle.v1.BigQueryExportPackage",
20920        ))
20921    }
20922}
20923
20924/// The state of the latest data source export job.
20925///
20926/// # Working with unknown values
20927///
20928/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20929/// additional enum variants at any time. Adding new variants is not considered
20930/// a breaking change. Applications should write their code in anticipation of:
20931///
20932/// - New values appearing in future releases of the client library, **and**
20933/// - New values received dynamically, without application changes.
20934///
20935/// Please consult the [Working with enums] section in the user guide for some
20936/// guidelines.
20937///
20938/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
20939#[derive(Clone, Debug, PartialEq)]
20940#[non_exhaustive]
20941pub enum LatestExportJobState {
20942    /// The latest export job state is unspecified.
20943    Unspecified,
20944    /// The latest export job state is successful.
20945    Success,
20946    /// The latest export job state is failed.
20947    Failed,
20948    /// If set, the enum was initialized with an unknown value.
20949    ///
20950    /// Applications can examine the value using [LatestExportJobState::value] or
20951    /// [LatestExportJobState::name].
20952    UnknownValue(latest_export_job_state::UnknownValue),
20953}
20954
20955#[doc(hidden)]
20956pub mod latest_export_job_state {
20957    #[allow(unused_imports)]
20958    use super::*;
20959    #[derive(Clone, Debug, PartialEq)]
20960    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20961}
20962
20963impl LatestExportJobState {
20964    /// Gets the enum value.
20965    ///
20966    /// Returns `None` if the enum contains an unknown value deserialized from
20967    /// the string representation of enums.
20968    pub fn value(&self) -> std::option::Option<i32> {
20969        match self {
20970            Self::Unspecified => std::option::Option::Some(0),
20971            Self::Success => std::option::Option::Some(1),
20972            Self::Failed => std::option::Option::Some(2),
20973            Self::UnknownValue(u) => u.0.value(),
20974        }
20975    }
20976
20977    /// Gets the enum value as a string.
20978    ///
20979    /// Returns `None` if the enum contains an unknown value deserialized from
20980    /// the integer representation of enums.
20981    pub fn name(&self) -> std::option::Option<&str> {
20982        match self {
20983            Self::Unspecified => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_UNSPECIFIED"),
20984            Self::Success => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_SUCCESS"),
20985            Self::Failed => std::option::Option::Some("LATEST_EXPORT_JOB_STATE_FAILED"),
20986            Self::UnknownValue(u) => u.0.name(),
20987        }
20988    }
20989}
20990
20991impl std::default::Default for LatestExportJobState {
20992    fn default() -> Self {
20993        use std::convert::From;
20994        Self::from(0)
20995    }
20996}
20997
20998impl std::fmt::Display for LatestExportJobState {
20999    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21000        wkt::internal::display_enum(f, self.name(), self.value())
21001    }
21002}
21003
21004impl std::convert::From<i32> for LatestExportJobState {
21005    fn from(value: i32) -> Self {
21006        match value {
21007            0 => Self::Unspecified,
21008            1 => Self::Success,
21009            2 => Self::Failed,
21010            _ => Self::UnknownValue(latest_export_job_state::UnknownValue(
21011                wkt::internal::UnknownEnumValue::Integer(value),
21012            )),
21013        }
21014    }
21015}
21016
21017impl std::convert::From<&str> for LatestExportJobState {
21018    fn from(value: &str) -> Self {
21019        use std::string::ToString;
21020        match value {
21021            "LATEST_EXPORT_JOB_STATE_UNSPECIFIED" => Self::Unspecified,
21022            "LATEST_EXPORT_JOB_STATE_SUCCESS" => Self::Success,
21023            "LATEST_EXPORT_JOB_STATE_FAILED" => Self::Failed,
21024            _ => Self::UnknownValue(latest_export_job_state::UnknownValue(
21025                wkt::internal::UnknownEnumValue::String(value.to_string()),
21026            )),
21027        }
21028    }
21029}
21030
21031impl serde::ser::Serialize for LatestExportJobState {
21032    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21033    where
21034        S: serde::Serializer,
21035    {
21036        match self {
21037            Self::Unspecified => serializer.serialize_i32(0),
21038            Self::Success => serializer.serialize_i32(1),
21039            Self::Failed => serializer.serialize_i32(2),
21040            Self::UnknownValue(u) => u.0.serialize(serializer),
21041        }
21042    }
21043}
21044
21045impl<'de> serde::de::Deserialize<'de> for LatestExportJobState {
21046    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21047    where
21048        D: serde::Deserializer<'de>,
21049    {
21050        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LatestExportJobState>::new(
21051            ".google.cloud.chronicle.v1.LatestExportJobState",
21052        ))
21053    }
21054}
21055
21056/// TileType indicates what type of chart tile it is i.e., visualization chart,
21057/// button or text.
21058///
21059/// # Working with unknown values
21060///
21061/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21062/// additional enum variants at any time. Adding new variants is not considered
21063/// a breaking change. Applications should write their code in anticipation of:
21064///
21065/// - New values appearing in future releases of the client library, **and**
21066/// - New values received dynamically, without application changes.
21067///
21068/// Please consult the [Working with enums] section in the user guide for some
21069/// guidelines.
21070///
21071/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21072#[derive(Clone, Debug, PartialEq)]
21073#[non_exhaustive]
21074pub enum TileType {
21075    /// Defaults to VISUALIZATION.
21076    Unspecified,
21077    /// Visualization i.e., bar charts, pie charts etc.
21078    Visualization,
21079    /// Button with hyperlink.
21080    Button,
21081    /// Markdown tile.
21082    Markdown,
21083    /// If set, the enum was initialized with an unknown value.
21084    ///
21085    /// Applications can examine the value using [TileType::value] or
21086    /// [TileType::name].
21087    UnknownValue(tile_type::UnknownValue),
21088}
21089
21090#[doc(hidden)]
21091pub mod tile_type {
21092    #[allow(unused_imports)]
21093    use super::*;
21094    #[derive(Clone, Debug, PartialEq)]
21095    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21096}
21097
21098impl TileType {
21099    /// Gets the enum value.
21100    ///
21101    /// Returns `None` if the enum contains an unknown value deserialized from
21102    /// the string representation of enums.
21103    pub fn value(&self) -> std::option::Option<i32> {
21104        match self {
21105            Self::Unspecified => std::option::Option::Some(0),
21106            Self::Visualization => std::option::Option::Some(1),
21107            Self::Button => std::option::Option::Some(2),
21108            Self::Markdown => std::option::Option::Some(3),
21109            Self::UnknownValue(u) => u.0.value(),
21110        }
21111    }
21112
21113    /// Gets the enum value as a string.
21114    ///
21115    /// Returns `None` if the enum contains an unknown value deserialized from
21116    /// the integer representation of enums.
21117    pub fn name(&self) -> std::option::Option<&str> {
21118        match self {
21119            Self::Unspecified => std::option::Option::Some("TILE_TYPE_UNSPECIFIED"),
21120            Self::Visualization => std::option::Option::Some("TILE_TYPE_VISUALIZATION"),
21121            Self::Button => std::option::Option::Some("TILE_TYPE_BUTTON"),
21122            Self::Markdown => std::option::Option::Some("TILE_TYPE_MARKDOWN"),
21123            Self::UnknownValue(u) => u.0.name(),
21124        }
21125    }
21126}
21127
21128impl std::default::Default for TileType {
21129    fn default() -> Self {
21130        use std::convert::From;
21131        Self::from(0)
21132    }
21133}
21134
21135impl std::fmt::Display for TileType {
21136    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21137        wkt::internal::display_enum(f, self.name(), self.value())
21138    }
21139}
21140
21141impl std::convert::From<i32> for TileType {
21142    fn from(value: i32) -> Self {
21143        match value {
21144            0 => Self::Unspecified,
21145            1 => Self::Visualization,
21146            2 => Self::Button,
21147            3 => Self::Markdown,
21148            _ => Self::UnknownValue(tile_type::UnknownValue(
21149                wkt::internal::UnknownEnumValue::Integer(value),
21150            )),
21151        }
21152    }
21153}
21154
21155impl std::convert::From<&str> for TileType {
21156    fn from(value: &str) -> Self {
21157        use std::string::ToString;
21158        match value {
21159            "TILE_TYPE_UNSPECIFIED" => Self::Unspecified,
21160            "TILE_TYPE_VISUALIZATION" => Self::Visualization,
21161            "TILE_TYPE_BUTTON" => Self::Button,
21162            "TILE_TYPE_MARKDOWN" => Self::Markdown,
21163            _ => Self::UnknownValue(tile_type::UnknownValue(
21164                wkt::internal::UnknownEnumValue::String(value.to_string()),
21165            )),
21166        }
21167    }
21168}
21169
21170impl serde::ser::Serialize for TileType {
21171    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21172    where
21173        S: serde::Serializer,
21174    {
21175        match self {
21176            Self::Unspecified => serializer.serialize_i32(0),
21177            Self::Visualization => serializer.serialize_i32(1),
21178            Self::Button => serializer.serialize_i32(2),
21179            Self::Markdown => serializer.serialize_i32(3),
21180            Self::UnknownValue(u) => u.0.serialize(serializer),
21181        }
21182    }
21183}
21184
21185impl<'de> serde::de::Deserialize<'de> for TileType {
21186    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21187    where
21188        D: serde::Deserializer<'de>,
21189    {
21190        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TileType>::new(
21191            ".google.cloud.chronicle.v1.TileType",
21192        ))
21193    }
21194}
21195
21196/// Render type of the data in the chart.
21197///
21198/// # Working with unknown values
21199///
21200/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21201/// additional enum variants at any time. Adding new variants is not considered
21202/// a breaking change. Applications should write their code in anticipation of:
21203///
21204/// - New values appearing in future releases of the client library, **and**
21205/// - New values received dynamically, without application changes.
21206///
21207/// Please consult the [Working with enums] section in the user guide for some
21208/// guidelines.
21209///
21210/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21211#[derive(Clone, Debug, PartialEq)]
21212#[non_exhaustive]
21213pub enum RenderType {
21214    /// Defaults to Unspecified.
21215    Unspecified,
21216    /// Text render type.
21217    Text,
21218    /// Icon render type.
21219    Icon,
21220    /// Icon and text render type.
21221    IconAndText,
21222    /// If set, the enum was initialized with an unknown value.
21223    ///
21224    /// Applications can examine the value using [RenderType::value] or
21225    /// [RenderType::name].
21226    UnknownValue(render_type::UnknownValue),
21227}
21228
21229#[doc(hidden)]
21230pub mod render_type {
21231    #[allow(unused_imports)]
21232    use super::*;
21233    #[derive(Clone, Debug, PartialEq)]
21234    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21235}
21236
21237impl RenderType {
21238    /// Gets the enum value.
21239    ///
21240    /// Returns `None` if the enum contains an unknown value deserialized from
21241    /// the string representation of enums.
21242    pub fn value(&self) -> std::option::Option<i32> {
21243        match self {
21244            Self::Unspecified => std::option::Option::Some(0),
21245            Self::Text => std::option::Option::Some(1),
21246            Self::Icon => std::option::Option::Some(2),
21247            Self::IconAndText => std::option::Option::Some(3),
21248            Self::UnknownValue(u) => u.0.value(),
21249        }
21250    }
21251
21252    /// Gets the enum value as a string.
21253    ///
21254    /// Returns `None` if the enum contains an unknown value deserialized from
21255    /// the integer representation of enums.
21256    pub fn name(&self) -> std::option::Option<&str> {
21257        match self {
21258            Self::Unspecified => std::option::Option::Some("RENDER_TYPE_UNSPECIFIED"),
21259            Self::Text => std::option::Option::Some("RENDER_TYPE_TEXT"),
21260            Self::Icon => std::option::Option::Some("RENDER_TYPE_ICON"),
21261            Self::IconAndText => std::option::Option::Some("RENDER_TYPE_ICON_AND_TEXT"),
21262            Self::UnknownValue(u) => u.0.name(),
21263        }
21264    }
21265}
21266
21267impl std::default::Default for RenderType {
21268    fn default() -> Self {
21269        use std::convert::From;
21270        Self::from(0)
21271    }
21272}
21273
21274impl std::fmt::Display for RenderType {
21275    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21276        wkt::internal::display_enum(f, self.name(), self.value())
21277    }
21278}
21279
21280impl std::convert::From<i32> for RenderType {
21281    fn from(value: i32) -> Self {
21282        match value {
21283            0 => Self::Unspecified,
21284            1 => Self::Text,
21285            2 => Self::Icon,
21286            3 => Self::IconAndText,
21287            _ => Self::UnknownValue(render_type::UnknownValue(
21288                wkt::internal::UnknownEnumValue::Integer(value),
21289            )),
21290        }
21291    }
21292}
21293
21294impl std::convert::From<&str> for RenderType {
21295    fn from(value: &str) -> Self {
21296        use std::string::ToString;
21297        match value {
21298            "RENDER_TYPE_UNSPECIFIED" => Self::Unspecified,
21299            "RENDER_TYPE_TEXT" => Self::Text,
21300            "RENDER_TYPE_ICON" => Self::Icon,
21301            "RENDER_TYPE_ICON_AND_TEXT" => Self::IconAndText,
21302            _ => Self::UnknownValue(render_type::UnknownValue(
21303                wkt::internal::UnknownEnumValue::String(value.to_string()),
21304            )),
21305        }
21306    }
21307}
21308
21309impl serde::ser::Serialize for RenderType {
21310    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21311    where
21312        S: serde::Serializer,
21313    {
21314        match self {
21315            Self::Unspecified => serializer.serialize_i32(0),
21316            Self::Text => serializer.serialize_i32(1),
21317            Self::Icon => serializer.serialize_i32(2),
21318            Self::IconAndText => serializer.serialize_i32(3),
21319            Self::UnknownValue(u) => u.0.serialize(serializer),
21320        }
21321    }
21322}
21323
21324impl<'de> serde::de::Deserialize<'de> for RenderType {
21325    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21326    where
21327        D: serde::Deserializer<'de>,
21328    {
21329        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RenderType>::new(
21330            ".google.cloud.chronicle.v1.RenderType",
21331        ))
21332    }
21333}
21334
21335/// Enum for [AxisType].
21336///
21337/// # Working with unknown values
21338///
21339/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21340/// additional enum variants at any time. Adding new variants is not considered
21341/// a breaking change. Applications should write their code in anticipation of:
21342///
21343/// - New values appearing in future releases of the client library, **and**
21344/// - New values received dynamically, without application changes.
21345///
21346/// Please consult the [Working with enums] section in the user guide for some
21347/// guidelines.
21348///
21349/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21350#[derive(Clone, Debug, PartialEq)]
21351#[non_exhaustive]
21352pub enum AxisType {
21353    #[allow(missing_docs)]
21354    Unspecified,
21355    #[allow(missing_docs)]
21356    Value,
21357    #[allow(missing_docs)]
21358    Category,
21359    #[allow(missing_docs)]
21360    Time,
21361    #[allow(missing_docs)]
21362    Log,
21363    /// If set, the enum was initialized with an unknown value.
21364    ///
21365    /// Applications can examine the value using [AxisType::value] or
21366    /// [AxisType::name].
21367    UnknownValue(axis_type::UnknownValue),
21368}
21369
21370#[doc(hidden)]
21371pub mod axis_type {
21372    #[allow(unused_imports)]
21373    use super::*;
21374    #[derive(Clone, Debug, PartialEq)]
21375    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21376}
21377
21378impl AxisType {
21379    /// Gets the enum value.
21380    ///
21381    /// Returns `None` if the enum contains an unknown value deserialized from
21382    /// the string representation of enums.
21383    pub fn value(&self) -> std::option::Option<i32> {
21384        match self {
21385            Self::Unspecified => std::option::Option::Some(0),
21386            Self::Value => std::option::Option::Some(1),
21387            Self::Category => std::option::Option::Some(2),
21388            Self::Time => std::option::Option::Some(3),
21389            Self::Log => std::option::Option::Some(4),
21390            Self::UnknownValue(u) => u.0.value(),
21391        }
21392    }
21393
21394    /// Gets the enum value as a string.
21395    ///
21396    /// Returns `None` if the enum contains an unknown value deserialized from
21397    /// the integer representation of enums.
21398    pub fn name(&self) -> std::option::Option<&str> {
21399        match self {
21400            Self::Unspecified => std::option::Option::Some("AXIS_TYPE_UNSPECIFIED"),
21401            Self::Value => std::option::Option::Some("VALUE"),
21402            Self::Category => std::option::Option::Some("CATEGORY"),
21403            Self::Time => std::option::Option::Some("TIME"),
21404            Self::Log => std::option::Option::Some("LOG"),
21405            Self::UnknownValue(u) => u.0.name(),
21406        }
21407    }
21408}
21409
21410impl std::default::Default for AxisType {
21411    fn default() -> Self {
21412        use std::convert::From;
21413        Self::from(0)
21414    }
21415}
21416
21417impl std::fmt::Display for AxisType {
21418    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21419        wkt::internal::display_enum(f, self.name(), self.value())
21420    }
21421}
21422
21423impl std::convert::From<i32> for AxisType {
21424    fn from(value: i32) -> Self {
21425        match value {
21426            0 => Self::Unspecified,
21427            1 => Self::Value,
21428            2 => Self::Category,
21429            3 => Self::Time,
21430            4 => Self::Log,
21431            _ => Self::UnknownValue(axis_type::UnknownValue(
21432                wkt::internal::UnknownEnumValue::Integer(value),
21433            )),
21434        }
21435    }
21436}
21437
21438impl std::convert::From<&str> for AxisType {
21439    fn from(value: &str) -> Self {
21440        use std::string::ToString;
21441        match value {
21442            "AXIS_TYPE_UNSPECIFIED" => Self::Unspecified,
21443            "VALUE" => Self::Value,
21444            "CATEGORY" => Self::Category,
21445            "TIME" => Self::Time,
21446            "LOG" => Self::Log,
21447            _ => Self::UnknownValue(axis_type::UnknownValue(
21448                wkt::internal::UnknownEnumValue::String(value.to_string()),
21449            )),
21450        }
21451    }
21452}
21453
21454impl serde::ser::Serialize for AxisType {
21455    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21456    where
21457        S: serde::Serializer,
21458    {
21459        match self {
21460            Self::Unspecified => serializer.serialize_i32(0),
21461            Self::Value => serializer.serialize_i32(1),
21462            Self::Category => serializer.serialize_i32(2),
21463            Self::Time => serializer.serialize_i32(3),
21464            Self::Log => serializer.serialize_i32(4),
21465            Self::UnknownValue(u) => u.0.serialize(serializer),
21466        }
21467    }
21468}
21469
21470impl<'de> serde::de::Deserialize<'de> for AxisType {
21471    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21472    where
21473        D: serde::Deserializer<'de>,
21474    {
21475        deserializer.deserialize_any(wkt::internal::EnumVisitor::<AxisType>::new(
21476            ".google.cloud.chronicle.v1.AxisType",
21477        ))
21478    }
21479}
21480
21481/// Enum for [SeriesType].
21482///
21483/// # Working with unknown values
21484///
21485/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21486/// additional enum variants at any time. Adding new variants is not considered
21487/// a breaking change. Applications should write their code in anticipation of:
21488///
21489/// - New values appearing in future releases of the client library, **and**
21490/// - New values received dynamically, without application changes.
21491///
21492/// Please consult the [Working with enums] section in the user guide for some
21493/// guidelines.
21494///
21495/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21496#[derive(Clone, Debug, PartialEq)]
21497#[non_exhaustive]
21498pub enum SeriesType {
21499    #[allow(missing_docs)]
21500    Unspecified,
21501    #[allow(missing_docs)]
21502    Line,
21503    #[allow(missing_docs)]
21504    Bar,
21505    #[allow(missing_docs)]
21506    Pie,
21507    #[allow(missing_docs)]
21508    Text,
21509    /// Represents map chart type.
21510    Map,
21511    /// Represents gauge chart type.
21512    Gauge,
21513    /// Represents scatterplot chart type.
21514    Scatterplot,
21515    /// If set, the enum was initialized with an unknown value.
21516    ///
21517    /// Applications can examine the value using [SeriesType::value] or
21518    /// [SeriesType::name].
21519    UnknownValue(series_type::UnknownValue),
21520}
21521
21522#[doc(hidden)]
21523pub mod series_type {
21524    #[allow(unused_imports)]
21525    use super::*;
21526    #[derive(Clone, Debug, PartialEq)]
21527    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21528}
21529
21530impl SeriesType {
21531    /// Gets the enum value.
21532    ///
21533    /// Returns `None` if the enum contains an unknown value deserialized from
21534    /// the string representation of enums.
21535    pub fn value(&self) -> std::option::Option<i32> {
21536        match self {
21537            Self::Unspecified => std::option::Option::Some(0),
21538            Self::Line => std::option::Option::Some(1),
21539            Self::Bar => std::option::Option::Some(2),
21540            Self::Pie => std::option::Option::Some(3),
21541            Self::Text => std::option::Option::Some(4),
21542            Self::Map => std::option::Option::Some(5),
21543            Self::Gauge => std::option::Option::Some(6),
21544            Self::Scatterplot => std::option::Option::Some(7),
21545            Self::UnknownValue(u) => u.0.value(),
21546        }
21547    }
21548
21549    /// Gets the enum value as a string.
21550    ///
21551    /// Returns `None` if the enum contains an unknown value deserialized from
21552    /// the integer representation of enums.
21553    pub fn name(&self) -> std::option::Option<&str> {
21554        match self {
21555            Self::Unspecified => std::option::Option::Some("SERIES_TYPE_UNSPECIFIED"),
21556            Self::Line => std::option::Option::Some("LINE"),
21557            Self::Bar => std::option::Option::Some("BAR"),
21558            Self::Pie => std::option::Option::Some("PIE"),
21559            Self::Text => std::option::Option::Some("TEXT"),
21560            Self::Map => std::option::Option::Some("MAP"),
21561            Self::Gauge => std::option::Option::Some("GAUGE"),
21562            Self::Scatterplot => std::option::Option::Some("SCATTERPLOT"),
21563            Self::UnknownValue(u) => u.0.name(),
21564        }
21565    }
21566}
21567
21568impl std::default::Default for SeriesType {
21569    fn default() -> Self {
21570        use std::convert::From;
21571        Self::from(0)
21572    }
21573}
21574
21575impl std::fmt::Display for SeriesType {
21576    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21577        wkt::internal::display_enum(f, self.name(), self.value())
21578    }
21579}
21580
21581impl std::convert::From<i32> for SeriesType {
21582    fn from(value: i32) -> Self {
21583        match value {
21584            0 => Self::Unspecified,
21585            1 => Self::Line,
21586            2 => Self::Bar,
21587            3 => Self::Pie,
21588            4 => Self::Text,
21589            5 => Self::Map,
21590            6 => Self::Gauge,
21591            7 => Self::Scatterplot,
21592            _ => Self::UnknownValue(series_type::UnknownValue(
21593                wkt::internal::UnknownEnumValue::Integer(value),
21594            )),
21595        }
21596    }
21597}
21598
21599impl std::convert::From<&str> for SeriesType {
21600    fn from(value: &str) -> Self {
21601        use std::string::ToString;
21602        match value {
21603            "SERIES_TYPE_UNSPECIFIED" => Self::Unspecified,
21604            "LINE" => Self::Line,
21605            "BAR" => Self::Bar,
21606            "PIE" => Self::Pie,
21607            "TEXT" => Self::Text,
21608            "MAP" => Self::Map,
21609            "GAUGE" => Self::Gauge,
21610            "SCATTERPLOT" => Self::Scatterplot,
21611            _ => Self::UnknownValue(series_type::UnknownValue(
21612                wkt::internal::UnknownEnumValue::String(value.to_string()),
21613            )),
21614        }
21615    }
21616}
21617
21618impl serde::ser::Serialize for SeriesType {
21619    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21620    where
21621        S: serde::Serializer,
21622    {
21623        match self {
21624            Self::Unspecified => serializer.serialize_i32(0),
21625            Self::Line => serializer.serialize_i32(1),
21626            Self::Bar => serializer.serialize_i32(2),
21627            Self::Pie => serializer.serialize_i32(3),
21628            Self::Text => serializer.serialize_i32(4),
21629            Self::Map => serializer.serialize_i32(5),
21630            Self::Gauge => serializer.serialize_i32(6),
21631            Self::Scatterplot => serializer.serialize_i32(7),
21632            Self::UnknownValue(u) => u.0.serialize(serializer),
21633        }
21634    }
21635}
21636
21637impl<'de> serde::de::Deserialize<'de> for SeriesType {
21638    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21639    where
21640        D: serde::Deserializer<'de>,
21641    {
21642        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SeriesType>::new(
21643            ".google.cloud.chronicle.v1.SeriesType",
21644        ))
21645    }
21646}
21647
21648/// Enum for [SeriesStackStrategy].
21649///
21650/// # Working with unknown values
21651///
21652/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21653/// additional enum variants at any time. Adding new variants is not considered
21654/// a breaking change. Applications should write their code in anticipation of:
21655///
21656/// - New values appearing in future releases of the client library, **and**
21657/// - New values received dynamically, without application changes.
21658///
21659/// Please consult the [Working with enums] section in the user guide for some
21660/// guidelines.
21661///
21662/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21663#[derive(Clone, Debug, PartialEq)]
21664#[non_exhaustive]
21665pub enum SeriesStackStrategy {
21666    #[allow(missing_docs)]
21667    Unspecified,
21668    #[allow(missing_docs)]
21669    Samesign,
21670    #[allow(missing_docs)]
21671    All,
21672    #[allow(missing_docs)]
21673    Positive,
21674    #[allow(missing_docs)]
21675    Negative,
21676    /// If set, the enum was initialized with an unknown value.
21677    ///
21678    /// Applications can examine the value using [SeriesStackStrategy::value] or
21679    /// [SeriesStackStrategy::name].
21680    UnknownValue(series_stack_strategy::UnknownValue),
21681}
21682
21683#[doc(hidden)]
21684pub mod series_stack_strategy {
21685    #[allow(unused_imports)]
21686    use super::*;
21687    #[derive(Clone, Debug, PartialEq)]
21688    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21689}
21690
21691impl SeriesStackStrategy {
21692    /// Gets the enum value.
21693    ///
21694    /// Returns `None` if the enum contains an unknown value deserialized from
21695    /// the string representation of enums.
21696    pub fn value(&self) -> std::option::Option<i32> {
21697        match self {
21698            Self::Unspecified => std::option::Option::Some(0),
21699            Self::Samesign => std::option::Option::Some(1),
21700            Self::All => std::option::Option::Some(2),
21701            Self::Positive => std::option::Option::Some(3),
21702            Self::Negative => std::option::Option::Some(4),
21703            Self::UnknownValue(u) => u.0.value(),
21704        }
21705    }
21706
21707    /// Gets the enum value as a string.
21708    ///
21709    /// Returns `None` if the enum contains an unknown value deserialized from
21710    /// the integer representation of enums.
21711    pub fn name(&self) -> std::option::Option<&str> {
21712        match self {
21713            Self::Unspecified => std::option::Option::Some("SERIES_STACK_STRATEGY_UNSPECIFIED"),
21714            Self::Samesign => std::option::Option::Some("SAMESIGN"),
21715            Self::All => std::option::Option::Some("ALL"),
21716            Self::Positive => std::option::Option::Some("POSITIVE"),
21717            Self::Negative => std::option::Option::Some("NEGATIVE"),
21718            Self::UnknownValue(u) => u.0.name(),
21719        }
21720    }
21721}
21722
21723impl std::default::Default for SeriesStackStrategy {
21724    fn default() -> Self {
21725        use std::convert::From;
21726        Self::from(0)
21727    }
21728}
21729
21730impl std::fmt::Display for SeriesStackStrategy {
21731    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21732        wkt::internal::display_enum(f, self.name(), self.value())
21733    }
21734}
21735
21736impl std::convert::From<i32> for SeriesStackStrategy {
21737    fn from(value: i32) -> Self {
21738        match value {
21739            0 => Self::Unspecified,
21740            1 => Self::Samesign,
21741            2 => Self::All,
21742            3 => Self::Positive,
21743            4 => Self::Negative,
21744            _ => Self::UnknownValue(series_stack_strategy::UnknownValue(
21745                wkt::internal::UnknownEnumValue::Integer(value),
21746            )),
21747        }
21748    }
21749}
21750
21751impl std::convert::From<&str> for SeriesStackStrategy {
21752    fn from(value: &str) -> Self {
21753        use std::string::ToString;
21754        match value {
21755            "SERIES_STACK_STRATEGY_UNSPECIFIED" => Self::Unspecified,
21756            "SAMESIGN" => Self::Samesign,
21757            "ALL" => Self::All,
21758            "POSITIVE" => Self::Positive,
21759            "NEGATIVE" => Self::Negative,
21760            _ => Self::UnknownValue(series_stack_strategy::UnknownValue(
21761                wkt::internal::UnknownEnumValue::String(value.to_string()),
21762            )),
21763        }
21764    }
21765}
21766
21767impl serde::ser::Serialize for SeriesStackStrategy {
21768    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21769    where
21770        S: serde::Serializer,
21771    {
21772        match self {
21773            Self::Unspecified => serializer.serialize_i32(0),
21774            Self::Samesign => serializer.serialize_i32(1),
21775            Self::All => serializer.serialize_i32(2),
21776            Self::Positive => serializer.serialize_i32(3),
21777            Self::Negative => serializer.serialize_i32(4),
21778            Self::UnknownValue(u) => u.0.serialize(serializer),
21779        }
21780    }
21781}
21782
21783impl<'de> serde::de::Deserialize<'de> for SeriesStackStrategy {
21784    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21785    where
21786        D: serde::Deserializer<'de>,
21787    {
21788        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SeriesStackStrategy>::new(
21789            ".google.cloud.chronicle.v1.SeriesStackStrategy",
21790        ))
21791    }
21792}
21793
21794/// Enum for [ToolTipTrigger].
21795///
21796/// # Working with unknown values
21797///
21798/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21799/// additional enum variants at any time. Adding new variants is not considered
21800/// a breaking change. Applications should write their code in anticipation of:
21801///
21802/// - New values appearing in future releases of the client library, **and**
21803/// - New values received dynamically, without application changes.
21804///
21805/// Please consult the [Working with enums] section in the user guide for some
21806/// guidelines.
21807///
21808/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21809#[derive(Clone, Debug, PartialEq)]
21810#[non_exhaustive]
21811pub enum ToolTipTrigger {
21812    #[allow(missing_docs)]
21813    TooltipTriggerUnspecified,
21814    #[allow(missing_docs)]
21815    TooltipTriggerNone,
21816    #[allow(missing_docs)]
21817    TooltipTriggerItem,
21818    #[allow(missing_docs)]
21819    TooltipTriggerAxis,
21820    /// If set, the enum was initialized with an unknown value.
21821    ///
21822    /// Applications can examine the value using [ToolTipTrigger::value] or
21823    /// [ToolTipTrigger::name].
21824    UnknownValue(tool_tip_trigger::UnknownValue),
21825}
21826
21827#[doc(hidden)]
21828pub mod tool_tip_trigger {
21829    #[allow(unused_imports)]
21830    use super::*;
21831    #[derive(Clone, Debug, PartialEq)]
21832    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21833}
21834
21835impl ToolTipTrigger {
21836    /// Gets the enum value.
21837    ///
21838    /// Returns `None` if the enum contains an unknown value deserialized from
21839    /// the string representation of enums.
21840    pub fn value(&self) -> std::option::Option<i32> {
21841        match self {
21842            Self::TooltipTriggerUnspecified => std::option::Option::Some(0),
21843            Self::TooltipTriggerNone => std::option::Option::Some(1),
21844            Self::TooltipTriggerItem => std::option::Option::Some(2),
21845            Self::TooltipTriggerAxis => std::option::Option::Some(3),
21846            Self::UnknownValue(u) => u.0.value(),
21847        }
21848    }
21849
21850    /// Gets the enum value as a string.
21851    ///
21852    /// Returns `None` if the enum contains an unknown value deserialized from
21853    /// the integer representation of enums.
21854    pub fn name(&self) -> std::option::Option<&str> {
21855        match self {
21856            Self::TooltipTriggerUnspecified => {
21857                std::option::Option::Some("TOOLTIP_TRIGGER_UNSPECIFIED")
21858            }
21859            Self::TooltipTriggerNone => std::option::Option::Some("TOOLTIP_TRIGGER_NONE"),
21860            Self::TooltipTriggerItem => std::option::Option::Some("TOOLTIP_TRIGGER_ITEM"),
21861            Self::TooltipTriggerAxis => std::option::Option::Some("TOOLTIP_TRIGGER_AXIS"),
21862            Self::UnknownValue(u) => u.0.name(),
21863        }
21864    }
21865}
21866
21867impl std::default::Default for ToolTipTrigger {
21868    fn default() -> Self {
21869        use std::convert::From;
21870        Self::from(0)
21871    }
21872}
21873
21874impl std::fmt::Display for ToolTipTrigger {
21875    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21876        wkt::internal::display_enum(f, self.name(), self.value())
21877    }
21878}
21879
21880impl std::convert::From<i32> for ToolTipTrigger {
21881    fn from(value: i32) -> Self {
21882        match value {
21883            0 => Self::TooltipTriggerUnspecified,
21884            1 => Self::TooltipTriggerNone,
21885            2 => Self::TooltipTriggerItem,
21886            3 => Self::TooltipTriggerAxis,
21887            _ => Self::UnknownValue(tool_tip_trigger::UnknownValue(
21888                wkt::internal::UnknownEnumValue::Integer(value),
21889            )),
21890        }
21891    }
21892}
21893
21894impl std::convert::From<&str> for ToolTipTrigger {
21895    fn from(value: &str) -> Self {
21896        use std::string::ToString;
21897        match value {
21898            "TOOLTIP_TRIGGER_UNSPECIFIED" => Self::TooltipTriggerUnspecified,
21899            "TOOLTIP_TRIGGER_NONE" => Self::TooltipTriggerNone,
21900            "TOOLTIP_TRIGGER_ITEM" => Self::TooltipTriggerItem,
21901            "TOOLTIP_TRIGGER_AXIS" => Self::TooltipTriggerAxis,
21902            _ => Self::UnknownValue(tool_tip_trigger::UnknownValue(
21903                wkt::internal::UnknownEnumValue::String(value.to_string()),
21904            )),
21905        }
21906    }
21907}
21908
21909impl serde::ser::Serialize for ToolTipTrigger {
21910    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21911    where
21912        S: serde::Serializer,
21913    {
21914        match self {
21915            Self::TooltipTriggerUnspecified => serializer.serialize_i32(0),
21916            Self::TooltipTriggerNone => serializer.serialize_i32(1),
21917            Self::TooltipTriggerItem => serializer.serialize_i32(2),
21918            Self::TooltipTriggerAxis => serializer.serialize_i32(3),
21919            Self::UnknownValue(u) => u.0.serialize(serializer),
21920        }
21921    }
21922}
21923
21924impl<'de> serde::de::Deserialize<'de> for ToolTipTrigger {
21925    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21926    where
21927        D: serde::Deserializer<'de>,
21928    {
21929        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ToolTipTrigger>::new(
21930            ".google.cloud.chronicle.v1.ToolTipTrigger",
21931        ))
21932    }
21933}
21934
21935/// Enum for [LegendOrient].
21936///
21937/// # Working with unknown values
21938///
21939/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21940/// additional enum variants at any time. Adding new variants is not considered
21941/// a breaking change. Applications should write their code in anticipation of:
21942///
21943/// - New values appearing in future releases of the client library, **and**
21944/// - New values received dynamically, without application changes.
21945///
21946/// Please consult the [Working with enums] section in the user guide for some
21947/// guidelines.
21948///
21949/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
21950#[derive(Clone, Debug, PartialEq)]
21951#[non_exhaustive]
21952pub enum LegendOrient {
21953    #[allow(missing_docs)]
21954    Unspecified,
21955    #[allow(missing_docs)]
21956    Vertical,
21957    #[allow(missing_docs)]
21958    Horizontal,
21959    /// If set, the enum was initialized with an unknown value.
21960    ///
21961    /// Applications can examine the value using [LegendOrient::value] or
21962    /// [LegendOrient::name].
21963    UnknownValue(legend_orient::UnknownValue),
21964}
21965
21966#[doc(hidden)]
21967pub mod legend_orient {
21968    #[allow(unused_imports)]
21969    use super::*;
21970    #[derive(Clone, Debug, PartialEq)]
21971    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21972}
21973
21974impl LegendOrient {
21975    /// Gets the enum value.
21976    ///
21977    /// Returns `None` if the enum contains an unknown value deserialized from
21978    /// the string representation of enums.
21979    pub fn value(&self) -> std::option::Option<i32> {
21980        match self {
21981            Self::Unspecified => std::option::Option::Some(0),
21982            Self::Vertical => std::option::Option::Some(1),
21983            Self::Horizontal => std::option::Option::Some(2),
21984            Self::UnknownValue(u) => u.0.value(),
21985        }
21986    }
21987
21988    /// Gets the enum value as a string.
21989    ///
21990    /// Returns `None` if the enum contains an unknown value deserialized from
21991    /// the integer representation of enums.
21992    pub fn name(&self) -> std::option::Option<&str> {
21993        match self {
21994            Self::Unspecified => std::option::Option::Some("LEGEND_ORIENT_UNSPECIFIED"),
21995            Self::Vertical => std::option::Option::Some("VERTICAL"),
21996            Self::Horizontal => std::option::Option::Some("HORIZONTAL"),
21997            Self::UnknownValue(u) => u.0.name(),
21998        }
21999    }
22000}
22001
22002impl std::default::Default for LegendOrient {
22003    fn default() -> Self {
22004        use std::convert::From;
22005        Self::from(0)
22006    }
22007}
22008
22009impl std::fmt::Display for LegendOrient {
22010    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22011        wkt::internal::display_enum(f, self.name(), self.value())
22012    }
22013}
22014
22015impl std::convert::From<i32> for LegendOrient {
22016    fn from(value: i32) -> Self {
22017        match value {
22018            0 => Self::Unspecified,
22019            1 => Self::Vertical,
22020            2 => Self::Horizontal,
22021            _ => Self::UnknownValue(legend_orient::UnknownValue(
22022                wkt::internal::UnknownEnumValue::Integer(value),
22023            )),
22024        }
22025    }
22026}
22027
22028impl std::convert::From<&str> for LegendOrient {
22029    fn from(value: &str) -> Self {
22030        use std::string::ToString;
22031        match value {
22032            "LEGEND_ORIENT_UNSPECIFIED" => Self::Unspecified,
22033            "VERTICAL" => Self::Vertical,
22034            "HORIZONTAL" => Self::Horizontal,
22035            _ => Self::UnknownValue(legend_orient::UnknownValue(
22036                wkt::internal::UnknownEnumValue::String(value.to_string()),
22037            )),
22038        }
22039    }
22040}
22041
22042impl serde::ser::Serialize for LegendOrient {
22043    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22044    where
22045        S: serde::Serializer,
22046    {
22047        match self {
22048            Self::Unspecified => serializer.serialize_i32(0),
22049            Self::Vertical => serializer.serialize_i32(1),
22050            Self::Horizontal => serializer.serialize_i32(2),
22051            Self::UnknownValue(u) => u.0.serialize(serializer),
22052        }
22053    }
22054}
22055
22056impl<'de> serde::de::Deserialize<'de> for LegendOrient {
22057    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22058    where
22059        D: serde::Deserializer<'de>,
22060    {
22061        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LegendOrient>::new(
22062            ".google.cloud.chronicle.v1.LegendOrient",
22063        ))
22064    }
22065}
22066
22067/// Enum for [LegendAlign].
22068///
22069/// # Working with unknown values
22070///
22071/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22072/// additional enum variants at any time. Adding new variants is not considered
22073/// a breaking change. Applications should write their code in anticipation of:
22074///
22075/// - New values appearing in future releases of the client library, **and**
22076/// - New values received dynamically, without application changes.
22077///
22078/// Please consult the [Working with enums] section in the user guide for some
22079/// guidelines.
22080///
22081/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22082#[derive(Clone, Debug, PartialEq)]
22083#[non_exhaustive]
22084pub enum LegendAlign {
22085    #[allow(missing_docs)]
22086    Unspecified,
22087    #[allow(missing_docs)]
22088    Auto,
22089    #[allow(missing_docs)]
22090    Left,
22091    #[allow(missing_docs)]
22092    Right,
22093    /// If set, the enum was initialized with an unknown value.
22094    ///
22095    /// Applications can examine the value using [LegendAlign::value] or
22096    /// [LegendAlign::name].
22097    UnknownValue(legend_align::UnknownValue),
22098}
22099
22100#[doc(hidden)]
22101pub mod legend_align {
22102    #[allow(unused_imports)]
22103    use super::*;
22104    #[derive(Clone, Debug, PartialEq)]
22105    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22106}
22107
22108impl LegendAlign {
22109    /// Gets the enum value.
22110    ///
22111    /// Returns `None` if the enum contains an unknown value deserialized from
22112    /// the string representation of enums.
22113    pub fn value(&self) -> std::option::Option<i32> {
22114        match self {
22115            Self::Unspecified => std::option::Option::Some(0),
22116            Self::Auto => std::option::Option::Some(1),
22117            Self::Left => std::option::Option::Some(2),
22118            Self::Right => std::option::Option::Some(3),
22119            Self::UnknownValue(u) => u.0.value(),
22120        }
22121    }
22122
22123    /// Gets the enum value as a string.
22124    ///
22125    /// Returns `None` if the enum contains an unknown value deserialized from
22126    /// the integer representation of enums.
22127    pub fn name(&self) -> std::option::Option<&str> {
22128        match self {
22129            Self::Unspecified => std::option::Option::Some("LEGEND_ALIGN_UNSPECIFIED"),
22130            Self::Auto => std::option::Option::Some("AUTO"),
22131            Self::Left => std::option::Option::Some("LEFT"),
22132            Self::Right => std::option::Option::Some("RIGHT"),
22133            Self::UnknownValue(u) => u.0.name(),
22134        }
22135    }
22136}
22137
22138impl std::default::Default for LegendAlign {
22139    fn default() -> Self {
22140        use std::convert::From;
22141        Self::from(0)
22142    }
22143}
22144
22145impl std::fmt::Display for LegendAlign {
22146    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22147        wkt::internal::display_enum(f, self.name(), self.value())
22148    }
22149}
22150
22151impl std::convert::From<i32> for LegendAlign {
22152    fn from(value: i32) -> Self {
22153        match value {
22154            0 => Self::Unspecified,
22155            1 => Self::Auto,
22156            2 => Self::Left,
22157            3 => Self::Right,
22158            _ => Self::UnknownValue(legend_align::UnknownValue(
22159                wkt::internal::UnknownEnumValue::Integer(value),
22160            )),
22161        }
22162    }
22163}
22164
22165impl std::convert::From<&str> for LegendAlign {
22166    fn from(value: &str) -> Self {
22167        use std::string::ToString;
22168        match value {
22169            "LEGEND_ALIGN_UNSPECIFIED" => Self::Unspecified,
22170            "AUTO" => Self::Auto,
22171            "LEFT" => Self::Left,
22172            "RIGHT" => Self::Right,
22173            _ => Self::UnknownValue(legend_align::UnknownValue(
22174                wkt::internal::UnknownEnumValue::String(value.to_string()),
22175            )),
22176        }
22177    }
22178}
22179
22180impl serde::ser::Serialize for LegendAlign {
22181    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22182    where
22183        S: serde::Serializer,
22184    {
22185        match self {
22186            Self::Unspecified => serializer.serialize_i32(0),
22187            Self::Auto => serializer.serialize_i32(1),
22188            Self::Left => serializer.serialize_i32(2),
22189            Self::Right => serializer.serialize_i32(3),
22190            Self::UnknownValue(u) => u.0.serialize(serializer),
22191        }
22192    }
22193}
22194
22195impl<'de> serde::de::Deserialize<'de> for LegendAlign {
22196    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22197    where
22198        D: serde::Deserializer<'de>,
22199    {
22200        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LegendAlign>::new(
22201            ".google.cloud.chronicle.v1.LegendAlign",
22202        ))
22203    }
22204}
22205
22206/// Enum for [ButtonStyle].
22207///
22208/// # Working with unknown values
22209///
22210/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22211/// additional enum variants at any time. Adding new variants is not considered
22212/// a breaking change. Applications should write their code in anticipation of:
22213///
22214/// - New values appearing in future releases of the client library, **and**
22215/// - New values received dynamically, without application changes.
22216///
22217/// Please consult the [Working with enums] section in the user guide for some
22218/// guidelines.
22219///
22220/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22221#[derive(Clone, Debug, PartialEq)]
22222#[non_exhaustive]
22223pub enum ButtonStyle {
22224    #[allow(missing_docs)]
22225    Unspecified,
22226    #[allow(missing_docs)]
22227    Filled,
22228    #[allow(missing_docs)]
22229    Outlined,
22230    #[allow(missing_docs)]
22231    Transparent,
22232    /// If set, the enum was initialized with an unknown value.
22233    ///
22234    /// Applications can examine the value using [ButtonStyle::value] or
22235    /// [ButtonStyle::name].
22236    UnknownValue(button_style::UnknownValue),
22237}
22238
22239#[doc(hidden)]
22240pub mod button_style {
22241    #[allow(unused_imports)]
22242    use super::*;
22243    #[derive(Clone, Debug, PartialEq)]
22244    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22245}
22246
22247impl ButtonStyle {
22248    /// Gets the enum value.
22249    ///
22250    /// Returns `None` if the enum contains an unknown value deserialized from
22251    /// the string representation of enums.
22252    pub fn value(&self) -> std::option::Option<i32> {
22253        match self {
22254            Self::Unspecified => std::option::Option::Some(0),
22255            Self::Filled => std::option::Option::Some(1),
22256            Self::Outlined => std::option::Option::Some(2),
22257            Self::Transparent => std::option::Option::Some(3),
22258            Self::UnknownValue(u) => u.0.value(),
22259        }
22260    }
22261
22262    /// Gets the enum value as a string.
22263    ///
22264    /// Returns `None` if the enum contains an unknown value deserialized from
22265    /// the integer representation of enums.
22266    pub fn name(&self) -> std::option::Option<&str> {
22267        match self {
22268            Self::Unspecified => std::option::Option::Some("BUTTON_STYLE_UNSPECIFIED"),
22269            Self::Filled => std::option::Option::Some("BUTTON_STYLE_FILLED"),
22270            Self::Outlined => std::option::Option::Some("BUTTON_STYLE_OUTLINED"),
22271            Self::Transparent => std::option::Option::Some("BUTTON_STYLE_TRANSPARENT"),
22272            Self::UnknownValue(u) => u.0.name(),
22273        }
22274    }
22275}
22276
22277impl std::default::Default for ButtonStyle {
22278    fn default() -> Self {
22279        use std::convert::From;
22280        Self::from(0)
22281    }
22282}
22283
22284impl std::fmt::Display for ButtonStyle {
22285    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22286        wkt::internal::display_enum(f, self.name(), self.value())
22287    }
22288}
22289
22290impl std::convert::From<i32> for ButtonStyle {
22291    fn from(value: i32) -> Self {
22292        match value {
22293            0 => Self::Unspecified,
22294            1 => Self::Filled,
22295            2 => Self::Outlined,
22296            3 => Self::Transparent,
22297            _ => Self::UnknownValue(button_style::UnknownValue(
22298                wkt::internal::UnknownEnumValue::Integer(value),
22299            )),
22300        }
22301    }
22302}
22303
22304impl std::convert::From<&str> for ButtonStyle {
22305    fn from(value: &str) -> Self {
22306        use std::string::ToString;
22307        match value {
22308            "BUTTON_STYLE_UNSPECIFIED" => Self::Unspecified,
22309            "BUTTON_STYLE_FILLED" => Self::Filled,
22310            "BUTTON_STYLE_OUTLINED" => Self::Outlined,
22311            "BUTTON_STYLE_TRANSPARENT" => Self::Transparent,
22312            _ => Self::UnknownValue(button_style::UnknownValue(
22313                wkt::internal::UnknownEnumValue::String(value.to_string()),
22314            )),
22315        }
22316    }
22317}
22318
22319impl serde::ser::Serialize for ButtonStyle {
22320    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22321    where
22322        S: serde::Serializer,
22323    {
22324        match self {
22325            Self::Unspecified => serializer.serialize_i32(0),
22326            Self::Filled => serializer.serialize_i32(1),
22327            Self::Outlined => serializer.serialize_i32(2),
22328            Self::Transparent => serializer.serialize_i32(3),
22329            Self::UnknownValue(u) => u.0.serialize(serializer),
22330        }
22331    }
22332}
22333
22334impl<'de> serde::de::Deserialize<'de> for ButtonStyle {
22335    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22336    where
22337        D: serde::Deserializer<'de>,
22338    {
22339        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ButtonStyle>::new(
22340            ".google.cloud.chronicle.v1.ButtonStyle",
22341        ))
22342    }
22343}
22344
22345/// Plot mode for the map.
22346///
22347/// # Working with unknown values
22348///
22349/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22350/// additional enum variants at any time. Adding new variants is not considered
22351/// a breaking change. Applications should write their code in anticipation of:
22352///
22353/// - New values appearing in future releases of the client library, **and**
22354/// - New values received dynamically, without application changes.
22355///
22356/// Please consult the [Working with enums] section in the user guide for some
22357/// guidelines.
22358///
22359/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22360#[derive(Clone, Debug, PartialEq)]
22361#[non_exhaustive]
22362pub enum PlotMode {
22363    /// Plot mode is not specified.
22364    Unspecified,
22365    /// Plot mode is points.
22366    Points,
22367    /// Plot mode is heatmap.
22368    Heatmap,
22369    /// Plot mode is both points and heatmap.
22370    Both,
22371    /// If set, the enum was initialized with an unknown value.
22372    ///
22373    /// Applications can examine the value using [PlotMode::value] or
22374    /// [PlotMode::name].
22375    UnknownValue(plot_mode::UnknownValue),
22376}
22377
22378#[doc(hidden)]
22379pub mod plot_mode {
22380    #[allow(unused_imports)]
22381    use super::*;
22382    #[derive(Clone, Debug, PartialEq)]
22383    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22384}
22385
22386impl PlotMode {
22387    /// Gets the enum value.
22388    ///
22389    /// Returns `None` if the enum contains an unknown value deserialized from
22390    /// the string representation of enums.
22391    pub fn value(&self) -> std::option::Option<i32> {
22392        match self {
22393            Self::Unspecified => std::option::Option::Some(0),
22394            Self::Points => std::option::Option::Some(1),
22395            Self::Heatmap => std::option::Option::Some(2),
22396            Self::Both => std::option::Option::Some(3),
22397            Self::UnknownValue(u) => u.0.value(),
22398        }
22399    }
22400
22401    /// Gets the enum value as a string.
22402    ///
22403    /// Returns `None` if the enum contains an unknown value deserialized from
22404    /// the integer representation of enums.
22405    pub fn name(&self) -> std::option::Option<&str> {
22406        match self {
22407            Self::Unspecified => std::option::Option::Some("PLOT_MODE_UNSPECIFIED"),
22408            Self::Points => std::option::Option::Some("PLOT_MODE_POINTS"),
22409            Self::Heatmap => std::option::Option::Some("PLOT_MODE_HEATMAP"),
22410            Self::Both => std::option::Option::Some("PLOT_MODE_BOTH"),
22411            Self::UnknownValue(u) => u.0.name(),
22412        }
22413    }
22414}
22415
22416impl std::default::Default for PlotMode {
22417    fn default() -> Self {
22418        use std::convert::From;
22419        Self::from(0)
22420    }
22421}
22422
22423impl std::fmt::Display for PlotMode {
22424    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22425        wkt::internal::display_enum(f, self.name(), self.value())
22426    }
22427}
22428
22429impl std::convert::From<i32> for PlotMode {
22430    fn from(value: i32) -> Self {
22431        match value {
22432            0 => Self::Unspecified,
22433            1 => Self::Points,
22434            2 => Self::Heatmap,
22435            3 => Self::Both,
22436            _ => Self::UnknownValue(plot_mode::UnknownValue(
22437                wkt::internal::UnknownEnumValue::Integer(value),
22438            )),
22439        }
22440    }
22441}
22442
22443impl std::convert::From<&str> for PlotMode {
22444    fn from(value: &str) -> Self {
22445        use std::string::ToString;
22446        match value {
22447            "PLOT_MODE_UNSPECIFIED" => Self::Unspecified,
22448            "PLOT_MODE_POINTS" => Self::Points,
22449            "PLOT_MODE_HEATMAP" => Self::Heatmap,
22450            "PLOT_MODE_BOTH" => Self::Both,
22451            _ => Self::UnknownValue(plot_mode::UnknownValue(
22452                wkt::internal::UnknownEnumValue::String(value.to_string()),
22453            )),
22454        }
22455    }
22456}
22457
22458impl serde::ser::Serialize for PlotMode {
22459    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22460    where
22461        S: serde::Serializer,
22462    {
22463        match self {
22464            Self::Unspecified => serializer.serialize_i32(0),
22465            Self::Points => serializer.serialize_i32(1),
22466            Self::Heatmap => serializer.serialize_i32(2),
22467            Self::Both => serializer.serialize_i32(3),
22468            Self::UnknownValue(u) => u.0.serialize(serializer),
22469        }
22470    }
22471}
22472
22473impl<'de> serde::de::Deserialize<'de> for PlotMode {
22474    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22475    where
22476        D: serde::Deserializer<'de>,
22477    {
22478        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PlotMode>::new(
22479            ".google.cloud.chronicle.v1.PlotMode",
22480        ))
22481    }
22482}
22483
22484/// Point size type for the map.
22485///
22486/// # Working with unknown values
22487///
22488/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22489/// additional enum variants at any time. Adding new variants is not considered
22490/// a breaking change. Applications should write their code in anticipation of:
22491///
22492/// - New values appearing in future releases of the client library, **and**
22493/// - New values received dynamically, without application changes.
22494///
22495/// Please consult the [Working with enums] section in the user guide for some
22496/// guidelines.
22497///
22498/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22499#[derive(Clone, Debug, PartialEq)]
22500#[non_exhaustive]
22501pub enum PointSizeType {
22502    /// Point size is not specified.
22503    Unspecified,
22504    /// Point size is fixed.
22505    Fixed,
22506    /// Point size is proportional to the size of the data point.
22507    ProportionalToSize,
22508    /// If set, the enum was initialized with an unknown value.
22509    ///
22510    /// Applications can examine the value using [PointSizeType::value] or
22511    /// [PointSizeType::name].
22512    UnknownValue(point_size_type::UnknownValue),
22513}
22514
22515#[doc(hidden)]
22516pub mod point_size_type {
22517    #[allow(unused_imports)]
22518    use super::*;
22519    #[derive(Clone, Debug, PartialEq)]
22520    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22521}
22522
22523impl PointSizeType {
22524    /// Gets the enum value.
22525    ///
22526    /// Returns `None` if the enum contains an unknown value deserialized from
22527    /// the string representation of enums.
22528    pub fn value(&self) -> std::option::Option<i32> {
22529        match self {
22530            Self::Unspecified => std::option::Option::Some(0),
22531            Self::Fixed => std::option::Option::Some(1),
22532            Self::ProportionalToSize => std::option::Option::Some(2),
22533            Self::UnknownValue(u) => u.0.value(),
22534        }
22535    }
22536
22537    /// Gets the enum value as a string.
22538    ///
22539    /// Returns `None` if the enum contains an unknown value deserialized from
22540    /// the integer representation of enums.
22541    pub fn name(&self) -> std::option::Option<&str> {
22542        match self {
22543            Self::Unspecified => std::option::Option::Some("POINT_SIZE_TYPE_UNSPECIFIED"),
22544            Self::Fixed => std::option::Option::Some("POINT_SIZE_TYPE_FIXED"),
22545            Self::ProportionalToSize => {
22546                std::option::Option::Some("POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE")
22547            }
22548            Self::UnknownValue(u) => u.0.name(),
22549        }
22550    }
22551}
22552
22553impl std::default::Default for PointSizeType {
22554    fn default() -> Self {
22555        use std::convert::From;
22556        Self::from(0)
22557    }
22558}
22559
22560impl std::fmt::Display for PointSizeType {
22561    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22562        wkt::internal::display_enum(f, self.name(), self.value())
22563    }
22564}
22565
22566impl std::convert::From<i32> for PointSizeType {
22567    fn from(value: i32) -> Self {
22568        match value {
22569            0 => Self::Unspecified,
22570            1 => Self::Fixed,
22571            2 => Self::ProportionalToSize,
22572            _ => Self::UnknownValue(point_size_type::UnknownValue(
22573                wkt::internal::UnknownEnumValue::Integer(value),
22574            )),
22575        }
22576    }
22577}
22578
22579impl std::convert::From<&str> for PointSizeType {
22580    fn from(value: &str) -> Self {
22581        use std::string::ToString;
22582        match value {
22583            "POINT_SIZE_TYPE_UNSPECIFIED" => Self::Unspecified,
22584            "POINT_SIZE_TYPE_FIXED" => Self::Fixed,
22585            "POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE" => Self::ProportionalToSize,
22586            _ => Self::UnknownValue(point_size_type::UnknownValue(
22587                wkt::internal::UnknownEnumValue::String(value.to_string()),
22588            )),
22589        }
22590    }
22591}
22592
22593impl serde::ser::Serialize for PointSizeType {
22594    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22595    where
22596        S: serde::Serializer,
22597    {
22598        match self {
22599            Self::Unspecified => serializer.serialize_i32(0),
22600            Self::Fixed => serializer.serialize_i32(1),
22601            Self::ProportionalToSize => serializer.serialize_i32(2),
22602            Self::UnknownValue(u) => u.0.serialize(serializer),
22603        }
22604    }
22605}
22606
22607impl<'de> serde::de::Deserialize<'de> for PointSizeType {
22608    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22609    where
22610        D: serde::Deserializer<'de>,
22611    {
22612        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PointSizeType>::new(
22613            ".google.cloud.chronicle.v1.PointSizeType",
22614        ))
22615    }
22616}
22617
22618/// Metric format to be displayed for the metric charts.
22619///
22620/// # Working with unknown values
22621///
22622/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22623/// additional enum variants at any time. Adding new variants is not considered
22624/// a breaking change. Applications should write their code in anticipation of:
22625///
22626/// - New values appearing in future releases of the client library, **and**
22627/// - New values received dynamically, without application changes.
22628///
22629/// Please consult the [Working with enums] section in the user guide for some
22630/// guidelines.
22631///
22632/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22633#[derive(Clone, Debug, PartialEq)]
22634#[non_exhaustive]
22635pub enum MetricFormat {
22636    /// Metric format is not specified.
22637    Unspecified,
22638    /// Metric format in number
22639    Number,
22640    /// Metric format in plain text
22641    PlainText,
22642    /// If set, the enum was initialized with an unknown value.
22643    ///
22644    /// Applications can examine the value using [MetricFormat::value] or
22645    /// [MetricFormat::name].
22646    UnknownValue(metric_format::UnknownValue),
22647}
22648
22649#[doc(hidden)]
22650pub mod metric_format {
22651    #[allow(unused_imports)]
22652    use super::*;
22653    #[derive(Clone, Debug, PartialEq)]
22654    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22655}
22656
22657impl MetricFormat {
22658    /// Gets the enum value.
22659    ///
22660    /// Returns `None` if the enum contains an unknown value deserialized from
22661    /// the string representation of enums.
22662    pub fn value(&self) -> std::option::Option<i32> {
22663        match self {
22664            Self::Unspecified => std::option::Option::Some(0),
22665            Self::Number => std::option::Option::Some(1),
22666            Self::PlainText => std::option::Option::Some(2),
22667            Self::UnknownValue(u) => u.0.value(),
22668        }
22669    }
22670
22671    /// Gets the enum value as a string.
22672    ///
22673    /// Returns `None` if the enum contains an unknown value deserialized from
22674    /// the integer representation of enums.
22675    pub fn name(&self) -> std::option::Option<&str> {
22676        match self {
22677            Self::Unspecified => std::option::Option::Some("METRIC_FORMAT_UNSPECIFIED"),
22678            Self::Number => std::option::Option::Some("METRIC_FORMAT_NUMBER"),
22679            Self::PlainText => std::option::Option::Some("METRIC_FORMAT_PLAIN_TEXT"),
22680            Self::UnknownValue(u) => u.0.name(),
22681        }
22682    }
22683}
22684
22685impl std::default::Default for MetricFormat {
22686    fn default() -> Self {
22687        use std::convert::From;
22688        Self::from(0)
22689    }
22690}
22691
22692impl std::fmt::Display for MetricFormat {
22693    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22694        wkt::internal::display_enum(f, self.name(), self.value())
22695    }
22696}
22697
22698impl std::convert::From<i32> for MetricFormat {
22699    fn from(value: i32) -> Self {
22700        match value {
22701            0 => Self::Unspecified,
22702            1 => Self::Number,
22703            2 => Self::PlainText,
22704            _ => Self::UnknownValue(metric_format::UnknownValue(
22705                wkt::internal::UnknownEnumValue::Integer(value),
22706            )),
22707        }
22708    }
22709}
22710
22711impl std::convert::From<&str> for MetricFormat {
22712    fn from(value: &str) -> Self {
22713        use std::string::ToString;
22714        match value {
22715            "METRIC_FORMAT_UNSPECIFIED" => Self::Unspecified,
22716            "METRIC_FORMAT_NUMBER" => Self::Number,
22717            "METRIC_FORMAT_PLAIN_TEXT" => Self::PlainText,
22718            _ => Self::UnknownValue(metric_format::UnknownValue(
22719                wkt::internal::UnknownEnumValue::String(value.to_string()),
22720            )),
22721        }
22722    }
22723}
22724
22725impl serde::ser::Serialize for MetricFormat {
22726    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22727    where
22728        S: serde::Serializer,
22729    {
22730        match self {
22731            Self::Unspecified => serializer.serialize_i32(0),
22732            Self::Number => serializer.serialize_i32(1),
22733            Self::PlainText => serializer.serialize_i32(2),
22734            Self::UnknownValue(u) => u.0.serialize(serializer),
22735        }
22736    }
22737}
22738
22739impl<'de> serde::de::Deserialize<'de> for MetricFormat {
22740    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22741    where
22742        D: serde::Deserializer<'de>,
22743    {
22744        deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricFormat>::new(
22745            ".google.cloud.chronicle.v1.MetricFormat",
22746        ))
22747    }
22748}
22749
22750/// Trend to be displayed for the metric charts as.
22751///
22752/// # Working with unknown values
22753///
22754/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22755/// additional enum variants at any time. Adding new variants is not considered
22756/// a breaking change. Applications should write their code in anticipation of:
22757///
22758/// - New values appearing in future releases of the client library, **and**
22759/// - New values received dynamically, without application changes.
22760///
22761/// Please consult the [Working with enums] section in the user guide for some
22762/// guidelines.
22763///
22764/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22765#[derive(Clone, Debug, PartialEq)]
22766#[non_exhaustive]
22767pub enum MetricDisplayTrend {
22768    /// Trend is not specified.
22769    Unspecified,
22770    /// Trend data in absolute value
22771    AbsoluteValue,
22772    /// Trend data in percentage
22773    Percentage,
22774    /// Trend data in both absolute value and percentage
22775    AbsoluteValueAndPercentage,
22776    /// If set, the enum was initialized with an unknown value.
22777    ///
22778    /// Applications can examine the value using [MetricDisplayTrend::value] or
22779    /// [MetricDisplayTrend::name].
22780    UnknownValue(metric_display_trend::UnknownValue),
22781}
22782
22783#[doc(hidden)]
22784pub mod metric_display_trend {
22785    #[allow(unused_imports)]
22786    use super::*;
22787    #[derive(Clone, Debug, PartialEq)]
22788    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22789}
22790
22791impl MetricDisplayTrend {
22792    /// Gets the enum value.
22793    ///
22794    /// Returns `None` if the enum contains an unknown value deserialized from
22795    /// the string representation of enums.
22796    pub fn value(&self) -> std::option::Option<i32> {
22797        match self {
22798            Self::Unspecified => std::option::Option::Some(0),
22799            Self::AbsoluteValue => std::option::Option::Some(2),
22800            Self::Percentage => std::option::Option::Some(3),
22801            Self::AbsoluteValueAndPercentage => std::option::Option::Some(4),
22802            Self::UnknownValue(u) => u.0.value(),
22803        }
22804    }
22805
22806    /// Gets the enum value as a string.
22807    ///
22808    /// Returns `None` if the enum contains an unknown value deserialized from
22809    /// the integer representation of enums.
22810    pub fn name(&self) -> std::option::Option<&str> {
22811        match self {
22812            Self::Unspecified => std::option::Option::Some("METRIC_DISPLAY_TREND_UNSPECIFIED"),
22813            Self::AbsoluteValue => std::option::Option::Some("METRIC_DISPLAY_TREND_ABSOLUTE_VALUE"),
22814            Self::Percentage => std::option::Option::Some("METRIC_DISPLAY_TREND_PERCENTAGE"),
22815            Self::AbsoluteValueAndPercentage => {
22816                std::option::Option::Some("METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE")
22817            }
22818            Self::UnknownValue(u) => u.0.name(),
22819        }
22820    }
22821}
22822
22823impl std::default::Default for MetricDisplayTrend {
22824    fn default() -> Self {
22825        use std::convert::From;
22826        Self::from(0)
22827    }
22828}
22829
22830impl std::fmt::Display for MetricDisplayTrend {
22831    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22832        wkt::internal::display_enum(f, self.name(), self.value())
22833    }
22834}
22835
22836impl std::convert::From<i32> for MetricDisplayTrend {
22837    fn from(value: i32) -> Self {
22838        match value {
22839            0 => Self::Unspecified,
22840            2 => Self::AbsoluteValue,
22841            3 => Self::Percentage,
22842            4 => Self::AbsoluteValueAndPercentage,
22843            _ => Self::UnknownValue(metric_display_trend::UnknownValue(
22844                wkt::internal::UnknownEnumValue::Integer(value),
22845            )),
22846        }
22847    }
22848}
22849
22850impl std::convert::From<&str> for MetricDisplayTrend {
22851    fn from(value: &str) -> Self {
22852        use std::string::ToString;
22853        match value {
22854            "METRIC_DISPLAY_TREND_UNSPECIFIED" => Self::Unspecified,
22855            "METRIC_DISPLAY_TREND_ABSOLUTE_VALUE" => Self::AbsoluteValue,
22856            "METRIC_DISPLAY_TREND_PERCENTAGE" => Self::Percentage,
22857            "METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE" => {
22858                Self::AbsoluteValueAndPercentage
22859            }
22860            _ => Self::UnknownValue(metric_display_trend::UnknownValue(
22861                wkt::internal::UnknownEnumValue::String(value.to_string()),
22862            )),
22863        }
22864    }
22865}
22866
22867impl serde::ser::Serialize for MetricDisplayTrend {
22868    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22869    where
22870        S: serde::Serializer,
22871    {
22872        match self {
22873            Self::Unspecified => serializer.serialize_i32(0),
22874            Self::AbsoluteValue => serializer.serialize_i32(2),
22875            Self::Percentage => serializer.serialize_i32(3),
22876            Self::AbsoluteValueAndPercentage => serializer.serialize_i32(4),
22877            Self::UnknownValue(u) => u.0.serialize(serializer),
22878        }
22879    }
22880}
22881
22882impl<'de> serde::de::Deserialize<'de> for MetricDisplayTrend {
22883    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22884    where
22885        D: serde::Deserializer<'de>,
22886    {
22887        deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricDisplayTrend>::new(
22888            ".google.cloud.chronicle.v1.MetricDisplayTrend",
22889        ))
22890    }
22891}
22892
22893/// Trend to be displayed for the metric charts as.
22894///
22895/// # Working with unknown values
22896///
22897/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22898/// additional enum variants at any time. Adding new variants is not considered
22899/// a breaking change. Applications should write their code in anticipation of:
22900///
22901/// - New values appearing in future releases of the client library, **and**
22902/// - New values received dynamically, without application changes.
22903///
22904/// Please consult the [Working with enums] section in the user guide for some
22905/// guidelines.
22906///
22907/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22908#[derive(Clone, Debug, PartialEq)]
22909#[non_exhaustive]
22910pub enum MetricTrendType {
22911    /// Trend type is not specified.
22912    Unspecified,
22913    /// The trend type is regular(green for positive delta)
22914    Regular,
22915    /// The trend type is inverse(red for positive delta)
22916    Inverse,
22917    /// If set, the enum was initialized with an unknown value.
22918    ///
22919    /// Applications can examine the value using [MetricTrendType::value] or
22920    /// [MetricTrendType::name].
22921    UnknownValue(metric_trend_type::UnknownValue),
22922}
22923
22924#[doc(hidden)]
22925pub mod metric_trend_type {
22926    #[allow(unused_imports)]
22927    use super::*;
22928    #[derive(Clone, Debug, PartialEq)]
22929    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22930}
22931
22932impl MetricTrendType {
22933    /// Gets the enum value.
22934    ///
22935    /// Returns `None` if the enum contains an unknown value deserialized from
22936    /// the string representation of enums.
22937    pub fn value(&self) -> std::option::Option<i32> {
22938        match self {
22939            Self::Unspecified => std::option::Option::Some(0),
22940            Self::Regular => std::option::Option::Some(1),
22941            Self::Inverse => std::option::Option::Some(2),
22942            Self::UnknownValue(u) => u.0.value(),
22943        }
22944    }
22945
22946    /// Gets the enum value as a string.
22947    ///
22948    /// Returns `None` if the enum contains an unknown value deserialized from
22949    /// the integer representation of enums.
22950    pub fn name(&self) -> std::option::Option<&str> {
22951        match self {
22952            Self::Unspecified => std::option::Option::Some("METRIC_TREND_TYPE_UNSPECIFIED"),
22953            Self::Regular => std::option::Option::Some("METRIC_TREND_TYPE_REGULAR"),
22954            Self::Inverse => std::option::Option::Some("METRIC_TREND_TYPE_INVERSE"),
22955            Self::UnknownValue(u) => u.0.name(),
22956        }
22957    }
22958}
22959
22960impl std::default::Default for MetricTrendType {
22961    fn default() -> Self {
22962        use std::convert::From;
22963        Self::from(0)
22964    }
22965}
22966
22967impl std::fmt::Display for MetricTrendType {
22968    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22969        wkt::internal::display_enum(f, self.name(), self.value())
22970    }
22971}
22972
22973impl std::convert::From<i32> for MetricTrendType {
22974    fn from(value: i32) -> Self {
22975        match value {
22976            0 => Self::Unspecified,
22977            1 => Self::Regular,
22978            2 => Self::Inverse,
22979            _ => Self::UnknownValue(metric_trend_type::UnknownValue(
22980                wkt::internal::UnknownEnumValue::Integer(value),
22981            )),
22982        }
22983    }
22984}
22985
22986impl std::convert::From<&str> for MetricTrendType {
22987    fn from(value: &str) -> Self {
22988        use std::string::ToString;
22989        match value {
22990            "METRIC_TREND_TYPE_UNSPECIFIED" => Self::Unspecified,
22991            "METRIC_TREND_TYPE_REGULAR" => Self::Regular,
22992            "METRIC_TREND_TYPE_INVERSE" => Self::Inverse,
22993            _ => Self::UnknownValue(metric_trend_type::UnknownValue(
22994                wkt::internal::UnknownEnumValue::String(value.to_string()),
22995            )),
22996        }
22997    }
22998}
22999
23000impl serde::ser::Serialize for MetricTrendType {
23001    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23002    where
23003        S: serde::Serializer,
23004    {
23005        match self {
23006            Self::Unspecified => serializer.serialize_i32(0),
23007            Self::Regular => serializer.serialize_i32(1),
23008            Self::Inverse => serializer.serialize_i32(2),
23009            Self::UnknownValue(u) => u.0.serialize(serializer),
23010        }
23011    }
23012}
23013
23014impl<'de> serde::de::Deserialize<'de> for MetricTrendType {
23015    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23016    where
23017        D: serde::Deserializer<'de>,
23018    {
23019        deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricTrendType>::new(
23020            ".google.cloud.chronicle.v1.MetricTrendType",
23021        ))
23022    }
23023}
23024
23025/// Visual map for various charts. More info:
23026/// <https://echarts.apache.org/en/option.html#visualMap>
23027///
23028/// # Working with unknown values
23029///
23030/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23031/// additional enum variants at any time. Adding new variants is not considered
23032/// a breaking change. Applications should write their code in anticipation of:
23033///
23034/// - New values appearing in future releases of the client library, **and**
23035/// - New values received dynamically, without application changes.
23036///
23037/// Please consult the [Working with enums] section in the user guide for some
23038/// guidelines.
23039///
23040/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23041#[derive(Clone, Debug, PartialEq)]
23042#[non_exhaustive]
23043pub enum VisualMapType {
23044    /// Visual map type is not specified
23045    Unspecified,
23046    /// Continuous visual map
23047    Continuous,
23048    /// Piecewise visual map
23049    Piecewise,
23050    /// If set, the enum was initialized with an unknown value.
23051    ///
23052    /// Applications can examine the value using [VisualMapType::value] or
23053    /// [VisualMapType::name].
23054    UnknownValue(visual_map_type::UnknownValue),
23055}
23056
23057#[doc(hidden)]
23058pub mod visual_map_type {
23059    #[allow(unused_imports)]
23060    use super::*;
23061    #[derive(Clone, Debug, PartialEq)]
23062    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23063}
23064
23065impl VisualMapType {
23066    /// Gets the enum value.
23067    ///
23068    /// Returns `None` if the enum contains an unknown value deserialized from
23069    /// the string representation of enums.
23070    pub fn value(&self) -> std::option::Option<i32> {
23071        match self {
23072            Self::Unspecified => std::option::Option::Some(0),
23073            Self::Continuous => std::option::Option::Some(1),
23074            Self::Piecewise => std::option::Option::Some(2),
23075            Self::UnknownValue(u) => u.0.value(),
23076        }
23077    }
23078
23079    /// Gets the enum value as a string.
23080    ///
23081    /// Returns `None` if the enum contains an unknown value deserialized from
23082    /// the integer representation of enums.
23083    pub fn name(&self) -> std::option::Option<&str> {
23084        match self {
23085            Self::Unspecified => std::option::Option::Some("VISUAL_MAP_TYPE_UNSPECIFIED"),
23086            Self::Continuous => std::option::Option::Some("CONTINUOUS"),
23087            Self::Piecewise => std::option::Option::Some("PIECEWISE"),
23088            Self::UnknownValue(u) => u.0.name(),
23089        }
23090    }
23091}
23092
23093impl std::default::Default for VisualMapType {
23094    fn default() -> Self {
23095        use std::convert::From;
23096        Self::from(0)
23097    }
23098}
23099
23100impl std::fmt::Display for VisualMapType {
23101    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23102        wkt::internal::display_enum(f, self.name(), self.value())
23103    }
23104}
23105
23106impl std::convert::From<i32> for VisualMapType {
23107    fn from(value: i32) -> Self {
23108        match value {
23109            0 => Self::Unspecified,
23110            1 => Self::Continuous,
23111            2 => Self::Piecewise,
23112            _ => Self::UnknownValue(visual_map_type::UnknownValue(
23113                wkt::internal::UnknownEnumValue::Integer(value),
23114            )),
23115        }
23116    }
23117}
23118
23119impl std::convert::From<&str> for VisualMapType {
23120    fn from(value: &str) -> Self {
23121        use std::string::ToString;
23122        match value {
23123            "VISUAL_MAP_TYPE_UNSPECIFIED" => Self::Unspecified,
23124            "CONTINUOUS" => Self::Continuous,
23125            "PIECEWISE" => Self::Piecewise,
23126            _ => Self::UnknownValue(visual_map_type::UnknownValue(
23127                wkt::internal::UnknownEnumValue::String(value.to_string()),
23128            )),
23129        }
23130    }
23131}
23132
23133impl serde::ser::Serialize for VisualMapType {
23134    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23135    where
23136        S: serde::Serializer,
23137    {
23138        match self {
23139            Self::Unspecified => serializer.serialize_i32(0),
23140            Self::Continuous => serializer.serialize_i32(1),
23141            Self::Piecewise => serializer.serialize_i32(2),
23142            Self::UnknownValue(u) => u.0.serialize(serializer),
23143        }
23144    }
23145}
23146
23147impl<'de> serde::de::Deserialize<'de> for VisualMapType {
23148    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23149    where
23150        D: serde::Deserializer<'de>,
23151    {
23152        deserializer.deserialize_any(wkt::internal::EnumVisitor::<VisualMapType>::new(
23153            ".google.cloud.chronicle.v1.VisualMapType",
23154        ))
23155    }
23156}
23157
23158/// A language feature describes a specific capability or syntax of the query
23159/// language used in a dashboard query, such as `JOINS`, `STAGES`, or
23160/// `DATA_TABLES`.
23161///
23162/// # Working with unknown values
23163///
23164/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23165/// additional enum variants at any time. Adding new variants is not considered
23166/// a breaking change. Applications should write their code in anticipation of:
23167///
23168/// - New values appearing in future releases of the client library, **and**
23169/// - New values received dynamically, without application changes.
23170///
23171/// Please consult the [Working with enums] section in the user guide for some
23172/// guidelines.
23173///
23174/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23175#[derive(Clone, Debug, PartialEq)]
23176#[non_exhaustive]
23177pub enum LanguageFeature {
23178    /// Language feature is unknown.
23179    Unspecified,
23180    /// Language feature is joins.
23181    Joins,
23182    /// Language feature is stages.
23183    Stages,
23184    /// Language feature is data table.
23185    DataTables,
23186    /// If set, the enum was initialized with an unknown value.
23187    ///
23188    /// Applications can examine the value using [LanguageFeature::value] or
23189    /// [LanguageFeature::name].
23190    UnknownValue(language_feature::UnknownValue),
23191}
23192
23193#[doc(hidden)]
23194pub mod language_feature {
23195    #[allow(unused_imports)]
23196    use super::*;
23197    #[derive(Clone, Debug, PartialEq)]
23198    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23199}
23200
23201impl LanguageFeature {
23202    /// Gets the enum value.
23203    ///
23204    /// Returns `None` if the enum contains an unknown value deserialized from
23205    /// the string representation of enums.
23206    pub fn value(&self) -> std::option::Option<i32> {
23207        match self {
23208            Self::Unspecified => std::option::Option::Some(0),
23209            Self::Joins => std::option::Option::Some(1),
23210            Self::Stages => std::option::Option::Some(2),
23211            Self::DataTables => std::option::Option::Some(3),
23212            Self::UnknownValue(u) => u.0.value(),
23213        }
23214    }
23215
23216    /// Gets the enum value as a string.
23217    ///
23218    /// Returns `None` if the enum contains an unknown value deserialized from
23219    /// the integer representation of enums.
23220    pub fn name(&self) -> std::option::Option<&str> {
23221        match self {
23222            Self::Unspecified => std::option::Option::Some("LANGUAGE_FEATURE_UNSPECIFIED"),
23223            Self::Joins => std::option::Option::Some("JOINS"),
23224            Self::Stages => std::option::Option::Some("STAGES"),
23225            Self::DataTables => std::option::Option::Some("DATA_TABLES"),
23226            Self::UnknownValue(u) => u.0.name(),
23227        }
23228    }
23229}
23230
23231impl std::default::Default for LanguageFeature {
23232    fn default() -> Self {
23233        use std::convert::From;
23234        Self::from(0)
23235    }
23236}
23237
23238impl std::fmt::Display for LanguageFeature {
23239    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23240        wkt::internal::display_enum(f, self.name(), self.value())
23241    }
23242}
23243
23244impl std::convert::From<i32> for LanguageFeature {
23245    fn from(value: i32) -> Self {
23246        match value {
23247            0 => Self::Unspecified,
23248            1 => Self::Joins,
23249            2 => Self::Stages,
23250            3 => Self::DataTables,
23251            _ => Self::UnknownValue(language_feature::UnknownValue(
23252                wkt::internal::UnknownEnumValue::Integer(value),
23253            )),
23254        }
23255    }
23256}
23257
23258impl std::convert::From<&str> for LanguageFeature {
23259    fn from(value: &str) -> Self {
23260        use std::string::ToString;
23261        match value {
23262            "LANGUAGE_FEATURE_UNSPECIFIED" => Self::Unspecified,
23263            "JOINS" => Self::Joins,
23264            "STAGES" => Self::Stages,
23265            "DATA_TABLES" => Self::DataTables,
23266            _ => Self::UnknownValue(language_feature::UnknownValue(
23267                wkt::internal::UnknownEnumValue::String(value.to_string()),
23268            )),
23269        }
23270    }
23271}
23272
23273impl serde::ser::Serialize for LanguageFeature {
23274    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23275    where
23276        S: serde::Serializer,
23277    {
23278        match self {
23279            Self::Unspecified => serializer.serialize_i32(0),
23280            Self::Joins => serializer.serialize_i32(1),
23281            Self::Stages => serializer.serialize_i32(2),
23282            Self::DataTables => serializer.serialize_i32(3),
23283            Self::UnknownValue(u) => u.0.serialize(serializer),
23284        }
23285    }
23286}
23287
23288impl<'de> serde::de::Deserialize<'de> for LanguageFeature {
23289    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23290    where
23291        D: serde::Deserializer<'de>,
23292    {
23293        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LanguageFeature>::new(
23294            ".google.cloud.chronicle.v1.LanguageFeature",
23295        ))
23296    }
23297}
23298
23299/// Enum for [FilterOperator].
23300///
23301/// # Working with unknown values
23302///
23303/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23304/// additional enum variants at any time. Adding new variants is not considered
23305/// a breaking change. Applications should write their code in anticipation of:
23306///
23307/// - New values appearing in future releases of the client library, **and**
23308/// - New values received dynamically, without application changes.
23309///
23310/// Please consult the [Working with enums] section in the user guide for some
23311/// guidelines.
23312///
23313/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23314#[derive(Clone, Debug, PartialEq)]
23315#[non_exhaustive]
23316pub enum FilterOperator {
23317    /// Default unspecified.
23318    Unspecified,
23319    #[allow(missing_docs)]
23320    Equal,
23321    #[allow(missing_docs)]
23322    NotEqual,
23323    #[allow(missing_docs)]
23324    In,
23325    #[allow(missing_docs)]
23326    GreaterThan,
23327    #[allow(missing_docs)]
23328    GreaterThanOrEqualTo,
23329    #[allow(missing_docs)]
23330    LessThan,
23331    #[allow(missing_docs)]
23332    LessThanOrEqualTo,
23333    #[allow(missing_docs)]
23334    Between,
23335    #[allow(missing_docs)]
23336    Past,
23337    #[allow(missing_docs)]
23338    IsNull,
23339    #[allow(missing_docs)]
23340    IsNotNull,
23341    #[allow(missing_docs)]
23342    StartsWith,
23343    #[allow(missing_docs)]
23344    EndsWith,
23345    #[allow(missing_docs)]
23346    DoesNotStartsWith,
23347    #[allow(missing_docs)]
23348    DoesNotEndsWith,
23349    #[allow(missing_docs)]
23350    NotIn,
23351    /// CONTAINS is used for substring match.
23352    Contains,
23353    /// Used if we want to check if the field does not contain the substring.
23354    DoesNotContain,
23355    /// If set, the enum was initialized with an unknown value.
23356    ///
23357    /// Applications can examine the value using [FilterOperator::value] or
23358    /// [FilterOperator::name].
23359    UnknownValue(filter_operator::UnknownValue),
23360}
23361
23362#[doc(hidden)]
23363pub mod filter_operator {
23364    #[allow(unused_imports)]
23365    use super::*;
23366    #[derive(Clone, Debug, PartialEq)]
23367    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23368}
23369
23370impl FilterOperator {
23371    /// Gets the enum value.
23372    ///
23373    /// Returns `None` if the enum contains an unknown value deserialized from
23374    /// the string representation of enums.
23375    pub fn value(&self) -> std::option::Option<i32> {
23376        match self {
23377            Self::Unspecified => std::option::Option::Some(0),
23378            Self::Equal => std::option::Option::Some(1),
23379            Self::NotEqual => std::option::Option::Some(2),
23380            Self::In => std::option::Option::Some(3),
23381            Self::GreaterThan => std::option::Option::Some(4),
23382            Self::GreaterThanOrEqualTo => std::option::Option::Some(5),
23383            Self::LessThan => std::option::Option::Some(6),
23384            Self::LessThanOrEqualTo => std::option::Option::Some(7),
23385            Self::Between => std::option::Option::Some(8),
23386            Self::Past => std::option::Option::Some(9),
23387            Self::IsNull => std::option::Option::Some(10),
23388            Self::IsNotNull => std::option::Option::Some(11),
23389            Self::StartsWith => std::option::Option::Some(12),
23390            Self::EndsWith => std::option::Option::Some(13),
23391            Self::DoesNotStartsWith => std::option::Option::Some(14),
23392            Self::DoesNotEndsWith => std::option::Option::Some(15),
23393            Self::NotIn => std::option::Option::Some(16),
23394            Self::Contains => std::option::Option::Some(17),
23395            Self::DoesNotContain => std::option::Option::Some(18),
23396            Self::UnknownValue(u) => u.0.value(),
23397        }
23398    }
23399
23400    /// Gets the enum value as a string.
23401    ///
23402    /// Returns `None` if the enum contains an unknown value deserialized from
23403    /// the integer representation of enums.
23404    pub fn name(&self) -> std::option::Option<&str> {
23405        match self {
23406            Self::Unspecified => std::option::Option::Some("FILTER_OPERATOR_UNSPECIFIED"),
23407            Self::Equal => std::option::Option::Some("EQUAL"),
23408            Self::NotEqual => std::option::Option::Some("NOT_EQUAL"),
23409            Self::In => std::option::Option::Some("IN"),
23410            Self::GreaterThan => std::option::Option::Some("GREATER_THAN"),
23411            Self::GreaterThanOrEqualTo => std::option::Option::Some("GREATER_THAN_OR_EQUAL_TO"),
23412            Self::LessThan => std::option::Option::Some("LESS_THAN"),
23413            Self::LessThanOrEqualTo => std::option::Option::Some("LESS_THAN_OR_EQUAL_TO"),
23414            Self::Between => std::option::Option::Some("BETWEEN"),
23415            Self::Past => std::option::Option::Some("PAST"),
23416            Self::IsNull => std::option::Option::Some("IS_NULL"),
23417            Self::IsNotNull => std::option::Option::Some("IS_NOT_NULL"),
23418            Self::StartsWith => std::option::Option::Some("STARTS_WITH"),
23419            Self::EndsWith => std::option::Option::Some("ENDS_WITH"),
23420            Self::DoesNotStartsWith => std::option::Option::Some("DOES_NOT_STARTS_WITH"),
23421            Self::DoesNotEndsWith => std::option::Option::Some("DOES_NOT_ENDS_WITH"),
23422            Self::NotIn => std::option::Option::Some("NOT_IN"),
23423            Self::Contains => std::option::Option::Some("CONTAINS"),
23424            Self::DoesNotContain => std::option::Option::Some("DOES_NOT_CONTAIN"),
23425            Self::UnknownValue(u) => u.0.name(),
23426        }
23427    }
23428}
23429
23430impl std::default::Default for FilterOperator {
23431    fn default() -> Self {
23432        use std::convert::From;
23433        Self::from(0)
23434    }
23435}
23436
23437impl std::fmt::Display for FilterOperator {
23438    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23439        wkt::internal::display_enum(f, self.name(), self.value())
23440    }
23441}
23442
23443impl std::convert::From<i32> for FilterOperator {
23444    fn from(value: i32) -> Self {
23445        match value {
23446            0 => Self::Unspecified,
23447            1 => Self::Equal,
23448            2 => Self::NotEqual,
23449            3 => Self::In,
23450            4 => Self::GreaterThan,
23451            5 => Self::GreaterThanOrEqualTo,
23452            6 => Self::LessThan,
23453            7 => Self::LessThanOrEqualTo,
23454            8 => Self::Between,
23455            9 => Self::Past,
23456            10 => Self::IsNull,
23457            11 => Self::IsNotNull,
23458            12 => Self::StartsWith,
23459            13 => Self::EndsWith,
23460            14 => Self::DoesNotStartsWith,
23461            15 => Self::DoesNotEndsWith,
23462            16 => Self::NotIn,
23463            17 => Self::Contains,
23464            18 => Self::DoesNotContain,
23465            _ => Self::UnknownValue(filter_operator::UnknownValue(
23466                wkt::internal::UnknownEnumValue::Integer(value),
23467            )),
23468        }
23469    }
23470}
23471
23472impl std::convert::From<&str> for FilterOperator {
23473    fn from(value: &str) -> Self {
23474        use std::string::ToString;
23475        match value {
23476            "FILTER_OPERATOR_UNSPECIFIED" => Self::Unspecified,
23477            "EQUAL" => Self::Equal,
23478            "NOT_EQUAL" => Self::NotEqual,
23479            "IN" => Self::In,
23480            "GREATER_THAN" => Self::GreaterThan,
23481            "GREATER_THAN_OR_EQUAL_TO" => Self::GreaterThanOrEqualTo,
23482            "LESS_THAN" => Self::LessThan,
23483            "LESS_THAN_OR_EQUAL_TO" => Self::LessThanOrEqualTo,
23484            "BETWEEN" => Self::Between,
23485            "PAST" => Self::Past,
23486            "IS_NULL" => Self::IsNull,
23487            "IS_NOT_NULL" => Self::IsNotNull,
23488            "STARTS_WITH" => Self::StartsWith,
23489            "ENDS_WITH" => Self::EndsWith,
23490            "DOES_NOT_STARTS_WITH" => Self::DoesNotStartsWith,
23491            "DOES_NOT_ENDS_WITH" => Self::DoesNotEndsWith,
23492            "NOT_IN" => Self::NotIn,
23493            "CONTAINS" => Self::Contains,
23494            "DOES_NOT_CONTAIN" => Self::DoesNotContain,
23495            _ => Self::UnknownValue(filter_operator::UnknownValue(
23496                wkt::internal::UnknownEnumValue::String(value.to_string()),
23497            )),
23498        }
23499    }
23500}
23501
23502impl serde::ser::Serialize for FilterOperator {
23503    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23504    where
23505        S: serde::Serializer,
23506    {
23507        match self {
23508            Self::Unspecified => serializer.serialize_i32(0),
23509            Self::Equal => serializer.serialize_i32(1),
23510            Self::NotEqual => serializer.serialize_i32(2),
23511            Self::In => serializer.serialize_i32(3),
23512            Self::GreaterThan => serializer.serialize_i32(4),
23513            Self::GreaterThanOrEqualTo => serializer.serialize_i32(5),
23514            Self::LessThan => serializer.serialize_i32(6),
23515            Self::LessThanOrEqualTo => serializer.serialize_i32(7),
23516            Self::Between => serializer.serialize_i32(8),
23517            Self::Past => serializer.serialize_i32(9),
23518            Self::IsNull => serializer.serialize_i32(10),
23519            Self::IsNotNull => serializer.serialize_i32(11),
23520            Self::StartsWith => serializer.serialize_i32(12),
23521            Self::EndsWith => serializer.serialize_i32(13),
23522            Self::DoesNotStartsWith => serializer.serialize_i32(14),
23523            Self::DoesNotEndsWith => serializer.serialize_i32(15),
23524            Self::NotIn => serializer.serialize_i32(16),
23525            Self::Contains => serializer.serialize_i32(17),
23526            Self::DoesNotContain => serializer.serialize_i32(18),
23527            Self::UnknownValue(u) => u.0.serialize(serializer),
23528        }
23529    }
23530}
23531
23532impl<'de> serde::de::Deserialize<'de> for FilterOperator {
23533    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23534    where
23535        D: serde::Deserializer<'de>,
23536    {
23537        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FilterOperator>::new(
23538            ".google.cloud.chronicle.v1.FilterOperator",
23539        ))
23540    }
23541}
23542
23543/// LINT.IfChange(data_sources)
23544///
23545/// # Working with unknown values
23546///
23547/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23548/// additional enum variants at any time. Adding new variants is not considered
23549/// a breaking change. Applications should write their code in anticipation of:
23550///
23551/// - New values appearing in future releases of the client library, **and**
23552/// - New values received dynamically, without application changes.
23553///
23554/// Please consult the [Working with enums] section in the user guide for some
23555/// guidelines.
23556///
23557/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23558#[derive(Clone, Debug, PartialEq)]
23559#[non_exhaustive]
23560pub enum DataSource {
23561    #[allow(missing_docs)]
23562    Unspecified,
23563    #[allow(missing_docs)]
23564    Udm,
23565    #[allow(missing_docs)]
23566    Entity,
23567    #[allow(missing_docs)]
23568    IngestionMetrics,
23569    /// RULE_DETECTIONS is used for detections datasource.
23570    RuleDetections,
23571    /// RULESETS is used for ruleset with detections datasource.
23572    Rulesets,
23573    /// GLOBAL is used for standard time range filter.
23574    Global,
23575    /// IOC_MATCHES is used for ioc_matches datasource.
23576    IocMatches,
23577    /// RULES is used for rules datasource.
23578    Rules,
23579    /// SOAR Cases - identified as `case`.
23580    SoarCases,
23581    /// SOAR Playbooks - identified as `playbook`.
23582    SoarPlaybooks,
23583    /// SOAR Case History - identified as `case_history`.
23584    SoarCaseHistory,
23585    /// DATA_TABLE is used for data tables source.
23586    DataTable,
23587    /// INVESTIGATION is used as the data source for triage agent investigations.
23588    /// Identified as `gemini_investigation`.
23589    Investigation,
23590    /// INVESTIGATION_FEEDBACK is used as the data source for user feedback on
23591    /// triage agent investigations. Identified as `gemini_investigation_feedback`.
23592    InvestigationFeedback,
23593    /// If set, the enum was initialized with an unknown value.
23594    ///
23595    /// Applications can examine the value using [DataSource::value] or
23596    /// [DataSource::name].
23597    UnknownValue(data_source::UnknownValue),
23598}
23599
23600#[doc(hidden)]
23601pub mod data_source {
23602    #[allow(unused_imports)]
23603    use super::*;
23604    #[derive(Clone, Debug, PartialEq)]
23605    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23606}
23607
23608impl DataSource {
23609    /// Gets the enum value.
23610    ///
23611    /// Returns `None` if the enum contains an unknown value deserialized from
23612    /// the string representation of enums.
23613    pub fn value(&self) -> std::option::Option<i32> {
23614        match self {
23615            Self::Unspecified => std::option::Option::Some(0),
23616            Self::Udm => std::option::Option::Some(1),
23617            Self::Entity => std::option::Option::Some(2),
23618            Self::IngestionMetrics => std::option::Option::Some(3),
23619            Self::RuleDetections => std::option::Option::Some(4),
23620            Self::Rulesets => std::option::Option::Some(5),
23621            Self::Global => std::option::Option::Some(6),
23622            Self::IocMatches => std::option::Option::Some(7),
23623            Self::Rules => std::option::Option::Some(8),
23624            Self::SoarCases => std::option::Option::Some(9),
23625            Self::SoarPlaybooks => std::option::Option::Some(10),
23626            Self::SoarCaseHistory => std::option::Option::Some(11),
23627            Self::DataTable => std::option::Option::Some(12),
23628            Self::Investigation => std::option::Option::Some(13),
23629            Self::InvestigationFeedback => std::option::Option::Some(14),
23630            Self::UnknownValue(u) => u.0.value(),
23631        }
23632    }
23633
23634    /// Gets the enum value as a string.
23635    ///
23636    /// Returns `None` if the enum contains an unknown value deserialized from
23637    /// the integer representation of enums.
23638    pub fn name(&self) -> std::option::Option<&str> {
23639        match self {
23640            Self::Unspecified => std::option::Option::Some("DATA_SOURCE_UNSPECIFIED"),
23641            Self::Udm => std::option::Option::Some("UDM"),
23642            Self::Entity => std::option::Option::Some("ENTITY"),
23643            Self::IngestionMetrics => std::option::Option::Some("INGESTION_METRICS"),
23644            Self::RuleDetections => std::option::Option::Some("RULE_DETECTIONS"),
23645            Self::Rulesets => std::option::Option::Some("RULESETS"),
23646            Self::Global => std::option::Option::Some("GLOBAL"),
23647            Self::IocMatches => std::option::Option::Some("IOC_MATCHES"),
23648            Self::Rules => std::option::Option::Some("RULES"),
23649            Self::SoarCases => std::option::Option::Some("SOAR_CASES"),
23650            Self::SoarPlaybooks => std::option::Option::Some("SOAR_PLAYBOOKS"),
23651            Self::SoarCaseHistory => std::option::Option::Some("SOAR_CASE_HISTORY"),
23652            Self::DataTable => std::option::Option::Some("DATA_TABLE"),
23653            Self::Investigation => std::option::Option::Some("INVESTIGATION"),
23654            Self::InvestigationFeedback => std::option::Option::Some("INVESTIGATION_FEEDBACK"),
23655            Self::UnknownValue(u) => u.0.name(),
23656        }
23657    }
23658}
23659
23660impl std::default::Default for DataSource {
23661    fn default() -> Self {
23662        use std::convert::From;
23663        Self::from(0)
23664    }
23665}
23666
23667impl std::fmt::Display for DataSource {
23668    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23669        wkt::internal::display_enum(f, self.name(), self.value())
23670    }
23671}
23672
23673impl std::convert::From<i32> for DataSource {
23674    fn from(value: i32) -> Self {
23675        match value {
23676            0 => Self::Unspecified,
23677            1 => Self::Udm,
23678            2 => Self::Entity,
23679            3 => Self::IngestionMetrics,
23680            4 => Self::RuleDetections,
23681            5 => Self::Rulesets,
23682            6 => Self::Global,
23683            7 => Self::IocMatches,
23684            8 => Self::Rules,
23685            9 => Self::SoarCases,
23686            10 => Self::SoarPlaybooks,
23687            11 => Self::SoarCaseHistory,
23688            12 => Self::DataTable,
23689            13 => Self::Investigation,
23690            14 => Self::InvestigationFeedback,
23691            _ => Self::UnknownValue(data_source::UnknownValue(
23692                wkt::internal::UnknownEnumValue::Integer(value),
23693            )),
23694        }
23695    }
23696}
23697
23698impl std::convert::From<&str> for DataSource {
23699    fn from(value: &str) -> Self {
23700        use std::string::ToString;
23701        match value {
23702            "DATA_SOURCE_UNSPECIFIED" => Self::Unspecified,
23703            "UDM" => Self::Udm,
23704            "ENTITY" => Self::Entity,
23705            "INGESTION_METRICS" => Self::IngestionMetrics,
23706            "RULE_DETECTIONS" => Self::RuleDetections,
23707            "RULESETS" => Self::Rulesets,
23708            "GLOBAL" => Self::Global,
23709            "IOC_MATCHES" => Self::IocMatches,
23710            "RULES" => Self::Rules,
23711            "SOAR_CASES" => Self::SoarCases,
23712            "SOAR_PLAYBOOKS" => Self::SoarPlaybooks,
23713            "SOAR_CASE_HISTORY" => Self::SoarCaseHistory,
23714            "DATA_TABLE" => Self::DataTable,
23715            "INVESTIGATION" => Self::Investigation,
23716            "INVESTIGATION_FEEDBACK" => Self::InvestigationFeedback,
23717            _ => Self::UnknownValue(data_source::UnknownValue(
23718                wkt::internal::UnknownEnumValue::String(value.to_string()),
23719            )),
23720        }
23721    }
23722}
23723
23724impl serde::ser::Serialize for DataSource {
23725    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23726    where
23727        S: serde::Serializer,
23728    {
23729        match self {
23730            Self::Unspecified => serializer.serialize_i32(0),
23731            Self::Udm => serializer.serialize_i32(1),
23732            Self::Entity => serializer.serialize_i32(2),
23733            Self::IngestionMetrics => serializer.serialize_i32(3),
23734            Self::RuleDetections => serializer.serialize_i32(4),
23735            Self::Rulesets => serializer.serialize_i32(5),
23736            Self::Global => serializer.serialize_i32(6),
23737            Self::IocMatches => serializer.serialize_i32(7),
23738            Self::Rules => serializer.serialize_i32(8),
23739            Self::SoarCases => serializer.serialize_i32(9),
23740            Self::SoarPlaybooks => serializer.serialize_i32(10),
23741            Self::SoarCaseHistory => serializer.serialize_i32(11),
23742            Self::DataTable => serializer.serialize_i32(12),
23743            Self::Investigation => serializer.serialize_i32(13),
23744            Self::InvestigationFeedback => serializer.serialize_i32(14),
23745            Self::UnknownValue(u) => u.0.serialize(serializer),
23746        }
23747    }
23748}
23749
23750impl<'de> serde::de::Deserialize<'de> for DataSource {
23751    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23752    where
23753        D: serde::Deserializer<'de>,
23754    {
23755        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataSource>::new(
23756            ".google.cloud.chronicle.v1.DataSource",
23757        ))
23758    }
23759}
23760
23761/// TimeUnit supported for PAST filter operator.
23762///
23763/// # Working with unknown values
23764///
23765/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23766/// additional enum variants at any time. Adding new variants is not considered
23767/// a breaking change. Applications should write their code in anticipation of:
23768///
23769/// - New values appearing in future releases of the client library, **and**
23770/// - New values received dynamically, without application changes.
23771///
23772/// Please consult the [Working with enums] section in the user guide for some
23773/// guidelines.
23774///
23775/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23776#[derive(Clone, Debug, PartialEq)]
23777#[non_exhaustive]
23778pub enum TimeUnit {
23779    /// Default unspecified.
23780    Unspecified,
23781    #[allow(missing_docs)]
23782    Second,
23783    #[allow(missing_docs)]
23784    Minute,
23785    #[allow(missing_docs)]
23786    Hour,
23787    #[allow(missing_docs)]
23788    Day,
23789    #[allow(missing_docs)]
23790    Week,
23791    #[allow(missing_docs)]
23792    Month,
23793    #[allow(missing_docs)]
23794    Year,
23795    /// If set, the enum was initialized with an unknown value.
23796    ///
23797    /// Applications can examine the value using [TimeUnit::value] or
23798    /// [TimeUnit::name].
23799    UnknownValue(time_unit::UnknownValue),
23800}
23801
23802#[doc(hidden)]
23803pub mod time_unit {
23804    #[allow(unused_imports)]
23805    use super::*;
23806    #[derive(Clone, Debug, PartialEq)]
23807    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23808}
23809
23810impl TimeUnit {
23811    /// Gets the enum value.
23812    ///
23813    /// Returns `None` if the enum contains an unknown value deserialized from
23814    /// the string representation of enums.
23815    pub fn value(&self) -> std::option::Option<i32> {
23816        match self {
23817            Self::Unspecified => std::option::Option::Some(0),
23818            Self::Second => std::option::Option::Some(1),
23819            Self::Minute => std::option::Option::Some(2),
23820            Self::Hour => std::option::Option::Some(3),
23821            Self::Day => std::option::Option::Some(4),
23822            Self::Week => std::option::Option::Some(5),
23823            Self::Month => std::option::Option::Some(6),
23824            Self::Year => std::option::Option::Some(7),
23825            Self::UnknownValue(u) => u.0.value(),
23826        }
23827    }
23828
23829    /// Gets the enum value as a string.
23830    ///
23831    /// Returns `None` if the enum contains an unknown value deserialized from
23832    /// the integer representation of enums.
23833    pub fn name(&self) -> std::option::Option<&str> {
23834        match self {
23835            Self::Unspecified => std::option::Option::Some("TIME_UNIT_UNSPECIFIED"),
23836            Self::Second => std::option::Option::Some("SECOND"),
23837            Self::Minute => std::option::Option::Some("MINUTE"),
23838            Self::Hour => std::option::Option::Some("HOUR"),
23839            Self::Day => std::option::Option::Some("DAY"),
23840            Self::Week => std::option::Option::Some("WEEK"),
23841            Self::Month => std::option::Option::Some("MONTH"),
23842            Self::Year => std::option::Option::Some("YEAR"),
23843            Self::UnknownValue(u) => u.0.name(),
23844        }
23845    }
23846}
23847
23848impl std::default::Default for TimeUnit {
23849    fn default() -> Self {
23850        use std::convert::From;
23851        Self::from(0)
23852    }
23853}
23854
23855impl std::fmt::Display for TimeUnit {
23856    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23857        wkt::internal::display_enum(f, self.name(), self.value())
23858    }
23859}
23860
23861impl std::convert::From<i32> for TimeUnit {
23862    fn from(value: i32) -> Self {
23863        match value {
23864            0 => Self::Unspecified,
23865            1 => Self::Second,
23866            2 => Self::Minute,
23867            3 => Self::Hour,
23868            4 => Self::Day,
23869            5 => Self::Week,
23870            6 => Self::Month,
23871            7 => Self::Year,
23872            _ => Self::UnknownValue(time_unit::UnknownValue(
23873                wkt::internal::UnknownEnumValue::Integer(value),
23874            )),
23875        }
23876    }
23877}
23878
23879impl std::convert::From<&str> for TimeUnit {
23880    fn from(value: &str) -> Self {
23881        use std::string::ToString;
23882        match value {
23883            "TIME_UNIT_UNSPECIFIED" => Self::Unspecified,
23884            "SECOND" => Self::Second,
23885            "MINUTE" => Self::Minute,
23886            "HOUR" => Self::Hour,
23887            "DAY" => Self::Day,
23888            "WEEK" => Self::Week,
23889            "MONTH" => Self::Month,
23890            "YEAR" => Self::Year,
23891            _ => Self::UnknownValue(time_unit::UnknownValue(
23892                wkt::internal::UnknownEnumValue::String(value.to_string()),
23893            )),
23894        }
23895    }
23896}
23897
23898impl serde::ser::Serialize for TimeUnit {
23899    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23900    where
23901        S: serde::Serializer,
23902    {
23903        match self {
23904            Self::Unspecified => serializer.serialize_i32(0),
23905            Self::Second => serializer.serialize_i32(1),
23906            Self::Minute => serializer.serialize_i32(2),
23907            Self::Hour => serializer.serialize_i32(3),
23908            Self::Day => serializer.serialize_i32(4),
23909            Self::Week => serializer.serialize_i32(5),
23910            Self::Month => serializer.serialize_i32(6),
23911            Self::Year => serializer.serialize_i32(7),
23912            Self::UnknownValue(u) => u.0.serialize(serializer),
23913        }
23914    }
23915}
23916
23917impl<'de> serde::de::Deserialize<'de> for TimeUnit {
23918    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23919    where
23920        D: serde::Deserializer<'de>,
23921    {
23922        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimeUnit>::new(
23923            ".google.cloud.chronicle.v1.TimeUnit",
23924        ))
23925    }
23926}
23927
23928/// DataTableUpdateSource denotes the source that updated the data table.
23929///
23930/// # Working with unknown values
23931///
23932/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23933/// additional enum variants at any time. Adding new variants is not considered
23934/// a breaking change. Applications should write their code in anticipation of:
23935///
23936/// - New values appearing in future releases of the client library, **and**
23937/// - New values received dynamically, without application changes.
23938///
23939/// Please consult the [Working with enums] section in the user guide for some
23940/// guidelines.
23941///
23942/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23943#[derive(Clone, Debug, PartialEq)]
23944#[non_exhaustive]
23945pub enum DataTableUpdateSource {
23946    /// The data table is updated by the user.
23947    Unspecified,
23948    /// The data table is updated by the user.
23949    User,
23950    /// The data table is updated by the rule.
23951    Rule,
23952    /// The data table is updated by the search.
23953    Search,
23954    /// If set, the enum was initialized with an unknown value.
23955    ///
23956    /// Applications can examine the value using [DataTableUpdateSource::value] or
23957    /// [DataTableUpdateSource::name].
23958    UnknownValue(data_table_update_source::UnknownValue),
23959}
23960
23961#[doc(hidden)]
23962pub mod data_table_update_source {
23963    #[allow(unused_imports)]
23964    use super::*;
23965    #[derive(Clone, Debug, PartialEq)]
23966    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23967}
23968
23969impl DataTableUpdateSource {
23970    /// Gets the enum value.
23971    ///
23972    /// Returns `None` if the enum contains an unknown value deserialized from
23973    /// the string representation of enums.
23974    pub fn value(&self) -> std::option::Option<i32> {
23975        match self {
23976            Self::Unspecified => std::option::Option::Some(0),
23977            Self::User => std::option::Option::Some(1),
23978            Self::Rule => std::option::Option::Some(2),
23979            Self::Search => std::option::Option::Some(3),
23980            Self::UnknownValue(u) => u.0.value(),
23981        }
23982    }
23983
23984    /// Gets the enum value as a string.
23985    ///
23986    /// Returns `None` if the enum contains an unknown value deserialized from
23987    /// the integer representation of enums.
23988    pub fn name(&self) -> std::option::Option<&str> {
23989        match self {
23990            Self::Unspecified => std::option::Option::Some("DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED"),
23991            Self::User => std::option::Option::Some("USER"),
23992            Self::Rule => std::option::Option::Some("RULE"),
23993            Self::Search => std::option::Option::Some("SEARCH"),
23994            Self::UnknownValue(u) => u.0.name(),
23995        }
23996    }
23997}
23998
23999impl std::default::Default for DataTableUpdateSource {
24000    fn default() -> Self {
24001        use std::convert::From;
24002        Self::from(0)
24003    }
24004}
24005
24006impl std::fmt::Display for DataTableUpdateSource {
24007    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24008        wkt::internal::display_enum(f, self.name(), self.value())
24009    }
24010}
24011
24012impl std::convert::From<i32> for DataTableUpdateSource {
24013    fn from(value: i32) -> Self {
24014        match value {
24015            0 => Self::Unspecified,
24016            1 => Self::User,
24017            2 => Self::Rule,
24018            3 => Self::Search,
24019            _ => Self::UnknownValue(data_table_update_source::UnknownValue(
24020                wkt::internal::UnknownEnumValue::Integer(value),
24021            )),
24022        }
24023    }
24024}
24025
24026impl std::convert::From<&str> for DataTableUpdateSource {
24027    fn from(value: &str) -> Self {
24028        use std::string::ToString;
24029        match value {
24030            "DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED" => Self::Unspecified,
24031            "USER" => Self::User,
24032            "RULE" => Self::Rule,
24033            "SEARCH" => Self::Search,
24034            _ => Self::UnknownValue(data_table_update_source::UnknownValue(
24035                wkt::internal::UnknownEnumValue::String(value.to_string()),
24036            )),
24037        }
24038    }
24039}
24040
24041impl serde::ser::Serialize for DataTableUpdateSource {
24042    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24043    where
24044        S: serde::Serializer,
24045    {
24046        match self {
24047            Self::Unspecified => serializer.serialize_i32(0),
24048            Self::User => serializer.serialize_i32(1),
24049            Self::Rule => serializer.serialize_i32(2),
24050            Self::Search => serializer.serialize_i32(3),
24051            Self::UnknownValue(u) => u.0.serialize(serializer),
24052        }
24053    }
24054}
24055
24056impl<'de> serde::de::Deserialize<'de> for DataTableUpdateSource {
24057    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24058    where
24059        D: serde::Deserializer<'de>,
24060    {
24061        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataTableUpdateSource>::new(
24062            ".google.cloud.chronicle.v1.DataTableUpdateSource",
24063        ))
24064    }
24065}
24066
24067/// Type of the dashboard.
24068///
24069/// # Working with unknown values
24070///
24071/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24072/// additional enum variants at any time. Adding new variants is not considered
24073/// a breaking change. Applications should write their code in anticipation of:
24074///
24075/// - New values appearing in future releases of the client library, **and**
24076/// - New values received dynamically, without application changes.
24077///
24078/// Please consult the [Working with enums] section in the user guide for some
24079/// guidelines.
24080///
24081/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24082#[derive(Clone, Debug, PartialEq)]
24083#[non_exhaustive]
24084pub enum DashboardType {
24085    /// Default unspecified.
24086    Unspecified,
24087    /// Out of the box curated dashboards provided by Chronicle.
24088    Curated,
24089    /// Private dashboards created by users/customers.
24090    Private,
24091    /// Public dashboards created by users/customers.
24092    Public,
24093    /// Custom dashboards
24094    Custom,
24095    /// Marketplace dashboards
24096    Marketplace,
24097    /// If set, the enum was initialized with an unknown value.
24098    ///
24099    /// Applications can examine the value using [DashboardType::value] or
24100    /// [DashboardType::name].
24101    UnknownValue(dashboard_type::UnknownValue),
24102}
24103
24104#[doc(hidden)]
24105pub mod dashboard_type {
24106    #[allow(unused_imports)]
24107    use super::*;
24108    #[derive(Clone, Debug, PartialEq)]
24109    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24110}
24111
24112impl DashboardType {
24113    /// Gets the enum value.
24114    ///
24115    /// Returns `None` if the enum contains an unknown value deserialized from
24116    /// the string representation of enums.
24117    pub fn value(&self) -> std::option::Option<i32> {
24118        match self {
24119            Self::Unspecified => std::option::Option::Some(0),
24120            Self::Curated => std::option::Option::Some(1),
24121            Self::Private => std::option::Option::Some(2),
24122            Self::Public => std::option::Option::Some(3),
24123            Self::Custom => std::option::Option::Some(4),
24124            Self::Marketplace => std::option::Option::Some(5),
24125            Self::UnknownValue(u) => u.0.value(),
24126        }
24127    }
24128
24129    /// Gets the enum value as a string.
24130    ///
24131    /// Returns `None` if the enum contains an unknown value deserialized from
24132    /// the integer representation of enums.
24133    pub fn name(&self) -> std::option::Option<&str> {
24134        match self {
24135            Self::Unspecified => std::option::Option::Some("DASHBOARD_TYPE_UNSPECIFIED"),
24136            Self::Curated => std::option::Option::Some("CURATED"),
24137            Self::Private => std::option::Option::Some("PRIVATE"),
24138            Self::Public => std::option::Option::Some("PUBLIC"),
24139            Self::Custom => std::option::Option::Some("CUSTOM"),
24140            Self::Marketplace => std::option::Option::Some("MARKETPLACE"),
24141            Self::UnknownValue(u) => u.0.name(),
24142        }
24143    }
24144}
24145
24146impl std::default::Default for DashboardType {
24147    fn default() -> Self {
24148        use std::convert::From;
24149        Self::from(0)
24150    }
24151}
24152
24153impl std::fmt::Display for DashboardType {
24154    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24155        wkt::internal::display_enum(f, self.name(), self.value())
24156    }
24157}
24158
24159impl std::convert::From<i32> for DashboardType {
24160    fn from(value: i32) -> Self {
24161        match value {
24162            0 => Self::Unspecified,
24163            1 => Self::Curated,
24164            2 => Self::Private,
24165            3 => Self::Public,
24166            4 => Self::Custom,
24167            5 => Self::Marketplace,
24168            _ => Self::UnknownValue(dashboard_type::UnknownValue(
24169                wkt::internal::UnknownEnumValue::Integer(value),
24170            )),
24171        }
24172    }
24173}
24174
24175impl std::convert::From<&str> for DashboardType {
24176    fn from(value: &str) -> Self {
24177        use std::string::ToString;
24178        match value {
24179            "DASHBOARD_TYPE_UNSPECIFIED" => Self::Unspecified,
24180            "CURATED" => Self::Curated,
24181            "PRIVATE" => Self::Private,
24182            "PUBLIC" => Self::Public,
24183            "CUSTOM" => Self::Custom,
24184            "MARKETPLACE" => Self::Marketplace,
24185            _ => Self::UnknownValue(dashboard_type::UnknownValue(
24186                wkt::internal::UnknownEnumValue::String(value.to_string()),
24187            )),
24188        }
24189    }
24190}
24191
24192impl serde::ser::Serialize for DashboardType {
24193    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24194    where
24195        S: serde::Serializer,
24196    {
24197        match self {
24198            Self::Unspecified => serializer.serialize_i32(0),
24199            Self::Curated => serializer.serialize_i32(1),
24200            Self::Private => serializer.serialize_i32(2),
24201            Self::Public => serializer.serialize_i32(3),
24202            Self::Custom => serializer.serialize_i32(4),
24203            Self::Marketplace => serializer.serialize_i32(5),
24204            Self::UnknownValue(u) => u.0.serialize(serializer),
24205        }
24206    }
24207}
24208
24209impl<'de> serde::de::Deserialize<'de> for DashboardType {
24210    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24211    where
24212        D: serde::Deserializer<'de>,
24213    {
24214        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DashboardType>::new(
24215            ".google.cloud.chronicle.v1.DashboardType",
24216        ))
24217    }
24218}
24219
24220/// AccessType of the dashboard.
24221///
24222/// # Working with unknown values
24223///
24224/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24225/// additional enum variants at any time. Adding new variants is not considered
24226/// a breaking change. Applications should write their code in anticipation of:
24227///
24228/// - New values appearing in future releases of the client library, **and**
24229/// - New values received dynamically, without application changes.
24230///
24231/// Please consult the [Working with enums] section in the user guide for some
24232/// guidelines.
24233///
24234/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24235#[derive(Clone, Debug, PartialEq)]
24236#[non_exhaustive]
24237pub enum DashboardAccess {
24238    /// Default unspecified.
24239    Unspecified,
24240    /// Private dashboards created by users/customers.
24241    DashboardPrivate,
24242    /// Public dashboards created by users/customers.
24243    DashboardPublic,
24244    /// If set, the enum was initialized with an unknown value.
24245    ///
24246    /// Applications can examine the value using [DashboardAccess::value] or
24247    /// [DashboardAccess::name].
24248    UnknownValue(dashboard_access::UnknownValue),
24249}
24250
24251#[doc(hidden)]
24252pub mod dashboard_access {
24253    #[allow(unused_imports)]
24254    use super::*;
24255    #[derive(Clone, Debug, PartialEq)]
24256    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24257}
24258
24259impl DashboardAccess {
24260    /// Gets the enum value.
24261    ///
24262    /// Returns `None` if the enum contains an unknown value deserialized from
24263    /// the string representation of enums.
24264    pub fn value(&self) -> std::option::Option<i32> {
24265        match self {
24266            Self::Unspecified => std::option::Option::Some(0),
24267            Self::DashboardPrivate => std::option::Option::Some(1),
24268            Self::DashboardPublic => std::option::Option::Some(2),
24269            Self::UnknownValue(u) => u.0.value(),
24270        }
24271    }
24272
24273    /// Gets the enum value as a string.
24274    ///
24275    /// Returns `None` if the enum contains an unknown value deserialized from
24276    /// the integer representation of enums.
24277    pub fn name(&self) -> std::option::Option<&str> {
24278        match self {
24279            Self::Unspecified => std::option::Option::Some("DASHBOARD_ACCESS_UNSPECIFIED"),
24280            Self::DashboardPrivate => std::option::Option::Some("DASHBOARD_PRIVATE"),
24281            Self::DashboardPublic => std::option::Option::Some("DASHBOARD_PUBLIC"),
24282            Self::UnknownValue(u) => u.0.name(),
24283        }
24284    }
24285}
24286
24287impl std::default::Default for DashboardAccess {
24288    fn default() -> Self {
24289        use std::convert::From;
24290        Self::from(0)
24291    }
24292}
24293
24294impl std::fmt::Display for DashboardAccess {
24295    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24296        wkt::internal::display_enum(f, self.name(), self.value())
24297    }
24298}
24299
24300impl std::convert::From<i32> for DashboardAccess {
24301    fn from(value: i32) -> Self {
24302        match value {
24303            0 => Self::Unspecified,
24304            1 => Self::DashboardPrivate,
24305            2 => Self::DashboardPublic,
24306            _ => Self::UnknownValue(dashboard_access::UnknownValue(
24307                wkt::internal::UnknownEnumValue::Integer(value),
24308            )),
24309        }
24310    }
24311}
24312
24313impl std::convert::From<&str> for DashboardAccess {
24314    fn from(value: &str) -> Self {
24315        use std::string::ToString;
24316        match value {
24317            "DASHBOARD_ACCESS_UNSPECIFIED" => Self::Unspecified,
24318            "DASHBOARD_PRIVATE" => Self::DashboardPrivate,
24319            "DASHBOARD_PUBLIC" => Self::DashboardPublic,
24320            _ => Self::UnknownValue(dashboard_access::UnknownValue(
24321                wkt::internal::UnknownEnumValue::String(value.to_string()),
24322            )),
24323        }
24324    }
24325}
24326
24327impl serde::ser::Serialize for DashboardAccess {
24328    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24329    where
24330        S: serde::Serializer,
24331    {
24332        match self {
24333            Self::Unspecified => serializer.serialize_i32(0),
24334            Self::DashboardPrivate => serializer.serialize_i32(1),
24335            Self::DashboardPublic => serializer.serialize_i32(2),
24336            Self::UnknownValue(u) => u.0.serialize(serializer),
24337        }
24338    }
24339}
24340
24341impl<'de> serde::de::Deserialize<'de> for DashboardAccess {
24342    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24343    where
24344        D: serde::Deserializer<'de>,
24345    {
24346        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DashboardAccess>::new(
24347            ".google.cloud.chronicle.v1.DashboardAccess",
24348        ))
24349    }
24350}
24351
24352/// NativeDashboardView indicates the scope of fields to populate when returning
24353/// the dashboard resource.
24354///
24355/// # Working with unknown values
24356///
24357/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24358/// additional enum variants at any time. Adding new variants is not considered
24359/// a breaking change. Applications should write their code in anticipation of:
24360///
24361/// - New values appearing in future releases of the client library, **and**
24362/// - New values received dynamically, without application changes.
24363///
24364/// Please consult the [Working with enums] section in the user guide for some
24365/// guidelines.
24366///
24367/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24368#[derive(Clone, Debug, PartialEq)]
24369#[non_exhaustive]
24370pub enum NativeDashboardView {
24371    /// Defaults to basic.
24372    Unspecified,
24373    /// Include basic metadata about the dashboard without full definition.
24374    Basic,
24375    /// Include everything.
24376    Full,
24377    /// If set, the enum was initialized with an unknown value.
24378    ///
24379    /// Applications can examine the value using [NativeDashboardView::value] or
24380    /// [NativeDashboardView::name].
24381    UnknownValue(native_dashboard_view::UnknownValue),
24382}
24383
24384#[doc(hidden)]
24385pub mod native_dashboard_view {
24386    #[allow(unused_imports)]
24387    use super::*;
24388    #[derive(Clone, Debug, PartialEq)]
24389    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24390}
24391
24392impl NativeDashboardView {
24393    /// Gets the enum value.
24394    ///
24395    /// Returns `None` if the enum contains an unknown value deserialized from
24396    /// the string representation of enums.
24397    pub fn value(&self) -> std::option::Option<i32> {
24398        match self {
24399            Self::Unspecified => std::option::Option::Some(0),
24400            Self::Basic => std::option::Option::Some(1),
24401            Self::Full => std::option::Option::Some(2),
24402            Self::UnknownValue(u) => u.0.value(),
24403        }
24404    }
24405
24406    /// Gets the enum value as a string.
24407    ///
24408    /// Returns `None` if the enum contains an unknown value deserialized from
24409    /// the integer representation of enums.
24410    pub fn name(&self) -> std::option::Option<&str> {
24411        match self {
24412            Self::Unspecified => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_UNSPECIFIED"),
24413            Self::Basic => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_BASIC"),
24414            Self::Full => std::option::Option::Some("NATIVE_DASHBOARD_VIEW_FULL"),
24415            Self::UnknownValue(u) => u.0.name(),
24416        }
24417    }
24418}
24419
24420impl std::default::Default for NativeDashboardView {
24421    fn default() -> Self {
24422        use std::convert::From;
24423        Self::from(0)
24424    }
24425}
24426
24427impl std::fmt::Display for NativeDashboardView {
24428    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24429        wkt::internal::display_enum(f, self.name(), self.value())
24430    }
24431}
24432
24433impl std::convert::From<i32> for NativeDashboardView {
24434    fn from(value: i32) -> Self {
24435        match value {
24436            0 => Self::Unspecified,
24437            1 => Self::Basic,
24438            2 => Self::Full,
24439            _ => Self::UnknownValue(native_dashboard_view::UnknownValue(
24440                wkt::internal::UnknownEnumValue::Integer(value),
24441            )),
24442        }
24443    }
24444}
24445
24446impl std::convert::From<&str> for NativeDashboardView {
24447    fn from(value: &str) -> Self {
24448        use std::string::ToString;
24449        match value {
24450            "NATIVE_DASHBOARD_VIEW_UNSPECIFIED" => Self::Unspecified,
24451            "NATIVE_DASHBOARD_VIEW_BASIC" => Self::Basic,
24452            "NATIVE_DASHBOARD_VIEW_FULL" => Self::Full,
24453            _ => Self::UnknownValue(native_dashboard_view::UnknownValue(
24454                wkt::internal::UnknownEnumValue::String(value.to_string()),
24455            )),
24456        }
24457    }
24458}
24459
24460impl serde::ser::Serialize for NativeDashboardView {
24461    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24462    where
24463        S: serde::Serializer,
24464    {
24465        match self {
24466            Self::Unspecified => serializer.serialize_i32(0),
24467            Self::Basic => serializer.serialize_i32(1),
24468            Self::Full => serializer.serialize_i32(2),
24469            Self::UnknownValue(u) => u.0.serialize(serializer),
24470        }
24471    }
24472}
24473
24474impl<'de> serde::de::Deserialize<'de> for NativeDashboardView {
24475    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24476    where
24477        D: serde::Deserializer<'de>,
24478    {
24479        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NativeDashboardView>::new(
24480            ".google.cloud.chronicle.v1.NativeDashboardView",
24481        ))
24482    }
24483}
24484
24485/// The syntax type indicating how list entries should be validated.
24486///
24487/// # Working with unknown values
24488///
24489/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24490/// additional enum variants at any time. Adding new variants is not considered
24491/// a breaking change. Applications should write their code in anticipation of:
24492///
24493/// - New values appearing in future releases of the client library, **and**
24494/// - New values received dynamically, without application changes.
24495///
24496/// Please consult the [Working with enums] section in the user guide for some
24497/// guidelines.
24498///
24499/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24500#[derive(Clone, Debug, PartialEq)]
24501#[non_exhaustive]
24502pub enum ReferenceListSyntaxType {
24503    /// Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING.
24504    Unspecified,
24505    /// List contains plain text patterns.
24506    PlainTextString,
24507    /// List contains only Regular Expression patterns.
24508    Regex,
24509    /// List contains only CIDR patterns.
24510    Cidr,
24511    /// If set, the enum was initialized with an unknown value.
24512    ///
24513    /// Applications can examine the value using [ReferenceListSyntaxType::value] or
24514    /// [ReferenceListSyntaxType::name].
24515    UnknownValue(reference_list_syntax_type::UnknownValue),
24516}
24517
24518#[doc(hidden)]
24519pub mod reference_list_syntax_type {
24520    #[allow(unused_imports)]
24521    use super::*;
24522    #[derive(Clone, Debug, PartialEq)]
24523    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24524}
24525
24526impl ReferenceListSyntaxType {
24527    /// Gets the enum value.
24528    ///
24529    /// Returns `None` if the enum contains an unknown value deserialized from
24530    /// the string representation of enums.
24531    pub fn value(&self) -> std::option::Option<i32> {
24532        match self {
24533            Self::Unspecified => std::option::Option::Some(0),
24534            Self::PlainTextString => std::option::Option::Some(1),
24535            Self::Regex => std::option::Option::Some(2),
24536            Self::Cidr => std::option::Option::Some(3),
24537            Self::UnknownValue(u) => u.0.value(),
24538        }
24539    }
24540
24541    /// Gets the enum value as a string.
24542    ///
24543    /// Returns `None` if the enum contains an unknown value deserialized from
24544    /// the integer representation of enums.
24545    pub fn name(&self) -> std::option::Option<&str> {
24546        match self {
24547            Self::Unspecified => {
24548                std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED")
24549            }
24550            Self::PlainTextString => {
24551                std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING")
24552            }
24553            Self::Regex => std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_REGEX"),
24554            Self::Cidr => std::option::Option::Some("REFERENCE_LIST_SYNTAX_TYPE_CIDR"),
24555            Self::UnknownValue(u) => u.0.name(),
24556        }
24557    }
24558}
24559
24560impl std::default::Default for ReferenceListSyntaxType {
24561    fn default() -> Self {
24562        use std::convert::From;
24563        Self::from(0)
24564    }
24565}
24566
24567impl std::fmt::Display for ReferenceListSyntaxType {
24568    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24569        wkt::internal::display_enum(f, self.name(), self.value())
24570    }
24571}
24572
24573impl std::convert::From<i32> for ReferenceListSyntaxType {
24574    fn from(value: i32) -> Self {
24575        match value {
24576            0 => Self::Unspecified,
24577            1 => Self::PlainTextString,
24578            2 => Self::Regex,
24579            3 => Self::Cidr,
24580            _ => Self::UnknownValue(reference_list_syntax_type::UnknownValue(
24581                wkt::internal::UnknownEnumValue::Integer(value),
24582            )),
24583        }
24584    }
24585}
24586
24587impl std::convert::From<&str> for ReferenceListSyntaxType {
24588    fn from(value: &str) -> Self {
24589        use std::string::ToString;
24590        match value {
24591            "REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED" => Self::Unspecified,
24592            "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING" => Self::PlainTextString,
24593            "REFERENCE_LIST_SYNTAX_TYPE_REGEX" => Self::Regex,
24594            "REFERENCE_LIST_SYNTAX_TYPE_CIDR" => Self::Cidr,
24595            _ => Self::UnknownValue(reference_list_syntax_type::UnknownValue(
24596                wkt::internal::UnknownEnumValue::String(value.to_string()),
24597            )),
24598        }
24599    }
24600}
24601
24602impl serde::ser::Serialize for ReferenceListSyntaxType {
24603    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24604    where
24605        S: serde::Serializer,
24606    {
24607        match self {
24608            Self::Unspecified => serializer.serialize_i32(0),
24609            Self::PlainTextString => serializer.serialize_i32(1),
24610            Self::Regex => serializer.serialize_i32(2),
24611            Self::Cidr => serializer.serialize_i32(3),
24612            Self::UnknownValue(u) => u.0.serialize(serializer),
24613        }
24614    }
24615}
24616
24617impl<'de> serde::de::Deserialize<'de> for ReferenceListSyntaxType {
24618    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24619    where
24620        D: serde::Deserializer<'de>,
24621    {
24622        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReferenceListSyntaxType>::new(
24623            ".google.cloud.chronicle.v1.ReferenceListSyntaxType",
24624        ))
24625    }
24626}
24627
24628/// ReferenceListView is a mechanism for viewing partial responses of the
24629/// ReferenceList resource.
24630///
24631/// # Working with unknown values
24632///
24633/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24634/// additional enum variants at any time. Adding new variants is not considered
24635/// a breaking change. Applications should write their code in anticipation of:
24636///
24637/// - New values appearing in future releases of the client library, **and**
24638/// - New values received dynamically, without application changes.
24639///
24640/// Please consult the [Working with enums] section in the user guide for some
24641/// guidelines.
24642///
24643/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24644#[derive(Clone, Debug, PartialEq)]
24645#[non_exhaustive]
24646pub enum ReferenceListView {
24647    /// The default / unset value.
24648    /// The API will default to the BASIC view for ListReferenceLists.
24649    /// The API will default to the FULL view for methods that return a single
24650    /// ReferenceList resource.
24651    Unspecified,
24652    /// Include metadata about the ReferenceList.
24653    /// This is the default view for ListReferenceLists.
24654    Basic,
24655    /// Include all details about the ReferenceList: metadata, content lines,
24656    /// associated rule counts. This is the default view for GetReferenceList.
24657    Full,
24658    /// If set, the enum was initialized with an unknown value.
24659    ///
24660    /// Applications can examine the value using [ReferenceListView::value] or
24661    /// [ReferenceListView::name].
24662    UnknownValue(reference_list_view::UnknownValue),
24663}
24664
24665#[doc(hidden)]
24666pub mod reference_list_view {
24667    #[allow(unused_imports)]
24668    use super::*;
24669    #[derive(Clone, Debug, PartialEq)]
24670    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24671}
24672
24673impl ReferenceListView {
24674    /// Gets the enum value.
24675    ///
24676    /// Returns `None` if the enum contains an unknown value deserialized from
24677    /// the string representation of enums.
24678    pub fn value(&self) -> std::option::Option<i32> {
24679        match self {
24680            Self::Unspecified => std::option::Option::Some(0),
24681            Self::Basic => std::option::Option::Some(1),
24682            Self::Full => std::option::Option::Some(2),
24683            Self::UnknownValue(u) => u.0.value(),
24684        }
24685    }
24686
24687    /// Gets the enum value as a string.
24688    ///
24689    /// Returns `None` if the enum contains an unknown value deserialized from
24690    /// the integer representation of enums.
24691    pub fn name(&self) -> std::option::Option<&str> {
24692        match self {
24693            Self::Unspecified => std::option::Option::Some("REFERENCE_LIST_VIEW_UNSPECIFIED"),
24694            Self::Basic => std::option::Option::Some("REFERENCE_LIST_VIEW_BASIC"),
24695            Self::Full => std::option::Option::Some("REFERENCE_LIST_VIEW_FULL"),
24696            Self::UnknownValue(u) => u.0.name(),
24697        }
24698    }
24699}
24700
24701impl std::default::Default for ReferenceListView {
24702    fn default() -> Self {
24703        use std::convert::From;
24704        Self::from(0)
24705    }
24706}
24707
24708impl std::fmt::Display for ReferenceListView {
24709    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24710        wkt::internal::display_enum(f, self.name(), self.value())
24711    }
24712}
24713
24714impl std::convert::From<i32> for ReferenceListView {
24715    fn from(value: i32) -> Self {
24716        match value {
24717            0 => Self::Unspecified,
24718            1 => Self::Basic,
24719            2 => Self::Full,
24720            _ => Self::UnknownValue(reference_list_view::UnknownValue(
24721                wkt::internal::UnknownEnumValue::Integer(value),
24722            )),
24723        }
24724    }
24725}
24726
24727impl std::convert::From<&str> for ReferenceListView {
24728    fn from(value: &str) -> Self {
24729        use std::string::ToString;
24730        match value {
24731            "REFERENCE_LIST_VIEW_UNSPECIFIED" => Self::Unspecified,
24732            "REFERENCE_LIST_VIEW_BASIC" => Self::Basic,
24733            "REFERENCE_LIST_VIEW_FULL" => Self::Full,
24734            _ => Self::UnknownValue(reference_list_view::UnknownValue(
24735                wkt::internal::UnknownEnumValue::String(value.to_string()),
24736            )),
24737        }
24738    }
24739}
24740
24741impl serde::ser::Serialize for ReferenceListView {
24742    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24743    where
24744        S: serde::Serializer,
24745    {
24746        match self {
24747            Self::Unspecified => serializer.serialize_i32(0),
24748            Self::Basic => serializer.serialize_i32(1),
24749            Self::Full => serializer.serialize_i32(2),
24750            Self::UnknownValue(u) => u.0.serialize(serializer),
24751        }
24752    }
24753}
24754
24755impl<'de> serde::de::Deserialize<'de> for ReferenceListView {
24756    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24757    where
24758        D: serde::Deserializer<'de>,
24759    {
24760        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReferenceListView>::new(
24761            ".google.cloud.chronicle.v1.ReferenceListView",
24762        ))
24763    }
24764}
24765
24766/// RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if
24767/// enabled.
24768///
24769/// # Working with unknown values
24770///
24771/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24772/// additional enum variants at any time. Adding new variants is not considered
24773/// a breaking change. Applications should write their code in anticipation of:
24774///
24775/// - New values appearing in future releases of the client library, **and**
24776/// - New values received dynamically, without application changes.
24777///
24778/// Please consult the [Working with enums] section in the user guide for some
24779/// guidelines.
24780///
24781/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24782#[derive(Clone, Debug, PartialEq)]
24783#[non_exhaustive]
24784pub enum RunFrequency {
24785    /// The run frequency is unspecified/unknown.
24786    Unspecified,
24787    /// Executes in real time.
24788    Live,
24789    /// Executes once per hour.
24790    Hourly,
24791    /// Executes once per day.
24792    Daily,
24793    /// If set, the enum was initialized with an unknown value.
24794    ///
24795    /// Applications can examine the value using [RunFrequency::value] or
24796    /// [RunFrequency::name].
24797    UnknownValue(run_frequency::UnknownValue),
24798}
24799
24800#[doc(hidden)]
24801pub mod run_frequency {
24802    #[allow(unused_imports)]
24803    use super::*;
24804    #[derive(Clone, Debug, PartialEq)]
24805    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24806}
24807
24808impl RunFrequency {
24809    /// Gets the enum value.
24810    ///
24811    /// Returns `None` if the enum contains an unknown value deserialized from
24812    /// the string representation of enums.
24813    pub fn value(&self) -> std::option::Option<i32> {
24814        match self {
24815            Self::Unspecified => std::option::Option::Some(0),
24816            Self::Live => std::option::Option::Some(1),
24817            Self::Hourly => std::option::Option::Some(2),
24818            Self::Daily => std::option::Option::Some(3),
24819            Self::UnknownValue(u) => u.0.value(),
24820        }
24821    }
24822
24823    /// Gets the enum value as a string.
24824    ///
24825    /// Returns `None` if the enum contains an unknown value deserialized from
24826    /// the integer representation of enums.
24827    pub fn name(&self) -> std::option::Option<&str> {
24828        match self {
24829            Self::Unspecified => std::option::Option::Some("RUN_FREQUENCY_UNSPECIFIED"),
24830            Self::Live => std::option::Option::Some("LIVE"),
24831            Self::Hourly => std::option::Option::Some("HOURLY"),
24832            Self::Daily => std::option::Option::Some("DAILY"),
24833            Self::UnknownValue(u) => u.0.name(),
24834        }
24835    }
24836}
24837
24838impl std::default::Default for RunFrequency {
24839    fn default() -> Self {
24840        use std::convert::From;
24841        Self::from(0)
24842    }
24843}
24844
24845impl std::fmt::Display for RunFrequency {
24846    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24847        wkt::internal::display_enum(f, self.name(), self.value())
24848    }
24849}
24850
24851impl std::convert::From<i32> for RunFrequency {
24852    fn from(value: i32) -> Self {
24853        match value {
24854            0 => Self::Unspecified,
24855            1 => Self::Live,
24856            2 => Self::Hourly,
24857            3 => Self::Daily,
24858            _ => Self::UnknownValue(run_frequency::UnknownValue(
24859                wkt::internal::UnknownEnumValue::Integer(value),
24860            )),
24861        }
24862    }
24863}
24864
24865impl std::convert::From<&str> for RunFrequency {
24866    fn from(value: &str) -> Self {
24867        use std::string::ToString;
24868        match value {
24869            "RUN_FREQUENCY_UNSPECIFIED" => Self::Unspecified,
24870            "LIVE" => Self::Live,
24871            "HOURLY" => Self::Hourly,
24872            "DAILY" => Self::Daily,
24873            _ => Self::UnknownValue(run_frequency::UnknownValue(
24874                wkt::internal::UnknownEnumValue::String(value.to_string()),
24875            )),
24876        }
24877    }
24878}
24879
24880impl serde::ser::Serialize for RunFrequency {
24881    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24882    where
24883        S: serde::Serializer,
24884    {
24885        match self {
24886            Self::Unspecified => serializer.serialize_i32(0),
24887            Self::Live => serializer.serialize_i32(1),
24888            Self::Hourly => serializer.serialize_i32(2),
24889            Self::Daily => serializer.serialize_i32(3),
24890            Self::UnknownValue(u) => u.0.serialize(serializer),
24891        }
24892    }
24893}
24894
24895impl<'de> serde::de::Deserialize<'de> for RunFrequency {
24896    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24897    where
24898        D: serde::Deserializer<'de>,
24899    {
24900        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RunFrequency>::new(
24901            ".google.cloud.chronicle.v1.RunFrequency",
24902        ))
24903    }
24904}
24905
24906/// RuleType indicates the YARA-L rule type of user-created and Google Cloud
24907/// Threat Intelligence (GCTI) authored rules.
24908///
24909/// # Working with unknown values
24910///
24911/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24912/// additional enum variants at any time. Adding new variants is not considered
24913/// a breaking change. Applications should write their code in anticipation of:
24914///
24915/// - New values appearing in future releases of the client library, **and**
24916/// - New values received dynamically, without application changes.
24917///
24918/// Please consult the [Working with enums] section in the user guide for some
24919/// guidelines.
24920///
24921/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24922#[derive(Clone, Debug, PartialEq)]
24923#[non_exhaustive]
24924pub enum RuleType {
24925    /// The rule type is unspecified/unknown.
24926    Unspecified,
24927    /// Rule checks for the existence of a single event.
24928    SingleEvent,
24929    /// Rule checks for correlation between multiple events
24930    MultiEvent,
24931    /// If set, the enum was initialized with an unknown value.
24932    ///
24933    /// Applications can examine the value using [RuleType::value] or
24934    /// [RuleType::name].
24935    UnknownValue(rule_type::UnknownValue),
24936}
24937
24938#[doc(hidden)]
24939pub mod rule_type {
24940    #[allow(unused_imports)]
24941    use super::*;
24942    #[derive(Clone, Debug, PartialEq)]
24943    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24944}
24945
24946impl RuleType {
24947    /// Gets the enum value.
24948    ///
24949    /// Returns `None` if the enum contains an unknown value deserialized from
24950    /// the string representation of enums.
24951    pub fn value(&self) -> std::option::Option<i32> {
24952        match self {
24953            Self::Unspecified => std::option::Option::Some(0),
24954            Self::SingleEvent => std::option::Option::Some(1),
24955            Self::MultiEvent => std::option::Option::Some(2),
24956            Self::UnknownValue(u) => u.0.value(),
24957        }
24958    }
24959
24960    /// Gets the enum value as a string.
24961    ///
24962    /// Returns `None` if the enum contains an unknown value deserialized from
24963    /// the integer representation of enums.
24964    pub fn name(&self) -> std::option::Option<&str> {
24965        match self {
24966            Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
24967            Self::SingleEvent => std::option::Option::Some("SINGLE_EVENT"),
24968            Self::MultiEvent => std::option::Option::Some("MULTI_EVENT"),
24969            Self::UnknownValue(u) => u.0.name(),
24970        }
24971    }
24972}
24973
24974impl std::default::Default for RuleType {
24975    fn default() -> Self {
24976        use std::convert::From;
24977        Self::from(0)
24978    }
24979}
24980
24981impl std::fmt::Display for RuleType {
24982    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24983        wkt::internal::display_enum(f, self.name(), self.value())
24984    }
24985}
24986
24987impl std::convert::From<i32> for RuleType {
24988    fn from(value: i32) -> Self {
24989        match value {
24990            0 => Self::Unspecified,
24991            1 => Self::SingleEvent,
24992            2 => Self::MultiEvent,
24993            _ => Self::UnknownValue(rule_type::UnknownValue(
24994                wkt::internal::UnknownEnumValue::Integer(value),
24995            )),
24996        }
24997    }
24998}
24999
25000impl std::convert::From<&str> for RuleType {
25001    fn from(value: &str) -> Self {
25002        use std::string::ToString;
25003        match value {
25004            "RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
25005            "SINGLE_EVENT" => Self::SingleEvent,
25006            "MULTI_EVENT" => Self::MultiEvent,
25007            _ => Self::UnknownValue(rule_type::UnknownValue(
25008                wkt::internal::UnknownEnumValue::String(value.to_string()),
25009            )),
25010        }
25011    }
25012}
25013
25014impl serde::ser::Serialize for RuleType {
25015    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25016    where
25017        S: serde::Serializer,
25018    {
25019        match self {
25020            Self::Unspecified => serializer.serialize_i32(0),
25021            Self::SingleEvent => serializer.serialize_i32(1),
25022            Self::MultiEvent => serializer.serialize_i32(2),
25023            Self::UnknownValue(u) => u.0.serialize(serializer),
25024        }
25025    }
25026}
25027
25028impl<'de> serde::de::Deserialize<'de> for RuleType {
25029    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25030    where
25031        D: serde::Deserializer<'de>,
25032    {
25033        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
25034            ".google.cloud.chronicle.v1.RuleType",
25035        ))
25036    }
25037}
25038
25039/// RuleView indicates the scope of fields to populate when returning the Rule
25040/// resource.
25041///
25042/// # Working with unknown values
25043///
25044/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25045/// additional enum variants at any time. Adding new variants is not considered
25046/// a breaking change. Applications should write their code in anticipation of:
25047///
25048/// - New values appearing in future releases of the client library, **and**
25049/// - New values received dynamically, without application changes.
25050///
25051/// Please consult the [Working with enums] section in the user guide for some
25052/// guidelines.
25053///
25054/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
25055#[derive(Clone, Debug, PartialEq)]
25056#[non_exhaustive]
25057pub enum RuleView {
25058    /// The default/unset value.
25059    /// The API will default to the BASIC view for ListRules/ListRuleRevisions.
25060    /// The API will default to the FULL view for GetRule.
25061    Unspecified,
25062    /// Include basic metadata about the rule, but not the full contents.
25063    /// Returned fields include: revision_id, revision_create_time, display_name,
25064    /// author, severity, type, allowed_run_frequency,
25065    /// near_real_time_live_rule_eligible, etag, and scope.
25066    /// This is the default value for ListRules and ListRuleRevisions.
25067    Basic,
25068    /// Include all fields.
25069    /// This is the default value for GetRule.
25070    Full,
25071    /// Include basic metadata about the rule's revision only.
25072    /// Returned fields include: revision_id and revision_create_time.
25073    RevisionMetadataOnly,
25074    /// If set, the enum was initialized with an unknown value.
25075    ///
25076    /// Applications can examine the value using [RuleView::value] or
25077    /// [RuleView::name].
25078    UnknownValue(rule_view::UnknownValue),
25079}
25080
25081#[doc(hidden)]
25082pub mod rule_view {
25083    #[allow(unused_imports)]
25084    use super::*;
25085    #[derive(Clone, Debug, PartialEq)]
25086    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25087}
25088
25089impl RuleView {
25090    /// Gets the enum value.
25091    ///
25092    /// Returns `None` if the enum contains an unknown value deserialized from
25093    /// the string representation of enums.
25094    pub fn value(&self) -> std::option::Option<i32> {
25095        match self {
25096            Self::Unspecified => std::option::Option::Some(0),
25097            Self::Basic => std::option::Option::Some(1),
25098            Self::Full => std::option::Option::Some(2),
25099            Self::RevisionMetadataOnly => std::option::Option::Some(3),
25100            Self::UnknownValue(u) => u.0.value(),
25101        }
25102    }
25103
25104    /// Gets the enum value as a string.
25105    ///
25106    /// Returns `None` if the enum contains an unknown value deserialized from
25107    /// the integer representation of enums.
25108    pub fn name(&self) -> std::option::Option<&str> {
25109        match self {
25110            Self::Unspecified => std::option::Option::Some("RULE_VIEW_UNSPECIFIED"),
25111            Self::Basic => std::option::Option::Some("BASIC"),
25112            Self::Full => std::option::Option::Some("FULL"),
25113            Self::RevisionMetadataOnly => std::option::Option::Some("REVISION_METADATA_ONLY"),
25114            Self::UnknownValue(u) => u.0.name(),
25115        }
25116    }
25117}
25118
25119impl std::default::Default for RuleView {
25120    fn default() -> Self {
25121        use std::convert::From;
25122        Self::from(0)
25123    }
25124}
25125
25126impl std::fmt::Display for RuleView {
25127    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25128        wkt::internal::display_enum(f, self.name(), self.value())
25129    }
25130}
25131
25132impl std::convert::From<i32> for RuleView {
25133    fn from(value: i32) -> Self {
25134        match value {
25135            0 => Self::Unspecified,
25136            1 => Self::Basic,
25137            2 => Self::Full,
25138            3 => Self::RevisionMetadataOnly,
25139            _ => Self::UnknownValue(rule_view::UnknownValue(
25140                wkt::internal::UnknownEnumValue::Integer(value),
25141            )),
25142        }
25143    }
25144}
25145
25146impl std::convert::From<&str> for RuleView {
25147    fn from(value: &str) -> Self {
25148        use std::string::ToString;
25149        match value {
25150            "RULE_VIEW_UNSPECIFIED" => Self::Unspecified,
25151            "BASIC" => Self::Basic,
25152            "FULL" => Self::Full,
25153            "REVISION_METADATA_ONLY" => Self::RevisionMetadataOnly,
25154            _ => Self::UnknownValue(rule_view::UnknownValue(
25155                wkt::internal::UnknownEnumValue::String(value.to_string()),
25156            )),
25157        }
25158    }
25159}
25160
25161impl serde::ser::Serialize for RuleView {
25162    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25163    where
25164        S: serde::Serializer,
25165    {
25166        match self {
25167            Self::Unspecified => serializer.serialize_i32(0),
25168            Self::Basic => serializer.serialize_i32(1),
25169            Self::Full => serializer.serialize_i32(2),
25170            Self::RevisionMetadataOnly => serializer.serialize_i32(3),
25171            Self::UnknownValue(u) => u.0.serialize(serializer),
25172        }
25173    }
25174}
25175
25176impl<'de> serde::de::Deserialize<'de> for RuleView {
25177    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25178    where
25179        D: serde::Deserializer<'de>,
25180    {
25181        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleView>::new(
25182            ".google.cloud.chronicle.v1.RuleView",
25183        ))
25184    }
25185}