Skip to main content

google_cloud_securitycenter_v2/
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::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_iam_v1;
27extern crate google_cloud_longrunning;
28extern crate google_cloud_lro;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// Represents an access event.
41#[derive(Clone, Default, PartialEq)]
42#[non_exhaustive]
43pub struct Access {
44    /// Associated email, such as "foo@google.com".
45    ///
46    /// The email address of the authenticated user or a service account acting on
47    /// behalf of a third party principal making the request. For third party
48    /// identity callers, the `principal_subject` field is populated instead of
49    /// this field. For privacy reasons, the principal email address is sometimes
50    /// redacted. For more information, see [Caller identities in audit
51    /// logs](https://cloud.google.com/logging/docs/audit#user-id).
52    pub principal_email: std::string::String,
53
54    /// Caller's IP address, such as "1.1.1.1".
55    pub caller_ip: std::string::String,
56
57    /// The caller IP's geolocation, which identifies where the call came from.
58    pub caller_ip_geo: std::option::Option<crate::model::Geolocation>,
59
60    /// Type of user agent associated with the finding. For example, an operating
61    /// system shell or an embedded or standalone application.
62    pub user_agent_family: std::string::String,
63
64    /// The caller's user agent string associated with the finding.
65    pub user_agent: std::string::String,
66
67    /// This is the API service that the service account made a call to, e.g.
68    /// "iam.googleapis.com"
69    pub service_name: std::string::String,
70
71    /// The method that the service account called, e.g. "SetIamPolicy".
72    pub method_name: std::string::String,
73
74    /// A string that represents the principal_subject that is associated with the
75    /// identity. Unlike `principal_email`, `principal_subject` supports principals
76    /// that aren't associated with email addresses, such as third party
77    /// principals. For most identities, the format is
78    /// `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
79    /// Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
80    /// still use the legacy format `serviceAccount:{identity pool
81    /// name}[{subject}]`.
82    pub principal_subject: std::string::String,
83
84    /// The name of the service account key that was used to create or exchange
85    /// credentials when authenticating the service account that made the request.
86    /// This is a scheme-less URI full resource name. For example:
87    ///
88    /// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
89    pub service_account_key_name: std::string::String,
90
91    /// The identity delegation history of an authenticated service account that
92    /// made the request. The `serviceAccountDelegationInfo[]` object contains
93    /// information about the real authorities that try to access Google Cloud
94    /// resources by delegating on a service account. When multiple authorities are
95    /// present, they are guaranteed to be sorted based on the original ordering of
96    /// the identity delegation events.
97    pub service_account_delegation_info: std::vec::Vec<crate::model::ServiceAccountDelegationInfo>,
98
99    /// A string that represents a username. The username provided depends on the
100    /// type of the finding and is likely not an IAM principal. For example, this
101    /// can be a system username if the finding is related to a virtual machine, or
102    /// it can be an application login username.
103    pub user_name: std::string::String,
104
105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106}
107
108impl Access {
109    /// Creates a new default instance.
110    pub fn new() -> Self {
111        std::default::Default::default()
112    }
113
114    /// Sets the value of [principal_email][crate::model::Access::principal_email].
115    ///
116    /// # Example
117    /// ```ignore,no_run
118    /// # use google_cloud_securitycenter_v2::model::Access;
119    /// let x = Access::new().set_principal_email("example");
120    /// ```
121    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
122        self.principal_email = v.into();
123        self
124    }
125
126    /// Sets the value of [caller_ip][crate::model::Access::caller_ip].
127    ///
128    /// # Example
129    /// ```ignore,no_run
130    /// # use google_cloud_securitycenter_v2::model::Access;
131    /// let x = Access::new().set_caller_ip("example");
132    /// ```
133    pub fn set_caller_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
134        self.caller_ip = v.into();
135        self
136    }
137
138    /// Sets the value of [caller_ip_geo][crate::model::Access::caller_ip_geo].
139    ///
140    /// # Example
141    /// ```ignore,no_run
142    /// # use google_cloud_securitycenter_v2::model::Access;
143    /// use google_cloud_securitycenter_v2::model::Geolocation;
144    /// let x = Access::new().set_caller_ip_geo(Geolocation::default()/* use setters */);
145    /// ```
146    pub fn set_caller_ip_geo<T>(mut self, v: T) -> Self
147    where
148        T: std::convert::Into<crate::model::Geolocation>,
149    {
150        self.caller_ip_geo = std::option::Option::Some(v.into());
151        self
152    }
153
154    /// Sets or clears the value of [caller_ip_geo][crate::model::Access::caller_ip_geo].
155    ///
156    /// # Example
157    /// ```ignore,no_run
158    /// # use google_cloud_securitycenter_v2::model::Access;
159    /// use google_cloud_securitycenter_v2::model::Geolocation;
160    /// let x = Access::new().set_or_clear_caller_ip_geo(Some(Geolocation::default()/* use setters */));
161    /// let x = Access::new().set_or_clear_caller_ip_geo(None::<Geolocation>);
162    /// ```
163    pub fn set_or_clear_caller_ip_geo<T>(mut self, v: std::option::Option<T>) -> Self
164    where
165        T: std::convert::Into<crate::model::Geolocation>,
166    {
167        self.caller_ip_geo = v.map(|x| x.into());
168        self
169    }
170
171    /// Sets the value of [user_agent_family][crate::model::Access::user_agent_family].
172    ///
173    /// # Example
174    /// ```ignore,no_run
175    /// # use google_cloud_securitycenter_v2::model::Access;
176    /// let x = Access::new().set_user_agent_family("example");
177    /// ```
178    pub fn set_user_agent_family<T: std::convert::Into<std::string::String>>(
179        mut self,
180        v: T,
181    ) -> Self {
182        self.user_agent_family = v.into();
183        self
184    }
185
186    /// Sets the value of [user_agent][crate::model::Access::user_agent].
187    ///
188    /// # Example
189    /// ```ignore,no_run
190    /// # use google_cloud_securitycenter_v2::model::Access;
191    /// let x = Access::new().set_user_agent("example");
192    /// ```
193    pub fn set_user_agent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
194        self.user_agent = v.into();
195        self
196    }
197
198    /// Sets the value of [service_name][crate::model::Access::service_name].
199    ///
200    /// # Example
201    /// ```ignore,no_run
202    /// # use google_cloud_securitycenter_v2::model::Access;
203    /// let x = Access::new().set_service_name("example");
204    /// ```
205    pub fn set_service_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
206        self.service_name = v.into();
207        self
208    }
209
210    /// Sets the value of [method_name][crate::model::Access::method_name].
211    ///
212    /// # Example
213    /// ```ignore,no_run
214    /// # use google_cloud_securitycenter_v2::model::Access;
215    /// let x = Access::new().set_method_name("example");
216    /// ```
217    pub fn set_method_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
218        self.method_name = v.into();
219        self
220    }
221
222    /// Sets the value of [principal_subject][crate::model::Access::principal_subject].
223    ///
224    /// # Example
225    /// ```ignore,no_run
226    /// # use google_cloud_securitycenter_v2::model::Access;
227    /// let x = Access::new().set_principal_subject("example");
228    /// ```
229    pub fn set_principal_subject<T: std::convert::Into<std::string::String>>(
230        mut self,
231        v: T,
232    ) -> Self {
233        self.principal_subject = v.into();
234        self
235    }
236
237    /// Sets the value of [service_account_key_name][crate::model::Access::service_account_key_name].
238    ///
239    /// # Example
240    /// ```ignore,no_run
241    /// # use google_cloud_securitycenter_v2::model::Access;
242    /// let x = Access::new().set_service_account_key_name("example");
243    /// ```
244    pub fn set_service_account_key_name<T: std::convert::Into<std::string::String>>(
245        mut self,
246        v: T,
247    ) -> Self {
248        self.service_account_key_name = v.into();
249        self
250    }
251
252    /// Sets the value of [service_account_delegation_info][crate::model::Access::service_account_delegation_info].
253    ///
254    /// # Example
255    /// ```ignore,no_run
256    /// # use google_cloud_securitycenter_v2::model::Access;
257    /// use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
258    /// let x = Access::new()
259    ///     .set_service_account_delegation_info([
260    ///         ServiceAccountDelegationInfo::default()/* use setters */,
261    ///         ServiceAccountDelegationInfo::default()/* use (different) setters */,
262    ///     ]);
263    /// ```
264    pub fn set_service_account_delegation_info<T, V>(mut self, v: T) -> Self
265    where
266        T: std::iter::IntoIterator<Item = V>,
267        V: std::convert::Into<crate::model::ServiceAccountDelegationInfo>,
268    {
269        use std::iter::Iterator;
270        self.service_account_delegation_info = v.into_iter().map(|i| i.into()).collect();
271        self
272    }
273
274    /// Sets the value of [user_name][crate::model::Access::user_name].
275    ///
276    /// # Example
277    /// ```ignore,no_run
278    /// # use google_cloud_securitycenter_v2::model::Access;
279    /// let x = Access::new().set_user_name("example");
280    /// ```
281    pub fn set_user_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
282        self.user_name = v.into();
283        self
284    }
285}
286
287impl wkt::message::Message for Access {
288    fn typename() -> &'static str {
289        "type.googleapis.com/google.cloud.securitycenter.v2.Access"
290    }
291}
292
293/// Identity delegation history of an authenticated service account.
294#[derive(Clone, Default, PartialEq)]
295#[non_exhaustive]
296pub struct ServiceAccountDelegationInfo {
297    /// The email address of a Google account.
298    pub principal_email: std::string::String,
299
300    /// A string representing the principal_subject associated with the identity.
301    /// As compared to `principal_email`, supports principals that aren't
302    /// associated with email addresses, such as third party principals. For most
303    /// identities, the format will be `principal://iam.googleapis.com/{identity
304    /// pool name}/subjects/{subject}` except for some GKE identities
305    /// (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy
306    /// format `serviceAccount:{identity pool name}[{subject}]`
307    pub principal_subject: std::string::String,
308
309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
310}
311
312impl ServiceAccountDelegationInfo {
313    /// Creates a new default instance.
314    pub fn new() -> Self {
315        std::default::Default::default()
316    }
317
318    /// Sets the value of [principal_email][crate::model::ServiceAccountDelegationInfo::principal_email].
319    ///
320    /// # Example
321    /// ```ignore,no_run
322    /// # use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
323    /// let x = ServiceAccountDelegationInfo::new().set_principal_email("example");
324    /// ```
325    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
326        self.principal_email = v.into();
327        self
328    }
329
330    /// Sets the value of [principal_subject][crate::model::ServiceAccountDelegationInfo::principal_subject].
331    ///
332    /// # Example
333    /// ```ignore,no_run
334    /// # use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
335    /// let x = ServiceAccountDelegationInfo::new().set_principal_subject("example");
336    /// ```
337    pub fn set_principal_subject<T: std::convert::Into<std::string::String>>(
338        mut self,
339        v: T,
340    ) -> Self {
341        self.principal_subject = v.into();
342        self
343    }
344}
345
346impl wkt::message::Message for ServiceAccountDelegationInfo {
347    fn typename() -> &'static str {
348        "type.googleapis.com/google.cloud.securitycenter.v2.ServiceAccountDelegationInfo"
349    }
350}
351
352/// Represents a geographical location for a given access.
353#[derive(Clone, Default, PartialEq)]
354#[non_exhaustive]
355pub struct Geolocation {
356    /// A CLDR.
357    pub region_code: std::string::String,
358
359    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
360}
361
362impl Geolocation {
363    /// Creates a new default instance.
364    pub fn new() -> Self {
365        std::default::Default::default()
366    }
367
368    /// Sets the value of [region_code][crate::model::Geolocation::region_code].
369    ///
370    /// # Example
371    /// ```ignore,no_run
372    /// # use google_cloud_securitycenter_v2::model::Geolocation;
373    /// let x = Geolocation::new().set_region_code("example");
374    /// ```
375    pub fn set_region_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
376        self.region_code = v.into();
377        self
378    }
379}
380
381impl wkt::message::Message for Geolocation {
382    fn typename() -> &'static str {
383        "type.googleapis.com/google.cloud.securitycenter.v2.Geolocation"
384    }
385}
386
387/// Details about resources affected by this finding.
388#[derive(Clone, Default, PartialEq)]
389#[non_exhaustive]
390pub struct AffectedResources {
391    /// The count of resources affected by the finding.
392    pub count: i64,
393
394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
395}
396
397impl AffectedResources {
398    /// Creates a new default instance.
399    pub fn new() -> Self {
400        std::default::Default::default()
401    }
402
403    /// Sets the value of [count][crate::model::AffectedResources::count].
404    ///
405    /// # Example
406    /// ```ignore,no_run
407    /// # use google_cloud_securitycenter_v2::model::AffectedResources;
408    /// let x = AffectedResources::new().set_count(42);
409    /// ```
410    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
411        self.count = v.into();
412        self
413    }
414}
415
416impl wkt::message::Message for AffectedResources {
417    fn typename() -> &'static str {
418        "type.googleapis.com/google.cloud.securitycenter.v2.AffectedResources"
419    }
420}
421
422/// Represents a monitored AI Agent.
423#[derive(Clone, Default, PartialEq)]
424#[non_exhaustive]
425pub struct Agent {
426    /// Identifier of the agent.
427    pub id: std::string::String,
428
429    /// The user friendly name of the specific agent instance where the finding was
430    /// detected, for example, "Banking Agent".
431    pub display_name: std::string::String,
432
433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
434}
435
436impl Agent {
437    /// Creates a new default instance.
438    pub fn new() -> Self {
439        std::default::Default::default()
440    }
441
442    /// Sets the value of [id][crate::model::Agent::id].
443    ///
444    /// # Example
445    /// ```ignore,no_run
446    /// # use google_cloud_securitycenter_v2::model::Agent;
447    /// let x = Agent::new().set_id("example");
448    /// ```
449    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
450        self.id = v.into();
451        self
452    }
453
454    /// Sets the value of [display_name][crate::model::Agent::display_name].
455    ///
456    /// # Example
457    /// ```ignore,no_run
458    /// # use google_cloud_securitycenter_v2::model::Agent;
459    /// let x = Agent::new().set_display_name("example");
460    /// ```
461    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
462        self.display_name = v.into();
463        self
464    }
465}
466
467impl wkt::message::Message for Agent {
468    fn typename() -> &'static str {
469        "type.googleapis.com/google.cloud.securitycenter.v2.Agent"
470    }
471}
472
473/// Represents details about an anomaly detected in an AI agent's behavior.
474#[derive(Clone, Default, PartialEq)]
475#[non_exhaustive]
476pub struct AgentAnomaly {
477    /// The overall confidence score indicating the likelihood that this session
478    /// contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0
479    /// signifies 100% confidence in the presence of an anomaly and 0.0 signifies
480    /// 0% confidence.
481    pub confidence_score: f64,
482
483    /// The list of references to specific detectors that identified anomalies
484    /// within this session.
485    pub detector_references: std::vec::Vec<crate::model::DetectorReference>,
486
487    /// References to the OpenTelemetry invocations.
488    pub invocation_references: std::vec::Vec<crate::model::InvocationReference>,
489
490    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
491}
492
493impl AgentAnomaly {
494    /// Creates a new default instance.
495    pub fn new() -> Self {
496        std::default::Default::default()
497    }
498
499    /// Sets the value of [confidence_score][crate::model::AgentAnomaly::confidence_score].
500    ///
501    /// # Example
502    /// ```ignore,no_run
503    /// # use google_cloud_securitycenter_v2::model::AgentAnomaly;
504    /// let x = AgentAnomaly::new().set_confidence_score(42.0);
505    /// ```
506    pub fn set_confidence_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
507        self.confidence_score = v.into();
508        self
509    }
510
511    /// Sets the value of [detector_references][crate::model::AgentAnomaly::detector_references].
512    ///
513    /// # Example
514    /// ```ignore,no_run
515    /// # use google_cloud_securitycenter_v2::model::AgentAnomaly;
516    /// use google_cloud_securitycenter_v2::model::DetectorReference;
517    /// let x = AgentAnomaly::new()
518    ///     .set_detector_references([
519    ///         DetectorReference::default()/* use setters */,
520    ///         DetectorReference::default()/* use (different) setters */,
521    ///     ]);
522    /// ```
523    pub fn set_detector_references<T, V>(mut self, v: T) -> Self
524    where
525        T: std::iter::IntoIterator<Item = V>,
526        V: std::convert::Into<crate::model::DetectorReference>,
527    {
528        use std::iter::Iterator;
529        self.detector_references = v.into_iter().map(|i| i.into()).collect();
530        self
531    }
532
533    /// Sets the value of [invocation_references][crate::model::AgentAnomaly::invocation_references].
534    ///
535    /// # Example
536    /// ```ignore,no_run
537    /// # use google_cloud_securitycenter_v2::model::AgentAnomaly;
538    /// use google_cloud_securitycenter_v2::model::InvocationReference;
539    /// let x = AgentAnomaly::new()
540    ///     .set_invocation_references([
541    ///         InvocationReference::default()/* use setters */,
542    ///         InvocationReference::default()/* use (different) setters */,
543    ///     ]);
544    /// ```
545    pub fn set_invocation_references<T, V>(mut self, v: T) -> Self
546    where
547        T: std::iter::IntoIterator<Item = V>,
548        V: std::convert::Into<crate::model::InvocationReference>,
549    {
550        use std::iter::Iterator;
551        self.invocation_references = v.into_iter().map(|i| i.into()).collect();
552        self
553    }
554}
555
556impl wkt::message::Message for AgentAnomaly {
557    fn typename() -> &'static str {
558        "type.googleapis.com/google.cloud.securitycenter.v2.AgentAnomaly"
559    }
560}
561
562/// Represents a reference to a specific anomaly detector.
563#[derive(Clone, Default, PartialEq)]
564#[non_exhaustive]
565pub struct DetectorReference {
566    /// The severity of the detector.
567    pub severity: crate::model::detector_reference::Severity,
568
569    /// The unique identifier of the detector.
570    pub detector_id: std::string::String,
571
572    /// A human readable name for the detector, providing context on its purpose.
573    /// For example, "ASI02: Tool Misuse", or "Excessive API Calls".
574    pub display_name: std::string::String,
575
576    /// A detailed explanation generated by an LLM or the detector itself,
577    /// describing why this specific anomaly was flagged. This provides rationale
578    /// and context for the detection.
579    pub explanation: std::string::String,
580
581    /// Recommended steps or actions to remediate or investigate the anomaly
582    /// flagged by this detector. These could include configuration changes, code
583    /// adjustments, or further diagnostic procedures.
584    pub recommendation: std::string::String,
585
586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
587}
588
589impl DetectorReference {
590    /// Creates a new default instance.
591    pub fn new() -> Self {
592        std::default::Default::default()
593    }
594
595    /// Sets the value of [severity][crate::model::DetectorReference::severity].
596    ///
597    /// # Example
598    /// ```ignore,no_run
599    /// # use google_cloud_securitycenter_v2::model::DetectorReference;
600    /// use google_cloud_securitycenter_v2::model::detector_reference::Severity;
601    /// let x0 = DetectorReference::new().set_severity(Severity::Critical);
602    /// let x1 = DetectorReference::new().set_severity(Severity::High);
603    /// let x2 = DetectorReference::new().set_severity(Severity::Medium);
604    /// ```
605    pub fn set_severity<T: std::convert::Into<crate::model::detector_reference::Severity>>(
606        mut self,
607        v: T,
608    ) -> Self {
609        self.severity = v.into();
610        self
611    }
612
613    /// Sets the value of [detector_id][crate::model::DetectorReference::detector_id].
614    ///
615    /// # Example
616    /// ```ignore,no_run
617    /// # use google_cloud_securitycenter_v2::model::DetectorReference;
618    /// let x = DetectorReference::new().set_detector_id("example");
619    /// ```
620    pub fn set_detector_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
621        self.detector_id = v.into();
622        self
623    }
624
625    /// Sets the value of [display_name][crate::model::DetectorReference::display_name].
626    ///
627    /// # Example
628    /// ```ignore,no_run
629    /// # use google_cloud_securitycenter_v2::model::DetectorReference;
630    /// let x = DetectorReference::new().set_display_name("example");
631    /// ```
632    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
633        self.display_name = v.into();
634        self
635    }
636
637    /// Sets the value of [explanation][crate::model::DetectorReference::explanation].
638    ///
639    /// # Example
640    /// ```ignore,no_run
641    /// # use google_cloud_securitycenter_v2::model::DetectorReference;
642    /// let x = DetectorReference::new().set_explanation("example");
643    /// ```
644    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
645        self.explanation = v.into();
646        self
647    }
648
649    /// Sets the value of [recommendation][crate::model::DetectorReference::recommendation].
650    ///
651    /// # Example
652    /// ```ignore,no_run
653    /// # use google_cloud_securitycenter_v2::model::DetectorReference;
654    /// let x = DetectorReference::new().set_recommendation("example");
655    /// ```
656    pub fn set_recommendation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
657        self.recommendation = v.into();
658        self
659    }
660}
661
662impl wkt::message::Message for DetectorReference {
663    fn typename() -> &'static str {
664        "type.googleapis.com/google.cloud.securitycenter.v2.DetectorReference"
665    }
666}
667
668/// Defines additional types related to [DetectorReference].
669pub mod detector_reference {
670    #[allow(unused_imports)]
671    use super::*;
672
673    /// Severity levels for detectors.
674    ///
675    /// # Working with unknown values
676    ///
677    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
678    /// additional enum variants at any time. Adding new variants is not considered
679    /// a breaking change. Applications should write their code in anticipation of:
680    ///
681    /// - New values appearing in future releases of the client library, **and**
682    /// - New values received dynamically, without application changes.
683    ///
684    /// Please consult the [Working with enums] section in the user guide for some
685    /// guidelines.
686    ///
687    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
688    #[derive(Clone, Debug, PartialEq)]
689    #[non_exhaustive]
690    pub enum Severity {
691        /// Unspecified severity.
692        Unspecified,
693        /// Critical severity.
694        Critical,
695        /// High severity.
696        High,
697        /// Medium severity.
698        Medium,
699        /// Low severity.
700        Low,
701        /// If set, the enum was initialized with an unknown value.
702        ///
703        /// Applications can examine the value using [Severity::value] or
704        /// [Severity::name].
705        UnknownValue(severity::UnknownValue),
706    }
707
708    #[doc(hidden)]
709    pub mod severity {
710        #[allow(unused_imports)]
711        use super::*;
712        #[derive(Clone, Debug, PartialEq)]
713        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
714    }
715
716    impl Severity {
717        /// Gets the enum value.
718        ///
719        /// Returns `None` if the enum contains an unknown value deserialized from
720        /// the string representation of enums.
721        pub fn value(&self) -> std::option::Option<i32> {
722            match self {
723                Self::Unspecified => std::option::Option::Some(0),
724                Self::Critical => std::option::Option::Some(1),
725                Self::High => std::option::Option::Some(2),
726                Self::Medium => std::option::Option::Some(3),
727                Self::Low => std::option::Option::Some(4),
728                Self::UnknownValue(u) => u.0.value(),
729            }
730        }
731
732        /// Gets the enum value as a string.
733        ///
734        /// Returns `None` if the enum contains an unknown value deserialized from
735        /// the integer representation of enums.
736        pub fn name(&self) -> std::option::Option<&str> {
737            match self {
738                Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
739                Self::Critical => std::option::Option::Some("CRITICAL"),
740                Self::High => std::option::Option::Some("HIGH"),
741                Self::Medium => std::option::Option::Some("MEDIUM"),
742                Self::Low => std::option::Option::Some("LOW"),
743                Self::UnknownValue(u) => u.0.name(),
744            }
745        }
746    }
747
748    impl std::default::Default for Severity {
749        fn default() -> Self {
750            use std::convert::From;
751            Self::from(0)
752        }
753    }
754
755    impl std::fmt::Display for Severity {
756        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
757            wkt::internal::display_enum(f, self.name(), self.value())
758        }
759    }
760
761    impl std::convert::From<i32> for Severity {
762        fn from(value: i32) -> Self {
763            match value {
764                0 => Self::Unspecified,
765                1 => Self::Critical,
766                2 => Self::High,
767                3 => Self::Medium,
768                4 => Self::Low,
769                _ => Self::UnknownValue(severity::UnknownValue(
770                    wkt::internal::UnknownEnumValue::Integer(value),
771                )),
772            }
773        }
774    }
775
776    impl std::convert::From<&str> for Severity {
777        fn from(value: &str) -> Self {
778            use std::string::ToString;
779            match value {
780                "SEVERITY_UNSPECIFIED" => Self::Unspecified,
781                "CRITICAL" => Self::Critical,
782                "HIGH" => Self::High,
783                "MEDIUM" => Self::Medium,
784                "LOW" => Self::Low,
785                _ => Self::UnknownValue(severity::UnknownValue(
786                    wkt::internal::UnknownEnumValue::String(value.to_string()),
787                )),
788            }
789        }
790    }
791
792    impl serde::ser::Serialize for Severity {
793        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
794        where
795            S: serde::Serializer,
796        {
797            match self {
798                Self::Unspecified => serializer.serialize_i32(0),
799                Self::Critical => serializer.serialize_i32(1),
800                Self::High => serializer.serialize_i32(2),
801                Self::Medium => serializer.serialize_i32(3),
802                Self::Low => serializer.serialize_i32(4),
803                Self::UnknownValue(u) => u.0.serialize(serializer),
804            }
805        }
806    }
807
808    impl<'de> serde::de::Deserialize<'de> for Severity {
809        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
810        where
811            D: serde::Deserializer<'de>,
812        {
813            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
814                ".google.cloud.securitycenter.v2.DetectorReference.Severity",
815            ))
816        }
817    }
818}
819
820/// Represents a reference to a specific OpenTelemetry invocation.
821#[derive(Clone, Default, PartialEq)]
822#[non_exhaustive]
823pub struct InvocationReference {
824    /// The unique identifier of the invocation.
825    pub invocation_id: std::string::String,
826
827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
828}
829
830impl InvocationReference {
831    /// Creates a new default instance.
832    pub fn new() -> Self {
833        std::default::Default::default()
834    }
835
836    /// Sets the value of [invocation_id][crate::model::InvocationReference::invocation_id].
837    ///
838    /// # Example
839    /// ```ignore,no_run
840    /// # use google_cloud_securitycenter_v2::model::InvocationReference;
841    /// let x = InvocationReference::new().set_invocation_id("example");
842    /// ```
843    pub fn set_invocation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
844        self.invocation_id = v.into();
845        self
846    }
847}
848
849impl wkt::message::Message for InvocationReference {
850    fn typename() -> &'static str {
851        "type.googleapis.com/google.cloud.securitycenter.v2.InvocationReference"
852    }
853}
854
855/// Represents a conversational session where the finding occurred.
856#[derive(Clone, Default, PartialEq)]
857#[non_exhaustive]
858pub struct AgentSession {
859    /// The session ID of a conversation.
860    pub session_id: std::string::String,
861
862    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
863}
864
865impl AgentSession {
866    /// Creates a new default instance.
867    pub fn new() -> Self {
868        std::default::Default::default()
869    }
870
871    /// Sets the value of [session_id][crate::model::AgentSession::session_id].
872    ///
873    /// # Example
874    /// ```ignore,no_run
875    /// # use google_cloud_securitycenter_v2::model::AgentSession;
876    /// let x = AgentSession::new().set_session_id("example");
877    /// ```
878    pub fn set_session_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
879        self.session_id = v.into();
880        self
881    }
882}
883
884impl wkt::message::Message for AgentSession {
885    fn typename() -> &'static str {
886        "type.googleapis.com/google.cloud.securitycenter.v2.AgentSession"
887    }
888}
889
890/// Contains information about the AI model associated with the finding.
891#[derive(Clone, Default, PartialEq)]
892#[non_exhaustive]
893pub struct AiModel {
894    /// The name of the AI model, for example, "gemini:1.0.0".
895    pub name: std::string::String,
896
897    /// The domain of the model, for example, “image-classification”.
898    pub domain: std::string::String,
899
900    /// The name of the model library, for example, “transformers”.
901    pub library: std::string::String,
902
903    /// The region in which the model is used, for example, “us-central1”.
904    pub location: std::string::String,
905
906    /// The publisher of the model, for example, “google” or “nvidia”.
907    pub publisher: std::string::String,
908
909    /// The platform on which the model is deployed.
910    pub deployment_platform: crate::model::ai_model::DeploymentPlatform,
911
912    /// The user defined display name of model. Ex. baseline-classification-model
913    pub display_name: std::string::String,
914
915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
916}
917
918impl AiModel {
919    /// Creates a new default instance.
920    pub fn new() -> Self {
921        std::default::Default::default()
922    }
923
924    /// Sets the value of [name][crate::model::AiModel::name].
925    ///
926    /// # Example
927    /// ```ignore,no_run
928    /// # use google_cloud_securitycenter_v2::model::AiModel;
929    /// let x = AiModel::new().set_name("example");
930    /// ```
931    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
932        self.name = v.into();
933        self
934    }
935
936    /// Sets the value of [domain][crate::model::AiModel::domain].
937    ///
938    /// # Example
939    /// ```ignore,no_run
940    /// # use google_cloud_securitycenter_v2::model::AiModel;
941    /// let x = AiModel::new().set_domain("example");
942    /// ```
943    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
944        self.domain = v.into();
945        self
946    }
947
948    /// Sets the value of [library][crate::model::AiModel::library].
949    ///
950    /// # Example
951    /// ```ignore,no_run
952    /// # use google_cloud_securitycenter_v2::model::AiModel;
953    /// let x = AiModel::new().set_library("example");
954    /// ```
955    pub fn set_library<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
956        self.library = v.into();
957        self
958    }
959
960    /// Sets the value of [location][crate::model::AiModel::location].
961    ///
962    /// # Example
963    /// ```ignore,no_run
964    /// # use google_cloud_securitycenter_v2::model::AiModel;
965    /// let x = AiModel::new().set_location("example");
966    /// ```
967    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
968        self.location = v.into();
969        self
970    }
971
972    /// Sets the value of [publisher][crate::model::AiModel::publisher].
973    ///
974    /// # Example
975    /// ```ignore,no_run
976    /// # use google_cloud_securitycenter_v2::model::AiModel;
977    /// let x = AiModel::new().set_publisher("example");
978    /// ```
979    pub fn set_publisher<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
980        self.publisher = v.into();
981        self
982    }
983
984    /// Sets the value of [deployment_platform][crate::model::AiModel::deployment_platform].
985    ///
986    /// # Example
987    /// ```ignore,no_run
988    /// # use google_cloud_securitycenter_v2::model::AiModel;
989    /// use google_cloud_securitycenter_v2::model::ai_model::DeploymentPlatform;
990    /// let x0 = AiModel::new().set_deployment_platform(DeploymentPlatform::VertexAi);
991    /// let x1 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gke);
992    /// let x2 = AiModel::new().set_deployment_platform(DeploymentPlatform::Gce);
993    /// ```
994    pub fn set_deployment_platform<
995        T: std::convert::Into<crate::model::ai_model::DeploymentPlatform>,
996    >(
997        mut self,
998        v: T,
999    ) -> Self {
1000        self.deployment_platform = v.into();
1001        self
1002    }
1003
1004    /// Sets the value of [display_name][crate::model::AiModel::display_name].
1005    ///
1006    /// # Example
1007    /// ```ignore,no_run
1008    /// # use google_cloud_securitycenter_v2::model::AiModel;
1009    /// let x = AiModel::new().set_display_name("example");
1010    /// ```
1011    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1012        self.display_name = v.into();
1013        self
1014    }
1015}
1016
1017impl wkt::message::Message for AiModel {
1018    fn typename() -> &'static str {
1019        "type.googleapis.com/google.cloud.securitycenter.v2.AiModel"
1020    }
1021}
1022
1023/// Defines additional types related to [AiModel].
1024pub mod ai_model {
1025    #[allow(unused_imports)]
1026    use super::*;
1027
1028    /// The platform on which the model is deployed.
1029    ///
1030    /// # Working with unknown values
1031    ///
1032    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1033    /// additional enum variants at any time. Adding new variants is not considered
1034    /// a breaking change. Applications should write their code in anticipation of:
1035    ///
1036    /// - New values appearing in future releases of the client library, **and**
1037    /// - New values received dynamically, without application changes.
1038    ///
1039    /// Please consult the [Working with enums] section in the user guide for some
1040    /// guidelines.
1041    ///
1042    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1043    #[derive(Clone, Debug, PartialEq)]
1044    #[non_exhaustive]
1045    pub enum DeploymentPlatform {
1046        /// Unspecified deployment platform.
1047        Unspecified,
1048        /// Vertex AI.
1049        VertexAi,
1050        /// Google Kubernetes Engine.
1051        Gke,
1052        /// Google Compute Engine.
1053        Gce,
1054        /// Fine tuned model.
1055        FineTunedModel,
1056        /// If set, the enum was initialized with an unknown value.
1057        ///
1058        /// Applications can examine the value using [DeploymentPlatform::value] or
1059        /// [DeploymentPlatform::name].
1060        UnknownValue(deployment_platform::UnknownValue),
1061    }
1062
1063    #[doc(hidden)]
1064    pub mod deployment_platform {
1065        #[allow(unused_imports)]
1066        use super::*;
1067        #[derive(Clone, Debug, PartialEq)]
1068        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1069    }
1070
1071    impl DeploymentPlatform {
1072        /// Gets the enum value.
1073        ///
1074        /// Returns `None` if the enum contains an unknown value deserialized from
1075        /// the string representation of enums.
1076        pub fn value(&self) -> std::option::Option<i32> {
1077            match self {
1078                Self::Unspecified => std::option::Option::Some(0),
1079                Self::VertexAi => std::option::Option::Some(1),
1080                Self::Gke => std::option::Option::Some(2),
1081                Self::Gce => std::option::Option::Some(3),
1082                Self::FineTunedModel => std::option::Option::Some(4),
1083                Self::UnknownValue(u) => u.0.value(),
1084            }
1085        }
1086
1087        /// Gets the enum value as a string.
1088        ///
1089        /// Returns `None` if the enum contains an unknown value deserialized from
1090        /// the integer representation of enums.
1091        pub fn name(&self) -> std::option::Option<&str> {
1092            match self {
1093                Self::Unspecified => std::option::Option::Some("DEPLOYMENT_PLATFORM_UNSPECIFIED"),
1094                Self::VertexAi => std::option::Option::Some("VERTEX_AI"),
1095                Self::Gke => std::option::Option::Some("GKE"),
1096                Self::Gce => std::option::Option::Some("GCE"),
1097                Self::FineTunedModel => std::option::Option::Some("FINE_TUNED_MODEL"),
1098                Self::UnknownValue(u) => u.0.name(),
1099            }
1100        }
1101    }
1102
1103    impl std::default::Default for DeploymentPlatform {
1104        fn default() -> Self {
1105            use std::convert::From;
1106            Self::from(0)
1107        }
1108    }
1109
1110    impl std::fmt::Display for DeploymentPlatform {
1111        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1112            wkt::internal::display_enum(f, self.name(), self.value())
1113        }
1114    }
1115
1116    impl std::convert::From<i32> for DeploymentPlatform {
1117        fn from(value: i32) -> Self {
1118            match value {
1119                0 => Self::Unspecified,
1120                1 => Self::VertexAi,
1121                2 => Self::Gke,
1122                3 => Self::Gce,
1123                4 => Self::FineTunedModel,
1124                _ => Self::UnknownValue(deployment_platform::UnknownValue(
1125                    wkt::internal::UnknownEnumValue::Integer(value),
1126                )),
1127            }
1128        }
1129    }
1130
1131    impl std::convert::From<&str> for DeploymentPlatform {
1132        fn from(value: &str) -> Self {
1133            use std::string::ToString;
1134            match value {
1135                "DEPLOYMENT_PLATFORM_UNSPECIFIED" => Self::Unspecified,
1136                "VERTEX_AI" => Self::VertexAi,
1137                "GKE" => Self::Gke,
1138                "GCE" => Self::Gce,
1139                "FINE_TUNED_MODEL" => Self::FineTunedModel,
1140                _ => Self::UnknownValue(deployment_platform::UnknownValue(
1141                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1142                )),
1143            }
1144        }
1145    }
1146
1147    impl serde::ser::Serialize for DeploymentPlatform {
1148        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1149        where
1150            S: serde::Serializer,
1151        {
1152            match self {
1153                Self::Unspecified => serializer.serialize_i32(0),
1154                Self::VertexAi => serializer.serialize_i32(1),
1155                Self::Gke => serializer.serialize_i32(2),
1156                Self::Gce => serializer.serialize_i32(3),
1157                Self::FineTunedModel => serializer.serialize_i32(4),
1158                Self::UnknownValue(u) => u.0.serialize(serializer),
1159            }
1160        }
1161    }
1162
1163    impl<'de> serde::de::Deserialize<'de> for DeploymentPlatform {
1164        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1165        where
1166            D: serde::Deserializer<'de>,
1167        {
1168            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentPlatform>::new(
1169                ".google.cloud.securitycenter.v2.AiModel.DeploymentPlatform",
1170            ))
1171        }
1172    }
1173}
1174
1175/// Represents an application associated with a finding.
1176#[derive(Clone, Default, PartialEq)]
1177#[non_exhaustive]
1178pub struct Application {
1179    /// The base URI that identifies the network location of the application in
1180    /// which the vulnerability was detected. For example, `<http://example.com>`.
1181    pub base_uri: std::string::String,
1182
1183    /// The full URI with payload that could be used to reproduce the
1184    /// vulnerability. For example, `<http://example.com>?p=aMmYgI6H`.
1185    pub full_uri: std::string::String,
1186
1187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1188}
1189
1190impl Application {
1191    /// Creates a new default instance.
1192    pub fn new() -> Self {
1193        std::default::Default::default()
1194    }
1195
1196    /// Sets the value of [base_uri][crate::model::Application::base_uri].
1197    ///
1198    /// # Example
1199    /// ```ignore,no_run
1200    /// # use google_cloud_securitycenter_v2::model::Application;
1201    /// let x = Application::new().set_base_uri("example");
1202    /// ```
1203    pub fn set_base_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1204        self.base_uri = v.into();
1205        self
1206    }
1207
1208    /// Sets the value of [full_uri][crate::model::Application::full_uri].
1209    ///
1210    /// # Example
1211    /// ```ignore,no_run
1212    /// # use google_cloud_securitycenter_v2::model::Application;
1213    /// let x = Application::new().set_full_uri("example");
1214    /// ```
1215    pub fn set_full_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1216        self.full_uri = v.into();
1217        self
1218    }
1219}
1220
1221impl wkt::message::Message for Application {
1222    fn typename() -> &'static str {
1223        "type.googleapis.com/google.cloud.securitycenter.v2.Application"
1224    }
1225}
1226
1227/// An attack exposure contains the results of an attack path simulation run.
1228#[derive(Clone, Default, PartialEq)]
1229#[non_exhaustive]
1230pub struct AttackExposure {
1231    /// A number between 0 (inclusive) and infinity that represents how important
1232    /// this finding is to remediate. The higher the score, the more important it
1233    /// is to remediate.
1234    pub score: f64,
1235
1236    /// The most recent time the attack exposure was updated on this finding.
1237    pub latest_calculation_time: std::option::Option<wkt::Timestamp>,
1238
1239    /// The resource name of the attack path simulation result that contains the
1240    /// details regarding this attack exposure score.
1241    /// Example: `organizations/123/simulations/456/attackExposureResults/789`
1242    pub attack_exposure_result: std::string::String,
1243
1244    /// Output only. What state this AttackExposure is in. This captures whether or
1245    /// not an attack exposure has been calculated or not.
1246    pub state: crate::model::attack_exposure::State,
1247
1248    /// The number of high value resources that are exposed as a result of this
1249    /// finding.
1250    pub exposed_high_value_resources_count: i32,
1251
1252    /// The number of medium value resources that are exposed as a result of this
1253    /// finding.
1254    pub exposed_medium_value_resources_count: i32,
1255
1256    /// The number of high value resources that are exposed as a result of this
1257    /// finding.
1258    pub exposed_low_value_resources_count: i32,
1259
1260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1261}
1262
1263impl AttackExposure {
1264    /// Creates a new default instance.
1265    pub fn new() -> Self {
1266        std::default::Default::default()
1267    }
1268
1269    /// Sets the value of [score][crate::model::AttackExposure::score].
1270    ///
1271    /// # Example
1272    /// ```ignore,no_run
1273    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1274    /// let x = AttackExposure::new().set_score(42.0);
1275    /// ```
1276    pub fn set_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
1277        self.score = v.into();
1278        self
1279    }
1280
1281    /// Sets the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
1282    ///
1283    /// # Example
1284    /// ```ignore,no_run
1285    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1286    /// use wkt::Timestamp;
1287    /// let x = AttackExposure::new().set_latest_calculation_time(Timestamp::default()/* use setters */);
1288    /// ```
1289    pub fn set_latest_calculation_time<T>(mut self, v: T) -> Self
1290    where
1291        T: std::convert::Into<wkt::Timestamp>,
1292    {
1293        self.latest_calculation_time = std::option::Option::Some(v.into());
1294        self
1295    }
1296
1297    /// Sets or clears the value of [latest_calculation_time][crate::model::AttackExposure::latest_calculation_time].
1298    ///
1299    /// # Example
1300    /// ```ignore,no_run
1301    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1302    /// use wkt::Timestamp;
1303    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(Some(Timestamp::default()/* use setters */));
1304    /// let x = AttackExposure::new().set_or_clear_latest_calculation_time(None::<Timestamp>);
1305    /// ```
1306    pub fn set_or_clear_latest_calculation_time<T>(mut self, v: std::option::Option<T>) -> Self
1307    where
1308        T: std::convert::Into<wkt::Timestamp>,
1309    {
1310        self.latest_calculation_time = v.map(|x| x.into());
1311        self
1312    }
1313
1314    /// Sets the value of [attack_exposure_result][crate::model::AttackExposure::attack_exposure_result].
1315    ///
1316    /// # Example
1317    /// ```ignore,no_run
1318    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1319    /// let x = AttackExposure::new().set_attack_exposure_result("example");
1320    /// ```
1321    pub fn set_attack_exposure_result<T: std::convert::Into<std::string::String>>(
1322        mut self,
1323        v: T,
1324    ) -> Self {
1325        self.attack_exposure_result = v.into();
1326        self
1327    }
1328
1329    /// Sets the value of [state][crate::model::AttackExposure::state].
1330    ///
1331    /// # Example
1332    /// ```ignore,no_run
1333    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1334    /// use google_cloud_securitycenter_v2::model::attack_exposure::State;
1335    /// let x0 = AttackExposure::new().set_state(State::Calculated);
1336    /// let x1 = AttackExposure::new().set_state(State::NotCalculated);
1337    /// ```
1338    pub fn set_state<T: std::convert::Into<crate::model::attack_exposure::State>>(
1339        mut self,
1340        v: T,
1341    ) -> Self {
1342        self.state = v.into();
1343        self
1344    }
1345
1346    /// Sets the value of [exposed_high_value_resources_count][crate::model::AttackExposure::exposed_high_value_resources_count].
1347    ///
1348    /// # Example
1349    /// ```ignore,no_run
1350    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1351    /// let x = AttackExposure::new().set_exposed_high_value_resources_count(42);
1352    /// ```
1353    pub fn set_exposed_high_value_resources_count<T: std::convert::Into<i32>>(
1354        mut self,
1355        v: T,
1356    ) -> Self {
1357        self.exposed_high_value_resources_count = v.into();
1358        self
1359    }
1360
1361    /// Sets the value of [exposed_medium_value_resources_count][crate::model::AttackExposure::exposed_medium_value_resources_count].
1362    ///
1363    /// # Example
1364    /// ```ignore,no_run
1365    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1366    /// let x = AttackExposure::new().set_exposed_medium_value_resources_count(42);
1367    /// ```
1368    pub fn set_exposed_medium_value_resources_count<T: std::convert::Into<i32>>(
1369        mut self,
1370        v: T,
1371    ) -> Self {
1372        self.exposed_medium_value_resources_count = v.into();
1373        self
1374    }
1375
1376    /// Sets the value of [exposed_low_value_resources_count][crate::model::AttackExposure::exposed_low_value_resources_count].
1377    ///
1378    /// # Example
1379    /// ```ignore,no_run
1380    /// # use google_cloud_securitycenter_v2::model::AttackExposure;
1381    /// let x = AttackExposure::new().set_exposed_low_value_resources_count(42);
1382    /// ```
1383    pub fn set_exposed_low_value_resources_count<T: std::convert::Into<i32>>(
1384        mut self,
1385        v: T,
1386    ) -> Self {
1387        self.exposed_low_value_resources_count = v.into();
1388        self
1389    }
1390}
1391
1392impl wkt::message::Message for AttackExposure {
1393    fn typename() -> &'static str {
1394        "type.googleapis.com/google.cloud.securitycenter.v2.AttackExposure"
1395    }
1396}
1397
1398/// Defines additional types related to [AttackExposure].
1399pub mod attack_exposure {
1400    #[allow(unused_imports)]
1401    use super::*;
1402
1403    /// This enum defines the various states an AttackExposure can be in.
1404    ///
1405    /// # Working with unknown values
1406    ///
1407    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1408    /// additional enum variants at any time. Adding new variants is not considered
1409    /// a breaking change. Applications should write their code in anticipation of:
1410    ///
1411    /// - New values appearing in future releases of the client library, **and**
1412    /// - New values received dynamically, without application changes.
1413    ///
1414    /// Please consult the [Working with enums] section in the user guide for some
1415    /// guidelines.
1416    ///
1417    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1418    #[derive(Clone, Debug, PartialEq)]
1419    #[non_exhaustive]
1420    pub enum State {
1421        /// The state is not specified.
1422        Unspecified,
1423        /// The attack exposure has been calculated.
1424        Calculated,
1425        /// The attack exposure has not been calculated.
1426        NotCalculated,
1427        /// If set, the enum was initialized with an unknown value.
1428        ///
1429        /// Applications can examine the value using [State::value] or
1430        /// [State::name].
1431        UnknownValue(state::UnknownValue),
1432    }
1433
1434    #[doc(hidden)]
1435    pub mod state {
1436        #[allow(unused_imports)]
1437        use super::*;
1438        #[derive(Clone, Debug, PartialEq)]
1439        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1440    }
1441
1442    impl State {
1443        /// Gets the enum value.
1444        ///
1445        /// Returns `None` if the enum contains an unknown value deserialized from
1446        /// the string representation of enums.
1447        pub fn value(&self) -> std::option::Option<i32> {
1448            match self {
1449                Self::Unspecified => std::option::Option::Some(0),
1450                Self::Calculated => std::option::Option::Some(1),
1451                Self::NotCalculated => std::option::Option::Some(2),
1452                Self::UnknownValue(u) => u.0.value(),
1453            }
1454        }
1455
1456        /// Gets the enum value as a string.
1457        ///
1458        /// Returns `None` if the enum contains an unknown value deserialized from
1459        /// the integer representation of enums.
1460        pub fn name(&self) -> std::option::Option<&str> {
1461            match self {
1462                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1463                Self::Calculated => std::option::Option::Some("CALCULATED"),
1464                Self::NotCalculated => std::option::Option::Some("NOT_CALCULATED"),
1465                Self::UnknownValue(u) => u.0.name(),
1466            }
1467        }
1468    }
1469
1470    impl std::default::Default for State {
1471        fn default() -> Self {
1472            use std::convert::From;
1473            Self::from(0)
1474        }
1475    }
1476
1477    impl std::fmt::Display for State {
1478        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1479            wkt::internal::display_enum(f, self.name(), self.value())
1480        }
1481    }
1482
1483    impl std::convert::From<i32> for State {
1484        fn from(value: i32) -> Self {
1485            match value {
1486                0 => Self::Unspecified,
1487                1 => Self::Calculated,
1488                2 => Self::NotCalculated,
1489                _ => Self::UnknownValue(state::UnknownValue(
1490                    wkt::internal::UnknownEnumValue::Integer(value),
1491                )),
1492            }
1493        }
1494    }
1495
1496    impl std::convert::From<&str> for State {
1497        fn from(value: &str) -> Self {
1498            use std::string::ToString;
1499            match value {
1500                "STATE_UNSPECIFIED" => Self::Unspecified,
1501                "CALCULATED" => Self::Calculated,
1502                "NOT_CALCULATED" => Self::NotCalculated,
1503                _ => Self::UnknownValue(state::UnknownValue(
1504                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1505                )),
1506            }
1507        }
1508    }
1509
1510    impl serde::ser::Serialize for State {
1511        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1512        where
1513            S: serde::Serializer,
1514        {
1515            match self {
1516                Self::Unspecified => serializer.serialize_i32(0),
1517                Self::Calculated => serializer.serialize_i32(1),
1518                Self::NotCalculated => serializer.serialize_i32(2),
1519                Self::UnknownValue(u) => u.0.serialize(serializer),
1520            }
1521        }
1522    }
1523
1524    impl<'de> serde::de::Deserialize<'de> for State {
1525        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1526        where
1527            D: serde::Deserializer<'de>,
1528        {
1529            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1530                ".google.cloud.securitycenter.v2.AttackExposure.State",
1531            ))
1532        }
1533    }
1534}
1535
1536/// A path that an attacker could take to reach an exposed resource.
1537#[derive(Clone, Default, PartialEq)]
1538#[non_exhaustive]
1539pub struct AttackPath {
1540    /// The attack path name, for example,
1541    /// `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
1542    pub name: std::string::String,
1543
1544    /// A list of nodes that exist in this attack path.
1545    pub path_nodes: std::vec::Vec<crate::model::attack_path::AttackPathNode>,
1546
1547    /// A list of the edges between nodes in this attack path.
1548    pub edges: std::vec::Vec<crate::model::attack_path::AttackPathEdge>,
1549
1550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1551}
1552
1553impl AttackPath {
1554    /// Creates a new default instance.
1555    pub fn new() -> Self {
1556        std::default::Default::default()
1557    }
1558
1559    /// Sets the value of [name][crate::model::AttackPath::name].
1560    ///
1561    /// # Example
1562    /// ```ignore,no_run
1563    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1564    /// # let organization_id = "organization_id";
1565    /// # let simulation_id = "simulation_id";
1566    /// # let valued_resource_id = "valued_resource_id";
1567    /// # let attack_path_id = "attack_path_id";
1568    /// let x = AttackPath::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}/attackPaths/{attack_path_id}"));
1569    /// ```
1570    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1571        self.name = v.into();
1572        self
1573    }
1574
1575    /// Sets the value of [path_nodes][crate::model::AttackPath::path_nodes].
1576    ///
1577    /// # Example
1578    /// ```ignore,no_run
1579    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1580    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1581    /// let x = AttackPath::new()
1582    ///     .set_path_nodes([
1583    ///         AttackPathNode::default()/* use setters */,
1584    ///         AttackPathNode::default()/* use (different) setters */,
1585    ///     ]);
1586    /// ```
1587    pub fn set_path_nodes<T, V>(mut self, v: T) -> Self
1588    where
1589        T: std::iter::IntoIterator<Item = V>,
1590        V: std::convert::Into<crate::model::attack_path::AttackPathNode>,
1591    {
1592        use std::iter::Iterator;
1593        self.path_nodes = v.into_iter().map(|i| i.into()).collect();
1594        self
1595    }
1596
1597    /// Sets the value of [edges][crate::model::AttackPath::edges].
1598    ///
1599    /// # Example
1600    /// ```ignore,no_run
1601    /// # use google_cloud_securitycenter_v2::model::AttackPath;
1602    /// use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
1603    /// let x = AttackPath::new()
1604    ///     .set_edges([
1605    ///         AttackPathEdge::default()/* use setters */,
1606    ///         AttackPathEdge::default()/* use (different) setters */,
1607    ///     ]);
1608    /// ```
1609    pub fn set_edges<T, V>(mut self, v: T) -> Self
1610    where
1611        T: std::iter::IntoIterator<Item = V>,
1612        V: std::convert::Into<crate::model::attack_path::AttackPathEdge>,
1613    {
1614        use std::iter::Iterator;
1615        self.edges = v.into_iter().map(|i| i.into()).collect();
1616        self
1617    }
1618}
1619
1620impl wkt::message::Message for AttackPath {
1621    fn typename() -> &'static str {
1622        "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath"
1623    }
1624}
1625
1626/// Defines additional types related to [AttackPath].
1627pub mod attack_path {
1628    #[allow(unused_imports)]
1629    use super::*;
1630
1631    /// Represents one point that an attacker passes through in this attack path.
1632    #[derive(Clone, Default, PartialEq)]
1633    #[non_exhaustive]
1634    pub struct AttackPathNode {
1635        /// The name of the resource at this point in the attack path.
1636        /// The format of the name follows the Cloud Asset Inventory [resource
1637        /// name
1638        /// format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
1639        pub resource: std::string::String,
1640
1641        /// The [supported resource
1642        /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
1643        pub resource_type: std::string::String,
1644
1645        /// Human-readable name of this resource.
1646        pub display_name: std::string::String,
1647
1648        /// The findings associated with this node in the attack path.
1649        pub associated_findings:
1650            std::vec::Vec<crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding>,
1651
1652        /// Unique id of the attack path node.
1653        pub uuid: std::string::String,
1654
1655        /// A list of attack step nodes that exist in this attack path node.
1656        pub attack_steps:
1657            std::vec::Vec<crate::model::attack_path::attack_path_node::AttackStepNode>,
1658
1659        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1660    }
1661
1662    impl AttackPathNode {
1663        /// Creates a new default instance.
1664        pub fn new() -> Self {
1665            std::default::Default::default()
1666        }
1667
1668        /// Sets the value of [resource][crate::model::attack_path::AttackPathNode::resource].
1669        ///
1670        /// # Example
1671        /// ```ignore,no_run
1672        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1673        /// let x = AttackPathNode::new().set_resource("example");
1674        /// ```
1675        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1676            self.resource = v.into();
1677            self
1678        }
1679
1680        /// Sets the value of [resource_type][crate::model::attack_path::AttackPathNode::resource_type].
1681        ///
1682        /// # Example
1683        /// ```ignore,no_run
1684        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1685        /// let x = AttackPathNode::new().set_resource_type("example");
1686        /// ```
1687        pub fn set_resource_type<T: std::convert::Into<std::string::String>>(
1688            mut self,
1689            v: T,
1690        ) -> Self {
1691            self.resource_type = v.into();
1692            self
1693        }
1694
1695        /// Sets the value of [display_name][crate::model::attack_path::AttackPathNode::display_name].
1696        ///
1697        /// # Example
1698        /// ```ignore,no_run
1699        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1700        /// let x = AttackPathNode::new().set_display_name("example");
1701        /// ```
1702        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1703            mut self,
1704            v: T,
1705        ) -> Self {
1706            self.display_name = v.into();
1707            self
1708        }
1709
1710        /// Sets the value of [associated_findings][crate::model::attack_path::AttackPathNode::associated_findings].
1711        ///
1712        /// # Example
1713        /// ```ignore,no_run
1714        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1715        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1716        /// let x = AttackPathNode::new()
1717        ///     .set_associated_findings([
1718        ///         PathNodeAssociatedFinding::default()/* use setters */,
1719        ///         PathNodeAssociatedFinding::default()/* use (different) setters */,
1720        ///     ]);
1721        /// ```
1722        pub fn set_associated_findings<T, V>(mut self, v: T) -> Self
1723        where
1724            T: std::iter::IntoIterator<Item = V>,
1725            V: std::convert::Into<
1726                    crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding,
1727                >,
1728        {
1729            use std::iter::Iterator;
1730            self.associated_findings = v.into_iter().map(|i| i.into()).collect();
1731            self
1732        }
1733
1734        /// Sets the value of [uuid][crate::model::attack_path::AttackPathNode::uuid].
1735        ///
1736        /// # Example
1737        /// ```ignore,no_run
1738        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1739        /// let x = AttackPathNode::new().set_uuid("example");
1740        /// ```
1741        pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1742            self.uuid = v.into();
1743            self
1744        }
1745
1746        /// Sets the value of [attack_steps][crate::model::attack_path::AttackPathNode::attack_steps].
1747        ///
1748        /// # Example
1749        /// ```ignore,no_run
1750        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathNode;
1751        /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1752        /// let x = AttackPathNode::new()
1753        ///     .set_attack_steps([
1754        ///         AttackStepNode::default()/* use setters */,
1755        ///         AttackStepNode::default()/* use (different) setters */,
1756        ///     ]);
1757        /// ```
1758        pub fn set_attack_steps<T, V>(mut self, v: T) -> Self
1759        where
1760            T: std::iter::IntoIterator<Item = V>,
1761            V: std::convert::Into<crate::model::attack_path::attack_path_node::AttackStepNode>,
1762        {
1763            use std::iter::Iterator;
1764            self.attack_steps = v.into_iter().map(|i| i.into()).collect();
1765            self
1766        }
1767    }
1768
1769    impl wkt::message::Message for AttackPathNode {
1770        fn typename() -> &'static str {
1771            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode"
1772        }
1773    }
1774
1775    /// Defines additional types related to [AttackPathNode].
1776    pub mod attack_path_node {
1777        #[allow(unused_imports)]
1778        use super::*;
1779
1780        /// A finding that is associated with this node in the attack path.
1781        #[derive(Clone, Default, PartialEq)]
1782        #[non_exhaustive]
1783        pub struct PathNodeAssociatedFinding {
1784            /// Canonical name of the associated findings. Example:
1785            /// `organizations/123/sources/456/findings/789`
1786            pub canonical_finding: std::string::String,
1787
1788            /// The additional taxonomy group within findings from a given source.
1789            pub finding_category: std::string::String,
1790
1791            /// Full resource name of the finding.
1792            pub name: std::string::String,
1793
1794            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1795        }
1796
1797        impl PathNodeAssociatedFinding {
1798            /// Creates a new default instance.
1799            pub fn new() -> Self {
1800                std::default::Default::default()
1801            }
1802
1803            /// Sets the value of [canonical_finding][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::canonical_finding].
1804            ///
1805            /// # Example
1806            /// ```ignore,no_run
1807            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1808            /// let x = PathNodeAssociatedFinding::new().set_canonical_finding("example");
1809            /// ```
1810            pub fn set_canonical_finding<T: std::convert::Into<std::string::String>>(
1811                mut self,
1812                v: T,
1813            ) -> Self {
1814                self.canonical_finding = v.into();
1815                self
1816            }
1817
1818            /// Sets the value of [finding_category][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::finding_category].
1819            ///
1820            /// # Example
1821            /// ```ignore,no_run
1822            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1823            /// let x = PathNodeAssociatedFinding::new().set_finding_category("example");
1824            /// ```
1825            pub fn set_finding_category<T: std::convert::Into<std::string::String>>(
1826                mut self,
1827                v: T,
1828            ) -> Self {
1829                self.finding_category = v.into();
1830                self
1831            }
1832
1833            /// Sets the value of [name][crate::model::attack_path::attack_path_node::PathNodeAssociatedFinding::name].
1834            ///
1835            /// # Example
1836            /// ```ignore,no_run
1837            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::PathNodeAssociatedFinding;
1838            /// let x = PathNodeAssociatedFinding::new().set_name("example");
1839            /// ```
1840            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1841                self.name = v.into();
1842                self
1843            }
1844        }
1845
1846        impl wkt::message::Message for PathNodeAssociatedFinding {
1847            fn typename() -> &'static str {
1848                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding"
1849            }
1850        }
1851
1852        /// Detailed steps the attack can take between path nodes.
1853        #[derive(Clone, Default, PartialEq)]
1854        #[non_exhaustive]
1855        pub struct AttackStepNode {
1856            /// Unique ID for one Node
1857            pub uuid: std::string::String,
1858
1859            /// Attack step type. Can be either AND, OR or DEFENSE
1860            pub r#type: crate::model::attack_path::attack_path_node::NodeType,
1861
1862            /// User friendly name of the attack step
1863            pub display_name: std::string::String,
1864
1865            /// Attack step labels for metadata
1866            pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1867
1868            /// Attack step description
1869            pub description: std::string::String,
1870
1871            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1872        }
1873
1874        impl AttackStepNode {
1875            /// Creates a new default instance.
1876            pub fn new() -> Self {
1877                std::default::Default::default()
1878            }
1879
1880            /// Sets the value of [uuid][crate::model::attack_path::attack_path_node::AttackStepNode::uuid].
1881            ///
1882            /// # Example
1883            /// ```ignore,no_run
1884            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1885            /// let x = AttackStepNode::new().set_uuid("example");
1886            /// ```
1887            pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1888                self.uuid = v.into();
1889                self
1890            }
1891
1892            /// Sets the value of [r#type][crate::model::attack_path::attack_path_node::AttackStepNode::type].
1893            ///
1894            /// # Example
1895            /// ```ignore,no_run
1896            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1897            /// use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::NodeType;
1898            /// let x0 = AttackStepNode::new().set_type(NodeType::And);
1899            /// let x1 = AttackStepNode::new().set_type(NodeType::Or);
1900            /// let x2 = AttackStepNode::new().set_type(NodeType::Defense);
1901            /// ```
1902            pub fn set_type<
1903                T: std::convert::Into<crate::model::attack_path::attack_path_node::NodeType>,
1904            >(
1905                mut self,
1906                v: T,
1907            ) -> Self {
1908                self.r#type = v.into();
1909                self
1910            }
1911
1912            /// Sets the value of [display_name][crate::model::attack_path::attack_path_node::AttackStepNode::display_name].
1913            ///
1914            /// # Example
1915            /// ```ignore,no_run
1916            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1917            /// let x = AttackStepNode::new().set_display_name("example");
1918            /// ```
1919            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
1920                mut self,
1921                v: T,
1922            ) -> Self {
1923                self.display_name = v.into();
1924                self
1925            }
1926
1927            /// Sets the value of [labels][crate::model::attack_path::attack_path_node::AttackStepNode::labels].
1928            ///
1929            /// # Example
1930            /// ```ignore,no_run
1931            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1932            /// let x = AttackStepNode::new().set_labels([
1933            ///     ("key0", "abc"),
1934            ///     ("key1", "xyz"),
1935            /// ]);
1936            /// ```
1937            pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1938            where
1939                T: std::iter::IntoIterator<Item = (K, V)>,
1940                K: std::convert::Into<std::string::String>,
1941                V: std::convert::Into<std::string::String>,
1942            {
1943                use std::iter::Iterator;
1944                self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1945                self
1946            }
1947
1948            /// Sets the value of [description][crate::model::attack_path::attack_path_node::AttackStepNode::description].
1949            ///
1950            /// # Example
1951            /// ```ignore,no_run
1952            /// # use google_cloud_securitycenter_v2::model::attack_path::attack_path_node::AttackStepNode;
1953            /// let x = AttackStepNode::new().set_description("example");
1954            /// ```
1955            pub fn set_description<T: std::convert::Into<std::string::String>>(
1956                mut self,
1957                v: T,
1958            ) -> Self {
1959                self.description = v.into();
1960                self
1961            }
1962        }
1963
1964        impl wkt::message::Message for AttackStepNode {
1965            fn typename() -> &'static str {
1966                "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode"
1967            }
1968        }
1969
1970        /// The type of the incoming attack step node.
1971        ///
1972        /// # Working with unknown values
1973        ///
1974        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1975        /// additional enum variants at any time. Adding new variants is not considered
1976        /// a breaking change. Applications should write their code in anticipation of:
1977        ///
1978        /// - New values appearing in future releases of the client library, **and**
1979        /// - New values received dynamically, without application changes.
1980        ///
1981        /// Please consult the [Working with enums] section in the user guide for some
1982        /// guidelines.
1983        ///
1984        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1985        #[derive(Clone, Debug, PartialEq)]
1986        #[non_exhaustive]
1987        pub enum NodeType {
1988            /// Type not specified
1989            Unspecified,
1990            /// Incoming edge joined with AND
1991            And,
1992            /// Incoming edge joined with OR
1993            Or,
1994            /// Incoming edge is defense
1995            Defense,
1996            /// Incoming edge is attacker
1997            Attacker,
1998            /// If set, the enum was initialized with an unknown value.
1999            ///
2000            /// Applications can examine the value using [NodeType::value] or
2001            /// [NodeType::name].
2002            UnknownValue(node_type::UnknownValue),
2003        }
2004
2005        #[doc(hidden)]
2006        pub mod node_type {
2007            #[allow(unused_imports)]
2008            use super::*;
2009            #[derive(Clone, Debug, PartialEq)]
2010            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2011        }
2012
2013        impl NodeType {
2014            /// Gets the enum value.
2015            ///
2016            /// Returns `None` if the enum contains an unknown value deserialized from
2017            /// the string representation of enums.
2018            pub fn value(&self) -> std::option::Option<i32> {
2019                match self {
2020                    Self::Unspecified => std::option::Option::Some(0),
2021                    Self::And => std::option::Option::Some(1),
2022                    Self::Or => std::option::Option::Some(2),
2023                    Self::Defense => std::option::Option::Some(3),
2024                    Self::Attacker => std::option::Option::Some(4),
2025                    Self::UnknownValue(u) => u.0.value(),
2026                }
2027            }
2028
2029            /// Gets the enum value as a string.
2030            ///
2031            /// Returns `None` if the enum contains an unknown value deserialized from
2032            /// the integer representation of enums.
2033            pub fn name(&self) -> std::option::Option<&str> {
2034                match self {
2035                    Self::Unspecified => std::option::Option::Some("NODE_TYPE_UNSPECIFIED"),
2036                    Self::And => std::option::Option::Some("NODE_TYPE_AND"),
2037                    Self::Or => std::option::Option::Some("NODE_TYPE_OR"),
2038                    Self::Defense => std::option::Option::Some("NODE_TYPE_DEFENSE"),
2039                    Self::Attacker => std::option::Option::Some("NODE_TYPE_ATTACKER"),
2040                    Self::UnknownValue(u) => u.0.name(),
2041                }
2042            }
2043        }
2044
2045        impl std::default::Default for NodeType {
2046            fn default() -> Self {
2047                use std::convert::From;
2048                Self::from(0)
2049            }
2050        }
2051
2052        impl std::fmt::Display for NodeType {
2053            fn fmt(
2054                &self,
2055                f: &mut std::fmt::Formatter<'_>,
2056            ) -> std::result::Result<(), std::fmt::Error> {
2057                wkt::internal::display_enum(f, self.name(), self.value())
2058            }
2059        }
2060
2061        impl std::convert::From<i32> for NodeType {
2062            fn from(value: i32) -> Self {
2063                match value {
2064                    0 => Self::Unspecified,
2065                    1 => Self::And,
2066                    2 => Self::Or,
2067                    3 => Self::Defense,
2068                    4 => Self::Attacker,
2069                    _ => Self::UnknownValue(node_type::UnknownValue(
2070                        wkt::internal::UnknownEnumValue::Integer(value),
2071                    )),
2072                }
2073            }
2074        }
2075
2076        impl std::convert::From<&str> for NodeType {
2077            fn from(value: &str) -> Self {
2078                use std::string::ToString;
2079                match value {
2080                    "NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
2081                    "NODE_TYPE_AND" => Self::And,
2082                    "NODE_TYPE_OR" => Self::Or,
2083                    "NODE_TYPE_DEFENSE" => Self::Defense,
2084                    "NODE_TYPE_ATTACKER" => Self::Attacker,
2085                    _ => Self::UnknownValue(node_type::UnknownValue(
2086                        wkt::internal::UnknownEnumValue::String(value.to_string()),
2087                    )),
2088                }
2089            }
2090        }
2091
2092        impl serde::ser::Serialize for NodeType {
2093            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2094            where
2095                S: serde::Serializer,
2096            {
2097                match self {
2098                    Self::Unspecified => serializer.serialize_i32(0),
2099                    Self::And => serializer.serialize_i32(1),
2100                    Self::Or => serializer.serialize_i32(2),
2101                    Self::Defense => serializer.serialize_i32(3),
2102                    Self::Attacker => serializer.serialize_i32(4),
2103                    Self::UnknownValue(u) => u.0.serialize(serializer),
2104                }
2105            }
2106        }
2107
2108        impl<'de> serde::de::Deserialize<'de> for NodeType {
2109            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2110            where
2111                D: serde::Deserializer<'de>,
2112            {
2113                deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeType>::new(
2114                    ".google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType",
2115                ))
2116            }
2117        }
2118    }
2119
2120    /// Represents a connection between a source node and a destination node in
2121    /// this attack path.
2122    #[derive(Clone, Default, PartialEq)]
2123    #[non_exhaustive]
2124    pub struct AttackPathEdge {
2125        /// The attack node uuid of the source node.
2126        pub source: std::string::String,
2127
2128        /// The attack node uuid of the destination node.
2129        pub destination: std::string::String,
2130
2131        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2132    }
2133
2134    impl AttackPathEdge {
2135        /// Creates a new default instance.
2136        pub fn new() -> Self {
2137            std::default::Default::default()
2138        }
2139
2140        /// Sets the value of [source][crate::model::attack_path::AttackPathEdge::source].
2141        ///
2142        /// # Example
2143        /// ```ignore,no_run
2144        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
2145        /// let x = AttackPathEdge::new().set_source("example");
2146        /// ```
2147        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2148            self.source = v.into();
2149            self
2150        }
2151
2152        /// Sets the value of [destination][crate::model::attack_path::AttackPathEdge::destination].
2153        ///
2154        /// # Example
2155        /// ```ignore,no_run
2156        /// # use google_cloud_securitycenter_v2::model::attack_path::AttackPathEdge;
2157        /// let x = AttackPathEdge::new().set_destination("example");
2158        /// ```
2159        pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2160            self.destination = v.into();
2161            self
2162        }
2163    }
2164
2165    impl wkt::message::Message for AttackPathEdge {
2166        fn typename() -> &'static str {
2167            "type.googleapis.com/google.cloud.securitycenter.v2.AttackPath.AttackPathEdge"
2168        }
2169    }
2170}
2171
2172/// Information related to Google Cloud Backup and DR Service findings.
2173#[derive(Clone, Default, PartialEq)]
2174#[non_exhaustive]
2175pub struct BackupDisasterRecovery {
2176    /// The name of a Backup and DR template which comprises one or more backup
2177    /// policies. See the [Backup and DR
2178    /// documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
2179    /// for more information. For example, `snap-ov`.
2180    pub backup_template: std::string::String,
2181
2182    /// The names of Backup and DR policies that are associated with a template
2183    /// and that define when to run a backup, how frequently to run a backup, and
2184    /// how long to retain the backup image. For example, `onvaults`.
2185    pub policies: std::vec::Vec<std::string::String>,
2186
2187    /// The name of a Backup and DR host, which is managed by the backup and
2188    /// recovery appliance and known to the management console. The host can be of
2189    /// type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
2190    /// system, etc.), vCenter, or an ESX server. See the [Backup and DR
2191    /// documentation on
2192    /// hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
2193    /// for more information. For example, `centos7-01`.
2194    pub host: std::string::String,
2195
2196    /// The names of Backup and DR applications. An application is a VM, database,
2197    /// or file system on a managed host monitored by a backup and recovery
2198    /// appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
2199    /// `centos7-01-vol02`.
2200    pub applications: std::vec::Vec<std::string::String>,
2201
2202    /// The name of the Backup and DR storage pool that the backup and recovery
2203    /// appliance is storing data in. The storage pool could be of type Cloud,
2204    /// Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
2205    /// storage
2206    /// pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
2207    /// For example, `DiskPoolOne`.
2208    pub storage_pool: std::string::String,
2209
2210    /// The names of Backup and DR advanced policy options of a policy applying to
2211    /// an application. See the [Backup and DR documentation on policy
2212    /// options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
2213    /// For example, `skipofflineappsincongrp, nounmap`.
2214    pub policy_options: std::vec::Vec<std::string::String>,
2215
2216    /// The name of the Backup and DR resource profile that specifies the storage
2217    /// media for backups of application and VM data. See the [Backup and DR
2218    /// documentation on
2219    /// profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
2220    /// For example, `GCP`.
2221    pub profile: std::string::String,
2222
2223    /// The name of the Backup and DR appliance that captures, moves, and manages
2224    /// the lifecycle of backup data. For example, `backup-server-57137`.
2225    pub appliance: std::string::String,
2226
2227    /// The backup type of the Backup and DR image.
2228    /// For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
2229    pub backup_type: std::string::String,
2230
2231    /// The timestamp at which the Backup and DR backup was created.
2232    pub backup_create_time: std::option::Option<wkt::Timestamp>,
2233
2234    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2235}
2236
2237impl BackupDisasterRecovery {
2238    /// Creates a new default instance.
2239    pub fn new() -> Self {
2240        std::default::Default::default()
2241    }
2242
2243    /// Sets the value of [backup_template][crate::model::BackupDisasterRecovery::backup_template].
2244    ///
2245    /// # Example
2246    /// ```ignore,no_run
2247    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2248    /// let x = BackupDisasterRecovery::new().set_backup_template("example");
2249    /// ```
2250    pub fn set_backup_template<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2251        self.backup_template = v.into();
2252        self
2253    }
2254
2255    /// Sets the value of [policies][crate::model::BackupDisasterRecovery::policies].
2256    ///
2257    /// # Example
2258    /// ```ignore,no_run
2259    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2260    /// let x = BackupDisasterRecovery::new().set_policies(["a", "b", "c"]);
2261    /// ```
2262    pub fn set_policies<T, V>(mut self, v: T) -> Self
2263    where
2264        T: std::iter::IntoIterator<Item = V>,
2265        V: std::convert::Into<std::string::String>,
2266    {
2267        use std::iter::Iterator;
2268        self.policies = v.into_iter().map(|i| i.into()).collect();
2269        self
2270    }
2271
2272    /// Sets the value of [host][crate::model::BackupDisasterRecovery::host].
2273    ///
2274    /// # Example
2275    /// ```ignore,no_run
2276    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2277    /// let x = BackupDisasterRecovery::new().set_host("example");
2278    /// ```
2279    pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2280        self.host = v.into();
2281        self
2282    }
2283
2284    /// Sets the value of [applications][crate::model::BackupDisasterRecovery::applications].
2285    ///
2286    /// # Example
2287    /// ```ignore,no_run
2288    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2289    /// let x = BackupDisasterRecovery::new().set_applications(["a", "b", "c"]);
2290    /// ```
2291    pub fn set_applications<T, V>(mut self, v: T) -> Self
2292    where
2293        T: std::iter::IntoIterator<Item = V>,
2294        V: std::convert::Into<std::string::String>,
2295    {
2296        use std::iter::Iterator;
2297        self.applications = v.into_iter().map(|i| i.into()).collect();
2298        self
2299    }
2300
2301    /// Sets the value of [storage_pool][crate::model::BackupDisasterRecovery::storage_pool].
2302    ///
2303    /// # Example
2304    /// ```ignore,no_run
2305    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2306    /// let x = BackupDisasterRecovery::new().set_storage_pool("example");
2307    /// ```
2308    pub fn set_storage_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2309        self.storage_pool = v.into();
2310        self
2311    }
2312
2313    /// Sets the value of [policy_options][crate::model::BackupDisasterRecovery::policy_options].
2314    ///
2315    /// # Example
2316    /// ```ignore,no_run
2317    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2318    /// let x = BackupDisasterRecovery::new().set_policy_options(["a", "b", "c"]);
2319    /// ```
2320    pub fn set_policy_options<T, V>(mut self, v: T) -> Self
2321    where
2322        T: std::iter::IntoIterator<Item = V>,
2323        V: std::convert::Into<std::string::String>,
2324    {
2325        use std::iter::Iterator;
2326        self.policy_options = v.into_iter().map(|i| i.into()).collect();
2327        self
2328    }
2329
2330    /// Sets the value of [profile][crate::model::BackupDisasterRecovery::profile].
2331    ///
2332    /// # Example
2333    /// ```ignore,no_run
2334    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2335    /// let x = BackupDisasterRecovery::new().set_profile("example");
2336    /// ```
2337    pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2338        self.profile = v.into();
2339        self
2340    }
2341
2342    /// Sets the value of [appliance][crate::model::BackupDisasterRecovery::appliance].
2343    ///
2344    /// # Example
2345    /// ```ignore,no_run
2346    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2347    /// let x = BackupDisasterRecovery::new().set_appliance("example");
2348    /// ```
2349    pub fn set_appliance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2350        self.appliance = v.into();
2351        self
2352    }
2353
2354    /// Sets the value of [backup_type][crate::model::BackupDisasterRecovery::backup_type].
2355    ///
2356    /// # Example
2357    /// ```ignore,no_run
2358    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2359    /// let x = BackupDisasterRecovery::new().set_backup_type("example");
2360    /// ```
2361    pub fn set_backup_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2362        self.backup_type = v.into();
2363        self
2364    }
2365
2366    /// Sets the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
2367    ///
2368    /// # Example
2369    /// ```ignore,no_run
2370    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2371    /// use wkt::Timestamp;
2372    /// let x = BackupDisasterRecovery::new().set_backup_create_time(Timestamp::default()/* use setters */);
2373    /// ```
2374    pub fn set_backup_create_time<T>(mut self, v: T) -> Self
2375    where
2376        T: std::convert::Into<wkt::Timestamp>,
2377    {
2378        self.backup_create_time = std::option::Option::Some(v.into());
2379        self
2380    }
2381
2382    /// Sets or clears the value of [backup_create_time][crate::model::BackupDisasterRecovery::backup_create_time].
2383    ///
2384    /// # Example
2385    /// ```ignore,no_run
2386    /// # use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
2387    /// use wkt::Timestamp;
2388    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(Some(Timestamp::default()/* use setters */));
2389    /// let x = BackupDisasterRecovery::new().set_or_clear_backup_create_time(None::<Timestamp>);
2390    /// ```
2391    pub fn set_or_clear_backup_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2392    where
2393        T: std::convert::Into<wkt::Timestamp>,
2394    {
2395        self.backup_create_time = v.map(|x| x.into());
2396        self
2397    }
2398}
2399
2400impl wkt::message::Message for BackupDisasterRecovery {
2401    fn typename() -> &'static str {
2402        "type.googleapis.com/google.cloud.securitycenter.v2.BackupDisasterRecovery"
2403    }
2404}
2405
2406/// Configures how to deliver Findings to BigQuery Instance.
2407#[derive(Clone, Default, PartialEq)]
2408#[non_exhaustive]
2409pub struct BigQueryExport {
2410    /// Identifier. The relative resource name of this export. See:
2411    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>.
2412    /// The following list shows some examples:
2413    ///
2414    ///
2415    /// `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
2416    ///
2417    /// + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
2418    ///
2419    /// `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
2420    ///
2421    /// This field is provided in responses, and is ignored when provided in create
2422    /// requests.
2423    pub name: std::string::String,
2424
2425    /// The description of the export (max of 1024 characters).
2426    pub description: std::string::String,
2427
2428    /// Expression that defines the filter to apply across create/update events
2429    /// of findings. The expression is a list of zero or more restrictions combined
2430    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
2431    /// has higher precedence than `AND`.
2432    ///
2433    /// Restrictions have the form `<field> <operator> <value>` and may have a
2434    /// `-` character in front of them to indicate negation. The fields map to
2435    /// those defined in the corresponding resource.
2436    ///
2437    /// The supported operators are:
2438    ///
2439    /// * `=` for all value types.
2440    /// * `>`, `<`, `>=`, `<=` for integer values.
2441    /// * `:`, meaning substring matching, for strings.
2442    ///
2443    /// The supported value types are:
2444    ///
2445    /// * string literals in quotes.
2446    /// * integer literals without quotes.
2447    /// * boolean literals `true` and `false` without quotes.
2448    pub filter: std::string::String,
2449
2450    /// The dataset to write findings' updates to. Its format is
2451    /// "projects/[project_id]/datasets/[bigquery_dataset_id]".
2452    /// BigQuery dataset unique ID  must contain only letters (a-z, A-Z), numbers
2453    /// (0-9), or underscores (_).
2454    pub dataset: std::string::String,
2455
2456    /// Output only. The time at which the BigQuery export was created.
2457    /// This field is set by the server and will be ignored if provided on export
2458    /// on creation.
2459    pub create_time: std::option::Option<wkt::Timestamp>,
2460
2461    /// Output only. The most recent time at which the BigQuery export was updated.
2462    /// This field is set by the server and will be ignored if provided on export
2463    /// creation or update.
2464    pub update_time: std::option::Option<wkt::Timestamp>,
2465
2466    /// Output only. Email address of the user who last edited the BigQuery export.
2467    /// This field is set by the server and will be ignored if provided on export
2468    /// creation or update.
2469    pub most_recent_editor: std::string::String,
2470
2471    /// Output only. The service account that needs permission to create table and
2472    /// upload data to the BigQuery dataset.
2473    pub principal: std::string::String,
2474
2475    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2476}
2477
2478impl BigQueryExport {
2479    /// Creates a new default instance.
2480    pub fn new() -> Self {
2481        std::default::Default::default()
2482    }
2483
2484    /// Sets the value of [name][crate::model::BigQueryExport::name].
2485    ///
2486    /// # Example
2487    /// ```ignore,no_run
2488    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2489    /// # let organization_id = "organization_id";
2490    /// # let location_id = "location_id";
2491    /// # let export_id = "export_id";
2492    /// let x = BigQueryExport::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
2493    /// ```
2494    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2495        self.name = v.into();
2496        self
2497    }
2498
2499    /// Sets the value of [description][crate::model::BigQueryExport::description].
2500    ///
2501    /// # Example
2502    /// ```ignore,no_run
2503    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2504    /// let x = BigQueryExport::new().set_description("example");
2505    /// ```
2506    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2507        self.description = v.into();
2508        self
2509    }
2510
2511    /// Sets the value of [filter][crate::model::BigQueryExport::filter].
2512    ///
2513    /// # Example
2514    /// ```ignore,no_run
2515    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2516    /// let x = BigQueryExport::new().set_filter("example");
2517    /// ```
2518    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2519        self.filter = v.into();
2520        self
2521    }
2522
2523    /// Sets the value of [dataset][crate::model::BigQueryExport::dataset].
2524    ///
2525    /// # Example
2526    /// ```ignore,no_run
2527    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2528    /// let x = BigQueryExport::new().set_dataset("example");
2529    /// ```
2530    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2531        self.dataset = v.into();
2532        self
2533    }
2534
2535    /// Sets the value of [create_time][crate::model::BigQueryExport::create_time].
2536    ///
2537    /// # Example
2538    /// ```ignore,no_run
2539    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2540    /// use wkt::Timestamp;
2541    /// let x = BigQueryExport::new().set_create_time(Timestamp::default()/* use setters */);
2542    /// ```
2543    pub fn set_create_time<T>(mut self, v: T) -> Self
2544    where
2545        T: std::convert::Into<wkt::Timestamp>,
2546    {
2547        self.create_time = std::option::Option::Some(v.into());
2548        self
2549    }
2550
2551    /// Sets or clears the value of [create_time][crate::model::BigQueryExport::create_time].
2552    ///
2553    /// # Example
2554    /// ```ignore,no_run
2555    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2556    /// use wkt::Timestamp;
2557    /// let x = BigQueryExport::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2558    /// let x = BigQueryExport::new().set_or_clear_create_time(None::<Timestamp>);
2559    /// ```
2560    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2561    where
2562        T: std::convert::Into<wkt::Timestamp>,
2563    {
2564        self.create_time = v.map(|x| x.into());
2565        self
2566    }
2567
2568    /// Sets the value of [update_time][crate::model::BigQueryExport::update_time].
2569    ///
2570    /// # Example
2571    /// ```ignore,no_run
2572    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2573    /// use wkt::Timestamp;
2574    /// let x = BigQueryExport::new().set_update_time(Timestamp::default()/* use setters */);
2575    /// ```
2576    pub fn set_update_time<T>(mut self, v: T) -> Self
2577    where
2578        T: std::convert::Into<wkt::Timestamp>,
2579    {
2580        self.update_time = std::option::Option::Some(v.into());
2581        self
2582    }
2583
2584    /// Sets or clears the value of [update_time][crate::model::BigQueryExport::update_time].
2585    ///
2586    /// # Example
2587    /// ```ignore,no_run
2588    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2589    /// use wkt::Timestamp;
2590    /// let x = BigQueryExport::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2591    /// let x = BigQueryExport::new().set_or_clear_update_time(None::<Timestamp>);
2592    /// ```
2593    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2594    where
2595        T: std::convert::Into<wkt::Timestamp>,
2596    {
2597        self.update_time = v.map(|x| x.into());
2598        self
2599    }
2600
2601    /// Sets the value of [most_recent_editor][crate::model::BigQueryExport::most_recent_editor].
2602    ///
2603    /// # Example
2604    /// ```ignore,no_run
2605    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2606    /// let x = BigQueryExport::new().set_most_recent_editor("example");
2607    /// ```
2608    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
2609        mut self,
2610        v: T,
2611    ) -> Self {
2612        self.most_recent_editor = v.into();
2613        self
2614    }
2615
2616    /// Sets the value of [principal][crate::model::BigQueryExport::principal].
2617    ///
2618    /// # Example
2619    /// ```ignore,no_run
2620    /// # use google_cloud_securitycenter_v2::model::BigQueryExport;
2621    /// let x = BigQueryExport::new().set_principal("example");
2622    /// ```
2623    pub fn set_principal<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2624        self.principal = v.into();
2625        self
2626    }
2627}
2628
2629impl wkt::message::Message for BigQueryExport {
2630    fn typename() -> &'static str {
2631        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryExport"
2632    }
2633}
2634
2635/// Contains details about a chokepoint, which is a resource or resource group
2636/// where high-risk attack paths converge, based on [attack path simulations]
2637/// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
2638#[derive(Clone, Default, PartialEq)]
2639#[non_exhaustive]
2640pub struct Chokepoint {
2641    /// List of resource names of findings associated with this chokepoint.
2642    /// For example, organizations/123/sources/456/findings/789.
2643    /// This list will have at most 100 findings.
2644    pub related_findings: std::vec::Vec<std::string::String>,
2645
2646    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2647}
2648
2649impl Chokepoint {
2650    /// Creates a new default instance.
2651    pub fn new() -> Self {
2652        std::default::Default::default()
2653    }
2654
2655    /// Sets the value of [related_findings][crate::model::Chokepoint::related_findings].
2656    ///
2657    /// # Example
2658    /// ```ignore,no_run
2659    /// # use google_cloud_securitycenter_v2::model::Chokepoint;
2660    /// let x = Chokepoint::new().set_related_findings(["a", "b", "c"]);
2661    /// ```
2662    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
2663    where
2664        T: std::iter::IntoIterator<Item = V>,
2665        V: std::convert::Into<std::string::String>,
2666    {
2667        use std::iter::Iterator;
2668        self.related_findings = v.into_iter().map(|i| i.into()).collect();
2669        self
2670    }
2671}
2672
2673impl wkt::message::Message for Chokepoint {
2674    fn typename() -> &'static str {
2675        "type.googleapis.com/google.cloud.securitycenter.v2.Chokepoint"
2676    }
2677}
2678
2679/// Fields related to Google Cloud Armor findings.
2680#[derive(Clone, Default, PartialEq)]
2681#[non_exhaustive]
2682pub struct CloudArmor {
2683    /// Information about the [Google Cloud Armor security
2684    /// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2685    /// relevant to the finding.
2686    pub security_policy: std::option::Option<crate::model::SecurityPolicy>,
2687
2688    /// Information about incoming requests evaluated by [Google Cloud Armor
2689    /// security
2690    /// policies](https://cloud.google.com/armor/docs/security-policy-overview).
2691    pub requests: std::option::Option<crate::model::Requests>,
2692
2693    /// Information about potential Layer 7 DDoS attacks identified by [Google
2694    /// Cloud Armor Adaptive
2695    /// Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview).
2696    pub adaptive_protection: std::option::Option<crate::model::AdaptiveProtection>,
2697
2698    /// Information about DDoS attack volume and classification.
2699    pub attack: std::option::Option<crate::model::Attack>,
2700
2701    /// Distinguish between volumetric & protocol DDoS attack and
2702    /// application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS
2703    /// attacks, or "L_7" for Layer 7 DDoS attacks.
2704    pub threat_vector: std::string::String,
2705
2706    /// Duration of attack from the start until the current moment (updated every 5
2707    /// minutes).
2708    pub duration: std::option::Option<wkt::Duration>,
2709
2710    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2711}
2712
2713impl CloudArmor {
2714    /// Creates a new default instance.
2715    pub fn new() -> Self {
2716        std::default::Default::default()
2717    }
2718
2719    /// Sets the value of [security_policy][crate::model::CloudArmor::security_policy].
2720    ///
2721    /// # Example
2722    /// ```ignore,no_run
2723    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2724    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2725    /// let x = CloudArmor::new().set_security_policy(SecurityPolicy::default()/* use setters */);
2726    /// ```
2727    pub fn set_security_policy<T>(mut self, v: T) -> Self
2728    where
2729        T: std::convert::Into<crate::model::SecurityPolicy>,
2730    {
2731        self.security_policy = std::option::Option::Some(v.into());
2732        self
2733    }
2734
2735    /// Sets or clears the value of [security_policy][crate::model::CloudArmor::security_policy].
2736    ///
2737    /// # Example
2738    /// ```ignore,no_run
2739    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2740    /// use google_cloud_securitycenter_v2::model::SecurityPolicy;
2741    /// let x = CloudArmor::new().set_or_clear_security_policy(Some(SecurityPolicy::default()/* use setters */));
2742    /// let x = CloudArmor::new().set_or_clear_security_policy(None::<SecurityPolicy>);
2743    /// ```
2744    pub fn set_or_clear_security_policy<T>(mut self, v: std::option::Option<T>) -> Self
2745    where
2746        T: std::convert::Into<crate::model::SecurityPolicy>,
2747    {
2748        self.security_policy = v.map(|x| x.into());
2749        self
2750    }
2751
2752    /// Sets the value of [requests][crate::model::CloudArmor::requests].
2753    ///
2754    /// # Example
2755    /// ```ignore,no_run
2756    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2757    /// use google_cloud_securitycenter_v2::model::Requests;
2758    /// let x = CloudArmor::new().set_requests(Requests::default()/* use setters */);
2759    /// ```
2760    pub fn set_requests<T>(mut self, v: T) -> Self
2761    where
2762        T: std::convert::Into<crate::model::Requests>,
2763    {
2764        self.requests = std::option::Option::Some(v.into());
2765        self
2766    }
2767
2768    /// Sets or clears the value of [requests][crate::model::CloudArmor::requests].
2769    ///
2770    /// # Example
2771    /// ```ignore,no_run
2772    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2773    /// use google_cloud_securitycenter_v2::model::Requests;
2774    /// let x = CloudArmor::new().set_or_clear_requests(Some(Requests::default()/* use setters */));
2775    /// let x = CloudArmor::new().set_or_clear_requests(None::<Requests>);
2776    /// ```
2777    pub fn set_or_clear_requests<T>(mut self, v: std::option::Option<T>) -> Self
2778    where
2779        T: std::convert::Into<crate::model::Requests>,
2780    {
2781        self.requests = v.map(|x| x.into());
2782        self
2783    }
2784
2785    /// Sets the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2786    ///
2787    /// # Example
2788    /// ```ignore,no_run
2789    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2790    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2791    /// let x = CloudArmor::new().set_adaptive_protection(AdaptiveProtection::default()/* use setters */);
2792    /// ```
2793    pub fn set_adaptive_protection<T>(mut self, v: T) -> Self
2794    where
2795        T: std::convert::Into<crate::model::AdaptiveProtection>,
2796    {
2797        self.adaptive_protection = std::option::Option::Some(v.into());
2798        self
2799    }
2800
2801    /// Sets or clears the value of [adaptive_protection][crate::model::CloudArmor::adaptive_protection].
2802    ///
2803    /// # Example
2804    /// ```ignore,no_run
2805    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2806    /// use google_cloud_securitycenter_v2::model::AdaptiveProtection;
2807    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(Some(AdaptiveProtection::default()/* use setters */));
2808    /// let x = CloudArmor::new().set_or_clear_adaptive_protection(None::<AdaptiveProtection>);
2809    /// ```
2810    pub fn set_or_clear_adaptive_protection<T>(mut self, v: std::option::Option<T>) -> Self
2811    where
2812        T: std::convert::Into<crate::model::AdaptiveProtection>,
2813    {
2814        self.adaptive_protection = v.map(|x| x.into());
2815        self
2816    }
2817
2818    /// Sets the value of [attack][crate::model::CloudArmor::attack].
2819    ///
2820    /// # Example
2821    /// ```ignore,no_run
2822    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2823    /// use google_cloud_securitycenter_v2::model::Attack;
2824    /// let x = CloudArmor::new().set_attack(Attack::default()/* use setters */);
2825    /// ```
2826    pub fn set_attack<T>(mut self, v: T) -> Self
2827    where
2828        T: std::convert::Into<crate::model::Attack>,
2829    {
2830        self.attack = std::option::Option::Some(v.into());
2831        self
2832    }
2833
2834    /// Sets or clears the value of [attack][crate::model::CloudArmor::attack].
2835    ///
2836    /// # Example
2837    /// ```ignore,no_run
2838    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2839    /// use google_cloud_securitycenter_v2::model::Attack;
2840    /// let x = CloudArmor::new().set_or_clear_attack(Some(Attack::default()/* use setters */));
2841    /// let x = CloudArmor::new().set_or_clear_attack(None::<Attack>);
2842    /// ```
2843    pub fn set_or_clear_attack<T>(mut self, v: std::option::Option<T>) -> Self
2844    where
2845        T: std::convert::Into<crate::model::Attack>,
2846    {
2847        self.attack = v.map(|x| x.into());
2848        self
2849    }
2850
2851    /// Sets the value of [threat_vector][crate::model::CloudArmor::threat_vector].
2852    ///
2853    /// # Example
2854    /// ```ignore,no_run
2855    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2856    /// let x = CloudArmor::new().set_threat_vector("example");
2857    /// ```
2858    pub fn set_threat_vector<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2859        self.threat_vector = v.into();
2860        self
2861    }
2862
2863    /// Sets the value of [duration][crate::model::CloudArmor::duration].
2864    ///
2865    /// # Example
2866    /// ```ignore,no_run
2867    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2868    /// use wkt::Duration;
2869    /// let x = CloudArmor::new().set_duration(Duration::default()/* use setters */);
2870    /// ```
2871    pub fn set_duration<T>(mut self, v: T) -> Self
2872    where
2873        T: std::convert::Into<wkt::Duration>,
2874    {
2875        self.duration = std::option::Option::Some(v.into());
2876        self
2877    }
2878
2879    /// Sets or clears the value of [duration][crate::model::CloudArmor::duration].
2880    ///
2881    /// # Example
2882    /// ```ignore,no_run
2883    /// # use google_cloud_securitycenter_v2::model::CloudArmor;
2884    /// use wkt::Duration;
2885    /// let x = CloudArmor::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
2886    /// let x = CloudArmor::new().set_or_clear_duration(None::<Duration>);
2887    /// ```
2888    pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
2889    where
2890        T: std::convert::Into<wkt::Duration>,
2891    {
2892        self.duration = v.map(|x| x.into());
2893        self
2894    }
2895}
2896
2897impl wkt::message::Message for CloudArmor {
2898    fn typename() -> &'static str {
2899        "type.googleapis.com/google.cloud.securitycenter.v2.CloudArmor"
2900    }
2901}
2902
2903/// Information about the [Google Cloud Armor security
2904/// policy](https://cloud.google.com/armor/docs/security-policy-overview)
2905/// relevant to the finding.
2906#[derive(Clone, Default, PartialEq)]
2907#[non_exhaustive]
2908pub struct SecurityPolicy {
2909    /// The name of the Google Cloud Armor security policy, for example,
2910    /// "my-security-policy".
2911    pub name: std::string::String,
2912
2913    /// The type of Google Cloud Armor security policy for example, 'backend
2914    /// security policy', 'edge security policy', 'network edge security policy',
2915    /// or 'always-on DDoS protection'.
2916    pub r#type: std::string::String,
2917
2918    /// Whether or not the associated rule or policy is in preview mode.
2919    pub preview: bool,
2920
2921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2922}
2923
2924impl SecurityPolicy {
2925    /// Creates a new default instance.
2926    pub fn new() -> Self {
2927        std::default::Default::default()
2928    }
2929
2930    /// Sets the value of [name][crate::model::SecurityPolicy::name].
2931    ///
2932    /// # Example
2933    /// ```ignore,no_run
2934    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2935    /// let x = SecurityPolicy::new().set_name("example");
2936    /// ```
2937    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2938        self.name = v.into();
2939        self
2940    }
2941
2942    /// Sets the value of [r#type][crate::model::SecurityPolicy::type].
2943    ///
2944    /// # Example
2945    /// ```ignore,no_run
2946    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2947    /// let x = SecurityPolicy::new().set_type("example");
2948    /// ```
2949    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2950        self.r#type = v.into();
2951        self
2952    }
2953
2954    /// Sets the value of [preview][crate::model::SecurityPolicy::preview].
2955    ///
2956    /// # Example
2957    /// ```ignore,no_run
2958    /// # use google_cloud_securitycenter_v2::model::SecurityPolicy;
2959    /// let x = SecurityPolicy::new().set_preview(true);
2960    /// ```
2961    pub fn set_preview<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2962        self.preview = v.into();
2963        self
2964    }
2965}
2966
2967impl wkt::message::Message for SecurityPolicy {
2968    fn typename() -> &'static str {
2969        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPolicy"
2970    }
2971}
2972
2973/// Information about the requests relevant to the finding.
2974#[derive(Clone, Default, PartialEq)]
2975#[non_exhaustive]
2976pub struct Requests {
2977    /// For 'Increasing deny ratio', the ratio is the denied traffic divided by the
2978    /// allowed traffic. For 'Allowed traffic spike', the ratio is the allowed
2979    /// traffic in the short term divided by allowed traffic in the long term.
2980    pub ratio: f64,
2981
2982    /// Allowed RPS (requests per second) in the short term.
2983    pub short_term_allowed: i32,
2984
2985    /// Allowed RPS (requests per second) over the long term.
2986    pub long_term_allowed: i32,
2987
2988    /// Denied RPS (requests per second) over the long term.
2989    pub long_term_denied: i32,
2990
2991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2992}
2993
2994impl Requests {
2995    /// Creates a new default instance.
2996    pub fn new() -> Self {
2997        std::default::Default::default()
2998    }
2999
3000    /// Sets the value of [ratio][crate::model::Requests::ratio].
3001    ///
3002    /// # Example
3003    /// ```ignore,no_run
3004    /// # use google_cloud_securitycenter_v2::model::Requests;
3005    /// let x = Requests::new().set_ratio(42.0);
3006    /// ```
3007    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3008        self.ratio = v.into();
3009        self
3010    }
3011
3012    /// Sets the value of [short_term_allowed][crate::model::Requests::short_term_allowed].
3013    ///
3014    /// # Example
3015    /// ```ignore,no_run
3016    /// # use google_cloud_securitycenter_v2::model::Requests;
3017    /// let x = Requests::new().set_short_term_allowed(42);
3018    /// ```
3019    pub fn set_short_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3020        self.short_term_allowed = v.into();
3021        self
3022    }
3023
3024    /// Sets the value of [long_term_allowed][crate::model::Requests::long_term_allowed].
3025    ///
3026    /// # Example
3027    /// ```ignore,no_run
3028    /// # use google_cloud_securitycenter_v2::model::Requests;
3029    /// let x = Requests::new().set_long_term_allowed(42);
3030    /// ```
3031    pub fn set_long_term_allowed<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3032        self.long_term_allowed = v.into();
3033        self
3034    }
3035
3036    /// Sets the value of [long_term_denied][crate::model::Requests::long_term_denied].
3037    ///
3038    /// # Example
3039    /// ```ignore,no_run
3040    /// # use google_cloud_securitycenter_v2::model::Requests;
3041    /// let x = Requests::new().set_long_term_denied(42);
3042    /// ```
3043    pub fn set_long_term_denied<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3044        self.long_term_denied = v.into();
3045        self
3046    }
3047}
3048
3049impl wkt::message::Message for Requests {
3050    fn typename() -> &'static str {
3051        "type.googleapis.com/google.cloud.securitycenter.v2.Requests"
3052    }
3053}
3054
3055/// Information about [Google Cloud Armor Adaptive
3056/// Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).
3057#[derive(Clone, Default, PartialEq)]
3058#[non_exhaustive]
3059pub struct AdaptiveProtection {
3060    /// A score of 0 means that there is low confidence that the detected event is
3061    /// an actual attack. A score of 1 means that there is high confidence that the
3062    /// detected event is an attack. See the [Adaptive Protection
3063    /// documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning)
3064    /// for further explanation.
3065    pub confidence: f64,
3066
3067    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3068}
3069
3070impl AdaptiveProtection {
3071    /// Creates a new default instance.
3072    pub fn new() -> Self {
3073        std::default::Default::default()
3074    }
3075
3076    /// Sets the value of [confidence][crate::model::AdaptiveProtection::confidence].
3077    ///
3078    /// # Example
3079    /// ```ignore,no_run
3080    /// # use google_cloud_securitycenter_v2::model::AdaptiveProtection;
3081    /// let x = AdaptiveProtection::new().set_confidence(42.0);
3082    /// ```
3083    pub fn set_confidence<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3084        self.confidence = v.into();
3085        self
3086    }
3087}
3088
3089impl wkt::message::Message for AdaptiveProtection {
3090    fn typename() -> &'static str {
3091        "type.googleapis.com/google.cloud.securitycenter.v2.AdaptiveProtection"
3092    }
3093}
3094
3095/// Information about DDoS attack volume and classification.
3096#[derive(Clone, Default, PartialEq)]
3097#[non_exhaustive]
3098pub struct Attack {
3099    /// Total PPS (packets per second) volume of attack.
3100    pub volume_pps_long: i64,
3101
3102    /// Total BPS (bytes per second) volume of attack.
3103    pub volume_bps_long: i64,
3104
3105    /// Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'.
3106    pub classification: std::string::String,
3107
3108    /// Total PPS (packets per second) volume of attack. Deprecated - refer to
3109    /// volume_pps_long instead.
3110    #[deprecated]
3111    pub volume_pps: i32,
3112
3113    /// Total BPS (bytes per second) volume of attack. Deprecated - refer to
3114    /// volume_bps_long instead.
3115    #[deprecated]
3116    pub volume_bps: i32,
3117
3118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3119}
3120
3121impl Attack {
3122    /// Creates a new default instance.
3123    pub fn new() -> Self {
3124        std::default::Default::default()
3125    }
3126
3127    /// Sets the value of [volume_pps_long][crate::model::Attack::volume_pps_long].
3128    ///
3129    /// # Example
3130    /// ```ignore,no_run
3131    /// # use google_cloud_securitycenter_v2::model::Attack;
3132    /// let x = Attack::new().set_volume_pps_long(42);
3133    /// ```
3134    pub fn set_volume_pps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3135        self.volume_pps_long = v.into();
3136        self
3137    }
3138
3139    /// Sets the value of [volume_bps_long][crate::model::Attack::volume_bps_long].
3140    ///
3141    /// # Example
3142    /// ```ignore,no_run
3143    /// # use google_cloud_securitycenter_v2::model::Attack;
3144    /// let x = Attack::new().set_volume_bps_long(42);
3145    /// ```
3146    pub fn set_volume_bps_long<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3147        self.volume_bps_long = v.into();
3148        self
3149    }
3150
3151    /// Sets the value of [classification][crate::model::Attack::classification].
3152    ///
3153    /// # Example
3154    /// ```ignore,no_run
3155    /// # use google_cloud_securitycenter_v2::model::Attack;
3156    /// let x = Attack::new().set_classification("example");
3157    /// ```
3158    pub fn set_classification<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3159        self.classification = v.into();
3160        self
3161    }
3162
3163    /// Sets the value of [volume_pps][crate::model::Attack::volume_pps].
3164    ///
3165    /// # Example
3166    /// ```ignore,no_run
3167    /// # use google_cloud_securitycenter_v2::model::Attack;
3168    /// let x = Attack::new().set_volume_pps(42);
3169    /// ```
3170    #[deprecated]
3171    pub fn set_volume_pps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3172        self.volume_pps = v.into();
3173        self
3174    }
3175
3176    /// Sets the value of [volume_bps][crate::model::Attack::volume_bps].
3177    ///
3178    /// # Example
3179    /// ```ignore,no_run
3180    /// # use google_cloud_securitycenter_v2::model::Attack;
3181    /// let x = Attack::new().set_volume_bps(42);
3182    /// ```
3183    #[deprecated]
3184    pub fn set_volume_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3185        self.volume_bps = v.into();
3186        self
3187    }
3188}
3189
3190impl wkt::message::Message for Attack {
3191    fn typename() -> &'static str {
3192        "type.googleapis.com/google.cloud.securitycenter.v2.Attack"
3193    }
3194}
3195
3196/// The [data profile](https://cloud.google.com/dlp/docs/data-profiles)
3197/// associated with the finding.
3198#[derive(Clone, Default, PartialEq)]
3199#[non_exhaustive]
3200pub struct CloudDlpDataProfile {
3201    /// Name of the data profile, for example,
3202    /// `projects/123/locations/europe/tableProfiles/8383929`.
3203    pub data_profile: std::string::String,
3204
3205    /// The resource hierarchy level at which the data profile was generated.
3206    pub parent_type: crate::model::cloud_dlp_data_profile::ParentType,
3207
3208    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3209}
3210
3211impl CloudDlpDataProfile {
3212    /// Creates a new default instance.
3213    pub fn new() -> Self {
3214        std::default::Default::default()
3215    }
3216
3217    /// Sets the value of [data_profile][crate::model::CloudDlpDataProfile::data_profile].
3218    ///
3219    /// # Example
3220    /// ```ignore,no_run
3221    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
3222    /// let x = CloudDlpDataProfile::new().set_data_profile("example");
3223    /// ```
3224    pub fn set_data_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3225        self.data_profile = v.into();
3226        self
3227    }
3228
3229    /// Sets the value of [parent_type][crate::model::CloudDlpDataProfile::parent_type].
3230    ///
3231    /// # Example
3232    /// ```ignore,no_run
3233    /// # use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
3234    /// use google_cloud_securitycenter_v2::model::cloud_dlp_data_profile::ParentType;
3235    /// let x0 = CloudDlpDataProfile::new().set_parent_type(ParentType::Organization);
3236    /// let x1 = CloudDlpDataProfile::new().set_parent_type(ParentType::Project);
3237    /// ```
3238    pub fn set_parent_type<
3239        T: std::convert::Into<crate::model::cloud_dlp_data_profile::ParentType>,
3240    >(
3241        mut self,
3242        v: T,
3243    ) -> Self {
3244        self.parent_type = v.into();
3245        self
3246    }
3247}
3248
3249impl wkt::message::Message for CloudDlpDataProfile {
3250    fn typename() -> &'static str {
3251        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpDataProfile"
3252    }
3253}
3254
3255/// Defines additional types related to [CloudDlpDataProfile].
3256pub mod cloud_dlp_data_profile {
3257    #[allow(unused_imports)]
3258    use super::*;
3259
3260    /// Parents for configurations that produce data profile findings.
3261    ///
3262    /// # Working with unknown values
3263    ///
3264    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3265    /// additional enum variants at any time. Adding new variants is not considered
3266    /// a breaking change. Applications should write their code in anticipation of:
3267    ///
3268    /// - New values appearing in future releases of the client library, **and**
3269    /// - New values received dynamically, without application changes.
3270    ///
3271    /// Please consult the [Working with enums] section in the user guide for some
3272    /// guidelines.
3273    ///
3274    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3275    #[derive(Clone, Debug, PartialEq)]
3276    #[non_exhaustive]
3277    pub enum ParentType {
3278        /// Unspecified parent type.
3279        Unspecified,
3280        /// Organization-level configurations.
3281        Organization,
3282        /// Project-level configurations.
3283        Project,
3284        /// If set, the enum was initialized with an unknown value.
3285        ///
3286        /// Applications can examine the value using [ParentType::value] or
3287        /// [ParentType::name].
3288        UnknownValue(parent_type::UnknownValue),
3289    }
3290
3291    #[doc(hidden)]
3292    pub mod parent_type {
3293        #[allow(unused_imports)]
3294        use super::*;
3295        #[derive(Clone, Debug, PartialEq)]
3296        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3297    }
3298
3299    impl ParentType {
3300        /// Gets the enum value.
3301        ///
3302        /// Returns `None` if the enum contains an unknown value deserialized from
3303        /// the string representation of enums.
3304        pub fn value(&self) -> std::option::Option<i32> {
3305            match self {
3306                Self::Unspecified => std::option::Option::Some(0),
3307                Self::Organization => std::option::Option::Some(1),
3308                Self::Project => std::option::Option::Some(2),
3309                Self::UnknownValue(u) => u.0.value(),
3310            }
3311        }
3312
3313        /// Gets the enum value as a string.
3314        ///
3315        /// Returns `None` if the enum contains an unknown value deserialized from
3316        /// the integer representation of enums.
3317        pub fn name(&self) -> std::option::Option<&str> {
3318            match self {
3319                Self::Unspecified => std::option::Option::Some("PARENT_TYPE_UNSPECIFIED"),
3320                Self::Organization => std::option::Option::Some("ORGANIZATION"),
3321                Self::Project => std::option::Option::Some("PROJECT"),
3322                Self::UnknownValue(u) => u.0.name(),
3323            }
3324        }
3325    }
3326
3327    impl std::default::Default for ParentType {
3328        fn default() -> Self {
3329            use std::convert::From;
3330            Self::from(0)
3331        }
3332    }
3333
3334    impl std::fmt::Display for ParentType {
3335        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3336            wkt::internal::display_enum(f, self.name(), self.value())
3337        }
3338    }
3339
3340    impl std::convert::From<i32> for ParentType {
3341        fn from(value: i32) -> Self {
3342            match value {
3343                0 => Self::Unspecified,
3344                1 => Self::Organization,
3345                2 => Self::Project,
3346                _ => Self::UnknownValue(parent_type::UnknownValue(
3347                    wkt::internal::UnknownEnumValue::Integer(value),
3348                )),
3349            }
3350        }
3351    }
3352
3353    impl std::convert::From<&str> for ParentType {
3354        fn from(value: &str) -> Self {
3355            use std::string::ToString;
3356            match value {
3357                "PARENT_TYPE_UNSPECIFIED" => Self::Unspecified,
3358                "ORGANIZATION" => Self::Organization,
3359                "PROJECT" => Self::Project,
3360                _ => Self::UnknownValue(parent_type::UnknownValue(
3361                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3362                )),
3363            }
3364        }
3365    }
3366
3367    impl serde::ser::Serialize for ParentType {
3368        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3369        where
3370            S: serde::Serializer,
3371        {
3372            match self {
3373                Self::Unspecified => serializer.serialize_i32(0),
3374                Self::Organization => serializer.serialize_i32(1),
3375                Self::Project => serializer.serialize_i32(2),
3376                Self::UnknownValue(u) => u.0.serialize(serializer),
3377            }
3378        }
3379    }
3380
3381    impl<'de> serde::de::Deserialize<'de> for ParentType {
3382        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3383        where
3384            D: serde::Deserializer<'de>,
3385        {
3386            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ParentType>::new(
3387                ".google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType",
3388            ))
3389        }
3390    }
3391}
3392
3393/// Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection
3394/// job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced
3395/// the finding.
3396#[derive(Clone, Default, PartialEq)]
3397#[non_exhaustive]
3398pub struct CloudDlpInspection {
3399    /// Name of the inspection job, for example,
3400    /// `projects/123/locations/europe/dlpJobs/i-8383929`.
3401    pub inspect_job: std::string::String,
3402
3403    /// The type of information (or
3404    /// *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
3405    /// for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
3406    pub info_type: std::string::String,
3407
3408    /// The number of times Cloud DLP found this infoType within this job
3409    /// and resource.
3410    pub info_type_count: i64,
3411
3412    /// Whether Cloud DLP scanned the complete resource or a sampled subset.
3413    pub full_scan: bool,
3414
3415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3416}
3417
3418impl CloudDlpInspection {
3419    /// Creates a new default instance.
3420    pub fn new() -> Self {
3421        std::default::Default::default()
3422    }
3423
3424    /// Sets the value of [inspect_job][crate::model::CloudDlpInspection::inspect_job].
3425    ///
3426    /// # Example
3427    /// ```ignore,no_run
3428    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
3429    /// let x = CloudDlpInspection::new().set_inspect_job("example");
3430    /// ```
3431    pub fn set_inspect_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3432        self.inspect_job = v.into();
3433        self
3434    }
3435
3436    /// Sets the value of [info_type][crate::model::CloudDlpInspection::info_type].
3437    ///
3438    /// # Example
3439    /// ```ignore,no_run
3440    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
3441    /// let x = CloudDlpInspection::new().set_info_type("example");
3442    /// ```
3443    pub fn set_info_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3444        self.info_type = v.into();
3445        self
3446    }
3447
3448    /// Sets the value of [info_type_count][crate::model::CloudDlpInspection::info_type_count].
3449    ///
3450    /// # Example
3451    /// ```ignore,no_run
3452    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
3453    /// let x = CloudDlpInspection::new().set_info_type_count(42);
3454    /// ```
3455    pub fn set_info_type_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3456        self.info_type_count = v.into();
3457        self
3458    }
3459
3460    /// Sets the value of [full_scan][crate::model::CloudDlpInspection::full_scan].
3461    ///
3462    /// # Example
3463    /// ```ignore,no_run
3464    /// # use google_cloud_securitycenter_v2::model::CloudDlpInspection;
3465    /// let x = CloudDlpInspection::new().set_full_scan(true);
3466    /// ```
3467    pub fn set_full_scan<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3468        self.full_scan = v.into();
3469        self
3470    }
3471}
3472
3473impl wkt::message::Message for CloudDlpInspection {
3474    fn typename() -> &'static str {
3475        "type.googleapis.com/google.cloud.securitycenter.v2.CloudDlpInspection"
3476    }
3477}
3478
3479/// Contains compliance information about a security standard indicating unmet
3480/// recommendations.
3481#[derive(Clone, Default, PartialEq)]
3482#[non_exhaustive]
3483pub struct Compliance {
3484    /// Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
3485    /// OWASP.
3486    pub standard: std::string::String,
3487
3488    /// Version of the standard or benchmark, for example, 1.1
3489    pub version: std::string::String,
3490
3491    /// Policies within the standard or benchmark, for example, A.12.4.1
3492    pub ids: std::vec::Vec<std::string::String>,
3493
3494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3495}
3496
3497impl Compliance {
3498    /// Creates a new default instance.
3499    pub fn new() -> Self {
3500        std::default::Default::default()
3501    }
3502
3503    /// Sets the value of [standard][crate::model::Compliance::standard].
3504    ///
3505    /// # Example
3506    /// ```ignore,no_run
3507    /// # use google_cloud_securitycenter_v2::model::Compliance;
3508    /// let x = Compliance::new().set_standard("example");
3509    /// ```
3510    pub fn set_standard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3511        self.standard = v.into();
3512        self
3513    }
3514
3515    /// Sets the value of [version][crate::model::Compliance::version].
3516    ///
3517    /// # Example
3518    /// ```ignore,no_run
3519    /// # use google_cloud_securitycenter_v2::model::Compliance;
3520    /// let x = Compliance::new().set_version("example");
3521    /// ```
3522    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3523        self.version = v.into();
3524        self
3525    }
3526
3527    /// Sets the value of [ids][crate::model::Compliance::ids].
3528    ///
3529    /// # Example
3530    /// ```ignore,no_run
3531    /// # use google_cloud_securitycenter_v2::model::Compliance;
3532    /// let x = Compliance::new().set_ids(["a", "b", "c"]);
3533    /// ```
3534    pub fn set_ids<T, V>(mut self, v: T) -> Self
3535    where
3536        T: std::iter::IntoIterator<Item = V>,
3537        V: std::convert::Into<std::string::String>,
3538    {
3539        use std::iter::Iterator;
3540        self.ids = v.into_iter().map(|i| i.into()).collect();
3541        self
3542    }
3543}
3544
3545impl wkt::message::Message for Compliance {
3546    fn typename() -> &'static str {
3547        "type.googleapis.com/google.cloud.securitycenter.v2.Compliance"
3548    }
3549}
3550
3551/// Contains information about the IP connection associated with the finding.
3552#[derive(Clone, Default, PartialEq)]
3553#[non_exhaustive]
3554pub struct Connection {
3555    /// Destination IP address. Not present for sockets that are listening and not
3556    /// connected.
3557    pub destination_ip: std::string::String,
3558
3559    /// Destination port. Not present for sockets that are listening and not
3560    /// connected.
3561    pub destination_port: i32,
3562
3563    /// Source IP address.
3564    pub source_ip: std::string::String,
3565
3566    /// Source port.
3567    pub source_port: i32,
3568
3569    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3570    pub protocol: crate::model::connection::Protocol,
3571
3572    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3573}
3574
3575impl Connection {
3576    /// Creates a new default instance.
3577    pub fn new() -> Self {
3578        std::default::Default::default()
3579    }
3580
3581    /// Sets the value of [destination_ip][crate::model::Connection::destination_ip].
3582    ///
3583    /// # Example
3584    /// ```ignore,no_run
3585    /// # use google_cloud_securitycenter_v2::model::Connection;
3586    /// let x = Connection::new().set_destination_ip("example");
3587    /// ```
3588    pub fn set_destination_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3589        self.destination_ip = v.into();
3590        self
3591    }
3592
3593    /// Sets the value of [destination_port][crate::model::Connection::destination_port].
3594    ///
3595    /// # Example
3596    /// ```ignore,no_run
3597    /// # use google_cloud_securitycenter_v2::model::Connection;
3598    /// let x = Connection::new().set_destination_port(42);
3599    /// ```
3600    pub fn set_destination_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3601        self.destination_port = v.into();
3602        self
3603    }
3604
3605    /// Sets the value of [source_ip][crate::model::Connection::source_ip].
3606    ///
3607    /// # Example
3608    /// ```ignore,no_run
3609    /// # use google_cloud_securitycenter_v2::model::Connection;
3610    /// let x = Connection::new().set_source_ip("example");
3611    /// ```
3612    pub fn set_source_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3613        self.source_ip = v.into();
3614        self
3615    }
3616
3617    /// Sets the value of [source_port][crate::model::Connection::source_port].
3618    ///
3619    /// # Example
3620    /// ```ignore,no_run
3621    /// # use google_cloud_securitycenter_v2::model::Connection;
3622    /// let x = Connection::new().set_source_port(42);
3623    /// ```
3624    pub fn set_source_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3625        self.source_port = v.into();
3626        self
3627    }
3628
3629    /// Sets the value of [protocol][crate::model::Connection::protocol].
3630    ///
3631    /// # Example
3632    /// ```ignore,no_run
3633    /// # use google_cloud_securitycenter_v2::model::Connection;
3634    /// use google_cloud_securitycenter_v2::model::connection::Protocol;
3635    /// let x0 = Connection::new().set_protocol(Protocol::Icmp);
3636    /// let x1 = Connection::new().set_protocol(Protocol::Tcp);
3637    /// let x2 = Connection::new().set_protocol(Protocol::Udp);
3638    /// ```
3639    pub fn set_protocol<T: std::convert::Into<crate::model::connection::Protocol>>(
3640        mut self,
3641        v: T,
3642    ) -> Self {
3643        self.protocol = v.into();
3644        self
3645    }
3646}
3647
3648impl wkt::message::Message for Connection {
3649    fn typename() -> &'static str {
3650        "type.googleapis.com/google.cloud.securitycenter.v2.Connection"
3651    }
3652}
3653
3654/// Defines additional types related to [Connection].
3655pub mod connection {
3656    #[allow(unused_imports)]
3657    use super::*;
3658
3659    /// IANA Internet Protocol Number such as TCP(6) and UDP(17).
3660    ///
3661    /// # Working with unknown values
3662    ///
3663    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3664    /// additional enum variants at any time. Adding new variants is not considered
3665    /// a breaking change. Applications should write their code in anticipation of:
3666    ///
3667    /// - New values appearing in future releases of the client library, **and**
3668    /// - New values received dynamically, without application changes.
3669    ///
3670    /// Please consult the [Working with enums] section in the user guide for some
3671    /// guidelines.
3672    ///
3673    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3674    #[derive(Clone, Debug, PartialEq)]
3675    #[non_exhaustive]
3676    pub enum Protocol {
3677        /// Unspecified protocol (not HOPOPT).
3678        Unspecified,
3679        /// Internet Control Message Protocol.
3680        Icmp,
3681        /// Transmission Control Protocol.
3682        Tcp,
3683        /// User Datagram Protocol.
3684        Udp,
3685        /// Generic Routing Encapsulation.
3686        Gre,
3687        /// Encap Security Payload.
3688        Esp,
3689        /// If set, the enum was initialized with an unknown value.
3690        ///
3691        /// Applications can examine the value using [Protocol::value] or
3692        /// [Protocol::name].
3693        UnknownValue(protocol::UnknownValue),
3694    }
3695
3696    #[doc(hidden)]
3697    pub mod protocol {
3698        #[allow(unused_imports)]
3699        use super::*;
3700        #[derive(Clone, Debug, PartialEq)]
3701        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3702    }
3703
3704    impl Protocol {
3705        /// Gets the enum value.
3706        ///
3707        /// Returns `None` if the enum contains an unknown value deserialized from
3708        /// the string representation of enums.
3709        pub fn value(&self) -> std::option::Option<i32> {
3710            match self {
3711                Self::Unspecified => std::option::Option::Some(0),
3712                Self::Icmp => std::option::Option::Some(1),
3713                Self::Tcp => std::option::Option::Some(6),
3714                Self::Udp => std::option::Option::Some(17),
3715                Self::Gre => std::option::Option::Some(47),
3716                Self::Esp => std::option::Option::Some(50),
3717                Self::UnknownValue(u) => u.0.value(),
3718            }
3719        }
3720
3721        /// Gets the enum value as a string.
3722        ///
3723        /// Returns `None` if the enum contains an unknown value deserialized from
3724        /// the integer representation of enums.
3725        pub fn name(&self) -> std::option::Option<&str> {
3726            match self {
3727                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
3728                Self::Icmp => std::option::Option::Some("ICMP"),
3729                Self::Tcp => std::option::Option::Some("TCP"),
3730                Self::Udp => std::option::Option::Some("UDP"),
3731                Self::Gre => std::option::Option::Some("GRE"),
3732                Self::Esp => std::option::Option::Some("ESP"),
3733                Self::UnknownValue(u) => u.0.name(),
3734            }
3735        }
3736    }
3737
3738    impl std::default::Default for Protocol {
3739        fn default() -> Self {
3740            use std::convert::From;
3741            Self::from(0)
3742        }
3743    }
3744
3745    impl std::fmt::Display for Protocol {
3746        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3747            wkt::internal::display_enum(f, self.name(), self.value())
3748        }
3749    }
3750
3751    impl std::convert::From<i32> for Protocol {
3752        fn from(value: i32) -> Self {
3753            match value {
3754                0 => Self::Unspecified,
3755                1 => Self::Icmp,
3756                6 => Self::Tcp,
3757                17 => Self::Udp,
3758                47 => Self::Gre,
3759                50 => Self::Esp,
3760                _ => Self::UnknownValue(protocol::UnknownValue(
3761                    wkt::internal::UnknownEnumValue::Integer(value),
3762                )),
3763            }
3764        }
3765    }
3766
3767    impl std::convert::From<&str> for Protocol {
3768        fn from(value: &str) -> Self {
3769            use std::string::ToString;
3770            match value {
3771                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
3772                "ICMP" => Self::Icmp,
3773                "TCP" => Self::Tcp,
3774                "UDP" => Self::Udp,
3775                "GRE" => Self::Gre,
3776                "ESP" => Self::Esp,
3777                _ => Self::UnknownValue(protocol::UnknownValue(
3778                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3779                )),
3780            }
3781        }
3782    }
3783
3784    impl serde::ser::Serialize for Protocol {
3785        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3786        where
3787            S: serde::Serializer,
3788        {
3789            match self {
3790                Self::Unspecified => serializer.serialize_i32(0),
3791                Self::Icmp => serializer.serialize_i32(1),
3792                Self::Tcp => serializer.serialize_i32(6),
3793                Self::Udp => serializer.serialize_i32(17),
3794                Self::Gre => serializer.serialize_i32(47),
3795                Self::Esp => serializer.serialize_i32(50),
3796                Self::UnknownValue(u) => u.0.serialize(serializer),
3797            }
3798        }
3799    }
3800
3801    impl<'de> serde::de::Deserialize<'de> for Protocol {
3802        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3803        where
3804            D: serde::Deserializer<'de>,
3805        {
3806            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
3807                ".google.cloud.securitycenter.v2.Connection.Protocol",
3808            ))
3809        }
3810    }
3811}
3812
3813/// Details about specific contacts
3814#[derive(Clone, Default, PartialEq)]
3815#[non_exhaustive]
3816pub struct ContactDetails {
3817    /// A list of contacts
3818    pub contacts: std::vec::Vec<crate::model::Contact>,
3819
3820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3821}
3822
3823impl ContactDetails {
3824    /// Creates a new default instance.
3825    pub fn new() -> Self {
3826        std::default::Default::default()
3827    }
3828
3829    /// Sets the value of [contacts][crate::model::ContactDetails::contacts].
3830    ///
3831    /// # Example
3832    /// ```ignore,no_run
3833    /// # use google_cloud_securitycenter_v2::model::ContactDetails;
3834    /// use google_cloud_securitycenter_v2::model::Contact;
3835    /// let x = ContactDetails::new()
3836    ///     .set_contacts([
3837    ///         Contact::default()/* use setters */,
3838    ///         Contact::default()/* use (different) setters */,
3839    ///     ]);
3840    /// ```
3841    pub fn set_contacts<T, V>(mut self, v: T) -> Self
3842    where
3843        T: std::iter::IntoIterator<Item = V>,
3844        V: std::convert::Into<crate::model::Contact>,
3845    {
3846        use std::iter::Iterator;
3847        self.contacts = v.into_iter().map(|i| i.into()).collect();
3848        self
3849    }
3850}
3851
3852impl wkt::message::Message for ContactDetails {
3853    fn typename() -> &'static str {
3854        "type.googleapis.com/google.cloud.securitycenter.v2.ContactDetails"
3855    }
3856}
3857
3858/// The email address of a contact.
3859#[derive(Clone, Default, PartialEq)]
3860#[non_exhaustive]
3861pub struct Contact {
3862    /// An email address. For example, "`person123@company.com`".
3863    pub email: std::string::String,
3864
3865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3866}
3867
3868impl Contact {
3869    /// Creates a new default instance.
3870    pub fn new() -> Self {
3871        std::default::Default::default()
3872    }
3873
3874    /// Sets the value of [email][crate::model::Contact::email].
3875    ///
3876    /// # Example
3877    /// ```ignore,no_run
3878    /// # use google_cloud_securitycenter_v2::model::Contact;
3879    /// let x = Contact::new().set_email("example");
3880    /// ```
3881    pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3882        self.email = v.into();
3883        self
3884    }
3885}
3886
3887impl wkt::message::Message for Contact {
3888    fn typename() -> &'static str {
3889        "type.googleapis.com/google.cloud.securitycenter.v2.Contact"
3890    }
3891}
3892
3893/// Container associated with the finding.
3894#[derive(Clone, Default, PartialEq)]
3895#[non_exhaustive]
3896pub struct Container {
3897    /// Name of the container.
3898    pub name: std::string::String,
3899
3900    /// Container image URI provided when configuring a pod or container. This
3901    /// string can identify a container image version using mutable tags.
3902    pub uri: std::string::String,
3903
3904    /// Optional container image ID, if provided by the container runtime. Uniquely
3905    /// identifies the container image launched using a container image digest.
3906    pub image_id: std::string::String,
3907
3908    /// Container labels, as provided by the container runtime.
3909    pub labels: std::vec::Vec<crate::model::Label>,
3910
3911    /// The time that the container was created.
3912    pub create_time: std::option::Option<wkt::Timestamp>,
3913
3914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3915}
3916
3917impl Container {
3918    /// Creates a new default instance.
3919    pub fn new() -> Self {
3920        std::default::Default::default()
3921    }
3922
3923    /// Sets the value of [name][crate::model::Container::name].
3924    ///
3925    /// # Example
3926    /// ```ignore,no_run
3927    /// # use google_cloud_securitycenter_v2::model::Container;
3928    /// let x = Container::new().set_name("example");
3929    /// ```
3930    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3931        self.name = v.into();
3932        self
3933    }
3934
3935    /// Sets the value of [uri][crate::model::Container::uri].
3936    ///
3937    /// # Example
3938    /// ```ignore,no_run
3939    /// # use google_cloud_securitycenter_v2::model::Container;
3940    /// let x = Container::new().set_uri("example");
3941    /// ```
3942    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3943        self.uri = v.into();
3944        self
3945    }
3946
3947    /// Sets the value of [image_id][crate::model::Container::image_id].
3948    ///
3949    /// # Example
3950    /// ```ignore,no_run
3951    /// # use google_cloud_securitycenter_v2::model::Container;
3952    /// let x = Container::new().set_image_id("example");
3953    /// ```
3954    pub fn set_image_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3955        self.image_id = v.into();
3956        self
3957    }
3958
3959    /// Sets the value of [labels][crate::model::Container::labels].
3960    ///
3961    /// # Example
3962    /// ```ignore,no_run
3963    /// # use google_cloud_securitycenter_v2::model::Container;
3964    /// use google_cloud_securitycenter_v2::model::Label;
3965    /// let x = Container::new()
3966    ///     .set_labels([
3967    ///         Label::default()/* use setters */,
3968    ///         Label::default()/* use (different) setters */,
3969    ///     ]);
3970    /// ```
3971    pub fn set_labels<T, V>(mut self, v: T) -> Self
3972    where
3973        T: std::iter::IntoIterator<Item = V>,
3974        V: std::convert::Into<crate::model::Label>,
3975    {
3976        use std::iter::Iterator;
3977        self.labels = v.into_iter().map(|i| i.into()).collect();
3978        self
3979    }
3980
3981    /// Sets the value of [create_time][crate::model::Container::create_time].
3982    ///
3983    /// # Example
3984    /// ```ignore,no_run
3985    /// # use google_cloud_securitycenter_v2::model::Container;
3986    /// use wkt::Timestamp;
3987    /// let x = Container::new().set_create_time(Timestamp::default()/* use setters */);
3988    /// ```
3989    pub fn set_create_time<T>(mut self, v: T) -> Self
3990    where
3991        T: std::convert::Into<wkt::Timestamp>,
3992    {
3993        self.create_time = std::option::Option::Some(v.into());
3994        self
3995    }
3996
3997    /// Sets or clears the value of [create_time][crate::model::Container::create_time].
3998    ///
3999    /// # Example
4000    /// ```ignore,no_run
4001    /// # use google_cloud_securitycenter_v2::model::Container;
4002    /// use wkt::Timestamp;
4003    /// let x = Container::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4004    /// let x = Container::new().set_or_clear_create_time(None::<Timestamp>);
4005    /// ```
4006    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4007    where
4008        T: std::convert::Into<wkt::Timestamp>,
4009    {
4010        self.create_time = v.map(|x| x.into());
4011        self
4012    }
4013}
4014
4015impl wkt::message::Message for Container {
4016    fn typename() -> &'static str {
4017        "type.googleapis.com/google.cloud.securitycenter.v2.Container"
4018    }
4019}
4020
4021/// Details about a data access attempt made by a principal not authorized under
4022/// applicable data security policy.
4023#[derive(Clone, Default, PartialEq)]
4024#[non_exhaustive]
4025pub struct DataAccessEvent {
4026    /// Unique identifier for data access event.
4027    pub event_id: std::string::String,
4028
4029    /// The email address of the principal that accessed the data. The principal
4030    /// could be a user account, service account, Google group, or other.
4031    pub principal_email: std::string::String,
4032
4033    /// The operation performed by the principal to access the data.
4034    pub operation: crate::model::data_access_event::Operation,
4035
4036    /// Timestamp of data access event.
4037    pub event_time: std::option::Option<wkt::Timestamp>,
4038
4039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4040}
4041
4042impl DataAccessEvent {
4043    /// Creates a new default instance.
4044    pub fn new() -> Self {
4045        std::default::Default::default()
4046    }
4047
4048    /// Sets the value of [event_id][crate::model::DataAccessEvent::event_id].
4049    ///
4050    /// # Example
4051    /// ```ignore,no_run
4052    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
4053    /// let x = DataAccessEvent::new().set_event_id("example");
4054    /// ```
4055    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4056        self.event_id = v.into();
4057        self
4058    }
4059
4060    /// Sets the value of [principal_email][crate::model::DataAccessEvent::principal_email].
4061    ///
4062    /// # Example
4063    /// ```ignore,no_run
4064    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
4065    /// let x = DataAccessEvent::new().set_principal_email("example");
4066    /// ```
4067    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4068        self.principal_email = v.into();
4069        self
4070    }
4071
4072    /// Sets the value of [operation][crate::model::DataAccessEvent::operation].
4073    ///
4074    /// # Example
4075    /// ```ignore,no_run
4076    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
4077    /// use google_cloud_securitycenter_v2::model::data_access_event::Operation;
4078    /// let x0 = DataAccessEvent::new().set_operation(Operation::Read);
4079    /// let x1 = DataAccessEvent::new().set_operation(Operation::Move);
4080    /// let x2 = DataAccessEvent::new().set_operation(Operation::Copy);
4081    /// ```
4082    pub fn set_operation<T: std::convert::Into<crate::model::data_access_event::Operation>>(
4083        mut self,
4084        v: T,
4085    ) -> Self {
4086        self.operation = v.into();
4087        self
4088    }
4089
4090    /// Sets the value of [event_time][crate::model::DataAccessEvent::event_time].
4091    ///
4092    /// # Example
4093    /// ```ignore,no_run
4094    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
4095    /// use wkt::Timestamp;
4096    /// let x = DataAccessEvent::new().set_event_time(Timestamp::default()/* use setters */);
4097    /// ```
4098    pub fn set_event_time<T>(mut self, v: T) -> Self
4099    where
4100        T: std::convert::Into<wkt::Timestamp>,
4101    {
4102        self.event_time = std::option::Option::Some(v.into());
4103        self
4104    }
4105
4106    /// Sets or clears the value of [event_time][crate::model::DataAccessEvent::event_time].
4107    ///
4108    /// # Example
4109    /// ```ignore,no_run
4110    /// # use google_cloud_securitycenter_v2::model::DataAccessEvent;
4111    /// use wkt::Timestamp;
4112    /// let x = DataAccessEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
4113    /// let x = DataAccessEvent::new().set_or_clear_event_time(None::<Timestamp>);
4114    /// ```
4115    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
4116    where
4117        T: std::convert::Into<wkt::Timestamp>,
4118    {
4119        self.event_time = v.map(|x| x.into());
4120        self
4121    }
4122}
4123
4124impl wkt::message::Message for DataAccessEvent {
4125    fn typename() -> &'static str {
4126        "type.googleapis.com/google.cloud.securitycenter.v2.DataAccessEvent"
4127    }
4128}
4129
4130/// Defines additional types related to [DataAccessEvent].
4131pub mod data_access_event {
4132    #[allow(unused_imports)]
4133    use super::*;
4134
4135    /// The operation of a data access event.
4136    ///
4137    /// # Working with unknown values
4138    ///
4139    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4140    /// additional enum variants at any time. Adding new variants is not considered
4141    /// a breaking change. Applications should write their code in anticipation of:
4142    ///
4143    /// - New values appearing in future releases of the client library, **and**
4144    /// - New values received dynamically, without application changes.
4145    ///
4146    /// Please consult the [Working with enums] section in the user guide for some
4147    /// guidelines.
4148    ///
4149    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4150    #[derive(Clone, Debug, PartialEq)]
4151    #[non_exhaustive]
4152    pub enum Operation {
4153        /// The operation is unspecified.
4154        Unspecified,
4155        /// Represents a read operation.
4156        Read,
4157        /// Represents a move operation.
4158        Move,
4159        /// Represents a copy operation.
4160        Copy,
4161        /// If set, the enum was initialized with an unknown value.
4162        ///
4163        /// Applications can examine the value using [Operation::value] or
4164        /// [Operation::name].
4165        UnknownValue(operation::UnknownValue),
4166    }
4167
4168    #[doc(hidden)]
4169    pub mod operation {
4170        #[allow(unused_imports)]
4171        use super::*;
4172        #[derive(Clone, Debug, PartialEq)]
4173        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4174    }
4175
4176    impl Operation {
4177        /// Gets the enum value.
4178        ///
4179        /// Returns `None` if the enum contains an unknown value deserialized from
4180        /// the string representation of enums.
4181        pub fn value(&self) -> std::option::Option<i32> {
4182            match self {
4183                Self::Unspecified => std::option::Option::Some(0),
4184                Self::Read => std::option::Option::Some(1),
4185                Self::Move => std::option::Option::Some(2),
4186                Self::Copy => std::option::Option::Some(3),
4187                Self::UnknownValue(u) => u.0.value(),
4188            }
4189        }
4190
4191        /// Gets the enum value as a string.
4192        ///
4193        /// Returns `None` if the enum contains an unknown value deserialized from
4194        /// the integer representation of enums.
4195        pub fn name(&self) -> std::option::Option<&str> {
4196            match self {
4197                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
4198                Self::Read => std::option::Option::Some("READ"),
4199                Self::Move => std::option::Option::Some("MOVE"),
4200                Self::Copy => std::option::Option::Some("COPY"),
4201                Self::UnknownValue(u) => u.0.name(),
4202            }
4203        }
4204    }
4205
4206    impl std::default::Default for Operation {
4207        fn default() -> Self {
4208            use std::convert::From;
4209            Self::from(0)
4210        }
4211    }
4212
4213    impl std::fmt::Display for Operation {
4214        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4215            wkt::internal::display_enum(f, self.name(), self.value())
4216        }
4217    }
4218
4219    impl std::convert::From<i32> for Operation {
4220        fn from(value: i32) -> Self {
4221            match value {
4222                0 => Self::Unspecified,
4223                1 => Self::Read,
4224                2 => Self::Move,
4225                3 => Self::Copy,
4226                _ => Self::UnknownValue(operation::UnknownValue(
4227                    wkt::internal::UnknownEnumValue::Integer(value),
4228                )),
4229            }
4230        }
4231    }
4232
4233    impl std::convert::From<&str> for Operation {
4234        fn from(value: &str) -> Self {
4235            use std::string::ToString;
4236            match value {
4237                "OPERATION_UNSPECIFIED" => Self::Unspecified,
4238                "READ" => Self::Read,
4239                "MOVE" => Self::Move,
4240                "COPY" => Self::Copy,
4241                _ => Self::UnknownValue(operation::UnknownValue(
4242                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4243                )),
4244            }
4245        }
4246    }
4247
4248    impl serde::ser::Serialize for Operation {
4249        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4250        where
4251            S: serde::Serializer,
4252        {
4253            match self {
4254                Self::Unspecified => serializer.serialize_i32(0),
4255                Self::Read => serializer.serialize_i32(1),
4256                Self::Move => serializer.serialize_i32(2),
4257                Self::Copy => serializer.serialize_i32(3),
4258                Self::UnknownValue(u) => u.0.serialize(serializer),
4259            }
4260        }
4261    }
4262
4263    impl<'de> serde::de::Deserialize<'de> for Operation {
4264        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4265        where
4266            D: serde::Deserializer<'de>,
4267        {
4268            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
4269                ".google.cloud.securitycenter.v2.DataAccessEvent.Operation",
4270            ))
4271        }
4272    }
4273}
4274
4275/// Details about a data flow event, in which either the data is moved to or is
4276/// accessed from a non-compliant geo-location, as defined in the applicable data
4277/// security policy.
4278#[derive(Clone, Default, PartialEq)]
4279#[non_exhaustive]
4280pub struct DataFlowEvent {
4281    /// Unique identifier for data flow event.
4282    pub event_id: std::string::String,
4283
4284    /// The email address of the principal that initiated the data flow event. The
4285    /// principal could be a user account, service account, Google group, or other.
4286    pub principal_email: std::string::String,
4287
4288    /// The operation performed by the principal for the data flow event.
4289    pub operation: crate::model::data_flow_event::Operation,
4290
4291    /// Non-compliant location of the principal or the data destination.
4292    pub violated_location: std::string::String,
4293
4294    /// Timestamp of data flow event.
4295    pub event_time: std::option::Option<wkt::Timestamp>,
4296
4297    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4298}
4299
4300impl DataFlowEvent {
4301    /// Creates a new default instance.
4302    pub fn new() -> Self {
4303        std::default::Default::default()
4304    }
4305
4306    /// Sets the value of [event_id][crate::model::DataFlowEvent::event_id].
4307    ///
4308    /// # Example
4309    /// ```ignore,no_run
4310    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4311    /// let x = DataFlowEvent::new().set_event_id("example");
4312    /// ```
4313    pub fn set_event_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4314        self.event_id = v.into();
4315        self
4316    }
4317
4318    /// Sets the value of [principal_email][crate::model::DataFlowEvent::principal_email].
4319    ///
4320    /// # Example
4321    /// ```ignore,no_run
4322    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4323    /// let x = DataFlowEvent::new().set_principal_email("example");
4324    /// ```
4325    pub fn set_principal_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4326        self.principal_email = v.into();
4327        self
4328    }
4329
4330    /// Sets the value of [operation][crate::model::DataFlowEvent::operation].
4331    ///
4332    /// # Example
4333    /// ```ignore,no_run
4334    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4335    /// use google_cloud_securitycenter_v2::model::data_flow_event::Operation;
4336    /// let x0 = DataFlowEvent::new().set_operation(Operation::Read);
4337    /// let x1 = DataFlowEvent::new().set_operation(Operation::Move);
4338    /// let x2 = DataFlowEvent::new().set_operation(Operation::Copy);
4339    /// ```
4340    pub fn set_operation<T: std::convert::Into<crate::model::data_flow_event::Operation>>(
4341        mut self,
4342        v: T,
4343    ) -> Self {
4344        self.operation = v.into();
4345        self
4346    }
4347
4348    /// Sets the value of [violated_location][crate::model::DataFlowEvent::violated_location].
4349    ///
4350    /// # Example
4351    /// ```ignore,no_run
4352    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4353    /// let x = DataFlowEvent::new().set_violated_location("example");
4354    /// ```
4355    pub fn set_violated_location<T: std::convert::Into<std::string::String>>(
4356        mut self,
4357        v: T,
4358    ) -> Self {
4359        self.violated_location = v.into();
4360        self
4361    }
4362
4363    /// Sets the value of [event_time][crate::model::DataFlowEvent::event_time].
4364    ///
4365    /// # Example
4366    /// ```ignore,no_run
4367    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4368    /// use wkt::Timestamp;
4369    /// let x = DataFlowEvent::new().set_event_time(Timestamp::default()/* use setters */);
4370    /// ```
4371    pub fn set_event_time<T>(mut self, v: T) -> Self
4372    where
4373        T: std::convert::Into<wkt::Timestamp>,
4374    {
4375        self.event_time = std::option::Option::Some(v.into());
4376        self
4377    }
4378
4379    /// Sets or clears the value of [event_time][crate::model::DataFlowEvent::event_time].
4380    ///
4381    /// # Example
4382    /// ```ignore,no_run
4383    /// # use google_cloud_securitycenter_v2::model::DataFlowEvent;
4384    /// use wkt::Timestamp;
4385    /// let x = DataFlowEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
4386    /// let x = DataFlowEvent::new().set_or_clear_event_time(None::<Timestamp>);
4387    /// ```
4388    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
4389    where
4390        T: std::convert::Into<wkt::Timestamp>,
4391    {
4392        self.event_time = v.map(|x| x.into());
4393        self
4394    }
4395}
4396
4397impl wkt::message::Message for DataFlowEvent {
4398    fn typename() -> &'static str {
4399        "type.googleapis.com/google.cloud.securitycenter.v2.DataFlowEvent"
4400    }
4401}
4402
4403/// Defines additional types related to [DataFlowEvent].
4404pub mod data_flow_event {
4405    #[allow(unused_imports)]
4406    use super::*;
4407
4408    /// The operation of a data flow event.
4409    ///
4410    /// # Working with unknown values
4411    ///
4412    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4413    /// additional enum variants at any time. Adding new variants is not considered
4414    /// a breaking change. Applications should write their code in anticipation of:
4415    ///
4416    /// - New values appearing in future releases of the client library, **and**
4417    /// - New values received dynamically, without application changes.
4418    ///
4419    /// Please consult the [Working with enums] section in the user guide for some
4420    /// guidelines.
4421    ///
4422    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4423    #[derive(Clone, Debug, PartialEq)]
4424    #[non_exhaustive]
4425    pub enum Operation {
4426        /// The operation is unspecified.
4427        Unspecified,
4428        /// Represents a read operation.
4429        Read,
4430        /// Represents a move operation.
4431        Move,
4432        /// Represents a copy operation.
4433        Copy,
4434        /// If set, the enum was initialized with an unknown value.
4435        ///
4436        /// Applications can examine the value using [Operation::value] or
4437        /// [Operation::name].
4438        UnknownValue(operation::UnknownValue),
4439    }
4440
4441    #[doc(hidden)]
4442    pub mod operation {
4443        #[allow(unused_imports)]
4444        use super::*;
4445        #[derive(Clone, Debug, PartialEq)]
4446        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4447    }
4448
4449    impl Operation {
4450        /// Gets the enum value.
4451        ///
4452        /// Returns `None` if the enum contains an unknown value deserialized from
4453        /// the string representation of enums.
4454        pub fn value(&self) -> std::option::Option<i32> {
4455            match self {
4456                Self::Unspecified => std::option::Option::Some(0),
4457                Self::Read => std::option::Option::Some(1),
4458                Self::Move => std::option::Option::Some(2),
4459                Self::Copy => std::option::Option::Some(3),
4460                Self::UnknownValue(u) => u.0.value(),
4461            }
4462        }
4463
4464        /// Gets the enum value as a string.
4465        ///
4466        /// Returns `None` if the enum contains an unknown value deserialized from
4467        /// the integer representation of enums.
4468        pub fn name(&self) -> std::option::Option<&str> {
4469            match self {
4470                Self::Unspecified => std::option::Option::Some("OPERATION_UNSPECIFIED"),
4471                Self::Read => std::option::Option::Some("READ"),
4472                Self::Move => std::option::Option::Some("MOVE"),
4473                Self::Copy => std::option::Option::Some("COPY"),
4474                Self::UnknownValue(u) => u.0.name(),
4475            }
4476        }
4477    }
4478
4479    impl std::default::Default for Operation {
4480        fn default() -> Self {
4481            use std::convert::From;
4482            Self::from(0)
4483        }
4484    }
4485
4486    impl std::fmt::Display for Operation {
4487        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4488            wkt::internal::display_enum(f, self.name(), self.value())
4489        }
4490    }
4491
4492    impl std::convert::From<i32> for Operation {
4493        fn from(value: i32) -> Self {
4494            match value {
4495                0 => Self::Unspecified,
4496                1 => Self::Read,
4497                2 => Self::Move,
4498                3 => Self::Copy,
4499                _ => Self::UnknownValue(operation::UnknownValue(
4500                    wkt::internal::UnknownEnumValue::Integer(value),
4501                )),
4502            }
4503        }
4504    }
4505
4506    impl std::convert::From<&str> for Operation {
4507        fn from(value: &str) -> Self {
4508            use std::string::ToString;
4509            match value {
4510                "OPERATION_UNSPECIFIED" => Self::Unspecified,
4511                "READ" => Self::Read,
4512                "MOVE" => Self::Move,
4513                "COPY" => Self::Copy,
4514                _ => Self::UnknownValue(operation::UnknownValue(
4515                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4516                )),
4517            }
4518        }
4519    }
4520
4521    impl serde::ser::Serialize for Operation {
4522        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4523        where
4524            S: serde::Serializer,
4525        {
4526            match self {
4527                Self::Unspecified => serializer.serialize_i32(0),
4528                Self::Read => serializer.serialize_i32(1),
4529                Self::Move => serializer.serialize_i32(2),
4530                Self::Copy => serializer.serialize_i32(3),
4531                Self::UnknownValue(u) => u.0.serialize(serializer),
4532            }
4533        }
4534    }
4535
4536    impl<'de> serde::de::Deserialize<'de> for Operation {
4537        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4538        where
4539            D: serde::Deserializer<'de>,
4540        {
4541            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operation>::new(
4542                ".google.cloud.securitycenter.v2.DataFlowEvent.Operation",
4543            ))
4544        }
4545    }
4546}
4547
4548/// Details about data retention deletion violations, in which the data is
4549/// non-compliant based on their retention or deletion time, as defined in the
4550/// applicable data security policy. The Data Retention Deletion (DRD) control is
4551/// a control of the DSPM (Data Security Posture Management) suite that enables
4552/// organizations to manage data retention and deletion policies in compliance
4553/// with regulations, such as GDPR and CRPA. DRD supports two primary policy
4554/// types: maximum storage length (max TTL) and minimum storage length (min TTL).
4555/// Both are aimed at helping organizations meet regulatory and data management
4556/// commitments.
4557#[derive(Clone, Default, PartialEq)]
4558#[non_exhaustive]
4559pub struct DataRetentionDeletionEvent {
4560    /// Timestamp indicating when the event was detected.
4561    pub event_detection_time: std::option::Option<wkt::Timestamp>,
4562
4563    /// Number of objects that violated the policy for this resource. If the number
4564    /// is less than 1,000, then the value of this field is the exact number. If
4565    /// the number of objects that violated the policy is greater than or equal to
4566    /// 1,000, then the value of this field is 1000.
4567    pub data_object_count: i64,
4568
4569    /// Maximum duration of retention allowed from the DRD control. This comes
4570    /// from the DRD control where users set a max TTL for their data. For example,
4571    /// suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.
4572    /// However, an object in that bucket is 100 days old. In this case, a
4573    /// DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
4574    /// and the max_retention_allowed is 90 days.
4575    pub max_retention_allowed: std::option::Option<wkt::Duration>,
4576
4577    /// Type of the DRD event.
4578    pub event_type: crate::model::data_retention_deletion_event::EventType,
4579
4580    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4581}
4582
4583impl DataRetentionDeletionEvent {
4584    /// Creates a new default instance.
4585    pub fn new() -> Self {
4586        std::default::Default::default()
4587    }
4588
4589    /// Sets the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4590    ///
4591    /// # Example
4592    /// ```ignore,no_run
4593    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4594    /// use wkt::Timestamp;
4595    /// let x = DataRetentionDeletionEvent::new().set_event_detection_time(Timestamp::default()/* use setters */);
4596    /// ```
4597    pub fn set_event_detection_time<T>(mut self, v: T) -> Self
4598    where
4599        T: std::convert::Into<wkt::Timestamp>,
4600    {
4601        self.event_detection_time = std::option::Option::Some(v.into());
4602        self
4603    }
4604
4605    /// Sets or clears the value of [event_detection_time][crate::model::DataRetentionDeletionEvent::event_detection_time].
4606    ///
4607    /// # Example
4608    /// ```ignore,no_run
4609    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4610    /// use wkt::Timestamp;
4611    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(Some(Timestamp::default()/* use setters */));
4612    /// let x = DataRetentionDeletionEvent::new().set_or_clear_event_detection_time(None::<Timestamp>);
4613    /// ```
4614    pub fn set_or_clear_event_detection_time<T>(mut self, v: std::option::Option<T>) -> Self
4615    where
4616        T: std::convert::Into<wkt::Timestamp>,
4617    {
4618        self.event_detection_time = v.map(|x| x.into());
4619        self
4620    }
4621
4622    /// Sets the value of [data_object_count][crate::model::DataRetentionDeletionEvent::data_object_count].
4623    ///
4624    /// # Example
4625    /// ```ignore,no_run
4626    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4627    /// let x = DataRetentionDeletionEvent::new().set_data_object_count(42);
4628    /// ```
4629    pub fn set_data_object_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4630        self.data_object_count = v.into();
4631        self
4632    }
4633
4634    /// Sets the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4635    ///
4636    /// # Example
4637    /// ```ignore,no_run
4638    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4639    /// use wkt::Duration;
4640    /// let x = DataRetentionDeletionEvent::new().set_max_retention_allowed(Duration::default()/* use setters */);
4641    /// ```
4642    pub fn set_max_retention_allowed<T>(mut self, v: T) -> Self
4643    where
4644        T: std::convert::Into<wkt::Duration>,
4645    {
4646        self.max_retention_allowed = std::option::Option::Some(v.into());
4647        self
4648    }
4649
4650    /// Sets or clears the value of [max_retention_allowed][crate::model::DataRetentionDeletionEvent::max_retention_allowed].
4651    ///
4652    /// # Example
4653    /// ```ignore,no_run
4654    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4655    /// use wkt::Duration;
4656    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(Some(Duration::default()/* use setters */));
4657    /// let x = DataRetentionDeletionEvent::new().set_or_clear_max_retention_allowed(None::<Duration>);
4658    /// ```
4659    pub fn set_or_clear_max_retention_allowed<T>(mut self, v: std::option::Option<T>) -> Self
4660    where
4661        T: std::convert::Into<wkt::Duration>,
4662    {
4663        self.max_retention_allowed = v.map(|x| x.into());
4664        self
4665    }
4666
4667    /// Sets the value of [event_type][crate::model::DataRetentionDeletionEvent::event_type].
4668    ///
4669    /// # Example
4670    /// ```ignore,no_run
4671    /// # use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
4672    /// use google_cloud_securitycenter_v2::model::data_retention_deletion_event::EventType;
4673    /// let x0 = DataRetentionDeletionEvent::new().set_event_type(EventType::MaxTtlExceeded);
4674    /// ```
4675    pub fn set_event_type<
4676        T: std::convert::Into<crate::model::data_retention_deletion_event::EventType>,
4677    >(
4678        mut self,
4679        v: T,
4680    ) -> Self {
4681        self.event_type = v.into();
4682        self
4683    }
4684}
4685
4686impl wkt::message::Message for DataRetentionDeletionEvent {
4687    fn typename() -> &'static str {
4688        "type.googleapis.com/google.cloud.securitycenter.v2.DataRetentionDeletionEvent"
4689    }
4690}
4691
4692/// Defines additional types related to [DataRetentionDeletionEvent].
4693pub mod data_retention_deletion_event {
4694    #[allow(unused_imports)]
4695    use super::*;
4696
4697    /// Type of the DRD event.
4698    ///
4699    /// # Working with unknown values
4700    ///
4701    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4702    /// additional enum variants at any time. Adding new variants is not considered
4703    /// a breaking change. Applications should write their code in anticipation of:
4704    ///
4705    /// - New values appearing in future releases of the client library, **and**
4706    /// - New values received dynamically, without application changes.
4707    ///
4708    /// Please consult the [Working with enums] section in the user guide for some
4709    /// guidelines.
4710    ///
4711    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4712    #[derive(Clone, Debug, PartialEq)]
4713    #[non_exhaustive]
4714    pub enum EventType {
4715        /// Unspecified event type.
4716        Unspecified,
4717        /// The maximum retention time has been exceeded.
4718        MaxTtlExceeded,
4719        /// If set, the enum was initialized with an unknown value.
4720        ///
4721        /// Applications can examine the value using [EventType::value] or
4722        /// [EventType::name].
4723        UnknownValue(event_type::UnknownValue),
4724    }
4725
4726    #[doc(hidden)]
4727    pub mod event_type {
4728        #[allow(unused_imports)]
4729        use super::*;
4730        #[derive(Clone, Debug, PartialEq)]
4731        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4732    }
4733
4734    impl EventType {
4735        /// Gets the enum value.
4736        ///
4737        /// Returns `None` if the enum contains an unknown value deserialized from
4738        /// the string representation of enums.
4739        pub fn value(&self) -> std::option::Option<i32> {
4740            match self {
4741                Self::Unspecified => std::option::Option::Some(0),
4742                Self::MaxTtlExceeded => std::option::Option::Some(1),
4743                Self::UnknownValue(u) => u.0.value(),
4744            }
4745        }
4746
4747        /// Gets the enum value as a string.
4748        ///
4749        /// Returns `None` if the enum contains an unknown value deserialized from
4750        /// the integer representation of enums.
4751        pub fn name(&self) -> std::option::Option<&str> {
4752            match self {
4753                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
4754                Self::MaxTtlExceeded => std::option::Option::Some("EVENT_TYPE_MAX_TTL_EXCEEDED"),
4755                Self::UnknownValue(u) => u.0.name(),
4756            }
4757        }
4758    }
4759
4760    impl std::default::Default for EventType {
4761        fn default() -> Self {
4762            use std::convert::From;
4763            Self::from(0)
4764        }
4765    }
4766
4767    impl std::fmt::Display for EventType {
4768        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4769            wkt::internal::display_enum(f, self.name(), self.value())
4770        }
4771    }
4772
4773    impl std::convert::From<i32> for EventType {
4774        fn from(value: i32) -> Self {
4775            match value {
4776                0 => Self::Unspecified,
4777                1 => Self::MaxTtlExceeded,
4778                _ => Self::UnknownValue(event_type::UnknownValue(
4779                    wkt::internal::UnknownEnumValue::Integer(value),
4780                )),
4781            }
4782        }
4783    }
4784
4785    impl std::convert::From<&str> for EventType {
4786        fn from(value: &str) -> Self {
4787            use std::string::ToString;
4788            match value {
4789                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
4790                "EVENT_TYPE_MAX_TTL_EXCEEDED" => Self::MaxTtlExceeded,
4791                _ => Self::UnknownValue(event_type::UnknownValue(
4792                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4793                )),
4794            }
4795        }
4796    }
4797
4798    impl serde::ser::Serialize for EventType {
4799        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4800        where
4801            S: serde::Serializer,
4802        {
4803            match self {
4804                Self::Unspecified => serializer.serialize_i32(0),
4805                Self::MaxTtlExceeded => serializer.serialize_i32(1),
4806                Self::UnknownValue(u) => u.0.serialize(serializer),
4807            }
4808        }
4809    }
4810
4811    impl<'de> serde::de::Deserialize<'de> for EventType {
4812        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4813        where
4814            D: serde::Deserializer<'de>,
4815        {
4816            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
4817                ".google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType",
4818            ))
4819        }
4820    }
4821}
4822
4823/// Represents database access information, such as queries. A database may be a
4824/// sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
4825/// Spanner instances), or the database instance itself. Some database resources
4826/// might not have the [full resource
4827/// name](https://google.aip.dev/122#full-resource-names) populated because these
4828/// resource types, such as Cloud SQL databases, are not yet supported by Cloud
4829/// Asset Inventory. In these cases only the display name is provided.
4830#[derive(Clone, Default, PartialEq)]
4831#[non_exhaustive]
4832pub struct Database {
4833    /// Some database resources may not have the [full resource
4834    /// name](https://google.aip.dev/122#full-resource-names) populated because
4835    /// these resource types are not yet supported by Cloud Asset Inventory (e.g.
4836    /// Cloud SQL databases). In these cases only the display name will be
4837    /// provided.
4838    /// The [full resource name](https://google.aip.dev/122#full-resource-names) of
4839    /// the database that the user connected to, if it is supported by Cloud Asset
4840    /// Inventory.
4841    pub name: std::string::String,
4842
4843    /// The human-readable name of the database that the user connected to.
4844    pub display_name: std::string::String,
4845
4846    /// The username used to connect to the database. The username might not be an
4847    /// IAM principal and does not have a set format.
4848    pub user_name: std::string::String,
4849
4850    /// The SQL statement that is associated with the database access.
4851    pub query: std::string::String,
4852
4853    /// The target usernames, roles, or groups of an SQL privilege grant, which is
4854    /// not an IAM policy change.
4855    pub grantees: std::vec::Vec<std::string::String>,
4856
4857    /// The version of the database, for example, POSTGRES_14.
4858    /// See [the complete
4859    /// list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
4860    pub version: std::string::String,
4861
4862    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4863}
4864
4865impl Database {
4866    /// Creates a new default instance.
4867    pub fn new() -> Self {
4868        std::default::Default::default()
4869    }
4870
4871    /// Sets the value of [name][crate::model::Database::name].
4872    ///
4873    /// # Example
4874    /// ```ignore,no_run
4875    /// # use google_cloud_securitycenter_v2::model::Database;
4876    /// let x = Database::new().set_name("example");
4877    /// ```
4878    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4879        self.name = v.into();
4880        self
4881    }
4882
4883    /// Sets the value of [display_name][crate::model::Database::display_name].
4884    ///
4885    /// # Example
4886    /// ```ignore,no_run
4887    /// # use google_cloud_securitycenter_v2::model::Database;
4888    /// let x = Database::new().set_display_name("example");
4889    /// ```
4890    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4891        self.display_name = v.into();
4892        self
4893    }
4894
4895    /// Sets the value of [user_name][crate::model::Database::user_name].
4896    ///
4897    /// # Example
4898    /// ```ignore,no_run
4899    /// # use google_cloud_securitycenter_v2::model::Database;
4900    /// let x = Database::new().set_user_name("example");
4901    /// ```
4902    pub fn set_user_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4903        self.user_name = v.into();
4904        self
4905    }
4906
4907    /// Sets the value of [query][crate::model::Database::query].
4908    ///
4909    /// # Example
4910    /// ```ignore,no_run
4911    /// # use google_cloud_securitycenter_v2::model::Database;
4912    /// let x = Database::new().set_query("example");
4913    /// ```
4914    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4915        self.query = v.into();
4916        self
4917    }
4918
4919    /// Sets the value of [grantees][crate::model::Database::grantees].
4920    ///
4921    /// # Example
4922    /// ```ignore,no_run
4923    /// # use google_cloud_securitycenter_v2::model::Database;
4924    /// let x = Database::new().set_grantees(["a", "b", "c"]);
4925    /// ```
4926    pub fn set_grantees<T, V>(mut self, v: T) -> Self
4927    where
4928        T: std::iter::IntoIterator<Item = V>,
4929        V: std::convert::Into<std::string::String>,
4930    {
4931        use std::iter::Iterator;
4932        self.grantees = v.into_iter().map(|i| i.into()).collect();
4933        self
4934    }
4935
4936    /// Sets the value of [version][crate::model::Database::version].
4937    ///
4938    /// # Example
4939    /// ```ignore,no_run
4940    /// # use google_cloud_securitycenter_v2::model::Database;
4941    /// let x = Database::new().set_version("example");
4942    /// ```
4943    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4944        self.version = v.into();
4945        self
4946    }
4947}
4948
4949impl wkt::message::Message for Database {
4950    fn typename() -> &'static str {
4951        "type.googleapis.com/google.cloud.securitycenter.v2.Database"
4952    }
4953}
4954
4955/// Contains information about the disk associated with the finding.
4956#[derive(Clone, Default, PartialEq)]
4957#[non_exhaustive]
4958pub struct Disk {
4959    /// The name of the disk, for example,
4960    /// `https://www.googleapis.com/compute/v1/projects/{project-id}/zones/{zone-id}/disks/{disk-id}`.
4961    pub name: std::string::String,
4962
4963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4964}
4965
4966impl Disk {
4967    /// Creates a new default instance.
4968    pub fn new() -> Self {
4969        std::default::Default::default()
4970    }
4971
4972    /// Sets the value of [name][crate::model::Disk::name].
4973    ///
4974    /// # Example
4975    /// ```ignore,no_run
4976    /// # use google_cloud_securitycenter_v2::model::Disk;
4977    /// let x = Disk::new().set_name("example");
4978    /// ```
4979    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4980        self.name = v.into();
4981        self
4982    }
4983}
4984
4985impl wkt::message::Message for Disk {
4986    fn typename() -> &'static str {
4987        "type.googleapis.com/google.cloud.securitycenter.v2.Disk"
4988    }
4989}
4990
4991/// Exfiltration represents a data exfiltration attempt from one or more sources
4992/// to one or more targets. The `sources` attribute lists the sources of the
4993/// exfiltrated data. The `targets` attribute lists the destinations the data was
4994/// copied to.
4995#[derive(Clone, Default, PartialEq)]
4996#[non_exhaustive]
4997pub struct Exfiltration {
4998    /// If there are multiple sources, then the data is considered "joined" between
4999    /// them. For instance, BigQuery can join multiple tables, and each
5000    /// table would be considered a source.
5001    pub sources: std::vec::Vec<crate::model::ExfilResource>,
5002
5003    /// If there are multiple targets, each target would get a complete copy of the
5004    /// "joined" source data.
5005    pub targets: std::vec::Vec<crate::model::ExfilResource>,
5006
5007    /// Total exfiltrated bytes processed for the entire job.
5008    pub total_exfiltrated_bytes: i64,
5009
5010    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5011}
5012
5013impl Exfiltration {
5014    /// Creates a new default instance.
5015    pub fn new() -> Self {
5016        std::default::Default::default()
5017    }
5018
5019    /// Sets the value of [sources][crate::model::Exfiltration::sources].
5020    ///
5021    /// # Example
5022    /// ```ignore,no_run
5023    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
5024    /// use google_cloud_securitycenter_v2::model::ExfilResource;
5025    /// let x = Exfiltration::new()
5026    ///     .set_sources([
5027    ///         ExfilResource::default()/* use setters */,
5028    ///         ExfilResource::default()/* use (different) setters */,
5029    ///     ]);
5030    /// ```
5031    pub fn set_sources<T, V>(mut self, v: T) -> Self
5032    where
5033        T: std::iter::IntoIterator<Item = V>,
5034        V: std::convert::Into<crate::model::ExfilResource>,
5035    {
5036        use std::iter::Iterator;
5037        self.sources = v.into_iter().map(|i| i.into()).collect();
5038        self
5039    }
5040
5041    /// Sets the value of [targets][crate::model::Exfiltration::targets].
5042    ///
5043    /// # Example
5044    /// ```ignore,no_run
5045    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
5046    /// use google_cloud_securitycenter_v2::model::ExfilResource;
5047    /// let x = Exfiltration::new()
5048    ///     .set_targets([
5049    ///         ExfilResource::default()/* use setters */,
5050    ///         ExfilResource::default()/* use (different) setters */,
5051    ///     ]);
5052    /// ```
5053    pub fn set_targets<T, V>(mut self, v: T) -> Self
5054    where
5055        T: std::iter::IntoIterator<Item = V>,
5056        V: std::convert::Into<crate::model::ExfilResource>,
5057    {
5058        use std::iter::Iterator;
5059        self.targets = v.into_iter().map(|i| i.into()).collect();
5060        self
5061    }
5062
5063    /// Sets the value of [total_exfiltrated_bytes][crate::model::Exfiltration::total_exfiltrated_bytes].
5064    ///
5065    /// # Example
5066    /// ```ignore,no_run
5067    /// # use google_cloud_securitycenter_v2::model::Exfiltration;
5068    /// let x = Exfiltration::new().set_total_exfiltrated_bytes(42);
5069    /// ```
5070    pub fn set_total_exfiltrated_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5071        self.total_exfiltrated_bytes = v.into();
5072        self
5073    }
5074}
5075
5076impl wkt::message::Message for Exfiltration {
5077    fn typename() -> &'static str {
5078        "type.googleapis.com/google.cloud.securitycenter.v2.Exfiltration"
5079    }
5080}
5081
5082/// Resource where data was exfiltrated from or exfiltrated to.
5083#[derive(Clone, Default, PartialEq)]
5084#[non_exhaustive]
5085pub struct ExfilResource {
5086    /// The resource's [full resource
5087    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
5088    pub name: std::string::String,
5089
5090    /// Subcomponents of the asset that was exfiltrated, like URIs used during
5091    /// exfiltration, table names, databases, and filenames. For example, multiple
5092    /// tables might have been exfiltrated from the same Cloud SQL instance, or
5093    /// multiple files might have been exfiltrated from the same Cloud Storage
5094    /// bucket.
5095    pub components: std::vec::Vec<std::string::String>,
5096
5097    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5098}
5099
5100impl ExfilResource {
5101    /// Creates a new default instance.
5102    pub fn new() -> Self {
5103        std::default::Default::default()
5104    }
5105
5106    /// Sets the value of [name][crate::model::ExfilResource::name].
5107    ///
5108    /// # Example
5109    /// ```ignore,no_run
5110    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
5111    /// let x = ExfilResource::new().set_name("example");
5112    /// ```
5113    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5114        self.name = v.into();
5115        self
5116    }
5117
5118    /// Sets the value of [components][crate::model::ExfilResource::components].
5119    ///
5120    /// # Example
5121    /// ```ignore,no_run
5122    /// # use google_cloud_securitycenter_v2::model::ExfilResource;
5123    /// let x = ExfilResource::new().set_components(["a", "b", "c"]);
5124    /// ```
5125    pub fn set_components<T, V>(mut self, v: T) -> Self
5126    where
5127        T: std::iter::IntoIterator<Item = V>,
5128        V: std::convert::Into<std::string::String>,
5129    {
5130        use std::iter::Iterator;
5131        self.components = v.into_iter().map(|i| i.into()).collect();
5132        self
5133    }
5134}
5135
5136impl wkt::message::Message for ExfilResource {
5137    fn typename() -> &'static str {
5138        "type.googleapis.com/google.cloud.securitycenter.v2.ExfilResource"
5139    }
5140}
5141
5142/// Representation of third party SIEM/SOAR fields within SCC.
5143#[derive(Clone, Default, PartialEq)]
5144#[non_exhaustive]
5145pub struct ExternalSystem {
5146    /// Full resource name of the external system. The following list
5147    /// shows some examples:
5148    ///
5149    /// + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
5150    ///
5151    /// `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
5152    ///
5153    /// + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
5154    ///
5155    /// `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
5156    ///
5157    /// + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
5158    ///
5159    /// `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
5160    pub name: std::string::String,
5161
5162    /// References primary/secondary etc assignees in the external system.
5163    pub assignees: std::vec::Vec<std::string::String>,
5164
5165    /// The identifier that's used to track the finding's corresponding case in the
5166    /// external system.
5167    pub external_uid: std::string::String,
5168
5169    /// The most recent status of the finding's corresponding case, as reported by
5170    /// the external system.
5171    pub status: std::string::String,
5172
5173    /// The time when the case was last updated, as reported by the external
5174    /// system.
5175    pub external_system_update_time: std::option::Option<wkt::Timestamp>,
5176
5177    /// The link to the finding's corresponding case in the external system.
5178    pub case_uri: std::string::String,
5179
5180    /// The priority of the finding's corresponding case in the external system.
5181    pub case_priority: std::string::String,
5182
5183    /// The SLA of the finding's corresponding case in the external system.
5184    pub case_sla: std::option::Option<wkt::Timestamp>,
5185
5186    /// The time when the case was created, as reported by the external system.
5187    pub case_create_time: std::option::Option<wkt::Timestamp>,
5188
5189    /// The time when the case was closed, as reported by the external system.
5190    pub case_close_time: std::option::Option<wkt::Timestamp>,
5191
5192    /// Information about the ticket, if any, that is being used to track the
5193    /// resolution of the issue that is identified by this finding.
5194    pub ticket_info: std::option::Option<crate::model::external_system::TicketInfo>,
5195
5196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5197}
5198
5199impl ExternalSystem {
5200    /// Creates a new default instance.
5201    pub fn new() -> Self {
5202        std::default::Default::default()
5203    }
5204
5205    /// Sets the value of [name][crate::model::ExternalSystem::name].
5206    ///
5207    /// # Example
5208    /// ```ignore,no_run
5209    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5210    /// # let organization_id = "organization_id";
5211    /// # let source_id = "source_id";
5212    /// # let finding_id = "finding_id";
5213    /// # let externalsystem_id = "externalsystem_id";
5214    /// let x = ExternalSystem::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/externalSystems/{externalsystem_id}"));
5215    /// ```
5216    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5217        self.name = v.into();
5218        self
5219    }
5220
5221    /// Sets the value of [assignees][crate::model::ExternalSystem::assignees].
5222    ///
5223    /// # Example
5224    /// ```ignore,no_run
5225    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5226    /// let x = ExternalSystem::new().set_assignees(["a", "b", "c"]);
5227    /// ```
5228    pub fn set_assignees<T, V>(mut self, v: T) -> Self
5229    where
5230        T: std::iter::IntoIterator<Item = V>,
5231        V: std::convert::Into<std::string::String>,
5232    {
5233        use std::iter::Iterator;
5234        self.assignees = v.into_iter().map(|i| i.into()).collect();
5235        self
5236    }
5237
5238    /// Sets the value of [external_uid][crate::model::ExternalSystem::external_uid].
5239    ///
5240    /// # Example
5241    /// ```ignore,no_run
5242    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5243    /// let x = ExternalSystem::new().set_external_uid("example");
5244    /// ```
5245    pub fn set_external_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5246        self.external_uid = v.into();
5247        self
5248    }
5249
5250    /// Sets the value of [status][crate::model::ExternalSystem::status].
5251    ///
5252    /// # Example
5253    /// ```ignore,no_run
5254    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5255    /// let x = ExternalSystem::new().set_status("example");
5256    /// ```
5257    pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5258        self.status = v.into();
5259        self
5260    }
5261
5262    /// Sets the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
5263    ///
5264    /// # Example
5265    /// ```ignore,no_run
5266    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5267    /// use wkt::Timestamp;
5268    /// let x = ExternalSystem::new().set_external_system_update_time(Timestamp::default()/* use setters */);
5269    /// ```
5270    pub fn set_external_system_update_time<T>(mut self, v: T) -> Self
5271    where
5272        T: std::convert::Into<wkt::Timestamp>,
5273    {
5274        self.external_system_update_time = std::option::Option::Some(v.into());
5275        self
5276    }
5277
5278    /// Sets or clears the value of [external_system_update_time][crate::model::ExternalSystem::external_system_update_time].
5279    ///
5280    /// # Example
5281    /// ```ignore,no_run
5282    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5283    /// use wkt::Timestamp;
5284    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(Some(Timestamp::default()/* use setters */));
5285    /// let x = ExternalSystem::new().set_or_clear_external_system_update_time(None::<Timestamp>);
5286    /// ```
5287    pub fn set_or_clear_external_system_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5288    where
5289        T: std::convert::Into<wkt::Timestamp>,
5290    {
5291        self.external_system_update_time = v.map(|x| x.into());
5292        self
5293    }
5294
5295    /// Sets the value of [case_uri][crate::model::ExternalSystem::case_uri].
5296    ///
5297    /// # Example
5298    /// ```ignore,no_run
5299    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5300    /// let x = ExternalSystem::new().set_case_uri("example");
5301    /// ```
5302    pub fn set_case_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5303        self.case_uri = v.into();
5304        self
5305    }
5306
5307    /// Sets the value of [case_priority][crate::model::ExternalSystem::case_priority].
5308    ///
5309    /// # Example
5310    /// ```ignore,no_run
5311    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5312    /// let x = ExternalSystem::new().set_case_priority("example");
5313    /// ```
5314    pub fn set_case_priority<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5315        self.case_priority = v.into();
5316        self
5317    }
5318
5319    /// Sets the value of [case_sla][crate::model::ExternalSystem::case_sla].
5320    ///
5321    /// # Example
5322    /// ```ignore,no_run
5323    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5324    /// use wkt::Timestamp;
5325    /// let x = ExternalSystem::new().set_case_sla(Timestamp::default()/* use setters */);
5326    /// ```
5327    pub fn set_case_sla<T>(mut self, v: T) -> Self
5328    where
5329        T: std::convert::Into<wkt::Timestamp>,
5330    {
5331        self.case_sla = std::option::Option::Some(v.into());
5332        self
5333    }
5334
5335    /// Sets or clears the value of [case_sla][crate::model::ExternalSystem::case_sla].
5336    ///
5337    /// # Example
5338    /// ```ignore,no_run
5339    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5340    /// use wkt::Timestamp;
5341    /// let x = ExternalSystem::new().set_or_clear_case_sla(Some(Timestamp::default()/* use setters */));
5342    /// let x = ExternalSystem::new().set_or_clear_case_sla(None::<Timestamp>);
5343    /// ```
5344    pub fn set_or_clear_case_sla<T>(mut self, v: std::option::Option<T>) -> Self
5345    where
5346        T: std::convert::Into<wkt::Timestamp>,
5347    {
5348        self.case_sla = v.map(|x| x.into());
5349        self
5350    }
5351
5352    /// Sets the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
5353    ///
5354    /// # Example
5355    /// ```ignore,no_run
5356    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5357    /// use wkt::Timestamp;
5358    /// let x = ExternalSystem::new().set_case_create_time(Timestamp::default()/* use setters */);
5359    /// ```
5360    pub fn set_case_create_time<T>(mut self, v: T) -> Self
5361    where
5362        T: std::convert::Into<wkt::Timestamp>,
5363    {
5364        self.case_create_time = std::option::Option::Some(v.into());
5365        self
5366    }
5367
5368    /// Sets or clears the value of [case_create_time][crate::model::ExternalSystem::case_create_time].
5369    ///
5370    /// # Example
5371    /// ```ignore,no_run
5372    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5373    /// use wkt::Timestamp;
5374    /// let x = ExternalSystem::new().set_or_clear_case_create_time(Some(Timestamp::default()/* use setters */));
5375    /// let x = ExternalSystem::new().set_or_clear_case_create_time(None::<Timestamp>);
5376    /// ```
5377    pub fn set_or_clear_case_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5378    where
5379        T: std::convert::Into<wkt::Timestamp>,
5380    {
5381        self.case_create_time = v.map(|x| x.into());
5382        self
5383    }
5384
5385    /// Sets the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
5386    ///
5387    /// # Example
5388    /// ```ignore,no_run
5389    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5390    /// use wkt::Timestamp;
5391    /// let x = ExternalSystem::new().set_case_close_time(Timestamp::default()/* use setters */);
5392    /// ```
5393    pub fn set_case_close_time<T>(mut self, v: T) -> Self
5394    where
5395        T: std::convert::Into<wkt::Timestamp>,
5396    {
5397        self.case_close_time = std::option::Option::Some(v.into());
5398        self
5399    }
5400
5401    /// Sets or clears the value of [case_close_time][crate::model::ExternalSystem::case_close_time].
5402    ///
5403    /// # Example
5404    /// ```ignore,no_run
5405    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5406    /// use wkt::Timestamp;
5407    /// let x = ExternalSystem::new().set_or_clear_case_close_time(Some(Timestamp::default()/* use setters */));
5408    /// let x = ExternalSystem::new().set_or_clear_case_close_time(None::<Timestamp>);
5409    /// ```
5410    pub fn set_or_clear_case_close_time<T>(mut self, v: std::option::Option<T>) -> Self
5411    where
5412        T: std::convert::Into<wkt::Timestamp>,
5413    {
5414        self.case_close_time = v.map(|x| x.into());
5415        self
5416    }
5417
5418    /// Sets the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
5419    ///
5420    /// # Example
5421    /// ```ignore,no_run
5422    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5423    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5424    /// let x = ExternalSystem::new().set_ticket_info(TicketInfo::default()/* use setters */);
5425    /// ```
5426    pub fn set_ticket_info<T>(mut self, v: T) -> Self
5427    where
5428        T: std::convert::Into<crate::model::external_system::TicketInfo>,
5429    {
5430        self.ticket_info = std::option::Option::Some(v.into());
5431        self
5432    }
5433
5434    /// Sets or clears the value of [ticket_info][crate::model::ExternalSystem::ticket_info].
5435    ///
5436    /// # Example
5437    /// ```ignore,no_run
5438    /// # use google_cloud_securitycenter_v2::model::ExternalSystem;
5439    /// use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5440    /// let x = ExternalSystem::new().set_or_clear_ticket_info(Some(TicketInfo::default()/* use setters */));
5441    /// let x = ExternalSystem::new().set_or_clear_ticket_info(None::<TicketInfo>);
5442    /// ```
5443    pub fn set_or_clear_ticket_info<T>(mut self, v: std::option::Option<T>) -> Self
5444    where
5445        T: std::convert::Into<crate::model::external_system::TicketInfo>,
5446    {
5447        self.ticket_info = v.map(|x| x.into());
5448        self
5449    }
5450}
5451
5452impl wkt::message::Message for ExternalSystem {
5453    fn typename() -> &'static str {
5454        "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem"
5455    }
5456}
5457
5458/// Defines additional types related to [ExternalSystem].
5459pub mod external_system {
5460    #[allow(unused_imports)]
5461    use super::*;
5462
5463    /// Information about the ticket, if any, that is being used to track the
5464    /// resolution of the issue that is identified by this finding.
5465    #[derive(Clone, Default, PartialEq)]
5466    #[non_exhaustive]
5467    pub struct TicketInfo {
5468        /// The identifier of the ticket in the ticket system.
5469        pub id: std::string::String,
5470
5471        /// The assignee of the ticket in the ticket system.
5472        pub assignee: std::string::String,
5473
5474        /// The description of the ticket in the ticket system.
5475        pub description: std::string::String,
5476
5477        /// The link to the ticket in the ticket system.
5478        pub uri: std::string::String,
5479
5480        /// The latest status of the ticket, as reported by the ticket system.
5481        pub status: std::string::String,
5482
5483        /// The time when the ticket was last updated, as reported by the ticket
5484        /// system.
5485        pub update_time: std::option::Option<wkt::Timestamp>,
5486
5487        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5488    }
5489
5490    impl TicketInfo {
5491        /// Creates a new default instance.
5492        pub fn new() -> Self {
5493            std::default::Default::default()
5494        }
5495
5496        /// Sets the value of [id][crate::model::external_system::TicketInfo::id].
5497        ///
5498        /// # Example
5499        /// ```ignore,no_run
5500        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5501        /// let x = TicketInfo::new().set_id("example");
5502        /// ```
5503        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5504            self.id = v.into();
5505            self
5506        }
5507
5508        /// Sets the value of [assignee][crate::model::external_system::TicketInfo::assignee].
5509        ///
5510        /// # Example
5511        /// ```ignore,no_run
5512        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5513        /// let x = TicketInfo::new().set_assignee("example");
5514        /// ```
5515        pub fn set_assignee<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5516            self.assignee = v.into();
5517            self
5518        }
5519
5520        /// Sets the value of [description][crate::model::external_system::TicketInfo::description].
5521        ///
5522        /// # Example
5523        /// ```ignore,no_run
5524        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5525        /// let x = TicketInfo::new().set_description("example");
5526        /// ```
5527        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5528            self.description = v.into();
5529            self
5530        }
5531
5532        /// Sets the value of [uri][crate::model::external_system::TicketInfo::uri].
5533        ///
5534        /// # Example
5535        /// ```ignore,no_run
5536        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5537        /// let x = TicketInfo::new().set_uri("example");
5538        /// ```
5539        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5540            self.uri = v.into();
5541            self
5542        }
5543
5544        /// Sets the value of [status][crate::model::external_system::TicketInfo::status].
5545        ///
5546        /// # Example
5547        /// ```ignore,no_run
5548        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5549        /// let x = TicketInfo::new().set_status("example");
5550        /// ```
5551        pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5552            self.status = v.into();
5553            self
5554        }
5555
5556        /// Sets the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5557        ///
5558        /// # Example
5559        /// ```ignore,no_run
5560        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5561        /// use wkt::Timestamp;
5562        /// let x = TicketInfo::new().set_update_time(Timestamp::default()/* use setters */);
5563        /// ```
5564        pub fn set_update_time<T>(mut self, v: T) -> Self
5565        where
5566            T: std::convert::Into<wkt::Timestamp>,
5567        {
5568            self.update_time = std::option::Option::Some(v.into());
5569            self
5570        }
5571
5572        /// Sets or clears the value of [update_time][crate::model::external_system::TicketInfo::update_time].
5573        ///
5574        /// # Example
5575        /// ```ignore,no_run
5576        /// # use google_cloud_securitycenter_v2::model::external_system::TicketInfo;
5577        /// use wkt::Timestamp;
5578        /// let x = TicketInfo::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5579        /// let x = TicketInfo::new().set_or_clear_update_time(None::<Timestamp>);
5580        /// ```
5581        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5582        where
5583            T: std::convert::Into<wkt::Timestamp>,
5584        {
5585            self.update_time = v.map(|x| x.into());
5586            self
5587        }
5588    }
5589
5590    impl wkt::message::Message for TicketInfo {
5591        fn typename() -> &'static str {
5592            "type.googleapis.com/google.cloud.securitycenter.v2.ExternalSystem.TicketInfo"
5593        }
5594    }
5595}
5596
5597/// File information about the related binary/library used by an executable, or
5598/// the script used by a script interpreter
5599#[derive(Clone, Default, PartialEq)]
5600#[non_exhaustive]
5601pub struct File {
5602    /// Absolute path of the file as a JSON encoded string.
5603    pub path: std::string::String,
5604
5605    /// Size of the file in bytes.
5606    pub size: i64,
5607
5608    /// SHA256 hash of the first hashed_size bytes of the file encoded as a
5609    /// hex string.  If hashed_size == size, sha256 represents the SHA256 hash
5610    /// of the entire file.
5611    pub sha256: std::string::String,
5612
5613    /// The length in bytes of the file prefix that was hashed.  If
5614    /// hashed_size == size, any hashes reported represent the entire
5615    /// file.
5616    pub hashed_size: i64,
5617
5618    /// True when the hash covers only a prefix of the file.
5619    pub partially_hashed: bool,
5620
5621    /// Prefix of the file contents as a JSON-encoded string.
5622    pub contents: std::string::String,
5623
5624    /// Path of the file in terms of underlying disk/partition identifiers.
5625    pub disk_path: std::option::Option<crate::model::file::DiskPath>,
5626
5627    /// Operation(s) performed on a file.
5628    pub operations: std::vec::Vec<crate::model::file::FileOperation>,
5629
5630    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5631}
5632
5633impl File {
5634    /// Creates a new default instance.
5635    pub fn new() -> Self {
5636        std::default::Default::default()
5637    }
5638
5639    /// Sets the value of [path][crate::model::File::path].
5640    ///
5641    /// # Example
5642    /// ```ignore,no_run
5643    /// # use google_cloud_securitycenter_v2::model::File;
5644    /// let x = File::new().set_path("example");
5645    /// ```
5646    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5647        self.path = v.into();
5648        self
5649    }
5650
5651    /// Sets the value of [size][crate::model::File::size].
5652    ///
5653    /// # Example
5654    /// ```ignore,no_run
5655    /// # use google_cloud_securitycenter_v2::model::File;
5656    /// let x = File::new().set_size(42);
5657    /// ```
5658    pub fn set_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5659        self.size = v.into();
5660        self
5661    }
5662
5663    /// Sets the value of [sha256][crate::model::File::sha256].
5664    ///
5665    /// # Example
5666    /// ```ignore,no_run
5667    /// # use google_cloud_securitycenter_v2::model::File;
5668    /// let x = File::new().set_sha256("example");
5669    /// ```
5670    pub fn set_sha256<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5671        self.sha256 = v.into();
5672        self
5673    }
5674
5675    /// Sets the value of [hashed_size][crate::model::File::hashed_size].
5676    ///
5677    /// # Example
5678    /// ```ignore,no_run
5679    /// # use google_cloud_securitycenter_v2::model::File;
5680    /// let x = File::new().set_hashed_size(42);
5681    /// ```
5682    pub fn set_hashed_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5683        self.hashed_size = v.into();
5684        self
5685    }
5686
5687    /// Sets the value of [partially_hashed][crate::model::File::partially_hashed].
5688    ///
5689    /// # Example
5690    /// ```ignore,no_run
5691    /// # use google_cloud_securitycenter_v2::model::File;
5692    /// let x = File::new().set_partially_hashed(true);
5693    /// ```
5694    pub fn set_partially_hashed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5695        self.partially_hashed = v.into();
5696        self
5697    }
5698
5699    /// Sets the value of [contents][crate::model::File::contents].
5700    ///
5701    /// # Example
5702    /// ```ignore,no_run
5703    /// # use google_cloud_securitycenter_v2::model::File;
5704    /// let x = File::new().set_contents("example");
5705    /// ```
5706    pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5707        self.contents = v.into();
5708        self
5709    }
5710
5711    /// Sets the value of [disk_path][crate::model::File::disk_path].
5712    ///
5713    /// # Example
5714    /// ```ignore,no_run
5715    /// # use google_cloud_securitycenter_v2::model::File;
5716    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5717    /// let x = File::new().set_disk_path(DiskPath::default()/* use setters */);
5718    /// ```
5719    pub fn set_disk_path<T>(mut self, v: T) -> Self
5720    where
5721        T: std::convert::Into<crate::model::file::DiskPath>,
5722    {
5723        self.disk_path = std::option::Option::Some(v.into());
5724        self
5725    }
5726
5727    /// Sets or clears the value of [disk_path][crate::model::File::disk_path].
5728    ///
5729    /// # Example
5730    /// ```ignore,no_run
5731    /// # use google_cloud_securitycenter_v2::model::File;
5732    /// use google_cloud_securitycenter_v2::model::file::DiskPath;
5733    /// let x = File::new().set_or_clear_disk_path(Some(DiskPath::default()/* use setters */));
5734    /// let x = File::new().set_or_clear_disk_path(None::<DiskPath>);
5735    /// ```
5736    pub fn set_or_clear_disk_path<T>(mut self, v: std::option::Option<T>) -> Self
5737    where
5738        T: std::convert::Into<crate::model::file::DiskPath>,
5739    {
5740        self.disk_path = v.map(|x| x.into());
5741        self
5742    }
5743
5744    /// Sets the value of [operations][crate::model::File::operations].
5745    ///
5746    /// # Example
5747    /// ```ignore,no_run
5748    /// # use google_cloud_securitycenter_v2::model::File;
5749    /// use google_cloud_securitycenter_v2::model::file::FileOperation;
5750    /// let x = File::new()
5751    ///     .set_operations([
5752    ///         FileOperation::default()/* use setters */,
5753    ///         FileOperation::default()/* use (different) setters */,
5754    ///     ]);
5755    /// ```
5756    pub fn set_operations<T, V>(mut self, v: T) -> Self
5757    where
5758        T: std::iter::IntoIterator<Item = V>,
5759        V: std::convert::Into<crate::model::file::FileOperation>,
5760    {
5761        use std::iter::Iterator;
5762        self.operations = v.into_iter().map(|i| i.into()).collect();
5763        self
5764    }
5765}
5766
5767impl wkt::message::Message for File {
5768    fn typename() -> &'static str {
5769        "type.googleapis.com/google.cloud.securitycenter.v2.File"
5770    }
5771}
5772
5773/// Defines additional types related to [File].
5774pub mod file {
5775    #[allow(unused_imports)]
5776    use super::*;
5777
5778    /// Path of the file in terms of underlying disk/partition identifiers.
5779    #[derive(Clone, Default, PartialEq)]
5780    #[non_exhaustive]
5781    pub struct DiskPath {
5782        /// UUID of the partition (format
5783        /// <https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid>)
5784        pub partition_uuid: std::string::String,
5785
5786        /// Relative path of the file in the partition as a JSON encoded string.
5787        /// Example: /home/user1/executable_file.sh
5788        pub relative_path: std::string::String,
5789
5790        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5791    }
5792
5793    impl DiskPath {
5794        /// Creates a new default instance.
5795        pub fn new() -> Self {
5796            std::default::Default::default()
5797        }
5798
5799        /// Sets the value of [partition_uuid][crate::model::file::DiskPath::partition_uuid].
5800        ///
5801        /// # Example
5802        /// ```ignore,no_run
5803        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5804        /// let x = DiskPath::new().set_partition_uuid("example");
5805        /// ```
5806        pub fn set_partition_uuid<T: std::convert::Into<std::string::String>>(
5807            mut self,
5808            v: T,
5809        ) -> Self {
5810            self.partition_uuid = v.into();
5811            self
5812        }
5813
5814        /// Sets the value of [relative_path][crate::model::file::DiskPath::relative_path].
5815        ///
5816        /// # Example
5817        /// ```ignore,no_run
5818        /// # use google_cloud_securitycenter_v2::model::file::DiskPath;
5819        /// let x = DiskPath::new().set_relative_path("example");
5820        /// ```
5821        pub fn set_relative_path<T: std::convert::Into<std::string::String>>(
5822            mut self,
5823            v: T,
5824        ) -> Self {
5825            self.relative_path = v.into();
5826            self
5827        }
5828    }
5829
5830    impl wkt::message::Message for DiskPath {
5831        fn typename() -> &'static str {
5832            "type.googleapis.com/google.cloud.securitycenter.v2.File.DiskPath"
5833        }
5834    }
5835
5836    /// Operation(s) performed on a file.
5837    #[derive(Clone, Default, PartialEq)]
5838    #[non_exhaustive]
5839    pub struct FileOperation {
5840        /// The type of the operation
5841        pub r#type: crate::model::file::file_operation::OperationType,
5842
5843        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5844    }
5845
5846    impl FileOperation {
5847        /// Creates a new default instance.
5848        pub fn new() -> Self {
5849            std::default::Default::default()
5850        }
5851
5852        /// Sets the value of [r#type][crate::model::file::FileOperation::type].
5853        ///
5854        /// # Example
5855        /// ```ignore,no_run
5856        /// # use google_cloud_securitycenter_v2::model::file::FileOperation;
5857        /// use google_cloud_securitycenter_v2::model::file::file_operation::OperationType;
5858        /// let x0 = FileOperation::new().set_type(OperationType::Open);
5859        /// let x1 = FileOperation::new().set_type(OperationType::Read);
5860        /// let x2 = FileOperation::new().set_type(OperationType::Rename);
5861        /// ```
5862        pub fn set_type<
5863            T: std::convert::Into<crate::model::file::file_operation::OperationType>,
5864        >(
5865            mut self,
5866            v: T,
5867        ) -> Self {
5868            self.r#type = v.into();
5869            self
5870        }
5871    }
5872
5873    impl wkt::message::Message for FileOperation {
5874        fn typename() -> &'static str {
5875            "type.googleapis.com/google.cloud.securitycenter.v2.File.FileOperation"
5876        }
5877    }
5878
5879    /// Defines additional types related to [FileOperation].
5880    pub mod file_operation {
5881        #[allow(unused_imports)]
5882        use super::*;
5883
5884        /// The type of the operation
5885        ///
5886        /// # Working with unknown values
5887        ///
5888        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5889        /// additional enum variants at any time. Adding new variants is not considered
5890        /// a breaking change. Applications should write their code in anticipation of:
5891        ///
5892        /// - New values appearing in future releases of the client library, **and**
5893        /// - New values received dynamically, without application changes.
5894        ///
5895        /// Please consult the [Working with enums] section in the user guide for some
5896        /// guidelines.
5897        ///
5898        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5899        #[derive(Clone, Debug, PartialEq)]
5900        #[non_exhaustive]
5901        pub enum OperationType {
5902            /// The operation is unspecified.
5903            Unspecified,
5904            /// Represents an open operation.
5905            Open,
5906            /// Represents a read operation.
5907            Read,
5908            /// Represents a rename operation.
5909            Rename,
5910            /// Represents a write operation.
5911            Write,
5912            /// Represents an execute operation.
5913            Execute,
5914            /// If set, the enum was initialized with an unknown value.
5915            ///
5916            /// Applications can examine the value using [OperationType::value] or
5917            /// [OperationType::name].
5918            UnknownValue(operation_type::UnknownValue),
5919        }
5920
5921        #[doc(hidden)]
5922        pub mod operation_type {
5923            #[allow(unused_imports)]
5924            use super::*;
5925            #[derive(Clone, Debug, PartialEq)]
5926            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5927        }
5928
5929        impl OperationType {
5930            /// Gets the enum value.
5931            ///
5932            /// Returns `None` if the enum contains an unknown value deserialized from
5933            /// the string representation of enums.
5934            pub fn value(&self) -> std::option::Option<i32> {
5935                match self {
5936                    Self::Unspecified => std::option::Option::Some(0),
5937                    Self::Open => std::option::Option::Some(1),
5938                    Self::Read => std::option::Option::Some(2),
5939                    Self::Rename => std::option::Option::Some(3),
5940                    Self::Write => std::option::Option::Some(4),
5941                    Self::Execute => std::option::Option::Some(5),
5942                    Self::UnknownValue(u) => u.0.value(),
5943                }
5944            }
5945
5946            /// Gets the enum value as a string.
5947            ///
5948            /// Returns `None` if the enum contains an unknown value deserialized from
5949            /// the integer representation of enums.
5950            pub fn name(&self) -> std::option::Option<&str> {
5951                match self {
5952                    Self::Unspecified => std::option::Option::Some("OPERATION_TYPE_UNSPECIFIED"),
5953                    Self::Open => std::option::Option::Some("OPEN"),
5954                    Self::Read => std::option::Option::Some("READ"),
5955                    Self::Rename => std::option::Option::Some("RENAME"),
5956                    Self::Write => std::option::Option::Some("WRITE"),
5957                    Self::Execute => std::option::Option::Some("EXECUTE"),
5958                    Self::UnknownValue(u) => u.0.name(),
5959                }
5960            }
5961        }
5962
5963        impl std::default::Default for OperationType {
5964            fn default() -> Self {
5965                use std::convert::From;
5966                Self::from(0)
5967            }
5968        }
5969
5970        impl std::fmt::Display for OperationType {
5971            fn fmt(
5972                &self,
5973                f: &mut std::fmt::Formatter<'_>,
5974            ) -> std::result::Result<(), std::fmt::Error> {
5975                wkt::internal::display_enum(f, self.name(), self.value())
5976            }
5977        }
5978
5979        impl std::convert::From<i32> for OperationType {
5980            fn from(value: i32) -> Self {
5981                match value {
5982                    0 => Self::Unspecified,
5983                    1 => Self::Open,
5984                    2 => Self::Read,
5985                    3 => Self::Rename,
5986                    4 => Self::Write,
5987                    5 => Self::Execute,
5988                    _ => Self::UnknownValue(operation_type::UnknownValue(
5989                        wkt::internal::UnknownEnumValue::Integer(value),
5990                    )),
5991                }
5992            }
5993        }
5994
5995        impl std::convert::From<&str> for OperationType {
5996            fn from(value: &str) -> Self {
5997                use std::string::ToString;
5998                match value {
5999                    "OPERATION_TYPE_UNSPECIFIED" => Self::Unspecified,
6000                    "OPEN" => Self::Open,
6001                    "READ" => Self::Read,
6002                    "RENAME" => Self::Rename,
6003                    "WRITE" => Self::Write,
6004                    "EXECUTE" => Self::Execute,
6005                    _ => Self::UnknownValue(operation_type::UnknownValue(
6006                        wkt::internal::UnknownEnumValue::String(value.to_string()),
6007                    )),
6008                }
6009            }
6010        }
6011
6012        impl serde::ser::Serialize for OperationType {
6013            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6014            where
6015                S: serde::Serializer,
6016            {
6017                match self {
6018                    Self::Unspecified => serializer.serialize_i32(0),
6019                    Self::Open => serializer.serialize_i32(1),
6020                    Self::Read => serializer.serialize_i32(2),
6021                    Self::Rename => serializer.serialize_i32(3),
6022                    Self::Write => serializer.serialize_i32(4),
6023                    Self::Execute => serializer.serialize_i32(5),
6024                    Self::UnknownValue(u) => u.0.serialize(serializer),
6025                }
6026            }
6027        }
6028
6029        impl<'de> serde::de::Deserialize<'de> for OperationType {
6030            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6031            where
6032                D: serde::Deserializer<'de>,
6033            {
6034                deserializer.deserialize_any(wkt::internal::EnumVisitor::<OperationType>::new(
6035                    ".google.cloud.securitycenter.v2.File.FileOperation.OperationType",
6036                ))
6037            }
6038        }
6039    }
6040}
6041
6042/// Security Command Center finding.
6043///
6044/// A finding is a record of assessment data like security, risk, health, or
6045/// privacy, that is ingested into Security Command Center for presentation,
6046/// notification, analysis, policy testing, and enforcement. For example, a
6047/// cross-site scripting (XSS) vulnerability in an App Engine application is a
6048/// finding.
6049#[derive(Clone, Default, PartialEq)]
6050#[non_exhaustive]
6051pub struct Finding {
6052    /// Identifier. The [relative resource
6053    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
6054    /// of the finding. The following list shows some examples:
6055    ///
6056    ///
6057    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
6058    /// +
6059    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6060    ///
6061    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
6062    ///
6063    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6064    ///
6065    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
6066    ///
6067    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6068    pub name: std::string::String,
6069
6070    /// Output only. The canonical name of the finding. The following list shows
6071    /// some examples:
6072    ///
6073    ///
6074    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
6075    /// +
6076    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6077    ///
6078    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
6079    ///
6080    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6081    ///
6082    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
6083    ///
6084    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
6085    ///
6086    /// The prefix is the closest CRM ancestor of the resource associated with the
6087    /// finding.
6088    pub canonical_name: std::string::String,
6089
6090    /// The relative resource name of the source and location the finding belongs
6091    /// to. See:
6092    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
6093    /// This field is immutable after creation time. The following list shows some
6094    /// examples:
6095    ///
6096    /// + `organizations/{organization_id}/sources/{source_id}`
6097    /// + `folders/{folders_id}/sources/{source_id}`
6098    /// + `projects/{projects_id}/sources/{source_id}`
6099    ///
6100    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
6101    ///
6102    /// + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
6103    /// + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
6104    pub parent: std::string::String,
6105
6106    /// Immutable. For findings on Google Cloud resources, the full resource
6107    /// name of the Google Cloud resource this finding is for. See:
6108    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
6109    /// When the finding is for a non-Google Cloud resource, the resourceName can
6110    /// be a customer or partner defined string.
6111    pub resource_name: std::string::String,
6112
6113    /// Output only. The state of the finding.
6114    pub state: crate::model::finding::State,
6115
6116    /// Immutable. The additional taxonomy group within findings from a given
6117    /// source. Example: "XSS_FLASH_INJECTION"
6118    pub category: std::string::String,
6119
6120    /// The URI that, if available, points to a web page outside of Security
6121    /// Command Center where additional information about the finding can be found.
6122    /// This field is guaranteed to be either empty or a well formed URL.
6123    pub external_uri: std::string::String,
6124
6125    /// Source specific properties. These properties are managed by the source
6126    /// that writes the finding. The key names in the source_properties map must be
6127    /// between 1 and 255 characters, and must start with a letter and contain
6128    /// alphanumeric characters or underscores only.
6129    pub source_properties: std::collections::HashMap<std::string::String, wkt::Value>,
6130
6131    /// Output only. User specified security marks. These marks are entirely
6132    /// managed by the user and come from the SecurityMarks resource that belongs
6133    /// to the finding.
6134    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
6135
6136    /// The time the finding was first detected. If an existing finding is updated,
6137    /// then this is the time the update occurred.
6138    /// For example, if the finding represents an open firewall, this property
6139    /// captures the time the detector believes the firewall became open. The
6140    /// accuracy is determined by the detector. If the finding is later resolved,
6141    /// then this time reflects when the finding was resolved. This must not
6142    /// be set to a value greater than the current timestamp.
6143    pub event_time: std::option::Option<wkt::Timestamp>,
6144
6145    /// Output only. The time at which the finding was created in Security Command
6146    /// Center.
6147    pub create_time: std::option::Option<wkt::Timestamp>,
6148
6149    /// The severity of the finding. This field is managed by the source that
6150    /// writes the finding.
6151    pub severity: crate::model::finding::Severity,
6152
6153    /// Indicates the mute state of a finding (either muted, unmuted
6154    /// or undefined). Unlike other attributes of a finding, a finding provider
6155    /// shouldn't set the value of mute.
6156    pub mute: crate::model::finding::Mute,
6157
6158    /// Output only. The mute information regarding this finding.
6159    pub mute_info: std::option::Option<crate::model::finding::MuteInfo>,
6160
6161    /// The class of the finding.
6162    pub finding_class: crate::model::finding::FindingClass,
6163
6164    /// Represents what's commonly known as an *indicator of compromise* (IoC) in
6165    /// computer forensics. This is an artifact observed on a network or in an
6166    /// operating system that, with high confidence, indicates a computer
6167    /// intrusion. For more information, see [Indicator of
6168    /// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
6169    pub indicator: std::option::Option<crate::model::Indicator>,
6170
6171    /// Represents vulnerability-specific fields like CVE and CVSS scores.
6172    /// CVE stands for Common Vulnerabilities and Exposures
6173    /// (<https://cve.mitre.org/about/>)
6174    pub vulnerability: std::option::Option<crate::model::Vulnerability>,
6175
6176    /// Output only. The most recent time this finding was muted or unmuted.
6177    pub mute_update_time: std::option::Option<wkt::Timestamp>,
6178
6179    /// Output only. Third party SIEM/SOAR fields within SCC, contains external
6180    /// system information and external system finding fields.
6181    pub external_systems:
6182        std::collections::HashMap<std::string::String, crate::model::ExternalSystem>,
6183
6184    /// MITRE ATT&CK tactics and techniques related to this finding.
6185    /// See: <https://attack.mitre.org>
6186    pub mitre_attack: std::option::Option<crate::model::MitreAttack>,
6187
6188    /// Access details associated with the finding, such as more information on the
6189    /// caller, which method was accessed, and from where.
6190    pub access: std::option::Option<crate::model::Access>,
6191
6192    /// Contains information about the IP connection associated with the finding.
6193    pub connections: std::vec::Vec<crate::model::Connection>,
6194
6195    /// Records additional information about the mute operation, for example, the
6196    /// [mute
6197    /// configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
6198    /// that muted the finding and the user who muted the finding.
6199    pub mute_initiator: std::string::String,
6200
6201    /// Represents operating system processes associated with the Finding.
6202    pub processes: std::vec::Vec<crate::model::Process>,
6203
6204    /// Output only. Map containing the points of contact for the given finding.
6205    /// The key represents the type of contact, while the value contains a list of
6206    /// all the contacts that pertain. Please refer to:
6207    /// <https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories>
6208    ///
6209    /// ```norust
6210    /// {
6211    ///   "security": {
6212    ///     "contacts": [
6213    ///       {
6214    ///         "email": "person1@company.com"
6215    ///       },
6216    ///       {
6217    ///         "email": "person2@company.com"
6218    ///       }
6219    ///     ]
6220    ///   }
6221    /// }
6222    /// ```
6223    pub contacts: std::collections::HashMap<std::string::String, crate::model::ContactDetails>,
6224
6225    /// Contains compliance information for security standards associated to the
6226    /// finding.
6227    pub compliances: std::vec::Vec<crate::model::Compliance>,
6228
6229    /// Output only. The human readable display name of the finding source such as
6230    /// "Event Threat Detection" or "Security Health Analytics".
6231    pub parent_display_name: std::string::String,
6232
6233    /// Contains more details about the finding.
6234    pub description: std::string::String,
6235
6236    /// Represents exfiltrations associated with the finding.
6237    pub exfiltration: std::option::Option<crate::model::Exfiltration>,
6238
6239    /// Represents IAM bindings associated with the finding.
6240    pub iam_bindings: std::vec::Vec<crate::model::IamBinding>,
6241
6242    /// Steps to address the finding.
6243    pub next_steps: std::string::String,
6244
6245    /// Unique identifier of the module which generated the finding.
6246    /// Example:
6247    /// folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
6248    pub module_name: std::string::String,
6249
6250    /// Containers associated with the finding. This field provides information for
6251    /// both Kubernetes and non-Kubernetes containers.
6252    pub containers: std::vec::Vec<crate::model::Container>,
6253
6254    /// Kubernetes resources associated with the finding.
6255    pub kubernetes: std::option::Option<crate::model::Kubernetes>,
6256
6257    /// Database associated with the finding.
6258    pub database: std::option::Option<crate::model::Database>,
6259
6260    /// The results of an attack path simulation relevant to this finding.
6261    pub attack_exposure: std::option::Option<crate::model::AttackExposure>,
6262
6263    /// File associated with the finding.
6264    pub files: std::vec::Vec<crate::model::File>,
6265
6266    /// Cloud Data Loss Prevention (Cloud DLP) inspection results that are
6267    /// associated with the finding.
6268    pub cloud_dlp_inspection: std::option::Option<crate::model::CloudDlpInspection>,
6269
6270    /// Cloud DLP data profile that is associated with the finding.
6271    pub cloud_dlp_data_profile: std::option::Option<crate::model::CloudDlpDataProfile>,
6272
6273    /// Signature of the kernel rootkit.
6274    pub kernel_rootkit: std::option::Option<crate::model::KernelRootkit>,
6275
6276    /// Contains information about the org policies associated with the finding.
6277    pub org_policies: std::vec::Vec<crate::model::OrgPolicy>,
6278
6279    /// Job associated with the finding.
6280    pub job: std::option::Option<crate::model::Job>,
6281
6282    /// Represents an application associated with the finding.
6283    pub application: std::option::Option<crate::model::Application>,
6284
6285    /// IP rules associated with the finding.
6286    pub ip_rules: std::option::Option<crate::model::IpRules>,
6287
6288    /// Fields related to Backup and DR findings.
6289    pub backup_disaster_recovery: std::option::Option<crate::model::BackupDisasterRecovery>,
6290
6291    /// The security posture associated with the finding.
6292    pub security_posture: std::option::Option<crate::model::SecurityPosture>,
6293
6294    /// Log entries that are relevant to the finding.
6295    pub log_entries: std::vec::Vec<crate::model::LogEntry>,
6296
6297    /// The load balancers associated with the finding.
6298    pub load_balancers: std::vec::Vec<crate::model::LoadBalancer>,
6299
6300    /// Fields related to Cloud Armor findings.
6301    pub cloud_armor: std::option::Option<crate::model::CloudArmor>,
6302
6303    /// Notebook associated with the finding.
6304    pub notebook: std::option::Option<crate::model::Notebook>,
6305
6306    /// Contains details about a group of security issues that, when the issues
6307    /// occur together, represent a greater risk than when the issues occur
6308    /// independently. A group of such issues is referred to as a toxic
6309    /// combination.
6310    /// This field cannot be updated. Its value is ignored in all update requests.
6311    pub toxic_combination: std::option::Option<crate::model::ToxicCombination>,
6312
6313    /// Contains details about groups of which this finding is a member. A group is
6314    /// a collection of findings that are related in some way.
6315    /// This field cannot be updated. Its value is ignored in all update requests.
6316    pub group_memberships: std::vec::Vec<crate::model::GroupMembership>,
6317
6318    /// Disk associated with the finding.
6319    pub disk: std::option::Option<crate::model::Disk>,
6320
6321    /// Data access events associated with the finding.
6322    pub data_access_events: std::vec::Vec<crate::model::DataAccessEvent>,
6323
6324    /// Data flow events associated with the finding.
6325    pub data_flow_events: std::vec::Vec<crate::model::DataFlowEvent>,
6326
6327    /// Represents the VPC networks that the resource is attached to.
6328    pub networks: std::vec::Vec<crate::model::Network>,
6329
6330    /// Data retention deletion events associated with the finding.
6331    pub data_retention_deletion_events: std::vec::Vec<crate::model::DataRetentionDeletionEvent>,
6332
6333    /// AffectedResources associated with the finding.
6334    pub affected_resources: std::option::Option<crate::model::AffectedResources>,
6335
6336    /// The AI model associated with the finding.
6337    pub ai_model: std::option::Option<crate::model::AiModel>,
6338
6339    /// Contains details about a chokepoint, which is a resource or resource group
6340    /// where high-risk attack paths converge, based on [attack path simulations]
6341    /// (<https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations>).
6342    /// This field cannot be updated. Its value is ignored in all update requests.
6343    pub chokepoint: std::option::Option<crate::model::Chokepoint>,
6344
6345    /// VertexAi associated with the finding.
6346    pub vertex_ai: std::option::Option<crate::model::VertexAi>,
6347
6348    /// Primary Agent that the specified finding was flagged for
6349    pub agent: std::option::Option<crate::model::Agent>,
6350
6351    /// Conversational session(s) where the finding occurred.
6352    pub agent_sessions: std::vec::Vec<crate::model::AgentSession>,
6353
6354    /// Details about behavior anomalies detected in AI agents.
6355    pub agent_anomaly: std::option::Option<crate::model::AgentAnomaly>,
6356
6357    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6358}
6359
6360impl Finding {
6361    /// Creates a new default instance.
6362    pub fn new() -> Self {
6363        std::default::Default::default()
6364    }
6365
6366    /// Sets the value of [name][crate::model::Finding::name].
6367    ///
6368    /// # Example
6369    /// ```ignore,no_run
6370    /// # use google_cloud_securitycenter_v2::model::Finding;
6371    /// # let organization_id = "organization_id";
6372    /// # let source_id = "source_id";
6373    /// # let finding_id = "finding_id";
6374    /// let x = Finding::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
6375    /// ```
6376    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6377        self.name = v.into();
6378        self
6379    }
6380
6381    /// Sets the value of [canonical_name][crate::model::Finding::canonical_name].
6382    ///
6383    /// # Example
6384    /// ```ignore,no_run
6385    /// # use google_cloud_securitycenter_v2::model::Finding;
6386    /// let x = Finding::new().set_canonical_name("example");
6387    /// ```
6388    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6389        self.canonical_name = v.into();
6390        self
6391    }
6392
6393    /// Sets the value of [parent][crate::model::Finding::parent].
6394    ///
6395    /// # Example
6396    /// ```ignore,no_run
6397    /// # use google_cloud_securitycenter_v2::model::Finding;
6398    /// let x = Finding::new().set_parent("example");
6399    /// ```
6400    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6401        self.parent = v.into();
6402        self
6403    }
6404
6405    /// Sets the value of [resource_name][crate::model::Finding::resource_name].
6406    ///
6407    /// # Example
6408    /// ```ignore,no_run
6409    /// # use google_cloud_securitycenter_v2::model::Finding;
6410    /// let x = Finding::new().set_resource_name("example");
6411    /// ```
6412    pub fn set_resource_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6413        self.resource_name = v.into();
6414        self
6415    }
6416
6417    /// Sets the value of [state][crate::model::Finding::state].
6418    ///
6419    /// # Example
6420    /// ```ignore,no_run
6421    /// # use google_cloud_securitycenter_v2::model::Finding;
6422    /// use google_cloud_securitycenter_v2::model::finding::State;
6423    /// let x0 = Finding::new().set_state(State::Active);
6424    /// let x1 = Finding::new().set_state(State::Inactive);
6425    /// ```
6426    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
6427        self.state = v.into();
6428        self
6429    }
6430
6431    /// Sets the value of [category][crate::model::Finding::category].
6432    ///
6433    /// # Example
6434    /// ```ignore,no_run
6435    /// # use google_cloud_securitycenter_v2::model::Finding;
6436    /// let x = Finding::new().set_category("example");
6437    /// ```
6438    pub fn set_category<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6439        self.category = v.into();
6440        self
6441    }
6442
6443    /// Sets the value of [external_uri][crate::model::Finding::external_uri].
6444    ///
6445    /// # Example
6446    /// ```ignore,no_run
6447    /// # use google_cloud_securitycenter_v2::model::Finding;
6448    /// let x = Finding::new().set_external_uri("example");
6449    /// ```
6450    pub fn set_external_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6451        self.external_uri = v.into();
6452        self
6453    }
6454
6455    /// Sets the value of [source_properties][crate::model::Finding::source_properties].
6456    ///
6457    /// # Example
6458    /// ```ignore,no_run
6459    /// # use google_cloud_securitycenter_v2::model::Finding;
6460    /// use wkt::Value;
6461    /// let x = Finding::new().set_source_properties([
6462    ///     ("key0", Value::default()/* use setters */),
6463    ///     ("key1", Value::default()/* use (different) setters */),
6464    /// ]);
6465    /// ```
6466    pub fn set_source_properties<T, K, V>(mut self, v: T) -> Self
6467    where
6468        T: std::iter::IntoIterator<Item = (K, V)>,
6469        K: std::convert::Into<std::string::String>,
6470        V: std::convert::Into<wkt::Value>,
6471    {
6472        use std::iter::Iterator;
6473        self.source_properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6474        self
6475    }
6476
6477    /// Sets the value of [security_marks][crate::model::Finding::security_marks].
6478    ///
6479    /// # Example
6480    /// ```ignore,no_run
6481    /// # use google_cloud_securitycenter_v2::model::Finding;
6482    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
6483    /// let x = Finding::new().set_security_marks(SecurityMarks::default()/* use setters */);
6484    /// ```
6485    pub fn set_security_marks<T>(mut self, v: T) -> Self
6486    where
6487        T: std::convert::Into<crate::model::SecurityMarks>,
6488    {
6489        self.security_marks = std::option::Option::Some(v.into());
6490        self
6491    }
6492
6493    /// Sets or clears the value of [security_marks][crate::model::Finding::security_marks].
6494    ///
6495    /// # Example
6496    /// ```ignore,no_run
6497    /// # use google_cloud_securitycenter_v2::model::Finding;
6498    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
6499    /// let x = Finding::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
6500    /// let x = Finding::new().set_or_clear_security_marks(None::<SecurityMarks>);
6501    /// ```
6502    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
6503    where
6504        T: std::convert::Into<crate::model::SecurityMarks>,
6505    {
6506        self.security_marks = v.map(|x| x.into());
6507        self
6508    }
6509
6510    /// Sets the value of [event_time][crate::model::Finding::event_time].
6511    ///
6512    /// # Example
6513    /// ```ignore,no_run
6514    /// # use google_cloud_securitycenter_v2::model::Finding;
6515    /// use wkt::Timestamp;
6516    /// let x = Finding::new().set_event_time(Timestamp::default()/* use setters */);
6517    /// ```
6518    pub fn set_event_time<T>(mut self, v: T) -> Self
6519    where
6520        T: std::convert::Into<wkt::Timestamp>,
6521    {
6522        self.event_time = std::option::Option::Some(v.into());
6523        self
6524    }
6525
6526    /// Sets or clears the value of [event_time][crate::model::Finding::event_time].
6527    ///
6528    /// # Example
6529    /// ```ignore,no_run
6530    /// # use google_cloud_securitycenter_v2::model::Finding;
6531    /// use wkt::Timestamp;
6532    /// let x = Finding::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
6533    /// let x = Finding::new().set_or_clear_event_time(None::<Timestamp>);
6534    /// ```
6535    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
6536    where
6537        T: std::convert::Into<wkt::Timestamp>,
6538    {
6539        self.event_time = v.map(|x| x.into());
6540        self
6541    }
6542
6543    /// Sets the value of [create_time][crate::model::Finding::create_time].
6544    ///
6545    /// # Example
6546    /// ```ignore,no_run
6547    /// # use google_cloud_securitycenter_v2::model::Finding;
6548    /// use wkt::Timestamp;
6549    /// let x = Finding::new().set_create_time(Timestamp::default()/* use setters */);
6550    /// ```
6551    pub fn set_create_time<T>(mut self, v: T) -> Self
6552    where
6553        T: std::convert::Into<wkt::Timestamp>,
6554    {
6555        self.create_time = std::option::Option::Some(v.into());
6556        self
6557    }
6558
6559    /// Sets or clears the value of [create_time][crate::model::Finding::create_time].
6560    ///
6561    /// # Example
6562    /// ```ignore,no_run
6563    /// # use google_cloud_securitycenter_v2::model::Finding;
6564    /// use wkt::Timestamp;
6565    /// let x = Finding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6566    /// let x = Finding::new().set_or_clear_create_time(None::<Timestamp>);
6567    /// ```
6568    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6569    where
6570        T: std::convert::Into<wkt::Timestamp>,
6571    {
6572        self.create_time = v.map(|x| x.into());
6573        self
6574    }
6575
6576    /// Sets the value of [severity][crate::model::Finding::severity].
6577    ///
6578    /// # Example
6579    /// ```ignore,no_run
6580    /// # use google_cloud_securitycenter_v2::model::Finding;
6581    /// use google_cloud_securitycenter_v2::model::finding::Severity;
6582    /// let x0 = Finding::new().set_severity(Severity::Critical);
6583    /// let x1 = Finding::new().set_severity(Severity::High);
6584    /// let x2 = Finding::new().set_severity(Severity::Medium);
6585    /// ```
6586    pub fn set_severity<T: std::convert::Into<crate::model::finding::Severity>>(
6587        mut self,
6588        v: T,
6589    ) -> Self {
6590        self.severity = v.into();
6591        self
6592    }
6593
6594    /// Sets the value of [mute][crate::model::Finding::mute].
6595    ///
6596    /// # Example
6597    /// ```ignore,no_run
6598    /// # use google_cloud_securitycenter_v2::model::Finding;
6599    /// use google_cloud_securitycenter_v2::model::finding::Mute;
6600    /// let x0 = Finding::new().set_mute(Mute::Muted);
6601    /// let x1 = Finding::new().set_mute(Mute::Unmuted);
6602    /// let x2 = Finding::new().set_mute(Mute::Undefined);
6603    /// ```
6604    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
6605        self.mute = v.into();
6606        self
6607    }
6608
6609    /// Sets the value of [mute_info][crate::model::Finding::mute_info].
6610    ///
6611    /// # Example
6612    /// ```ignore,no_run
6613    /// # use google_cloud_securitycenter_v2::model::Finding;
6614    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6615    /// let x = Finding::new().set_mute_info(MuteInfo::default()/* use setters */);
6616    /// ```
6617    pub fn set_mute_info<T>(mut self, v: T) -> Self
6618    where
6619        T: std::convert::Into<crate::model::finding::MuteInfo>,
6620    {
6621        self.mute_info = std::option::Option::Some(v.into());
6622        self
6623    }
6624
6625    /// Sets or clears the value of [mute_info][crate::model::Finding::mute_info].
6626    ///
6627    /// # Example
6628    /// ```ignore,no_run
6629    /// # use google_cloud_securitycenter_v2::model::Finding;
6630    /// use google_cloud_securitycenter_v2::model::finding::MuteInfo;
6631    /// let x = Finding::new().set_or_clear_mute_info(Some(MuteInfo::default()/* use setters */));
6632    /// let x = Finding::new().set_or_clear_mute_info(None::<MuteInfo>);
6633    /// ```
6634    pub fn set_or_clear_mute_info<T>(mut self, v: std::option::Option<T>) -> Self
6635    where
6636        T: std::convert::Into<crate::model::finding::MuteInfo>,
6637    {
6638        self.mute_info = v.map(|x| x.into());
6639        self
6640    }
6641
6642    /// Sets the value of [finding_class][crate::model::Finding::finding_class].
6643    ///
6644    /// # Example
6645    /// ```ignore,no_run
6646    /// # use google_cloud_securitycenter_v2::model::Finding;
6647    /// use google_cloud_securitycenter_v2::model::finding::FindingClass;
6648    /// let x0 = Finding::new().set_finding_class(FindingClass::Threat);
6649    /// let x1 = Finding::new().set_finding_class(FindingClass::Vulnerability);
6650    /// let x2 = Finding::new().set_finding_class(FindingClass::Misconfiguration);
6651    /// ```
6652    pub fn set_finding_class<T: std::convert::Into<crate::model::finding::FindingClass>>(
6653        mut self,
6654        v: T,
6655    ) -> Self {
6656        self.finding_class = v.into();
6657        self
6658    }
6659
6660    /// Sets the value of [indicator][crate::model::Finding::indicator].
6661    ///
6662    /// # Example
6663    /// ```ignore,no_run
6664    /// # use google_cloud_securitycenter_v2::model::Finding;
6665    /// use google_cloud_securitycenter_v2::model::Indicator;
6666    /// let x = Finding::new().set_indicator(Indicator::default()/* use setters */);
6667    /// ```
6668    pub fn set_indicator<T>(mut self, v: T) -> Self
6669    where
6670        T: std::convert::Into<crate::model::Indicator>,
6671    {
6672        self.indicator = std::option::Option::Some(v.into());
6673        self
6674    }
6675
6676    /// Sets or clears the value of [indicator][crate::model::Finding::indicator].
6677    ///
6678    /// # Example
6679    /// ```ignore,no_run
6680    /// # use google_cloud_securitycenter_v2::model::Finding;
6681    /// use google_cloud_securitycenter_v2::model::Indicator;
6682    /// let x = Finding::new().set_or_clear_indicator(Some(Indicator::default()/* use setters */));
6683    /// let x = Finding::new().set_or_clear_indicator(None::<Indicator>);
6684    /// ```
6685    pub fn set_or_clear_indicator<T>(mut self, v: std::option::Option<T>) -> Self
6686    where
6687        T: std::convert::Into<crate::model::Indicator>,
6688    {
6689        self.indicator = v.map(|x| x.into());
6690        self
6691    }
6692
6693    /// Sets the value of [vulnerability][crate::model::Finding::vulnerability].
6694    ///
6695    /// # Example
6696    /// ```ignore,no_run
6697    /// # use google_cloud_securitycenter_v2::model::Finding;
6698    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6699    /// let x = Finding::new().set_vulnerability(Vulnerability::default()/* use setters */);
6700    /// ```
6701    pub fn set_vulnerability<T>(mut self, v: T) -> Self
6702    where
6703        T: std::convert::Into<crate::model::Vulnerability>,
6704    {
6705        self.vulnerability = std::option::Option::Some(v.into());
6706        self
6707    }
6708
6709    /// Sets or clears the value of [vulnerability][crate::model::Finding::vulnerability].
6710    ///
6711    /// # Example
6712    /// ```ignore,no_run
6713    /// # use google_cloud_securitycenter_v2::model::Finding;
6714    /// use google_cloud_securitycenter_v2::model::Vulnerability;
6715    /// let x = Finding::new().set_or_clear_vulnerability(Some(Vulnerability::default()/* use setters */));
6716    /// let x = Finding::new().set_or_clear_vulnerability(None::<Vulnerability>);
6717    /// ```
6718    pub fn set_or_clear_vulnerability<T>(mut self, v: std::option::Option<T>) -> Self
6719    where
6720        T: std::convert::Into<crate::model::Vulnerability>,
6721    {
6722        self.vulnerability = v.map(|x| x.into());
6723        self
6724    }
6725
6726    /// Sets the value of [mute_update_time][crate::model::Finding::mute_update_time].
6727    ///
6728    /// # Example
6729    /// ```ignore,no_run
6730    /// # use google_cloud_securitycenter_v2::model::Finding;
6731    /// use wkt::Timestamp;
6732    /// let x = Finding::new().set_mute_update_time(Timestamp::default()/* use setters */);
6733    /// ```
6734    pub fn set_mute_update_time<T>(mut self, v: T) -> Self
6735    where
6736        T: std::convert::Into<wkt::Timestamp>,
6737    {
6738        self.mute_update_time = std::option::Option::Some(v.into());
6739        self
6740    }
6741
6742    /// Sets or clears the value of [mute_update_time][crate::model::Finding::mute_update_time].
6743    ///
6744    /// # Example
6745    /// ```ignore,no_run
6746    /// # use google_cloud_securitycenter_v2::model::Finding;
6747    /// use wkt::Timestamp;
6748    /// let x = Finding::new().set_or_clear_mute_update_time(Some(Timestamp::default()/* use setters */));
6749    /// let x = Finding::new().set_or_clear_mute_update_time(None::<Timestamp>);
6750    /// ```
6751    pub fn set_or_clear_mute_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6752    where
6753        T: std::convert::Into<wkt::Timestamp>,
6754    {
6755        self.mute_update_time = v.map(|x| x.into());
6756        self
6757    }
6758
6759    /// Sets the value of [external_systems][crate::model::Finding::external_systems].
6760    ///
6761    /// # Example
6762    /// ```ignore,no_run
6763    /// # use google_cloud_securitycenter_v2::model::Finding;
6764    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
6765    /// let x = Finding::new().set_external_systems([
6766    ///     ("key0", ExternalSystem::default()/* use setters */),
6767    ///     ("key1", ExternalSystem::default()/* use (different) setters */),
6768    /// ]);
6769    /// ```
6770    pub fn set_external_systems<T, K, V>(mut self, v: T) -> Self
6771    where
6772        T: std::iter::IntoIterator<Item = (K, V)>,
6773        K: std::convert::Into<std::string::String>,
6774        V: std::convert::Into<crate::model::ExternalSystem>,
6775    {
6776        use std::iter::Iterator;
6777        self.external_systems = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6778        self
6779    }
6780
6781    /// Sets the value of [mitre_attack][crate::model::Finding::mitre_attack].
6782    ///
6783    /// # Example
6784    /// ```ignore,no_run
6785    /// # use google_cloud_securitycenter_v2::model::Finding;
6786    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6787    /// let x = Finding::new().set_mitre_attack(MitreAttack::default()/* use setters */);
6788    /// ```
6789    pub fn set_mitre_attack<T>(mut self, v: T) -> Self
6790    where
6791        T: std::convert::Into<crate::model::MitreAttack>,
6792    {
6793        self.mitre_attack = std::option::Option::Some(v.into());
6794        self
6795    }
6796
6797    /// Sets or clears the value of [mitre_attack][crate::model::Finding::mitre_attack].
6798    ///
6799    /// # Example
6800    /// ```ignore,no_run
6801    /// # use google_cloud_securitycenter_v2::model::Finding;
6802    /// use google_cloud_securitycenter_v2::model::MitreAttack;
6803    /// let x = Finding::new().set_or_clear_mitre_attack(Some(MitreAttack::default()/* use setters */));
6804    /// let x = Finding::new().set_or_clear_mitre_attack(None::<MitreAttack>);
6805    /// ```
6806    pub fn set_or_clear_mitre_attack<T>(mut self, v: std::option::Option<T>) -> Self
6807    where
6808        T: std::convert::Into<crate::model::MitreAttack>,
6809    {
6810        self.mitre_attack = v.map(|x| x.into());
6811        self
6812    }
6813
6814    /// Sets the value of [access][crate::model::Finding::access].
6815    ///
6816    /// # Example
6817    /// ```ignore,no_run
6818    /// # use google_cloud_securitycenter_v2::model::Finding;
6819    /// use google_cloud_securitycenter_v2::model::Access;
6820    /// let x = Finding::new().set_access(Access::default()/* use setters */);
6821    /// ```
6822    pub fn set_access<T>(mut self, v: T) -> Self
6823    where
6824        T: std::convert::Into<crate::model::Access>,
6825    {
6826        self.access = std::option::Option::Some(v.into());
6827        self
6828    }
6829
6830    /// Sets or clears the value of [access][crate::model::Finding::access].
6831    ///
6832    /// # Example
6833    /// ```ignore,no_run
6834    /// # use google_cloud_securitycenter_v2::model::Finding;
6835    /// use google_cloud_securitycenter_v2::model::Access;
6836    /// let x = Finding::new().set_or_clear_access(Some(Access::default()/* use setters */));
6837    /// let x = Finding::new().set_or_clear_access(None::<Access>);
6838    /// ```
6839    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
6840    where
6841        T: std::convert::Into<crate::model::Access>,
6842    {
6843        self.access = v.map(|x| x.into());
6844        self
6845    }
6846
6847    /// Sets the value of [connections][crate::model::Finding::connections].
6848    ///
6849    /// # Example
6850    /// ```ignore,no_run
6851    /// # use google_cloud_securitycenter_v2::model::Finding;
6852    /// use google_cloud_securitycenter_v2::model::Connection;
6853    /// let x = Finding::new()
6854    ///     .set_connections([
6855    ///         Connection::default()/* use setters */,
6856    ///         Connection::default()/* use (different) setters */,
6857    ///     ]);
6858    /// ```
6859    pub fn set_connections<T, V>(mut self, v: T) -> Self
6860    where
6861        T: std::iter::IntoIterator<Item = V>,
6862        V: std::convert::Into<crate::model::Connection>,
6863    {
6864        use std::iter::Iterator;
6865        self.connections = v.into_iter().map(|i| i.into()).collect();
6866        self
6867    }
6868
6869    /// Sets the value of [mute_initiator][crate::model::Finding::mute_initiator].
6870    ///
6871    /// # Example
6872    /// ```ignore,no_run
6873    /// # use google_cloud_securitycenter_v2::model::Finding;
6874    /// let x = Finding::new().set_mute_initiator("example");
6875    /// ```
6876    pub fn set_mute_initiator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6877        self.mute_initiator = v.into();
6878        self
6879    }
6880
6881    /// Sets the value of [processes][crate::model::Finding::processes].
6882    ///
6883    /// # Example
6884    /// ```ignore,no_run
6885    /// # use google_cloud_securitycenter_v2::model::Finding;
6886    /// use google_cloud_securitycenter_v2::model::Process;
6887    /// let x = Finding::new()
6888    ///     .set_processes([
6889    ///         Process::default()/* use setters */,
6890    ///         Process::default()/* use (different) setters */,
6891    ///     ]);
6892    /// ```
6893    pub fn set_processes<T, V>(mut self, v: T) -> Self
6894    where
6895        T: std::iter::IntoIterator<Item = V>,
6896        V: std::convert::Into<crate::model::Process>,
6897    {
6898        use std::iter::Iterator;
6899        self.processes = v.into_iter().map(|i| i.into()).collect();
6900        self
6901    }
6902
6903    /// Sets the value of [contacts][crate::model::Finding::contacts].
6904    ///
6905    /// # Example
6906    /// ```ignore,no_run
6907    /// # use google_cloud_securitycenter_v2::model::Finding;
6908    /// use google_cloud_securitycenter_v2::model::ContactDetails;
6909    /// let x = Finding::new().set_contacts([
6910    ///     ("key0", ContactDetails::default()/* use setters */),
6911    ///     ("key1", ContactDetails::default()/* use (different) setters */),
6912    /// ]);
6913    /// ```
6914    pub fn set_contacts<T, K, V>(mut self, v: T) -> Self
6915    where
6916        T: std::iter::IntoIterator<Item = (K, V)>,
6917        K: std::convert::Into<std::string::String>,
6918        V: std::convert::Into<crate::model::ContactDetails>,
6919    {
6920        use std::iter::Iterator;
6921        self.contacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6922        self
6923    }
6924
6925    /// Sets the value of [compliances][crate::model::Finding::compliances].
6926    ///
6927    /// # Example
6928    /// ```ignore,no_run
6929    /// # use google_cloud_securitycenter_v2::model::Finding;
6930    /// use google_cloud_securitycenter_v2::model::Compliance;
6931    /// let x = Finding::new()
6932    ///     .set_compliances([
6933    ///         Compliance::default()/* use setters */,
6934    ///         Compliance::default()/* use (different) setters */,
6935    ///     ]);
6936    /// ```
6937    pub fn set_compliances<T, V>(mut self, v: T) -> Self
6938    where
6939        T: std::iter::IntoIterator<Item = V>,
6940        V: std::convert::Into<crate::model::Compliance>,
6941    {
6942        use std::iter::Iterator;
6943        self.compliances = v.into_iter().map(|i| i.into()).collect();
6944        self
6945    }
6946
6947    /// Sets the value of [parent_display_name][crate::model::Finding::parent_display_name].
6948    ///
6949    /// # Example
6950    /// ```ignore,no_run
6951    /// # use google_cloud_securitycenter_v2::model::Finding;
6952    /// let x = Finding::new().set_parent_display_name("example");
6953    /// ```
6954    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
6955        mut self,
6956        v: T,
6957    ) -> Self {
6958        self.parent_display_name = v.into();
6959        self
6960    }
6961
6962    /// Sets the value of [description][crate::model::Finding::description].
6963    ///
6964    /// # Example
6965    /// ```ignore,no_run
6966    /// # use google_cloud_securitycenter_v2::model::Finding;
6967    /// let x = Finding::new().set_description("example");
6968    /// ```
6969    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6970        self.description = v.into();
6971        self
6972    }
6973
6974    /// Sets the value of [exfiltration][crate::model::Finding::exfiltration].
6975    ///
6976    /// # Example
6977    /// ```ignore,no_run
6978    /// # use google_cloud_securitycenter_v2::model::Finding;
6979    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6980    /// let x = Finding::new().set_exfiltration(Exfiltration::default()/* use setters */);
6981    /// ```
6982    pub fn set_exfiltration<T>(mut self, v: T) -> Self
6983    where
6984        T: std::convert::Into<crate::model::Exfiltration>,
6985    {
6986        self.exfiltration = std::option::Option::Some(v.into());
6987        self
6988    }
6989
6990    /// Sets or clears the value of [exfiltration][crate::model::Finding::exfiltration].
6991    ///
6992    /// # Example
6993    /// ```ignore,no_run
6994    /// # use google_cloud_securitycenter_v2::model::Finding;
6995    /// use google_cloud_securitycenter_v2::model::Exfiltration;
6996    /// let x = Finding::new().set_or_clear_exfiltration(Some(Exfiltration::default()/* use setters */));
6997    /// let x = Finding::new().set_or_clear_exfiltration(None::<Exfiltration>);
6998    /// ```
6999    pub fn set_or_clear_exfiltration<T>(mut self, v: std::option::Option<T>) -> Self
7000    where
7001        T: std::convert::Into<crate::model::Exfiltration>,
7002    {
7003        self.exfiltration = v.map(|x| x.into());
7004        self
7005    }
7006
7007    /// Sets the value of [iam_bindings][crate::model::Finding::iam_bindings].
7008    ///
7009    /// # Example
7010    /// ```ignore,no_run
7011    /// # use google_cloud_securitycenter_v2::model::Finding;
7012    /// use google_cloud_securitycenter_v2::model::IamBinding;
7013    /// let x = Finding::new()
7014    ///     .set_iam_bindings([
7015    ///         IamBinding::default()/* use setters */,
7016    ///         IamBinding::default()/* use (different) setters */,
7017    ///     ]);
7018    /// ```
7019    pub fn set_iam_bindings<T, V>(mut self, v: T) -> Self
7020    where
7021        T: std::iter::IntoIterator<Item = V>,
7022        V: std::convert::Into<crate::model::IamBinding>,
7023    {
7024        use std::iter::Iterator;
7025        self.iam_bindings = v.into_iter().map(|i| i.into()).collect();
7026        self
7027    }
7028
7029    /// Sets the value of [next_steps][crate::model::Finding::next_steps].
7030    ///
7031    /// # Example
7032    /// ```ignore,no_run
7033    /// # use google_cloud_securitycenter_v2::model::Finding;
7034    /// let x = Finding::new().set_next_steps("example");
7035    /// ```
7036    pub fn set_next_steps<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7037        self.next_steps = v.into();
7038        self
7039    }
7040
7041    /// Sets the value of [module_name][crate::model::Finding::module_name].
7042    ///
7043    /// # Example
7044    /// ```ignore,no_run
7045    /// # use google_cloud_securitycenter_v2::model::Finding;
7046    /// let x = Finding::new().set_module_name("example");
7047    /// ```
7048    pub fn set_module_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7049        self.module_name = v.into();
7050        self
7051    }
7052
7053    /// Sets the value of [containers][crate::model::Finding::containers].
7054    ///
7055    /// # Example
7056    /// ```ignore,no_run
7057    /// # use google_cloud_securitycenter_v2::model::Finding;
7058    /// use google_cloud_securitycenter_v2::model::Container;
7059    /// let x = Finding::new()
7060    ///     .set_containers([
7061    ///         Container::default()/* use setters */,
7062    ///         Container::default()/* use (different) setters */,
7063    ///     ]);
7064    /// ```
7065    pub fn set_containers<T, V>(mut self, v: T) -> Self
7066    where
7067        T: std::iter::IntoIterator<Item = V>,
7068        V: std::convert::Into<crate::model::Container>,
7069    {
7070        use std::iter::Iterator;
7071        self.containers = v.into_iter().map(|i| i.into()).collect();
7072        self
7073    }
7074
7075    /// Sets the value of [kubernetes][crate::model::Finding::kubernetes].
7076    ///
7077    /// # Example
7078    /// ```ignore,no_run
7079    /// # use google_cloud_securitycenter_v2::model::Finding;
7080    /// use google_cloud_securitycenter_v2::model::Kubernetes;
7081    /// let x = Finding::new().set_kubernetes(Kubernetes::default()/* use setters */);
7082    /// ```
7083    pub fn set_kubernetes<T>(mut self, v: T) -> Self
7084    where
7085        T: std::convert::Into<crate::model::Kubernetes>,
7086    {
7087        self.kubernetes = std::option::Option::Some(v.into());
7088        self
7089    }
7090
7091    /// Sets or clears the value of [kubernetes][crate::model::Finding::kubernetes].
7092    ///
7093    /// # Example
7094    /// ```ignore,no_run
7095    /// # use google_cloud_securitycenter_v2::model::Finding;
7096    /// use google_cloud_securitycenter_v2::model::Kubernetes;
7097    /// let x = Finding::new().set_or_clear_kubernetes(Some(Kubernetes::default()/* use setters */));
7098    /// let x = Finding::new().set_or_clear_kubernetes(None::<Kubernetes>);
7099    /// ```
7100    pub fn set_or_clear_kubernetes<T>(mut self, v: std::option::Option<T>) -> Self
7101    where
7102        T: std::convert::Into<crate::model::Kubernetes>,
7103    {
7104        self.kubernetes = v.map(|x| x.into());
7105        self
7106    }
7107
7108    /// Sets the value of [database][crate::model::Finding::database].
7109    ///
7110    /// # Example
7111    /// ```ignore,no_run
7112    /// # use google_cloud_securitycenter_v2::model::Finding;
7113    /// use google_cloud_securitycenter_v2::model::Database;
7114    /// let x = Finding::new().set_database(Database::default()/* use setters */);
7115    /// ```
7116    pub fn set_database<T>(mut self, v: T) -> Self
7117    where
7118        T: std::convert::Into<crate::model::Database>,
7119    {
7120        self.database = std::option::Option::Some(v.into());
7121        self
7122    }
7123
7124    /// Sets or clears the value of [database][crate::model::Finding::database].
7125    ///
7126    /// # Example
7127    /// ```ignore,no_run
7128    /// # use google_cloud_securitycenter_v2::model::Finding;
7129    /// use google_cloud_securitycenter_v2::model::Database;
7130    /// let x = Finding::new().set_or_clear_database(Some(Database::default()/* use setters */));
7131    /// let x = Finding::new().set_or_clear_database(None::<Database>);
7132    /// ```
7133    pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
7134    where
7135        T: std::convert::Into<crate::model::Database>,
7136    {
7137        self.database = v.map(|x| x.into());
7138        self
7139    }
7140
7141    /// Sets the value of [attack_exposure][crate::model::Finding::attack_exposure].
7142    ///
7143    /// # Example
7144    /// ```ignore,no_run
7145    /// # use google_cloud_securitycenter_v2::model::Finding;
7146    /// use google_cloud_securitycenter_v2::model::AttackExposure;
7147    /// let x = Finding::new().set_attack_exposure(AttackExposure::default()/* use setters */);
7148    /// ```
7149    pub fn set_attack_exposure<T>(mut self, v: T) -> Self
7150    where
7151        T: std::convert::Into<crate::model::AttackExposure>,
7152    {
7153        self.attack_exposure = std::option::Option::Some(v.into());
7154        self
7155    }
7156
7157    /// Sets or clears the value of [attack_exposure][crate::model::Finding::attack_exposure].
7158    ///
7159    /// # Example
7160    /// ```ignore,no_run
7161    /// # use google_cloud_securitycenter_v2::model::Finding;
7162    /// use google_cloud_securitycenter_v2::model::AttackExposure;
7163    /// let x = Finding::new().set_or_clear_attack_exposure(Some(AttackExposure::default()/* use setters */));
7164    /// let x = Finding::new().set_or_clear_attack_exposure(None::<AttackExposure>);
7165    /// ```
7166    pub fn set_or_clear_attack_exposure<T>(mut self, v: std::option::Option<T>) -> Self
7167    where
7168        T: std::convert::Into<crate::model::AttackExposure>,
7169    {
7170        self.attack_exposure = v.map(|x| x.into());
7171        self
7172    }
7173
7174    /// Sets the value of [files][crate::model::Finding::files].
7175    ///
7176    /// # Example
7177    /// ```ignore,no_run
7178    /// # use google_cloud_securitycenter_v2::model::Finding;
7179    /// use google_cloud_securitycenter_v2::model::File;
7180    /// let x = Finding::new()
7181    ///     .set_files([
7182    ///         File::default()/* use setters */,
7183    ///         File::default()/* use (different) setters */,
7184    ///     ]);
7185    /// ```
7186    pub fn set_files<T, V>(mut self, v: T) -> Self
7187    where
7188        T: std::iter::IntoIterator<Item = V>,
7189        V: std::convert::Into<crate::model::File>,
7190    {
7191        use std::iter::Iterator;
7192        self.files = v.into_iter().map(|i| i.into()).collect();
7193        self
7194    }
7195
7196    /// Sets the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
7197    ///
7198    /// # Example
7199    /// ```ignore,no_run
7200    /// # use google_cloud_securitycenter_v2::model::Finding;
7201    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
7202    /// let x = Finding::new().set_cloud_dlp_inspection(CloudDlpInspection::default()/* use setters */);
7203    /// ```
7204    pub fn set_cloud_dlp_inspection<T>(mut self, v: T) -> Self
7205    where
7206        T: std::convert::Into<crate::model::CloudDlpInspection>,
7207    {
7208        self.cloud_dlp_inspection = std::option::Option::Some(v.into());
7209        self
7210    }
7211
7212    /// Sets or clears the value of [cloud_dlp_inspection][crate::model::Finding::cloud_dlp_inspection].
7213    ///
7214    /// # Example
7215    /// ```ignore,no_run
7216    /// # use google_cloud_securitycenter_v2::model::Finding;
7217    /// use google_cloud_securitycenter_v2::model::CloudDlpInspection;
7218    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(Some(CloudDlpInspection::default()/* use setters */));
7219    /// let x = Finding::new().set_or_clear_cloud_dlp_inspection(None::<CloudDlpInspection>);
7220    /// ```
7221    pub fn set_or_clear_cloud_dlp_inspection<T>(mut self, v: std::option::Option<T>) -> Self
7222    where
7223        T: std::convert::Into<crate::model::CloudDlpInspection>,
7224    {
7225        self.cloud_dlp_inspection = v.map(|x| x.into());
7226        self
7227    }
7228
7229    /// Sets the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
7230    ///
7231    /// # Example
7232    /// ```ignore,no_run
7233    /// # use google_cloud_securitycenter_v2::model::Finding;
7234    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
7235    /// let x = Finding::new().set_cloud_dlp_data_profile(CloudDlpDataProfile::default()/* use setters */);
7236    /// ```
7237    pub fn set_cloud_dlp_data_profile<T>(mut self, v: T) -> Self
7238    where
7239        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
7240    {
7241        self.cloud_dlp_data_profile = std::option::Option::Some(v.into());
7242        self
7243    }
7244
7245    /// Sets or clears the value of [cloud_dlp_data_profile][crate::model::Finding::cloud_dlp_data_profile].
7246    ///
7247    /// # Example
7248    /// ```ignore,no_run
7249    /// # use google_cloud_securitycenter_v2::model::Finding;
7250    /// use google_cloud_securitycenter_v2::model::CloudDlpDataProfile;
7251    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(Some(CloudDlpDataProfile::default()/* use setters */));
7252    /// let x = Finding::new().set_or_clear_cloud_dlp_data_profile(None::<CloudDlpDataProfile>);
7253    /// ```
7254    pub fn set_or_clear_cloud_dlp_data_profile<T>(mut self, v: std::option::Option<T>) -> Self
7255    where
7256        T: std::convert::Into<crate::model::CloudDlpDataProfile>,
7257    {
7258        self.cloud_dlp_data_profile = v.map(|x| x.into());
7259        self
7260    }
7261
7262    /// Sets the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
7263    ///
7264    /// # Example
7265    /// ```ignore,no_run
7266    /// # use google_cloud_securitycenter_v2::model::Finding;
7267    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
7268    /// let x = Finding::new().set_kernel_rootkit(KernelRootkit::default()/* use setters */);
7269    /// ```
7270    pub fn set_kernel_rootkit<T>(mut self, v: T) -> Self
7271    where
7272        T: std::convert::Into<crate::model::KernelRootkit>,
7273    {
7274        self.kernel_rootkit = std::option::Option::Some(v.into());
7275        self
7276    }
7277
7278    /// Sets or clears the value of [kernel_rootkit][crate::model::Finding::kernel_rootkit].
7279    ///
7280    /// # Example
7281    /// ```ignore,no_run
7282    /// # use google_cloud_securitycenter_v2::model::Finding;
7283    /// use google_cloud_securitycenter_v2::model::KernelRootkit;
7284    /// let x = Finding::new().set_or_clear_kernel_rootkit(Some(KernelRootkit::default()/* use setters */));
7285    /// let x = Finding::new().set_or_clear_kernel_rootkit(None::<KernelRootkit>);
7286    /// ```
7287    pub fn set_or_clear_kernel_rootkit<T>(mut self, v: std::option::Option<T>) -> Self
7288    where
7289        T: std::convert::Into<crate::model::KernelRootkit>,
7290    {
7291        self.kernel_rootkit = v.map(|x| x.into());
7292        self
7293    }
7294
7295    /// Sets the value of [org_policies][crate::model::Finding::org_policies].
7296    ///
7297    /// # Example
7298    /// ```ignore,no_run
7299    /// # use google_cloud_securitycenter_v2::model::Finding;
7300    /// use google_cloud_securitycenter_v2::model::OrgPolicy;
7301    /// let x = Finding::new()
7302    ///     .set_org_policies([
7303    ///         OrgPolicy::default()/* use setters */,
7304    ///         OrgPolicy::default()/* use (different) setters */,
7305    ///     ]);
7306    /// ```
7307    pub fn set_org_policies<T, V>(mut self, v: T) -> Self
7308    where
7309        T: std::iter::IntoIterator<Item = V>,
7310        V: std::convert::Into<crate::model::OrgPolicy>,
7311    {
7312        use std::iter::Iterator;
7313        self.org_policies = v.into_iter().map(|i| i.into()).collect();
7314        self
7315    }
7316
7317    /// Sets the value of [job][crate::model::Finding::job].
7318    ///
7319    /// # Example
7320    /// ```ignore,no_run
7321    /// # use google_cloud_securitycenter_v2::model::Finding;
7322    /// use google_cloud_securitycenter_v2::model::Job;
7323    /// let x = Finding::new().set_job(Job::default()/* use setters */);
7324    /// ```
7325    pub fn set_job<T>(mut self, v: T) -> Self
7326    where
7327        T: std::convert::Into<crate::model::Job>,
7328    {
7329        self.job = std::option::Option::Some(v.into());
7330        self
7331    }
7332
7333    /// Sets or clears the value of [job][crate::model::Finding::job].
7334    ///
7335    /// # Example
7336    /// ```ignore,no_run
7337    /// # use google_cloud_securitycenter_v2::model::Finding;
7338    /// use google_cloud_securitycenter_v2::model::Job;
7339    /// let x = Finding::new().set_or_clear_job(Some(Job::default()/* use setters */));
7340    /// let x = Finding::new().set_or_clear_job(None::<Job>);
7341    /// ```
7342    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
7343    where
7344        T: std::convert::Into<crate::model::Job>,
7345    {
7346        self.job = v.map(|x| x.into());
7347        self
7348    }
7349
7350    /// Sets the value of [application][crate::model::Finding::application].
7351    ///
7352    /// # Example
7353    /// ```ignore,no_run
7354    /// # use google_cloud_securitycenter_v2::model::Finding;
7355    /// use google_cloud_securitycenter_v2::model::Application;
7356    /// let x = Finding::new().set_application(Application::default()/* use setters */);
7357    /// ```
7358    pub fn set_application<T>(mut self, v: T) -> Self
7359    where
7360        T: std::convert::Into<crate::model::Application>,
7361    {
7362        self.application = std::option::Option::Some(v.into());
7363        self
7364    }
7365
7366    /// Sets or clears the value of [application][crate::model::Finding::application].
7367    ///
7368    /// # Example
7369    /// ```ignore,no_run
7370    /// # use google_cloud_securitycenter_v2::model::Finding;
7371    /// use google_cloud_securitycenter_v2::model::Application;
7372    /// let x = Finding::new().set_or_clear_application(Some(Application::default()/* use setters */));
7373    /// let x = Finding::new().set_or_clear_application(None::<Application>);
7374    /// ```
7375    pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
7376    where
7377        T: std::convert::Into<crate::model::Application>,
7378    {
7379        self.application = v.map(|x| x.into());
7380        self
7381    }
7382
7383    /// Sets the value of [ip_rules][crate::model::Finding::ip_rules].
7384    ///
7385    /// # Example
7386    /// ```ignore,no_run
7387    /// # use google_cloud_securitycenter_v2::model::Finding;
7388    /// use google_cloud_securitycenter_v2::model::IpRules;
7389    /// let x = Finding::new().set_ip_rules(IpRules::default()/* use setters */);
7390    /// ```
7391    pub fn set_ip_rules<T>(mut self, v: T) -> Self
7392    where
7393        T: std::convert::Into<crate::model::IpRules>,
7394    {
7395        self.ip_rules = std::option::Option::Some(v.into());
7396        self
7397    }
7398
7399    /// Sets or clears the value of [ip_rules][crate::model::Finding::ip_rules].
7400    ///
7401    /// # Example
7402    /// ```ignore,no_run
7403    /// # use google_cloud_securitycenter_v2::model::Finding;
7404    /// use google_cloud_securitycenter_v2::model::IpRules;
7405    /// let x = Finding::new().set_or_clear_ip_rules(Some(IpRules::default()/* use setters */));
7406    /// let x = Finding::new().set_or_clear_ip_rules(None::<IpRules>);
7407    /// ```
7408    pub fn set_or_clear_ip_rules<T>(mut self, v: std::option::Option<T>) -> Self
7409    where
7410        T: std::convert::Into<crate::model::IpRules>,
7411    {
7412        self.ip_rules = v.map(|x| x.into());
7413        self
7414    }
7415
7416    /// Sets the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
7417    ///
7418    /// # Example
7419    /// ```ignore,no_run
7420    /// # use google_cloud_securitycenter_v2::model::Finding;
7421    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
7422    /// let x = Finding::new().set_backup_disaster_recovery(BackupDisasterRecovery::default()/* use setters */);
7423    /// ```
7424    pub fn set_backup_disaster_recovery<T>(mut self, v: T) -> Self
7425    where
7426        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
7427    {
7428        self.backup_disaster_recovery = std::option::Option::Some(v.into());
7429        self
7430    }
7431
7432    /// Sets or clears the value of [backup_disaster_recovery][crate::model::Finding::backup_disaster_recovery].
7433    ///
7434    /// # Example
7435    /// ```ignore,no_run
7436    /// # use google_cloud_securitycenter_v2::model::Finding;
7437    /// use google_cloud_securitycenter_v2::model::BackupDisasterRecovery;
7438    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(Some(BackupDisasterRecovery::default()/* use setters */));
7439    /// let x = Finding::new().set_or_clear_backup_disaster_recovery(None::<BackupDisasterRecovery>);
7440    /// ```
7441    pub fn set_or_clear_backup_disaster_recovery<T>(mut self, v: std::option::Option<T>) -> Self
7442    where
7443        T: std::convert::Into<crate::model::BackupDisasterRecovery>,
7444    {
7445        self.backup_disaster_recovery = v.map(|x| x.into());
7446        self
7447    }
7448
7449    /// Sets the value of [security_posture][crate::model::Finding::security_posture].
7450    ///
7451    /// # Example
7452    /// ```ignore,no_run
7453    /// # use google_cloud_securitycenter_v2::model::Finding;
7454    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
7455    /// let x = Finding::new().set_security_posture(SecurityPosture::default()/* use setters */);
7456    /// ```
7457    pub fn set_security_posture<T>(mut self, v: T) -> Self
7458    where
7459        T: std::convert::Into<crate::model::SecurityPosture>,
7460    {
7461        self.security_posture = std::option::Option::Some(v.into());
7462        self
7463    }
7464
7465    /// Sets or clears the value of [security_posture][crate::model::Finding::security_posture].
7466    ///
7467    /// # Example
7468    /// ```ignore,no_run
7469    /// # use google_cloud_securitycenter_v2::model::Finding;
7470    /// use google_cloud_securitycenter_v2::model::SecurityPosture;
7471    /// let x = Finding::new().set_or_clear_security_posture(Some(SecurityPosture::default()/* use setters */));
7472    /// let x = Finding::new().set_or_clear_security_posture(None::<SecurityPosture>);
7473    /// ```
7474    pub fn set_or_clear_security_posture<T>(mut self, v: std::option::Option<T>) -> Self
7475    where
7476        T: std::convert::Into<crate::model::SecurityPosture>,
7477    {
7478        self.security_posture = v.map(|x| x.into());
7479        self
7480    }
7481
7482    /// Sets the value of [log_entries][crate::model::Finding::log_entries].
7483    ///
7484    /// # Example
7485    /// ```ignore,no_run
7486    /// # use google_cloud_securitycenter_v2::model::Finding;
7487    /// use google_cloud_securitycenter_v2::model::LogEntry;
7488    /// let x = Finding::new()
7489    ///     .set_log_entries([
7490    ///         LogEntry::default()/* use setters */,
7491    ///         LogEntry::default()/* use (different) setters */,
7492    ///     ]);
7493    /// ```
7494    pub fn set_log_entries<T, V>(mut self, v: T) -> Self
7495    where
7496        T: std::iter::IntoIterator<Item = V>,
7497        V: std::convert::Into<crate::model::LogEntry>,
7498    {
7499        use std::iter::Iterator;
7500        self.log_entries = v.into_iter().map(|i| i.into()).collect();
7501        self
7502    }
7503
7504    /// Sets the value of [load_balancers][crate::model::Finding::load_balancers].
7505    ///
7506    /// # Example
7507    /// ```ignore,no_run
7508    /// # use google_cloud_securitycenter_v2::model::Finding;
7509    /// use google_cloud_securitycenter_v2::model::LoadBalancer;
7510    /// let x = Finding::new()
7511    ///     .set_load_balancers([
7512    ///         LoadBalancer::default()/* use setters */,
7513    ///         LoadBalancer::default()/* use (different) setters */,
7514    ///     ]);
7515    /// ```
7516    pub fn set_load_balancers<T, V>(mut self, v: T) -> Self
7517    where
7518        T: std::iter::IntoIterator<Item = V>,
7519        V: std::convert::Into<crate::model::LoadBalancer>,
7520    {
7521        use std::iter::Iterator;
7522        self.load_balancers = v.into_iter().map(|i| i.into()).collect();
7523        self
7524    }
7525
7526    /// Sets the value of [cloud_armor][crate::model::Finding::cloud_armor].
7527    ///
7528    /// # Example
7529    /// ```ignore,no_run
7530    /// # use google_cloud_securitycenter_v2::model::Finding;
7531    /// use google_cloud_securitycenter_v2::model::CloudArmor;
7532    /// let x = Finding::new().set_cloud_armor(CloudArmor::default()/* use setters */);
7533    /// ```
7534    pub fn set_cloud_armor<T>(mut self, v: T) -> Self
7535    where
7536        T: std::convert::Into<crate::model::CloudArmor>,
7537    {
7538        self.cloud_armor = std::option::Option::Some(v.into());
7539        self
7540    }
7541
7542    /// Sets or clears the value of [cloud_armor][crate::model::Finding::cloud_armor].
7543    ///
7544    /// # Example
7545    /// ```ignore,no_run
7546    /// # use google_cloud_securitycenter_v2::model::Finding;
7547    /// use google_cloud_securitycenter_v2::model::CloudArmor;
7548    /// let x = Finding::new().set_or_clear_cloud_armor(Some(CloudArmor::default()/* use setters */));
7549    /// let x = Finding::new().set_or_clear_cloud_armor(None::<CloudArmor>);
7550    /// ```
7551    pub fn set_or_clear_cloud_armor<T>(mut self, v: std::option::Option<T>) -> Self
7552    where
7553        T: std::convert::Into<crate::model::CloudArmor>,
7554    {
7555        self.cloud_armor = v.map(|x| x.into());
7556        self
7557    }
7558
7559    /// Sets the value of [notebook][crate::model::Finding::notebook].
7560    ///
7561    /// # Example
7562    /// ```ignore,no_run
7563    /// # use google_cloud_securitycenter_v2::model::Finding;
7564    /// use google_cloud_securitycenter_v2::model::Notebook;
7565    /// let x = Finding::new().set_notebook(Notebook::default()/* use setters */);
7566    /// ```
7567    pub fn set_notebook<T>(mut self, v: T) -> Self
7568    where
7569        T: std::convert::Into<crate::model::Notebook>,
7570    {
7571        self.notebook = std::option::Option::Some(v.into());
7572        self
7573    }
7574
7575    /// Sets or clears the value of [notebook][crate::model::Finding::notebook].
7576    ///
7577    /// # Example
7578    /// ```ignore,no_run
7579    /// # use google_cloud_securitycenter_v2::model::Finding;
7580    /// use google_cloud_securitycenter_v2::model::Notebook;
7581    /// let x = Finding::new().set_or_clear_notebook(Some(Notebook::default()/* use setters */));
7582    /// let x = Finding::new().set_or_clear_notebook(None::<Notebook>);
7583    /// ```
7584    pub fn set_or_clear_notebook<T>(mut self, v: std::option::Option<T>) -> Self
7585    where
7586        T: std::convert::Into<crate::model::Notebook>,
7587    {
7588        self.notebook = v.map(|x| x.into());
7589        self
7590    }
7591
7592    /// Sets the value of [toxic_combination][crate::model::Finding::toxic_combination].
7593    ///
7594    /// # Example
7595    /// ```ignore,no_run
7596    /// # use google_cloud_securitycenter_v2::model::Finding;
7597    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7598    /// let x = Finding::new().set_toxic_combination(ToxicCombination::default()/* use setters */);
7599    /// ```
7600    pub fn set_toxic_combination<T>(mut self, v: T) -> Self
7601    where
7602        T: std::convert::Into<crate::model::ToxicCombination>,
7603    {
7604        self.toxic_combination = std::option::Option::Some(v.into());
7605        self
7606    }
7607
7608    /// Sets or clears the value of [toxic_combination][crate::model::Finding::toxic_combination].
7609    ///
7610    /// # Example
7611    /// ```ignore,no_run
7612    /// # use google_cloud_securitycenter_v2::model::Finding;
7613    /// use google_cloud_securitycenter_v2::model::ToxicCombination;
7614    /// let x = Finding::new().set_or_clear_toxic_combination(Some(ToxicCombination::default()/* use setters */));
7615    /// let x = Finding::new().set_or_clear_toxic_combination(None::<ToxicCombination>);
7616    /// ```
7617    pub fn set_or_clear_toxic_combination<T>(mut self, v: std::option::Option<T>) -> Self
7618    where
7619        T: std::convert::Into<crate::model::ToxicCombination>,
7620    {
7621        self.toxic_combination = v.map(|x| x.into());
7622        self
7623    }
7624
7625    /// Sets the value of [group_memberships][crate::model::Finding::group_memberships].
7626    ///
7627    /// # Example
7628    /// ```ignore,no_run
7629    /// # use google_cloud_securitycenter_v2::model::Finding;
7630    /// use google_cloud_securitycenter_v2::model::GroupMembership;
7631    /// let x = Finding::new()
7632    ///     .set_group_memberships([
7633    ///         GroupMembership::default()/* use setters */,
7634    ///         GroupMembership::default()/* use (different) setters */,
7635    ///     ]);
7636    /// ```
7637    pub fn set_group_memberships<T, V>(mut self, v: T) -> Self
7638    where
7639        T: std::iter::IntoIterator<Item = V>,
7640        V: std::convert::Into<crate::model::GroupMembership>,
7641    {
7642        use std::iter::Iterator;
7643        self.group_memberships = v.into_iter().map(|i| i.into()).collect();
7644        self
7645    }
7646
7647    /// Sets the value of [disk][crate::model::Finding::disk].
7648    ///
7649    /// # Example
7650    /// ```ignore,no_run
7651    /// # use google_cloud_securitycenter_v2::model::Finding;
7652    /// use google_cloud_securitycenter_v2::model::Disk;
7653    /// let x = Finding::new().set_disk(Disk::default()/* use setters */);
7654    /// ```
7655    pub fn set_disk<T>(mut self, v: T) -> Self
7656    where
7657        T: std::convert::Into<crate::model::Disk>,
7658    {
7659        self.disk = std::option::Option::Some(v.into());
7660        self
7661    }
7662
7663    /// Sets or clears the value of [disk][crate::model::Finding::disk].
7664    ///
7665    /// # Example
7666    /// ```ignore,no_run
7667    /// # use google_cloud_securitycenter_v2::model::Finding;
7668    /// use google_cloud_securitycenter_v2::model::Disk;
7669    /// let x = Finding::new().set_or_clear_disk(Some(Disk::default()/* use setters */));
7670    /// let x = Finding::new().set_or_clear_disk(None::<Disk>);
7671    /// ```
7672    pub fn set_or_clear_disk<T>(mut self, v: std::option::Option<T>) -> Self
7673    where
7674        T: std::convert::Into<crate::model::Disk>,
7675    {
7676        self.disk = v.map(|x| x.into());
7677        self
7678    }
7679
7680    /// Sets the value of [data_access_events][crate::model::Finding::data_access_events].
7681    ///
7682    /// # Example
7683    /// ```ignore,no_run
7684    /// # use google_cloud_securitycenter_v2::model::Finding;
7685    /// use google_cloud_securitycenter_v2::model::DataAccessEvent;
7686    /// let x = Finding::new()
7687    ///     .set_data_access_events([
7688    ///         DataAccessEvent::default()/* use setters */,
7689    ///         DataAccessEvent::default()/* use (different) setters */,
7690    ///     ]);
7691    /// ```
7692    pub fn set_data_access_events<T, V>(mut self, v: T) -> Self
7693    where
7694        T: std::iter::IntoIterator<Item = V>,
7695        V: std::convert::Into<crate::model::DataAccessEvent>,
7696    {
7697        use std::iter::Iterator;
7698        self.data_access_events = v.into_iter().map(|i| i.into()).collect();
7699        self
7700    }
7701
7702    /// Sets the value of [data_flow_events][crate::model::Finding::data_flow_events].
7703    ///
7704    /// # Example
7705    /// ```ignore,no_run
7706    /// # use google_cloud_securitycenter_v2::model::Finding;
7707    /// use google_cloud_securitycenter_v2::model::DataFlowEvent;
7708    /// let x = Finding::new()
7709    ///     .set_data_flow_events([
7710    ///         DataFlowEvent::default()/* use setters */,
7711    ///         DataFlowEvent::default()/* use (different) setters */,
7712    ///     ]);
7713    /// ```
7714    pub fn set_data_flow_events<T, V>(mut self, v: T) -> Self
7715    where
7716        T: std::iter::IntoIterator<Item = V>,
7717        V: std::convert::Into<crate::model::DataFlowEvent>,
7718    {
7719        use std::iter::Iterator;
7720        self.data_flow_events = v.into_iter().map(|i| i.into()).collect();
7721        self
7722    }
7723
7724    /// Sets the value of [networks][crate::model::Finding::networks].
7725    ///
7726    /// # Example
7727    /// ```ignore,no_run
7728    /// # use google_cloud_securitycenter_v2::model::Finding;
7729    /// use google_cloud_securitycenter_v2::model::Network;
7730    /// let x = Finding::new()
7731    ///     .set_networks([
7732    ///         Network::default()/* use setters */,
7733    ///         Network::default()/* use (different) setters */,
7734    ///     ]);
7735    /// ```
7736    pub fn set_networks<T, V>(mut self, v: T) -> Self
7737    where
7738        T: std::iter::IntoIterator<Item = V>,
7739        V: std::convert::Into<crate::model::Network>,
7740    {
7741        use std::iter::Iterator;
7742        self.networks = v.into_iter().map(|i| i.into()).collect();
7743        self
7744    }
7745
7746    /// Sets the value of [data_retention_deletion_events][crate::model::Finding::data_retention_deletion_events].
7747    ///
7748    /// # Example
7749    /// ```ignore,no_run
7750    /// # use google_cloud_securitycenter_v2::model::Finding;
7751    /// use google_cloud_securitycenter_v2::model::DataRetentionDeletionEvent;
7752    /// let x = Finding::new()
7753    ///     .set_data_retention_deletion_events([
7754    ///         DataRetentionDeletionEvent::default()/* use setters */,
7755    ///         DataRetentionDeletionEvent::default()/* use (different) setters */,
7756    ///     ]);
7757    /// ```
7758    pub fn set_data_retention_deletion_events<T, V>(mut self, v: T) -> Self
7759    where
7760        T: std::iter::IntoIterator<Item = V>,
7761        V: std::convert::Into<crate::model::DataRetentionDeletionEvent>,
7762    {
7763        use std::iter::Iterator;
7764        self.data_retention_deletion_events = v.into_iter().map(|i| i.into()).collect();
7765        self
7766    }
7767
7768    /// Sets the value of [affected_resources][crate::model::Finding::affected_resources].
7769    ///
7770    /// # Example
7771    /// ```ignore,no_run
7772    /// # use google_cloud_securitycenter_v2::model::Finding;
7773    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7774    /// let x = Finding::new().set_affected_resources(AffectedResources::default()/* use setters */);
7775    /// ```
7776    pub fn set_affected_resources<T>(mut self, v: T) -> Self
7777    where
7778        T: std::convert::Into<crate::model::AffectedResources>,
7779    {
7780        self.affected_resources = std::option::Option::Some(v.into());
7781        self
7782    }
7783
7784    /// Sets or clears the value of [affected_resources][crate::model::Finding::affected_resources].
7785    ///
7786    /// # Example
7787    /// ```ignore,no_run
7788    /// # use google_cloud_securitycenter_v2::model::Finding;
7789    /// use google_cloud_securitycenter_v2::model::AffectedResources;
7790    /// let x = Finding::new().set_or_clear_affected_resources(Some(AffectedResources::default()/* use setters */));
7791    /// let x = Finding::new().set_or_clear_affected_resources(None::<AffectedResources>);
7792    /// ```
7793    pub fn set_or_clear_affected_resources<T>(mut self, v: std::option::Option<T>) -> Self
7794    where
7795        T: std::convert::Into<crate::model::AffectedResources>,
7796    {
7797        self.affected_resources = v.map(|x| x.into());
7798        self
7799    }
7800
7801    /// Sets the value of [ai_model][crate::model::Finding::ai_model].
7802    ///
7803    /// # Example
7804    /// ```ignore,no_run
7805    /// # use google_cloud_securitycenter_v2::model::Finding;
7806    /// use google_cloud_securitycenter_v2::model::AiModel;
7807    /// let x = Finding::new().set_ai_model(AiModel::default()/* use setters */);
7808    /// ```
7809    pub fn set_ai_model<T>(mut self, v: T) -> Self
7810    where
7811        T: std::convert::Into<crate::model::AiModel>,
7812    {
7813        self.ai_model = std::option::Option::Some(v.into());
7814        self
7815    }
7816
7817    /// Sets or clears the value of [ai_model][crate::model::Finding::ai_model].
7818    ///
7819    /// # Example
7820    /// ```ignore,no_run
7821    /// # use google_cloud_securitycenter_v2::model::Finding;
7822    /// use google_cloud_securitycenter_v2::model::AiModel;
7823    /// let x = Finding::new().set_or_clear_ai_model(Some(AiModel::default()/* use setters */));
7824    /// let x = Finding::new().set_or_clear_ai_model(None::<AiModel>);
7825    /// ```
7826    pub fn set_or_clear_ai_model<T>(mut self, v: std::option::Option<T>) -> Self
7827    where
7828        T: std::convert::Into<crate::model::AiModel>,
7829    {
7830        self.ai_model = v.map(|x| x.into());
7831        self
7832    }
7833
7834    /// Sets the value of [chokepoint][crate::model::Finding::chokepoint].
7835    ///
7836    /// # Example
7837    /// ```ignore,no_run
7838    /// # use google_cloud_securitycenter_v2::model::Finding;
7839    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7840    /// let x = Finding::new().set_chokepoint(Chokepoint::default()/* use setters */);
7841    /// ```
7842    pub fn set_chokepoint<T>(mut self, v: T) -> Self
7843    where
7844        T: std::convert::Into<crate::model::Chokepoint>,
7845    {
7846        self.chokepoint = std::option::Option::Some(v.into());
7847        self
7848    }
7849
7850    /// Sets or clears the value of [chokepoint][crate::model::Finding::chokepoint].
7851    ///
7852    /// # Example
7853    /// ```ignore,no_run
7854    /// # use google_cloud_securitycenter_v2::model::Finding;
7855    /// use google_cloud_securitycenter_v2::model::Chokepoint;
7856    /// let x = Finding::new().set_or_clear_chokepoint(Some(Chokepoint::default()/* use setters */));
7857    /// let x = Finding::new().set_or_clear_chokepoint(None::<Chokepoint>);
7858    /// ```
7859    pub fn set_or_clear_chokepoint<T>(mut self, v: std::option::Option<T>) -> Self
7860    where
7861        T: std::convert::Into<crate::model::Chokepoint>,
7862    {
7863        self.chokepoint = v.map(|x| x.into());
7864        self
7865    }
7866
7867    /// Sets the value of [vertex_ai][crate::model::Finding::vertex_ai].
7868    ///
7869    /// # Example
7870    /// ```ignore,no_run
7871    /// # use google_cloud_securitycenter_v2::model::Finding;
7872    /// use google_cloud_securitycenter_v2::model::VertexAi;
7873    /// let x = Finding::new().set_vertex_ai(VertexAi::default()/* use setters */);
7874    /// ```
7875    pub fn set_vertex_ai<T>(mut self, v: T) -> Self
7876    where
7877        T: std::convert::Into<crate::model::VertexAi>,
7878    {
7879        self.vertex_ai = std::option::Option::Some(v.into());
7880        self
7881    }
7882
7883    /// Sets or clears the value of [vertex_ai][crate::model::Finding::vertex_ai].
7884    ///
7885    /// # Example
7886    /// ```ignore,no_run
7887    /// # use google_cloud_securitycenter_v2::model::Finding;
7888    /// use google_cloud_securitycenter_v2::model::VertexAi;
7889    /// let x = Finding::new().set_or_clear_vertex_ai(Some(VertexAi::default()/* use setters */));
7890    /// let x = Finding::new().set_or_clear_vertex_ai(None::<VertexAi>);
7891    /// ```
7892    pub fn set_or_clear_vertex_ai<T>(mut self, v: std::option::Option<T>) -> Self
7893    where
7894        T: std::convert::Into<crate::model::VertexAi>,
7895    {
7896        self.vertex_ai = v.map(|x| x.into());
7897        self
7898    }
7899
7900    /// Sets the value of [agent][crate::model::Finding::agent].
7901    ///
7902    /// # Example
7903    /// ```ignore,no_run
7904    /// # use google_cloud_securitycenter_v2::model::Finding;
7905    /// use google_cloud_securitycenter_v2::model::Agent;
7906    /// let x = Finding::new().set_agent(Agent::default()/* use setters */);
7907    /// ```
7908    pub fn set_agent<T>(mut self, v: T) -> Self
7909    where
7910        T: std::convert::Into<crate::model::Agent>,
7911    {
7912        self.agent = std::option::Option::Some(v.into());
7913        self
7914    }
7915
7916    /// Sets or clears the value of [agent][crate::model::Finding::agent].
7917    ///
7918    /// # Example
7919    /// ```ignore,no_run
7920    /// # use google_cloud_securitycenter_v2::model::Finding;
7921    /// use google_cloud_securitycenter_v2::model::Agent;
7922    /// let x = Finding::new().set_or_clear_agent(Some(Agent::default()/* use setters */));
7923    /// let x = Finding::new().set_or_clear_agent(None::<Agent>);
7924    /// ```
7925    pub fn set_or_clear_agent<T>(mut self, v: std::option::Option<T>) -> Self
7926    where
7927        T: std::convert::Into<crate::model::Agent>,
7928    {
7929        self.agent = v.map(|x| x.into());
7930        self
7931    }
7932
7933    /// Sets the value of [agent_sessions][crate::model::Finding::agent_sessions].
7934    ///
7935    /// # Example
7936    /// ```ignore,no_run
7937    /// # use google_cloud_securitycenter_v2::model::Finding;
7938    /// use google_cloud_securitycenter_v2::model::AgentSession;
7939    /// let x = Finding::new()
7940    ///     .set_agent_sessions([
7941    ///         AgentSession::default()/* use setters */,
7942    ///         AgentSession::default()/* use (different) setters */,
7943    ///     ]);
7944    /// ```
7945    pub fn set_agent_sessions<T, V>(mut self, v: T) -> Self
7946    where
7947        T: std::iter::IntoIterator<Item = V>,
7948        V: std::convert::Into<crate::model::AgentSession>,
7949    {
7950        use std::iter::Iterator;
7951        self.agent_sessions = v.into_iter().map(|i| i.into()).collect();
7952        self
7953    }
7954
7955    /// Sets the value of [agent_anomaly][crate::model::Finding::agent_anomaly].
7956    ///
7957    /// # Example
7958    /// ```ignore,no_run
7959    /// # use google_cloud_securitycenter_v2::model::Finding;
7960    /// use google_cloud_securitycenter_v2::model::AgentAnomaly;
7961    /// let x = Finding::new().set_agent_anomaly(AgentAnomaly::default()/* use setters */);
7962    /// ```
7963    pub fn set_agent_anomaly<T>(mut self, v: T) -> Self
7964    where
7965        T: std::convert::Into<crate::model::AgentAnomaly>,
7966    {
7967        self.agent_anomaly = std::option::Option::Some(v.into());
7968        self
7969    }
7970
7971    /// Sets or clears the value of [agent_anomaly][crate::model::Finding::agent_anomaly].
7972    ///
7973    /// # Example
7974    /// ```ignore,no_run
7975    /// # use google_cloud_securitycenter_v2::model::Finding;
7976    /// use google_cloud_securitycenter_v2::model::AgentAnomaly;
7977    /// let x = Finding::new().set_or_clear_agent_anomaly(Some(AgentAnomaly::default()/* use setters */));
7978    /// let x = Finding::new().set_or_clear_agent_anomaly(None::<AgentAnomaly>);
7979    /// ```
7980    pub fn set_or_clear_agent_anomaly<T>(mut self, v: std::option::Option<T>) -> Self
7981    where
7982        T: std::convert::Into<crate::model::AgentAnomaly>,
7983    {
7984        self.agent_anomaly = v.map(|x| x.into());
7985        self
7986    }
7987}
7988
7989impl wkt::message::Message for Finding {
7990    fn typename() -> &'static str {
7991        "type.googleapis.com/google.cloud.securitycenter.v2.Finding"
7992    }
7993}
7994
7995/// Defines additional types related to [Finding].
7996pub mod finding {
7997    #[allow(unused_imports)]
7998    use super::*;
7999
8000    /// Mute information about the finding, including whether the finding has a
8001    /// static mute or any matching dynamic mute rules.
8002    #[derive(Clone, Default, PartialEq)]
8003    #[non_exhaustive]
8004    pub struct MuteInfo {
8005        /// If set, the static mute applied to this finding. Static mutes override
8006        /// dynamic mutes. If unset, there is no static mute.
8007        pub static_mute: std::option::Option<crate::model::finding::mute_info::StaticMute>,
8008
8009        /// The list of dynamic mute rules that currently match the finding.
8010        pub dynamic_mute_records:
8011            std::vec::Vec<crate::model::finding::mute_info::DynamicMuteRecord>,
8012
8013        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8014    }
8015
8016    impl MuteInfo {
8017        /// Creates a new default instance.
8018        pub fn new() -> Self {
8019            std::default::Default::default()
8020        }
8021
8022        /// Sets the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
8023        ///
8024        /// # Example
8025        /// ```ignore,no_run
8026        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
8027        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
8028        /// let x = MuteInfo::new().set_static_mute(StaticMute::default()/* use setters */);
8029        /// ```
8030        pub fn set_static_mute<T>(mut self, v: T) -> Self
8031        where
8032            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
8033        {
8034            self.static_mute = std::option::Option::Some(v.into());
8035            self
8036        }
8037
8038        /// Sets or clears the value of [static_mute][crate::model::finding::MuteInfo::static_mute].
8039        ///
8040        /// # Example
8041        /// ```ignore,no_run
8042        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
8043        /// use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
8044        /// let x = MuteInfo::new().set_or_clear_static_mute(Some(StaticMute::default()/* use setters */));
8045        /// let x = MuteInfo::new().set_or_clear_static_mute(None::<StaticMute>);
8046        /// ```
8047        pub fn set_or_clear_static_mute<T>(mut self, v: std::option::Option<T>) -> Self
8048        where
8049            T: std::convert::Into<crate::model::finding::mute_info::StaticMute>,
8050        {
8051            self.static_mute = v.map(|x| x.into());
8052            self
8053        }
8054
8055        /// Sets the value of [dynamic_mute_records][crate::model::finding::MuteInfo::dynamic_mute_records].
8056        ///
8057        /// # Example
8058        /// ```ignore,no_run
8059        /// # use google_cloud_securitycenter_v2::model::finding::MuteInfo;
8060        /// use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
8061        /// let x = MuteInfo::new()
8062        ///     .set_dynamic_mute_records([
8063        ///         DynamicMuteRecord::default()/* use setters */,
8064        ///         DynamicMuteRecord::default()/* use (different) setters */,
8065        ///     ]);
8066        /// ```
8067        pub fn set_dynamic_mute_records<T, V>(mut self, v: T) -> Self
8068        where
8069            T: std::iter::IntoIterator<Item = V>,
8070            V: std::convert::Into<crate::model::finding::mute_info::DynamicMuteRecord>,
8071        {
8072            use std::iter::Iterator;
8073            self.dynamic_mute_records = v.into_iter().map(|i| i.into()).collect();
8074            self
8075        }
8076    }
8077
8078    impl wkt::message::Message for MuteInfo {
8079        fn typename() -> &'static str {
8080            "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo"
8081        }
8082    }
8083
8084    /// Defines additional types related to [MuteInfo].
8085    pub mod mute_info {
8086        #[allow(unused_imports)]
8087        use super::*;
8088
8089        /// Information about the static mute state. A static mute state overrides
8090        /// any dynamic mute rules that apply to this finding. The static mute state
8091        /// can be set by a static mute rule or by muting the finding directly.
8092        #[derive(Clone, Default, PartialEq)]
8093        #[non_exhaustive]
8094        pub struct StaticMute {
8095            /// The static mute state. If the value is `MUTED` or `UNMUTED`, then the
8096            /// finding's overall mute state will have the same value.
8097            pub state: crate::model::finding::Mute,
8098
8099            /// When the static mute was applied.
8100            pub apply_time: std::option::Option<wkt::Timestamp>,
8101
8102            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8103        }
8104
8105        impl StaticMute {
8106            /// Creates a new default instance.
8107            pub fn new() -> Self {
8108                std::default::Default::default()
8109            }
8110
8111            /// Sets the value of [state][crate::model::finding::mute_info::StaticMute::state].
8112            ///
8113            /// # Example
8114            /// ```ignore,no_run
8115            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
8116            /// use google_cloud_securitycenter_v2::model::finding::Mute;
8117            /// let x0 = StaticMute::new().set_state(Mute::Muted);
8118            /// let x1 = StaticMute::new().set_state(Mute::Unmuted);
8119            /// let x2 = StaticMute::new().set_state(Mute::Undefined);
8120            /// ```
8121            pub fn set_state<T: std::convert::Into<crate::model::finding::Mute>>(
8122                mut self,
8123                v: T,
8124            ) -> Self {
8125                self.state = v.into();
8126                self
8127            }
8128
8129            /// Sets the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
8130            ///
8131            /// # Example
8132            /// ```ignore,no_run
8133            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
8134            /// use wkt::Timestamp;
8135            /// let x = StaticMute::new().set_apply_time(Timestamp::default()/* use setters */);
8136            /// ```
8137            pub fn set_apply_time<T>(mut self, v: T) -> Self
8138            where
8139                T: std::convert::Into<wkt::Timestamp>,
8140            {
8141                self.apply_time = std::option::Option::Some(v.into());
8142                self
8143            }
8144
8145            /// Sets or clears the value of [apply_time][crate::model::finding::mute_info::StaticMute::apply_time].
8146            ///
8147            /// # Example
8148            /// ```ignore,no_run
8149            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::StaticMute;
8150            /// use wkt::Timestamp;
8151            /// let x = StaticMute::new().set_or_clear_apply_time(Some(Timestamp::default()/* use setters */));
8152            /// let x = StaticMute::new().set_or_clear_apply_time(None::<Timestamp>);
8153            /// ```
8154            pub fn set_or_clear_apply_time<T>(mut self, v: std::option::Option<T>) -> Self
8155            where
8156                T: std::convert::Into<wkt::Timestamp>,
8157            {
8158                self.apply_time = v.map(|x| x.into());
8159                self
8160            }
8161        }
8162
8163        impl wkt::message::Message for StaticMute {
8164            fn typename() -> &'static str {
8165                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute"
8166            }
8167        }
8168
8169        /// The record of a dynamic mute rule that matches the finding.
8170        #[derive(Clone, Default, PartialEq)]
8171        #[non_exhaustive]
8172        pub struct DynamicMuteRecord {
8173            /// The relative resource name of the mute rule, represented by a mute
8174            /// config, that created this record, for example
8175            /// `organizations/123/muteConfigs/mymuteconfig` or
8176            /// `organizations/123/locations/global/muteConfigs/mymuteconfig`.
8177            pub mute_config: std::string::String,
8178
8179            /// When the dynamic mute rule first matched the finding.
8180            pub match_time: std::option::Option<wkt::Timestamp>,
8181
8182            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8183        }
8184
8185        impl DynamicMuteRecord {
8186            /// Creates a new default instance.
8187            pub fn new() -> Self {
8188                std::default::Default::default()
8189            }
8190
8191            /// Sets the value of [mute_config][crate::model::finding::mute_info::DynamicMuteRecord::mute_config].
8192            ///
8193            /// # Example
8194            /// ```ignore,no_run
8195            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
8196            /// let x = DynamicMuteRecord::new().set_mute_config("example");
8197            /// ```
8198            pub fn set_mute_config<T: std::convert::Into<std::string::String>>(
8199                mut self,
8200                v: T,
8201            ) -> Self {
8202                self.mute_config = v.into();
8203                self
8204            }
8205
8206            /// Sets the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
8207            ///
8208            /// # Example
8209            /// ```ignore,no_run
8210            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
8211            /// use wkt::Timestamp;
8212            /// let x = DynamicMuteRecord::new().set_match_time(Timestamp::default()/* use setters */);
8213            /// ```
8214            pub fn set_match_time<T>(mut self, v: T) -> Self
8215            where
8216                T: std::convert::Into<wkt::Timestamp>,
8217            {
8218                self.match_time = std::option::Option::Some(v.into());
8219                self
8220            }
8221
8222            /// Sets or clears the value of [match_time][crate::model::finding::mute_info::DynamicMuteRecord::match_time].
8223            ///
8224            /// # Example
8225            /// ```ignore,no_run
8226            /// # use google_cloud_securitycenter_v2::model::finding::mute_info::DynamicMuteRecord;
8227            /// use wkt::Timestamp;
8228            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(Some(Timestamp::default()/* use setters */));
8229            /// let x = DynamicMuteRecord::new().set_or_clear_match_time(None::<Timestamp>);
8230            /// ```
8231            pub fn set_or_clear_match_time<T>(mut self, v: std::option::Option<T>) -> Self
8232            where
8233                T: std::convert::Into<wkt::Timestamp>,
8234            {
8235                self.match_time = v.map(|x| x.into());
8236                self
8237            }
8238        }
8239
8240        impl wkt::message::Message for DynamicMuteRecord {
8241            fn typename() -> &'static str {
8242                "type.googleapis.com/google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord"
8243            }
8244        }
8245    }
8246
8247    /// The state of the finding.
8248    ///
8249    /// # Working with unknown values
8250    ///
8251    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8252    /// additional enum variants at any time. Adding new variants is not considered
8253    /// a breaking change. Applications should write their code in anticipation of:
8254    ///
8255    /// - New values appearing in future releases of the client library, **and**
8256    /// - New values received dynamically, without application changes.
8257    ///
8258    /// Please consult the [Working with enums] section in the user guide for some
8259    /// guidelines.
8260    ///
8261    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8262    #[derive(Clone, Debug, PartialEq)]
8263    #[non_exhaustive]
8264    pub enum State {
8265        /// Unspecified state.
8266        Unspecified,
8267        /// The finding requires attention and has not been addressed yet.
8268        Active,
8269        /// The finding has been fixed, triaged as a non-issue or otherwise addressed
8270        /// and is no longer active.
8271        Inactive,
8272        /// If set, the enum was initialized with an unknown value.
8273        ///
8274        /// Applications can examine the value using [State::value] or
8275        /// [State::name].
8276        UnknownValue(state::UnknownValue),
8277    }
8278
8279    #[doc(hidden)]
8280    pub mod state {
8281        #[allow(unused_imports)]
8282        use super::*;
8283        #[derive(Clone, Debug, PartialEq)]
8284        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8285    }
8286
8287    impl State {
8288        /// Gets the enum value.
8289        ///
8290        /// Returns `None` if the enum contains an unknown value deserialized from
8291        /// the string representation of enums.
8292        pub fn value(&self) -> std::option::Option<i32> {
8293            match self {
8294                Self::Unspecified => std::option::Option::Some(0),
8295                Self::Active => std::option::Option::Some(1),
8296                Self::Inactive => std::option::Option::Some(2),
8297                Self::UnknownValue(u) => u.0.value(),
8298            }
8299        }
8300
8301        /// Gets the enum value as a string.
8302        ///
8303        /// Returns `None` if the enum contains an unknown value deserialized from
8304        /// the integer representation of enums.
8305        pub fn name(&self) -> std::option::Option<&str> {
8306            match self {
8307                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8308                Self::Active => std::option::Option::Some("ACTIVE"),
8309                Self::Inactive => std::option::Option::Some("INACTIVE"),
8310                Self::UnknownValue(u) => u.0.name(),
8311            }
8312        }
8313    }
8314
8315    impl std::default::Default for State {
8316        fn default() -> Self {
8317            use std::convert::From;
8318            Self::from(0)
8319        }
8320    }
8321
8322    impl std::fmt::Display for State {
8323        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8324            wkt::internal::display_enum(f, self.name(), self.value())
8325        }
8326    }
8327
8328    impl std::convert::From<i32> for State {
8329        fn from(value: i32) -> Self {
8330            match value {
8331                0 => Self::Unspecified,
8332                1 => Self::Active,
8333                2 => Self::Inactive,
8334                _ => Self::UnknownValue(state::UnknownValue(
8335                    wkt::internal::UnknownEnumValue::Integer(value),
8336                )),
8337            }
8338        }
8339    }
8340
8341    impl std::convert::From<&str> for State {
8342        fn from(value: &str) -> Self {
8343            use std::string::ToString;
8344            match value {
8345                "STATE_UNSPECIFIED" => Self::Unspecified,
8346                "ACTIVE" => Self::Active,
8347                "INACTIVE" => Self::Inactive,
8348                _ => Self::UnknownValue(state::UnknownValue(
8349                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8350                )),
8351            }
8352        }
8353    }
8354
8355    impl serde::ser::Serialize for State {
8356        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8357        where
8358            S: serde::Serializer,
8359        {
8360            match self {
8361                Self::Unspecified => serializer.serialize_i32(0),
8362                Self::Active => serializer.serialize_i32(1),
8363                Self::Inactive => serializer.serialize_i32(2),
8364                Self::UnknownValue(u) => u.0.serialize(serializer),
8365            }
8366        }
8367    }
8368
8369    impl<'de> serde::de::Deserialize<'de> for State {
8370        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8371        where
8372            D: serde::Deserializer<'de>,
8373        {
8374            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8375                ".google.cloud.securitycenter.v2.Finding.State",
8376            ))
8377        }
8378    }
8379
8380    /// The severity of the finding.
8381    ///
8382    /// # Working with unknown values
8383    ///
8384    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8385    /// additional enum variants at any time. Adding new variants is not considered
8386    /// a breaking change. Applications should write their code in anticipation of:
8387    ///
8388    /// - New values appearing in future releases of the client library, **and**
8389    /// - New values received dynamically, without application changes.
8390    ///
8391    /// Please consult the [Working with enums] section in the user guide for some
8392    /// guidelines.
8393    ///
8394    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8395    #[derive(Clone, Debug, PartialEq)]
8396    #[non_exhaustive]
8397    pub enum Severity {
8398        /// This value is used for findings when a source doesn't write a severity
8399        /// value.
8400        Unspecified,
8401        /// Vulnerability:
8402        /// A critical vulnerability is easily discoverable by an external actor,
8403        /// exploitable, and results in the direct ability to execute arbitrary code,
8404        /// exfiltrate data, and otherwise gain additional access and privileges to
8405        /// cloud resources and workloads. Examples include publicly accessible
8406        /// unprotected user data and public SSH access with weak or no
8407        /// passwords.
8408        ///
8409        /// Threat:
8410        /// Indicates a threat that is able to access, modify, or delete data or
8411        /// execute unauthorized code within existing resources.
8412        Critical,
8413        /// Vulnerability:
8414        /// A high risk vulnerability can be easily discovered and exploited in
8415        /// combination with other vulnerabilities in order to gain direct access and
8416        /// the ability to execute arbitrary code, exfiltrate data, and otherwise
8417        /// gain additional access and privileges to cloud resources and workloads.
8418        /// An example is a database with weak or no passwords that is only
8419        /// accessible internally. This database could easily be compromised by an
8420        /// actor that had access to the internal network.
8421        ///
8422        /// Threat:
8423        /// Indicates a threat that is able to create new computational resources in
8424        /// an environment but not able to access data or execute code in existing
8425        /// resources.
8426        High,
8427        /// Vulnerability:
8428        /// A medium risk vulnerability could be used by an actor to gain access to
8429        /// resources or privileges that enable them to eventually (through multiple
8430        /// steps or a complex exploit) gain access and the ability to execute
8431        /// arbitrary code or exfiltrate data. An example is a service account with
8432        /// access to more projects than it should have. If an actor gains access to
8433        /// the service account, they could potentially use that access to manipulate
8434        /// a project the service account was not intended to.
8435        ///
8436        /// Threat:
8437        /// Indicates a threat that is able to cause operational impact but may not
8438        /// access data or execute unauthorized code.
8439        Medium,
8440        /// Vulnerability:
8441        /// A low risk vulnerability hampers a security organization's ability to
8442        /// detect vulnerabilities or active threats in their deployment, or prevents
8443        /// the root cause investigation of security issues. An example is monitoring
8444        /// and logs being disabled for resource configurations and access.
8445        ///
8446        /// Threat:
8447        /// Indicates a threat that has obtained minimal access to an environment but
8448        /// is not able to access data, execute code, or create resources.
8449        Low,
8450        /// If set, the enum was initialized with an unknown value.
8451        ///
8452        /// Applications can examine the value using [Severity::value] or
8453        /// [Severity::name].
8454        UnknownValue(severity::UnknownValue),
8455    }
8456
8457    #[doc(hidden)]
8458    pub mod severity {
8459        #[allow(unused_imports)]
8460        use super::*;
8461        #[derive(Clone, Debug, PartialEq)]
8462        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8463    }
8464
8465    impl Severity {
8466        /// Gets the enum value.
8467        ///
8468        /// Returns `None` if the enum contains an unknown value deserialized from
8469        /// the string representation of enums.
8470        pub fn value(&self) -> std::option::Option<i32> {
8471            match self {
8472                Self::Unspecified => std::option::Option::Some(0),
8473                Self::Critical => std::option::Option::Some(1),
8474                Self::High => std::option::Option::Some(2),
8475                Self::Medium => std::option::Option::Some(3),
8476                Self::Low => std::option::Option::Some(4),
8477                Self::UnknownValue(u) => u.0.value(),
8478            }
8479        }
8480
8481        /// Gets the enum value as a string.
8482        ///
8483        /// Returns `None` if the enum contains an unknown value deserialized from
8484        /// the integer representation of enums.
8485        pub fn name(&self) -> std::option::Option<&str> {
8486            match self {
8487                Self::Unspecified => std::option::Option::Some("SEVERITY_UNSPECIFIED"),
8488                Self::Critical => std::option::Option::Some("CRITICAL"),
8489                Self::High => std::option::Option::Some("HIGH"),
8490                Self::Medium => std::option::Option::Some("MEDIUM"),
8491                Self::Low => std::option::Option::Some("LOW"),
8492                Self::UnknownValue(u) => u.0.name(),
8493            }
8494        }
8495    }
8496
8497    impl std::default::Default for Severity {
8498        fn default() -> Self {
8499            use std::convert::From;
8500            Self::from(0)
8501        }
8502    }
8503
8504    impl std::fmt::Display for Severity {
8505        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8506            wkt::internal::display_enum(f, self.name(), self.value())
8507        }
8508    }
8509
8510    impl std::convert::From<i32> for Severity {
8511        fn from(value: i32) -> Self {
8512            match value {
8513                0 => Self::Unspecified,
8514                1 => Self::Critical,
8515                2 => Self::High,
8516                3 => Self::Medium,
8517                4 => Self::Low,
8518                _ => Self::UnknownValue(severity::UnknownValue(
8519                    wkt::internal::UnknownEnumValue::Integer(value),
8520                )),
8521            }
8522        }
8523    }
8524
8525    impl std::convert::From<&str> for Severity {
8526        fn from(value: &str) -> Self {
8527            use std::string::ToString;
8528            match value {
8529                "SEVERITY_UNSPECIFIED" => Self::Unspecified,
8530                "CRITICAL" => Self::Critical,
8531                "HIGH" => Self::High,
8532                "MEDIUM" => Self::Medium,
8533                "LOW" => Self::Low,
8534                _ => Self::UnknownValue(severity::UnknownValue(
8535                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8536                )),
8537            }
8538        }
8539    }
8540
8541    impl serde::ser::Serialize for Severity {
8542        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8543        where
8544            S: serde::Serializer,
8545        {
8546            match self {
8547                Self::Unspecified => serializer.serialize_i32(0),
8548                Self::Critical => serializer.serialize_i32(1),
8549                Self::High => serializer.serialize_i32(2),
8550                Self::Medium => serializer.serialize_i32(3),
8551                Self::Low => serializer.serialize_i32(4),
8552                Self::UnknownValue(u) => u.0.serialize(serializer),
8553            }
8554        }
8555    }
8556
8557    impl<'de> serde::de::Deserialize<'de> for Severity {
8558        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8559        where
8560            D: serde::Deserializer<'de>,
8561        {
8562            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Severity>::new(
8563                ".google.cloud.securitycenter.v2.Finding.Severity",
8564            ))
8565        }
8566    }
8567
8568    /// Mute state a finding can be in.
8569    ///
8570    /// # Working with unknown values
8571    ///
8572    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8573    /// additional enum variants at any time. Adding new variants is not considered
8574    /// a breaking change. Applications should write their code in anticipation of:
8575    ///
8576    /// - New values appearing in future releases of the client library, **and**
8577    /// - New values received dynamically, without application changes.
8578    ///
8579    /// Please consult the [Working with enums] section in the user guide for some
8580    /// guidelines.
8581    ///
8582    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8583    #[derive(Clone, Debug, PartialEq)]
8584    #[non_exhaustive]
8585    pub enum Mute {
8586        /// Unspecified.
8587        Unspecified,
8588        /// Finding has been muted.
8589        Muted,
8590        /// Finding has been unmuted.
8591        Unmuted,
8592        /// Finding has never been muted/unmuted.
8593        Undefined,
8594        /// If set, the enum was initialized with an unknown value.
8595        ///
8596        /// Applications can examine the value using [Mute::value] or
8597        /// [Mute::name].
8598        UnknownValue(mute::UnknownValue),
8599    }
8600
8601    #[doc(hidden)]
8602    pub mod mute {
8603        #[allow(unused_imports)]
8604        use super::*;
8605        #[derive(Clone, Debug, PartialEq)]
8606        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8607    }
8608
8609    impl Mute {
8610        /// Gets the enum value.
8611        ///
8612        /// Returns `None` if the enum contains an unknown value deserialized from
8613        /// the string representation of enums.
8614        pub fn value(&self) -> std::option::Option<i32> {
8615            match self {
8616                Self::Unspecified => std::option::Option::Some(0),
8617                Self::Muted => std::option::Option::Some(1),
8618                Self::Unmuted => std::option::Option::Some(2),
8619                Self::Undefined => std::option::Option::Some(3),
8620                Self::UnknownValue(u) => u.0.value(),
8621            }
8622        }
8623
8624        /// Gets the enum value as a string.
8625        ///
8626        /// Returns `None` if the enum contains an unknown value deserialized from
8627        /// the integer representation of enums.
8628        pub fn name(&self) -> std::option::Option<&str> {
8629            match self {
8630                Self::Unspecified => std::option::Option::Some("MUTE_UNSPECIFIED"),
8631                Self::Muted => std::option::Option::Some("MUTED"),
8632                Self::Unmuted => std::option::Option::Some("UNMUTED"),
8633                Self::Undefined => std::option::Option::Some("UNDEFINED"),
8634                Self::UnknownValue(u) => u.0.name(),
8635            }
8636        }
8637    }
8638
8639    impl std::default::Default for Mute {
8640        fn default() -> Self {
8641            use std::convert::From;
8642            Self::from(0)
8643        }
8644    }
8645
8646    impl std::fmt::Display for Mute {
8647        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8648            wkt::internal::display_enum(f, self.name(), self.value())
8649        }
8650    }
8651
8652    impl std::convert::From<i32> for Mute {
8653        fn from(value: i32) -> Self {
8654            match value {
8655                0 => Self::Unspecified,
8656                1 => Self::Muted,
8657                2 => Self::Unmuted,
8658                3 => Self::Undefined,
8659                _ => Self::UnknownValue(mute::UnknownValue(
8660                    wkt::internal::UnknownEnumValue::Integer(value),
8661                )),
8662            }
8663        }
8664    }
8665
8666    impl std::convert::From<&str> for Mute {
8667        fn from(value: &str) -> Self {
8668            use std::string::ToString;
8669            match value {
8670                "MUTE_UNSPECIFIED" => Self::Unspecified,
8671                "MUTED" => Self::Muted,
8672                "UNMUTED" => Self::Unmuted,
8673                "UNDEFINED" => Self::Undefined,
8674                _ => Self::UnknownValue(mute::UnknownValue(
8675                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8676                )),
8677            }
8678        }
8679    }
8680
8681    impl serde::ser::Serialize for Mute {
8682        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8683        where
8684            S: serde::Serializer,
8685        {
8686            match self {
8687                Self::Unspecified => serializer.serialize_i32(0),
8688                Self::Muted => serializer.serialize_i32(1),
8689                Self::Unmuted => serializer.serialize_i32(2),
8690                Self::Undefined => serializer.serialize_i32(3),
8691                Self::UnknownValue(u) => u.0.serialize(serializer),
8692            }
8693        }
8694    }
8695
8696    impl<'de> serde::de::Deserialize<'de> for Mute {
8697        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8698        where
8699            D: serde::Deserializer<'de>,
8700        {
8701            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mute>::new(
8702                ".google.cloud.securitycenter.v2.Finding.Mute",
8703            ))
8704        }
8705    }
8706
8707    /// Represents what kind of Finding it is.
8708    ///
8709    /// # Working with unknown values
8710    ///
8711    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8712    /// additional enum variants at any time. Adding new variants is not considered
8713    /// a breaking change. Applications should write their code in anticipation of:
8714    ///
8715    /// - New values appearing in future releases of the client library, **and**
8716    /// - New values received dynamically, without application changes.
8717    ///
8718    /// Please consult the [Working with enums] section in the user guide for some
8719    /// guidelines.
8720    ///
8721    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8722    #[derive(Clone, Debug, PartialEq)]
8723    #[non_exhaustive]
8724    pub enum FindingClass {
8725        /// Unspecified finding class.
8726        Unspecified,
8727        /// Describes unwanted or malicious activity.
8728        Threat,
8729        /// Describes a potential weakness in software that increases risk to
8730        /// Confidentiality & Integrity & Availability.
8731        Vulnerability,
8732        /// Describes a potential weakness in cloud resource/asset configuration that
8733        /// increases risk.
8734        Misconfiguration,
8735        /// Describes a security observation that is for informational purposes.
8736        Observation,
8737        /// Describes an error that prevents some SCC functionality.
8738        SccError,
8739        /// Describes a potential security risk due to a change in the security
8740        /// posture.
8741        PostureViolation,
8742        /// Describes a combination of security issues that represent a more severe
8743        /// security problem when taken together.
8744        ToxicCombination,
8745        /// Describes a potential security risk to data assets that contain sensitive
8746        /// data.
8747        SensitiveDataRisk,
8748        /// Describes a resource or resource group where high risk attack paths
8749        /// converge, based on attack path simulations (APS).
8750        Chokepoint,
8751        /// If set, the enum was initialized with an unknown value.
8752        ///
8753        /// Applications can examine the value using [FindingClass::value] or
8754        /// [FindingClass::name].
8755        UnknownValue(finding_class::UnknownValue),
8756    }
8757
8758    #[doc(hidden)]
8759    pub mod finding_class {
8760        #[allow(unused_imports)]
8761        use super::*;
8762        #[derive(Clone, Debug, PartialEq)]
8763        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8764    }
8765
8766    impl FindingClass {
8767        /// Gets the enum value.
8768        ///
8769        /// Returns `None` if the enum contains an unknown value deserialized from
8770        /// the string representation of enums.
8771        pub fn value(&self) -> std::option::Option<i32> {
8772            match self {
8773                Self::Unspecified => std::option::Option::Some(0),
8774                Self::Threat => std::option::Option::Some(1),
8775                Self::Vulnerability => std::option::Option::Some(2),
8776                Self::Misconfiguration => std::option::Option::Some(3),
8777                Self::Observation => std::option::Option::Some(4),
8778                Self::SccError => std::option::Option::Some(5),
8779                Self::PostureViolation => std::option::Option::Some(6),
8780                Self::ToxicCombination => std::option::Option::Some(7),
8781                Self::SensitiveDataRisk => std::option::Option::Some(8),
8782                Self::Chokepoint => std::option::Option::Some(9),
8783                Self::UnknownValue(u) => u.0.value(),
8784            }
8785        }
8786
8787        /// Gets the enum value as a string.
8788        ///
8789        /// Returns `None` if the enum contains an unknown value deserialized from
8790        /// the integer representation of enums.
8791        pub fn name(&self) -> std::option::Option<&str> {
8792            match self {
8793                Self::Unspecified => std::option::Option::Some("FINDING_CLASS_UNSPECIFIED"),
8794                Self::Threat => std::option::Option::Some("THREAT"),
8795                Self::Vulnerability => std::option::Option::Some("VULNERABILITY"),
8796                Self::Misconfiguration => std::option::Option::Some("MISCONFIGURATION"),
8797                Self::Observation => std::option::Option::Some("OBSERVATION"),
8798                Self::SccError => std::option::Option::Some("SCC_ERROR"),
8799                Self::PostureViolation => std::option::Option::Some("POSTURE_VIOLATION"),
8800                Self::ToxicCombination => std::option::Option::Some("TOXIC_COMBINATION"),
8801                Self::SensitiveDataRisk => std::option::Option::Some("SENSITIVE_DATA_RISK"),
8802                Self::Chokepoint => std::option::Option::Some("CHOKEPOINT"),
8803                Self::UnknownValue(u) => u.0.name(),
8804            }
8805        }
8806    }
8807
8808    impl std::default::Default for FindingClass {
8809        fn default() -> Self {
8810            use std::convert::From;
8811            Self::from(0)
8812        }
8813    }
8814
8815    impl std::fmt::Display for FindingClass {
8816        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8817            wkt::internal::display_enum(f, self.name(), self.value())
8818        }
8819    }
8820
8821    impl std::convert::From<i32> for FindingClass {
8822        fn from(value: i32) -> Self {
8823            match value {
8824                0 => Self::Unspecified,
8825                1 => Self::Threat,
8826                2 => Self::Vulnerability,
8827                3 => Self::Misconfiguration,
8828                4 => Self::Observation,
8829                5 => Self::SccError,
8830                6 => Self::PostureViolation,
8831                7 => Self::ToxicCombination,
8832                8 => Self::SensitiveDataRisk,
8833                9 => Self::Chokepoint,
8834                _ => Self::UnknownValue(finding_class::UnknownValue(
8835                    wkt::internal::UnknownEnumValue::Integer(value),
8836                )),
8837            }
8838        }
8839    }
8840
8841    impl std::convert::From<&str> for FindingClass {
8842        fn from(value: &str) -> Self {
8843            use std::string::ToString;
8844            match value {
8845                "FINDING_CLASS_UNSPECIFIED" => Self::Unspecified,
8846                "THREAT" => Self::Threat,
8847                "VULNERABILITY" => Self::Vulnerability,
8848                "MISCONFIGURATION" => Self::Misconfiguration,
8849                "OBSERVATION" => Self::Observation,
8850                "SCC_ERROR" => Self::SccError,
8851                "POSTURE_VIOLATION" => Self::PostureViolation,
8852                "TOXIC_COMBINATION" => Self::ToxicCombination,
8853                "SENSITIVE_DATA_RISK" => Self::SensitiveDataRisk,
8854                "CHOKEPOINT" => Self::Chokepoint,
8855                _ => Self::UnknownValue(finding_class::UnknownValue(
8856                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8857                )),
8858            }
8859        }
8860    }
8861
8862    impl serde::ser::Serialize for FindingClass {
8863        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8864        where
8865            S: serde::Serializer,
8866        {
8867            match self {
8868                Self::Unspecified => serializer.serialize_i32(0),
8869                Self::Threat => serializer.serialize_i32(1),
8870                Self::Vulnerability => serializer.serialize_i32(2),
8871                Self::Misconfiguration => serializer.serialize_i32(3),
8872                Self::Observation => serializer.serialize_i32(4),
8873                Self::SccError => serializer.serialize_i32(5),
8874                Self::PostureViolation => serializer.serialize_i32(6),
8875                Self::ToxicCombination => serializer.serialize_i32(7),
8876                Self::SensitiveDataRisk => serializer.serialize_i32(8),
8877                Self::Chokepoint => serializer.serialize_i32(9),
8878                Self::UnknownValue(u) => u.0.serialize(serializer),
8879            }
8880        }
8881    }
8882
8883    impl<'de> serde::de::Deserialize<'de> for FindingClass {
8884        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8885        where
8886            D: serde::Deserializer<'de>,
8887        {
8888            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FindingClass>::new(
8889                ".google.cloud.securitycenter.v2.Finding.FindingClass",
8890            ))
8891        }
8892    }
8893}
8894
8895/// Message that contains the resource name and display name of a folder
8896/// resource.
8897#[derive(Clone, Default, PartialEq)]
8898#[non_exhaustive]
8899pub struct Folder {
8900    /// Full resource name of this folder. See:
8901    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
8902    pub resource_folder: std::string::String,
8903
8904    /// The user defined display name for this folder.
8905    pub resource_folder_display_name: std::string::String,
8906
8907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8908}
8909
8910impl Folder {
8911    /// Creates a new default instance.
8912    pub fn new() -> Self {
8913        std::default::Default::default()
8914    }
8915
8916    /// Sets the value of [resource_folder][crate::model::Folder::resource_folder].
8917    ///
8918    /// # Example
8919    /// ```ignore,no_run
8920    /// # use google_cloud_securitycenter_v2::model::Folder;
8921    /// let x = Folder::new().set_resource_folder("example");
8922    /// ```
8923    pub fn set_resource_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8924        self.resource_folder = v.into();
8925        self
8926    }
8927
8928    /// Sets the value of [resource_folder_display_name][crate::model::Folder::resource_folder_display_name].
8929    ///
8930    /// # Example
8931    /// ```ignore,no_run
8932    /// # use google_cloud_securitycenter_v2::model::Folder;
8933    /// let x = Folder::new().set_resource_folder_display_name("example");
8934    /// ```
8935    pub fn set_resource_folder_display_name<T: std::convert::Into<std::string::String>>(
8936        mut self,
8937        v: T,
8938    ) -> Self {
8939        self.resource_folder_display_name = v.into();
8940        self
8941    }
8942}
8943
8944impl wkt::message::Message for Folder {
8945    fn typename() -> &'static str {
8946        "type.googleapis.com/google.cloud.securitycenter.v2.Folder"
8947    }
8948}
8949
8950/// Contains details about groups of which this finding is a member. A group is a
8951/// collection of findings that are related in some way.
8952#[derive(Clone, Default, PartialEq)]
8953#[non_exhaustive]
8954pub struct GroupMembership {
8955    /// Type of group.
8956    pub group_type: crate::model::group_membership::GroupType,
8957
8958    /// ID of the group.
8959    pub group_id: std::string::String,
8960
8961    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8962}
8963
8964impl GroupMembership {
8965    /// Creates a new default instance.
8966    pub fn new() -> Self {
8967        std::default::Default::default()
8968    }
8969
8970    /// Sets the value of [group_type][crate::model::GroupMembership::group_type].
8971    ///
8972    /// # Example
8973    /// ```ignore,no_run
8974    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8975    /// use google_cloud_securitycenter_v2::model::group_membership::GroupType;
8976    /// let x0 = GroupMembership::new().set_group_type(GroupType::ToxicCombination);
8977    /// let x1 = GroupMembership::new().set_group_type(GroupType::Chokepoint);
8978    /// ```
8979    pub fn set_group_type<T: std::convert::Into<crate::model::group_membership::GroupType>>(
8980        mut self,
8981        v: T,
8982    ) -> Self {
8983        self.group_type = v.into();
8984        self
8985    }
8986
8987    /// Sets the value of [group_id][crate::model::GroupMembership::group_id].
8988    ///
8989    /// # Example
8990    /// ```ignore,no_run
8991    /// # use google_cloud_securitycenter_v2::model::GroupMembership;
8992    /// let x = GroupMembership::new().set_group_id("example");
8993    /// ```
8994    pub fn set_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8995        self.group_id = v.into();
8996        self
8997    }
8998}
8999
9000impl wkt::message::Message for GroupMembership {
9001    fn typename() -> &'static str {
9002        "type.googleapis.com/google.cloud.securitycenter.v2.GroupMembership"
9003    }
9004}
9005
9006/// Defines additional types related to [GroupMembership].
9007pub mod group_membership {
9008    #[allow(unused_imports)]
9009    use super::*;
9010
9011    /// Possible types of groups.
9012    ///
9013    /// # Working with unknown values
9014    ///
9015    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9016    /// additional enum variants at any time. Adding new variants is not considered
9017    /// a breaking change. Applications should write their code in anticipation of:
9018    ///
9019    /// - New values appearing in future releases of the client library, **and**
9020    /// - New values received dynamically, without application changes.
9021    ///
9022    /// Please consult the [Working with enums] section in the user guide for some
9023    /// guidelines.
9024    ///
9025    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9026    #[derive(Clone, Debug, PartialEq)]
9027    #[non_exhaustive]
9028    pub enum GroupType {
9029        /// Default value.
9030        Unspecified,
9031        /// Group represents a toxic combination.
9032        ToxicCombination,
9033        /// Group represents a chokepoint.
9034        Chokepoint,
9035        /// If set, the enum was initialized with an unknown value.
9036        ///
9037        /// Applications can examine the value using [GroupType::value] or
9038        /// [GroupType::name].
9039        UnknownValue(group_type::UnknownValue),
9040    }
9041
9042    #[doc(hidden)]
9043    pub mod group_type {
9044        #[allow(unused_imports)]
9045        use super::*;
9046        #[derive(Clone, Debug, PartialEq)]
9047        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9048    }
9049
9050    impl GroupType {
9051        /// Gets the enum value.
9052        ///
9053        /// Returns `None` if the enum contains an unknown value deserialized from
9054        /// the string representation of enums.
9055        pub fn value(&self) -> std::option::Option<i32> {
9056            match self {
9057                Self::Unspecified => std::option::Option::Some(0),
9058                Self::ToxicCombination => std::option::Option::Some(1),
9059                Self::Chokepoint => std::option::Option::Some(3),
9060                Self::UnknownValue(u) => u.0.value(),
9061            }
9062        }
9063
9064        /// Gets the enum value as a string.
9065        ///
9066        /// Returns `None` if the enum contains an unknown value deserialized from
9067        /// the integer representation of enums.
9068        pub fn name(&self) -> std::option::Option<&str> {
9069            match self {
9070                Self::Unspecified => std::option::Option::Some("GROUP_TYPE_UNSPECIFIED"),
9071                Self::ToxicCombination => std::option::Option::Some("GROUP_TYPE_TOXIC_COMBINATION"),
9072                Self::Chokepoint => std::option::Option::Some("GROUP_TYPE_CHOKEPOINT"),
9073                Self::UnknownValue(u) => u.0.name(),
9074            }
9075        }
9076    }
9077
9078    impl std::default::Default for GroupType {
9079        fn default() -> Self {
9080            use std::convert::From;
9081            Self::from(0)
9082        }
9083    }
9084
9085    impl std::fmt::Display for GroupType {
9086        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9087            wkt::internal::display_enum(f, self.name(), self.value())
9088        }
9089    }
9090
9091    impl std::convert::From<i32> for GroupType {
9092        fn from(value: i32) -> Self {
9093            match value {
9094                0 => Self::Unspecified,
9095                1 => Self::ToxicCombination,
9096                3 => Self::Chokepoint,
9097                _ => Self::UnknownValue(group_type::UnknownValue(
9098                    wkt::internal::UnknownEnumValue::Integer(value),
9099                )),
9100            }
9101        }
9102    }
9103
9104    impl std::convert::From<&str> for GroupType {
9105        fn from(value: &str) -> Self {
9106            use std::string::ToString;
9107            match value {
9108                "GROUP_TYPE_UNSPECIFIED" => Self::Unspecified,
9109                "GROUP_TYPE_TOXIC_COMBINATION" => Self::ToxicCombination,
9110                "GROUP_TYPE_CHOKEPOINT" => Self::Chokepoint,
9111                _ => Self::UnknownValue(group_type::UnknownValue(
9112                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9113                )),
9114            }
9115        }
9116    }
9117
9118    impl serde::ser::Serialize for GroupType {
9119        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9120        where
9121            S: serde::Serializer,
9122        {
9123            match self {
9124                Self::Unspecified => serializer.serialize_i32(0),
9125                Self::ToxicCombination => serializer.serialize_i32(1),
9126                Self::Chokepoint => serializer.serialize_i32(3),
9127                Self::UnknownValue(u) => u.0.serialize(serializer),
9128            }
9129        }
9130    }
9131
9132    impl<'de> serde::de::Deserialize<'de> for GroupType {
9133        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9134        where
9135            D: serde::Deserializer<'de>,
9136        {
9137            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GroupType>::new(
9138                ".google.cloud.securitycenter.v2.GroupMembership.GroupType",
9139            ))
9140        }
9141    }
9142}
9143
9144/// Represents a particular IAM binding, which captures a member's role addition,
9145/// removal, or state.
9146#[derive(Clone, Default, PartialEq)]
9147#[non_exhaustive]
9148pub struct IamBinding {
9149    /// The action that was performed on a Binding.
9150    pub action: crate::model::iam_binding::Action,
9151
9152    /// Role that is assigned to "members".
9153    /// For example, "roles/viewer", "roles/editor", or "roles/owner".
9154    pub role: std::string::String,
9155
9156    /// A single identity requesting access for a Cloud Platform resource, for
9157    /// example, "foo@google.com".
9158    pub member: std::string::String,
9159
9160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9161}
9162
9163impl IamBinding {
9164    /// Creates a new default instance.
9165    pub fn new() -> Self {
9166        std::default::Default::default()
9167    }
9168
9169    /// Sets the value of [action][crate::model::IamBinding::action].
9170    ///
9171    /// # Example
9172    /// ```ignore,no_run
9173    /// # use google_cloud_securitycenter_v2::model::IamBinding;
9174    /// use google_cloud_securitycenter_v2::model::iam_binding::Action;
9175    /// let x0 = IamBinding::new().set_action(Action::Add);
9176    /// let x1 = IamBinding::new().set_action(Action::Remove);
9177    /// ```
9178    pub fn set_action<T: std::convert::Into<crate::model::iam_binding::Action>>(
9179        mut self,
9180        v: T,
9181    ) -> Self {
9182        self.action = v.into();
9183        self
9184    }
9185
9186    /// Sets the value of [role][crate::model::IamBinding::role].
9187    ///
9188    /// # Example
9189    /// ```ignore,no_run
9190    /// # use google_cloud_securitycenter_v2::model::IamBinding;
9191    /// let x = IamBinding::new().set_role("example");
9192    /// ```
9193    pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9194        self.role = v.into();
9195        self
9196    }
9197
9198    /// Sets the value of [member][crate::model::IamBinding::member].
9199    ///
9200    /// # Example
9201    /// ```ignore,no_run
9202    /// # use google_cloud_securitycenter_v2::model::IamBinding;
9203    /// let x = IamBinding::new().set_member("example");
9204    /// ```
9205    pub fn set_member<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9206        self.member = v.into();
9207        self
9208    }
9209}
9210
9211impl wkt::message::Message for IamBinding {
9212    fn typename() -> &'static str {
9213        "type.googleapis.com/google.cloud.securitycenter.v2.IamBinding"
9214    }
9215}
9216
9217/// Defines additional types related to [IamBinding].
9218pub mod iam_binding {
9219    #[allow(unused_imports)]
9220    use super::*;
9221
9222    /// The type of action performed on a Binding in a policy.
9223    ///
9224    /// # Working with unknown values
9225    ///
9226    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9227    /// additional enum variants at any time. Adding new variants is not considered
9228    /// a breaking change. Applications should write their code in anticipation of:
9229    ///
9230    /// - New values appearing in future releases of the client library, **and**
9231    /// - New values received dynamically, without application changes.
9232    ///
9233    /// Please consult the [Working with enums] section in the user guide for some
9234    /// guidelines.
9235    ///
9236    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9237    #[derive(Clone, Debug, PartialEq)]
9238    #[non_exhaustive]
9239    pub enum Action {
9240        /// Unspecified.
9241        Unspecified,
9242        /// Addition of a Binding.
9243        Add,
9244        /// Removal of a Binding.
9245        Remove,
9246        /// If set, the enum was initialized with an unknown value.
9247        ///
9248        /// Applications can examine the value using [Action::value] or
9249        /// [Action::name].
9250        UnknownValue(action::UnknownValue),
9251    }
9252
9253    #[doc(hidden)]
9254    pub mod action {
9255        #[allow(unused_imports)]
9256        use super::*;
9257        #[derive(Clone, Debug, PartialEq)]
9258        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9259    }
9260
9261    impl Action {
9262        /// Gets the enum value.
9263        ///
9264        /// Returns `None` if the enum contains an unknown value deserialized from
9265        /// the string representation of enums.
9266        pub fn value(&self) -> std::option::Option<i32> {
9267            match self {
9268                Self::Unspecified => std::option::Option::Some(0),
9269                Self::Add => std::option::Option::Some(1),
9270                Self::Remove => std::option::Option::Some(2),
9271                Self::UnknownValue(u) => u.0.value(),
9272            }
9273        }
9274
9275        /// Gets the enum value as a string.
9276        ///
9277        /// Returns `None` if the enum contains an unknown value deserialized from
9278        /// the integer representation of enums.
9279        pub fn name(&self) -> std::option::Option<&str> {
9280            match self {
9281                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
9282                Self::Add => std::option::Option::Some("ADD"),
9283                Self::Remove => std::option::Option::Some("REMOVE"),
9284                Self::UnknownValue(u) => u.0.name(),
9285            }
9286        }
9287    }
9288
9289    impl std::default::Default for Action {
9290        fn default() -> Self {
9291            use std::convert::From;
9292            Self::from(0)
9293        }
9294    }
9295
9296    impl std::fmt::Display for Action {
9297        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9298            wkt::internal::display_enum(f, self.name(), self.value())
9299        }
9300    }
9301
9302    impl std::convert::From<i32> for Action {
9303        fn from(value: i32) -> Self {
9304            match value {
9305                0 => Self::Unspecified,
9306                1 => Self::Add,
9307                2 => Self::Remove,
9308                _ => Self::UnknownValue(action::UnknownValue(
9309                    wkt::internal::UnknownEnumValue::Integer(value),
9310                )),
9311            }
9312        }
9313    }
9314
9315    impl std::convert::From<&str> for Action {
9316        fn from(value: &str) -> Self {
9317            use std::string::ToString;
9318            match value {
9319                "ACTION_UNSPECIFIED" => Self::Unspecified,
9320                "ADD" => Self::Add,
9321                "REMOVE" => Self::Remove,
9322                _ => Self::UnknownValue(action::UnknownValue(
9323                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9324                )),
9325            }
9326        }
9327    }
9328
9329    impl serde::ser::Serialize for Action {
9330        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9331        where
9332            S: serde::Serializer,
9333        {
9334            match self {
9335                Self::Unspecified => serializer.serialize_i32(0),
9336                Self::Add => serializer.serialize_i32(1),
9337                Self::Remove => serializer.serialize_i32(2),
9338                Self::UnknownValue(u) => u.0.serialize(serializer),
9339            }
9340        }
9341    }
9342
9343    impl<'de> serde::de::Deserialize<'de> for Action {
9344        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9345        where
9346            D: serde::Deserializer<'de>,
9347        {
9348            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
9349                ".google.cloud.securitycenter.v2.IamBinding.Action",
9350            ))
9351        }
9352    }
9353}
9354
9355/// Represents what's commonly known as an _indicator of compromise_ (IoC) in
9356/// computer forensics. This is an artifact observed on a network or in an
9357/// operating system that, with high confidence, indicates a computer intrusion.
9358/// For more information, see [Indicator of
9359/// compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
9360#[derive(Clone, Default, PartialEq)]
9361#[non_exhaustive]
9362pub struct Indicator {
9363    /// The list of IP addresses that are associated with the finding.
9364    pub ip_addresses: std::vec::Vec<std::string::String>,
9365
9366    /// List of domains associated to the Finding.
9367    pub domains: std::vec::Vec<std::string::String>,
9368
9369    /// The list of matched signatures indicating that the given
9370    /// process is present in the environment.
9371    pub signatures: std::vec::Vec<crate::model::indicator::ProcessSignature>,
9372
9373    /// The list of URIs associated to the Findings.
9374    pub uris: std::vec::Vec<std::string::String>,
9375
9376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9377}
9378
9379impl Indicator {
9380    /// Creates a new default instance.
9381    pub fn new() -> Self {
9382        std::default::Default::default()
9383    }
9384
9385    /// Sets the value of [ip_addresses][crate::model::Indicator::ip_addresses].
9386    ///
9387    /// # Example
9388    /// ```ignore,no_run
9389    /// # use google_cloud_securitycenter_v2::model::Indicator;
9390    /// let x = Indicator::new().set_ip_addresses(["a", "b", "c"]);
9391    /// ```
9392    pub fn set_ip_addresses<T, V>(mut self, v: T) -> Self
9393    where
9394        T: std::iter::IntoIterator<Item = V>,
9395        V: std::convert::Into<std::string::String>,
9396    {
9397        use std::iter::Iterator;
9398        self.ip_addresses = v.into_iter().map(|i| i.into()).collect();
9399        self
9400    }
9401
9402    /// Sets the value of [domains][crate::model::Indicator::domains].
9403    ///
9404    /// # Example
9405    /// ```ignore,no_run
9406    /// # use google_cloud_securitycenter_v2::model::Indicator;
9407    /// let x = Indicator::new().set_domains(["a", "b", "c"]);
9408    /// ```
9409    pub fn set_domains<T, V>(mut self, v: T) -> Self
9410    where
9411        T: std::iter::IntoIterator<Item = V>,
9412        V: std::convert::Into<std::string::String>,
9413    {
9414        use std::iter::Iterator;
9415        self.domains = v.into_iter().map(|i| i.into()).collect();
9416        self
9417    }
9418
9419    /// Sets the value of [signatures][crate::model::Indicator::signatures].
9420    ///
9421    /// # Example
9422    /// ```ignore,no_run
9423    /// # use google_cloud_securitycenter_v2::model::Indicator;
9424    /// use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9425    /// let x = Indicator::new()
9426    ///     .set_signatures([
9427    ///         ProcessSignature::default()/* use setters */,
9428    ///         ProcessSignature::default()/* use (different) setters */,
9429    ///     ]);
9430    /// ```
9431    pub fn set_signatures<T, V>(mut self, v: T) -> Self
9432    where
9433        T: std::iter::IntoIterator<Item = V>,
9434        V: std::convert::Into<crate::model::indicator::ProcessSignature>,
9435    {
9436        use std::iter::Iterator;
9437        self.signatures = v.into_iter().map(|i| i.into()).collect();
9438        self
9439    }
9440
9441    /// Sets the value of [uris][crate::model::Indicator::uris].
9442    ///
9443    /// # Example
9444    /// ```ignore,no_run
9445    /// # use google_cloud_securitycenter_v2::model::Indicator;
9446    /// let x = Indicator::new().set_uris(["a", "b", "c"]);
9447    /// ```
9448    pub fn set_uris<T, V>(mut self, v: T) -> Self
9449    where
9450        T: std::iter::IntoIterator<Item = V>,
9451        V: std::convert::Into<std::string::String>,
9452    {
9453        use std::iter::Iterator;
9454        self.uris = v.into_iter().map(|i| i.into()).collect();
9455        self
9456    }
9457}
9458
9459impl wkt::message::Message for Indicator {
9460    fn typename() -> &'static str {
9461        "type.googleapis.com/google.cloud.securitycenter.v2.Indicator"
9462    }
9463}
9464
9465/// Defines additional types related to [Indicator].
9466pub mod indicator {
9467    #[allow(unused_imports)]
9468    use super::*;
9469
9470    /// Indicates what signature matched this process.
9471    #[derive(Clone, Default, PartialEq)]
9472    #[non_exhaustive]
9473    pub struct ProcessSignature {
9474        /// Describes the type of resource associated with the signature.
9475        pub signature_type: crate::model::indicator::process_signature::SignatureType,
9476
9477        /// The signature.
9478        pub signature: std::option::Option<crate::model::indicator::process_signature::Signature>,
9479
9480        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9481    }
9482
9483    impl ProcessSignature {
9484        /// Creates a new default instance.
9485        pub fn new() -> Self {
9486            std::default::Default::default()
9487        }
9488
9489        /// Sets the value of [signature_type][crate::model::indicator::ProcessSignature::signature_type].
9490        ///
9491        /// # Example
9492        /// ```ignore,no_run
9493        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9494        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::SignatureType;
9495        /// let x0 = ProcessSignature::new().set_signature_type(SignatureType::Process);
9496        /// let x1 = ProcessSignature::new().set_signature_type(SignatureType::File);
9497        /// ```
9498        pub fn set_signature_type<
9499            T: std::convert::Into<crate::model::indicator::process_signature::SignatureType>,
9500        >(
9501            mut self,
9502            v: T,
9503        ) -> Self {
9504            self.signature_type = v.into();
9505            self
9506        }
9507
9508        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature].
9509        ///
9510        /// Note that all the setters affecting `signature` are mutually
9511        /// exclusive.
9512        ///
9513        /// # Example
9514        /// ```ignore,no_run
9515        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9516        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9517        /// let x = ProcessSignature::new().set_signature(Some(
9518        ///     google_cloud_securitycenter_v2::model::indicator::process_signature::Signature::MemoryHashSignature(MemoryHashSignature::default().into())));
9519        /// ```
9520        pub fn set_signature<
9521            T: std::convert::Into<
9522                    std::option::Option<crate::model::indicator::process_signature::Signature>,
9523                >,
9524        >(
9525            mut self,
9526            v: T,
9527        ) -> Self {
9528            self.signature = v.into();
9529            self
9530        }
9531
9532        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
9533        /// if it holds a `MemoryHashSignature`, `None` if the field is not set or
9534        /// holds a different branch.
9535        pub fn memory_hash_signature(
9536            &self,
9537        ) -> std::option::Option<
9538            &std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
9539        > {
9540            #[allow(unreachable_patterns)]
9541            self.signature.as_ref().and_then(|v| match v {
9542                crate::model::indicator::process_signature::Signature::MemoryHashSignature(v) => {
9543                    std::option::Option::Some(v)
9544                }
9545                _ => std::option::Option::None,
9546            })
9547        }
9548
9549        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
9550        /// to hold a `MemoryHashSignature`.
9551        ///
9552        /// Note that all the setters affecting `signature` are
9553        /// mutually exclusive.
9554        ///
9555        /// # Example
9556        /// ```ignore,no_run
9557        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9558        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9559        /// let x = ProcessSignature::new().set_memory_hash_signature(MemoryHashSignature::default()/* use setters */);
9560        /// assert!(x.memory_hash_signature().is_some());
9561        /// assert!(x.yara_rule_signature().is_none());
9562        /// ```
9563        pub fn set_memory_hash_signature<
9564            T: std::convert::Into<
9565                    std::boxed::Box<
9566                        crate::model::indicator::process_signature::MemoryHashSignature,
9567                    >,
9568                >,
9569        >(
9570            mut self,
9571            v: T,
9572        ) -> Self {
9573            self.signature = std::option::Option::Some(
9574                crate::model::indicator::process_signature::Signature::MemoryHashSignature(
9575                    v.into(),
9576                ),
9577            );
9578            self
9579        }
9580
9581        /// The value of [signature][crate::model::indicator::ProcessSignature::signature]
9582        /// if it holds a `YaraRuleSignature`, `None` if the field is not set or
9583        /// holds a different branch.
9584        pub fn yara_rule_signature(
9585            &self,
9586        ) -> std::option::Option<
9587            &std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9588        > {
9589            #[allow(unreachable_patterns)]
9590            self.signature.as_ref().and_then(|v| match v {
9591                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v) => {
9592                    std::option::Option::Some(v)
9593                }
9594                _ => std::option::Option::None,
9595            })
9596        }
9597
9598        /// Sets the value of [signature][crate::model::indicator::ProcessSignature::signature]
9599        /// to hold a `YaraRuleSignature`.
9600        ///
9601        /// Note that all the setters affecting `signature` are
9602        /// mutually exclusive.
9603        ///
9604        /// # Example
9605        /// ```ignore,no_run
9606        /// # use google_cloud_securitycenter_v2::model::indicator::ProcessSignature;
9607        /// use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
9608        /// let x = ProcessSignature::new().set_yara_rule_signature(YaraRuleSignature::default()/* use setters */);
9609        /// assert!(x.yara_rule_signature().is_some());
9610        /// assert!(x.memory_hash_signature().is_none());
9611        /// ```
9612        pub fn set_yara_rule_signature<
9613            T: std::convert::Into<
9614                    std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9615                >,
9616        >(
9617            mut self,
9618            v: T,
9619        ) -> Self {
9620            self.signature = std::option::Option::Some(
9621                crate::model::indicator::process_signature::Signature::YaraRuleSignature(v.into()),
9622            );
9623            self
9624        }
9625    }
9626
9627    impl wkt::message::Message for ProcessSignature {
9628        fn typename() -> &'static str {
9629            "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature"
9630        }
9631    }
9632
9633    /// Defines additional types related to [ProcessSignature].
9634    pub mod process_signature {
9635        #[allow(unused_imports)]
9636        use super::*;
9637
9638        /// A signature corresponding to memory page hashes.
9639        #[derive(Clone, Default, PartialEq)]
9640        #[non_exhaustive]
9641        pub struct MemoryHashSignature {
9642            /// The binary family.
9643            pub binary_family: std::string::String,
9644
9645            /// The list of memory hash detections contributing to the binary family
9646            /// match.
9647            pub detections: std::vec::Vec<
9648                crate::model::indicator::process_signature::memory_hash_signature::Detection,
9649            >,
9650
9651            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9652        }
9653
9654        impl MemoryHashSignature {
9655            /// Creates a new default instance.
9656            pub fn new() -> Self {
9657                std::default::Default::default()
9658            }
9659
9660            /// Sets the value of [binary_family][crate::model::indicator::process_signature::MemoryHashSignature::binary_family].
9661            ///
9662            /// # Example
9663            /// ```ignore,no_run
9664            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9665            /// let x = MemoryHashSignature::new().set_binary_family("example");
9666            /// ```
9667            pub fn set_binary_family<T: std::convert::Into<std::string::String>>(
9668                mut self,
9669                v: T,
9670            ) -> Self {
9671                self.binary_family = v.into();
9672                self
9673            }
9674
9675            /// Sets the value of [detections][crate::model::indicator::process_signature::MemoryHashSignature::detections].
9676            ///
9677            /// # Example
9678            /// ```ignore,no_run
9679            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::MemoryHashSignature;
9680            /// use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9681            /// let x = MemoryHashSignature::new()
9682            ///     .set_detections([
9683            ///         Detection::default()/* use setters */,
9684            ///         Detection::default()/* use (different) setters */,
9685            ///     ]);
9686            /// ```
9687            pub fn set_detections<T, V>(mut self, v: T) -> Self
9688            where
9689                T: std::iter::IntoIterator<Item = V>,
9690                V: std::convert::Into<crate::model::indicator::process_signature::memory_hash_signature::Detection>
9691            {
9692                use std::iter::Iterator;
9693                self.detections = v.into_iter().map(|i| i.into()).collect();
9694                self
9695            }
9696        }
9697
9698        impl wkt::message::Message for MemoryHashSignature {
9699            fn typename() -> &'static str {
9700                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature"
9701            }
9702        }
9703
9704        /// Defines additional types related to [MemoryHashSignature].
9705        pub mod memory_hash_signature {
9706            #[allow(unused_imports)]
9707            use super::*;
9708
9709            /// Memory hash detection contributing to the binary family match.
9710            #[derive(Clone, Default, PartialEq)]
9711            #[non_exhaustive]
9712            pub struct Detection {
9713                /// The name of the binary associated with the memory hash
9714                /// signature detection.
9715                pub binary: std::string::String,
9716
9717                /// The percentage of memory page hashes in the signature
9718                /// that were matched.
9719                pub percent_pages_matched: f64,
9720
9721                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9722            }
9723
9724            impl Detection {
9725                /// Creates a new default instance.
9726                pub fn new() -> Self {
9727                    std::default::Default::default()
9728                }
9729
9730                /// Sets the value of [binary][crate::model::indicator::process_signature::memory_hash_signature::Detection::binary].
9731                ///
9732                /// # Example
9733                /// ```ignore,no_run
9734                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9735                /// let x = Detection::new().set_binary("example");
9736                /// ```
9737                pub fn set_binary<T: std::convert::Into<std::string::String>>(
9738                    mut self,
9739                    v: T,
9740                ) -> Self {
9741                    self.binary = v.into();
9742                    self
9743                }
9744
9745                /// Sets the value of [percent_pages_matched][crate::model::indicator::process_signature::memory_hash_signature::Detection::percent_pages_matched].
9746                ///
9747                /// # Example
9748                /// ```ignore,no_run
9749                /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::memory_hash_signature::Detection;
9750                /// let x = Detection::new().set_percent_pages_matched(42.0);
9751                /// ```
9752                pub fn set_percent_pages_matched<T: std::convert::Into<f64>>(
9753                    mut self,
9754                    v: T,
9755                ) -> Self {
9756                    self.percent_pages_matched = v.into();
9757                    self
9758                }
9759            }
9760
9761            impl wkt::message::Message for Detection {
9762                fn typename() -> &'static str {
9763                    "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection"
9764                }
9765            }
9766        }
9767
9768        /// A signature corresponding to a YARA rule.
9769        #[derive(Clone, Default, PartialEq)]
9770        #[non_exhaustive]
9771        pub struct YaraRuleSignature {
9772            /// The name of the YARA rule.
9773            pub yara_rule: std::string::String,
9774
9775            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9776        }
9777
9778        impl YaraRuleSignature {
9779            /// Creates a new default instance.
9780            pub fn new() -> Self {
9781                std::default::Default::default()
9782            }
9783
9784            /// Sets the value of [yara_rule][crate::model::indicator::process_signature::YaraRuleSignature::yara_rule].
9785            ///
9786            /// # Example
9787            /// ```ignore,no_run
9788            /// # use google_cloud_securitycenter_v2::model::indicator::process_signature::YaraRuleSignature;
9789            /// let x = YaraRuleSignature::new().set_yara_rule("example");
9790            /// ```
9791            pub fn set_yara_rule<T: std::convert::Into<std::string::String>>(
9792                mut self,
9793                v: T,
9794            ) -> Self {
9795                self.yara_rule = v.into();
9796                self
9797            }
9798        }
9799
9800        impl wkt::message::Message for YaraRuleSignature {
9801            fn typename() -> &'static str {
9802                "type.googleapis.com/google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature"
9803            }
9804        }
9805
9806        /// Possible resource types to be associated with a signature.
9807        ///
9808        /// # Working with unknown values
9809        ///
9810        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9811        /// additional enum variants at any time. Adding new variants is not considered
9812        /// a breaking change. Applications should write their code in anticipation of:
9813        ///
9814        /// - New values appearing in future releases of the client library, **and**
9815        /// - New values received dynamically, without application changes.
9816        ///
9817        /// Please consult the [Working with enums] section in the user guide for some
9818        /// guidelines.
9819        ///
9820        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9821        #[derive(Clone, Debug, PartialEq)]
9822        #[non_exhaustive]
9823        pub enum SignatureType {
9824            /// The default signature type.
9825            Unspecified,
9826            /// Used for signatures concerning processes.
9827            Process,
9828            /// Used for signatures concerning disks.
9829            File,
9830            /// If set, the enum was initialized with an unknown value.
9831            ///
9832            /// Applications can examine the value using [SignatureType::value] or
9833            /// [SignatureType::name].
9834            UnknownValue(signature_type::UnknownValue),
9835        }
9836
9837        #[doc(hidden)]
9838        pub mod signature_type {
9839            #[allow(unused_imports)]
9840            use super::*;
9841            #[derive(Clone, Debug, PartialEq)]
9842            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9843        }
9844
9845        impl SignatureType {
9846            /// Gets the enum value.
9847            ///
9848            /// Returns `None` if the enum contains an unknown value deserialized from
9849            /// the string representation of enums.
9850            pub fn value(&self) -> std::option::Option<i32> {
9851                match self {
9852                    Self::Unspecified => std::option::Option::Some(0),
9853                    Self::Process => std::option::Option::Some(1),
9854                    Self::File => std::option::Option::Some(2),
9855                    Self::UnknownValue(u) => u.0.value(),
9856                }
9857            }
9858
9859            /// Gets the enum value as a string.
9860            ///
9861            /// Returns `None` if the enum contains an unknown value deserialized from
9862            /// the integer representation of enums.
9863            pub fn name(&self) -> std::option::Option<&str> {
9864                match self {
9865                    Self::Unspecified => std::option::Option::Some("SIGNATURE_TYPE_UNSPECIFIED"),
9866                    Self::Process => std::option::Option::Some("SIGNATURE_TYPE_PROCESS"),
9867                    Self::File => std::option::Option::Some("SIGNATURE_TYPE_FILE"),
9868                    Self::UnknownValue(u) => u.0.name(),
9869                }
9870            }
9871        }
9872
9873        impl std::default::Default for SignatureType {
9874            fn default() -> Self {
9875                use std::convert::From;
9876                Self::from(0)
9877            }
9878        }
9879
9880        impl std::fmt::Display for SignatureType {
9881            fn fmt(
9882                &self,
9883                f: &mut std::fmt::Formatter<'_>,
9884            ) -> std::result::Result<(), std::fmt::Error> {
9885                wkt::internal::display_enum(f, self.name(), self.value())
9886            }
9887        }
9888
9889        impl std::convert::From<i32> for SignatureType {
9890            fn from(value: i32) -> Self {
9891                match value {
9892                    0 => Self::Unspecified,
9893                    1 => Self::Process,
9894                    2 => Self::File,
9895                    _ => Self::UnknownValue(signature_type::UnknownValue(
9896                        wkt::internal::UnknownEnumValue::Integer(value),
9897                    )),
9898                }
9899            }
9900        }
9901
9902        impl std::convert::From<&str> for SignatureType {
9903            fn from(value: &str) -> Self {
9904                use std::string::ToString;
9905                match value {
9906                    "SIGNATURE_TYPE_UNSPECIFIED" => Self::Unspecified,
9907                    "SIGNATURE_TYPE_PROCESS" => Self::Process,
9908                    "SIGNATURE_TYPE_FILE" => Self::File,
9909                    _ => Self::UnknownValue(signature_type::UnknownValue(
9910                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9911                    )),
9912                }
9913            }
9914        }
9915
9916        impl serde::ser::Serialize for SignatureType {
9917            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9918            where
9919                S: serde::Serializer,
9920            {
9921                match self {
9922                    Self::Unspecified => serializer.serialize_i32(0),
9923                    Self::Process => serializer.serialize_i32(1),
9924                    Self::File => serializer.serialize_i32(2),
9925                    Self::UnknownValue(u) => u.0.serialize(serializer),
9926                }
9927            }
9928        }
9929
9930        impl<'de> serde::de::Deserialize<'de> for SignatureType {
9931            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9932            where
9933                D: serde::Deserializer<'de>,
9934            {
9935                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SignatureType>::new(
9936                    ".google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType",
9937                ))
9938            }
9939        }
9940
9941        /// The signature.
9942        #[derive(Clone, Debug, PartialEq)]
9943        #[non_exhaustive]
9944        pub enum Signature {
9945            /// Signature indicating that a binary family was matched.
9946            MemoryHashSignature(
9947                std::boxed::Box<crate::model::indicator::process_signature::MemoryHashSignature>,
9948            ),
9949            /// Signature indicating that a YARA rule was matched.
9950            YaraRuleSignature(
9951                std::boxed::Box<crate::model::indicator::process_signature::YaraRuleSignature>,
9952            ),
9953        }
9954    }
9955}
9956
9957/// IP rules associated with the finding.
9958#[derive(Clone, Default, PartialEq)]
9959#[non_exhaustive]
9960pub struct IpRules {
9961    /// The direction that the rule is applicable to, one of ingress or egress.
9962    pub direction: crate::model::ip_rules::Direction,
9963
9964    /// If source IP ranges are specified, the firewall rule applies only to
9965    /// traffic that has a source IP address in these ranges. These ranges must be
9966    /// expressed in CIDR format. Only supports IPv4.
9967    pub source_ip_ranges: std::vec::Vec<std::string::String>,
9968
9969    /// If destination IP ranges are specified, the firewall rule applies only to
9970    /// traffic that has a destination IP address in these ranges. These ranges
9971    /// must be expressed in CIDR format. Only supports IPv4.
9972    pub destination_ip_ranges: std::vec::Vec<std::string::String>,
9973
9974    /// Name of the network protocol service, such as FTP, that is exposed by the
9975    /// open port. Follows the naming convention available at:
9976    /// <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>.
9977    pub exposed_services: std::vec::Vec<std::string::String>,
9978
9979    /// The list of allow rules specified by this firewall. Each rule specifies a
9980    /// protocol and port-range tuple that describes a permitted connection.
9981    pub rules: std::option::Option<crate::model::ip_rules::Rules>,
9982
9983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9984}
9985
9986impl IpRules {
9987    /// Creates a new default instance.
9988    pub fn new() -> Self {
9989        std::default::Default::default()
9990    }
9991
9992    /// Sets the value of [direction][crate::model::IpRules::direction].
9993    ///
9994    /// # Example
9995    /// ```ignore,no_run
9996    /// # use google_cloud_securitycenter_v2::model::IpRules;
9997    /// use google_cloud_securitycenter_v2::model::ip_rules::Direction;
9998    /// let x0 = IpRules::new().set_direction(Direction::Ingress);
9999    /// let x1 = IpRules::new().set_direction(Direction::Egress);
10000    /// ```
10001    pub fn set_direction<T: std::convert::Into<crate::model::ip_rules::Direction>>(
10002        mut self,
10003        v: T,
10004    ) -> Self {
10005        self.direction = v.into();
10006        self
10007    }
10008
10009    /// Sets the value of [source_ip_ranges][crate::model::IpRules::source_ip_ranges].
10010    ///
10011    /// # Example
10012    /// ```ignore,no_run
10013    /// # use google_cloud_securitycenter_v2::model::IpRules;
10014    /// let x = IpRules::new().set_source_ip_ranges(["a", "b", "c"]);
10015    /// ```
10016    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
10017    where
10018        T: std::iter::IntoIterator<Item = V>,
10019        V: std::convert::Into<std::string::String>,
10020    {
10021        use std::iter::Iterator;
10022        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
10023        self
10024    }
10025
10026    /// Sets the value of [destination_ip_ranges][crate::model::IpRules::destination_ip_ranges].
10027    ///
10028    /// # Example
10029    /// ```ignore,no_run
10030    /// # use google_cloud_securitycenter_v2::model::IpRules;
10031    /// let x = IpRules::new().set_destination_ip_ranges(["a", "b", "c"]);
10032    /// ```
10033    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
10034    where
10035        T: std::iter::IntoIterator<Item = V>,
10036        V: std::convert::Into<std::string::String>,
10037    {
10038        use std::iter::Iterator;
10039        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
10040        self
10041    }
10042
10043    /// Sets the value of [exposed_services][crate::model::IpRules::exposed_services].
10044    ///
10045    /// # Example
10046    /// ```ignore,no_run
10047    /// # use google_cloud_securitycenter_v2::model::IpRules;
10048    /// let x = IpRules::new().set_exposed_services(["a", "b", "c"]);
10049    /// ```
10050    pub fn set_exposed_services<T, V>(mut self, v: T) -> Self
10051    where
10052        T: std::iter::IntoIterator<Item = V>,
10053        V: std::convert::Into<std::string::String>,
10054    {
10055        use std::iter::Iterator;
10056        self.exposed_services = v.into_iter().map(|i| i.into()).collect();
10057        self
10058    }
10059
10060    /// Sets the value of [rules][crate::model::IpRules::rules].
10061    ///
10062    /// Note that all the setters affecting `rules` are mutually
10063    /// exclusive.
10064    ///
10065    /// # Example
10066    /// ```ignore,no_run
10067    /// # use google_cloud_securitycenter_v2::model::IpRules;
10068    /// use google_cloud_securitycenter_v2::model::Allowed;
10069    /// let x = IpRules::new().set_rules(Some(
10070    ///     google_cloud_securitycenter_v2::model::ip_rules::Rules::Allowed(Allowed::default().into())));
10071    /// ```
10072    pub fn set_rules<T: std::convert::Into<std::option::Option<crate::model::ip_rules::Rules>>>(
10073        mut self,
10074        v: T,
10075    ) -> Self {
10076        self.rules = v.into();
10077        self
10078    }
10079
10080    /// The value of [rules][crate::model::IpRules::rules]
10081    /// if it holds a `Allowed`, `None` if the field is not set or
10082    /// holds a different branch.
10083    pub fn allowed(&self) -> std::option::Option<&std::boxed::Box<crate::model::Allowed>> {
10084        #[allow(unreachable_patterns)]
10085        self.rules.as_ref().and_then(|v| match v {
10086            crate::model::ip_rules::Rules::Allowed(v) => std::option::Option::Some(v),
10087            _ => std::option::Option::None,
10088        })
10089    }
10090
10091    /// Sets the value of [rules][crate::model::IpRules::rules]
10092    /// to hold a `Allowed`.
10093    ///
10094    /// Note that all the setters affecting `rules` are
10095    /// mutually exclusive.
10096    ///
10097    /// # Example
10098    /// ```ignore,no_run
10099    /// # use google_cloud_securitycenter_v2::model::IpRules;
10100    /// use google_cloud_securitycenter_v2::model::Allowed;
10101    /// let x = IpRules::new().set_allowed(Allowed::default()/* use setters */);
10102    /// assert!(x.allowed().is_some());
10103    /// assert!(x.denied().is_none());
10104    /// ```
10105    pub fn set_allowed<T: std::convert::Into<std::boxed::Box<crate::model::Allowed>>>(
10106        mut self,
10107        v: T,
10108    ) -> Self {
10109        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Allowed(v.into()));
10110        self
10111    }
10112
10113    /// The value of [rules][crate::model::IpRules::rules]
10114    /// if it holds a `Denied`, `None` if the field is not set or
10115    /// holds a different branch.
10116    pub fn denied(&self) -> std::option::Option<&std::boxed::Box<crate::model::Denied>> {
10117        #[allow(unreachable_patterns)]
10118        self.rules.as_ref().and_then(|v| match v {
10119            crate::model::ip_rules::Rules::Denied(v) => std::option::Option::Some(v),
10120            _ => std::option::Option::None,
10121        })
10122    }
10123
10124    /// Sets the value of [rules][crate::model::IpRules::rules]
10125    /// to hold a `Denied`.
10126    ///
10127    /// Note that all the setters affecting `rules` are
10128    /// mutually exclusive.
10129    ///
10130    /// # Example
10131    /// ```ignore,no_run
10132    /// # use google_cloud_securitycenter_v2::model::IpRules;
10133    /// use google_cloud_securitycenter_v2::model::Denied;
10134    /// let x = IpRules::new().set_denied(Denied::default()/* use setters */);
10135    /// assert!(x.denied().is_some());
10136    /// assert!(x.allowed().is_none());
10137    /// ```
10138    pub fn set_denied<T: std::convert::Into<std::boxed::Box<crate::model::Denied>>>(
10139        mut self,
10140        v: T,
10141    ) -> Self {
10142        self.rules = std::option::Option::Some(crate::model::ip_rules::Rules::Denied(v.into()));
10143        self
10144    }
10145}
10146
10147impl wkt::message::Message for IpRules {
10148    fn typename() -> &'static str {
10149        "type.googleapis.com/google.cloud.securitycenter.v2.IpRules"
10150    }
10151}
10152
10153/// Defines additional types related to [IpRules].
10154pub mod ip_rules {
10155    #[allow(unused_imports)]
10156    use super::*;
10157
10158    /// The type of direction that the rule is applicable to, one of ingress or
10159    /// egress. Not applicable to OPEN_X_PORT findings.
10160    ///
10161    /// # Working with unknown values
10162    ///
10163    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10164    /// additional enum variants at any time. Adding new variants is not considered
10165    /// a breaking change. Applications should write their code in anticipation of:
10166    ///
10167    /// - New values appearing in future releases of the client library, **and**
10168    /// - New values received dynamically, without application changes.
10169    ///
10170    /// Please consult the [Working with enums] section in the user guide for some
10171    /// guidelines.
10172    ///
10173    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10174    #[derive(Clone, Debug, PartialEq)]
10175    #[non_exhaustive]
10176    pub enum Direction {
10177        /// Unspecified direction value.
10178        Unspecified,
10179        /// Ingress direction value.
10180        Ingress,
10181        /// Egress direction value.
10182        Egress,
10183        /// If set, the enum was initialized with an unknown value.
10184        ///
10185        /// Applications can examine the value using [Direction::value] or
10186        /// [Direction::name].
10187        UnknownValue(direction::UnknownValue),
10188    }
10189
10190    #[doc(hidden)]
10191    pub mod direction {
10192        #[allow(unused_imports)]
10193        use super::*;
10194        #[derive(Clone, Debug, PartialEq)]
10195        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10196    }
10197
10198    impl Direction {
10199        /// Gets the enum value.
10200        ///
10201        /// Returns `None` if the enum contains an unknown value deserialized from
10202        /// the string representation of enums.
10203        pub fn value(&self) -> std::option::Option<i32> {
10204            match self {
10205                Self::Unspecified => std::option::Option::Some(0),
10206                Self::Ingress => std::option::Option::Some(1),
10207                Self::Egress => std::option::Option::Some(2),
10208                Self::UnknownValue(u) => u.0.value(),
10209            }
10210        }
10211
10212        /// Gets the enum value as a string.
10213        ///
10214        /// Returns `None` if the enum contains an unknown value deserialized from
10215        /// the integer representation of enums.
10216        pub fn name(&self) -> std::option::Option<&str> {
10217            match self {
10218                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
10219                Self::Ingress => std::option::Option::Some("INGRESS"),
10220                Self::Egress => std::option::Option::Some("EGRESS"),
10221                Self::UnknownValue(u) => u.0.name(),
10222            }
10223        }
10224    }
10225
10226    impl std::default::Default for Direction {
10227        fn default() -> Self {
10228            use std::convert::From;
10229            Self::from(0)
10230        }
10231    }
10232
10233    impl std::fmt::Display for Direction {
10234        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10235            wkt::internal::display_enum(f, self.name(), self.value())
10236        }
10237    }
10238
10239    impl std::convert::From<i32> for Direction {
10240        fn from(value: i32) -> Self {
10241            match value {
10242                0 => Self::Unspecified,
10243                1 => Self::Ingress,
10244                2 => Self::Egress,
10245                _ => Self::UnknownValue(direction::UnknownValue(
10246                    wkt::internal::UnknownEnumValue::Integer(value),
10247                )),
10248            }
10249        }
10250    }
10251
10252    impl std::convert::From<&str> for Direction {
10253        fn from(value: &str) -> Self {
10254            use std::string::ToString;
10255            match value {
10256                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
10257                "INGRESS" => Self::Ingress,
10258                "EGRESS" => Self::Egress,
10259                _ => Self::UnknownValue(direction::UnknownValue(
10260                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10261                )),
10262            }
10263        }
10264    }
10265
10266    impl serde::ser::Serialize for Direction {
10267        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10268        where
10269            S: serde::Serializer,
10270        {
10271            match self {
10272                Self::Unspecified => serializer.serialize_i32(0),
10273                Self::Ingress => serializer.serialize_i32(1),
10274                Self::Egress => serializer.serialize_i32(2),
10275                Self::UnknownValue(u) => u.0.serialize(serializer),
10276            }
10277        }
10278    }
10279
10280    impl<'de> serde::de::Deserialize<'de> for Direction {
10281        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10282        where
10283            D: serde::Deserializer<'de>,
10284        {
10285            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
10286                ".google.cloud.securitycenter.v2.IpRules.Direction",
10287            ))
10288        }
10289    }
10290
10291    /// The list of allow rules specified by this firewall. Each rule specifies a
10292    /// protocol and port-range tuple that describes a permitted connection.
10293    #[derive(Clone, Debug, PartialEq)]
10294    #[non_exhaustive]
10295    pub enum Rules {
10296        /// Tuple with allowed rules.
10297        Allowed(std::boxed::Box<crate::model::Allowed>),
10298        /// Tuple with denied rules.
10299        Denied(std::boxed::Box<crate::model::Denied>),
10300    }
10301}
10302
10303/// IP rule information.
10304#[derive(Clone, Default, PartialEq)]
10305#[non_exhaustive]
10306pub struct IpRule {
10307    /// The IP protocol this rule applies to. This value can either be one of the
10308    /// following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP,
10309    /// SCTP) or a string representation of the integer value.
10310    pub protocol: std::string::String,
10311
10312    /// Optional. An optional list of ports to which this rule applies. This field
10313    /// is only applicable for the UDP or (S)TCP protocols. Each entry must be
10314    /// either an integer or a range including a min and max port number.
10315    pub port_ranges: std::vec::Vec<crate::model::ip_rule::PortRange>,
10316
10317    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10318}
10319
10320impl IpRule {
10321    /// Creates a new default instance.
10322    pub fn new() -> Self {
10323        std::default::Default::default()
10324    }
10325
10326    /// Sets the value of [protocol][crate::model::IpRule::protocol].
10327    ///
10328    /// # Example
10329    /// ```ignore,no_run
10330    /// # use google_cloud_securitycenter_v2::model::IpRule;
10331    /// let x = IpRule::new().set_protocol("example");
10332    /// ```
10333    pub fn set_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10334        self.protocol = v.into();
10335        self
10336    }
10337
10338    /// Sets the value of [port_ranges][crate::model::IpRule::port_ranges].
10339    ///
10340    /// # Example
10341    /// ```ignore,no_run
10342    /// # use google_cloud_securitycenter_v2::model::IpRule;
10343    /// use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
10344    /// let x = IpRule::new()
10345    ///     .set_port_ranges([
10346    ///         PortRange::default()/* use setters */,
10347    ///         PortRange::default()/* use (different) setters */,
10348    ///     ]);
10349    /// ```
10350    pub fn set_port_ranges<T, V>(mut self, v: T) -> Self
10351    where
10352        T: std::iter::IntoIterator<Item = V>,
10353        V: std::convert::Into<crate::model::ip_rule::PortRange>,
10354    {
10355        use std::iter::Iterator;
10356        self.port_ranges = v.into_iter().map(|i| i.into()).collect();
10357        self
10358    }
10359}
10360
10361impl wkt::message::Message for IpRule {
10362    fn typename() -> &'static str {
10363        "type.googleapis.com/google.cloud.securitycenter.v2.IpRule"
10364    }
10365}
10366
10367/// Defines additional types related to [IpRule].
10368pub mod ip_rule {
10369    #[allow(unused_imports)]
10370    use super::*;
10371
10372    /// A port range which is inclusive of the min and max values.
10373    /// Values are between 0 and 2^16-1. The max can be equal / must be not smaller
10374    /// than the min value. If min and max are equal this indicates that it is a
10375    /// single port.
10376    #[derive(Clone, Default, PartialEq)]
10377    #[non_exhaustive]
10378    pub struct PortRange {
10379        /// Minimum port value.
10380        pub min: i64,
10381
10382        /// Maximum port value.
10383        pub max: i64,
10384
10385        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10386    }
10387
10388    impl PortRange {
10389        /// Creates a new default instance.
10390        pub fn new() -> Self {
10391            std::default::Default::default()
10392        }
10393
10394        /// Sets the value of [min][crate::model::ip_rule::PortRange::min].
10395        ///
10396        /// # Example
10397        /// ```ignore,no_run
10398        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
10399        /// let x = PortRange::new().set_min(42);
10400        /// ```
10401        pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10402            self.min = v.into();
10403            self
10404        }
10405
10406        /// Sets the value of [max][crate::model::ip_rule::PortRange::max].
10407        ///
10408        /// # Example
10409        /// ```ignore,no_run
10410        /// # use google_cloud_securitycenter_v2::model::ip_rule::PortRange;
10411        /// let x = PortRange::new().set_max(42);
10412        /// ```
10413        pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10414            self.max = v.into();
10415            self
10416        }
10417    }
10418
10419    impl wkt::message::Message for PortRange {
10420        fn typename() -> &'static str {
10421            "type.googleapis.com/google.cloud.securitycenter.v2.IpRule.PortRange"
10422        }
10423    }
10424}
10425
10426/// Allowed IP rule.
10427#[derive(Clone, Default, PartialEq)]
10428#[non_exhaustive]
10429pub struct Allowed {
10430    /// Optional. Optional list of allowed IP rules.
10431    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
10432
10433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10434}
10435
10436impl Allowed {
10437    /// Creates a new default instance.
10438    pub fn new() -> Self {
10439        std::default::Default::default()
10440    }
10441
10442    /// Sets the value of [ip_rules][crate::model::Allowed::ip_rules].
10443    ///
10444    /// # Example
10445    /// ```ignore,no_run
10446    /// # use google_cloud_securitycenter_v2::model::Allowed;
10447    /// use google_cloud_securitycenter_v2::model::IpRule;
10448    /// let x = Allowed::new()
10449    ///     .set_ip_rules([
10450    ///         IpRule::default()/* use setters */,
10451    ///         IpRule::default()/* use (different) setters */,
10452    ///     ]);
10453    /// ```
10454    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
10455    where
10456        T: std::iter::IntoIterator<Item = V>,
10457        V: std::convert::Into<crate::model::IpRule>,
10458    {
10459        use std::iter::Iterator;
10460        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
10461        self
10462    }
10463}
10464
10465impl wkt::message::Message for Allowed {
10466    fn typename() -> &'static str {
10467        "type.googleapis.com/google.cloud.securitycenter.v2.Allowed"
10468    }
10469}
10470
10471/// Denied IP rule.
10472#[derive(Clone, Default, PartialEq)]
10473#[non_exhaustive]
10474pub struct Denied {
10475    /// Optional. Optional list of denied IP rules.
10476    pub ip_rules: std::vec::Vec<crate::model::IpRule>,
10477
10478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10479}
10480
10481impl Denied {
10482    /// Creates a new default instance.
10483    pub fn new() -> Self {
10484        std::default::Default::default()
10485    }
10486
10487    /// Sets the value of [ip_rules][crate::model::Denied::ip_rules].
10488    ///
10489    /// # Example
10490    /// ```ignore,no_run
10491    /// # use google_cloud_securitycenter_v2::model::Denied;
10492    /// use google_cloud_securitycenter_v2::model::IpRule;
10493    /// let x = Denied::new()
10494    ///     .set_ip_rules([
10495    ///         IpRule::default()/* use setters */,
10496    ///         IpRule::default()/* use (different) setters */,
10497    ///     ]);
10498    /// ```
10499    pub fn set_ip_rules<T, V>(mut self, v: T) -> Self
10500    where
10501        T: std::iter::IntoIterator<Item = V>,
10502        V: std::convert::Into<crate::model::IpRule>,
10503    {
10504        use std::iter::Iterator;
10505        self.ip_rules = v.into_iter().map(|i| i.into()).collect();
10506        self
10507    }
10508}
10509
10510impl wkt::message::Message for Denied {
10511    fn typename() -> &'static str {
10512        "type.googleapis.com/google.cloud.securitycenter.v2.Denied"
10513    }
10514}
10515
10516/// Describes a job
10517#[derive(Clone, Default, PartialEq)]
10518#[non_exhaustive]
10519pub struct Job {
10520    /// The fully-qualified name for a job.
10521    /// e.g. `projects/<project_id>/jobs/<job_id>`
10522    pub name: std::string::String,
10523
10524    /// Output only. State of the job, such as `RUNNING` or `PENDING`.
10525    pub state: crate::model::JobState,
10526
10527    /// Optional. If the job did not complete successfully, this field describes
10528    /// why.
10529    pub error_code: i32,
10530
10531    /// Optional. Gives the location where the job ran, such as `US` or
10532    /// `europe-west1`
10533    pub location: std::string::String,
10534
10535    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10536}
10537
10538impl Job {
10539    /// Creates a new default instance.
10540    pub fn new() -> Self {
10541        std::default::Default::default()
10542    }
10543
10544    /// Sets the value of [name][crate::model::Job::name].
10545    ///
10546    /// # Example
10547    /// ```ignore,no_run
10548    /// # use google_cloud_securitycenter_v2::model::Job;
10549    /// let x = Job::new().set_name("example");
10550    /// ```
10551    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10552        self.name = v.into();
10553        self
10554    }
10555
10556    /// Sets the value of [state][crate::model::Job::state].
10557    ///
10558    /// # Example
10559    /// ```ignore,no_run
10560    /// # use google_cloud_securitycenter_v2::model::Job;
10561    /// use google_cloud_securitycenter_v2::model::JobState;
10562    /// let x0 = Job::new().set_state(JobState::Pending);
10563    /// let x1 = Job::new().set_state(JobState::Running);
10564    /// let x2 = Job::new().set_state(JobState::Succeeded);
10565    /// ```
10566    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
10567        self.state = v.into();
10568        self
10569    }
10570
10571    /// Sets the value of [error_code][crate::model::Job::error_code].
10572    ///
10573    /// # Example
10574    /// ```ignore,no_run
10575    /// # use google_cloud_securitycenter_v2::model::Job;
10576    /// let x = Job::new().set_error_code(42);
10577    /// ```
10578    pub fn set_error_code<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10579        self.error_code = v.into();
10580        self
10581    }
10582
10583    /// Sets the value of [location][crate::model::Job::location].
10584    ///
10585    /// # Example
10586    /// ```ignore,no_run
10587    /// # use google_cloud_securitycenter_v2::model::Job;
10588    /// let x = Job::new().set_location("example");
10589    /// ```
10590    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10591        self.location = v.into();
10592        self
10593    }
10594}
10595
10596impl wkt::message::Message for Job {
10597    fn typename() -> &'static str {
10598        "type.googleapis.com/google.cloud.securitycenter.v2.Job"
10599    }
10600}
10601
10602/// Kernel mode rootkit signatures.
10603#[derive(Clone, Default, PartialEq)]
10604#[non_exhaustive]
10605pub struct KernelRootkit {
10606    /// Rootkit name, when available.
10607    pub name: std::string::String,
10608
10609    /// True if unexpected modifications of kernel code memory are present.
10610    pub unexpected_code_modification: bool,
10611
10612    /// True if unexpected modifications of kernel read-only data memory are
10613    /// present.
10614    pub unexpected_read_only_data_modification: bool,
10615
10616    /// True if `ftrace` points are present with callbacks pointing to regions
10617    /// that are not in the expected kernel or module code range.
10618    pub unexpected_ftrace_handler: bool,
10619
10620    /// True if `kprobe` points are present with callbacks pointing to regions
10621    /// that are not in the expected kernel or module code range.
10622    pub unexpected_kprobe_handler: bool,
10623
10624    /// True if kernel code pages that are not in the expected kernel or module
10625    /// code regions are present.
10626    pub unexpected_kernel_code_pages: bool,
10627
10628    /// True if system call handlers that are are not in the expected kernel or
10629    /// module code regions are present.
10630    pub unexpected_system_call_handler: bool,
10631
10632    /// True if interrupt handlers that are are not in the expected kernel or
10633    /// module code regions are present.
10634    pub unexpected_interrupt_handler: bool,
10635
10636    /// True if unexpected processes in the scheduler run queue are present. Such
10637    /// processes are in the run queue, but not in the process task list.
10638    pub unexpected_processes_in_runqueue: bool,
10639
10640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10641}
10642
10643impl KernelRootkit {
10644    /// Creates a new default instance.
10645    pub fn new() -> Self {
10646        std::default::Default::default()
10647    }
10648
10649    /// Sets the value of [name][crate::model::KernelRootkit::name].
10650    ///
10651    /// # Example
10652    /// ```ignore,no_run
10653    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10654    /// let x = KernelRootkit::new().set_name("example");
10655    /// ```
10656    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10657        self.name = v.into();
10658        self
10659    }
10660
10661    /// Sets the value of [unexpected_code_modification][crate::model::KernelRootkit::unexpected_code_modification].
10662    ///
10663    /// # Example
10664    /// ```ignore,no_run
10665    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10666    /// let x = KernelRootkit::new().set_unexpected_code_modification(true);
10667    /// ```
10668    pub fn set_unexpected_code_modification<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10669        self.unexpected_code_modification = v.into();
10670        self
10671    }
10672
10673    /// Sets the value of [unexpected_read_only_data_modification][crate::model::KernelRootkit::unexpected_read_only_data_modification].
10674    ///
10675    /// # Example
10676    /// ```ignore,no_run
10677    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10678    /// let x = KernelRootkit::new().set_unexpected_read_only_data_modification(true);
10679    /// ```
10680    pub fn set_unexpected_read_only_data_modification<T: std::convert::Into<bool>>(
10681        mut self,
10682        v: T,
10683    ) -> Self {
10684        self.unexpected_read_only_data_modification = v.into();
10685        self
10686    }
10687
10688    /// Sets the value of [unexpected_ftrace_handler][crate::model::KernelRootkit::unexpected_ftrace_handler].
10689    ///
10690    /// # Example
10691    /// ```ignore,no_run
10692    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10693    /// let x = KernelRootkit::new().set_unexpected_ftrace_handler(true);
10694    /// ```
10695    pub fn set_unexpected_ftrace_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10696        self.unexpected_ftrace_handler = v.into();
10697        self
10698    }
10699
10700    /// Sets the value of [unexpected_kprobe_handler][crate::model::KernelRootkit::unexpected_kprobe_handler].
10701    ///
10702    /// # Example
10703    /// ```ignore,no_run
10704    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10705    /// let x = KernelRootkit::new().set_unexpected_kprobe_handler(true);
10706    /// ```
10707    pub fn set_unexpected_kprobe_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10708        self.unexpected_kprobe_handler = v.into();
10709        self
10710    }
10711
10712    /// Sets the value of [unexpected_kernel_code_pages][crate::model::KernelRootkit::unexpected_kernel_code_pages].
10713    ///
10714    /// # Example
10715    /// ```ignore,no_run
10716    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10717    /// let x = KernelRootkit::new().set_unexpected_kernel_code_pages(true);
10718    /// ```
10719    pub fn set_unexpected_kernel_code_pages<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10720        self.unexpected_kernel_code_pages = v.into();
10721        self
10722    }
10723
10724    /// Sets the value of [unexpected_system_call_handler][crate::model::KernelRootkit::unexpected_system_call_handler].
10725    ///
10726    /// # Example
10727    /// ```ignore,no_run
10728    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10729    /// let x = KernelRootkit::new().set_unexpected_system_call_handler(true);
10730    /// ```
10731    pub fn set_unexpected_system_call_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10732        self.unexpected_system_call_handler = v.into();
10733        self
10734    }
10735
10736    /// Sets the value of [unexpected_interrupt_handler][crate::model::KernelRootkit::unexpected_interrupt_handler].
10737    ///
10738    /// # Example
10739    /// ```ignore,no_run
10740    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10741    /// let x = KernelRootkit::new().set_unexpected_interrupt_handler(true);
10742    /// ```
10743    pub fn set_unexpected_interrupt_handler<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10744        self.unexpected_interrupt_handler = v.into();
10745        self
10746    }
10747
10748    /// Sets the value of [unexpected_processes_in_runqueue][crate::model::KernelRootkit::unexpected_processes_in_runqueue].
10749    ///
10750    /// # Example
10751    /// ```ignore,no_run
10752    /// # use google_cloud_securitycenter_v2::model::KernelRootkit;
10753    /// let x = KernelRootkit::new().set_unexpected_processes_in_runqueue(true);
10754    /// ```
10755    pub fn set_unexpected_processes_in_runqueue<T: std::convert::Into<bool>>(
10756        mut self,
10757        v: T,
10758    ) -> Self {
10759        self.unexpected_processes_in_runqueue = v.into();
10760        self
10761    }
10762}
10763
10764impl wkt::message::Message for KernelRootkit {
10765    fn typename() -> &'static str {
10766        "type.googleapis.com/google.cloud.securitycenter.v2.KernelRootkit"
10767    }
10768}
10769
10770/// Kubernetes-related attributes.
10771#[derive(Clone, Default, PartialEq)]
10772#[non_exhaustive]
10773pub struct Kubernetes {
10774    /// Kubernetes
10775    /// [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
10776    /// associated with the finding. This field contains Pod records for each
10777    /// container that is owned by a Pod.
10778    pub pods: std::vec::Vec<crate::model::kubernetes::Pod>,
10779
10780    /// Provides Kubernetes
10781    /// [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
10782    /// information.
10783    pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
10784
10785    /// GKE [node
10786    /// pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
10787    /// associated with the finding. This field contains node pool information for
10788    /// each node, when it is available.
10789    pub node_pools: std::vec::Vec<crate::model::kubernetes::NodePool>,
10790
10791    /// Provides Kubernetes role information for findings that involve [Roles or
10792    /// ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10793    pub roles: std::vec::Vec<crate::model::kubernetes::Role>,
10794
10795    /// Provides Kubernetes role binding information for findings that involve
10796    /// [RoleBindings or
10797    /// ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
10798    pub bindings: std::vec::Vec<crate::model::kubernetes::Binding>,
10799
10800    /// Provides information on any Kubernetes access reviews (privilege checks)
10801    /// relevant to the finding.
10802    pub access_reviews: std::vec::Vec<crate::model::kubernetes::AccessReview>,
10803
10804    /// Kubernetes objects related to the finding.
10805    pub objects: std::vec::Vec<crate::model::kubernetes::Object>,
10806
10807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10808}
10809
10810impl Kubernetes {
10811    /// Creates a new default instance.
10812    pub fn new() -> Self {
10813        std::default::Default::default()
10814    }
10815
10816    /// Sets the value of [pods][crate::model::Kubernetes::pods].
10817    ///
10818    /// # Example
10819    /// ```ignore,no_run
10820    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10821    /// use google_cloud_securitycenter_v2::model::kubernetes::Pod;
10822    /// let x = Kubernetes::new()
10823    ///     .set_pods([
10824    ///         Pod::default()/* use setters */,
10825    ///         Pod::default()/* use (different) setters */,
10826    ///     ]);
10827    /// ```
10828    pub fn set_pods<T, V>(mut self, v: T) -> Self
10829    where
10830        T: std::iter::IntoIterator<Item = V>,
10831        V: std::convert::Into<crate::model::kubernetes::Pod>,
10832    {
10833        use std::iter::Iterator;
10834        self.pods = v.into_iter().map(|i| i.into()).collect();
10835        self
10836    }
10837
10838    /// Sets the value of [nodes][crate::model::Kubernetes::nodes].
10839    ///
10840    /// # Example
10841    /// ```ignore,no_run
10842    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10843    /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
10844    /// let x = Kubernetes::new()
10845    ///     .set_nodes([
10846    ///         Node::default()/* use setters */,
10847    ///         Node::default()/* use (different) setters */,
10848    ///     ]);
10849    /// ```
10850    pub fn set_nodes<T, V>(mut self, v: T) -> Self
10851    where
10852        T: std::iter::IntoIterator<Item = V>,
10853        V: std::convert::Into<crate::model::kubernetes::Node>,
10854    {
10855        use std::iter::Iterator;
10856        self.nodes = v.into_iter().map(|i| i.into()).collect();
10857        self
10858    }
10859
10860    /// Sets the value of [node_pools][crate::model::Kubernetes::node_pools].
10861    ///
10862    /// # Example
10863    /// ```ignore,no_run
10864    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10865    /// use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
10866    /// let x = Kubernetes::new()
10867    ///     .set_node_pools([
10868    ///         NodePool::default()/* use setters */,
10869    ///         NodePool::default()/* use (different) setters */,
10870    ///     ]);
10871    /// ```
10872    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
10873    where
10874        T: std::iter::IntoIterator<Item = V>,
10875        V: std::convert::Into<crate::model::kubernetes::NodePool>,
10876    {
10877        use std::iter::Iterator;
10878        self.node_pools = v.into_iter().map(|i| i.into()).collect();
10879        self
10880    }
10881
10882    /// Sets the value of [roles][crate::model::Kubernetes::roles].
10883    ///
10884    /// # Example
10885    /// ```ignore,no_run
10886    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10887    /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
10888    /// let x = Kubernetes::new()
10889    ///     .set_roles([
10890    ///         Role::default()/* use setters */,
10891    ///         Role::default()/* use (different) setters */,
10892    ///     ]);
10893    /// ```
10894    pub fn set_roles<T, V>(mut self, v: T) -> Self
10895    where
10896        T: std::iter::IntoIterator<Item = V>,
10897        V: std::convert::Into<crate::model::kubernetes::Role>,
10898    {
10899        use std::iter::Iterator;
10900        self.roles = v.into_iter().map(|i| i.into()).collect();
10901        self
10902    }
10903
10904    /// Sets the value of [bindings][crate::model::Kubernetes::bindings].
10905    ///
10906    /// # Example
10907    /// ```ignore,no_run
10908    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10909    /// use google_cloud_securitycenter_v2::model::kubernetes::Binding;
10910    /// let x = Kubernetes::new()
10911    ///     .set_bindings([
10912    ///         Binding::default()/* use setters */,
10913    ///         Binding::default()/* use (different) setters */,
10914    ///     ]);
10915    /// ```
10916    pub fn set_bindings<T, V>(mut self, v: T) -> Self
10917    where
10918        T: std::iter::IntoIterator<Item = V>,
10919        V: std::convert::Into<crate::model::kubernetes::Binding>,
10920    {
10921        use std::iter::Iterator;
10922        self.bindings = v.into_iter().map(|i| i.into()).collect();
10923        self
10924    }
10925
10926    /// Sets the value of [access_reviews][crate::model::Kubernetes::access_reviews].
10927    ///
10928    /// # Example
10929    /// ```ignore,no_run
10930    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10931    /// use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
10932    /// let x = Kubernetes::new()
10933    ///     .set_access_reviews([
10934    ///         AccessReview::default()/* use setters */,
10935    ///         AccessReview::default()/* use (different) setters */,
10936    ///     ]);
10937    /// ```
10938    pub fn set_access_reviews<T, V>(mut self, v: T) -> Self
10939    where
10940        T: std::iter::IntoIterator<Item = V>,
10941        V: std::convert::Into<crate::model::kubernetes::AccessReview>,
10942    {
10943        use std::iter::Iterator;
10944        self.access_reviews = v.into_iter().map(|i| i.into()).collect();
10945        self
10946    }
10947
10948    /// Sets the value of [objects][crate::model::Kubernetes::objects].
10949    ///
10950    /// # Example
10951    /// ```ignore,no_run
10952    /// # use google_cloud_securitycenter_v2::model::Kubernetes;
10953    /// use google_cloud_securitycenter_v2::model::kubernetes::Object;
10954    /// let x = Kubernetes::new()
10955    ///     .set_objects([
10956    ///         Object::default()/* use setters */,
10957    ///         Object::default()/* use (different) setters */,
10958    ///     ]);
10959    /// ```
10960    pub fn set_objects<T, V>(mut self, v: T) -> Self
10961    where
10962        T: std::iter::IntoIterator<Item = V>,
10963        V: std::convert::Into<crate::model::kubernetes::Object>,
10964    {
10965        use std::iter::Iterator;
10966        self.objects = v.into_iter().map(|i| i.into()).collect();
10967        self
10968    }
10969}
10970
10971impl wkt::message::Message for Kubernetes {
10972    fn typename() -> &'static str {
10973        "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes"
10974    }
10975}
10976
10977/// Defines additional types related to [Kubernetes].
10978pub mod kubernetes {
10979    #[allow(unused_imports)]
10980    use super::*;
10981
10982    /// A Kubernetes Pod.
10983    #[derive(Clone, Default, PartialEq)]
10984    #[non_exhaustive]
10985    pub struct Pod {
10986        /// Kubernetes Pod namespace.
10987        pub ns: std::string::String,
10988
10989        /// Kubernetes Pod name.
10990        pub name: std::string::String,
10991
10992        /// Pod labels.  For Kubernetes containers, these are applied to the
10993        /// container.
10994        pub labels: std::vec::Vec<crate::model::Label>,
10995
10996        /// Pod containers associated with this finding, if any.
10997        pub containers: std::vec::Vec<crate::model::Container>,
10998
10999        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11000    }
11001
11002    impl Pod {
11003        /// Creates a new default instance.
11004        pub fn new() -> Self {
11005            std::default::Default::default()
11006        }
11007
11008        /// Sets the value of [ns][crate::model::kubernetes::Pod::ns].
11009        ///
11010        /// # Example
11011        /// ```ignore,no_run
11012        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
11013        /// let x = Pod::new().set_ns("example");
11014        /// ```
11015        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11016            self.ns = v.into();
11017            self
11018        }
11019
11020        /// Sets the value of [name][crate::model::kubernetes::Pod::name].
11021        ///
11022        /// # Example
11023        /// ```ignore,no_run
11024        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
11025        /// let x = Pod::new().set_name("example");
11026        /// ```
11027        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11028            self.name = v.into();
11029            self
11030        }
11031
11032        /// Sets the value of [labels][crate::model::kubernetes::Pod::labels].
11033        ///
11034        /// # Example
11035        /// ```ignore,no_run
11036        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
11037        /// use google_cloud_securitycenter_v2::model::Label;
11038        /// let x = Pod::new()
11039        ///     .set_labels([
11040        ///         Label::default()/* use setters */,
11041        ///         Label::default()/* use (different) setters */,
11042        ///     ]);
11043        /// ```
11044        pub fn set_labels<T, V>(mut self, v: T) -> Self
11045        where
11046            T: std::iter::IntoIterator<Item = V>,
11047            V: std::convert::Into<crate::model::Label>,
11048        {
11049            use std::iter::Iterator;
11050            self.labels = v.into_iter().map(|i| i.into()).collect();
11051            self
11052        }
11053
11054        /// Sets the value of [containers][crate::model::kubernetes::Pod::containers].
11055        ///
11056        /// # Example
11057        /// ```ignore,no_run
11058        /// # use google_cloud_securitycenter_v2::model::kubernetes::Pod;
11059        /// use google_cloud_securitycenter_v2::model::Container;
11060        /// let x = Pod::new()
11061        ///     .set_containers([
11062        ///         Container::default()/* use setters */,
11063        ///         Container::default()/* use (different) setters */,
11064        ///     ]);
11065        /// ```
11066        pub fn set_containers<T, V>(mut self, v: T) -> Self
11067        where
11068            T: std::iter::IntoIterator<Item = V>,
11069            V: std::convert::Into<crate::model::Container>,
11070        {
11071            use std::iter::Iterator;
11072            self.containers = v.into_iter().map(|i| i.into()).collect();
11073            self
11074        }
11075    }
11076
11077    impl wkt::message::Message for Pod {
11078        fn typename() -> &'static str {
11079            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Pod"
11080        }
11081    }
11082
11083    /// Kubernetes nodes associated with the finding.
11084    #[derive(Clone, Default, PartialEq)]
11085    #[non_exhaustive]
11086    pub struct Node {
11087        /// [Full resource name](https://google.aip.dev/122#full-resource-names) of
11088        /// the Compute Engine VM running the cluster node.
11089        pub name: std::string::String,
11090
11091        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11092    }
11093
11094    impl Node {
11095        /// Creates a new default instance.
11096        pub fn new() -> Self {
11097            std::default::Default::default()
11098        }
11099
11100        /// Sets the value of [name][crate::model::kubernetes::Node::name].
11101        ///
11102        /// # Example
11103        /// ```ignore,no_run
11104        /// # use google_cloud_securitycenter_v2::model::kubernetes::Node;
11105        /// let x = Node::new().set_name("example");
11106        /// ```
11107        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11108            self.name = v.into();
11109            self
11110        }
11111    }
11112
11113    impl wkt::message::Message for Node {
11114        fn typename() -> &'static str {
11115            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Node"
11116        }
11117    }
11118
11119    /// Provides GKE node pool information.
11120    #[derive(Clone, Default, PartialEq)]
11121    #[non_exhaustive]
11122    pub struct NodePool {
11123        /// Kubernetes node pool name.
11124        pub name: std::string::String,
11125
11126        /// Nodes associated with the finding.
11127        pub nodes: std::vec::Vec<crate::model::kubernetes::Node>,
11128
11129        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11130    }
11131
11132    impl NodePool {
11133        /// Creates a new default instance.
11134        pub fn new() -> Self {
11135            std::default::Default::default()
11136        }
11137
11138        /// Sets the value of [name][crate::model::kubernetes::NodePool::name].
11139        ///
11140        /// # Example
11141        /// ```ignore,no_run
11142        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
11143        /// let x = NodePool::new().set_name("example");
11144        /// ```
11145        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11146            self.name = v.into();
11147            self
11148        }
11149
11150        /// Sets the value of [nodes][crate::model::kubernetes::NodePool::nodes].
11151        ///
11152        /// # Example
11153        /// ```ignore,no_run
11154        /// # use google_cloud_securitycenter_v2::model::kubernetes::NodePool;
11155        /// use google_cloud_securitycenter_v2::model::kubernetes::Node;
11156        /// let x = NodePool::new()
11157        ///     .set_nodes([
11158        ///         Node::default()/* use setters */,
11159        ///         Node::default()/* use (different) setters */,
11160        ///     ]);
11161        /// ```
11162        pub fn set_nodes<T, V>(mut self, v: T) -> Self
11163        where
11164            T: std::iter::IntoIterator<Item = V>,
11165            V: std::convert::Into<crate::model::kubernetes::Node>,
11166        {
11167            use std::iter::Iterator;
11168            self.nodes = v.into_iter().map(|i| i.into()).collect();
11169            self
11170        }
11171    }
11172
11173    impl wkt::message::Message for NodePool {
11174        fn typename() -> &'static str {
11175            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.NodePool"
11176        }
11177    }
11178
11179    /// Kubernetes Role or ClusterRole.
11180    #[derive(Clone, Default, PartialEq)]
11181    #[non_exhaustive]
11182    pub struct Role {
11183        /// Role type.
11184        pub kind: crate::model::kubernetes::role::Kind,
11185
11186        /// Role namespace.
11187        pub ns: std::string::String,
11188
11189        /// Role name.
11190        pub name: std::string::String,
11191
11192        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11193    }
11194
11195    impl Role {
11196        /// Creates a new default instance.
11197        pub fn new() -> Self {
11198            std::default::Default::default()
11199        }
11200
11201        /// Sets the value of [kind][crate::model::kubernetes::Role::kind].
11202        ///
11203        /// # Example
11204        /// ```ignore,no_run
11205        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
11206        /// use google_cloud_securitycenter_v2::model::kubernetes::role::Kind;
11207        /// let x0 = Role::new().set_kind(Kind::Role);
11208        /// let x1 = Role::new().set_kind(Kind::ClusterRole);
11209        /// ```
11210        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::role::Kind>>(
11211            mut self,
11212            v: T,
11213        ) -> Self {
11214            self.kind = v.into();
11215            self
11216        }
11217
11218        /// Sets the value of [ns][crate::model::kubernetes::Role::ns].
11219        ///
11220        /// # Example
11221        /// ```ignore,no_run
11222        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
11223        /// let x = Role::new().set_ns("example");
11224        /// ```
11225        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11226            self.ns = v.into();
11227            self
11228        }
11229
11230        /// Sets the value of [name][crate::model::kubernetes::Role::name].
11231        ///
11232        /// # Example
11233        /// ```ignore,no_run
11234        /// # use google_cloud_securitycenter_v2::model::kubernetes::Role;
11235        /// let x = Role::new().set_name("example");
11236        /// ```
11237        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11238            self.name = v.into();
11239            self
11240        }
11241    }
11242
11243    impl wkt::message::Message for Role {
11244        fn typename() -> &'static str {
11245            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Role"
11246        }
11247    }
11248
11249    /// Defines additional types related to [Role].
11250    pub mod role {
11251        #[allow(unused_imports)]
11252        use super::*;
11253
11254        /// Types of Kubernetes roles.
11255        ///
11256        /// # Working with unknown values
11257        ///
11258        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11259        /// additional enum variants at any time. Adding new variants is not considered
11260        /// a breaking change. Applications should write their code in anticipation of:
11261        ///
11262        /// - New values appearing in future releases of the client library, **and**
11263        /// - New values received dynamically, without application changes.
11264        ///
11265        /// Please consult the [Working with enums] section in the user guide for some
11266        /// guidelines.
11267        ///
11268        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11269        #[derive(Clone, Debug, PartialEq)]
11270        #[non_exhaustive]
11271        pub enum Kind {
11272            /// Role type is not specified.
11273            Unspecified,
11274            /// Kubernetes Role.
11275            Role,
11276            /// Kubernetes ClusterRole.
11277            ClusterRole,
11278            /// If set, the enum was initialized with an unknown value.
11279            ///
11280            /// Applications can examine the value using [Kind::value] or
11281            /// [Kind::name].
11282            UnknownValue(kind::UnknownValue),
11283        }
11284
11285        #[doc(hidden)]
11286        pub mod kind {
11287            #[allow(unused_imports)]
11288            use super::*;
11289            #[derive(Clone, Debug, PartialEq)]
11290            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11291        }
11292
11293        impl Kind {
11294            /// Gets the enum value.
11295            ///
11296            /// Returns `None` if the enum contains an unknown value deserialized from
11297            /// the string representation of enums.
11298            pub fn value(&self) -> std::option::Option<i32> {
11299                match self {
11300                    Self::Unspecified => std::option::Option::Some(0),
11301                    Self::Role => std::option::Option::Some(1),
11302                    Self::ClusterRole => std::option::Option::Some(2),
11303                    Self::UnknownValue(u) => u.0.value(),
11304                }
11305            }
11306
11307            /// Gets the enum value as a string.
11308            ///
11309            /// Returns `None` if the enum contains an unknown value deserialized from
11310            /// the integer representation of enums.
11311            pub fn name(&self) -> std::option::Option<&str> {
11312                match self {
11313                    Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
11314                    Self::Role => std::option::Option::Some("ROLE"),
11315                    Self::ClusterRole => std::option::Option::Some("CLUSTER_ROLE"),
11316                    Self::UnknownValue(u) => u.0.name(),
11317                }
11318            }
11319        }
11320
11321        impl std::default::Default for Kind {
11322            fn default() -> Self {
11323                use std::convert::From;
11324                Self::from(0)
11325            }
11326        }
11327
11328        impl std::fmt::Display for Kind {
11329            fn fmt(
11330                &self,
11331                f: &mut std::fmt::Formatter<'_>,
11332            ) -> std::result::Result<(), std::fmt::Error> {
11333                wkt::internal::display_enum(f, self.name(), self.value())
11334            }
11335        }
11336
11337        impl std::convert::From<i32> for Kind {
11338            fn from(value: i32) -> Self {
11339                match value {
11340                    0 => Self::Unspecified,
11341                    1 => Self::Role,
11342                    2 => Self::ClusterRole,
11343                    _ => Self::UnknownValue(kind::UnknownValue(
11344                        wkt::internal::UnknownEnumValue::Integer(value),
11345                    )),
11346                }
11347            }
11348        }
11349
11350        impl std::convert::From<&str> for Kind {
11351            fn from(value: &str) -> Self {
11352                use std::string::ToString;
11353                match value {
11354                    "KIND_UNSPECIFIED" => Self::Unspecified,
11355                    "ROLE" => Self::Role,
11356                    "CLUSTER_ROLE" => Self::ClusterRole,
11357                    _ => Self::UnknownValue(kind::UnknownValue(
11358                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11359                    )),
11360                }
11361            }
11362        }
11363
11364        impl serde::ser::Serialize for Kind {
11365            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11366            where
11367                S: serde::Serializer,
11368            {
11369                match self {
11370                    Self::Unspecified => serializer.serialize_i32(0),
11371                    Self::Role => serializer.serialize_i32(1),
11372                    Self::ClusterRole => serializer.serialize_i32(2),
11373                    Self::UnknownValue(u) => u.0.serialize(serializer),
11374                }
11375            }
11376        }
11377
11378        impl<'de> serde::de::Deserialize<'de> for Kind {
11379            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11380            where
11381                D: serde::Deserializer<'de>,
11382            {
11383                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
11384                    ".google.cloud.securitycenter.v2.Kubernetes.Role.Kind",
11385                ))
11386            }
11387        }
11388    }
11389
11390    /// Represents a Kubernetes RoleBinding or ClusterRoleBinding.
11391    #[derive(Clone, Default, PartialEq)]
11392    #[non_exhaustive]
11393    pub struct Binding {
11394        /// Namespace for the binding.
11395        pub ns: std::string::String,
11396
11397        /// Name for the binding.
11398        pub name: std::string::String,
11399
11400        /// The Role or ClusterRole referenced by the binding.
11401        pub role: std::option::Option<crate::model::kubernetes::Role>,
11402
11403        /// Represents one or more subjects that are bound to the role. Not always
11404        /// available for PATCH requests.
11405        pub subjects: std::vec::Vec<crate::model::kubernetes::Subject>,
11406
11407        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11408    }
11409
11410    impl Binding {
11411        /// Creates a new default instance.
11412        pub fn new() -> Self {
11413            std::default::Default::default()
11414        }
11415
11416        /// Sets the value of [ns][crate::model::kubernetes::Binding::ns].
11417        ///
11418        /// # Example
11419        /// ```ignore,no_run
11420        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
11421        /// let x = Binding::new().set_ns("example");
11422        /// ```
11423        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11424            self.ns = v.into();
11425            self
11426        }
11427
11428        /// Sets the value of [name][crate::model::kubernetes::Binding::name].
11429        ///
11430        /// # Example
11431        /// ```ignore,no_run
11432        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
11433        /// let x = Binding::new().set_name("example");
11434        /// ```
11435        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11436            self.name = v.into();
11437            self
11438        }
11439
11440        /// Sets the value of [role][crate::model::kubernetes::Binding::role].
11441        ///
11442        /// # Example
11443        /// ```ignore,no_run
11444        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
11445        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
11446        /// let x = Binding::new().set_role(Role::default()/* use setters */);
11447        /// ```
11448        pub fn set_role<T>(mut self, v: T) -> Self
11449        where
11450            T: std::convert::Into<crate::model::kubernetes::Role>,
11451        {
11452            self.role = std::option::Option::Some(v.into());
11453            self
11454        }
11455
11456        /// Sets or clears the value of [role][crate::model::kubernetes::Binding::role].
11457        ///
11458        /// # Example
11459        /// ```ignore,no_run
11460        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
11461        /// use google_cloud_securitycenter_v2::model::kubernetes::Role;
11462        /// let x = Binding::new().set_or_clear_role(Some(Role::default()/* use setters */));
11463        /// let x = Binding::new().set_or_clear_role(None::<Role>);
11464        /// ```
11465        pub fn set_or_clear_role<T>(mut self, v: std::option::Option<T>) -> Self
11466        where
11467            T: std::convert::Into<crate::model::kubernetes::Role>,
11468        {
11469            self.role = v.map(|x| x.into());
11470            self
11471        }
11472
11473        /// Sets the value of [subjects][crate::model::kubernetes::Binding::subjects].
11474        ///
11475        /// # Example
11476        /// ```ignore,no_run
11477        /// # use google_cloud_securitycenter_v2::model::kubernetes::Binding;
11478        /// use google_cloud_securitycenter_v2::model::kubernetes::Subject;
11479        /// let x = Binding::new()
11480        ///     .set_subjects([
11481        ///         Subject::default()/* use setters */,
11482        ///         Subject::default()/* use (different) setters */,
11483        ///     ]);
11484        /// ```
11485        pub fn set_subjects<T, V>(mut self, v: T) -> Self
11486        where
11487            T: std::iter::IntoIterator<Item = V>,
11488            V: std::convert::Into<crate::model::kubernetes::Subject>,
11489        {
11490            use std::iter::Iterator;
11491            self.subjects = v.into_iter().map(|i| i.into()).collect();
11492            self
11493        }
11494    }
11495
11496    impl wkt::message::Message for Binding {
11497        fn typename() -> &'static str {
11498            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Binding"
11499        }
11500    }
11501
11502    /// Represents a Kubernetes subject.
11503    #[derive(Clone, Default, PartialEq)]
11504    #[non_exhaustive]
11505    pub struct Subject {
11506        /// Authentication type for the subject.
11507        pub kind: crate::model::kubernetes::subject::AuthType,
11508
11509        /// Namespace for the subject.
11510        pub ns: std::string::String,
11511
11512        /// Name for the subject.
11513        pub name: std::string::String,
11514
11515        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11516    }
11517
11518    impl Subject {
11519        /// Creates a new default instance.
11520        pub fn new() -> Self {
11521            std::default::Default::default()
11522        }
11523
11524        /// Sets the value of [kind][crate::model::kubernetes::Subject::kind].
11525        ///
11526        /// # Example
11527        /// ```ignore,no_run
11528        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
11529        /// use google_cloud_securitycenter_v2::model::kubernetes::subject::AuthType;
11530        /// let x0 = Subject::new().set_kind(AuthType::User);
11531        /// let x1 = Subject::new().set_kind(AuthType::Serviceaccount);
11532        /// let x2 = Subject::new().set_kind(AuthType::Group);
11533        /// ```
11534        pub fn set_kind<T: std::convert::Into<crate::model::kubernetes::subject::AuthType>>(
11535            mut self,
11536            v: T,
11537        ) -> Self {
11538            self.kind = v.into();
11539            self
11540        }
11541
11542        /// Sets the value of [ns][crate::model::kubernetes::Subject::ns].
11543        ///
11544        /// # Example
11545        /// ```ignore,no_run
11546        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
11547        /// let x = Subject::new().set_ns("example");
11548        /// ```
11549        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11550            self.ns = v.into();
11551            self
11552        }
11553
11554        /// Sets the value of [name][crate::model::kubernetes::Subject::name].
11555        ///
11556        /// # Example
11557        /// ```ignore,no_run
11558        /// # use google_cloud_securitycenter_v2::model::kubernetes::Subject;
11559        /// let x = Subject::new().set_name("example");
11560        /// ```
11561        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11562            self.name = v.into();
11563            self
11564        }
11565    }
11566
11567    impl wkt::message::Message for Subject {
11568        fn typename() -> &'static str {
11569            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Subject"
11570        }
11571    }
11572
11573    /// Defines additional types related to [Subject].
11574    pub mod subject {
11575        #[allow(unused_imports)]
11576        use super::*;
11577
11578        /// Auth types that can be used for the subject's kind field.
11579        ///
11580        /// # Working with unknown values
11581        ///
11582        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11583        /// additional enum variants at any time. Adding new variants is not considered
11584        /// a breaking change. Applications should write their code in anticipation of:
11585        ///
11586        /// - New values appearing in future releases of the client library, **and**
11587        /// - New values received dynamically, without application changes.
11588        ///
11589        /// Please consult the [Working with enums] section in the user guide for some
11590        /// guidelines.
11591        ///
11592        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11593        #[derive(Clone, Debug, PartialEq)]
11594        #[non_exhaustive]
11595        pub enum AuthType {
11596            /// Authentication is not specified.
11597            Unspecified,
11598            /// User with valid certificate.
11599            User,
11600            /// Users managed by Kubernetes API with credentials stored as secrets.
11601            Serviceaccount,
11602            /// Collection of users.
11603            Group,
11604            /// If set, the enum was initialized with an unknown value.
11605            ///
11606            /// Applications can examine the value using [AuthType::value] or
11607            /// [AuthType::name].
11608            UnknownValue(auth_type::UnknownValue),
11609        }
11610
11611        #[doc(hidden)]
11612        pub mod auth_type {
11613            #[allow(unused_imports)]
11614            use super::*;
11615            #[derive(Clone, Debug, PartialEq)]
11616            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11617        }
11618
11619        impl AuthType {
11620            /// Gets the enum value.
11621            ///
11622            /// Returns `None` if the enum contains an unknown value deserialized from
11623            /// the string representation of enums.
11624            pub fn value(&self) -> std::option::Option<i32> {
11625                match self {
11626                    Self::Unspecified => std::option::Option::Some(0),
11627                    Self::User => std::option::Option::Some(1),
11628                    Self::Serviceaccount => std::option::Option::Some(2),
11629                    Self::Group => std::option::Option::Some(3),
11630                    Self::UnknownValue(u) => u.0.value(),
11631                }
11632            }
11633
11634            /// Gets the enum value as a string.
11635            ///
11636            /// Returns `None` if the enum contains an unknown value deserialized from
11637            /// the integer representation of enums.
11638            pub fn name(&self) -> std::option::Option<&str> {
11639                match self {
11640                    Self::Unspecified => std::option::Option::Some("AUTH_TYPE_UNSPECIFIED"),
11641                    Self::User => std::option::Option::Some("USER"),
11642                    Self::Serviceaccount => std::option::Option::Some("SERVICEACCOUNT"),
11643                    Self::Group => std::option::Option::Some("GROUP"),
11644                    Self::UnknownValue(u) => u.0.name(),
11645                }
11646            }
11647        }
11648
11649        impl std::default::Default for AuthType {
11650            fn default() -> Self {
11651                use std::convert::From;
11652                Self::from(0)
11653            }
11654        }
11655
11656        impl std::fmt::Display for AuthType {
11657            fn fmt(
11658                &self,
11659                f: &mut std::fmt::Formatter<'_>,
11660            ) -> std::result::Result<(), std::fmt::Error> {
11661                wkt::internal::display_enum(f, self.name(), self.value())
11662            }
11663        }
11664
11665        impl std::convert::From<i32> for AuthType {
11666            fn from(value: i32) -> Self {
11667                match value {
11668                    0 => Self::Unspecified,
11669                    1 => Self::User,
11670                    2 => Self::Serviceaccount,
11671                    3 => Self::Group,
11672                    _ => Self::UnknownValue(auth_type::UnknownValue(
11673                        wkt::internal::UnknownEnumValue::Integer(value),
11674                    )),
11675                }
11676            }
11677        }
11678
11679        impl std::convert::From<&str> for AuthType {
11680            fn from(value: &str) -> Self {
11681                use std::string::ToString;
11682                match value {
11683                    "AUTH_TYPE_UNSPECIFIED" => Self::Unspecified,
11684                    "USER" => Self::User,
11685                    "SERVICEACCOUNT" => Self::Serviceaccount,
11686                    "GROUP" => Self::Group,
11687                    _ => Self::UnknownValue(auth_type::UnknownValue(
11688                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11689                    )),
11690                }
11691            }
11692        }
11693
11694        impl serde::ser::Serialize for AuthType {
11695            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11696            where
11697                S: serde::Serializer,
11698            {
11699                match self {
11700                    Self::Unspecified => serializer.serialize_i32(0),
11701                    Self::User => serializer.serialize_i32(1),
11702                    Self::Serviceaccount => serializer.serialize_i32(2),
11703                    Self::Group => serializer.serialize_i32(3),
11704                    Self::UnknownValue(u) => u.0.serialize(serializer),
11705                }
11706            }
11707        }
11708
11709        impl<'de> serde::de::Deserialize<'de> for AuthType {
11710            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11711            where
11712                D: serde::Deserializer<'de>,
11713            {
11714                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthType>::new(
11715                    ".google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType",
11716                ))
11717            }
11718        }
11719    }
11720
11721    /// Conveys information about a Kubernetes access review (such as one returned
11722    /// by a [`kubectl auth
11723    /// can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
11724    /// command) that was involved in a finding.
11725    #[derive(Clone, Default, PartialEq)]
11726    #[non_exhaustive]
11727    pub struct AccessReview {
11728        /// The API group of the resource. "*" means all.
11729        pub group: std::string::String,
11730
11731        /// Namespace of the action being requested. Currently, there is no
11732        /// distinction between no namespace and all namespaces.  Both
11733        /// are represented by "" (empty).
11734        pub ns: std::string::String,
11735
11736        /// The name of the resource being requested. Empty means all.
11737        pub name: std::string::String,
11738
11739        /// The optional resource type requested. "*" means all.
11740        pub resource: std::string::String,
11741
11742        /// The optional subresource type.
11743        pub subresource: std::string::String,
11744
11745        /// A Kubernetes resource API verb, like get, list, watch, create, update,
11746        /// delete, proxy. "*" means all.
11747        pub verb: std::string::String,
11748
11749        /// The API version of the resource. "*" means all.
11750        pub version: std::string::String,
11751
11752        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11753    }
11754
11755    impl AccessReview {
11756        /// Creates a new default instance.
11757        pub fn new() -> Self {
11758            std::default::Default::default()
11759        }
11760
11761        /// Sets the value of [group][crate::model::kubernetes::AccessReview::group].
11762        ///
11763        /// # Example
11764        /// ```ignore,no_run
11765        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11766        /// let x = AccessReview::new().set_group("example");
11767        /// ```
11768        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11769            self.group = v.into();
11770            self
11771        }
11772
11773        /// Sets the value of [ns][crate::model::kubernetes::AccessReview::ns].
11774        ///
11775        /// # Example
11776        /// ```ignore,no_run
11777        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11778        /// let x = AccessReview::new().set_ns("example");
11779        /// ```
11780        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11781            self.ns = v.into();
11782            self
11783        }
11784
11785        /// Sets the value of [name][crate::model::kubernetes::AccessReview::name].
11786        ///
11787        /// # Example
11788        /// ```ignore,no_run
11789        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11790        /// let x = AccessReview::new().set_name("example");
11791        /// ```
11792        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11793            self.name = v.into();
11794            self
11795        }
11796
11797        /// Sets the value of [resource][crate::model::kubernetes::AccessReview::resource].
11798        ///
11799        /// # Example
11800        /// ```ignore,no_run
11801        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11802        /// let x = AccessReview::new().set_resource("example");
11803        /// ```
11804        pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11805            self.resource = v.into();
11806            self
11807        }
11808
11809        /// Sets the value of [subresource][crate::model::kubernetes::AccessReview::subresource].
11810        ///
11811        /// # Example
11812        /// ```ignore,no_run
11813        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11814        /// let x = AccessReview::new().set_subresource("example");
11815        /// ```
11816        pub fn set_subresource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11817            self.subresource = v.into();
11818            self
11819        }
11820
11821        /// Sets the value of [verb][crate::model::kubernetes::AccessReview::verb].
11822        ///
11823        /// # Example
11824        /// ```ignore,no_run
11825        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11826        /// let x = AccessReview::new().set_verb("example");
11827        /// ```
11828        pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11829            self.verb = v.into();
11830            self
11831        }
11832
11833        /// Sets the value of [version][crate::model::kubernetes::AccessReview::version].
11834        ///
11835        /// # Example
11836        /// ```ignore,no_run
11837        /// # use google_cloud_securitycenter_v2::model::kubernetes::AccessReview;
11838        /// let x = AccessReview::new().set_version("example");
11839        /// ```
11840        pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11841            self.version = v.into();
11842            self
11843        }
11844    }
11845
11846    impl wkt::message::Message for AccessReview {
11847        fn typename() -> &'static str {
11848            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.AccessReview"
11849        }
11850    }
11851
11852    /// Kubernetes object related to the finding, uniquely identified by GKNN.
11853    /// Used if the object Kind is not one of Pod, Node, NodePool, Binding, or
11854    /// AccessReview.
11855    #[derive(Clone, Default, PartialEq)]
11856    #[non_exhaustive]
11857    pub struct Object {
11858        /// Kubernetes object group, such as "policy.k8s.io/v1".
11859        pub group: std::string::String,
11860
11861        /// Kubernetes object kind, such as "Namespace".
11862        pub kind: std::string::String,
11863
11864        /// Kubernetes object namespace. Must be a valid DNS label. Named
11865        /// "ns" to avoid collision with C++ namespace keyword. For details see
11866        /// <https://kubernetes.io/docs/tasks/administer-cluster/namespaces/>.
11867        pub ns: std::string::String,
11868
11869        /// Kubernetes object name. For details see
11870        /// <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/>.
11871        pub name: std::string::String,
11872
11873        /// Pod containers associated with this finding, if any.
11874        pub containers: std::vec::Vec<crate::model::Container>,
11875
11876        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11877    }
11878
11879    impl Object {
11880        /// Creates a new default instance.
11881        pub fn new() -> Self {
11882            std::default::Default::default()
11883        }
11884
11885        /// Sets the value of [group][crate::model::kubernetes::Object::group].
11886        ///
11887        /// # Example
11888        /// ```ignore,no_run
11889        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11890        /// let x = Object::new().set_group("example");
11891        /// ```
11892        pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11893            self.group = v.into();
11894            self
11895        }
11896
11897        /// Sets the value of [kind][crate::model::kubernetes::Object::kind].
11898        ///
11899        /// # Example
11900        /// ```ignore,no_run
11901        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11902        /// let x = Object::new().set_kind("example");
11903        /// ```
11904        pub fn set_kind<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11905            self.kind = v.into();
11906            self
11907        }
11908
11909        /// Sets the value of [ns][crate::model::kubernetes::Object::ns].
11910        ///
11911        /// # Example
11912        /// ```ignore,no_run
11913        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11914        /// let x = Object::new().set_ns("example");
11915        /// ```
11916        pub fn set_ns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11917            self.ns = v.into();
11918            self
11919        }
11920
11921        /// Sets the value of [name][crate::model::kubernetes::Object::name].
11922        ///
11923        /// # Example
11924        /// ```ignore,no_run
11925        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11926        /// let x = Object::new().set_name("example");
11927        /// ```
11928        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11929            self.name = v.into();
11930            self
11931        }
11932
11933        /// Sets the value of [containers][crate::model::kubernetes::Object::containers].
11934        ///
11935        /// # Example
11936        /// ```ignore,no_run
11937        /// # use google_cloud_securitycenter_v2::model::kubernetes::Object;
11938        /// use google_cloud_securitycenter_v2::model::Container;
11939        /// let x = Object::new()
11940        ///     .set_containers([
11941        ///         Container::default()/* use setters */,
11942        ///         Container::default()/* use (different) setters */,
11943        ///     ]);
11944        /// ```
11945        pub fn set_containers<T, V>(mut self, v: T) -> Self
11946        where
11947            T: std::iter::IntoIterator<Item = V>,
11948            V: std::convert::Into<crate::model::Container>,
11949        {
11950            use std::iter::Iterator;
11951            self.containers = v.into_iter().map(|i| i.into()).collect();
11952            self
11953        }
11954    }
11955
11956    impl wkt::message::Message for Object {
11957        fn typename() -> &'static str {
11958            "type.googleapis.com/google.cloud.securitycenter.v2.Kubernetes.Object"
11959        }
11960    }
11961}
11962
11963/// Represents a generic name-value label. A label has separate name and value
11964/// fields to support filtering with the `contains()` function. For more
11965/// information, see [Filtering on array-type
11966/// fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).
11967#[derive(Clone, Default, PartialEq)]
11968#[non_exhaustive]
11969pub struct Label {
11970    /// Name of the label.
11971    pub name: std::string::String,
11972
11973    /// Value that corresponds to the label's name.
11974    pub value: std::string::String,
11975
11976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11977}
11978
11979impl Label {
11980    /// Creates a new default instance.
11981    pub fn new() -> Self {
11982        std::default::Default::default()
11983    }
11984
11985    /// Sets the value of [name][crate::model::Label::name].
11986    ///
11987    /// # Example
11988    /// ```ignore,no_run
11989    /// # use google_cloud_securitycenter_v2::model::Label;
11990    /// let x = Label::new().set_name("example");
11991    /// ```
11992    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11993        self.name = v.into();
11994        self
11995    }
11996
11997    /// Sets the value of [value][crate::model::Label::value].
11998    ///
11999    /// # Example
12000    /// ```ignore,no_run
12001    /// # use google_cloud_securitycenter_v2::model::Label;
12002    /// let x = Label::new().set_value("example");
12003    /// ```
12004    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12005        self.value = v.into();
12006        self
12007    }
12008}
12009
12010impl wkt::message::Message for Label {
12011    fn typename() -> &'static str {
12012        "type.googleapis.com/google.cloud.securitycenter.v2.Label"
12013    }
12014}
12015
12016/// Contains information related to the load balancer associated with the
12017/// finding.
12018#[derive(Clone, Default, PartialEq)]
12019#[non_exhaustive]
12020pub struct LoadBalancer {
12021    /// The name of the load balancer associated with the finding.
12022    pub name: std::string::String,
12023
12024    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12025}
12026
12027impl LoadBalancer {
12028    /// Creates a new default instance.
12029    pub fn new() -> Self {
12030        std::default::Default::default()
12031    }
12032
12033    /// Sets the value of [name][crate::model::LoadBalancer::name].
12034    ///
12035    /// # Example
12036    /// ```ignore,no_run
12037    /// # use google_cloud_securitycenter_v2::model::LoadBalancer;
12038    /// let x = LoadBalancer::new().set_name("example");
12039    /// ```
12040    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12041        self.name = v.into();
12042        self
12043    }
12044}
12045
12046impl wkt::message::Message for LoadBalancer {
12047    fn typename() -> &'static str {
12048        "type.googleapis.com/google.cloud.securitycenter.v2.LoadBalancer"
12049    }
12050}
12051
12052/// An individual entry in a log.
12053#[derive(Clone, Default, PartialEq)]
12054#[non_exhaustive]
12055pub struct LogEntry {
12056    /// The log entry.
12057    pub log_entry: std::option::Option<crate::model::log_entry::LogEntry>,
12058
12059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12060}
12061
12062impl LogEntry {
12063    /// Creates a new default instance.
12064    pub fn new() -> Self {
12065        std::default::Default::default()
12066    }
12067
12068    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry].
12069    ///
12070    /// Note that all the setters affecting `log_entry` are mutually
12071    /// exclusive.
12072    ///
12073    /// # Example
12074    /// ```ignore,no_run
12075    /// # use google_cloud_securitycenter_v2::model::LogEntry;
12076    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12077    /// let x = LogEntry::new().set_log_entry(Some(
12078    ///     google_cloud_securitycenter_v2::model::log_entry::LogEntry::CloudLoggingEntry(CloudLoggingEntry::default().into())));
12079    /// ```
12080    pub fn set_log_entry<
12081        T: std::convert::Into<std::option::Option<crate::model::log_entry::LogEntry>>,
12082    >(
12083        mut self,
12084        v: T,
12085    ) -> Self {
12086        self.log_entry = v.into();
12087        self
12088    }
12089
12090    /// The value of [log_entry][crate::model::LogEntry::log_entry]
12091    /// if it holds a `CloudLoggingEntry`, `None` if the field is not set or
12092    /// holds a different branch.
12093    pub fn cloud_logging_entry(
12094        &self,
12095    ) -> std::option::Option<&std::boxed::Box<crate::model::CloudLoggingEntry>> {
12096        #[allow(unreachable_patterns)]
12097        self.log_entry.as_ref().and_then(|v| match v {
12098            crate::model::log_entry::LogEntry::CloudLoggingEntry(v) => std::option::Option::Some(v),
12099            _ => std::option::Option::None,
12100        })
12101    }
12102
12103    /// Sets the value of [log_entry][crate::model::LogEntry::log_entry]
12104    /// to hold a `CloudLoggingEntry`.
12105    ///
12106    /// Note that all the setters affecting `log_entry` are
12107    /// mutually exclusive.
12108    ///
12109    /// # Example
12110    /// ```ignore,no_run
12111    /// # use google_cloud_securitycenter_v2::model::LogEntry;
12112    /// use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12113    /// let x = LogEntry::new().set_cloud_logging_entry(CloudLoggingEntry::default()/* use setters */);
12114    /// assert!(x.cloud_logging_entry().is_some());
12115    /// ```
12116    pub fn set_cloud_logging_entry<
12117        T: std::convert::Into<std::boxed::Box<crate::model::CloudLoggingEntry>>,
12118    >(
12119        mut self,
12120        v: T,
12121    ) -> Self {
12122        self.log_entry = std::option::Option::Some(
12123            crate::model::log_entry::LogEntry::CloudLoggingEntry(v.into()),
12124        );
12125        self
12126    }
12127}
12128
12129impl wkt::message::Message for LogEntry {
12130    fn typename() -> &'static str {
12131        "type.googleapis.com/google.cloud.securitycenter.v2.LogEntry"
12132    }
12133}
12134
12135/// Defines additional types related to [LogEntry].
12136pub mod log_entry {
12137    #[allow(unused_imports)]
12138    use super::*;
12139
12140    /// The log entry.
12141    #[derive(Clone, Debug, PartialEq)]
12142    #[non_exhaustive]
12143    pub enum LogEntry {
12144        /// An individual entry in a log stored in Cloud Logging.
12145        CloudLoggingEntry(std::boxed::Box<crate::model::CloudLoggingEntry>),
12146    }
12147}
12148
12149/// Metadata taken from a [Cloud Logging
12150/// LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
12151#[derive(Clone, Default, PartialEq)]
12152#[non_exhaustive]
12153pub struct CloudLoggingEntry {
12154    /// A unique identifier for the log entry.
12155    pub insert_id: std::string::String,
12156
12157    /// The type of the log (part of `log_name`. `log_name` is the resource name of
12158    /// the log to which this log entry belongs). For example:
12159    /// `cloudresourcemanager.googleapis.com/activity` Note that this field is not
12160    /// URL-encoded, unlike in `LogEntry`.
12161    pub log_id: std::string::String,
12162
12163    /// The organization, folder, or project of the monitored resource that
12164    /// produced this log entry.
12165    pub resource_container: std::string::String,
12166
12167    /// The time the event described by the log entry occurred.
12168    pub timestamp: std::option::Option<wkt::Timestamp>,
12169
12170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12171}
12172
12173impl CloudLoggingEntry {
12174    /// Creates a new default instance.
12175    pub fn new() -> Self {
12176        std::default::Default::default()
12177    }
12178
12179    /// Sets the value of [insert_id][crate::model::CloudLoggingEntry::insert_id].
12180    ///
12181    /// # Example
12182    /// ```ignore,no_run
12183    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12184    /// let x = CloudLoggingEntry::new().set_insert_id("example");
12185    /// ```
12186    pub fn set_insert_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12187        self.insert_id = v.into();
12188        self
12189    }
12190
12191    /// Sets the value of [log_id][crate::model::CloudLoggingEntry::log_id].
12192    ///
12193    /// # Example
12194    /// ```ignore,no_run
12195    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12196    /// let x = CloudLoggingEntry::new().set_log_id("example");
12197    /// ```
12198    pub fn set_log_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12199        self.log_id = v.into();
12200        self
12201    }
12202
12203    /// Sets the value of [resource_container][crate::model::CloudLoggingEntry::resource_container].
12204    ///
12205    /// # Example
12206    /// ```ignore,no_run
12207    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12208    /// let x = CloudLoggingEntry::new().set_resource_container("example");
12209    /// ```
12210    pub fn set_resource_container<T: std::convert::Into<std::string::String>>(
12211        mut self,
12212        v: T,
12213    ) -> Self {
12214        self.resource_container = v.into();
12215        self
12216    }
12217
12218    /// Sets the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
12219    ///
12220    /// # Example
12221    /// ```ignore,no_run
12222    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12223    /// use wkt::Timestamp;
12224    /// let x = CloudLoggingEntry::new().set_timestamp(Timestamp::default()/* use setters */);
12225    /// ```
12226    pub fn set_timestamp<T>(mut self, v: T) -> Self
12227    where
12228        T: std::convert::Into<wkt::Timestamp>,
12229    {
12230        self.timestamp = std::option::Option::Some(v.into());
12231        self
12232    }
12233
12234    /// Sets or clears the value of [timestamp][crate::model::CloudLoggingEntry::timestamp].
12235    ///
12236    /// # Example
12237    /// ```ignore,no_run
12238    /// # use google_cloud_securitycenter_v2::model::CloudLoggingEntry;
12239    /// use wkt::Timestamp;
12240    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(Some(Timestamp::default()/* use setters */));
12241    /// let x = CloudLoggingEntry::new().set_or_clear_timestamp(None::<Timestamp>);
12242    /// ```
12243    pub fn set_or_clear_timestamp<T>(mut self, v: std::option::Option<T>) -> Self
12244    where
12245        T: std::convert::Into<wkt::Timestamp>,
12246    {
12247        self.timestamp = v.map(|x| x.into());
12248        self
12249    }
12250}
12251
12252impl wkt::message::Message for CloudLoggingEntry {
12253    fn typename() -> &'static str {
12254        "type.googleapis.com/google.cloud.securitycenter.v2.CloudLoggingEntry"
12255    }
12256}
12257
12258/// MITRE ATT&CK tactics and techniques related to this finding.
12259/// See: <https://attack.mitre.org>
12260#[derive(Clone, Default, PartialEq)]
12261#[non_exhaustive]
12262pub struct MitreAttack {
12263    /// The MITRE ATT&CK tactic most closely represented by this finding, if any.
12264    pub primary_tactic: crate::model::mitre_attack::Tactic,
12265
12266    /// The MITRE ATT&CK technique most closely represented by this finding, if
12267    /// any. primary_techniques is a repeated field because there are multiple
12268    /// levels of MITRE ATT&CK techniques.  If the technique most closely
12269    /// represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`),
12270    /// both the sub-technique and its parent technique(s) will be listed (e.g.
12271    /// `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).
12272    pub primary_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
12273
12274    /// Additional MITRE ATT&CK tactics related to this finding, if any.
12275    pub additional_tactics: std::vec::Vec<crate::model::mitre_attack::Tactic>,
12276
12277    /// Additional MITRE ATT&CK techniques related to this finding, if any, along
12278    /// with any of their respective parent techniques.
12279    pub additional_techniques: std::vec::Vec<crate::model::mitre_attack::Technique>,
12280
12281    /// The MITRE ATT&CK version referenced by the above fields. E.g. "8".
12282    pub version: std::string::String,
12283
12284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12285}
12286
12287impl MitreAttack {
12288    /// Creates a new default instance.
12289    pub fn new() -> Self {
12290        std::default::Default::default()
12291    }
12292
12293    /// Sets the value of [primary_tactic][crate::model::MitreAttack::primary_tactic].
12294    ///
12295    /// # Example
12296    /// ```ignore,no_run
12297    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
12298    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
12299    /// let x0 = MitreAttack::new().set_primary_tactic(Tactic::Reconnaissance);
12300    /// let x1 = MitreAttack::new().set_primary_tactic(Tactic::ResourceDevelopment);
12301    /// let x2 = MitreAttack::new().set_primary_tactic(Tactic::InitialAccess);
12302    /// ```
12303    pub fn set_primary_tactic<T: std::convert::Into<crate::model::mitre_attack::Tactic>>(
12304        mut self,
12305        v: T,
12306    ) -> Self {
12307        self.primary_tactic = v.into();
12308        self
12309    }
12310
12311    /// Sets the value of [primary_techniques][crate::model::MitreAttack::primary_techniques].
12312    ///
12313    /// # Example
12314    /// ```ignore,no_run
12315    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
12316    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
12317    /// let x = MitreAttack::new().set_primary_techniques([
12318    ///     Technique::DataObfuscation,
12319    ///     Technique::DataObfuscationSteganography,
12320    ///     Technique::OsCredentialDumping,
12321    /// ]);
12322    /// ```
12323    pub fn set_primary_techniques<T, V>(mut self, v: T) -> Self
12324    where
12325        T: std::iter::IntoIterator<Item = V>,
12326        V: std::convert::Into<crate::model::mitre_attack::Technique>,
12327    {
12328        use std::iter::Iterator;
12329        self.primary_techniques = v.into_iter().map(|i| i.into()).collect();
12330        self
12331    }
12332
12333    /// Sets the value of [additional_tactics][crate::model::MitreAttack::additional_tactics].
12334    ///
12335    /// # Example
12336    /// ```ignore,no_run
12337    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
12338    /// use google_cloud_securitycenter_v2::model::mitre_attack::Tactic;
12339    /// let x = MitreAttack::new().set_additional_tactics([
12340    ///     Tactic::Reconnaissance,
12341    ///     Tactic::ResourceDevelopment,
12342    ///     Tactic::InitialAccess,
12343    /// ]);
12344    /// ```
12345    pub fn set_additional_tactics<T, V>(mut self, v: T) -> Self
12346    where
12347        T: std::iter::IntoIterator<Item = V>,
12348        V: std::convert::Into<crate::model::mitre_attack::Tactic>,
12349    {
12350        use std::iter::Iterator;
12351        self.additional_tactics = v.into_iter().map(|i| i.into()).collect();
12352        self
12353    }
12354
12355    /// Sets the value of [additional_techniques][crate::model::MitreAttack::additional_techniques].
12356    ///
12357    /// # Example
12358    /// ```ignore,no_run
12359    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
12360    /// use google_cloud_securitycenter_v2::model::mitre_attack::Technique;
12361    /// let x = MitreAttack::new().set_additional_techniques([
12362    ///     Technique::DataObfuscation,
12363    ///     Technique::DataObfuscationSteganography,
12364    ///     Technique::OsCredentialDumping,
12365    /// ]);
12366    /// ```
12367    pub fn set_additional_techniques<T, V>(mut self, v: T) -> Self
12368    where
12369        T: std::iter::IntoIterator<Item = V>,
12370        V: std::convert::Into<crate::model::mitre_attack::Technique>,
12371    {
12372        use std::iter::Iterator;
12373        self.additional_techniques = v.into_iter().map(|i| i.into()).collect();
12374        self
12375    }
12376
12377    /// Sets the value of [version][crate::model::MitreAttack::version].
12378    ///
12379    /// # Example
12380    /// ```ignore,no_run
12381    /// # use google_cloud_securitycenter_v2::model::MitreAttack;
12382    /// let x = MitreAttack::new().set_version("example");
12383    /// ```
12384    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12385        self.version = v.into();
12386        self
12387    }
12388}
12389
12390impl wkt::message::Message for MitreAttack {
12391    fn typename() -> &'static str {
12392        "type.googleapis.com/google.cloud.securitycenter.v2.MitreAttack"
12393    }
12394}
12395
12396/// Defines additional types related to [MitreAttack].
12397pub mod mitre_attack {
12398    #[allow(unused_imports)]
12399    use super::*;
12400
12401    /// MITRE ATT&CK tactics that can be referenced by SCC findings.
12402    /// See: <https://attack.mitre.org/tactics/enterprise/>
12403    ///
12404    /// # Working with unknown values
12405    ///
12406    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12407    /// additional enum variants at any time. Adding new variants is not considered
12408    /// a breaking change. Applications should write their code in anticipation of:
12409    ///
12410    /// - New values appearing in future releases of the client library, **and**
12411    /// - New values received dynamically, without application changes.
12412    ///
12413    /// Please consult the [Working with enums] section in the user guide for some
12414    /// guidelines.
12415    ///
12416    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12417    #[derive(Clone, Debug, PartialEq)]
12418    #[non_exhaustive]
12419    pub enum Tactic {
12420        /// Unspecified value.
12421        Unspecified,
12422        /// TA0043
12423        Reconnaissance,
12424        /// TA0042
12425        ResourceDevelopment,
12426        /// TA0001
12427        InitialAccess,
12428        /// TA0002
12429        Execution,
12430        /// TA0003
12431        Persistence,
12432        /// TA0004
12433        PrivilegeEscalation,
12434        /// TA0005
12435        DefenseEvasion,
12436        /// TA0006
12437        CredentialAccess,
12438        /// TA0007
12439        Discovery,
12440        /// TA0008
12441        LateralMovement,
12442        /// TA0009
12443        Collection,
12444        /// TA0011
12445        CommandAndControl,
12446        /// TA0010
12447        Exfiltration,
12448        /// TA0040
12449        Impact,
12450        /// If set, the enum was initialized with an unknown value.
12451        ///
12452        /// Applications can examine the value using [Tactic::value] or
12453        /// [Tactic::name].
12454        UnknownValue(tactic::UnknownValue),
12455    }
12456
12457    #[doc(hidden)]
12458    pub mod tactic {
12459        #[allow(unused_imports)]
12460        use super::*;
12461        #[derive(Clone, Debug, PartialEq)]
12462        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12463    }
12464
12465    impl Tactic {
12466        /// Gets the enum value.
12467        ///
12468        /// Returns `None` if the enum contains an unknown value deserialized from
12469        /// the string representation of enums.
12470        pub fn value(&self) -> std::option::Option<i32> {
12471            match self {
12472                Self::Unspecified => std::option::Option::Some(0),
12473                Self::Reconnaissance => std::option::Option::Some(1),
12474                Self::ResourceDevelopment => std::option::Option::Some(2),
12475                Self::InitialAccess => std::option::Option::Some(5),
12476                Self::Execution => std::option::Option::Some(3),
12477                Self::Persistence => std::option::Option::Some(6),
12478                Self::PrivilegeEscalation => std::option::Option::Some(8),
12479                Self::DefenseEvasion => std::option::Option::Some(7),
12480                Self::CredentialAccess => std::option::Option::Some(9),
12481                Self::Discovery => std::option::Option::Some(10),
12482                Self::LateralMovement => std::option::Option::Some(11),
12483                Self::Collection => std::option::Option::Some(12),
12484                Self::CommandAndControl => std::option::Option::Some(4),
12485                Self::Exfiltration => std::option::Option::Some(13),
12486                Self::Impact => std::option::Option::Some(14),
12487                Self::UnknownValue(u) => u.0.value(),
12488            }
12489        }
12490
12491        /// Gets the enum value as a string.
12492        ///
12493        /// Returns `None` if the enum contains an unknown value deserialized from
12494        /// the integer representation of enums.
12495        pub fn name(&self) -> std::option::Option<&str> {
12496            match self {
12497                Self::Unspecified => std::option::Option::Some("TACTIC_UNSPECIFIED"),
12498                Self::Reconnaissance => std::option::Option::Some("RECONNAISSANCE"),
12499                Self::ResourceDevelopment => std::option::Option::Some("RESOURCE_DEVELOPMENT"),
12500                Self::InitialAccess => std::option::Option::Some("INITIAL_ACCESS"),
12501                Self::Execution => std::option::Option::Some("EXECUTION"),
12502                Self::Persistence => std::option::Option::Some("PERSISTENCE"),
12503                Self::PrivilegeEscalation => std::option::Option::Some("PRIVILEGE_ESCALATION"),
12504                Self::DefenseEvasion => std::option::Option::Some("DEFENSE_EVASION"),
12505                Self::CredentialAccess => std::option::Option::Some("CREDENTIAL_ACCESS"),
12506                Self::Discovery => std::option::Option::Some("DISCOVERY"),
12507                Self::LateralMovement => std::option::Option::Some("LATERAL_MOVEMENT"),
12508                Self::Collection => std::option::Option::Some("COLLECTION"),
12509                Self::CommandAndControl => std::option::Option::Some("COMMAND_AND_CONTROL"),
12510                Self::Exfiltration => std::option::Option::Some("EXFILTRATION"),
12511                Self::Impact => std::option::Option::Some("IMPACT"),
12512                Self::UnknownValue(u) => u.0.name(),
12513            }
12514        }
12515    }
12516
12517    impl std::default::Default for Tactic {
12518        fn default() -> Self {
12519            use std::convert::From;
12520            Self::from(0)
12521        }
12522    }
12523
12524    impl std::fmt::Display for Tactic {
12525        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12526            wkt::internal::display_enum(f, self.name(), self.value())
12527        }
12528    }
12529
12530    impl std::convert::From<i32> for Tactic {
12531        fn from(value: i32) -> Self {
12532            match value {
12533                0 => Self::Unspecified,
12534                1 => Self::Reconnaissance,
12535                2 => Self::ResourceDevelopment,
12536                3 => Self::Execution,
12537                4 => Self::CommandAndControl,
12538                5 => Self::InitialAccess,
12539                6 => Self::Persistence,
12540                7 => Self::DefenseEvasion,
12541                8 => Self::PrivilegeEscalation,
12542                9 => Self::CredentialAccess,
12543                10 => Self::Discovery,
12544                11 => Self::LateralMovement,
12545                12 => Self::Collection,
12546                13 => Self::Exfiltration,
12547                14 => Self::Impact,
12548                _ => Self::UnknownValue(tactic::UnknownValue(
12549                    wkt::internal::UnknownEnumValue::Integer(value),
12550                )),
12551            }
12552        }
12553    }
12554
12555    impl std::convert::From<&str> for Tactic {
12556        fn from(value: &str) -> Self {
12557            use std::string::ToString;
12558            match value {
12559                "TACTIC_UNSPECIFIED" => Self::Unspecified,
12560                "RECONNAISSANCE" => Self::Reconnaissance,
12561                "RESOURCE_DEVELOPMENT" => Self::ResourceDevelopment,
12562                "INITIAL_ACCESS" => Self::InitialAccess,
12563                "EXECUTION" => Self::Execution,
12564                "PERSISTENCE" => Self::Persistence,
12565                "PRIVILEGE_ESCALATION" => Self::PrivilegeEscalation,
12566                "DEFENSE_EVASION" => Self::DefenseEvasion,
12567                "CREDENTIAL_ACCESS" => Self::CredentialAccess,
12568                "DISCOVERY" => Self::Discovery,
12569                "LATERAL_MOVEMENT" => Self::LateralMovement,
12570                "COLLECTION" => Self::Collection,
12571                "COMMAND_AND_CONTROL" => Self::CommandAndControl,
12572                "EXFILTRATION" => Self::Exfiltration,
12573                "IMPACT" => Self::Impact,
12574                _ => Self::UnknownValue(tactic::UnknownValue(
12575                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12576                )),
12577            }
12578        }
12579    }
12580
12581    impl serde::ser::Serialize for Tactic {
12582        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12583        where
12584            S: serde::Serializer,
12585        {
12586            match self {
12587                Self::Unspecified => serializer.serialize_i32(0),
12588                Self::Reconnaissance => serializer.serialize_i32(1),
12589                Self::ResourceDevelopment => serializer.serialize_i32(2),
12590                Self::InitialAccess => serializer.serialize_i32(5),
12591                Self::Execution => serializer.serialize_i32(3),
12592                Self::Persistence => serializer.serialize_i32(6),
12593                Self::PrivilegeEscalation => serializer.serialize_i32(8),
12594                Self::DefenseEvasion => serializer.serialize_i32(7),
12595                Self::CredentialAccess => serializer.serialize_i32(9),
12596                Self::Discovery => serializer.serialize_i32(10),
12597                Self::LateralMovement => serializer.serialize_i32(11),
12598                Self::Collection => serializer.serialize_i32(12),
12599                Self::CommandAndControl => serializer.serialize_i32(4),
12600                Self::Exfiltration => serializer.serialize_i32(13),
12601                Self::Impact => serializer.serialize_i32(14),
12602                Self::UnknownValue(u) => u.0.serialize(serializer),
12603            }
12604        }
12605    }
12606
12607    impl<'de> serde::de::Deserialize<'de> for Tactic {
12608        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12609        where
12610            D: serde::Deserializer<'de>,
12611        {
12612            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Tactic>::new(
12613                ".google.cloud.securitycenter.v2.MitreAttack.Tactic",
12614            ))
12615        }
12616    }
12617
12618    /// MITRE ATT&CK techniques that can be referenced by Security Command Center
12619    /// findings. See: <https://attack.mitre.org/techniques/enterprise/>
12620    ///
12621    /// # Working with unknown values
12622    ///
12623    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12624    /// additional enum variants at any time. Adding new variants is not considered
12625    /// a breaking change. Applications should write their code in anticipation of:
12626    ///
12627    /// - New values appearing in future releases of the client library, **and**
12628    /// - New values received dynamically, without application changes.
12629    ///
12630    /// Please consult the [Working with enums] section in the user guide for some
12631    /// guidelines.
12632    ///
12633    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12634    #[derive(Clone, Debug, PartialEq)]
12635    #[non_exhaustive]
12636    pub enum Technique {
12637        /// Unspecified value.
12638        Unspecified,
12639        /// T1001
12640        DataObfuscation,
12641        /// T1001.002
12642        DataObfuscationSteganography,
12643        /// T1003
12644        OsCredentialDumping,
12645        /// T1003.007
12646        OsCredentialDumpingProcFilesystem,
12647        /// T1003.008
12648        OsCredentialDumpingEtcPasswordAndEtcShadow,
12649        /// T1005
12650        DataFromLocalSystem,
12651        /// T1020
12652        AutomatedExfiltration,
12653        /// T1027
12654        ObfuscatedFilesOrInfo,
12655        /// T1027.003
12656        Steganography,
12657        /// T1027.004
12658        CompileAfterDelivery,
12659        /// T1027.010
12660        CommandObfuscation,
12661        /// T1029
12662        ScheduledTransfer,
12663        /// T1033
12664        SystemOwnerUserDiscovery,
12665        /// T1036
12666        Masquerading,
12667        /// T1036.005
12668        MatchLegitimateNameOrLocation,
12669        /// T1037
12670        BootOrLogonInitializationScripts,
12671        /// T1037.005
12672        StartupItems,
12673        /// T1046
12674        NetworkServiceDiscovery,
12675        /// T1053
12676        ScheduledTaskJob,
12677        /// T1053.003
12678        ScheduledTaskJobCron,
12679        /// T1053.007
12680        ContainerOrchestrationJob,
12681        /// T1055
12682        ProcessInjection,
12683        /// T1056
12684        InputCapture,
12685        /// T1056.001
12686        InputCaptureKeylogging,
12687        /// T1057
12688        ProcessDiscovery,
12689        /// T1059
12690        CommandAndScriptingInterpreter,
12691        /// T1059.004
12692        UnixShell,
12693        /// T1059.006
12694        Python,
12695        /// T1068
12696        ExploitationForPrivilegeEscalation,
12697        /// T1069
12698        PermissionGroupsDiscovery,
12699        /// T1069.003
12700        CloudGroups,
12701        /// T1070
12702        IndicatorRemoval,
12703        /// T1070.002
12704        IndicatorRemovalClearLinuxOrMacSystemLogs,
12705        /// T1070.003
12706        IndicatorRemovalClearCommandHistory,
12707        /// T1070.004
12708        IndicatorRemovalFileDeletion,
12709        /// T1070.006
12710        IndicatorRemovalTimestomp,
12711        /// T1070.008
12712        IndicatorRemovalClearMailboxData,
12713        /// T1071
12714        ApplicationLayerProtocol,
12715        /// T1071.004
12716        Dns,
12717        /// T1072
12718        SoftwareDeploymentTools,
12719        /// T1078
12720        ValidAccounts,
12721        /// T1078.001
12722        DefaultAccounts,
12723        /// T1078.003
12724        LocalAccounts,
12725        /// T1078.004
12726        CloudAccounts,
12727        /// T1083
12728        FileAndDirectoryDiscovery,
12729        /// T1087.001
12730        AccountDiscoveryLocalAccount,
12731        /// T1090
12732        Proxy,
12733        /// T1090.002
12734        ExternalProxy,
12735        /// T1090.003
12736        MultiHopProxy,
12737        /// T1098
12738        AccountManipulation,
12739        /// T1098.001
12740        AdditionalCloudCredentials,
12741        /// T1098.003
12742        AdditionalCloudRoles,
12743        /// T1098.004
12744        SshAuthorizedKeys,
12745        /// T1098.006
12746        AdditionalContainerClusterRoles,
12747        /// T1104
12748        MultiStageChannels,
12749        /// T1105
12750        IngressToolTransfer,
12751        /// T1106
12752        NativeApi,
12753        /// T1110
12754        BruteForce,
12755        /// T1119
12756        AutomatedCollection,
12757        /// T1129
12758        SharedModules,
12759        /// T1132
12760        DataEncoding,
12761        /// T1132.001
12762        StandardEncoding,
12763        /// T1134
12764        AccessTokenManipulation,
12765        /// T1134.001
12766        TokenImpersonationOrTheft,
12767        /// T1136
12768        CreateAccount,
12769        /// T1136.001
12770        LocalAccount,
12771        /// T1140
12772        DeobfuscateDecodeFilesOrInfo,
12773        /// T1190
12774        ExploitPublicFacingApplication,
12775        /// T1195
12776        SupplyChainCompromise,
12777        /// T1195.001
12778        CompromiseSoftwareDependenciesAndDevelopmentTools,
12779        /// T1203
12780        ExploitationForClientExecution,
12781        /// T1204
12782        UserExecution,
12783        /// T1222.002
12784        LinuxAndMacFileAndDirectoryPermissionsModification,
12785        /// T1484
12786        DomainPolicyModification,
12787        /// T1485
12788        DataDestruction,
12789        /// T1486
12790        DataEncryptedForImpact,
12791        /// T1489
12792        ServiceStop,
12793        /// T1490
12794        InhibitSystemRecovery,
12795        /// T1495
12796        FirmwareCorruption,
12797        /// T1496
12798        ResourceHijacking,
12799        /// T1498
12800        NetworkDenialOfService,
12801        /// T1526
12802        CloudServiceDiscovery,
12803        /// T1528
12804        StealApplicationAccessToken,
12805        /// T1531
12806        AccountAccessRemoval,
12807        /// T1537
12808        TransferDataToCloudAccount,
12809        /// T1539
12810        StealWebSessionCookie,
12811        /// T1543
12812        CreateOrModifySystemProcess,
12813        /// T1546
12814        EventTriggeredExecution,
12815        /// T1547
12816        BootOrLogonAutostartExecution,
12817        /// T1547.006
12818        KernelModulesAndExtensions,
12819        /// T1547.009
12820        ShortcutModification,
12821        /// T1548
12822        AbuseElevationControlMechanism,
12823        /// T1548.001
12824        AbuseElevationControlMechanismSetuidAndSetgid,
12825        /// T1548.003
12826        AbuseElevationControlMechanismSudoAndSudoCaching,
12827        /// T1552
12828        UnsecuredCredentials,
12829        /// T1552.001
12830        CredentialsInFiles,
12831        /// T1552.003
12832        BashHistory,
12833        /// T1552.004
12834        PrivateKeys,
12835        /// T1553
12836        SubvertTrustControl,
12837        /// T1553.004
12838        InstallRootCertificate,
12839        /// T1554
12840        CompromiseHostSoftwareBinary,
12841        /// T1555
12842        CredentialsFromPasswordStores,
12843        /// T1556
12844        ModifyAuthenticationProcess,
12845        /// T1556.003
12846        PluggableAuthenticationModules,
12847        /// T1556.006
12848        MultiFactorAuthentication,
12849        /// T1562
12850        ImpairDefenses,
12851        /// T1562.001
12852        DisableOrModifyTools,
12853        /// T1562.006
12854        IndicatorBlocking,
12855        /// T1562.012
12856        DisableOrModifyLinuxAuditSystem,
12857        /// T1564
12858        HideArtifacts,
12859        /// T1564.001
12860        HiddenFilesAndDirectories,
12861        /// T1564.002
12862        HiddenUsers,
12863        /// T1567
12864        ExfiltrationOverWebService,
12865        /// T1567.002
12866        ExfiltrationToCloudStorage,
12867        /// T1568
12868        DynamicResolution,
12869        /// T1570
12870        LateralToolTransfer,
12871        /// T1574
12872        HijackExecutionFlow,
12873        /// T1574.006
12874        HijackExecutionFlowDynamicLinkerHijacking,
12875        /// T1578
12876        ModifyCloudComputeInfrastructure,
12877        /// T1578.001
12878        CreateSnapshot,
12879        /// T1580
12880        CloudInfrastructureDiscovery,
12881        /// T1587
12882        DevelopCapabilities,
12883        /// T1587.001
12884        DevelopCapabilitiesMalware,
12885        /// T1588
12886        ObtainCapabilities,
12887        /// T1588.001
12888        ObtainCapabilitiesMalware,
12889        /// T1588.006
12890        ObtainCapabilitiesVulnerabilities,
12891        /// T1595
12892        ActiveScanning,
12893        /// T1595.001
12894        ScanningIpBlocks,
12895        /// T1608
12896        StageCapabilities,
12897        /// T1608.001
12898        UploadMalware,
12899        /// T1609
12900        ContainerAdministrationCommand,
12901        /// T1610
12902        DeployContainer,
12903        /// T1611
12904        EscapeToHost,
12905        /// T1613
12906        ContainerAndResourceDiscovery,
12907        /// T1620
12908        ReflectiveCodeLoading,
12909        /// T1649
12910        StealOrForgeAuthenticationCertificates,
12911        /// T1657
12912        FinancialTheft,
12913        /// If set, the enum was initialized with an unknown value.
12914        ///
12915        /// Applications can examine the value using [Technique::value] or
12916        /// [Technique::name].
12917        UnknownValue(technique::UnknownValue),
12918    }
12919
12920    #[doc(hidden)]
12921    pub mod technique {
12922        #[allow(unused_imports)]
12923        use super::*;
12924        #[derive(Clone, Debug, PartialEq)]
12925        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12926    }
12927
12928    impl Technique {
12929        /// Gets the enum value.
12930        ///
12931        /// Returns `None` if the enum contains an unknown value deserialized from
12932        /// the string representation of enums.
12933        pub fn value(&self) -> std::option::Option<i32> {
12934            match self {
12935                Self::Unspecified => std::option::Option::Some(0),
12936                Self::DataObfuscation => std::option::Option::Some(70),
12937                Self::DataObfuscationSteganography => std::option::Option::Some(71),
12938                Self::OsCredentialDumping => std::option::Option::Some(114),
12939                Self::OsCredentialDumpingProcFilesystem => std::option::Option::Some(115),
12940                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => std::option::Option::Some(122),
12941                Self::DataFromLocalSystem => std::option::Option::Some(117),
12942                Self::AutomatedExfiltration => std::option::Option::Some(68),
12943                Self::ObfuscatedFilesOrInfo => std::option::Option::Some(72),
12944                Self::Steganography => std::option::Option::Some(73),
12945                Self::CompileAfterDelivery => std::option::Option::Some(74),
12946                Self::CommandObfuscation => std::option::Option::Some(75),
12947                Self::ScheduledTransfer => std::option::Option::Some(120),
12948                Self::SystemOwnerUserDiscovery => std::option::Option::Some(118),
12949                Self::Masquerading => std::option::Option::Some(49),
12950                Self::MatchLegitimateNameOrLocation => std::option::Option::Some(50),
12951                Self::BootOrLogonInitializationScripts => std::option::Option::Some(37),
12952                Self::StartupItems => std::option::Option::Some(38),
12953                Self::NetworkServiceDiscovery => std::option::Option::Some(32),
12954                Self::ScheduledTaskJob => std::option::Option::Some(89),
12955                Self::ScheduledTaskJobCron => std::option::Option::Some(119),
12956                Self::ContainerOrchestrationJob => std::option::Option::Some(90),
12957                Self::ProcessInjection => std::option::Option::Some(93),
12958                Self::InputCapture => std::option::Option::Some(103),
12959                Self::InputCaptureKeylogging => std::option::Option::Some(104),
12960                Self::ProcessDiscovery => std::option::Option::Some(56),
12961                Self::CommandAndScriptingInterpreter => std::option::Option::Some(6),
12962                Self::UnixShell => std::option::Option::Some(7),
12963                Self::Python => std::option::Option::Some(59),
12964                Self::ExploitationForPrivilegeEscalation => std::option::Option::Some(63),
12965                Self::PermissionGroupsDiscovery => std::option::Option::Some(18),
12966                Self::CloudGroups => std::option::Option::Some(19),
12967                Self::IndicatorRemoval => std::option::Option::Some(123),
12968                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => std::option::Option::Some(124),
12969                Self::IndicatorRemovalClearCommandHistory => std::option::Option::Some(125),
12970                Self::IndicatorRemovalFileDeletion => std::option::Option::Some(64),
12971                Self::IndicatorRemovalTimestomp => std::option::Option::Some(128),
12972                Self::IndicatorRemovalClearMailboxData => std::option::Option::Some(126),
12973                Self::ApplicationLayerProtocol => std::option::Option::Some(45),
12974                Self::Dns => std::option::Option::Some(46),
12975                Self::SoftwareDeploymentTools => std::option::Option::Some(47),
12976                Self::ValidAccounts => std::option::Option::Some(14),
12977                Self::DefaultAccounts => std::option::Option::Some(35),
12978                Self::LocalAccounts => std::option::Option::Some(15),
12979                Self::CloudAccounts => std::option::Option::Some(16),
12980                Self::FileAndDirectoryDiscovery => std::option::Option::Some(121),
12981                Self::AccountDiscoveryLocalAccount => std::option::Option::Some(116),
12982                Self::Proxy => std::option::Option::Some(9),
12983                Self::ExternalProxy => std::option::Option::Some(10),
12984                Self::MultiHopProxy => std::option::Option::Some(11),
12985                Self::AccountManipulation => std::option::Option::Some(22),
12986                Self::AdditionalCloudCredentials => std::option::Option::Some(40),
12987                Self::AdditionalCloudRoles => std::option::Option::Some(67),
12988                Self::SshAuthorizedKeys => std::option::Option::Some(23),
12989                Self::AdditionalContainerClusterRoles => std::option::Option::Some(58),
12990                Self::MultiStageChannels => std::option::Option::Some(76),
12991                Self::IngressToolTransfer => std::option::Option::Some(3),
12992                Self::NativeApi => std::option::Option::Some(4),
12993                Self::BruteForce => std::option::Option::Some(44),
12994                Self::AutomatedCollection => std::option::Option::Some(94),
12995                Self::SharedModules => std::option::Option::Some(5),
12996                Self::DataEncoding => std::option::Option::Some(77),
12997                Self::StandardEncoding => std::option::Option::Some(78),
12998                Self::AccessTokenManipulation => std::option::Option::Some(33),
12999                Self::TokenImpersonationOrTheft => std::option::Option::Some(39),
13000                Self::CreateAccount => std::option::Option::Some(79),
13001                Self::LocalAccount => std::option::Option::Some(80),
13002                Self::DeobfuscateDecodeFilesOrInfo => std::option::Option::Some(95),
13003                Self::ExploitPublicFacingApplication => std::option::Option::Some(27),
13004                Self::SupplyChainCompromise => std::option::Option::Some(129),
13005                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
13006                    std::option::Option::Some(130)
13007                }
13008                Self::ExploitationForClientExecution => std::option::Option::Some(134),
13009                Self::UserExecution => std::option::Option::Some(69),
13010                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
13011                    std::option::Option::Some(135)
13012                }
13013                Self::DomainPolicyModification => std::option::Option::Some(30),
13014                Self::DataDestruction => std::option::Option::Some(29),
13015                Self::DataEncryptedForImpact => std::option::Option::Some(132),
13016                Self::ServiceStop => std::option::Option::Some(52),
13017                Self::InhibitSystemRecovery => std::option::Option::Some(36),
13018                Self::FirmwareCorruption => std::option::Option::Some(81),
13019                Self::ResourceHijacking => std::option::Option::Some(8),
13020                Self::NetworkDenialOfService => std::option::Option::Some(17),
13021                Self::CloudServiceDiscovery => std::option::Option::Some(48),
13022                Self::StealApplicationAccessToken => std::option::Option::Some(42),
13023                Self::AccountAccessRemoval => std::option::Option::Some(51),
13024                Self::TransferDataToCloudAccount => std::option::Option::Some(91),
13025                Self::StealWebSessionCookie => std::option::Option::Some(25),
13026                Self::CreateOrModifySystemProcess => std::option::Option::Some(24),
13027                Self::EventTriggeredExecution => std::option::Option::Some(65),
13028                Self::BootOrLogonAutostartExecution => std::option::Option::Some(82),
13029                Self::KernelModulesAndExtensions => std::option::Option::Some(83),
13030                Self::ShortcutModification => std::option::Option::Some(127),
13031                Self::AbuseElevationControlMechanism => std::option::Option::Some(34),
13032                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
13033                    std::option::Option::Some(136)
13034                }
13035                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
13036                    std::option::Option::Some(109)
13037                }
13038                Self::UnsecuredCredentials => std::option::Option::Some(13),
13039                Self::CredentialsInFiles => std::option::Option::Some(105),
13040                Self::BashHistory => std::option::Option::Some(96),
13041                Self::PrivateKeys => std::option::Option::Some(97),
13042                Self::SubvertTrustControl => std::option::Option::Some(106),
13043                Self::InstallRootCertificate => std::option::Option::Some(107),
13044                Self::CompromiseHostSoftwareBinary => std::option::Option::Some(84),
13045                Self::CredentialsFromPasswordStores => std::option::Option::Some(98),
13046                Self::ModifyAuthenticationProcess => std::option::Option::Some(28),
13047                Self::PluggableAuthenticationModules => std::option::Option::Some(108),
13048                Self::MultiFactorAuthentication => std::option::Option::Some(137),
13049                Self::ImpairDefenses => std::option::Option::Some(31),
13050                Self::DisableOrModifyTools => std::option::Option::Some(55),
13051                Self::IndicatorBlocking => std::option::Option::Some(110),
13052                Self::DisableOrModifyLinuxAuditSystem => std::option::Option::Some(111),
13053                Self::HideArtifacts => std::option::Option::Some(85),
13054                Self::HiddenFilesAndDirectories => std::option::Option::Some(86),
13055                Self::HiddenUsers => std::option::Option::Some(87),
13056                Self::ExfiltrationOverWebService => std::option::Option::Some(20),
13057                Self::ExfiltrationToCloudStorage => std::option::Option::Some(21),
13058                Self::DynamicResolution => std::option::Option::Some(12),
13059                Self::LateralToolTransfer => std::option::Option::Some(41),
13060                Self::HijackExecutionFlow => std::option::Option::Some(112),
13061                Self::HijackExecutionFlowDynamicLinkerHijacking => std::option::Option::Some(113),
13062                Self::ModifyCloudComputeInfrastructure => std::option::Option::Some(26),
13063                Self::CreateSnapshot => std::option::Option::Some(54),
13064                Self::CloudInfrastructureDiscovery => std::option::Option::Some(53),
13065                Self::DevelopCapabilities => std::option::Option::Some(99),
13066                Self::DevelopCapabilitiesMalware => std::option::Option::Some(100),
13067                Self::ObtainCapabilities => std::option::Option::Some(43),
13068                Self::ObtainCapabilitiesMalware => std::option::Option::Some(101),
13069                Self::ObtainCapabilitiesVulnerabilities => std::option::Option::Some(133),
13070                Self::ActiveScanning => std::option::Option::Some(1),
13071                Self::ScanningIpBlocks => std::option::Option::Some(2),
13072                Self::StageCapabilities => std::option::Option::Some(88),
13073                Self::UploadMalware => std::option::Option::Some(102),
13074                Self::ContainerAdministrationCommand => std::option::Option::Some(60),
13075                Self::DeployContainer => std::option::Option::Some(66),
13076                Self::EscapeToHost => std::option::Option::Some(61),
13077                Self::ContainerAndResourceDiscovery => std::option::Option::Some(57),
13078                Self::ReflectiveCodeLoading => std::option::Option::Some(92),
13079                Self::StealOrForgeAuthenticationCertificates => std::option::Option::Some(62),
13080                Self::FinancialTheft => std::option::Option::Some(131),
13081                Self::UnknownValue(u) => u.0.value(),
13082            }
13083        }
13084
13085        /// Gets the enum value as a string.
13086        ///
13087        /// Returns `None` if the enum contains an unknown value deserialized from
13088        /// the integer representation of enums.
13089        pub fn name(&self) -> std::option::Option<&str> {
13090            match self {
13091                Self::Unspecified => std::option::Option::Some("TECHNIQUE_UNSPECIFIED"),
13092                Self::DataObfuscation => std::option::Option::Some("DATA_OBFUSCATION"),
13093                Self::DataObfuscationSteganography => {
13094                    std::option::Option::Some("DATA_OBFUSCATION_STEGANOGRAPHY")
13095                }
13096                Self::OsCredentialDumping => std::option::Option::Some("OS_CREDENTIAL_DUMPING"),
13097                Self::OsCredentialDumpingProcFilesystem => {
13098                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM")
13099                }
13100                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => {
13101                    std::option::Option::Some("OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW")
13102                }
13103                Self::DataFromLocalSystem => std::option::Option::Some("DATA_FROM_LOCAL_SYSTEM"),
13104                Self::AutomatedExfiltration => std::option::Option::Some("AUTOMATED_EXFILTRATION"),
13105                Self::ObfuscatedFilesOrInfo => {
13106                    std::option::Option::Some("OBFUSCATED_FILES_OR_INFO")
13107                }
13108                Self::Steganography => std::option::Option::Some("STEGANOGRAPHY"),
13109                Self::CompileAfterDelivery => std::option::Option::Some("COMPILE_AFTER_DELIVERY"),
13110                Self::CommandObfuscation => std::option::Option::Some("COMMAND_OBFUSCATION"),
13111                Self::ScheduledTransfer => std::option::Option::Some("SCHEDULED_TRANSFER"),
13112                Self::SystemOwnerUserDiscovery => {
13113                    std::option::Option::Some("SYSTEM_OWNER_USER_DISCOVERY")
13114                }
13115                Self::Masquerading => std::option::Option::Some("MASQUERADING"),
13116                Self::MatchLegitimateNameOrLocation => {
13117                    std::option::Option::Some("MATCH_LEGITIMATE_NAME_OR_LOCATION")
13118                }
13119                Self::BootOrLogonInitializationScripts => {
13120                    std::option::Option::Some("BOOT_OR_LOGON_INITIALIZATION_SCRIPTS")
13121                }
13122                Self::StartupItems => std::option::Option::Some("STARTUP_ITEMS"),
13123                Self::NetworkServiceDiscovery => {
13124                    std::option::Option::Some("NETWORK_SERVICE_DISCOVERY")
13125                }
13126                Self::ScheduledTaskJob => std::option::Option::Some("SCHEDULED_TASK_JOB"),
13127                Self::ScheduledTaskJobCron => std::option::Option::Some("SCHEDULED_TASK_JOB_CRON"),
13128                Self::ContainerOrchestrationJob => {
13129                    std::option::Option::Some("CONTAINER_ORCHESTRATION_JOB")
13130                }
13131                Self::ProcessInjection => std::option::Option::Some("PROCESS_INJECTION"),
13132                Self::InputCapture => std::option::Option::Some("INPUT_CAPTURE"),
13133                Self::InputCaptureKeylogging => {
13134                    std::option::Option::Some("INPUT_CAPTURE_KEYLOGGING")
13135                }
13136                Self::ProcessDiscovery => std::option::Option::Some("PROCESS_DISCOVERY"),
13137                Self::CommandAndScriptingInterpreter => {
13138                    std::option::Option::Some("COMMAND_AND_SCRIPTING_INTERPRETER")
13139                }
13140                Self::UnixShell => std::option::Option::Some("UNIX_SHELL"),
13141                Self::Python => std::option::Option::Some("PYTHON"),
13142                Self::ExploitationForPrivilegeEscalation => {
13143                    std::option::Option::Some("EXPLOITATION_FOR_PRIVILEGE_ESCALATION")
13144                }
13145                Self::PermissionGroupsDiscovery => {
13146                    std::option::Option::Some("PERMISSION_GROUPS_DISCOVERY")
13147                }
13148                Self::CloudGroups => std::option::Option::Some("CLOUD_GROUPS"),
13149                Self::IndicatorRemoval => std::option::Option::Some("INDICATOR_REMOVAL"),
13150                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => {
13151                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS")
13152                }
13153                Self::IndicatorRemovalClearCommandHistory => {
13154                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY")
13155                }
13156                Self::IndicatorRemovalFileDeletion => {
13157                    std::option::Option::Some("INDICATOR_REMOVAL_FILE_DELETION")
13158                }
13159                Self::IndicatorRemovalTimestomp => {
13160                    std::option::Option::Some("INDICATOR_REMOVAL_TIMESTOMP")
13161                }
13162                Self::IndicatorRemovalClearMailboxData => {
13163                    std::option::Option::Some("INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA")
13164                }
13165                Self::ApplicationLayerProtocol => {
13166                    std::option::Option::Some("APPLICATION_LAYER_PROTOCOL")
13167                }
13168                Self::Dns => std::option::Option::Some("DNS"),
13169                Self::SoftwareDeploymentTools => {
13170                    std::option::Option::Some("SOFTWARE_DEPLOYMENT_TOOLS")
13171                }
13172                Self::ValidAccounts => std::option::Option::Some("VALID_ACCOUNTS"),
13173                Self::DefaultAccounts => std::option::Option::Some("DEFAULT_ACCOUNTS"),
13174                Self::LocalAccounts => std::option::Option::Some("LOCAL_ACCOUNTS"),
13175                Self::CloudAccounts => std::option::Option::Some("CLOUD_ACCOUNTS"),
13176                Self::FileAndDirectoryDiscovery => {
13177                    std::option::Option::Some("FILE_AND_DIRECTORY_DISCOVERY")
13178                }
13179                Self::AccountDiscoveryLocalAccount => {
13180                    std::option::Option::Some("ACCOUNT_DISCOVERY_LOCAL_ACCOUNT")
13181                }
13182                Self::Proxy => std::option::Option::Some("PROXY"),
13183                Self::ExternalProxy => std::option::Option::Some("EXTERNAL_PROXY"),
13184                Self::MultiHopProxy => std::option::Option::Some("MULTI_HOP_PROXY"),
13185                Self::AccountManipulation => std::option::Option::Some("ACCOUNT_MANIPULATION"),
13186                Self::AdditionalCloudCredentials => {
13187                    std::option::Option::Some("ADDITIONAL_CLOUD_CREDENTIALS")
13188                }
13189                Self::AdditionalCloudRoles => std::option::Option::Some("ADDITIONAL_CLOUD_ROLES"),
13190                Self::SshAuthorizedKeys => std::option::Option::Some("SSH_AUTHORIZED_KEYS"),
13191                Self::AdditionalContainerClusterRoles => {
13192                    std::option::Option::Some("ADDITIONAL_CONTAINER_CLUSTER_ROLES")
13193                }
13194                Self::MultiStageChannels => std::option::Option::Some("MULTI_STAGE_CHANNELS"),
13195                Self::IngressToolTransfer => std::option::Option::Some("INGRESS_TOOL_TRANSFER"),
13196                Self::NativeApi => std::option::Option::Some("NATIVE_API"),
13197                Self::BruteForce => std::option::Option::Some("BRUTE_FORCE"),
13198                Self::AutomatedCollection => std::option::Option::Some("AUTOMATED_COLLECTION"),
13199                Self::SharedModules => std::option::Option::Some("SHARED_MODULES"),
13200                Self::DataEncoding => std::option::Option::Some("DATA_ENCODING"),
13201                Self::StandardEncoding => std::option::Option::Some("STANDARD_ENCODING"),
13202                Self::AccessTokenManipulation => {
13203                    std::option::Option::Some("ACCESS_TOKEN_MANIPULATION")
13204                }
13205                Self::TokenImpersonationOrTheft => {
13206                    std::option::Option::Some("TOKEN_IMPERSONATION_OR_THEFT")
13207                }
13208                Self::CreateAccount => std::option::Option::Some("CREATE_ACCOUNT"),
13209                Self::LocalAccount => std::option::Option::Some("LOCAL_ACCOUNT"),
13210                Self::DeobfuscateDecodeFilesOrInfo => {
13211                    std::option::Option::Some("DEOBFUSCATE_DECODE_FILES_OR_INFO")
13212                }
13213                Self::ExploitPublicFacingApplication => {
13214                    std::option::Option::Some("EXPLOIT_PUBLIC_FACING_APPLICATION")
13215                }
13216                Self::SupplyChainCompromise => std::option::Option::Some("SUPPLY_CHAIN_COMPROMISE"),
13217                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
13218                    std::option::Option::Some(
13219                        "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS",
13220                    )
13221                }
13222                Self::ExploitationForClientExecution => {
13223                    std::option::Option::Some("EXPLOITATION_FOR_CLIENT_EXECUTION")
13224                }
13225                Self::UserExecution => std::option::Option::Some("USER_EXECUTION"),
13226                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
13227                    std::option::Option::Some(
13228                        "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION",
13229                    )
13230                }
13231                Self::DomainPolicyModification => {
13232                    std::option::Option::Some("DOMAIN_POLICY_MODIFICATION")
13233                }
13234                Self::DataDestruction => std::option::Option::Some("DATA_DESTRUCTION"),
13235                Self::DataEncryptedForImpact => {
13236                    std::option::Option::Some("DATA_ENCRYPTED_FOR_IMPACT")
13237                }
13238                Self::ServiceStop => std::option::Option::Some("SERVICE_STOP"),
13239                Self::InhibitSystemRecovery => std::option::Option::Some("INHIBIT_SYSTEM_RECOVERY"),
13240                Self::FirmwareCorruption => std::option::Option::Some("FIRMWARE_CORRUPTION"),
13241                Self::ResourceHijacking => std::option::Option::Some("RESOURCE_HIJACKING"),
13242                Self::NetworkDenialOfService => {
13243                    std::option::Option::Some("NETWORK_DENIAL_OF_SERVICE")
13244                }
13245                Self::CloudServiceDiscovery => std::option::Option::Some("CLOUD_SERVICE_DISCOVERY"),
13246                Self::StealApplicationAccessToken => {
13247                    std::option::Option::Some("STEAL_APPLICATION_ACCESS_TOKEN")
13248                }
13249                Self::AccountAccessRemoval => std::option::Option::Some("ACCOUNT_ACCESS_REMOVAL"),
13250                Self::TransferDataToCloudAccount => {
13251                    std::option::Option::Some("TRANSFER_DATA_TO_CLOUD_ACCOUNT")
13252                }
13253                Self::StealWebSessionCookie => {
13254                    std::option::Option::Some("STEAL_WEB_SESSION_COOKIE")
13255                }
13256                Self::CreateOrModifySystemProcess => {
13257                    std::option::Option::Some("CREATE_OR_MODIFY_SYSTEM_PROCESS")
13258                }
13259                Self::EventTriggeredExecution => {
13260                    std::option::Option::Some("EVENT_TRIGGERED_EXECUTION")
13261                }
13262                Self::BootOrLogonAutostartExecution => {
13263                    std::option::Option::Some("BOOT_OR_LOGON_AUTOSTART_EXECUTION")
13264                }
13265                Self::KernelModulesAndExtensions => {
13266                    std::option::Option::Some("KERNEL_MODULES_AND_EXTENSIONS")
13267                }
13268                Self::ShortcutModification => std::option::Option::Some("SHORTCUT_MODIFICATION"),
13269                Self::AbuseElevationControlMechanism => {
13270                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM")
13271                }
13272                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
13273                    std::option::Option::Some("ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID")
13274                }
13275                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
13276                    std::option::Option::Some(
13277                        "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING",
13278                    )
13279                }
13280                Self::UnsecuredCredentials => std::option::Option::Some("UNSECURED_CREDENTIALS"),
13281                Self::CredentialsInFiles => std::option::Option::Some("CREDENTIALS_IN_FILES"),
13282                Self::BashHistory => std::option::Option::Some("BASH_HISTORY"),
13283                Self::PrivateKeys => std::option::Option::Some("PRIVATE_KEYS"),
13284                Self::SubvertTrustControl => std::option::Option::Some("SUBVERT_TRUST_CONTROL"),
13285                Self::InstallRootCertificate => {
13286                    std::option::Option::Some("INSTALL_ROOT_CERTIFICATE")
13287                }
13288                Self::CompromiseHostSoftwareBinary => {
13289                    std::option::Option::Some("COMPROMISE_HOST_SOFTWARE_BINARY")
13290                }
13291                Self::CredentialsFromPasswordStores => {
13292                    std::option::Option::Some("CREDENTIALS_FROM_PASSWORD_STORES")
13293                }
13294                Self::ModifyAuthenticationProcess => {
13295                    std::option::Option::Some("MODIFY_AUTHENTICATION_PROCESS")
13296                }
13297                Self::PluggableAuthenticationModules => {
13298                    std::option::Option::Some("PLUGGABLE_AUTHENTICATION_MODULES")
13299                }
13300                Self::MultiFactorAuthentication => {
13301                    std::option::Option::Some("MULTI_FACTOR_AUTHENTICATION")
13302                }
13303                Self::ImpairDefenses => std::option::Option::Some("IMPAIR_DEFENSES"),
13304                Self::DisableOrModifyTools => std::option::Option::Some("DISABLE_OR_MODIFY_TOOLS"),
13305                Self::IndicatorBlocking => std::option::Option::Some("INDICATOR_BLOCKING"),
13306                Self::DisableOrModifyLinuxAuditSystem => {
13307                    std::option::Option::Some("DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM")
13308                }
13309                Self::HideArtifacts => std::option::Option::Some("HIDE_ARTIFACTS"),
13310                Self::HiddenFilesAndDirectories => {
13311                    std::option::Option::Some("HIDDEN_FILES_AND_DIRECTORIES")
13312                }
13313                Self::HiddenUsers => std::option::Option::Some("HIDDEN_USERS"),
13314                Self::ExfiltrationOverWebService => {
13315                    std::option::Option::Some("EXFILTRATION_OVER_WEB_SERVICE")
13316                }
13317                Self::ExfiltrationToCloudStorage => {
13318                    std::option::Option::Some("EXFILTRATION_TO_CLOUD_STORAGE")
13319                }
13320                Self::DynamicResolution => std::option::Option::Some("DYNAMIC_RESOLUTION"),
13321                Self::LateralToolTransfer => std::option::Option::Some("LATERAL_TOOL_TRANSFER"),
13322                Self::HijackExecutionFlow => std::option::Option::Some("HIJACK_EXECUTION_FLOW"),
13323                Self::HijackExecutionFlowDynamicLinkerHijacking => {
13324                    std::option::Option::Some("HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING")
13325                }
13326                Self::ModifyCloudComputeInfrastructure => {
13327                    std::option::Option::Some("MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE")
13328                }
13329                Self::CreateSnapshot => std::option::Option::Some("CREATE_SNAPSHOT"),
13330                Self::CloudInfrastructureDiscovery => {
13331                    std::option::Option::Some("CLOUD_INFRASTRUCTURE_DISCOVERY")
13332                }
13333                Self::DevelopCapabilities => std::option::Option::Some("DEVELOP_CAPABILITIES"),
13334                Self::DevelopCapabilitiesMalware => {
13335                    std::option::Option::Some("DEVELOP_CAPABILITIES_MALWARE")
13336                }
13337                Self::ObtainCapabilities => std::option::Option::Some("OBTAIN_CAPABILITIES"),
13338                Self::ObtainCapabilitiesMalware => {
13339                    std::option::Option::Some("OBTAIN_CAPABILITIES_MALWARE")
13340                }
13341                Self::ObtainCapabilitiesVulnerabilities => {
13342                    std::option::Option::Some("OBTAIN_CAPABILITIES_VULNERABILITIES")
13343                }
13344                Self::ActiveScanning => std::option::Option::Some("ACTIVE_SCANNING"),
13345                Self::ScanningIpBlocks => std::option::Option::Some("SCANNING_IP_BLOCKS"),
13346                Self::StageCapabilities => std::option::Option::Some("STAGE_CAPABILITIES"),
13347                Self::UploadMalware => std::option::Option::Some("UPLOAD_MALWARE"),
13348                Self::ContainerAdministrationCommand => {
13349                    std::option::Option::Some("CONTAINER_ADMINISTRATION_COMMAND")
13350                }
13351                Self::DeployContainer => std::option::Option::Some("DEPLOY_CONTAINER"),
13352                Self::EscapeToHost => std::option::Option::Some("ESCAPE_TO_HOST"),
13353                Self::ContainerAndResourceDiscovery => {
13354                    std::option::Option::Some("CONTAINER_AND_RESOURCE_DISCOVERY")
13355                }
13356                Self::ReflectiveCodeLoading => std::option::Option::Some("REFLECTIVE_CODE_LOADING"),
13357                Self::StealOrForgeAuthenticationCertificates => {
13358                    std::option::Option::Some("STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES")
13359                }
13360                Self::FinancialTheft => std::option::Option::Some("FINANCIAL_THEFT"),
13361                Self::UnknownValue(u) => u.0.name(),
13362            }
13363        }
13364    }
13365
13366    impl std::default::Default for Technique {
13367        fn default() -> Self {
13368            use std::convert::From;
13369            Self::from(0)
13370        }
13371    }
13372
13373    impl std::fmt::Display for Technique {
13374        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13375            wkt::internal::display_enum(f, self.name(), self.value())
13376        }
13377    }
13378
13379    impl std::convert::From<i32> for Technique {
13380        fn from(value: i32) -> Self {
13381            match value {
13382                0 => Self::Unspecified,
13383                1 => Self::ActiveScanning,
13384                2 => Self::ScanningIpBlocks,
13385                3 => Self::IngressToolTransfer,
13386                4 => Self::NativeApi,
13387                5 => Self::SharedModules,
13388                6 => Self::CommandAndScriptingInterpreter,
13389                7 => Self::UnixShell,
13390                8 => Self::ResourceHijacking,
13391                9 => Self::Proxy,
13392                10 => Self::ExternalProxy,
13393                11 => Self::MultiHopProxy,
13394                12 => Self::DynamicResolution,
13395                13 => Self::UnsecuredCredentials,
13396                14 => Self::ValidAccounts,
13397                15 => Self::LocalAccounts,
13398                16 => Self::CloudAccounts,
13399                17 => Self::NetworkDenialOfService,
13400                18 => Self::PermissionGroupsDiscovery,
13401                19 => Self::CloudGroups,
13402                20 => Self::ExfiltrationOverWebService,
13403                21 => Self::ExfiltrationToCloudStorage,
13404                22 => Self::AccountManipulation,
13405                23 => Self::SshAuthorizedKeys,
13406                24 => Self::CreateOrModifySystemProcess,
13407                25 => Self::StealWebSessionCookie,
13408                26 => Self::ModifyCloudComputeInfrastructure,
13409                27 => Self::ExploitPublicFacingApplication,
13410                28 => Self::ModifyAuthenticationProcess,
13411                29 => Self::DataDestruction,
13412                30 => Self::DomainPolicyModification,
13413                31 => Self::ImpairDefenses,
13414                32 => Self::NetworkServiceDiscovery,
13415                33 => Self::AccessTokenManipulation,
13416                34 => Self::AbuseElevationControlMechanism,
13417                35 => Self::DefaultAccounts,
13418                36 => Self::InhibitSystemRecovery,
13419                37 => Self::BootOrLogonInitializationScripts,
13420                38 => Self::StartupItems,
13421                39 => Self::TokenImpersonationOrTheft,
13422                40 => Self::AdditionalCloudCredentials,
13423                41 => Self::LateralToolTransfer,
13424                42 => Self::StealApplicationAccessToken,
13425                43 => Self::ObtainCapabilities,
13426                44 => Self::BruteForce,
13427                45 => Self::ApplicationLayerProtocol,
13428                46 => Self::Dns,
13429                47 => Self::SoftwareDeploymentTools,
13430                48 => Self::CloudServiceDiscovery,
13431                49 => Self::Masquerading,
13432                50 => Self::MatchLegitimateNameOrLocation,
13433                51 => Self::AccountAccessRemoval,
13434                52 => Self::ServiceStop,
13435                53 => Self::CloudInfrastructureDiscovery,
13436                54 => Self::CreateSnapshot,
13437                55 => Self::DisableOrModifyTools,
13438                56 => Self::ProcessDiscovery,
13439                57 => Self::ContainerAndResourceDiscovery,
13440                58 => Self::AdditionalContainerClusterRoles,
13441                59 => Self::Python,
13442                60 => Self::ContainerAdministrationCommand,
13443                61 => Self::EscapeToHost,
13444                62 => Self::StealOrForgeAuthenticationCertificates,
13445                63 => Self::ExploitationForPrivilegeEscalation,
13446                64 => Self::IndicatorRemovalFileDeletion,
13447                65 => Self::EventTriggeredExecution,
13448                66 => Self::DeployContainer,
13449                67 => Self::AdditionalCloudRoles,
13450                68 => Self::AutomatedExfiltration,
13451                69 => Self::UserExecution,
13452                70 => Self::DataObfuscation,
13453                71 => Self::DataObfuscationSteganography,
13454                72 => Self::ObfuscatedFilesOrInfo,
13455                73 => Self::Steganography,
13456                74 => Self::CompileAfterDelivery,
13457                75 => Self::CommandObfuscation,
13458                76 => Self::MultiStageChannels,
13459                77 => Self::DataEncoding,
13460                78 => Self::StandardEncoding,
13461                79 => Self::CreateAccount,
13462                80 => Self::LocalAccount,
13463                81 => Self::FirmwareCorruption,
13464                82 => Self::BootOrLogonAutostartExecution,
13465                83 => Self::KernelModulesAndExtensions,
13466                84 => Self::CompromiseHostSoftwareBinary,
13467                85 => Self::HideArtifacts,
13468                86 => Self::HiddenFilesAndDirectories,
13469                87 => Self::HiddenUsers,
13470                88 => Self::StageCapabilities,
13471                89 => Self::ScheduledTaskJob,
13472                90 => Self::ContainerOrchestrationJob,
13473                91 => Self::TransferDataToCloudAccount,
13474                92 => Self::ReflectiveCodeLoading,
13475                93 => Self::ProcessInjection,
13476                94 => Self::AutomatedCollection,
13477                95 => Self::DeobfuscateDecodeFilesOrInfo,
13478                96 => Self::BashHistory,
13479                97 => Self::PrivateKeys,
13480                98 => Self::CredentialsFromPasswordStores,
13481                99 => Self::DevelopCapabilities,
13482                100 => Self::DevelopCapabilitiesMalware,
13483                101 => Self::ObtainCapabilitiesMalware,
13484                102 => Self::UploadMalware,
13485                103 => Self::InputCapture,
13486                104 => Self::InputCaptureKeylogging,
13487                105 => Self::CredentialsInFiles,
13488                106 => Self::SubvertTrustControl,
13489                107 => Self::InstallRootCertificate,
13490                108 => Self::PluggableAuthenticationModules,
13491                109 => Self::AbuseElevationControlMechanismSudoAndSudoCaching,
13492                110 => Self::IndicatorBlocking,
13493                111 => Self::DisableOrModifyLinuxAuditSystem,
13494                112 => Self::HijackExecutionFlow,
13495                113 => Self::HijackExecutionFlowDynamicLinkerHijacking,
13496                114 => Self::OsCredentialDumping,
13497                115 => Self::OsCredentialDumpingProcFilesystem,
13498                116 => Self::AccountDiscoveryLocalAccount,
13499                117 => Self::DataFromLocalSystem,
13500                118 => Self::SystemOwnerUserDiscovery,
13501                119 => Self::ScheduledTaskJobCron,
13502                120 => Self::ScheduledTransfer,
13503                121 => Self::FileAndDirectoryDiscovery,
13504                122 => Self::OsCredentialDumpingEtcPasswordAndEtcShadow,
13505                123 => Self::IndicatorRemoval,
13506                124 => Self::IndicatorRemovalClearLinuxOrMacSystemLogs,
13507                125 => Self::IndicatorRemovalClearCommandHistory,
13508                126 => Self::IndicatorRemovalClearMailboxData,
13509                127 => Self::ShortcutModification,
13510                128 => Self::IndicatorRemovalTimestomp,
13511                129 => Self::SupplyChainCompromise,
13512                130 => Self::CompromiseSoftwareDependenciesAndDevelopmentTools,
13513                131 => Self::FinancialTheft,
13514                132 => Self::DataEncryptedForImpact,
13515                133 => Self::ObtainCapabilitiesVulnerabilities,
13516                134 => Self::ExploitationForClientExecution,
13517                135 => Self::LinuxAndMacFileAndDirectoryPermissionsModification,
13518                136 => Self::AbuseElevationControlMechanismSetuidAndSetgid,
13519                137 => Self::MultiFactorAuthentication,
13520                _ => Self::UnknownValue(technique::UnknownValue(
13521                    wkt::internal::UnknownEnumValue::Integer(value),
13522                )),
13523            }
13524        }
13525    }
13526
13527    impl std::convert::From<&str> for Technique {
13528        fn from(value: &str) -> Self {
13529            use std::string::ToString;
13530            match value {
13531                "TECHNIQUE_UNSPECIFIED" => Self::Unspecified,
13532                "DATA_OBFUSCATION" => Self::DataObfuscation,
13533                "DATA_OBFUSCATION_STEGANOGRAPHY" => Self::DataObfuscationSteganography,
13534                "OS_CREDENTIAL_DUMPING" => Self::OsCredentialDumping,
13535                "OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM" => Self::OsCredentialDumpingProcFilesystem,
13536                "OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW" => {
13537                    Self::OsCredentialDumpingEtcPasswordAndEtcShadow
13538                }
13539                "DATA_FROM_LOCAL_SYSTEM" => Self::DataFromLocalSystem,
13540                "AUTOMATED_EXFILTRATION" => Self::AutomatedExfiltration,
13541                "OBFUSCATED_FILES_OR_INFO" => Self::ObfuscatedFilesOrInfo,
13542                "STEGANOGRAPHY" => Self::Steganography,
13543                "COMPILE_AFTER_DELIVERY" => Self::CompileAfterDelivery,
13544                "COMMAND_OBFUSCATION" => Self::CommandObfuscation,
13545                "SCHEDULED_TRANSFER" => Self::ScheduledTransfer,
13546                "SYSTEM_OWNER_USER_DISCOVERY" => Self::SystemOwnerUserDiscovery,
13547                "MASQUERADING" => Self::Masquerading,
13548                "MATCH_LEGITIMATE_NAME_OR_LOCATION" => Self::MatchLegitimateNameOrLocation,
13549                "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" => Self::BootOrLogonInitializationScripts,
13550                "STARTUP_ITEMS" => Self::StartupItems,
13551                "NETWORK_SERVICE_DISCOVERY" => Self::NetworkServiceDiscovery,
13552                "SCHEDULED_TASK_JOB" => Self::ScheduledTaskJob,
13553                "SCHEDULED_TASK_JOB_CRON" => Self::ScheduledTaskJobCron,
13554                "CONTAINER_ORCHESTRATION_JOB" => Self::ContainerOrchestrationJob,
13555                "PROCESS_INJECTION" => Self::ProcessInjection,
13556                "INPUT_CAPTURE" => Self::InputCapture,
13557                "INPUT_CAPTURE_KEYLOGGING" => Self::InputCaptureKeylogging,
13558                "PROCESS_DISCOVERY" => Self::ProcessDiscovery,
13559                "COMMAND_AND_SCRIPTING_INTERPRETER" => Self::CommandAndScriptingInterpreter,
13560                "UNIX_SHELL" => Self::UnixShell,
13561                "PYTHON" => Self::Python,
13562                "EXPLOITATION_FOR_PRIVILEGE_ESCALATION" => Self::ExploitationForPrivilegeEscalation,
13563                "PERMISSION_GROUPS_DISCOVERY" => Self::PermissionGroupsDiscovery,
13564                "CLOUD_GROUPS" => Self::CloudGroups,
13565                "INDICATOR_REMOVAL" => Self::IndicatorRemoval,
13566                "INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS" => {
13567                    Self::IndicatorRemovalClearLinuxOrMacSystemLogs
13568                }
13569                "INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY" => {
13570                    Self::IndicatorRemovalClearCommandHistory
13571                }
13572                "INDICATOR_REMOVAL_FILE_DELETION" => Self::IndicatorRemovalFileDeletion,
13573                "INDICATOR_REMOVAL_TIMESTOMP" => Self::IndicatorRemovalTimestomp,
13574                "INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA" => Self::IndicatorRemovalClearMailboxData,
13575                "APPLICATION_LAYER_PROTOCOL" => Self::ApplicationLayerProtocol,
13576                "DNS" => Self::Dns,
13577                "SOFTWARE_DEPLOYMENT_TOOLS" => Self::SoftwareDeploymentTools,
13578                "VALID_ACCOUNTS" => Self::ValidAccounts,
13579                "DEFAULT_ACCOUNTS" => Self::DefaultAccounts,
13580                "LOCAL_ACCOUNTS" => Self::LocalAccounts,
13581                "CLOUD_ACCOUNTS" => Self::CloudAccounts,
13582                "FILE_AND_DIRECTORY_DISCOVERY" => Self::FileAndDirectoryDiscovery,
13583                "ACCOUNT_DISCOVERY_LOCAL_ACCOUNT" => Self::AccountDiscoveryLocalAccount,
13584                "PROXY" => Self::Proxy,
13585                "EXTERNAL_PROXY" => Self::ExternalProxy,
13586                "MULTI_HOP_PROXY" => Self::MultiHopProxy,
13587                "ACCOUNT_MANIPULATION" => Self::AccountManipulation,
13588                "ADDITIONAL_CLOUD_CREDENTIALS" => Self::AdditionalCloudCredentials,
13589                "ADDITIONAL_CLOUD_ROLES" => Self::AdditionalCloudRoles,
13590                "SSH_AUTHORIZED_KEYS" => Self::SshAuthorizedKeys,
13591                "ADDITIONAL_CONTAINER_CLUSTER_ROLES" => Self::AdditionalContainerClusterRoles,
13592                "MULTI_STAGE_CHANNELS" => Self::MultiStageChannels,
13593                "INGRESS_TOOL_TRANSFER" => Self::IngressToolTransfer,
13594                "NATIVE_API" => Self::NativeApi,
13595                "BRUTE_FORCE" => Self::BruteForce,
13596                "AUTOMATED_COLLECTION" => Self::AutomatedCollection,
13597                "SHARED_MODULES" => Self::SharedModules,
13598                "DATA_ENCODING" => Self::DataEncoding,
13599                "STANDARD_ENCODING" => Self::StandardEncoding,
13600                "ACCESS_TOKEN_MANIPULATION" => Self::AccessTokenManipulation,
13601                "TOKEN_IMPERSONATION_OR_THEFT" => Self::TokenImpersonationOrTheft,
13602                "CREATE_ACCOUNT" => Self::CreateAccount,
13603                "LOCAL_ACCOUNT" => Self::LocalAccount,
13604                "DEOBFUSCATE_DECODE_FILES_OR_INFO" => Self::DeobfuscateDecodeFilesOrInfo,
13605                "EXPLOIT_PUBLIC_FACING_APPLICATION" => Self::ExploitPublicFacingApplication,
13606                "SUPPLY_CHAIN_COMPROMISE" => Self::SupplyChainCompromise,
13607                "COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS" => {
13608                    Self::CompromiseSoftwareDependenciesAndDevelopmentTools
13609                }
13610                "EXPLOITATION_FOR_CLIENT_EXECUTION" => Self::ExploitationForClientExecution,
13611                "USER_EXECUTION" => Self::UserExecution,
13612                "LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION" => {
13613                    Self::LinuxAndMacFileAndDirectoryPermissionsModification
13614                }
13615                "DOMAIN_POLICY_MODIFICATION" => Self::DomainPolicyModification,
13616                "DATA_DESTRUCTION" => Self::DataDestruction,
13617                "DATA_ENCRYPTED_FOR_IMPACT" => Self::DataEncryptedForImpact,
13618                "SERVICE_STOP" => Self::ServiceStop,
13619                "INHIBIT_SYSTEM_RECOVERY" => Self::InhibitSystemRecovery,
13620                "FIRMWARE_CORRUPTION" => Self::FirmwareCorruption,
13621                "RESOURCE_HIJACKING" => Self::ResourceHijacking,
13622                "NETWORK_DENIAL_OF_SERVICE" => Self::NetworkDenialOfService,
13623                "CLOUD_SERVICE_DISCOVERY" => Self::CloudServiceDiscovery,
13624                "STEAL_APPLICATION_ACCESS_TOKEN" => Self::StealApplicationAccessToken,
13625                "ACCOUNT_ACCESS_REMOVAL" => Self::AccountAccessRemoval,
13626                "TRANSFER_DATA_TO_CLOUD_ACCOUNT" => Self::TransferDataToCloudAccount,
13627                "STEAL_WEB_SESSION_COOKIE" => Self::StealWebSessionCookie,
13628                "CREATE_OR_MODIFY_SYSTEM_PROCESS" => Self::CreateOrModifySystemProcess,
13629                "EVENT_TRIGGERED_EXECUTION" => Self::EventTriggeredExecution,
13630                "BOOT_OR_LOGON_AUTOSTART_EXECUTION" => Self::BootOrLogonAutostartExecution,
13631                "KERNEL_MODULES_AND_EXTENSIONS" => Self::KernelModulesAndExtensions,
13632                "SHORTCUT_MODIFICATION" => Self::ShortcutModification,
13633                "ABUSE_ELEVATION_CONTROL_MECHANISM" => Self::AbuseElevationControlMechanism,
13634                "ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID" => {
13635                    Self::AbuseElevationControlMechanismSetuidAndSetgid
13636                }
13637                "ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING" => {
13638                    Self::AbuseElevationControlMechanismSudoAndSudoCaching
13639                }
13640                "UNSECURED_CREDENTIALS" => Self::UnsecuredCredentials,
13641                "CREDENTIALS_IN_FILES" => Self::CredentialsInFiles,
13642                "BASH_HISTORY" => Self::BashHistory,
13643                "PRIVATE_KEYS" => Self::PrivateKeys,
13644                "SUBVERT_TRUST_CONTROL" => Self::SubvertTrustControl,
13645                "INSTALL_ROOT_CERTIFICATE" => Self::InstallRootCertificate,
13646                "COMPROMISE_HOST_SOFTWARE_BINARY" => Self::CompromiseHostSoftwareBinary,
13647                "CREDENTIALS_FROM_PASSWORD_STORES" => Self::CredentialsFromPasswordStores,
13648                "MODIFY_AUTHENTICATION_PROCESS" => Self::ModifyAuthenticationProcess,
13649                "PLUGGABLE_AUTHENTICATION_MODULES" => Self::PluggableAuthenticationModules,
13650                "MULTI_FACTOR_AUTHENTICATION" => Self::MultiFactorAuthentication,
13651                "IMPAIR_DEFENSES" => Self::ImpairDefenses,
13652                "DISABLE_OR_MODIFY_TOOLS" => Self::DisableOrModifyTools,
13653                "INDICATOR_BLOCKING" => Self::IndicatorBlocking,
13654                "DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM" => Self::DisableOrModifyLinuxAuditSystem,
13655                "HIDE_ARTIFACTS" => Self::HideArtifacts,
13656                "HIDDEN_FILES_AND_DIRECTORIES" => Self::HiddenFilesAndDirectories,
13657                "HIDDEN_USERS" => Self::HiddenUsers,
13658                "EXFILTRATION_OVER_WEB_SERVICE" => Self::ExfiltrationOverWebService,
13659                "EXFILTRATION_TO_CLOUD_STORAGE" => Self::ExfiltrationToCloudStorage,
13660                "DYNAMIC_RESOLUTION" => Self::DynamicResolution,
13661                "LATERAL_TOOL_TRANSFER" => Self::LateralToolTransfer,
13662                "HIJACK_EXECUTION_FLOW" => Self::HijackExecutionFlow,
13663                "HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING" => {
13664                    Self::HijackExecutionFlowDynamicLinkerHijacking
13665                }
13666                "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" => Self::ModifyCloudComputeInfrastructure,
13667                "CREATE_SNAPSHOT" => Self::CreateSnapshot,
13668                "CLOUD_INFRASTRUCTURE_DISCOVERY" => Self::CloudInfrastructureDiscovery,
13669                "DEVELOP_CAPABILITIES" => Self::DevelopCapabilities,
13670                "DEVELOP_CAPABILITIES_MALWARE" => Self::DevelopCapabilitiesMalware,
13671                "OBTAIN_CAPABILITIES" => Self::ObtainCapabilities,
13672                "OBTAIN_CAPABILITIES_MALWARE" => Self::ObtainCapabilitiesMalware,
13673                "OBTAIN_CAPABILITIES_VULNERABILITIES" => Self::ObtainCapabilitiesVulnerabilities,
13674                "ACTIVE_SCANNING" => Self::ActiveScanning,
13675                "SCANNING_IP_BLOCKS" => Self::ScanningIpBlocks,
13676                "STAGE_CAPABILITIES" => Self::StageCapabilities,
13677                "UPLOAD_MALWARE" => Self::UploadMalware,
13678                "CONTAINER_ADMINISTRATION_COMMAND" => Self::ContainerAdministrationCommand,
13679                "DEPLOY_CONTAINER" => Self::DeployContainer,
13680                "ESCAPE_TO_HOST" => Self::EscapeToHost,
13681                "CONTAINER_AND_RESOURCE_DISCOVERY" => Self::ContainerAndResourceDiscovery,
13682                "REFLECTIVE_CODE_LOADING" => Self::ReflectiveCodeLoading,
13683                "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES" => {
13684                    Self::StealOrForgeAuthenticationCertificates
13685                }
13686                "FINANCIAL_THEFT" => Self::FinancialTheft,
13687                _ => Self::UnknownValue(technique::UnknownValue(
13688                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13689                )),
13690            }
13691        }
13692    }
13693
13694    impl serde::ser::Serialize for Technique {
13695        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13696        where
13697            S: serde::Serializer,
13698        {
13699            match self {
13700                Self::Unspecified => serializer.serialize_i32(0),
13701                Self::DataObfuscation => serializer.serialize_i32(70),
13702                Self::DataObfuscationSteganography => serializer.serialize_i32(71),
13703                Self::OsCredentialDumping => serializer.serialize_i32(114),
13704                Self::OsCredentialDumpingProcFilesystem => serializer.serialize_i32(115),
13705                Self::OsCredentialDumpingEtcPasswordAndEtcShadow => serializer.serialize_i32(122),
13706                Self::DataFromLocalSystem => serializer.serialize_i32(117),
13707                Self::AutomatedExfiltration => serializer.serialize_i32(68),
13708                Self::ObfuscatedFilesOrInfo => serializer.serialize_i32(72),
13709                Self::Steganography => serializer.serialize_i32(73),
13710                Self::CompileAfterDelivery => serializer.serialize_i32(74),
13711                Self::CommandObfuscation => serializer.serialize_i32(75),
13712                Self::ScheduledTransfer => serializer.serialize_i32(120),
13713                Self::SystemOwnerUserDiscovery => serializer.serialize_i32(118),
13714                Self::Masquerading => serializer.serialize_i32(49),
13715                Self::MatchLegitimateNameOrLocation => serializer.serialize_i32(50),
13716                Self::BootOrLogonInitializationScripts => serializer.serialize_i32(37),
13717                Self::StartupItems => serializer.serialize_i32(38),
13718                Self::NetworkServiceDiscovery => serializer.serialize_i32(32),
13719                Self::ScheduledTaskJob => serializer.serialize_i32(89),
13720                Self::ScheduledTaskJobCron => serializer.serialize_i32(119),
13721                Self::ContainerOrchestrationJob => serializer.serialize_i32(90),
13722                Self::ProcessInjection => serializer.serialize_i32(93),
13723                Self::InputCapture => serializer.serialize_i32(103),
13724                Self::InputCaptureKeylogging => serializer.serialize_i32(104),
13725                Self::ProcessDiscovery => serializer.serialize_i32(56),
13726                Self::CommandAndScriptingInterpreter => serializer.serialize_i32(6),
13727                Self::UnixShell => serializer.serialize_i32(7),
13728                Self::Python => serializer.serialize_i32(59),
13729                Self::ExploitationForPrivilegeEscalation => serializer.serialize_i32(63),
13730                Self::PermissionGroupsDiscovery => serializer.serialize_i32(18),
13731                Self::CloudGroups => serializer.serialize_i32(19),
13732                Self::IndicatorRemoval => serializer.serialize_i32(123),
13733                Self::IndicatorRemovalClearLinuxOrMacSystemLogs => serializer.serialize_i32(124),
13734                Self::IndicatorRemovalClearCommandHistory => serializer.serialize_i32(125),
13735                Self::IndicatorRemovalFileDeletion => serializer.serialize_i32(64),
13736                Self::IndicatorRemovalTimestomp => serializer.serialize_i32(128),
13737                Self::IndicatorRemovalClearMailboxData => serializer.serialize_i32(126),
13738                Self::ApplicationLayerProtocol => serializer.serialize_i32(45),
13739                Self::Dns => serializer.serialize_i32(46),
13740                Self::SoftwareDeploymentTools => serializer.serialize_i32(47),
13741                Self::ValidAccounts => serializer.serialize_i32(14),
13742                Self::DefaultAccounts => serializer.serialize_i32(35),
13743                Self::LocalAccounts => serializer.serialize_i32(15),
13744                Self::CloudAccounts => serializer.serialize_i32(16),
13745                Self::FileAndDirectoryDiscovery => serializer.serialize_i32(121),
13746                Self::AccountDiscoveryLocalAccount => serializer.serialize_i32(116),
13747                Self::Proxy => serializer.serialize_i32(9),
13748                Self::ExternalProxy => serializer.serialize_i32(10),
13749                Self::MultiHopProxy => serializer.serialize_i32(11),
13750                Self::AccountManipulation => serializer.serialize_i32(22),
13751                Self::AdditionalCloudCredentials => serializer.serialize_i32(40),
13752                Self::AdditionalCloudRoles => serializer.serialize_i32(67),
13753                Self::SshAuthorizedKeys => serializer.serialize_i32(23),
13754                Self::AdditionalContainerClusterRoles => serializer.serialize_i32(58),
13755                Self::MultiStageChannels => serializer.serialize_i32(76),
13756                Self::IngressToolTransfer => serializer.serialize_i32(3),
13757                Self::NativeApi => serializer.serialize_i32(4),
13758                Self::BruteForce => serializer.serialize_i32(44),
13759                Self::AutomatedCollection => serializer.serialize_i32(94),
13760                Self::SharedModules => serializer.serialize_i32(5),
13761                Self::DataEncoding => serializer.serialize_i32(77),
13762                Self::StandardEncoding => serializer.serialize_i32(78),
13763                Self::AccessTokenManipulation => serializer.serialize_i32(33),
13764                Self::TokenImpersonationOrTheft => serializer.serialize_i32(39),
13765                Self::CreateAccount => serializer.serialize_i32(79),
13766                Self::LocalAccount => serializer.serialize_i32(80),
13767                Self::DeobfuscateDecodeFilesOrInfo => serializer.serialize_i32(95),
13768                Self::ExploitPublicFacingApplication => serializer.serialize_i32(27),
13769                Self::SupplyChainCompromise => serializer.serialize_i32(129),
13770                Self::CompromiseSoftwareDependenciesAndDevelopmentTools => {
13771                    serializer.serialize_i32(130)
13772                }
13773                Self::ExploitationForClientExecution => serializer.serialize_i32(134),
13774                Self::UserExecution => serializer.serialize_i32(69),
13775                Self::LinuxAndMacFileAndDirectoryPermissionsModification => {
13776                    serializer.serialize_i32(135)
13777                }
13778                Self::DomainPolicyModification => serializer.serialize_i32(30),
13779                Self::DataDestruction => serializer.serialize_i32(29),
13780                Self::DataEncryptedForImpact => serializer.serialize_i32(132),
13781                Self::ServiceStop => serializer.serialize_i32(52),
13782                Self::InhibitSystemRecovery => serializer.serialize_i32(36),
13783                Self::FirmwareCorruption => serializer.serialize_i32(81),
13784                Self::ResourceHijacking => serializer.serialize_i32(8),
13785                Self::NetworkDenialOfService => serializer.serialize_i32(17),
13786                Self::CloudServiceDiscovery => serializer.serialize_i32(48),
13787                Self::StealApplicationAccessToken => serializer.serialize_i32(42),
13788                Self::AccountAccessRemoval => serializer.serialize_i32(51),
13789                Self::TransferDataToCloudAccount => serializer.serialize_i32(91),
13790                Self::StealWebSessionCookie => serializer.serialize_i32(25),
13791                Self::CreateOrModifySystemProcess => serializer.serialize_i32(24),
13792                Self::EventTriggeredExecution => serializer.serialize_i32(65),
13793                Self::BootOrLogonAutostartExecution => serializer.serialize_i32(82),
13794                Self::KernelModulesAndExtensions => serializer.serialize_i32(83),
13795                Self::ShortcutModification => serializer.serialize_i32(127),
13796                Self::AbuseElevationControlMechanism => serializer.serialize_i32(34),
13797                Self::AbuseElevationControlMechanismSetuidAndSetgid => {
13798                    serializer.serialize_i32(136)
13799                }
13800                Self::AbuseElevationControlMechanismSudoAndSudoCaching => {
13801                    serializer.serialize_i32(109)
13802                }
13803                Self::UnsecuredCredentials => serializer.serialize_i32(13),
13804                Self::CredentialsInFiles => serializer.serialize_i32(105),
13805                Self::BashHistory => serializer.serialize_i32(96),
13806                Self::PrivateKeys => serializer.serialize_i32(97),
13807                Self::SubvertTrustControl => serializer.serialize_i32(106),
13808                Self::InstallRootCertificate => serializer.serialize_i32(107),
13809                Self::CompromiseHostSoftwareBinary => serializer.serialize_i32(84),
13810                Self::CredentialsFromPasswordStores => serializer.serialize_i32(98),
13811                Self::ModifyAuthenticationProcess => serializer.serialize_i32(28),
13812                Self::PluggableAuthenticationModules => serializer.serialize_i32(108),
13813                Self::MultiFactorAuthentication => serializer.serialize_i32(137),
13814                Self::ImpairDefenses => serializer.serialize_i32(31),
13815                Self::DisableOrModifyTools => serializer.serialize_i32(55),
13816                Self::IndicatorBlocking => serializer.serialize_i32(110),
13817                Self::DisableOrModifyLinuxAuditSystem => serializer.serialize_i32(111),
13818                Self::HideArtifacts => serializer.serialize_i32(85),
13819                Self::HiddenFilesAndDirectories => serializer.serialize_i32(86),
13820                Self::HiddenUsers => serializer.serialize_i32(87),
13821                Self::ExfiltrationOverWebService => serializer.serialize_i32(20),
13822                Self::ExfiltrationToCloudStorage => serializer.serialize_i32(21),
13823                Self::DynamicResolution => serializer.serialize_i32(12),
13824                Self::LateralToolTransfer => serializer.serialize_i32(41),
13825                Self::HijackExecutionFlow => serializer.serialize_i32(112),
13826                Self::HijackExecutionFlowDynamicLinkerHijacking => serializer.serialize_i32(113),
13827                Self::ModifyCloudComputeInfrastructure => serializer.serialize_i32(26),
13828                Self::CreateSnapshot => serializer.serialize_i32(54),
13829                Self::CloudInfrastructureDiscovery => serializer.serialize_i32(53),
13830                Self::DevelopCapabilities => serializer.serialize_i32(99),
13831                Self::DevelopCapabilitiesMalware => serializer.serialize_i32(100),
13832                Self::ObtainCapabilities => serializer.serialize_i32(43),
13833                Self::ObtainCapabilitiesMalware => serializer.serialize_i32(101),
13834                Self::ObtainCapabilitiesVulnerabilities => serializer.serialize_i32(133),
13835                Self::ActiveScanning => serializer.serialize_i32(1),
13836                Self::ScanningIpBlocks => serializer.serialize_i32(2),
13837                Self::StageCapabilities => serializer.serialize_i32(88),
13838                Self::UploadMalware => serializer.serialize_i32(102),
13839                Self::ContainerAdministrationCommand => serializer.serialize_i32(60),
13840                Self::DeployContainer => serializer.serialize_i32(66),
13841                Self::EscapeToHost => serializer.serialize_i32(61),
13842                Self::ContainerAndResourceDiscovery => serializer.serialize_i32(57),
13843                Self::ReflectiveCodeLoading => serializer.serialize_i32(92),
13844                Self::StealOrForgeAuthenticationCertificates => serializer.serialize_i32(62),
13845                Self::FinancialTheft => serializer.serialize_i32(131),
13846                Self::UnknownValue(u) => u.0.serialize(serializer),
13847            }
13848        }
13849    }
13850
13851    impl<'de> serde::de::Deserialize<'de> for Technique {
13852        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13853        where
13854            D: serde::Deserializer<'de>,
13855        {
13856            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Technique>::new(
13857                ".google.cloud.securitycenter.v2.MitreAttack.Technique",
13858            ))
13859        }
13860    }
13861}
13862
13863/// A mute config is a Cloud SCC resource that contains the configuration
13864/// to mute create/update events of findings.
13865#[derive(Clone, Default, PartialEq)]
13866#[non_exhaustive]
13867pub struct MuteConfig {
13868    /// Identifier. This field will be ignored if provided on config creation. The
13869    /// following list shows some examples of the format:
13870    ///
13871    /// + `organizations/{organization}/muteConfigs/{mute_config}`
13872    ///
13873    /// `organizations/{organization}locations/{location}//muteConfigs/{mute_config}`
13874    ///
13875    /// + `folders/{folder}/muteConfigs/{mute_config}`
13876    /// + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}`
13877    /// + `projects/{project}/muteConfigs/{mute_config}`
13878    /// + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`
13879    pub name: std::string::String,
13880
13881    /// A description of the mute config.
13882    pub description: std::string::String,
13883
13884    /// Required. An expression that defines the filter to apply across
13885    /// create/update events of findings. While creating a filter string, be
13886    /// mindful of the scope in which the mute configuration is being created.
13887    /// E.g., If a filter contains project = X but is created under the project = Y
13888    /// scope, it might not match any findings.
13889    ///
13890    /// The following field and operator combinations are supported:
13891    ///
13892    /// * severity: `=`, `:`
13893    /// * category: `=`, `:`
13894    /// * resource.name: `=`, `:`
13895    /// * resource.project_name: `=`, `:`
13896    /// * resource.project_display_name: `=`, `:`
13897    /// * resource.folders.resource_folder: `=`, `:`
13898    /// * resource.parent_name: `=`, `:`
13899    /// * resource.parent_display_name: `=`, `:`
13900    /// * resource.type: `=`, `:`
13901    /// * finding_class: `=`, `:`
13902    /// * indicator.ip_addresses: `=`, `:`
13903    /// * indicator.domains: `=`, `:`
13904    pub filter: std::string::String,
13905
13906    /// Output only. The time at which the mute config was created.
13907    /// This field is set by the server and will be ignored if provided on config
13908    /// creation.
13909    pub create_time: std::option::Option<wkt::Timestamp>,
13910
13911    /// Output only. The most recent time at which the mute config was updated.
13912    /// This field is set by the server and will be ignored if provided on config
13913    /// creation or update.
13914    pub update_time: std::option::Option<wkt::Timestamp>,
13915
13916    /// Output only. Email address of the user who last edited the mute config.
13917    /// This field is set by the server and will be ignored if provided on config
13918    /// creation or update.
13919    pub most_recent_editor: std::string::String,
13920
13921    /// Required. The type of the mute config, which determines what type of mute
13922    /// state the config affects. Immutable after creation.
13923    pub r#type: crate::model::mute_config::MuteConfigType,
13924
13925    /// Optional. The expiry of the mute config. Only applicable for dynamic
13926    /// configs. If the expiry is set, when the config expires, it is removed from
13927    /// all findings.
13928    pub expiry_time: std::option::Option<wkt::Timestamp>,
13929
13930    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13931}
13932
13933impl MuteConfig {
13934    /// Creates a new default instance.
13935    pub fn new() -> Self {
13936        std::default::Default::default()
13937    }
13938
13939    /// Sets the value of [name][crate::model::MuteConfig::name].
13940    ///
13941    /// # Example
13942    /// ```ignore,no_run
13943    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13944    /// # let organization_id = "organization_id";
13945    /// # let mute_config_id = "mute_config_id";
13946    /// let x = MuteConfig::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
13947    /// ```
13948    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13949        self.name = v.into();
13950        self
13951    }
13952
13953    /// Sets the value of [description][crate::model::MuteConfig::description].
13954    ///
13955    /// # Example
13956    /// ```ignore,no_run
13957    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13958    /// let x = MuteConfig::new().set_description("example");
13959    /// ```
13960    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13961        self.description = v.into();
13962        self
13963    }
13964
13965    /// Sets the value of [filter][crate::model::MuteConfig::filter].
13966    ///
13967    /// # Example
13968    /// ```ignore,no_run
13969    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13970    /// let x = MuteConfig::new().set_filter("example");
13971    /// ```
13972    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13973        self.filter = v.into();
13974        self
13975    }
13976
13977    /// Sets the value of [create_time][crate::model::MuteConfig::create_time].
13978    ///
13979    /// # Example
13980    /// ```ignore,no_run
13981    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13982    /// use wkt::Timestamp;
13983    /// let x = MuteConfig::new().set_create_time(Timestamp::default()/* use setters */);
13984    /// ```
13985    pub fn set_create_time<T>(mut self, v: T) -> Self
13986    where
13987        T: std::convert::Into<wkt::Timestamp>,
13988    {
13989        self.create_time = std::option::Option::Some(v.into());
13990        self
13991    }
13992
13993    /// Sets or clears the value of [create_time][crate::model::MuteConfig::create_time].
13994    ///
13995    /// # Example
13996    /// ```ignore,no_run
13997    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
13998    /// use wkt::Timestamp;
13999    /// let x = MuteConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14000    /// let x = MuteConfig::new().set_or_clear_create_time(None::<Timestamp>);
14001    /// ```
14002    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14003    where
14004        T: std::convert::Into<wkt::Timestamp>,
14005    {
14006        self.create_time = v.map(|x| x.into());
14007        self
14008    }
14009
14010    /// Sets the value of [update_time][crate::model::MuteConfig::update_time].
14011    ///
14012    /// # Example
14013    /// ```ignore,no_run
14014    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14015    /// use wkt::Timestamp;
14016    /// let x = MuteConfig::new().set_update_time(Timestamp::default()/* use setters */);
14017    /// ```
14018    pub fn set_update_time<T>(mut self, v: T) -> Self
14019    where
14020        T: std::convert::Into<wkt::Timestamp>,
14021    {
14022        self.update_time = std::option::Option::Some(v.into());
14023        self
14024    }
14025
14026    /// Sets or clears the value of [update_time][crate::model::MuteConfig::update_time].
14027    ///
14028    /// # Example
14029    /// ```ignore,no_run
14030    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14031    /// use wkt::Timestamp;
14032    /// let x = MuteConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14033    /// let x = MuteConfig::new().set_or_clear_update_time(None::<Timestamp>);
14034    /// ```
14035    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14036    where
14037        T: std::convert::Into<wkt::Timestamp>,
14038    {
14039        self.update_time = v.map(|x| x.into());
14040        self
14041    }
14042
14043    /// Sets the value of [most_recent_editor][crate::model::MuteConfig::most_recent_editor].
14044    ///
14045    /// # Example
14046    /// ```ignore,no_run
14047    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14048    /// let x = MuteConfig::new().set_most_recent_editor("example");
14049    /// ```
14050    pub fn set_most_recent_editor<T: std::convert::Into<std::string::String>>(
14051        mut self,
14052        v: T,
14053    ) -> Self {
14054        self.most_recent_editor = v.into();
14055        self
14056    }
14057
14058    /// Sets the value of [r#type][crate::model::MuteConfig::type].
14059    ///
14060    /// # Example
14061    /// ```ignore,no_run
14062    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14063    /// use google_cloud_securitycenter_v2::model::mute_config::MuteConfigType;
14064    /// let x0 = MuteConfig::new().set_type(MuteConfigType::Static);
14065    /// let x1 = MuteConfig::new().set_type(MuteConfigType::Dynamic);
14066    /// ```
14067    pub fn set_type<T: std::convert::Into<crate::model::mute_config::MuteConfigType>>(
14068        mut self,
14069        v: T,
14070    ) -> Self {
14071        self.r#type = v.into();
14072        self
14073    }
14074
14075    /// Sets the value of [expiry_time][crate::model::MuteConfig::expiry_time].
14076    ///
14077    /// # Example
14078    /// ```ignore,no_run
14079    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14080    /// use wkt::Timestamp;
14081    /// let x = MuteConfig::new().set_expiry_time(Timestamp::default()/* use setters */);
14082    /// ```
14083    pub fn set_expiry_time<T>(mut self, v: T) -> Self
14084    where
14085        T: std::convert::Into<wkt::Timestamp>,
14086    {
14087        self.expiry_time = std::option::Option::Some(v.into());
14088        self
14089    }
14090
14091    /// Sets or clears the value of [expiry_time][crate::model::MuteConfig::expiry_time].
14092    ///
14093    /// # Example
14094    /// ```ignore,no_run
14095    /// # use google_cloud_securitycenter_v2::model::MuteConfig;
14096    /// use wkt::Timestamp;
14097    /// let x = MuteConfig::new().set_or_clear_expiry_time(Some(Timestamp::default()/* use setters */));
14098    /// let x = MuteConfig::new().set_or_clear_expiry_time(None::<Timestamp>);
14099    /// ```
14100    pub fn set_or_clear_expiry_time<T>(mut self, v: std::option::Option<T>) -> Self
14101    where
14102        T: std::convert::Into<wkt::Timestamp>,
14103    {
14104        self.expiry_time = v.map(|x| x.into());
14105        self
14106    }
14107}
14108
14109impl wkt::message::Message for MuteConfig {
14110    fn typename() -> &'static str {
14111        "type.googleapis.com/google.cloud.securitycenter.v2.MuteConfig"
14112    }
14113}
14114
14115/// Defines additional types related to [MuteConfig].
14116pub mod mute_config {
14117    #[allow(unused_imports)]
14118    use super::*;
14119
14120    /// The type of MuteConfig.
14121    ///
14122    /// # Working with unknown values
14123    ///
14124    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14125    /// additional enum variants at any time. Adding new variants is not considered
14126    /// a breaking change. Applications should write their code in anticipation of:
14127    ///
14128    /// - New values appearing in future releases of the client library, **and**
14129    /// - New values received dynamically, without application changes.
14130    ///
14131    /// Please consult the [Working with enums] section in the user guide for some
14132    /// guidelines.
14133    ///
14134    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14135    #[derive(Clone, Debug, PartialEq)]
14136    #[non_exhaustive]
14137    pub enum MuteConfigType {
14138        /// Unused.
14139        Unspecified,
14140        /// A static mute config, which sets the static mute state of future matching
14141        /// findings to muted. Once the static mute state has been set, finding or
14142        /// config modifications will not affect the state.
14143        Static,
14144        /// A dynamic mute config, which is applied to existing and future matching
14145        /// findings, setting their dynamic mute state to "muted". If the config is
14146        /// updated or deleted, or a matching finding is updated, such that the
14147        /// finding doesn't match the config, the config will be removed from the
14148        /// finding, and the finding's dynamic mute state may become "unmuted"
14149        /// (unless other configs still match).
14150        Dynamic,
14151        /// If set, the enum was initialized with an unknown value.
14152        ///
14153        /// Applications can examine the value using [MuteConfigType::value] or
14154        /// [MuteConfigType::name].
14155        UnknownValue(mute_config_type::UnknownValue),
14156    }
14157
14158    #[doc(hidden)]
14159    pub mod mute_config_type {
14160        #[allow(unused_imports)]
14161        use super::*;
14162        #[derive(Clone, Debug, PartialEq)]
14163        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14164    }
14165
14166    impl MuteConfigType {
14167        /// Gets the enum value.
14168        ///
14169        /// Returns `None` if the enum contains an unknown value deserialized from
14170        /// the string representation of enums.
14171        pub fn value(&self) -> std::option::Option<i32> {
14172            match self {
14173                Self::Unspecified => std::option::Option::Some(0),
14174                Self::Static => std::option::Option::Some(1),
14175                Self::Dynamic => std::option::Option::Some(2),
14176                Self::UnknownValue(u) => u.0.value(),
14177            }
14178        }
14179
14180        /// Gets the enum value as a string.
14181        ///
14182        /// Returns `None` if the enum contains an unknown value deserialized from
14183        /// the integer representation of enums.
14184        pub fn name(&self) -> std::option::Option<&str> {
14185            match self {
14186                Self::Unspecified => std::option::Option::Some("MUTE_CONFIG_TYPE_UNSPECIFIED"),
14187                Self::Static => std::option::Option::Some("STATIC"),
14188                Self::Dynamic => std::option::Option::Some("DYNAMIC"),
14189                Self::UnknownValue(u) => u.0.name(),
14190            }
14191        }
14192    }
14193
14194    impl std::default::Default for MuteConfigType {
14195        fn default() -> Self {
14196            use std::convert::From;
14197            Self::from(0)
14198        }
14199    }
14200
14201    impl std::fmt::Display for MuteConfigType {
14202        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14203            wkt::internal::display_enum(f, self.name(), self.value())
14204        }
14205    }
14206
14207    impl std::convert::From<i32> for MuteConfigType {
14208        fn from(value: i32) -> Self {
14209            match value {
14210                0 => Self::Unspecified,
14211                1 => Self::Static,
14212                2 => Self::Dynamic,
14213                _ => Self::UnknownValue(mute_config_type::UnknownValue(
14214                    wkt::internal::UnknownEnumValue::Integer(value),
14215                )),
14216            }
14217        }
14218    }
14219
14220    impl std::convert::From<&str> for MuteConfigType {
14221        fn from(value: &str) -> Self {
14222            use std::string::ToString;
14223            match value {
14224                "MUTE_CONFIG_TYPE_UNSPECIFIED" => Self::Unspecified,
14225                "STATIC" => Self::Static,
14226                "DYNAMIC" => Self::Dynamic,
14227                _ => Self::UnknownValue(mute_config_type::UnknownValue(
14228                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14229                )),
14230            }
14231        }
14232    }
14233
14234    impl serde::ser::Serialize for MuteConfigType {
14235        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14236        where
14237            S: serde::Serializer,
14238        {
14239            match self {
14240                Self::Unspecified => serializer.serialize_i32(0),
14241                Self::Static => serializer.serialize_i32(1),
14242                Self::Dynamic => serializer.serialize_i32(2),
14243                Self::UnknownValue(u) => u.0.serialize(serializer),
14244            }
14245        }
14246    }
14247
14248    impl<'de> serde::de::Deserialize<'de> for MuteConfigType {
14249        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14250        where
14251            D: serde::Deserializer<'de>,
14252        {
14253            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteConfigType>::new(
14254                ".google.cloud.securitycenter.v2.MuteConfig.MuteConfigType",
14255            ))
14256        }
14257    }
14258}
14259
14260/// Contains information about a VPC network associated with the finding.
14261#[derive(Clone, Default, PartialEq)]
14262#[non_exhaustive]
14263pub struct Network {
14264    /// The name of the VPC network resource, for example,
14265    /// `//compute.googleapis.com/projects/my-project/global/networks/my-network`.
14266    pub name: std::string::String,
14267
14268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14269}
14270
14271impl Network {
14272    /// Creates a new default instance.
14273    pub fn new() -> Self {
14274        std::default::Default::default()
14275    }
14276
14277    /// Sets the value of [name][crate::model::Network::name].
14278    ///
14279    /// # Example
14280    /// ```ignore,no_run
14281    /// # use google_cloud_securitycenter_v2::model::Network;
14282    /// let x = Network::new().set_name("example");
14283    /// ```
14284    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14285        self.name = v.into();
14286        self
14287    }
14288}
14289
14290impl wkt::message::Message for Network {
14291    fn typename() -> &'static str {
14292        "type.googleapis.com/google.cloud.securitycenter.v2.Network"
14293    }
14294}
14295
14296/// Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise
14297/// notebook](https://cloud.google.com/colab/docs/introduction) file, that is
14298/// associated with a finding.
14299#[derive(Clone, Default, PartialEq)]
14300#[non_exhaustive]
14301pub struct Notebook {
14302    /// The name of the notebook.
14303    pub name: std::string::String,
14304
14305    /// The source notebook service, for example, "Colab Enterprise".
14306    pub service: std::string::String,
14307
14308    /// The user ID of the latest author to modify the notebook.
14309    pub last_author: std::string::String,
14310
14311    /// The most recent time the notebook was updated.
14312    pub notebook_update_time: std::option::Option<wkt::Timestamp>,
14313
14314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14315}
14316
14317impl Notebook {
14318    /// Creates a new default instance.
14319    pub fn new() -> Self {
14320        std::default::Default::default()
14321    }
14322
14323    /// Sets the value of [name][crate::model::Notebook::name].
14324    ///
14325    /// # Example
14326    /// ```ignore,no_run
14327    /// # use google_cloud_securitycenter_v2::model::Notebook;
14328    /// let x = Notebook::new().set_name("example");
14329    /// ```
14330    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14331        self.name = v.into();
14332        self
14333    }
14334
14335    /// Sets the value of [service][crate::model::Notebook::service].
14336    ///
14337    /// # Example
14338    /// ```ignore,no_run
14339    /// # use google_cloud_securitycenter_v2::model::Notebook;
14340    /// let x = Notebook::new().set_service("example");
14341    /// ```
14342    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14343        self.service = v.into();
14344        self
14345    }
14346
14347    /// Sets the value of [last_author][crate::model::Notebook::last_author].
14348    ///
14349    /// # Example
14350    /// ```ignore,no_run
14351    /// # use google_cloud_securitycenter_v2::model::Notebook;
14352    /// let x = Notebook::new().set_last_author("example");
14353    /// ```
14354    pub fn set_last_author<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14355        self.last_author = v.into();
14356        self
14357    }
14358
14359    /// Sets the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
14360    ///
14361    /// # Example
14362    /// ```ignore,no_run
14363    /// # use google_cloud_securitycenter_v2::model::Notebook;
14364    /// use wkt::Timestamp;
14365    /// let x = Notebook::new().set_notebook_update_time(Timestamp::default()/* use setters */);
14366    /// ```
14367    pub fn set_notebook_update_time<T>(mut self, v: T) -> Self
14368    where
14369        T: std::convert::Into<wkt::Timestamp>,
14370    {
14371        self.notebook_update_time = std::option::Option::Some(v.into());
14372        self
14373    }
14374
14375    /// Sets or clears the value of [notebook_update_time][crate::model::Notebook::notebook_update_time].
14376    ///
14377    /// # Example
14378    /// ```ignore,no_run
14379    /// # use google_cloud_securitycenter_v2::model::Notebook;
14380    /// use wkt::Timestamp;
14381    /// let x = Notebook::new().set_or_clear_notebook_update_time(Some(Timestamp::default()/* use setters */));
14382    /// let x = Notebook::new().set_or_clear_notebook_update_time(None::<Timestamp>);
14383    /// ```
14384    pub fn set_or_clear_notebook_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14385    where
14386        T: std::convert::Into<wkt::Timestamp>,
14387    {
14388        self.notebook_update_time = v.map(|x| x.into());
14389        self
14390    }
14391}
14392
14393impl wkt::message::Message for Notebook {
14394    fn typename() -> &'static str {
14395        "type.googleapis.com/google.cloud.securitycenter.v2.Notebook"
14396    }
14397}
14398
14399/// Cloud Security Command Center (Cloud SCC) notification configs.
14400///
14401/// A notification config is a Cloud SCC resource that contains the configuration
14402/// to send notifications for create/update events of findings, assets and etc.
14403#[derive(Clone, Default, PartialEq)]
14404#[non_exhaustive]
14405pub struct NotificationConfig {
14406    /// Identifier. The relative resource name of this notification config. See:
14407    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
14408    /// The following list shows some examples:
14409    /// +
14410    /// `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
14411    /// +
14412    /// `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
14413    /// +
14414    /// `projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket`
14415    pub name: std::string::String,
14416
14417    /// The description of the notification config (max of 1024 characters).
14418    pub description: std::string::String,
14419
14420    /// The Pub/Sub topic to send notifications to. Its format is
14421    /// "projects/[project_id]/topics/[topic]".
14422    pub pubsub_topic: std::string::String,
14423
14424    /// Output only. The service account that needs "pubsub.topics.publish"
14425    /// permission to publish to the Pub/Sub topic.
14426    pub service_account: std::string::String,
14427
14428    /// Output only. The timestamp of when the notification config was last
14429    /// updated.
14430    pub update_time: std::option::Option<wkt::Timestamp>,
14431
14432    /// The config for triggering notifications.
14433    pub notify_config: std::option::Option<crate::model::notification_config::NotifyConfig>,
14434
14435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14436}
14437
14438impl NotificationConfig {
14439    /// Creates a new default instance.
14440    pub fn new() -> Self {
14441        std::default::Default::default()
14442    }
14443
14444    /// Sets the value of [name][crate::model::NotificationConfig::name].
14445    ///
14446    /// # Example
14447    /// ```ignore,no_run
14448    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14449    /// # let organization_id = "organization_id";
14450    /// # let location_id = "location_id";
14451    /// # let notification_config_id = "notification_config_id";
14452    /// let x = NotificationConfig::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
14453    /// ```
14454    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14455        self.name = v.into();
14456        self
14457    }
14458
14459    /// Sets the value of [description][crate::model::NotificationConfig::description].
14460    ///
14461    /// # Example
14462    /// ```ignore,no_run
14463    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14464    /// let x = NotificationConfig::new().set_description("example");
14465    /// ```
14466    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14467        self.description = v.into();
14468        self
14469    }
14470
14471    /// Sets the value of [pubsub_topic][crate::model::NotificationConfig::pubsub_topic].
14472    ///
14473    /// # Example
14474    /// ```ignore,no_run
14475    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14476    /// let x = NotificationConfig::new().set_pubsub_topic("example");
14477    /// ```
14478    pub fn set_pubsub_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14479        self.pubsub_topic = v.into();
14480        self
14481    }
14482
14483    /// Sets the value of [service_account][crate::model::NotificationConfig::service_account].
14484    ///
14485    /// # Example
14486    /// ```ignore,no_run
14487    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14488    /// let x = NotificationConfig::new().set_service_account("example");
14489    /// ```
14490    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14491        self.service_account = v.into();
14492        self
14493    }
14494
14495    /// Sets the value of [update_time][crate::model::NotificationConfig::update_time].
14496    ///
14497    /// # Example
14498    /// ```ignore,no_run
14499    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14500    /// use wkt::Timestamp;
14501    /// let x = NotificationConfig::new().set_update_time(Timestamp::default()/* use setters */);
14502    /// ```
14503    pub fn set_update_time<T>(mut self, v: T) -> Self
14504    where
14505        T: std::convert::Into<wkt::Timestamp>,
14506    {
14507        self.update_time = std::option::Option::Some(v.into());
14508        self
14509    }
14510
14511    /// Sets or clears the value of [update_time][crate::model::NotificationConfig::update_time].
14512    ///
14513    /// # Example
14514    /// ```ignore,no_run
14515    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14516    /// use wkt::Timestamp;
14517    /// let x = NotificationConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14518    /// let x = NotificationConfig::new().set_or_clear_update_time(None::<Timestamp>);
14519    /// ```
14520    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14521    where
14522        T: std::convert::Into<wkt::Timestamp>,
14523    {
14524        self.update_time = v.map(|x| x.into());
14525        self
14526    }
14527
14528    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config].
14529    ///
14530    /// Note that all the setters affecting `notify_config` are mutually
14531    /// exclusive.
14532    ///
14533    /// # Example
14534    /// ```ignore,no_run
14535    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14536    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
14537    /// let x = NotificationConfig::new().set_notify_config(Some(
14538    ///     google_cloud_securitycenter_v2::model::notification_config::NotifyConfig::StreamingConfig(StreamingConfig::default().into())));
14539    /// ```
14540    pub fn set_notify_config<
14541        T: std::convert::Into<std::option::Option<crate::model::notification_config::NotifyConfig>>,
14542    >(
14543        mut self,
14544        v: T,
14545    ) -> Self {
14546        self.notify_config = v.into();
14547        self
14548    }
14549
14550    /// The value of [notify_config][crate::model::NotificationConfig::notify_config]
14551    /// if it holds a `StreamingConfig`, `None` if the field is not set or
14552    /// holds a different branch.
14553    pub fn streaming_config(
14554        &self,
14555    ) -> std::option::Option<&std::boxed::Box<crate::model::notification_config::StreamingConfig>>
14556    {
14557        #[allow(unreachable_patterns)]
14558        self.notify_config.as_ref().and_then(|v| match v {
14559            crate::model::notification_config::NotifyConfig::StreamingConfig(v) => {
14560                std::option::Option::Some(v)
14561            }
14562            _ => std::option::Option::None,
14563        })
14564    }
14565
14566    /// Sets the value of [notify_config][crate::model::NotificationConfig::notify_config]
14567    /// to hold a `StreamingConfig`.
14568    ///
14569    /// Note that all the setters affecting `notify_config` are
14570    /// mutually exclusive.
14571    ///
14572    /// # Example
14573    /// ```ignore,no_run
14574    /// # use google_cloud_securitycenter_v2::model::NotificationConfig;
14575    /// use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
14576    /// let x = NotificationConfig::new().set_streaming_config(StreamingConfig::default()/* use setters */);
14577    /// assert!(x.streaming_config().is_some());
14578    /// ```
14579    pub fn set_streaming_config<
14580        T: std::convert::Into<std::boxed::Box<crate::model::notification_config::StreamingConfig>>,
14581    >(
14582        mut self,
14583        v: T,
14584    ) -> Self {
14585        self.notify_config = std::option::Option::Some(
14586            crate::model::notification_config::NotifyConfig::StreamingConfig(v.into()),
14587        );
14588        self
14589    }
14590}
14591
14592impl wkt::message::Message for NotificationConfig {
14593    fn typename() -> &'static str {
14594        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig"
14595    }
14596}
14597
14598/// Defines additional types related to [NotificationConfig].
14599pub mod notification_config {
14600    #[allow(unused_imports)]
14601    use super::*;
14602
14603    /// The config for streaming-based notifications, which send each event as soon
14604    /// as it is detected.
14605    #[derive(Clone, Default, PartialEq)]
14606    #[non_exhaustive]
14607    pub struct StreamingConfig {
14608        /// Expression that defines the filter to apply across create/update events
14609        /// of assets or findings as specified by the event type. The expression is a
14610        /// list of zero or more restrictions combined via logical operators `AND`
14611        /// and `OR`. Parentheses are supported, and `OR` has higher precedence than
14612        /// `AND`.
14613        ///
14614        /// Restrictions have the form `<field> <operator> <value>` and may have a
14615        /// `-` character in front of them to indicate negation. The fields map to
14616        /// those defined in the corresponding resource.
14617        ///
14618        /// The supported operators are:
14619        ///
14620        /// * `=` for all value types.
14621        /// * `>`, `<`, `>=`, `<=` for integer values.
14622        /// * `:`, meaning substring matching, for strings.
14623        ///
14624        /// The supported value types are:
14625        ///
14626        /// * string literals in quotes.
14627        /// * integer literals without quotes.
14628        /// * boolean literals `true` and `false` without quotes.
14629        pub filter: std::string::String,
14630
14631        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14632    }
14633
14634    impl StreamingConfig {
14635        /// Creates a new default instance.
14636        pub fn new() -> Self {
14637            std::default::Default::default()
14638        }
14639
14640        /// Sets the value of [filter][crate::model::notification_config::StreamingConfig::filter].
14641        ///
14642        /// # Example
14643        /// ```ignore,no_run
14644        /// # use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
14645        /// let x = StreamingConfig::new().set_filter("example");
14646        /// ```
14647        pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14648            self.filter = v.into();
14649            self
14650        }
14651    }
14652
14653    impl wkt::message::Message for StreamingConfig {
14654        fn typename() -> &'static str {
14655            "type.googleapis.com/google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig"
14656        }
14657    }
14658
14659    /// The config for triggering notifications.
14660    #[derive(Clone, Debug, PartialEq)]
14661    #[non_exhaustive]
14662    pub enum NotifyConfig {
14663        /// The config for triggering streaming-based notifications.
14664        StreamingConfig(std::boxed::Box<crate::model::notification_config::StreamingConfig>),
14665    }
14666}
14667
14668/// Cloud SCC's Notification
14669#[derive(Clone, Default, PartialEq)]
14670#[non_exhaustive]
14671pub struct NotificationMessage {
14672    /// Name of the notification config that generated current notification.
14673    pub notification_config_name: std::string::String,
14674
14675    /// The Cloud resource tied to this notification's Finding.
14676    pub resource: std::option::Option<crate::model::Resource>,
14677
14678    /// Notification Event.
14679    pub event: std::option::Option<crate::model::notification_message::Event>,
14680
14681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14682}
14683
14684impl NotificationMessage {
14685    /// Creates a new default instance.
14686    pub fn new() -> Self {
14687        std::default::Default::default()
14688    }
14689
14690    /// Sets the value of [notification_config_name][crate::model::NotificationMessage::notification_config_name].
14691    ///
14692    /// # Example
14693    /// ```ignore,no_run
14694    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14695    /// let x = NotificationMessage::new().set_notification_config_name("example");
14696    /// ```
14697    pub fn set_notification_config_name<T: std::convert::Into<std::string::String>>(
14698        mut self,
14699        v: T,
14700    ) -> Self {
14701        self.notification_config_name = v.into();
14702        self
14703    }
14704
14705    /// Sets the value of [resource][crate::model::NotificationMessage::resource].
14706    ///
14707    /// # Example
14708    /// ```ignore,no_run
14709    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14710    /// use google_cloud_securitycenter_v2::model::Resource;
14711    /// let x = NotificationMessage::new().set_resource(Resource::default()/* use setters */);
14712    /// ```
14713    pub fn set_resource<T>(mut self, v: T) -> Self
14714    where
14715        T: std::convert::Into<crate::model::Resource>,
14716    {
14717        self.resource = std::option::Option::Some(v.into());
14718        self
14719    }
14720
14721    /// Sets or clears the value of [resource][crate::model::NotificationMessage::resource].
14722    ///
14723    /// # Example
14724    /// ```ignore,no_run
14725    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14726    /// use google_cloud_securitycenter_v2::model::Resource;
14727    /// let x = NotificationMessage::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
14728    /// let x = NotificationMessage::new().set_or_clear_resource(None::<Resource>);
14729    /// ```
14730    pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
14731    where
14732        T: std::convert::Into<crate::model::Resource>,
14733    {
14734        self.resource = v.map(|x| x.into());
14735        self
14736    }
14737
14738    /// Sets the value of [event][crate::model::NotificationMessage::event].
14739    ///
14740    /// Note that all the setters affecting `event` are mutually
14741    /// exclusive.
14742    ///
14743    /// # Example
14744    /// ```ignore,no_run
14745    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14746    /// use google_cloud_securitycenter_v2::model::Finding;
14747    /// let x = NotificationMessage::new().set_event(Some(
14748    ///     google_cloud_securitycenter_v2::model::notification_message::Event::Finding(Finding::default().into())));
14749    /// ```
14750    pub fn set_event<
14751        T: std::convert::Into<std::option::Option<crate::model::notification_message::Event>>,
14752    >(
14753        mut self,
14754        v: T,
14755    ) -> Self {
14756        self.event = v.into();
14757        self
14758    }
14759
14760    /// The value of [event][crate::model::NotificationMessage::event]
14761    /// if it holds a `Finding`, `None` if the field is not set or
14762    /// holds a different branch.
14763    pub fn finding(&self) -> std::option::Option<&std::boxed::Box<crate::model::Finding>> {
14764        #[allow(unreachable_patterns)]
14765        self.event.as_ref().and_then(|v| match v {
14766            crate::model::notification_message::Event::Finding(v) => std::option::Option::Some(v),
14767            _ => std::option::Option::None,
14768        })
14769    }
14770
14771    /// Sets the value of [event][crate::model::NotificationMessage::event]
14772    /// to hold a `Finding`.
14773    ///
14774    /// Note that all the setters affecting `event` are
14775    /// mutually exclusive.
14776    ///
14777    /// # Example
14778    /// ```ignore,no_run
14779    /// # use google_cloud_securitycenter_v2::model::NotificationMessage;
14780    /// use google_cloud_securitycenter_v2::model::Finding;
14781    /// let x = NotificationMessage::new().set_finding(Finding::default()/* use setters */);
14782    /// assert!(x.finding().is_some());
14783    /// ```
14784    pub fn set_finding<T: std::convert::Into<std::boxed::Box<crate::model::Finding>>>(
14785        mut self,
14786        v: T,
14787    ) -> Self {
14788        self.event =
14789            std::option::Option::Some(crate::model::notification_message::Event::Finding(v.into()));
14790        self
14791    }
14792}
14793
14794impl wkt::message::Message for NotificationMessage {
14795    fn typename() -> &'static str {
14796        "type.googleapis.com/google.cloud.securitycenter.v2.NotificationMessage"
14797    }
14798}
14799
14800/// Defines additional types related to [NotificationMessage].
14801pub mod notification_message {
14802    #[allow(unused_imports)]
14803    use super::*;
14804
14805    /// Notification Event.
14806    #[derive(Clone, Debug, PartialEq)]
14807    #[non_exhaustive]
14808    pub enum Event {
14809        /// If it's a Finding based notification config, this field will be
14810        /// populated.
14811        Finding(std::boxed::Box<crate::model::Finding>),
14812    }
14813}
14814
14815/// Contains information about the org policies associated with the finding.
14816#[derive(Clone, Default, PartialEq)]
14817#[non_exhaustive]
14818pub struct OrgPolicy {
14819    /// Identifier. The resource name of the org policy.
14820    /// Example:
14821    /// "organizations/{organization_id}/policies/{constraint_name}"
14822    pub name: std::string::String,
14823
14824    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14825}
14826
14827impl OrgPolicy {
14828    /// Creates a new default instance.
14829    pub fn new() -> Self {
14830        std::default::Default::default()
14831    }
14832
14833    /// Sets the value of [name][crate::model::OrgPolicy::name].
14834    ///
14835    /// # Example
14836    /// ```ignore,no_run
14837    /// # use google_cloud_securitycenter_v2::model::OrgPolicy;
14838    /// # let organization_id = "organization_id";
14839    /// # let constraint_name = "constraint_name";
14840    /// let x = OrgPolicy::new().set_name(format!("organizations/{organization_id}/policies/{constraint_name}"));
14841    /// ```
14842    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14843        self.name = v.into();
14844        self
14845    }
14846}
14847
14848impl wkt::message::Message for OrgPolicy {
14849    fn typename() -> &'static str {
14850        "type.googleapis.com/google.cloud.securitycenter.v2.OrgPolicy"
14851    }
14852}
14853
14854/// Represents an operating system process.
14855#[derive(Clone, Default, PartialEq)]
14856#[non_exhaustive]
14857pub struct Process {
14858    /// The process name, as displayed in utilities like `top` and `ps`. This name
14859    /// can be accessed through `/proc/[pid]/comm` and changed with
14860    /// `prctl(PR_SET_NAME)`.
14861    pub name: std::string::String,
14862
14863    /// File information for the process executable.
14864    pub binary: std::option::Option<crate::model::File>,
14865
14866    /// File information for libraries loaded by the process.
14867    pub libraries: std::vec::Vec<crate::model::File>,
14868
14869    /// When the process represents the invocation of a script, `binary` provides
14870    /// information about the interpreter, while `script` provides information
14871    /// about the script file provided to the interpreter.
14872    pub script: std::option::Option<crate::model::File>,
14873
14874    /// Process arguments as JSON encoded strings.
14875    pub args: std::vec::Vec<std::string::String>,
14876
14877    /// True if `args` is incomplete.
14878    pub arguments_truncated: bool,
14879
14880    /// Process environment variables.
14881    pub env_variables: std::vec::Vec<crate::model::EnvironmentVariable>,
14882
14883    /// True if `env_variables` is incomplete.
14884    pub env_variables_truncated: bool,
14885
14886    /// The process ID.
14887    pub pid: i64,
14888
14889    /// The parent process ID.
14890    pub parent_pid: i64,
14891
14892    /// The ID of the user that executed the process. E.g. If this is the root user
14893    /// this will always be 0.
14894    pub user_id: i64,
14895
14896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14897}
14898
14899impl Process {
14900    /// Creates a new default instance.
14901    pub fn new() -> Self {
14902        std::default::Default::default()
14903    }
14904
14905    /// Sets the value of [name][crate::model::Process::name].
14906    ///
14907    /// # Example
14908    /// ```ignore,no_run
14909    /// # use google_cloud_securitycenter_v2::model::Process;
14910    /// let x = Process::new().set_name("example");
14911    /// ```
14912    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14913        self.name = v.into();
14914        self
14915    }
14916
14917    /// Sets the value of [binary][crate::model::Process::binary].
14918    ///
14919    /// # Example
14920    /// ```ignore,no_run
14921    /// # use google_cloud_securitycenter_v2::model::Process;
14922    /// use google_cloud_securitycenter_v2::model::File;
14923    /// let x = Process::new().set_binary(File::default()/* use setters */);
14924    /// ```
14925    pub fn set_binary<T>(mut self, v: T) -> Self
14926    where
14927        T: std::convert::Into<crate::model::File>,
14928    {
14929        self.binary = std::option::Option::Some(v.into());
14930        self
14931    }
14932
14933    /// Sets or clears the value of [binary][crate::model::Process::binary].
14934    ///
14935    /// # Example
14936    /// ```ignore,no_run
14937    /// # use google_cloud_securitycenter_v2::model::Process;
14938    /// use google_cloud_securitycenter_v2::model::File;
14939    /// let x = Process::new().set_or_clear_binary(Some(File::default()/* use setters */));
14940    /// let x = Process::new().set_or_clear_binary(None::<File>);
14941    /// ```
14942    pub fn set_or_clear_binary<T>(mut self, v: std::option::Option<T>) -> Self
14943    where
14944        T: std::convert::Into<crate::model::File>,
14945    {
14946        self.binary = v.map(|x| x.into());
14947        self
14948    }
14949
14950    /// Sets the value of [libraries][crate::model::Process::libraries].
14951    ///
14952    /// # Example
14953    /// ```ignore,no_run
14954    /// # use google_cloud_securitycenter_v2::model::Process;
14955    /// use google_cloud_securitycenter_v2::model::File;
14956    /// let x = Process::new()
14957    ///     .set_libraries([
14958    ///         File::default()/* use setters */,
14959    ///         File::default()/* use (different) setters */,
14960    ///     ]);
14961    /// ```
14962    pub fn set_libraries<T, V>(mut self, v: T) -> Self
14963    where
14964        T: std::iter::IntoIterator<Item = V>,
14965        V: std::convert::Into<crate::model::File>,
14966    {
14967        use std::iter::Iterator;
14968        self.libraries = v.into_iter().map(|i| i.into()).collect();
14969        self
14970    }
14971
14972    /// Sets the value of [script][crate::model::Process::script].
14973    ///
14974    /// # Example
14975    /// ```ignore,no_run
14976    /// # use google_cloud_securitycenter_v2::model::Process;
14977    /// use google_cloud_securitycenter_v2::model::File;
14978    /// let x = Process::new().set_script(File::default()/* use setters */);
14979    /// ```
14980    pub fn set_script<T>(mut self, v: T) -> Self
14981    where
14982        T: std::convert::Into<crate::model::File>,
14983    {
14984        self.script = std::option::Option::Some(v.into());
14985        self
14986    }
14987
14988    /// Sets or clears the value of [script][crate::model::Process::script].
14989    ///
14990    /// # Example
14991    /// ```ignore,no_run
14992    /// # use google_cloud_securitycenter_v2::model::Process;
14993    /// use google_cloud_securitycenter_v2::model::File;
14994    /// let x = Process::new().set_or_clear_script(Some(File::default()/* use setters */));
14995    /// let x = Process::new().set_or_clear_script(None::<File>);
14996    /// ```
14997    pub fn set_or_clear_script<T>(mut self, v: std::option::Option<T>) -> Self
14998    where
14999        T: std::convert::Into<crate::model::File>,
15000    {
15001        self.script = v.map(|x| x.into());
15002        self
15003    }
15004
15005    /// Sets the value of [args][crate::model::Process::args].
15006    ///
15007    /// # Example
15008    /// ```ignore,no_run
15009    /// # use google_cloud_securitycenter_v2::model::Process;
15010    /// let x = Process::new().set_args(["a", "b", "c"]);
15011    /// ```
15012    pub fn set_args<T, V>(mut self, v: T) -> Self
15013    where
15014        T: std::iter::IntoIterator<Item = V>,
15015        V: std::convert::Into<std::string::String>,
15016    {
15017        use std::iter::Iterator;
15018        self.args = v.into_iter().map(|i| i.into()).collect();
15019        self
15020    }
15021
15022    /// Sets the value of [arguments_truncated][crate::model::Process::arguments_truncated].
15023    ///
15024    /// # Example
15025    /// ```ignore,no_run
15026    /// # use google_cloud_securitycenter_v2::model::Process;
15027    /// let x = Process::new().set_arguments_truncated(true);
15028    /// ```
15029    pub fn set_arguments_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15030        self.arguments_truncated = v.into();
15031        self
15032    }
15033
15034    /// Sets the value of [env_variables][crate::model::Process::env_variables].
15035    ///
15036    /// # Example
15037    /// ```ignore,no_run
15038    /// # use google_cloud_securitycenter_v2::model::Process;
15039    /// use google_cloud_securitycenter_v2::model::EnvironmentVariable;
15040    /// let x = Process::new()
15041    ///     .set_env_variables([
15042    ///         EnvironmentVariable::default()/* use setters */,
15043    ///         EnvironmentVariable::default()/* use (different) setters */,
15044    ///     ]);
15045    /// ```
15046    pub fn set_env_variables<T, V>(mut self, v: T) -> Self
15047    where
15048        T: std::iter::IntoIterator<Item = V>,
15049        V: std::convert::Into<crate::model::EnvironmentVariable>,
15050    {
15051        use std::iter::Iterator;
15052        self.env_variables = v.into_iter().map(|i| i.into()).collect();
15053        self
15054    }
15055
15056    /// Sets the value of [env_variables_truncated][crate::model::Process::env_variables_truncated].
15057    ///
15058    /// # Example
15059    /// ```ignore,no_run
15060    /// # use google_cloud_securitycenter_v2::model::Process;
15061    /// let x = Process::new().set_env_variables_truncated(true);
15062    /// ```
15063    pub fn set_env_variables_truncated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15064        self.env_variables_truncated = v.into();
15065        self
15066    }
15067
15068    /// Sets the value of [pid][crate::model::Process::pid].
15069    ///
15070    /// # Example
15071    /// ```ignore,no_run
15072    /// # use google_cloud_securitycenter_v2::model::Process;
15073    /// let x = Process::new().set_pid(42);
15074    /// ```
15075    pub fn set_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15076        self.pid = v.into();
15077        self
15078    }
15079
15080    /// Sets the value of [parent_pid][crate::model::Process::parent_pid].
15081    ///
15082    /// # Example
15083    /// ```ignore,no_run
15084    /// # use google_cloud_securitycenter_v2::model::Process;
15085    /// let x = Process::new().set_parent_pid(42);
15086    /// ```
15087    pub fn set_parent_pid<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15088        self.parent_pid = v.into();
15089        self
15090    }
15091
15092    /// Sets the value of [user_id][crate::model::Process::user_id].
15093    ///
15094    /// # Example
15095    /// ```ignore,no_run
15096    /// # use google_cloud_securitycenter_v2::model::Process;
15097    /// let x = Process::new().set_user_id(42);
15098    /// ```
15099    pub fn set_user_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15100        self.user_id = v.into();
15101        self
15102    }
15103}
15104
15105impl wkt::message::Message for Process {
15106    fn typename() -> &'static str {
15107        "type.googleapis.com/google.cloud.securitycenter.v2.Process"
15108    }
15109}
15110
15111/// A name-value pair representing an environment variable used in an operating
15112/// system process.
15113#[derive(Clone, Default, PartialEq)]
15114#[non_exhaustive]
15115pub struct EnvironmentVariable {
15116    /// Environment variable name as a JSON encoded string.
15117    pub name: std::string::String,
15118
15119    /// Environment variable value as a JSON encoded string.
15120    pub val: std::string::String,
15121
15122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15123}
15124
15125impl EnvironmentVariable {
15126    /// Creates a new default instance.
15127    pub fn new() -> Self {
15128        std::default::Default::default()
15129    }
15130
15131    /// Sets the value of [name][crate::model::EnvironmentVariable::name].
15132    ///
15133    /// # Example
15134    /// ```ignore,no_run
15135    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
15136    /// let x = EnvironmentVariable::new().set_name("example");
15137    /// ```
15138    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15139        self.name = v.into();
15140        self
15141    }
15142
15143    /// Sets the value of [val][crate::model::EnvironmentVariable::val].
15144    ///
15145    /// # Example
15146    /// ```ignore,no_run
15147    /// # use google_cloud_securitycenter_v2::model::EnvironmentVariable;
15148    /// let x = EnvironmentVariable::new().set_val("example");
15149    /// ```
15150    pub fn set_val<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15151        self.val = v.into();
15152        self
15153    }
15154}
15155
15156impl wkt::message::Message for EnvironmentVariable {
15157    fn typename() -> &'static str {
15158        "type.googleapis.com/google.cloud.securitycenter.v2.EnvironmentVariable"
15159    }
15160}
15161
15162/// Information related to the Google Cloud resource.
15163#[derive(Clone, Default, PartialEq)]
15164#[non_exhaustive]
15165pub struct Resource {
15166    /// The full resource name of the resource. See:
15167    /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
15168    pub name: std::string::String,
15169
15170    /// The human readable name of the resource.
15171    pub display_name: std::string::String,
15172
15173    /// The full resource type of the resource.
15174    pub r#type: std::string::String,
15175
15176    /// Indicates which cloud provider the finding is from.
15177    pub cloud_provider: crate::model::CloudProvider,
15178
15179    /// The service or resource provider associated with the resource.
15180    pub service: std::string::String,
15181
15182    /// The region or location of the service (if applicable).
15183    pub location: std::string::String,
15184
15185    /// Provides the path to the resource within the resource hierarchy.
15186    pub resource_path: std::option::Option<crate::model::ResourcePath>,
15187
15188    /// A string representation of the resource path.
15189    /// For Google Cloud, it has the format of
15190    /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
15191    /// where there can be any number of folders.
15192    /// For AWS, it has the format of
15193    /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
15194    /// where there can be any number of organizational units.
15195    /// For Azure, it has the format of
15196    /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
15197    /// where there can be any number of management groups.
15198    pub resource_path_string: std::string::String,
15199
15200    /// The metadata associated with the cloud provider.
15201    pub cloud_provider_metadata: std::option::Option<crate::model::resource::CloudProviderMetadata>,
15202
15203    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15204}
15205
15206impl Resource {
15207    /// Creates a new default instance.
15208    pub fn new() -> Self {
15209        std::default::Default::default()
15210    }
15211
15212    /// Sets the value of [name][crate::model::Resource::name].
15213    ///
15214    /// # Example
15215    /// ```ignore,no_run
15216    /// # use google_cloud_securitycenter_v2::model::Resource;
15217    /// let x = Resource::new().set_name("example");
15218    /// ```
15219    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15220        self.name = v.into();
15221        self
15222    }
15223
15224    /// Sets the value of [display_name][crate::model::Resource::display_name].
15225    ///
15226    /// # Example
15227    /// ```ignore,no_run
15228    /// # use google_cloud_securitycenter_v2::model::Resource;
15229    /// let x = Resource::new().set_display_name("example");
15230    /// ```
15231    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15232        self.display_name = v.into();
15233        self
15234    }
15235
15236    /// Sets the value of [r#type][crate::model::Resource::type].
15237    ///
15238    /// # Example
15239    /// ```ignore,no_run
15240    /// # use google_cloud_securitycenter_v2::model::Resource;
15241    /// let x = Resource::new().set_type("example");
15242    /// ```
15243    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15244        self.r#type = v.into();
15245        self
15246    }
15247
15248    /// Sets the value of [cloud_provider][crate::model::Resource::cloud_provider].
15249    ///
15250    /// # Example
15251    /// ```ignore,no_run
15252    /// # use google_cloud_securitycenter_v2::model::Resource;
15253    /// use google_cloud_securitycenter_v2::model::CloudProvider;
15254    /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
15255    /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
15256    /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
15257    /// ```
15258    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
15259        mut self,
15260        v: T,
15261    ) -> Self {
15262        self.cloud_provider = v.into();
15263        self
15264    }
15265
15266    /// Sets the value of [service][crate::model::Resource::service].
15267    ///
15268    /// # Example
15269    /// ```ignore,no_run
15270    /// # use google_cloud_securitycenter_v2::model::Resource;
15271    /// let x = Resource::new().set_service("example");
15272    /// ```
15273    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15274        self.service = v.into();
15275        self
15276    }
15277
15278    /// Sets the value of [location][crate::model::Resource::location].
15279    ///
15280    /// # Example
15281    /// ```ignore,no_run
15282    /// # use google_cloud_securitycenter_v2::model::Resource;
15283    /// let x = Resource::new().set_location("example");
15284    /// ```
15285    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15286        self.location = v.into();
15287        self
15288    }
15289
15290    /// Sets the value of [resource_path][crate::model::Resource::resource_path].
15291    ///
15292    /// # Example
15293    /// ```ignore,no_run
15294    /// # use google_cloud_securitycenter_v2::model::Resource;
15295    /// use google_cloud_securitycenter_v2::model::ResourcePath;
15296    /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
15297    /// ```
15298    pub fn set_resource_path<T>(mut self, v: T) -> Self
15299    where
15300        T: std::convert::Into<crate::model::ResourcePath>,
15301    {
15302        self.resource_path = std::option::Option::Some(v.into());
15303        self
15304    }
15305
15306    /// Sets or clears the value of [resource_path][crate::model::Resource::resource_path].
15307    ///
15308    /// # Example
15309    /// ```ignore,no_run
15310    /// # use google_cloud_securitycenter_v2::model::Resource;
15311    /// use google_cloud_securitycenter_v2::model::ResourcePath;
15312    /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
15313    /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
15314    /// ```
15315    pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
15316    where
15317        T: std::convert::Into<crate::model::ResourcePath>,
15318    {
15319        self.resource_path = v.map(|x| x.into());
15320        self
15321    }
15322
15323    /// Sets the value of [resource_path_string][crate::model::Resource::resource_path_string].
15324    ///
15325    /// # Example
15326    /// ```ignore,no_run
15327    /// # use google_cloud_securitycenter_v2::model::Resource;
15328    /// let x = Resource::new().set_resource_path_string("example");
15329    /// ```
15330    pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
15331        mut self,
15332        v: T,
15333    ) -> Self {
15334        self.resource_path_string = v.into();
15335        self
15336    }
15337
15338    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata].
15339    ///
15340    /// Note that all the setters affecting `cloud_provider_metadata` are mutually
15341    /// exclusive.
15342    ///
15343    /// # Example
15344    /// ```ignore,no_run
15345    /// # use google_cloud_securitycenter_v2::model::Resource;
15346    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
15347    /// let x = Resource::new().set_cloud_provider_metadata(Some(
15348    ///     google_cloud_securitycenter_v2::model::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
15349    /// ```
15350    pub fn set_cloud_provider_metadata<
15351        T: std::convert::Into<std::option::Option<crate::model::resource::CloudProviderMetadata>>,
15352    >(
15353        mut self,
15354        v: T,
15355    ) -> Self {
15356        self.cloud_provider_metadata = v.into();
15357        self
15358    }
15359
15360    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15361    /// if it holds a `GcpMetadata`, `None` if the field is not set or
15362    /// holds a different branch.
15363    pub fn gcp_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
15364        #[allow(unreachable_patterns)]
15365        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
15366            crate::model::resource::CloudProviderMetadata::GcpMetadata(v) => {
15367                std::option::Option::Some(v)
15368            }
15369            _ => std::option::Option::None,
15370        })
15371    }
15372
15373    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15374    /// to hold a `GcpMetadata`.
15375    ///
15376    /// Note that all the setters affecting `cloud_provider_metadata` are
15377    /// mutually exclusive.
15378    ///
15379    /// # Example
15380    /// ```ignore,no_run
15381    /// # use google_cloud_securitycenter_v2::model::Resource;
15382    /// use google_cloud_securitycenter_v2::model::GcpMetadata;
15383    /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
15384    /// assert!(x.gcp_metadata().is_some());
15385    /// assert!(x.aws_metadata().is_none());
15386    /// assert!(x.azure_metadata().is_none());
15387    /// ```
15388    pub fn set_gcp_metadata<T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>>(
15389        mut self,
15390        v: T,
15391    ) -> Self {
15392        self.cloud_provider_metadata = std::option::Option::Some(
15393            crate::model::resource::CloudProviderMetadata::GcpMetadata(v.into()),
15394        );
15395        self
15396    }
15397
15398    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15399    /// if it holds a `AwsMetadata`, `None` if the field is not set or
15400    /// holds a different branch.
15401    pub fn aws_metadata(&self) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
15402        #[allow(unreachable_patterns)]
15403        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
15404            crate::model::resource::CloudProviderMetadata::AwsMetadata(v) => {
15405                std::option::Option::Some(v)
15406            }
15407            _ => std::option::Option::None,
15408        })
15409    }
15410
15411    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15412    /// to hold a `AwsMetadata`.
15413    ///
15414    /// Note that all the setters affecting `cloud_provider_metadata` are
15415    /// mutually exclusive.
15416    ///
15417    /// # Example
15418    /// ```ignore,no_run
15419    /// # use google_cloud_securitycenter_v2::model::Resource;
15420    /// use google_cloud_securitycenter_v2::model::AwsMetadata;
15421    /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
15422    /// assert!(x.aws_metadata().is_some());
15423    /// assert!(x.gcp_metadata().is_none());
15424    /// assert!(x.azure_metadata().is_none());
15425    /// ```
15426    pub fn set_aws_metadata<T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>>(
15427        mut self,
15428        v: T,
15429    ) -> Self {
15430        self.cloud_provider_metadata = std::option::Option::Some(
15431            crate::model::resource::CloudProviderMetadata::AwsMetadata(v.into()),
15432        );
15433        self
15434    }
15435
15436    /// The value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15437    /// if it holds a `AzureMetadata`, `None` if the field is not set or
15438    /// holds a different branch.
15439    pub fn azure_metadata(
15440        &self,
15441    ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
15442        #[allow(unreachable_patterns)]
15443        self.cloud_provider_metadata.as_ref().and_then(|v| match v {
15444            crate::model::resource::CloudProviderMetadata::AzureMetadata(v) => {
15445                std::option::Option::Some(v)
15446            }
15447            _ => std::option::Option::None,
15448        })
15449    }
15450
15451    /// Sets the value of [cloud_provider_metadata][crate::model::Resource::cloud_provider_metadata]
15452    /// to hold a `AzureMetadata`.
15453    ///
15454    /// Note that all the setters affecting `cloud_provider_metadata` are
15455    /// mutually exclusive.
15456    ///
15457    /// # Example
15458    /// ```ignore,no_run
15459    /// # use google_cloud_securitycenter_v2::model::Resource;
15460    /// use google_cloud_securitycenter_v2::model::AzureMetadata;
15461    /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
15462    /// assert!(x.azure_metadata().is_some());
15463    /// assert!(x.gcp_metadata().is_none());
15464    /// assert!(x.aws_metadata().is_none());
15465    /// ```
15466    pub fn set_azure_metadata<
15467        T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
15468    >(
15469        mut self,
15470        v: T,
15471    ) -> Self {
15472        self.cloud_provider_metadata = std::option::Option::Some(
15473            crate::model::resource::CloudProviderMetadata::AzureMetadata(v.into()),
15474        );
15475        self
15476    }
15477}
15478
15479impl wkt::message::Message for Resource {
15480    fn typename() -> &'static str {
15481        "type.googleapis.com/google.cloud.securitycenter.v2.Resource"
15482    }
15483}
15484
15485/// Defines additional types related to [Resource].
15486pub mod resource {
15487    #[allow(unused_imports)]
15488    use super::*;
15489
15490    /// The metadata associated with the cloud provider.
15491    #[derive(Clone, Debug, PartialEq)]
15492    #[non_exhaustive]
15493    pub enum CloudProviderMetadata {
15494        /// The GCP metadata associated with the finding.
15495        GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
15496        /// The AWS metadata associated with the finding.
15497        AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
15498        /// The Azure metadata associated with the finding.
15499        AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
15500    }
15501}
15502
15503/// Google Cloud metadata associated with the resource. Only applicable if the
15504/// finding's cloud provider is Google Cloud.
15505#[derive(Clone, Default, PartialEq)]
15506#[non_exhaustive]
15507pub struct GcpMetadata {
15508    /// The full resource name of project that the resource belongs to.
15509    pub project: std::string::String,
15510
15511    /// The project ID that the resource belongs to.
15512    pub project_display_name: std::string::String,
15513
15514    /// The full resource name of resource's parent.
15515    pub parent: std::string::String,
15516
15517    /// The human readable name of resource's parent.
15518    pub parent_display_name: std::string::String,
15519
15520    /// Output only. Contains a Folder message for each folder in the assets
15521    /// ancestry. The first folder is the deepest nested folder, and the last
15522    /// folder is the folder directly under the Organization.
15523    pub folders: std::vec::Vec<crate::model::Folder>,
15524
15525    /// The name of the organization that the resource belongs to.
15526    pub organization: std::string::String,
15527
15528    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15529}
15530
15531impl GcpMetadata {
15532    /// Creates a new default instance.
15533    pub fn new() -> Self {
15534        std::default::Default::default()
15535    }
15536
15537    /// Sets the value of [project][crate::model::GcpMetadata::project].
15538    ///
15539    /// # Example
15540    /// ```ignore,no_run
15541    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15542    /// let x = GcpMetadata::new().set_project("example");
15543    /// ```
15544    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15545        self.project = v.into();
15546        self
15547    }
15548
15549    /// Sets the value of [project_display_name][crate::model::GcpMetadata::project_display_name].
15550    ///
15551    /// # Example
15552    /// ```ignore,no_run
15553    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15554    /// let x = GcpMetadata::new().set_project_display_name("example");
15555    /// ```
15556    pub fn set_project_display_name<T: std::convert::Into<std::string::String>>(
15557        mut self,
15558        v: T,
15559    ) -> Self {
15560        self.project_display_name = v.into();
15561        self
15562    }
15563
15564    /// Sets the value of [parent][crate::model::GcpMetadata::parent].
15565    ///
15566    /// # Example
15567    /// ```ignore,no_run
15568    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15569    /// let x = GcpMetadata::new().set_parent("example");
15570    /// ```
15571    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15572        self.parent = v.into();
15573        self
15574    }
15575
15576    /// Sets the value of [parent_display_name][crate::model::GcpMetadata::parent_display_name].
15577    ///
15578    /// # Example
15579    /// ```ignore,no_run
15580    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15581    /// let x = GcpMetadata::new().set_parent_display_name("example");
15582    /// ```
15583    pub fn set_parent_display_name<T: std::convert::Into<std::string::String>>(
15584        mut self,
15585        v: T,
15586    ) -> Self {
15587        self.parent_display_name = v.into();
15588        self
15589    }
15590
15591    /// Sets the value of [folders][crate::model::GcpMetadata::folders].
15592    ///
15593    /// # Example
15594    /// ```ignore,no_run
15595    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15596    /// use google_cloud_securitycenter_v2::model::Folder;
15597    /// let x = GcpMetadata::new()
15598    ///     .set_folders([
15599    ///         Folder::default()/* use setters */,
15600    ///         Folder::default()/* use (different) setters */,
15601    ///     ]);
15602    /// ```
15603    pub fn set_folders<T, V>(mut self, v: T) -> Self
15604    where
15605        T: std::iter::IntoIterator<Item = V>,
15606        V: std::convert::Into<crate::model::Folder>,
15607    {
15608        use std::iter::Iterator;
15609        self.folders = v.into_iter().map(|i| i.into()).collect();
15610        self
15611    }
15612
15613    /// Sets the value of [organization][crate::model::GcpMetadata::organization].
15614    ///
15615    /// # Example
15616    /// ```ignore,no_run
15617    /// # use google_cloud_securitycenter_v2::model::GcpMetadata;
15618    /// let x = GcpMetadata::new().set_organization("example");
15619    /// ```
15620    pub fn set_organization<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15621        self.organization = v.into();
15622        self
15623    }
15624}
15625
15626impl wkt::message::Message for GcpMetadata {
15627    fn typename() -> &'static str {
15628        "type.googleapis.com/google.cloud.securitycenter.v2.GcpMetadata"
15629    }
15630}
15631
15632/// AWS metadata associated with the resource, only applicable if the finding's
15633/// cloud provider is Amazon Web Services.
15634#[derive(Clone, Default, PartialEq)]
15635#[non_exhaustive]
15636pub struct AwsMetadata {
15637    /// The AWS organization associated with the resource.
15638    pub organization: std::option::Option<crate::model::aws_metadata::AwsOrganization>,
15639
15640    /// A list of AWS organizational units associated with the resource, ordered
15641    /// from lowest level (closest to the account) to highest level.
15642    pub organizational_units: std::vec::Vec<crate::model::aws_metadata::AwsOrganizationalUnit>,
15643
15644    /// The AWS account associated with the resource.
15645    pub account: std::option::Option<crate::model::aws_metadata::AwsAccount>,
15646
15647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15648}
15649
15650impl AwsMetadata {
15651    /// Creates a new default instance.
15652    pub fn new() -> Self {
15653        std::default::Default::default()
15654    }
15655
15656    /// Sets the value of [organization][crate::model::AwsMetadata::organization].
15657    ///
15658    /// # Example
15659    /// ```ignore,no_run
15660    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15661    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15662    /// let x = AwsMetadata::new().set_organization(AwsOrganization::default()/* use setters */);
15663    /// ```
15664    pub fn set_organization<T>(mut self, v: T) -> Self
15665    where
15666        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
15667    {
15668        self.organization = std::option::Option::Some(v.into());
15669        self
15670    }
15671
15672    /// Sets or clears the value of [organization][crate::model::AwsMetadata::organization].
15673    ///
15674    /// # Example
15675    /// ```ignore,no_run
15676    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15677    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15678    /// let x = AwsMetadata::new().set_or_clear_organization(Some(AwsOrganization::default()/* use setters */));
15679    /// let x = AwsMetadata::new().set_or_clear_organization(None::<AwsOrganization>);
15680    /// ```
15681    pub fn set_or_clear_organization<T>(mut self, v: std::option::Option<T>) -> Self
15682    where
15683        T: std::convert::Into<crate::model::aws_metadata::AwsOrganization>,
15684    {
15685        self.organization = v.map(|x| x.into());
15686        self
15687    }
15688
15689    /// Sets the value of [organizational_units][crate::model::AwsMetadata::organizational_units].
15690    ///
15691    /// # Example
15692    /// ```ignore,no_run
15693    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15694    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15695    /// let x = AwsMetadata::new()
15696    ///     .set_organizational_units([
15697    ///         AwsOrganizationalUnit::default()/* use setters */,
15698    ///         AwsOrganizationalUnit::default()/* use (different) setters */,
15699    ///     ]);
15700    /// ```
15701    pub fn set_organizational_units<T, V>(mut self, v: T) -> Self
15702    where
15703        T: std::iter::IntoIterator<Item = V>,
15704        V: std::convert::Into<crate::model::aws_metadata::AwsOrganizationalUnit>,
15705    {
15706        use std::iter::Iterator;
15707        self.organizational_units = v.into_iter().map(|i| i.into()).collect();
15708        self
15709    }
15710
15711    /// Sets the value of [account][crate::model::AwsMetadata::account].
15712    ///
15713    /// # Example
15714    /// ```ignore,no_run
15715    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15716    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15717    /// let x = AwsMetadata::new().set_account(AwsAccount::default()/* use setters */);
15718    /// ```
15719    pub fn set_account<T>(mut self, v: T) -> Self
15720    where
15721        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15722    {
15723        self.account = std::option::Option::Some(v.into());
15724        self
15725    }
15726
15727    /// Sets or clears the value of [account][crate::model::AwsMetadata::account].
15728    ///
15729    /// # Example
15730    /// ```ignore,no_run
15731    /// # use google_cloud_securitycenter_v2::model::AwsMetadata;
15732    /// use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15733    /// let x = AwsMetadata::new().set_or_clear_account(Some(AwsAccount::default()/* use setters */));
15734    /// let x = AwsMetadata::new().set_or_clear_account(None::<AwsAccount>);
15735    /// ```
15736    pub fn set_or_clear_account<T>(mut self, v: std::option::Option<T>) -> Self
15737    where
15738        T: std::convert::Into<crate::model::aws_metadata::AwsAccount>,
15739    {
15740        self.account = v.map(|x| x.into());
15741        self
15742    }
15743}
15744
15745impl wkt::message::Message for AwsMetadata {
15746    fn typename() -> &'static str {
15747        "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata"
15748    }
15749}
15750
15751/// Defines additional types related to [AwsMetadata].
15752pub mod aws_metadata {
15753    #[allow(unused_imports)]
15754    use super::*;
15755
15756    /// An organization is a collection of accounts that are centrally managed
15757    /// together using consolidated billing, organized hierarchically with
15758    /// organizational units (OUs), and controlled with policies.
15759    #[derive(Clone, Default, PartialEq)]
15760    #[non_exhaustive]
15761    pub struct AwsOrganization {
15762        /// The unique identifier (ID) for the organization. The regex pattern for an
15763        /// organization ID string requires "o-" followed by from 10 to 32 lowercase
15764        /// letters or digits.
15765        pub id: std::string::String,
15766
15767        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15768    }
15769
15770    impl AwsOrganization {
15771        /// Creates a new default instance.
15772        pub fn new() -> Self {
15773            std::default::Default::default()
15774        }
15775
15776        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganization::id].
15777        ///
15778        /// # Example
15779        /// ```ignore,no_run
15780        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganization;
15781        /// let x = AwsOrganization::new().set_id("example");
15782        /// ```
15783        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15784            self.id = v.into();
15785            self
15786        }
15787    }
15788
15789    impl wkt::message::Message for AwsOrganization {
15790        fn typename() -> &'static str {
15791            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization"
15792        }
15793    }
15794
15795    /// An Organizational Unit (OU) is a container of AWS accounts within a root of
15796    /// an organization. Policies that are attached to an OU apply to all accounts
15797    /// contained in that OU and in any child OUs.
15798    #[derive(Clone, Default, PartialEq)]
15799    #[non_exhaustive]
15800    pub struct AwsOrganizationalUnit {
15801        /// The unique identifier (ID) associated with this OU. The regex pattern for
15802        /// an organizational unit ID string requires "ou-" followed by from 4 to 32
15803        /// lowercase letters or digits (the ID of the root that contains the OU).
15804        /// This string is followed by a second "-" dash and from 8 to 32 additional
15805        /// lowercase letters or digits. For example, "ou-ab12-cd34ef56".
15806        pub id: std::string::String,
15807
15808        /// The friendly name of the OU.
15809        pub name: std::string::String,
15810
15811        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15812    }
15813
15814    impl AwsOrganizationalUnit {
15815        /// Creates a new default instance.
15816        pub fn new() -> Self {
15817            std::default::Default::default()
15818        }
15819
15820        /// Sets the value of [id][crate::model::aws_metadata::AwsOrganizationalUnit::id].
15821        ///
15822        /// # Example
15823        /// ```ignore,no_run
15824        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15825        /// let x = AwsOrganizationalUnit::new().set_id("example");
15826        /// ```
15827        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15828            self.id = v.into();
15829            self
15830        }
15831
15832        /// Sets the value of [name][crate::model::aws_metadata::AwsOrganizationalUnit::name].
15833        ///
15834        /// # Example
15835        /// ```ignore,no_run
15836        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsOrganizationalUnit;
15837        /// let x = AwsOrganizationalUnit::new().set_name("example");
15838        /// ```
15839        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15840            self.name = v.into();
15841            self
15842        }
15843    }
15844
15845    impl wkt::message::Message for AwsOrganizationalUnit {
15846        fn typename() -> &'static str {
15847            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit"
15848        }
15849    }
15850
15851    /// An AWS account that is a member of an organization.
15852    #[derive(Clone, Default, PartialEq)]
15853    #[non_exhaustive]
15854    pub struct AwsAccount {
15855        /// The unique identifier (ID) of the account, containing exactly 12 digits.
15856        pub id: std::string::String,
15857
15858        /// The friendly name of this account.
15859        pub name: std::string::String,
15860
15861        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15862    }
15863
15864    impl AwsAccount {
15865        /// Creates a new default instance.
15866        pub fn new() -> Self {
15867            std::default::Default::default()
15868        }
15869
15870        /// Sets the value of [id][crate::model::aws_metadata::AwsAccount::id].
15871        ///
15872        /// # Example
15873        /// ```ignore,no_run
15874        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15875        /// let x = AwsAccount::new().set_id("example");
15876        /// ```
15877        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15878            self.id = v.into();
15879            self
15880        }
15881
15882        /// Sets the value of [name][crate::model::aws_metadata::AwsAccount::name].
15883        ///
15884        /// # Example
15885        /// ```ignore,no_run
15886        /// # use google_cloud_securitycenter_v2::model::aws_metadata::AwsAccount;
15887        /// let x = AwsAccount::new().set_name("example");
15888        /// ```
15889        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15890            self.name = v.into();
15891            self
15892        }
15893    }
15894
15895    impl wkt::message::Message for AwsAccount {
15896        fn typename() -> &'static str {
15897            "type.googleapis.com/google.cloud.securitycenter.v2.AwsMetadata.AwsAccount"
15898        }
15899    }
15900}
15901
15902/// Azure metadata associated with the resource, only applicable if the finding's
15903/// cloud provider is Microsoft Azure.
15904#[derive(Clone, Default, PartialEq)]
15905#[non_exhaustive]
15906pub struct AzureMetadata {
15907    /// A list of Azure management groups associated with the resource, ordered
15908    /// from lowest level (closest to the subscription) to highest level.
15909    pub management_groups: std::vec::Vec<crate::model::azure_metadata::AzureManagementGroup>,
15910
15911    /// The Azure subscription associated with the resource.
15912    pub subscription: std::option::Option<crate::model::azure_metadata::AzureSubscription>,
15913
15914    /// The Azure resource group associated with the resource.
15915    pub resource_group: std::option::Option<crate::model::azure_metadata::AzureResourceGroup>,
15916
15917    /// The Azure Entra tenant associated with the resource.
15918    pub tenant: std::option::Option<crate::model::azure_metadata::AzureTenant>,
15919
15920    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15921}
15922
15923impl AzureMetadata {
15924    /// Creates a new default instance.
15925    pub fn new() -> Self {
15926        std::default::Default::default()
15927    }
15928
15929    /// Sets the value of [management_groups][crate::model::AzureMetadata::management_groups].
15930    ///
15931    /// # Example
15932    /// ```ignore,no_run
15933    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15934    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
15935    /// let x = AzureMetadata::new()
15936    ///     .set_management_groups([
15937    ///         AzureManagementGroup::default()/* use setters */,
15938    ///         AzureManagementGroup::default()/* use (different) setters */,
15939    ///     ]);
15940    /// ```
15941    pub fn set_management_groups<T, V>(mut self, v: T) -> Self
15942    where
15943        T: std::iter::IntoIterator<Item = V>,
15944        V: std::convert::Into<crate::model::azure_metadata::AzureManagementGroup>,
15945    {
15946        use std::iter::Iterator;
15947        self.management_groups = v.into_iter().map(|i| i.into()).collect();
15948        self
15949    }
15950
15951    /// Sets the value of [subscription][crate::model::AzureMetadata::subscription].
15952    ///
15953    /// # Example
15954    /// ```ignore,no_run
15955    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15956    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15957    /// let x = AzureMetadata::new().set_subscription(AzureSubscription::default()/* use setters */);
15958    /// ```
15959    pub fn set_subscription<T>(mut self, v: T) -> Self
15960    where
15961        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15962    {
15963        self.subscription = std::option::Option::Some(v.into());
15964        self
15965    }
15966
15967    /// Sets or clears the value of [subscription][crate::model::AzureMetadata::subscription].
15968    ///
15969    /// # Example
15970    /// ```ignore,no_run
15971    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15972    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
15973    /// let x = AzureMetadata::new().set_or_clear_subscription(Some(AzureSubscription::default()/* use setters */));
15974    /// let x = AzureMetadata::new().set_or_clear_subscription(None::<AzureSubscription>);
15975    /// ```
15976    pub fn set_or_clear_subscription<T>(mut self, v: std::option::Option<T>) -> Self
15977    where
15978        T: std::convert::Into<crate::model::azure_metadata::AzureSubscription>,
15979    {
15980        self.subscription = v.map(|x| x.into());
15981        self
15982    }
15983
15984    /// Sets the value of [resource_group][crate::model::AzureMetadata::resource_group].
15985    ///
15986    /// # Example
15987    /// ```ignore,no_run
15988    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
15989    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
15990    /// let x = AzureMetadata::new().set_resource_group(AzureResourceGroup::default()/* use setters */);
15991    /// ```
15992    pub fn set_resource_group<T>(mut self, v: T) -> Self
15993    where
15994        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
15995    {
15996        self.resource_group = std::option::Option::Some(v.into());
15997        self
15998    }
15999
16000    /// Sets or clears the value of [resource_group][crate::model::AzureMetadata::resource_group].
16001    ///
16002    /// # Example
16003    /// ```ignore,no_run
16004    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
16005    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
16006    /// let x = AzureMetadata::new().set_or_clear_resource_group(Some(AzureResourceGroup::default()/* use setters */));
16007    /// let x = AzureMetadata::new().set_or_clear_resource_group(None::<AzureResourceGroup>);
16008    /// ```
16009    pub fn set_or_clear_resource_group<T>(mut self, v: std::option::Option<T>) -> Self
16010    where
16011        T: std::convert::Into<crate::model::azure_metadata::AzureResourceGroup>,
16012    {
16013        self.resource_group = v.map(|x| x.into());
16014        self
16015    }
16016
16017    /// Sets the value of [tenant][crate::model::AzureMetadata::tenant].
16018    ///
16019    /// # Example
16020    /// ```ignore,no_run
16021    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
16022    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
16023    /// let x = AzureMetadata::new().set_tenant(AzureTenant::default()/* use setters */);
16024    /// ```
16025    pub fn set_tenant<T>(mut self, v: T) -> Self
16026    where
16027        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
16028    {
16029        self.tenant = std::option::Option::Some(v.into());
16030        self
16031    }
16032
16033    /// Sets or clears the value of [tenant][crate::model::AzureMetadata::tenant].
16034    ///
16035    /// # Example
16036    /// ```ignore,no_run
16037    /// # use google_cloud_securitycenter_v2::model::AzureMetadata;
16038    /// use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
16039    /// let x = AzureMetadata::new().set_or_clear_tenant(Some(AzureTenant::default()/* use setters */));
16040    /// let x = AzureMetadata::new().set_or_clear_tenant(None::<AzureTenant>);
16041    /// ```
16042    pub fn set_or_clear_tenant<T>(mut self, v: std::option::Option<T>) -> Self
16043    where
16044        T: std::convert::Into<crate::model::azure_metadata::AzureTenant>,
16045    {
16046        self.tenant = v.map(|x| x.into());
16047        self
16048    }
16049}
16050
16051impl wkt::message::Message for AzureMetadata {
16052    fn typename() -> &'static str {
16053        "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata"
16054    }
16055}
16056
16057/// Defines additional types related to [AzureMetadata].
16058pub mod azure_metadata {
16059    #[allow(unused_imports)]
16060    use super::*;
16061
16062    /// Represents an Azure management group.
16063    #[derive(Clone, Default, PartialEq)]
16064    #[non_exhaustive]
16065    pub struct AzureManagementGroup {
16066        /// The UUID of the Azure management group, for example,
16067        /// `20000000-0001-0000-0000-000000000000`.
16068        pub id: std::string::String,
16069
16070        /// The display name of the Azure management group.
16071        pub display_name: std::string::String,
16072
16073        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16074    }
16075
16076    impl AzureManagementGroup {
16077        /// Creates a new default instance.
16078        pub fn new() -> Self {
16079            std::default::Default::default()
16080        }
16081
16082        /// Sets the value of [id][crate::model::azure_metadata::AzureManagementGroup::id].
16083        ///
16084        /// # Example
16085        /// ```ignore,no_run
16086        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
16087        /// let x = AzureManagementGroup::new().set_id("example");
16088        /// ```
16089        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16090            self.id = v.into();
16091            self
16092        }
16093
16094        /// Sets the value of [display_name][crate::model::azure_metadata::AzureManagementGroup::display_name].
16095        ///
16096        /// # Example
16097        /// ```ignore,no_run
16098        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureManagementGroup;
16099        /// let x = AzureManagementGroup::new().set_display_name("example");
16100        /// ```
16101        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
16102            mut self,
16103            v: T,
16104        ) -> Self {
16105            self.display_name = v.into();
16106            self
16107        }
16108    }
16109
16110    impl wkt::message::Message for AzureManagementGroup {
16111        fn typename() -> &'static str {
16112            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup"
16113        }
16114    }
16115
16116    /// Represents an Azure subscription.
16117    #[derive(Clone, Default, PartialEq)]
16118    #[non_exhaustive]
16119    pub struct AzureSubscription {
16120        /// The UUID of the Azure subscription, for example,
16121        /// `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
16122        pub id: std::string::String,
16123
16124        /// The display name of the Azure subscription.
16125        pub display_name: std::string::String,
16126
16127        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16128    }
16129
16130    impl AzureSubscription {
16131        /// Creates a new default instance.
16132        pub fn new() -> Self {
16133            std::default::Default::default()
16134        }
16135
16136        /// Sets the value of [id][crate::model::azure_metadata::AzureSubscription::id].
16137        ///
16138        /// # Example
16139        /// ```ignore,no_run
16140        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
16141        /// let x = AzureSubscription::new().set_id("example");
16142        /// ```
16143        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16144            self.id = v.into();
16145            self
16146        }
16147
16148        /// Sets the value of [display_name][crate::model::azure_metadata::AzureSubscription::display_name].
16149        ///
16150        /// # Example
16151        /// ```ignore,no_run
16152        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureSubscription;
16153        /// let x = AzureSubscription::new().set_display_name("example");
16154        /// ```
16155        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
16156            mut self,
16157            v: T,
16158        ) -> Self {
16159            self.display_name = v.into();
16160            self
16161        }
16162    }
16163
16164    impl wkt::message::Message for AzureSubscription {
16165        fn typename() -> &'static str {
16166            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription"
16167        }
16168    }
16169
16170    /// Represents an Azure resource group.
16171    #[derive(Clone, Default, PartialEq)]
16172    #[non_exhaustive]
16173    pub struct AzureResourceGroup {
16174        /// The ID of the Azure resource group.
16175        pub id: std::string::String,
16176
16177        /// The name of the Azure resource group. This is not a UUID.
16178        pub name: std::string::String,
16179
16180        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16181    }
16182
16183    impl AzureResourceGroup {
16184        /// Creates a new default instance.
16185        pub fn new() -> Self {
16186            std::default::Default::default()
16187        }
16188
16189        /// Sets the value of [id][crate::model::azure_metadata::AzureResourceGroup::id].
16190        ///
16191        /// # Example
16192        /// ```ignore,no_run
16193        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
16194        /// let x = AzureResourceGroup::new().set_id("example");
16195        /// ```
16196        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16197            self.id = v.into();
16198            self
16199        }
16200
16201        /// Sets the value of [name][crate::model::azure_metadata::AzureResourceGroup::name].
16202        ///
16203        /// # Example
16204        /// ```ignore,no_run
16205        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureResourceGroup;
16206        /// let x = AzureResourceGroup::new().set_name("example");
16207        /// ```
16208        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16209            self.name = v.into();
16210            self
16211        }
16212    }
16213
16214    impl wkt::message::Message for AzureResourceGroup {
16215        fn typename() -> &'static str {
16216            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup"
16217        }
16218    }
16219
16220    /// Represents a Microsoft Entra tenant.
16221    #[derive(Clone, Default, PartialEq)]
16222    #[non_exhaustive]
16223    pub struct AzureTenant {
16224        /// The ID of the Microsoft Entra tenant, for example,
16225        /// "a11aaa11-aa11-1aa1-11aa-1aaa11a".
16226        pub id: std::string::String,
16227
16228        /// The display name of the Azure tenant.
16229        pub display_name: std::string::String,
16230
16231        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16232    }
16233
16234    impl AzureTenant {
16235        /// Creates a new default instance.
16236        pub fn new() -> Self {
16237            std::default::Default::default()
16238        }
16239
16240        /// Sets the value of [id][crate::model::azure_metadata::AzureTenant::id].
16241        ///
16242        /// # Example
16243        /// ```ignore,no_run
16244        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
16245        /// let x = AzureTenant::new().set_id("example");
16246        /// ```
16247        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16248            self.id = v.into();
16249            self
16250        }
16251
16252        /// Sets the value of [display_name][crate::model::azure_metadata::AzureTenant::display_name].
16253        ///
16254        /// # Example
16255        /// ```ignore,no_run
16256        /// # use google_cloud_securitycenter_v2::model::azure_metadata::AzureTenant;
16257        /// let x = AzureTenant::new().set_display_name("example");
16258        /// ```
16259        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
16260            mut self,
16261            v: T,
16262        ) -> Self {
16263            self.display_name = v.into();
16264            self
16265        }
16266    }
16267
16268    impl wkt::message::Message for AzureTenant {
16269        fn typename() -> &'static str {
16270            "type.googleapis.com/google.cloud.securitycenter.v2.AzureMetadata.AzureTenant"
16271        }
16272    }
16273}
16274
16275/// Represents the path of resources leading up to the resource this finding is
16276/// about.
16277#[derive(Clone, Default, PartialEq)]
16278#[non_exhaustive]
16279pub struct ResourcePath {
16280    /// The list of nodes that make the up resource path, ordered from lowest
16281    /// level to highest level.
16282    pub nodes: std::vec::Vec<crate::model::resource_path::ResourcePathNode>,
16283
16284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16285}
16286
16287impl ResourcePath {
16288    /// Creates a new default instance.
16289    pub fn new() -> Self {
16290        std::default::Default::default()
16291    }
16292
16293    /// Sets the value of [nodes][crate::model::ResourcePath::nodes].
16294    ///
16295    /// # Example
16296    /// ```ignore,no_run
16297    /// # use google_cloud_securitycenter_v2::model::ResourcePath;
16298    /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
16299    /// let x = ResourcePath::new()
16300    ///     .set_nodes([
16301    ///         ResourcePathNode::default()/* use setters */,
16302    ///         ResourcePathNode::default()/* use (different) setters */,
16303    ///     ]);
16304    /// ```
16305    pub fn set_nodes<T, V>(mut self, v: T) -> Self
16306    where
16307        T: std::iter::IntoIterator<Item = V>,
16308        V: std::convert::Into<crate::model::resource_path::ResourcePathNode>,
16309    {
16310        use std::iter::Iterator;
16311        self.nodes = v.into_iter().map(|i| i.into()).collect();
16312        self
16313    }
16314}
16315
16316impl wkt::message::Message for ResourcePath {
16317    fn typename() -> &'static str {
16318        "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath"
16319    }
16320}
16321
16322/// Defines additional types related to [ResourcePath].
16323pub mod resource_path {
16324    #[allow(unused_imports)]
16325    use super::*;
16326
16327    /// A node within the resource path. Each node represents a resource within the
16328    /// resource hierarchy.
16329    #[derive(Clone, Default, PartialEq)]
16330    #[non_exhaustive]
16331    pub struct ResourcePathNode {
16332        /// The type of resource this node represents.
16333        pub node_type: crate::model::resource_path::ResourcePathNodeType,
16334
16335        /// The ID of the resource this node represents.
16336        pub id: std::string::String,
16337
16338        /// The display name of the resource this node represents.
16339        pub display_name: std::string::String,
16340
16341        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16342    }
16343
16344    impl ResourcePathNode {
16345        /// Creates a new default instance.
16346        pub fn new() -> Self {
16347            std::default::Default::default()
16348        }
16349
16350        /// Sets the value of [node_type][crate::model::resource_path::ResourcePathNode::node_type].
16351        ///
16352        /// # Example
16353        /// ```ignore,no_run
16354        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
16355        /// use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNodeType;
16356        /// let x0 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpOrganization);
16357        /// let x1 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpFolder);
16358        /// let x2 = ResourcePathNode::new().set_node_type(ResourcePathNodeType::GcpProject);
16359        /// ```
16360        pub fn set_node_type<
16361            T: std::convert::Into<crate::model::resource_path::ResourcePathNodeType>,
16362        >(
16363            mut self,
16364            v: T,
16365        ) -> Self {
16366            self.node_type = v.into();
16367            self
16368        }
16369
16370        /// Sets the value of [id][crate::model::resource_path::ResourcePathNode::id].
16371        ///
16372        /// # Example
16373        /// ```ignore,no_run
16374        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
16375        /// let x = ResourcePathNode::new().set_id("example");
16376        /// ```
16377        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16378            self.id = v.into();
16379            self
16380        }
16381
16382        /// Sets the value of [display_name][crate::model::resource_path::ResourcePathNode::display_name].
16383        ///
16384        /// # Example
16385        /// ```ignore,no_run
16386        /// # use google_cloud_securitycenter_v2::model::resource_path::ResourcePathNode;
16387        /// let x = ResourcePathNode::new().set_display_name("example");
16388        /// ```
16389        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
16390            mut self,
16391            v: T,
16392        ) -> Self {
16393            self.display_name = v.into();
16394            self
16395        }
16396    }
16397
16398    impl wkt::message::Message for ResourcePathNode {
16399        fn typename() -> &'static str {
16400            "type.googleapis.com/google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode"
16401        }
16402    }
16403
16404    /// The type of resource the node represents.
16405    ///
16406    /// # Working with unknown values
16407    ///
16408    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16409    /// additional enum variants at any time. Adding new variants is not considered
16410    /// a breaking change. Applications should write their code in anticipation of:
16411    ///
16412    /// - New values appearing in future releases of the client library, **and**
16413    /// - New values received dynamically, without application changes.
16414    ///
16415    /// Please consult the [Working with enums] section in the user guide for some
16416    /// guidelines.
16417    ///
16418    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16419    #[derive(Clone, Debug, PartialEq)]
16420    #[non_exhaustive]
16421    pub enum ResourcePathNodeType {
16422        /// Node type is unspecified.
16423        Unspecified,
16424        /// The node represents a Google Cloud organization.
16425        GcpOrganization,
16426        /// The node represents a Google Cloud folder.
16427        GcpFolder,
16428        /// The node represents a Google Cloud project.
16429        GcpProject,
16430        /// The node represents an AWS organization.
16431        AwsOrganization,
16432        /// The node represents an AWS organizational unit.
16433        AwsOrganizationalUnit,
16434        /// The node represents an AWS account.
16435        AwsAccount,
16436        /// The node represents an Azure management group.
16437        AzureManagementGroup,
16438        /// The node represents an Azure subscription.
16439        AzureSubscription,
16440        /// The node represents an Azure resource group.
16441        AzureResourceGroup,
16442        /// If set, the enum was initialized with an unknown value.
16443        ///
16444        /// Applications can examine the value using [ResourcePathNodeType::value] or
16445        /// [ResourcePathNodeType::name].
16446        UnknownValue(resource_path_node_type::UnknownValue),
16447    }
16448
16449    #[doc(hidden)]
16450    pub mod resource_path_node_type {
16451        #[allow(unused_imports)]
16452        use super::*;
16453        #[derive(Clone, Debug, PartialEq)]
16454        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16455    }
16456
16457    impl ResourcePathNodeType {
16458        /// Gets the enum value.
16459        ///
16460        /// Returns `None` if the enum contains an unknown value deserialized from
16461        /// the string representation of enums.
16462        pub fn value(&self) -> std::option::Option<i32> {
16463            match self {
16464                Self::Unspecified => std::option::Option::Some(0),
16465                Self::GcpOrganization => std::option::Option::Some(1),
16466                Self::GcpFolder => std::option::Option::Some(2),
16467                Self::GcpProject => std::option::Option::Some(3),
16468                Self::AwsOrganization => std::option::Option::Some(4),
16469                Self::AwsOrganizationalUnit => std::option::Option::Some(5),
16470                Self::AwsAccount => std::option::Option::Some(6),
16471                Self::AzureManagementGroup => std::option::Option::Some(7),
16472                Self::AzureSubscription => std::option::Option::Some(8),
16473                Self::AzureResourceGroup => std::option::Option::Some(9),
16474                Self::UnknownValue(u) => u.0.value(),
16475            }
16476        }
16477
16478        /// Gets the enum value as a string.
16479        ///
16480        /// Returns `None` if the enum contains an unknown value deserialized from
16481        /// the integer representation of enums.
16482        pub fn name(&self) -> std::option::Option<&str> {
16483            match self {
16484                Self::Unspecified => {
16485                    std::option::Option::Some("RESOURCE_PATH_NODE_TYPE_UNSPECIFIED")
16486                }
16487                Self::GcpOrganization => std::option::Option::Some("GCP_ORGANIZATION"),
16488                Self::GcpFolder => std::option::Option::Some("GCP_FOLDER"),
16489                Self::GcpProject => std::option::Option::Some("GCP_PROJECT"),
16490                Self::AwsOrganization => std::option::Option::Some("AWS_ORGANIZATION"),
16491                Self::AwsOrganizationalUnit => std::option::Option::Some("AWS_ORGANIZATIONAL_UNIT"),
16492                Self::AwsAccount => std::option::Option::Some("AWS_ACCOUNT"),
16493                Self::AzureManagementGroup => std::option::Option::Some("AZURE_MANAGEMENT_GROUP"),
16494                Self::AzureSubscription => std::option::Option::Some("AZURE_SUBSCRIPTION"),
16495                Self::AzureResourceGroup => std::option::Option::Some("AZURE_RESOURCE_GROUP"),
16496                Self::UnknownValue(u) => u.0.name(),
16497            }
16498        }
16499    }
16500
16501    impl std::default::Default for ResourcePathNodeType {
16502        fn default() -> Self {
16503            use std::convert::From;
16504            Self::from(0)
16505        }
16506    }
16507
16508    impl std::fmt::Display for ResourcePathNodeType {
16509        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16510            wkt::internal::display_enum(f, self.name(), self.value())
16511        }
16512    }
16513
16514    impl std::convert::From<i32> for ResourcePathNodeType {
16515        fn from(value: i32) -> Self {
16516            match value {
16517                0 => Self::Unspecified,
16518                1 => Self::GcpOrganization,
16519                2 => Self::GcpFolder,
16520                3 => Self::GcpProject,
16521                4 => Self::AwsOrganization,
16522                5 => Self::AwsOrganizationalUnit,
16523                6 => Self::AwsAccount,
16524                7 => Self::AzureManagementGroup,
16525                8 => Self::AzureSubscription,
16526                9 => Self::AzureResourceGroup,
16527                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
16528                    wkt::internal::UnknownEnumValue::Integer(value),
16529                )),
16530            }
16531        }
16532    }
16533
16534    impl std::convert::From<&str> for ResourcePathNodeType {
16535        fn from(value: &str) -> Self {
16536            use std::string::ToString;
16537            match value {
16538                "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
16539                "GCP_ORGANIZATION" => Self::GcpOrganization,
16540                "GCP_FOLDER" => Self::GcpFolder,
16541                "GCP_PROJECT" => Self::GcpProject,
16542                "AWS_ORGANIZATION" => Self::AwsOrganization,
16543                "AWS_ORGANIZATIONAL_UNIT" => Self::AwsOrganizationalUnit,
16544                "AWS_ACCOUNT" => Self::AwsAccount,
16545                "AZURE_MANAGEMENT_GROUP" => Self::AzureManagementGroup,
16546                "AZURE_SUBSCRIPTION" => Self::AzureSubscription,
16547                "AZURE_RESOURCE_GROUP" => Self::AzureResourceGroup,
16548                _ => Self::UnknownValue(resource_path_node_type::UnknownValue(
16549                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16550                )),
16551            }
16552        }
16553    }
16554
16555    impl serde::ser::Serialize for ResourcePathNodeType {
16556        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16557        where
16558            S: serde::Serializer,
16559        {
16560            match self {
16561                Self::Unspecified => serializer.serialize_i32(0),
16562                Self::GcpOrganization => serializer.serialize_i32(1),
16563                Self::GcpFolder => serializer.serialize_i32(2),
16564                Self::GcpProject => serializer.serialize_i32(3),
16565                Self::AwsOrganization => serializer.serialize_i32(4),
16566                Self::AwsOrganizationalUnit => serializer.serialize_i32(5),
16567                Self::AwsAccount => serializer.serialize_i32(6),
16568                Self::AzureManagementGroup => serializer.serialize_i32(7),
16569                Self::AzureSubscription => serializer.serialize_i32(8),
16570                Self::AzureResourceGroup => serializer.serialize_i32(9),
16571                Self::UnknownValue(u) => u.0.serialize(serializer),
16572            }
16573        }
16574    }
16575
16576    impl<'de> serde::de::Deserialize<'de> for ResourcePathNodeType {
16577        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16578        where
16579            D: serde::Deserializer<'de>,
16580        {
16581            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourcePathNodeType>::new(
16582                ".google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType",
16583            ))
16584        }
16585    }
16586}
16587
16588/// A resource value configuration (RVC) is a mapping configuration of user's
16589/// resources to resource values. Used in Attack path simulations.
16590#[derive(Clone, Default, PartialEq)]
16591#[non_exhaustive]
16592pub struct ResourceValueConfig {
16593    /// Identifier. Name for the resource value configuration
16594    pub name: std::string::String,
16595
16596    /// Resource value level this expression represents
16597    /// Only required when there is no Sensitive Data Protection mapping in the
16598    /// request
16599    pub resource_value: crate::model::ResourceValue,
16600
16601    /// Tag values combined with `AND` to check against.
16602    /// For Google Cloud resources, they are tag value IDs in the form of
16603    /// "tagValues/123". Example: `[ "tagValues/123", "tagValues/456",
16604    /// "tagValues/789" ]`
16605    /// <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing>
16606    pub tag_values: std::vec::Vec<std::string::String>,
16607
16608    /// Apply resource_value only to resources that match resource_type.
16609    /// resource_type will be checked with `AND` of other resources.
16610    /// For example, "storage.googleapis.com/Bucket" with resource_value "HIGH"
16611    /// will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources.
16612    pub resource_type: std::string::String,
16613
16614    /// Project or folder to scope this configuration to.
16615    /// For example, "project/456" would apply this configuration only to resources
16616    /// in "project/456" scope and will be checked with `AND` of other resources.
16617    pub scope: std::string::String,
16618
16619    /// List of resource labels to search for, evaluated with `AND`.
16620    /// For example, "resource_labels_selector": {"key": "value", "env": "prod"}
16621    /// will match resources with labels "key": "value" `AND` "env":
16622    /// "prod"
16623    /// <https://cloud.google.com/resource-manager/docs/creating-managing-labels>
16624    pub resource_labels_selector:
16625        std::collections::HashMap<std::string::String, std::string::String>,
16626
16627    /// Description of the resource value configuration.
16628    pub description: std::string::String,
16629
16630    /// Output only. Timestamp this resource value configuration was created.
16631    pub create_time: std::option::Option<wkt::Timestamp>,
16632
16633    /// Output only. Timestamp this resource value configuration was last updated.
16634    pub update_time: std::option::Option<wkt::Timestamp>,
16635
16636    /// Cloud provider this configuration applies to
16637    pub cloud_provider: crate::model::CloudProvider,
16638
16639    /// A mapping of the sensitivity on Sensitive Data Protection finding to
16640    /// resource values. This mapping can only be used in combination with a
16641    /// resource_type that is related to BigQuery, e.g.
16642    /// "bigquery.googleapis.com/Dataset".
16643    pub sensitive_data_protection_mapping:
16644        std::option::Option<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16645
16646    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16647}
16648
16649impl ResourceValueConfig {
16650    /// Creates a new default instance.
16651    pub fn new() -> Self {
16652        std::default::Default::default()
16653    }
16654
16655    /// Sets the value of [name][crate::model::ResourceValueConfig::name].
16656    ///
16657    /// # Example
16658    /// ```ignore,no_run
16659    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16660    /// # let organization_id = "organization_id";
16661    /// # let resource_value_config_id = "resource_value_config_id";
16662    /// let x = ResourceValueConfig::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
16663    /// ```
16664    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16665        self.name = v.into();
16666        self
16667    }
16668
16669    /// Sets the value of [resource_value][crate::model::ResourceValueConfig::resource_value].
16670    ///
16671    /// # Example
16672    /// ```ignore,no_run
16673    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16674    /// use google_cloud_securitycenter_v2::model::ResourceValue;
16675    /// let x0 = ResourceValueConfig::new().set_resource_value(ResourceValue::High);
16676    /// let x1 = ResourceValueConfig::new().set_resource_value(ResourceValue::Medium);
16677    /// let x2 = ResourceValueConfig::new().set_resource_value(ResourceValue::Low);
16678    /// ```
16679    pub fn set_resource_value<T: std::convert::Into<crate::model::ResourceValue>>(
16680        mut self,
16681        v: T,
16682    ) -> Self {
16683        self.resource_value = v.into();
16684        self
16685    }
16686
16687    /// Sets the value of [tag_values][crate::model::ResourceValueConfig::tag_values].
16688    ///
16689    /// # Example
16690    /// ```ignore,no_run
16691    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16692    /// let x = ResourceValueConfig::new().set_tag_values(["a", "b", "c"]);
16693    /// ```
16694    pub fn set_tag_values<T, V>(mut self, v: T) -> Self
16695    where
16696        T: std::iter::IntoIterator<Item = V>,
16697        V: std::convert::Into<std::string::String>,
16698    {
16699        use std::iter::Iterator;
16700        self.tag_values = v.into_iter().map(|i| i.into()).collect();
16701        self
16702    }
16703
16704    /// Sets the value of [resource_type][crate::model::ResourceValueConfig::resource_type].
16705    ///
16706    /// # Example
16707    /// ```ignore,no_run
16708    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16709    /// let x = ResourceValueConfig::new().set_resource_type("example");
16710    /// ```
16711    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16712        self.resource_type = v.into();
16713        self
16714    }
16715
16716    /// Sets the value of [scope][crate::model::ResourceValueConfig::scope].
16717    ///
16718    /// # Example
16719    /// ```ignore,no_run
16720    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16721    /// let x = ResourceValueConfig::new().set_scope("example");
16722    /// ```
16723    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16724        self.scope = v.into();
16725        self
16726    }
16727
16728    /// Sets the value of [resource_labels_selector][crate::model::ResourceValueConfig::resource_labels_selector].
16729    ///
16730    /// # Example
16731    /// ```ignore,no_run
16732    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16733    /// let x = ResourceValueConfig::new().set_resource_labels_selector([
16734    ///     ("key0", "abc"),
16735    ///     ("key1", "xyz"),
16736    /// ]);
16737    /// ```
16738    pub fn set_resource_labels_selector<T, K, V>(mut self, v: T) -> Self
16739    where
16740        T: std::iter::IntoIterator<Item = (K, V)>,
16741        K: std::convert::Into<std::string::String>,
16742        V: std::convert::Into<std::string::String>,
16743    {
16744        use std::iter::Iterator;
16745        self.resource_labels_selector = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16746        self
16747    }
16748
16749    /// Sets the value of [description][crate::model::ResourceValueConfig::description].
16750    ///
16751    /// # Example
16752    /// ```ignore,no_run
16753    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16754    /// let x = ResourceValueConfig::new().set_description("example");
16755    /// ```
16756    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16757        self.description = v.into();
16758        self
16759    }
16760
16761    /// Sets the value of [create_time][crate::model::ResourceValueConfig::create_time].
16762    ///
16763    /// # Example
16764    /// ```ignore,no_run
16765    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16766    /// use wkt::Timestamp;
16767    /// let x = ResourceValueConfig::new().set_create_time(Timestamp::default()/* use setters */);
16768    /// ```
16769    pub fn set_create_time<T>(mut self, v: T) -> Self
16770    where
16771        T: std::convert::Into<wkt::Timestamp>,
16772    {
16773        self.create_time = std::option::Option::Some(v.into());
16774        self
16775    }
16776
16777    /// Sets or clears the value of [create_time][crate::model::ResourceValueConfig::create_time].
16778    ///
16779    /// # Example
16780    /// ```ignore,no_run
16781    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16782    /// use wkt::Timestamp;
16783    /// let x = ResourceValueConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16784    /// let x = ResourceValueConfig::new().set_or_clear_create_time(None::<Timestamp>);
16785    /// ```
16786    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16787    where
16788        T: std::convert::Into<wkt::Timestamp>,
16789    {
16790        self.create_time = v.map(|x| x.into());
16791        self
16792    }
16793
16794    /// Sets the value of [update_time][crate::model::ResourceValueConfig::update_time].
16795    ///
16796    /// # Example
16797    /// ```ignore,no_run
16798    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16799    /// use wkt::Timestamp;
16800    /// let x = ResourceValueConfig::new().set_update_time(Timestamp::default()/* use setters */);
16801    /// ```
16802    pub fn set_update_time<T>(mut self, v: T) -> Self
16803    where
16804        T: std::convert::Into<wkt::Timestamp>,
16805    {
16806        self.update_time = std::option::Option::Some(v.into());
16807        self
16808    }
16809
16810    /// Sets or clears the value of [update_time][crate::model::ResourceValueConfig::update_time].
16811    ///
16812    /// # Example
16813    /// ```ignore,no_run
16814    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16815    /// use wkt::Timestamp;
16816    /// let x = ResourceValueConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16817    /// let x = ResourceValueConfig::new().set_or_clear_update_time(None::<Timestamp>);
16818    /// ```
16819    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16820    where
16821        T: std::convert::Into<wkt::Timestamp>,
16822    {
16823        self.update_time = v.map(|x| x.into());
16824        self
16825    }
16826
16827    /// Sets the value of [cloud_provider][crate::model::ResourceValueConfig::cloud_provider].
16828    ///
16829    /// # Example
16830    /// ```ignore,no_run
16831    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16832    /// use google_cloud_securitycenter_v2::model::CloudProvider;
16833    /// let x0 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
16834    /// let x1 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::AmazonWebServices);
16835    /// let x2 = ResourceValueConfig::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
16836    /// ```
16837    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
16838        mut self,
16839        v: T,
16840    ) -> Self {
16841        self.cloud_provider = v.into();
16842        self
16843    }
16844
16845    /// Sets the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16846    ///
16847    /// # Example
16848    /// ```ignore,no_run
16849    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16850    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16851    /// let x = ResourceValueConfig::new().set_sensitive_data_protection_mapping(SensitiveDataProtectionMapping::default()/* use setters */);
16852    /// ```
16853    pub fn set_sensitive_data_protection_mapping<T>(mut self, v: T) -> Self
16854    where
16855        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16856    {
16857        self.sensitive_data_protection_mapping = std::option::Option::Some(v.into());
16858        self
16859    }
16860
16861    /// Sets or clears the value of [sensitive_data_protection_mapping][crate::model::ResourceValueConfig::sensitive_data_protection_mapping].
16862    ///
16863    /// # Example
16864    /// ```ignore,no_run
16865    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfig;
16866    /// use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16867    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(Some(SensitiveDataProtectionMapping::default()/* use setters */));
16868    /// let x = ResourceValueConfig::new().set_or_clear_sensitive_data_protection_mapping(None::<SensitiveDataProtectionMapping>);
16869    /// ```
16870    pub fn set_or_clear_sensitive_data_protection_mapping<T>(
16871        mut self,
16872        v: std::option::Option<T>,
16873    ) -> Self
16874    where
16875        T: std::convert::Into<crate::model::resource_value_config::SensitiveDataProtectionMapping>,
16876    {
16877        self.sensitive_data_protection_mapping = v.map(|x| x.into());
16878        self
16879    }
16880}
16881
16882impl wkt::message::Message for ResourceValueConfig {
16883    fn typename() -> &'static str {
16884        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig"
16885    }
16886}
16887
16888/// Defines additional types related to [ResourceValueConfig].
16889pub mod resource_value_config {
16890    #[allow(unused_imports)]
16891    use super::*;
16892
16893    /// Resource value mapping for Sensitive Data Protection findings
16894    /// If any of these mappings have a resource value that is not unspecified,
16895    /// the resource_value field will be ignored when reading this configuration.
16896    #[derive(Clone, Default, PartialEq)]
16897    #[non_exhaustive]
16898    pub struct SensitiveDataProtectionMapping {
16899        /// Resource value mapping for high-sensitivity Sensitive Data Protection
16900        /// findings
16901        pub high_sensitivity_mapping: crate::model::ResourceValue,
16902
16903        /// Resource value mapping for medium-sensitivity Sensitive Data Protection
16904        /// findings
16905        pub medium_sensitivity_mapping: crate::model::ResourceValue,
16906
16907        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16908    }
16909
16910    impl SensitiveDataProtectionMapping {
16911        /// Creates a new default instance.
16912        pub fn new() -> Self {
16913            std::default::Default::default()
16914        }
16915
16916        /// Sets the value of [high_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::high_sensitivity_mapping].
16917        ///
16918        /// # Example
16919        /// ```ignore,no_run
16920        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16921        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16922        /// let x0 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::High);
16923        /// let x1 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Medium);
16924        /// let x2 = SensitiveDataProtectionMapping::new().set_high_sensitivity_mapping(ResourceValue::Low);
16925        /// ```
16926        pub fn set_high_sensitivity_mapping<T: std::convert::Into<crate::model::ResourceValue>>(
16927            mut self,
16928            v: T,
16929        ) -> Self {
16930            self.high_sensitivity_mapping = v.into();
16931            self
16932        }
16933
16934        /// Sets the value of [medium_sensitivity_mapping][crate::model::resource_value_config::SensitiveDataProtectionMapping::medium_sensitivity_mapping].
16935        ///
16936        /// # Example
16937        /// ```ignore,no_run
16938        /// # use google_cloud_securitycenter_v2::model::resource_value_config::SensitiveDataProtectionMapping;
16939        /// use google_cloud_securitycenter_v2::model::ResourceValue;
16940        /// let x0 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::High);
16941        /// let x1 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Medium);
16942        /// let x2 = SensitiveDataProtectionMapping::new().set_medium_sensitivity_mapping(ResourceValue::Low);
16943        /// ```
16944        pub fn set_medium_sensitivity_mapping<
16945            T: std::convert::Into<crate::model::ResourceValue>,
16946        >(
16947            mut self,
16948            v: T,
16949        ) -> Self {
16950            self.medium_sensitivity_mapping = v.into();
16951            self
16952        }
16953    }
16954
16955    impl wkt::message::Message for SensitiveDataProtectionMapping {
16956        fn typename() -> &'static str {
16957            "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping"
16958        }
16959    }
16960}
16961
16962/// User specified security marks that are attached to the parent Security
16963/// Command Center resource. Security marks are scoped within a Security Command
16964/// Center organization -- they can be modified and viewed by all users who have
16965/// proper permissions on the organization.
16966#[derive(Clone, Default, PartialEq)]
16967#[non_exhaustive]
16968pub struct SecurityMarks {
16969    /// The relative resource name of the SecurityMarks. See:
16970    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
16971    /// The following list shows some examples:
16972    ///
16973    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16974    ///
16975    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16976    /// +
16977    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16978    pub name: std::string::String,
16979
16980    /// Mutable user specified security marks belonging to the parent resource.
16981    /// Constraints are as follows:
16982    ///
16983    /// * Keys and values are treated as case insensitive
16984    /// * Keys must be between 1 - 256 characters (inclusive)
16985    /// * Keys must be letters, numbers, underscores, or dashes
16986    /// * Values have leading and trailing whitespace trimmed, remaining
16987    ///   characters must be between 1 - 4096 characters (inclusive)
16988    pub marks: std::collections::HashMap<std::string::String, std::string::String>,
16989
16990    /// The canonical name of the marks. The following list shows some examples:
16991    ///
16992    /// + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
16993    ///
16994    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
16995    /// +
16996    /// `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
16997    ///
16998    /// + `folders/{folder_id}/assets/{asset_id}/securityMarks`
16999    ///
17000    /// `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
17001    /// +
17002    /// `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
17003    ///
17004    /// + `projects/{project_number}/assets/{asset_id}/securityMarks`
17005    ///
17006    /// `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
17007    /// +
17008    /// `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
17009    pub canonical_name: std::string::String,
17010
17011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17012}
17013
17014impl SecurityMarks {
17015    /// Creates a new default instance.
17016    pub fn new() -> Self {
17017        std::default::Default::default()
17018    }
17019
17020    /// Sets the value of [name][crate::model::SecurityMarks::name].
17021    ///
17022    /// # Example
17023    /// ```ignore,no_run
17024    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
17025    /// # let organization_id = "organization_id";
17026    /// # let asset_id = "asset_id";
17027    /// let x = SecurityMarks::new().set_name(format!("organizations/{organization_id}/assets/{asset_id}/securityMarks"));
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 [marks][crate::model::SecurityMarks::marks].
17035    ///
17036    /// # Example
17037    /// ```ignore,no_run
17038    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
17039    /// let x = SecurityMarks::new().set_marks([
17040    ///     ("key0", "abc"),
17041    ///     ("key1", "xyz"),
17042    /// ]);
17043    /// ```
17044    pub fn set_marks<T, K, V>(mut self, v: T) -> Self
17045    where
17046        T: std::iter::IntoIterator<Item = (K, V)>,
17047        K: std::convert::Into<std::string::String>,
17048        V: std::convert::Into<std::string::String>,
17049    {
17050        use std::iter::Iterator;
17051        self.marks = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17052        self
17053    }
17054
17055    /// Sets the value of [canonical_name][crate::model::SecurityMarks::canonical_name].
17056    ///
17057    /// # Example
17058    /// ```ignore,no_run
17059    /// # use google_cloud_securitycenter_v2::model::SecurityMarks;
17060    /// let x = SecurityMarks::new().set_canonical_name("example");
17061    /// ```
17062    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17063        self.canonical_name = v.into();
17064        self
17065    }
17066}
17067
17068impl wkt::message::Message for SecurityMarks {
17069    fn typename() -> &'static str {
17070        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityMarks"
17071    }
17072}
17073
17074/// Represents a posture that is deployed on Google Cloud by the
17075/// Security Command Center Posture Management service.
17076/// A posture contains one or more policy sets. A policy set is a
17077/// group of policies that enforce a set of security rules on Google
17078/// Cloud.
17079#[derive(Clone, Default, PartialEq)]
17080#[non_exhaustive]
17081pub struct SecurityPosture {
17082    /// Name of the posture, for example, `CIS-Posture`.
17083    pub name: std::string::String,
17084
17085    /// The version of the posture, for example, `c7cfa2a8`.
17086    pub revision_id: std::string::String,
17087
17088    /// The project, folder, or organization on which the posture is deployed,
17089    /// for example, `projects/{project_number}`.
17090    pub posture_deployment_resource: std::string::String,
17091
17092    /// The name of the posture deployment, for example,
17093    /// `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.
17094    pub posture_deployment: std::string::String,
17095
17096    /// The name of the updated policy, for example,
17097    /// `projects/{project_id}/policies/{constraint_name}`.
17098    pub changed_policy: std::string::String,
17099
17100    /// The name of the updated policy set, for example, `cis-policyset`.
17101    pub policy_set: std::string::String,
17102
17103    /// The ID of the updated policy, for example, `compute-policy-1`.
17104    pub policy: std::string::String,
17105
17106    /// The details about a change in an updated policy that violates the deployed
17107    /// posture.
17108    pub policy_drift_details: std::vec::Vec<crate::model::security_posture::PolicyDriftDetails>,
17109
17110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17111}
17112
17113impl SecurityPosture {
17114    /// Creates a new default instance.
17115    pub fn new() -> Self {
17116        std::default::Default::default()
17117    }
17118
17119    /// Sets the value of [name][crate::model::SecurityPosture::name].
17120    ///
17121    /// # Example
17122    /// ```ignore,no_run
17123    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17124    /// let x = SecurityPosture::new().set_name("example");
17125    /// ```
17126    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17127        self.name = v.into();
17128        self
17129    }
17130
17131    /// Sets the value of [revision_id][crate::model::SecurityPosture::revision_id].
17132    ///
17133    /// # Example
17134    /// ```ignore,no_run
17135    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17136    /// let x = SecurityPosture::new().set_revision_id("example");
17137    /// ```
17138    pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17139        self.revision_id = v.into();
17140        self
17141    }
17142
17143    /// Sets the value of [posture_deployment_resource][crate::model::SecurityPosture::posture_deployment_resource].
17144    ///
17145    /// # Example
17146    /// ```ignore,no_run
17147    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17148    /// let x = SecurityPosture::new().set_posture_deployment_resource("example");
17149    /// ```
17150    pub fn set_posture_deployment_resource<T: std::convert::Into<std::string::String>>(
17151        mut self,
17152        v: T,
17153    ) -> Self {
17154        self.posture_deployment_resource = v.into();
17155        self
17156    }
17157
17158    /// Sets the value of [posture_deployment][crate::model::SecurityPosture::posture_deployment].
17159    ///
17160    /// # Example
17161    /// ```ignore,no_run
17162    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17163    /// let x = SecurityPosture::new().set_posture_deployment("example");
17164    /// ```
17165    pub fn set_posture_deployment<T: std::convert::Into<std::string::String>>(
17166        mut self,
17167        v: T,
17168    ) -> Self {
17169        self.posture_deployment = v.into();
17170        self
17171    }
17172
17173    /// Sets the value of [changed_policy][crate::model::SecurityPosture::changed_policy].
17174    ///
17175    /// # Example
17176    /// ```ignore,no_run
17177    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17178    /// let x = SecurityPosture::new().set_changed_policy("example");
17179    /// ```
17180    pub fn set_changed_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17181        self.changed_policy = v.into();
17182        self
17183    }
17184
17185    /// Sets the value of [policy_set][crate::model::SecurityPosture::policy_set].
17186    ///
17187    /// # Example
17188    /// ```ignore,no_run
17189    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17190    /// let x = SecurityPosture::new().set_policy_set("example");
17191    /// ```
17192    pub fn set_policy_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17193        self.policy_set = v.into();
17194        self
17195    }
17196
17197    /// Sets the value of [policy][crate::model::SecurityPosture::policy].
17198    ///
17199    /// # Example
17200    /// ```ignore,no_run
17201    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17202    /// let x = SecurityPosture::new().set_policy("example");
17203    /// ```
17204    pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17205        self.policy = v.into();
17206        self
17207    }
17208
17209    /// Sets the value of [policy_drift_details][crate::model::SecurityPosture::policy_drift_details].
17210    ///
17211    /// # Example
17212    /// ```ignore,no_run
17213    /// # use google_cloud_securitycenter_v2::model::SecurityPosture;
17214    /// use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
17215    /// let x = SecurityPosture::new()
17216    ///     .set_policy_drift_details([
17217    ///         PolicyDriftDetails::default()/* use setters */,
17218    ///         PolicyDriftDetails::default()/* use (different) setters */,
17219    ///     ]);
17220    /// ```
17221    pub fn set_policy_drift_details<T, V>(mut self, v: T) -> Self
17222    where
17223        T: std::iter::IntoIterator<Item = V>,
17224        V: std::convert::Into<crate::model::security_posture::PolicyDriftDetails>,
17225    {
17226        use std::iter::Iterator;
17227        self.policy_drift_details = v.into_iter().map(|i| i.into()).collect();
17228        self
17229    }
17230}
17231
17232impl wkt::message::Message for SecurityPosture {
17233    fn typename() -> &'static str {
17234        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture"
17235    }
17236}
17237
17238/// Defines additional types related to [SecurityPosture].
17239pub mod security_posture {
17240    #[allow(unused_imports)]
17241    use super::*;
17242
17243    /// The policy field that violates the deployed posture and its expected and
17244    /// detected values.
17245    #[derive(Clone, Default, PartialEq)]
17246    #[non_exhaustive]
17247    pub struct PolicyDriftDetails {
17248        /// The name of the updated field, for example
17249        /// constraint.implementation.policy_rules[0].enforce
17250        pub field: std::string::String,
17251
17252        /// The value of this field that was configured in a posture, for example,
17253        /// `true` or `allowed_values={"projects/29831892"}`.
17254        pub expected_value: std::string::String,
17255
17256        /// The detected value that violates the deployed posture, for example,
17257        /// `false` or `allowed_values={"projects/22831892"}`.
17258        pub detected_value: std::string::String,
17259
17260        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17261    }
17262
17263    impl PolicyDriftDetails {
17264        /// Creates a new default instance.
17265        pub fn new() -> Self {
17266            std::default::Default::default()
17267        }
17268
17269        /// Sets the value of [field][crate::model::security_posture::PolicyDriftDetails::field].
17270        ///
17271        /// # Example
17272        /// ```ignore,no_run
17273        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
17274        /// let x = PolicyDriftDetails::new().set_field("example");
17275        /// ```
17276        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17277            self.field = v.into();
17278            self
17279        }
17280
17281        /// Sets the value of [expected_value][crate::model::security_posture::PolicyDriftDetails::expected_value].
17282        ///
17283        /// # Example
17284        /// ```ignore,no_run
17285        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
17286        /// let x = PolicyDriftDetails::new().set_expected_value("example");
17287        /// ```
17288        pub fn set_expected_value<T: std::convert::Into<std::string::String>>(
17289            mut self,
17290            v: T,
17291        ) -> Self {
17292            self.expected_value = v.into();
17293            self
17294        }
17295
17296        /// Sets the value of [detected_value][crate::model::security_posture::PolicyDriftDetails::detected_value].
17297        ///
17298        /// # Example
17299        /// ```ignore,no_run
17300        /// # use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
17301        /// let x = PolicyDriftDetails::new().set_detected_value("example");
17302        /// ```
17303        pub fn set_detected_value<T: std::convert::Into<std::string::String>>(
17304            mut self,
17305            v: T,
17306        ) -> Self {
17307            self.detected_value = v.into();
17308            self
17309        }
17310    }
17311
17312    impl wkt::message::Message for PolicyDriftDetails {
17313        fn typename() -> &'static str {
17314            "type.googleapis.com/google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails"
17315        }
17316    }
17317}
17318
17319/// Request message to create multiple resource value configs
17320#[derive(Clone, Default, PartialEq)]
17321#[non_exhaustive]
17322pub struct BatchCreateResourceValueConfigsRequest {
17323    /// Required. Resource name of the new ResourceValueConfig's parent.
17324    /// The parent field in the CreateResourceValueConfigRequest
17325    /// messages must either be empty or match this field.
17326    pub parent: std::string::String,
17327
17328    /// Required. The resource value configs to be created.
17329    pub requests: std::vec::Vec<crate::model::CreateResourceValueConfigRequest>,
17330
17331    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17332}
17333
17334impl BatchCreateResourceValueConfigsRequest {
17335    /// Creates a new default instance.
17336    pub fn new() -> Self {
17337        std::default::Default::default()
17338    }
17339
17340    /// Sets the value of [parent][crate::model::BatchCreateResourceValueConfigsRequest::parent].
17341    ///
17342    /// # Example
17343    /// ```ignore,no_run
17344    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
17345    /// # let organization_id = "organization_id";
17346    /// let x = BatchCreateResourceValueConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
17347    /// ```
17348    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17349        self.parent = v.into();
17350        self
17351    }
17352
17353    /// Sets the value of [requests][crate::model::BatchCreateResourceValueConfigsRequest::requests].
17354    ///
17355    /// # Example
17356    /// ```ignore,no_run
17357    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsRequest;
17358    /// use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
17359    /// let x = BatchCreateResourceValueConfigsRequest::new()
17360    ///     .set_requests([
17361    ///         CreateResourceValueConfigRequest::default()/* use setters */,
17362    ///         CreateResourceValueConfigRequest::default()/* use (different) setters */,
17363    ///     ]);
17364    /// ```
17365    pub fn set_requests<T, V>(mut self, v: T) -> Self
17366    where
17367        T: std::iter::IntoIterator<Item = V>,
17368        V: std::convert::Into<crate::model::CreateResourceValueConfigRequest>,
17369    {
17370        use std::iter::Iterator;
17371        self.requests = v.into_iter().map(|i| i.into()).collect();
17372        self
17373    }
17374}
17375
17376impl wkt::message::Message for BatchCreateResourceValueConfigsRequest {
17377    fn typename() -> &'static str {
17378        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest"
17379    }
17380}
17381
17382/// Response message for BatchCreateResourceValueConfigs
17383#[derive(Clone, Default, PartialEq)]
17384#[non_exhaustive]
17385pub struct BatchCreateResourceValueConfigsResponse {
17386    /// The resource value configs created
17387    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
17388
17389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17390}
17391
17392impl BatchCreateResourceValueConfigsResponse {
17393    /// Creates a new default instance.
17394    pub fn new() -> Self {
17395        std::default::Default::default()
17396    }
17397
17398    /// Sets the value of [resource_value_configs][crate::model::BatchCreateResourceValueConfigsResponse::resource_value_configs].
17399    ///
17400    /// # Example
17401    /// ```ignore,no_run
17402    /// # use google_cloud_securitycenter_v2::model::BatchCreateResourceValueConfigsResponse;
17403    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
17404    /// let x = BatchCreateResourceValueConfigsResponse::new()
17405    ///     .set_resource_value_configs([
17406    ///         ResourceValueConfig::default()/* use setters */,
17407    ///         ResourceValueConfig::default()/* use (different) setters */,
17408    ///     ]);
17409    /// ```
17410    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
17411    where
17412        T: std::iter::IntoIterator<Item = V>,
17413        V: std::convert::Into<crate::model::ResourceValueConfig>,
17414    {
17415        use std::iter::Iterator;
17416        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
17417        self
17418    }
17419}
17420
17421impl wkt::message::Message for BatchCreateResourceValueConfigsResponse {
17422    fn typename() -> &'static str {
17423        "type.googleapis.com/google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse"
17424    }
17425}
17426
17427/// Request message for bulk findings update.
17428///
17429/// Note:
17430///
17431/// 1. If multiple bulk update requests match the same resource, the order in
17432///    which they get executed is not defined.
17433/// 1. Once a bulk operation is started, there is no way to stop it.
17434#[derive(Clone, Default, PartialEq)]
17435#[non_exhaustive]
17436pub struct BulkMuteFindingsRequest {
17437    /// Required. The parent, at which bulk action needs to be applied. If no
17438    /// location is specified, findings are updated in global. The following list
17439    /// shows some examples:
17440    ///
17441    /// + `organizations/[organization_id]`
17442    /// + `organizations/[organization_id]/locations/[location_id]`
17443    /// + `folders/[folder_id]`
17444    /// + `folders/[folder_id]/locations/[location_id]`
17445    /// + `projects/[project_id]`
17446    /// + `projects/[project_id]/locations/[location_id]`
17447    pub parent: std::string::String,
17448
17449    /// Expression that identifies findings that should be updated.
17450    /// The expression is a list of zero or more restrictions combined
17451    /// via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
17452    /// has higher precedence than `AND`.
17453    ///
17454    /// Restrictions have the form `<field> <operator> <value>` and may have a
17455    /// `-` character in front of them to indicate negation. The fields map to
17456    /// those defined in the corresponding resource.
17457    ///
17458    /// The supported operators are:
17459    ///
17460    /// * `=` for all value types.
17461    /// * `>`, `<`, `>=`, `<=` for integer values.
17462    /// * `:`, meaning substring matching, for strings.
17463    ///
17464    /// The supported value types are:
17465    ///
17466    /// * string literals in quotes.
17467    /// * integer literals without quotes.
17468    /// * boolean literals `true` and `false` without quotes.
17469    pub filter: std::string::String,
17470
17471    /// Optional. All findings matching the given filter will have their mute state
17472    /// set to this value. The default value is `MUTED`. Setting this to
17473    /// `UNDEFINED` will clear the mute state on all matching findings.
17474    pub mute_state: crate::model::bulk_mute_findings_request::MuteState,
17475
17476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17477}
17478
17479impl BulkMuteFindingsRequest {
17480    /// Creates a new default instance.
17481    pub fn new() -> Self {
17482        std::default::Default::default()
17483    }
17484
17485    /// Sets the value of [parent][crate::model::BulkMuteFindingsRequest::parent].
17486    ///
17487    /// # Example
17488    /// ```ignore,no_run
17489    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
17490    /// let x = BulkMuteFindingsRequest::new().set_parent("example");
17491    /// ```
17492    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17493        self.parent = v.into();
17494        self
17495    }
17496
17497    /// Sets the value of [filter][crate::model::BulkMuteFindingsRequest::filter].
17498    ///
17499    /// # Example
17500    /// ```ignore,no_run
17501    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
17502    /// let x = BulkMuteFindingsRequest::new().set_filter("example");
17503    /// ```
17504    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17505        self.filter = v.into();
17506        self
17507    }
17508
17509    /// Sets the value of [mute_state][crate::model::BulkMuteFindingsRequest::mute_state].
17510    ///
17511    /// # Example
17512    /// ```ignore,no_run
17513    /// # use google_cloud_securitycenter_v2::model::BulkMuteFindingsRequest;
17514    /// use google_cloud_securitycenter_v2::model::bulk_mute_findings_request::MuteState;
17515    /// let x0 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Muted);
17516    /// let x1 = BulkMuteFindingsRequest::new().set_mute_state(MuteState::Undefined);
17517    /// ```
17518    pub fn set_mute_state<
17519        T: std::convert::Into<crate::model::bulk_mute_findings_request::MuteState>,
17520    >(
17521        mut self,
17522        v: T,
17523    ) -> Self {
17524        self.mute_state = v.into();
17525        self
17526    }
17527}
17528
17529impl wkt::message::Message for BulkMuteFindingsRequest {
17530    fn typename() -> &'static str {
17531        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsRequest"
17532    }
17533}
17534
17535/// Defines additional types related to [BulkMuteFindingsRequest].
17536pub mod bulk_mute_findings_request {
17537    #[allow(unused_imports)]
17538    use super::*;
17539
17540    /// The mute state.
17541    ///
17542    /// # Working with unknown values
17543    ///
17544    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17545    /// additional enum variants at any time. Adding new variants is not considered
17546    /// a breaking change. Applications should write their code in anticipation of:
17547    ///
17548    /// - New values appearing in future releases of the client library, **and**
17549    /// - New values received dynamically, without application changes.
17550    ///
17551    /// Please consult the [Working with enums] section in the user guide for some
17552    /// guidelines.
17553    ///
17554    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17555    #[derive(Clone, Debug, PartialEq)]
17556    #[non_exhaustive]
17557    pub enum MuteState {
17558        /// Unused.
17559        Unspecified,
17560        /// Matching findings will be muted (default).
17561        Muted,
17562        /// Matching findings will have their mute state cleared.
17563        Undefined,
17564        /// If set, the enum was initialized with an unknown value.
17565        ///
17566        /// Applications can examine the value using [MuteState::value] or
17567        /// [MuteState::name].
17568        UnknownValue(mute_state::UnknownValue),
17569    }
17570
17571    #[doc(hidden)]
17572    pub mod mute_state {
17573        #[allow(unused_imports)]
17574        use super::*;
17575        #[derive(Clone, Debug, PartialEq)]
17576        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17577    }
17578
17579    impl MuteState {
17580        /// Gets the enum value.
17581        ///
17582        /// Returns `None` if the enum contains an unknown value deserialized from
17583        /// the string representation of enums.
17584        pub fn value(&self) -> std::option::Option<i32> {
17585            match self {
17586                Self::Unspecified => std::option::Option::Some(0),
17587                Self::Muted => std::option::Option::Some(1),
17588                Self::Undefined => std::option::Option::Some(2),
17589                Self::UnknownValue(u) => u.0.value(),
17590            }
17591        }
17592
17593        /// Gets the enum value as a string.
17594        ///
17595        /// Returns `None` if the enum contains an unknown value deserialized from
17596        /// the integer representation of enums.
17597        pub fn name(&self) -> std::option::Option<&str> {
17598            match self {
17599                Self::Unspecified => std::option::Option::Some("MUTE_STATE_UNSPECIFIED"),
17600                Self::Muted => std::option::Option::Some("MUTED"),
17601                Self::Undefined => std::option::Option::Some("UNDEFINED"),
17602                Self::UnknownValue(u) => u.0.name(),
17603            }
17604        }
17605    }
17606
17607    impl std::default::Default for MuteState {
17608        fn default() -> Self {
17609            use std::convert::From;
17610            Self::from(0)
17611        }
17612    }
17613
17614    impl std::fmt::Display for MuteState {
17615        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17616            wkt::internal::display_enum(f, self.name(), self.value())
17617        }
17618    }
17619
17620    impl std::convert::From<i32> for MuteState {
17621        fn from(value: i32) -> Self {
17622            match value {
17623                0 => Self::Unspecified,
17624                1 => Self::Muted,
17625                2 => Self::Undefined,
17626                _ => Self::UnknownValue(mute_state::UnknownValue(
17627                    wkt::internal::UnknownEnumValue::Integer(value),
17628                )),
17629            }
17630        }
17631    }
17632
17633    impl std::convert::From<&str> for MuteState {
17634        fn from(value: &str) -> Self {
17635            use std::string::ToString;
17636            match value {
17637                "MUTE_STATE_UNSPECIFIED" => Self::Unspecified,
17638                "MUTED" => Self::Muted,
17639                "UNDEFINED" => Self::Undefined,
17640                _ => Self::UnknownValue(mute_state::UnknownValue(
17641                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17642                )),
17643            }
17644        }
17645    }
17646
17647    impl serde::ser::Serialize for MuteState {
17648        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17649        where
17650            S: serde::Serializer,
17651        {
17652            match self {
17653                Self::Unspecified => serializer.serialize_i32(0),
17654                Self::Muted => serializer.serialize_i32(1),
17655                Self::Undefined => serializer.serialize_i32(2),
17656                Self::UnknownValue(u) => u.0.serialize(serializer),
17657            }
17658        }
17659    }
17660
17661    impl<'de> serde::de::Deserialize<'de> for MuteState {
17662        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17663        where
17664            D: serde::Deserializer<'de>,
17665        {
17666            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MuteState>::new(
17667                ".google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState",
17668            ))
17669        }
17670    }
17671}
17672
17673/// The response to a BulkMute request. Contains the LRO information.
17674#[derive(Clone, Default, PartialEq)]
17675#[non_exhaustive]
17676pub struct BulkMuteFindingsResponse {
17677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17678}
17679
17680impl BulkMuteFindingsResponse {
17681    /// Creates a new default instance.
17682    pub fn new() -> Self {
17683        std::default::Default::default()
17684    }
17685}
17686
17687impl wkt::message::Message for BulkMuteFindingsResponse {
17688    fn typename() -> &'static str {
17689        "type.googleapis.com/google.cloud.securitycenter.v2.BulkMuteFindingsResponse"
17690    }
17691}
17692
17693/// Request message for creating a BigQuery export.
17694#[derive(Clone, Default, PartialEq)]
17695#[non_exhaustive]
17696pub struct CreateBigQueryExportRequest {
17697    /// Required. The name of the parent resource of the new BigQuery export. Its
17698    /// format is `organizations/[organization_id]/locations/[location_id]`,
17699    /// `folders/[folder_id]/locations/[location_id]`, or
17700    /// `projects/[project_id]/locations/[location_id]`.
17701    pub parent: std::string::String,
17702
17703    /// Required. The BigQuery export being created.
17704    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
17705
17706    /// Required. Unique identifier provided by the client within the parent scope.
17707    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17708    /// with a letter, must end with either a letter or a number, and must be 63
17709    /// characters or less.
17710    pub big_query_export_id: std::string::String,
17711
17712    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17713}
17714
17715impl CreateBigQueryExportRequest {
17716    /// Creates a new default instance.
17717    pub fn new() -> Self {
17718        std::default::Default::default()
17719    }
17720
17721    /// Sets the value of [parent][crate::model::CreateBigQueryExportRequest::parent].
17722    ///
17723    /// # Example
17724    /// ```ignore,no_run
17725    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17726    /// # let organization_id = "organization_id";
17727    /// # let location_id = "location_id";
17728    /// let x = CreateBigQueryExportRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
17729    /// ```
17730    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17731        self.parent = v.into();
17732        self
17733    }
17734
17735    /// Sets the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17736    ///
17737    /// # Example
17738    /// ```ignore,no_run
17739    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17740    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17741    /// let x = CreateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
17742    /// ```
17743    pub fn set_big_query_export<T>(mut self, v: T) -> Self
17744    where
17745        T: std::convert::Into<crate::model::BigQueryExport>,
17746    {
17747        self.big_query_export = std::option::Option::Some(v.into());
17748        self
17749    }
17750
17751    /// Sets or clears the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
17752    ///
17753    /// # Example
17754    /// ```ignore,no_run
17755    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17756    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
17757    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
17758    /// let x = CreateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
17759    /// ```
17760    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
17761    where
17762        T: std::convert::Into<crate::model::BigQueryExport>,
17763    {
17764        self.big_query_export = v.map(|x| x.into());
17765        self
17766    }
17767
17768    /// Sets the value of [big_query_export_id][crate::model::CreateBigQueryExportRequest::big_query_export_id].
17769    ///
17770    /// # Example
17771    /// ```ignore,no_run
17772    /// # use google_cloud_securitycenter_v2::model::CreateBigQueryExportRequest;
17773    /// let x = CreateBigQueryExportRequest::new().set_big_query_export_id("example");
17774    /// ```
17775    pub fn set_big_query_export_id<T: std::convert::Into<std::string::String>>(
17776        mut self,
17777        v: T,
17778    ) -> Self {
17779        self.big_query_export_id = v.into();
17780        self
17781    }
17782}
17783
17784impl wkt::message::Message for CreateBigQueryExportRequest {
17785    fn typename() -> &'static str {
17786        "type.googleapis.com/google.cloud.securitycenter.v2.CreateBigQueryExportRequest"
17787    }
17788}
17789
17790/// Request message for creating a finding.
17791#[derive(Clone, Default, PartialEq)]
17792#[non_exhaustive]
17793pub struct CreateFindingRequest {
17794    /// Required. Resource name of the new finding's parent. The following list
17795    /// shows some examples of the format:
17796    /// +
17797    /// `organizations/[organization_id]/sources/[source_id]`
17798    /// +
17799    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
17800    pub parent: std::string::String,
17801
17802    /// Required. Unique identifier provided by the client within the parent scope.
17803    /// It must be alphanumeric and less than or equal to 32 characters and
17804    /// greater than 0 characters in length.
17805    pub finding_id: std::string::String,
17806
17807    /// Required. The Finding being created. The name and security_marks will be
17808    /// ignored as they are both output only fields on this resource.
17809    pub finding: std::option::Option<crate::model::Finding>,
17810
17811    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17812}
17813
17814impl CreateFindingRequest {
17815    /// Creates a new default instance.
17816    pub fn new() -> Self {
17817        std::default::Default::default()
17818    }
17819
17820    /// Sets the value of [parent][crate::model::CreateFindingRequest::parent].
17821    ///
17822    /// # Example
17823    /// ```ignore,no_run
17824    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17825    /// # let organization_id = "organization_id";
17826    /// # let source_id = "source_id";
17827    /// let x = CreateFindingRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
17828    /// ```
17829    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17830        self.parent = v.into();
17831        self
17832    }
17833
17834    /// Sets the value of [finding_id][crate::model::CreateFindingRequest::finding_id].
17835    ///
17836    /// # Example
17837    /// ```ignore,no_run
17838    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17839    /// let x = CreateFindingRequest::new().set_finding_id("example");
17840    /// ```
17841    pub fn set_finding_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17842        self.finding_id = v.into();
17843        self
17844    }
17845
17846    /// Sets the value of [finding][crate::model::CreateFindingRequest::finding].
17847    ///
17848    /// # Example
17849    /// ```ignore,no_run
17850    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17851    /// use google_cloud_securitycenter_v2::model::Finding;
17852    /// let x = CreateFindingRequest::new().set_finding(Finding::default()/* use setters */);
17853    /// ```
17854    pub fn set_finding<T>(mut self, v: T) -> Self
17855    where
17856        T: std::convert::Into<crate::model::Finding>,
17857    {
17858        self.finding = std::option::Option::Some(v.into());
17859        self
17860    }
17861
17862    /// Sets or clears the value of [finding][crate::model::CreateFindingRequest::finding].
17863    ///
17864    /// # Example
17865    /// ```ignore,no_run
17866    /// # use google_cloud_securitycenter_v2::model::CreateFindingRequest;
17867    /// use google_cloud_securitycenter_v2::model::Finding;
17868    /// let x = CreateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
17869    /// let x = CreateFindingRequest::new().set_or_clear_finding(None::<Finding>);
17870    /// ```
17871    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
17872    where
17873        T: std::convert::Into<crate::model::Finding>,
17874    {
17875        self.finding = v.map(|x| x.into());
17876        self
17877    }
17878}
17879
17880impl wkt::message::Message for CreateFindingRequest {
17881    fn typename() -> &'static str {
17882        "type.googleapis.com/google.cloud.securitycenter.v2.CreateFindingRequest"
17883    }
17884}
17885
17886/// Request message for creating a mute config.
17887#[derive(Clone, Default, PartialEq)]
17888#[non_exhaustive]
17889pub struct CreateMuteConfigRequest {
17890    /// Required. Resource name of the new mute configs's parent. Its format is
17891    /// `organizations/[organization_id]/locations/[location_id]`,
17892    /// `folders/[folder_id]/locations/[location_id]`, or
17893    /// `projects/[project_id]/locations/[location_id]`.
17894    pub parent: std::string::String,
17895
17896    /// Required. The mute config being created.
17897    pub mute_config: std::option::Option<crate::model::MuteConfig>,
17898
17899    /// Required. Unique identifier provided by the client within the parent scope.
17900    /// It must consist of only lowercase letters, numbers, and hyphens, must start
17901    /// with a letter, must end with either a letter or a number, and must be 63
17902    /// characters or less.
17903    pub mute_config_id: std::string::String,
17904
17905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17906}
17907
17908impl CreateMuteConfigRequest {
17909    /// Creates a new default instance.
17910    pub fn new() -> Self {
17911        std::default::Default::default()
17912    }
17913
17914    /// Sets the value of [parent][crate::model::CreateMuteConfigRequest::parent].
17915    ///
17916    /// # Example
17917    /// ```ignore,no_run
17918    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17919    /// # let organization_id = "organization_id";
17920    /// let x = CreateMuteConfigRequest::new().set_parent(format!("organizations/{organization_id}"));
17921    /// ```
17922    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17923        self.parent = v.into();
17924        self
17925    }
17926
17927    /// Sets the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17928    ///
17929    /// # Example
17930    /// ```ignore,no_run
17931    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17932    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17933    /// let x = CreateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
17934    /// ```
17935    pub fn set_mute_config<T>(mut self, v: T) -> Self
17936    where
17937        T: std::convert::Into<crate::model::MuteConfig>,
17938    {
17939        self.mute_config = std::option::Option::Some(v.into());
17940        self
17941    }
17942
17943    /// Sets or clears the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
17944    ///
17945    /// # Example
17946    /// ```ignore,no_run
17947    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17948    /// use google_cloud_securitycenter_v2::model::MuteConfig;
17949    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
17950    /// let x = CreateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
17951    /// ```
17952    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
17953    where
17954        T: std::convert::Into<crate::model::MuteConfig>,
17955    {
17956        self.mute_config = v.map(|x| x.into());
17957        self
17958    }
17959
17960    /// Sets the value of [mute_config_id][crate::model::CreateMuteConfigRequest::mute_config_id].
17961    ///
17962    /// # Example
17963    /// ```ignore,no_run
17964    /// # use google_cloud_securitycenter_v2::model::CreateMuteConfigRequest;
17965    /// let x = CreateMuteConfigRequest::new().set_mute_config_id("example");
17966    /// ```
17967    pub fn set_mute_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17968        self.mute_config_id = v.into();
17969        self
17970    }
17971}
17972
17973impl wkt::message::Message for CreateMuteConfigRequest {
17974    fn typename() -> &'static str {
17975        "type.googleapis.com/google.cloud.securitycenter.v2.CreateMuteConfigRequest"
17976    }
17977}
17978
17979/// Request message for creating a notification config.
17980#[derive(Clone, Default, PartialEq)]
17981#[non_exhaustive]
17982pub struct CreateNotificationConfigRequest {
17983    /// Required. Resource name of the new notification config's parent. Its format
17984    /// is `organizations/[organization_id]/locations/[location_id]`,
17985    /// `folders/[folder_id]/locations/[location_id]`, or
17986    /// `projects/[project_id]/locations/[location_id]`.
17987    pub parent: std::string::String,
17988
17989    /// Required.
17990    /// Unique identifier provided by the client within the parent scope.
17991    /// It must be between 1 and 128 characters and contain alphanumeric
17992    /// characters, underscores, or hyphens only.
17993    pub config_id: std::string::String,
17994
17995    /// Required. The notification config being created. The name and the service
17996    /// account will be ignored as they are both output only fields on this
17997    /// resource.
17998    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
17999
18000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18001}
18002
18003impl CreateNotificationConfigRequest {
18004    /// Creates a new default instance.
18005    pub fn new() -> Self {
18006        std::default::Default::default()
18007    }
18008
18009    /// Sets the value of [parent][crate::model::CreateNotificationConfigRequest::parent].
18010    ///
18011    /// # Example
18012    /// ```ignore,no_run
18013    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
18014    /// # let organization_id = "organization_id";
18015    /// # let location_id = "location_id";
18016    /// let x = CreateNotificationConfigRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
18017    /// ```
18018    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18019        self.parent = v.into();
18020        self
18021    }
18022
18023    /// Sets the value of [config_id][crate::model::CreateNotificationConfigRequest::config_id].
18024    ///
18025    /// # Example
18026    /// ```ignore,no_run
18027    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
18028    /// let x = CreateNotificationConfigRequest::new().set_config_id("example");
18029    /// ```
18030    pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18031        self.config_id = v.into();
18032        self
18033    }
18034
18035    /// Sets the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
18036    ///
18037    /// # Example
18038    /// ```ignore,no_run
18039    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
18040    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
18041    /// let x = CreateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
18042    /// ```
18043    pub fn set_notification_config<T>(mut self, v: T) -> Self
18044    where
18045        T: std::convert::Into<crate::model::NotificationConfig>,
18046    {
18047        self.notification_config = std::option::Option::Some(v.into());
18048        self
18049    }
18050
18051    /// Sets or clears the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
18052    ///
18053    /// # Example
18054    /// ```ignore,no_run
18055    /// # use google_cloud_securitycenter_v2::model::CreateNotificationConfigRequest;
18056    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
18057    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
18058    /// let x = CreateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
18059    /// ```
18060    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
18061    where
18062        T: std::convert::Into<crate::model::NotificationConfig>,
18063    {
18064        self.notification_config = v.map(|x| x.into());
18065        self
18066    }
18067}
18068
18069impl wkt::message::Message for CreateNotificationConfigRequest {
18070    fn typename() -> &'static str {
18071        "type.googleapis.com/google.cloud.securitycenter.v2.CreateNotificationConfigRequest"
18072    }
18073}
18074
18075/// Request message to create single resource value config
18076#[derive(Clone, Default, PartialEq)]
18077#[non_exhaustive]
18078pub struct CreateResourceValueConfigRequest {
18079    /// Required. Resource name of the new ResourceValueConfig's parent.
18080    pub parent: std::string::String,
18081
18082    /// Required. The resource value config being created.
18083    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
18084
18085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18086}
18087
18088impl CreateResourceValueConfigRequest {
18089    /// Creates a new default instance.
18090    pub fn new() -> Self {
18091        std::default::Default::default()
18092    }
18093
18094    /// Sets the value of [parent][crate::model::CreateResourceValueConfigRequest::parent].
18095    ///
18096    /// # Example
18097    /// ```ignore,no_run
18098    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
18099    /// # let organization_id = "organization_id";
18100    /// let x = CreateResourceValueConfigRequest::new().set_parent(format!("organizations/{organization_id}"));
18101    /// ```
18102    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18103        self.parent = v.into();
18104        self
18105    }
18106
18107    /// Sets the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
18108    ///
18109    /// # Example
18110    /// ```ignore,no_run
18111    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
18112    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
18113    /// let x = CreateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
18114    /// ```
18115    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
18116    where
18117        T: std::convert::Into<crate::model::ResourceValueConfig>,
18118    {
18119        self.resource_value_config = std::option::Option::Some(v.into());
18120        self
18121    }
18122
18123    /// Sets or clears the value of [resource_value_config][crate::model::CreateResourceValueConfigRequest::resource_value_config].
18124    ///
18125    /// # Example
18126    /// ```ignore,no_run
18127    /// # use google_cloud_securitycenter_v2::model::CreateResourceValueConfigRequest;
18128    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
18129    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
18130    /// let x = CreateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
18131    /// ```
18132    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
18133    where
18134        T: std::convert::Into<crate::model::ResourceValueConfig>,
18135    {
18136        self.resource_value_config = v.map(|x| x.into());
18137        self
18138    }
18139}
18140
18141impl wkt::message::Message for CreateResourceValueConfigRequest {
18142    fn typename() -> &'static str {
18143        "type.googleapis.com/google.cloud.securitycenter.v2.CreateResourceValueConfigRequest"
18144    }
18145}
18146
18147/// Request message for creating a source.
18148#[derive(Clone, Default, PartialEq)]
18149#[non_exhaustive]
18150pub struct CreateSourceRequest {
18151    /// Required. Resource name of the new source's parent. Its format should be
18152    /// `organizations/[organization_id]`.
18153    pub parent: std::string::String,
18154
18155    /// Required. The Source being created, only the display_name and description
18156    /// will be used. All other fields will be ignored.
18157    pub source: std::option::Option<crate::model::Source>,
18158
18159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18160}
18161
18162impl CreateSourceRequest {
18163    /// Creates a new default instance.
18164    pub fn new() -> Self {
18165        std::default::Default::default()
18166    }
18167
18168    /// Sets the value of [parent][crate::model::CreateSourceRequest::parent].
18169    ///
18170    /// # Example
18171    /// ```ignore,no_run
18172    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
18173    /// let x = CreateSourceRequest::new().set_parent("example");
18174    /// ```
18175    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18176        self.parent = v.into();
18177        self
18178    }
18179
18180    /// Sets the value of [source][crate::model::CreateSourceRequest::source].
18181    ///
18182    /// # Example
18183    /// ```ignore,no_run
18184    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
18185    /// use google_cloud_securitycenter_v2::model::Source;
18186    /// let x = CreateSourceRequest::new().set_source(Source::default()/* use setters */);
18187    /// ```
18188    pub fn set_source<T>(mut self, v: T) -> Self
18189    where
18190        T: std::convert::Into<crate::model::Source>,
18191    {
18192        self.source = std::option::Option::Some(v.into());
18193        self
18194    }
18195
18196    /// Sets or clears the value of [source][crate::model::CreateSourceRequest::source].
18197    ///
18198    /// # Example
18199    /// ```ignore,no_run
18200    /// # use google_cloud_securitycenter_v2::model::CreateSourceRequest;
18201    /// use google_cloud_securitycenter_v2::model::Source;
18202    /// let x = CreateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
18203    /// let x = CreateSourceRequest::new().set_or_clear_source(None::<Source>);
18204    /// ```
18205    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
18206    where
18207        T: std::convert::Into<crate::model::Source>,
18208    {
18209        self.source = v.map(|x| x.into());
18210        self
18211    }
18212}
18213
18214impl wkt::message::Message for CreateSourceRequest {
18215    fn typename() -> &'static str {
18216        "type.googleapis.com/google.cloud.securitycenter.v2.CreateSourceRequest"
18217    }
18218}
18219
18220/// Request message for deleting a BigQuery export.
18221#[derive(Clone, Default, PartialEq)]
18222#[non_exhaustive]
18223pub struct DeleteBigQueryExportRequest {
18224    /// Required. The name of the BigQuery export to delete. The following list
18225    /// shows some examples of the format:
18226    ///
18227    ///
18228    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
18229    ///
18230    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
18231    /// + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
18232    pub name: std::string::String,
18233
18234    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18235}
18236
18237impl DeleteBigQueryExportRequest {
18238    /// Creates a new default instance.
18239    pub fn new() -> Self {
18240        std::default::Default::default()
18241    }
18242
18243    /// Sets the value of [name][crate::model::DeleteBigQueryExportRequest::name].
18244    ///
18245    /// # Example
18246    /// ```ignore,no_run
18247    /// # use google_cloud_securitycenter_v2::model::DeleteBigQueryExportRequest;
18248    /// # let organization_id = "organization_id";
18249    /// # let location_id = "location_id";
18250    /// # let export_id = "export_id";
18251    /// let x = DeleteBigQueryExportRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
18252    /// ```
18253    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18254        self.name = v.into();
18255        self
18256    }
18257}
18258
18259impl wkt::message::Message for DeleteBigQueryExportRequest {
18260    fn typename() -> &'static str {
18261        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteBigQueryExportRequest"
18262    }
18263}
18264
18265/// Request message for deleting a mute config. If no location is specified,
18266/// default is global.
18267#[derive(Clone, Default, PartialEq)]
18268#[non_exhaustive]
18269pub struct DeleteMuteConfigRequest {
18270    /// Required. Name of the mute config to delete. The following list shows some
18271    /// examples of the format:
18272    ///
18273    /// + `organizations/{organization}/muteConfigs/{config_id}`
18274    ///
18275    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
18276    ///
18277    /// + `folders/{folder}/muteConfigs/{config_id}`
18278    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
18279    /// + `projects/{project}/muteConfigs/{config_id}`
18280    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
18281    pub name: std::string::String,
18282
18283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18284}
18285
18286impl DeleteMuteConfigRequest {
18287    /// Creates a new default instance.
18288    pub fn new() -> Self {
18289        std::default::Default::default()
18290    }
18291
18292    /// Sets the value of [name][crate::model::DeleteMuteConfigRequest::name].
18293    ///
18294    /// # Example
18295    /// ```ignore,no_run
18296    /// # use google_cloud_securitycenter_v2::model::DeleteMuteConfigRequest;
18297    /// # let organization_id = "organization_id";
18298    /// # let mute_config_id = "mute_config_id";
18299    /// let x = DeleteMuteConfigRequest::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
18300    /// ```
18301    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18302        self.name = v.into();
18303        self
18304    }
18305}
18306
18307impl wkt::message::Message for DeleteMuteConfigRequest {
18308    fn typename() -> &'static str {
18309        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteMuteConfigRequest"
18310    }
18311}
18312
18313/// Request message for deleting a notification config.
18314#[derive(Clone, Default, PartialEq)]
18315#[non_exhaustive]
18316pub struct DeleteNotificationConfigRequest {
18317    /// Required. Name of the notification config to delete. The following list
18318    /// shows some examples of the format:
18319    ///
18320    ///
18321    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
18322    /// +
18323    /// `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
18324    /// +
18325    /// `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
18326    pub name: std::string::String,
18327
18328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18329}
18330
18331impl DeleteNotificationConfigRequest {
18332    /// Creates a new default instance.
18333    pub fn new() -> Self {
18334        std::default::Default::default()
18335    }
18336
18337    /// Sets the value of [name][crate::model::DeleteNotificationConfigRequest::name].
18338    ///
18339    /// # Example
18340    /// ```ignore,no_run
18341    /// # use google_cloud_securitycenter_v2::model::DeleteNotificationConfigRequest;
18342    /// # let organization_id = "organization_id";
18343    /// # let location_id = "location_id";
18344    /// # let notification_config_id = "notification_config_id";
18345    /// let x = DeleteNotificationConfigRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
18346    /// ```
18347    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18348        self.name = v.into();
18349        self
18350    }
18351}
18352
18353impl wkt::message::Message for DeleteNotificationConfigRequest {
18354    fn typename() -> &'static str {
18355        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteNotificationConfigRequest"
18356    }
18357}
18358
18359/// Request message to delete resource value config
18360#[derive(Clone, Default, PartialEq)]
18361#[non_exhaustive]
18362pub struct DeleteResourceValueConfigRequest {
18363    /// Required. Name of the ResourceValueConfig to delete
18364    pub name: std::string::String,
18365
18366    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18367}
18368
18369impl DeleteResourceValueConfigRequest {
18370    /// Creates a new default instance.
18371    pub fn new() -> Self {
18372        std::default::Default::default()
18373    }
18374
18375    /// Sets the value of [name][crate::model::DeleteResourceValueConfigRequest::name].
18376    ///
18377    /// # Example
18378    /// ```ignore,no_run
18379    /// # use google_cloud_securitycenter_v2::model::DeleteResourceValueConfigRequest;
18380    /// # let organization_id = "organization_id";
18381    /// # let resource_value_config_id = "resource_value_config_id";
18382    /// let x = DeleteResourceValueConfigRequest::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
18383    /// ```
18384    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18385        self.name = v.into();
18386        self
18387    }
18388}
18389
18390impl wkt::message::Message for DeleteResourceValueConfigRequest {
18391    fn typename() -> &'static str {
18392        "type.googleapis.com/google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest"
18393    }
18394}
18395
18396/// The destination big query dataset to export findings to.
18397#[derive(Clone, Default, PartialEq)]
18398#[non_exhaustive]
18399pub struct BigQueryDestination {
18400    /// Required. The relative resource name of the destination dataset, in the
18401    /// form projects/{projectId}/datasets/{datasetId}.
18402    pub dataset: std::string::String,
18403
18404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18405}
18406
18407impl BigQueryDestination {
18408    /// Creates a new default instance.
18409    pub fn new() -> Self {
18410        std::default::Default::default()
18411    }
18412
18413    /// Sets the value of [dataset][crate::model::BigQueryDestination::dataset].
18414    ///
18415    /// # Example
18416    /// ```ignore,no_run
18417    /// # use google_cloud_securitycenter_v2::model::BigQueryDestination;
18418    /// let x = BigQueryDestination::new().set_dataset("example");
18419    /// ```
18420    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18421        self.dataset = v.into();
18422        self
18423    }
18424}
18425
18426impl wkt::message::Message for BigQueryDestination {
18427    fn typename() -> &'static str {
18428        "type.googleapis.com/google.cloud.securitycenter.v2.BigQueryDestination"
18429    }
18430}
18431
18432/// The LRO metadata for a ExportFindings request.
18433#[derive(Clone, Default, PartialEq)]
18434#[non_exhaustive]
18435pub struct ExportFindingsMetadata {
18436    /// Optional. Timestamp at which export was started
18437    pub export_start_time: std::option::Option<wkt::Timestamp>,
18438
18439    /// The destination to export findings to.
18440    pub destination: std::option::Option<crate::model::export_findings_metadata::Destination>,
18441
18442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18443}
18444
18445impl ExportFindingsMetadata {
18446    /// Creates a new default instance.
18447    pub fn new() -> Self {
18448        std::default::Default::default()
18449    }
18450
18451    /// Sets the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
18452    ///
18453    /// # Example
18454    /// ```ignore,no_run
18455    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
18456    /// use wkt::Timestamp;
18457    /// let x = ExportFindingsMetadata::new().set_export_start_time(Timestamp::default()/* use setters */);
18458    /// ```
18459    pub fn set_export_start_time<T>(mut self, v: T) -> Self
18460    where
18461        T: std::convert::Into<wkt::Timestamp>,
18462    {
18463        self.export_start_time = std::option::Option::Some(v.into());
18464        self
18465    }
18466
18467    /// Sets or clears the value of [export_start_time][crate::model::ExportFindingsMetadata::export_start_time].
18468    ///
18469    /// # Example
18470    /// ```ignore,no_run
18471    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
18472    /// use wkt::Timestamp;
18473    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(Some(Timestamp::default()/* use setters */));
18474    /// let x = ExportFindingsMetadata::new().set_or_clear_export_start_time(None::<Timestamp>);
18475    /// ```
18476    pub fn set_or_clear_export_start_time<T>(mut self, v: std::option::Option<T>) -> Self
18477    where
18478        T: std::convert::Into<wkt::Timestamp>,
18479    {
18480        self.export_start_time = v.map(|x| x.into());
18481        self
18482    }
18483
18484    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination].
18485    ///
18486    /// Note that all the setters affecting `destination` are mutually
18487    /// exclusive.
18488    ///
18489    /// # Example
18490    /// ```ignore,no_run
18491    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
18492    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
18493    /// let x = ExportFindingsMetadata::new().set_destination(Some(
18494    ///     google_cloud_securitycenter_v2::model::export_findings_metadata::Destination::BigQueryDestination(BigQueryDestination::default().into())));
18495    /// ```
18496    pub fn set_destination<
18497        T: std::convert::Into<
18498                std::option::Option<crate::model::export_findings_metadata::Destination>,
18499            >,
18500    >(
18501        mut self,
18502        v: T,
18503    ) -> Self {
18504        self.destination = v.into();
18505        self
18506    }
18507
18508    /// The value of [destination][crate::model::ExportFindingsMetadata::destination]
18509    /// if it holds a `BigQueryDestination`, `None` if the field is not set or
18510    /// holds a different branch.
18511    pub fn big_query_destination(
18512        &self,
18513    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
18514        #[allow(unreachable_patterns)]
18515        self.destination.as_ref().and_then(|v| match v {
18516            crate::model::export_findings_metadata::Destination::BigQueryDestination(v) => {
18517                std::option::Option::Some(v)
18518            }
18519            _ => std::option::Option::None,
18520        })
18521    }
18522
18523    /// Sets the value of [destination][crate::model::ExportFindingsMetadata::destination]
18524    /// to hold a `BigQueryDestination`.
18525    ///
18526    /// Note that all the setters affecting `destination` are
18527    /// mutually exclusive.
18528    ///
18529    /// # Example
18530    /// ```ignore,no_run
18531    /// # use google_cloud_securitycenter_v2::model::ExportFindingsMetadata;
18532    /// use google_cloud_securitycenter_v2::model::BigQueryDestination;
18533    /// let x = ExportFindingsMetadata::new().set_big_query_destination(BigQueryDestination::default()/* use setters */);
18534    /// assert!(x.big_query_destination().is_some());
18535    /// ```
18536    pub fn set_big_query_destination<
18537        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
18538    >(
18539        mut self,
18540        v: T,
18541    ) -> Self {
18542        self.destination = std::option::Option::Some(
18543            crate::model::export_findings_metadata::Destination::BigQueryDestination(v.into()),
18544        );
18545        self
18546    }
18547}
18548
18549impl wkt::message::Message for ExportFindingsMetadata {
18550    fn typename() -> &'static str {
18551        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsMetadata"
18552    }
18553}
18554
18555/// Defines additional types related to [ExportFindingsMetadata].
18556pub mod export_findings_metadata {
18557    #[allow(unused_imports)]
18558    use super::*;
18559
18560    /// The destination to export findings to.
18561    #[derive(Clone, Debug, PartialEq)]
18562    #[non_exhaustive]
18563    pub enum Destination {
18564        /// Required. The destination big query dataset to export findings to.
18565        BigQueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
18566    }
18567}
18568
18569/// The response to a ExportFindings request. Contains the LRO information.
18570#[derive(Clone, Default, PartialEq)]
18571#[non_exhaustive]
18572pub struct ExportFindingsResponse {
18573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18574}
18575
18576impl ExportFindingsResponse {
18577    /// Creates a new default instance.
18578    pub fn new() -> Self {
18579        std::default::Default::default()
18580    }
18581}
18582
18583impl wkt::message::Message for ExportFindingsResponse {
18584    fn typename() -> &'static str {
18585        "type.googleapis.com/google.cloud.securitycenter.v2.ExportFindingsResponse"
18586    }
18587}
18588
18589/// Request message for retrieving a BigQuery export.
18590#[derive(Clone, Default, PartialEq)]
18591#[non_exhaustive]
18592pub struct GetBigQueryExportRequest {
18593    /// Required. Name of the BigQuery export to retrieve. The following list shows
18594    /// some examples of the format:
18595    ///
18596    ///
18597    /// `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
18598    ///
18599    /// + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
18600    /// + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
18601    pub name: std::string::String,
18602
18603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18604}
18605
18606impl GetBigQueryExportRequest {
18607    /// Creates a new default instance.
18608    pub fn new() -> Self {
18609        std::default::Default::default()
18610    }
18611
18612    /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
18613    ///
18614    /// # Example
18615    /// ```ignore,no_run
18616    /// # use google_cloud_securitycenter_v2::model::GetBigQueryExportRequest;
18617    /// # let organization_id = "organization_id";
18618    /// # let location_id = "location_id";
18619    /// # let export_id = "export_id";
18620    /// let x = GetBigQueryExportRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}"));
18621    /// ```
18622    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18623        self.name = v.into();
18624        self
18625    }
18626}
18627
18628impl wkt::message::Message for GetBigQueryExportRequest {
18629    fn typename() -> &'static str {
18630        "type.googleapis.com/google.cloud.securitycenter.v2.GetBigQueryExportRequest"
18631    }
18632}
18633
18634/// Request message for retrieving a mute config. If no location is specified,
18635/// default is global.
18636#[derive(Clone, Default, PartialEq)]
18637#[non_exhaustive]
18638pub struct GetMuteConfigRequest {
18639    /// Required. Name of the mute config to retrieve. The following list shows
18640    /// some examples of the format:
18641    ///
18642    /// + `organizations/{organization}/muteConfigs/{config_id}`
18643    ///
18644    /// `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
18645    ///
18646    /// + `folders/{folder}/muteConfigs/{config_id}`
18647    /// + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
18648    /// + `projects/{project}/muteConfigs/{config_id}`
18649    /// + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
18650    pub name: std::string::String,
18651
18652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18653}
18654
18655impl GetMuteConfigRequest {
18656    /// Creates a new default instance.
18657    pub fn new() -> Self {
18658        std::default::Default::default()
18659    }
18660
18661    /// Sets the value of [name][crate::model::GetMuteConfigRequest::name].
18662    ///
18663    /// # Example
18664    /// ```ignore,no_run
18665    /// # use google_cloud_securitycenter_v2::model::GetMuteConfigRequest;
18666    /// # let organization_id = "organization_id";
18667    /// # let mute_config_id = "mute_config_id";
18668    /// let x = GetMuteConfigRequest::new().set_name(format!("organizations/{organization_id}/muteConfigs/{mute_config_id}"));
18669    /// ```
18670    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18671        self.name = v.into();
18672        self
18673    }
18674}
18675
18676impl wkt::message::Message for GetMuteConfigRequest {
18677    fn typename() -> &'static str {
18678        "type.googleapis.com/google.cloud.securitycenter.v2.GetMuteConfigRequest"
18679    }
18680}
18681
18682/// Request message for getting a notification config.
18683#[derive(Clone, Default, PartialEq)]
18684#[non_exhaustive]
18685pub struct GetNotificationConfigRequest {
18686    /// Required. Name of the notification config to get. The following list shows
18687    /// some examples of the format:
18688    ///
18689    ///
18690    /// `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
18691    /// +
18692    /// `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
18693    /// +
18694    /// `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
18695    pub name: std::string::String,
18696
18697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18698}
18699
18700impl GetNotificationConfigRequest {
18701    /// Creates a new default instance.
18702    pub fn new() -> Self {
18703        std::default::Default::default()
18704    }
18705
18706    /// Sets the value of [name][crate::model::GetNotificationConfigRequest::name].
18707    ///
18708    /// # Example
18709    /// ```ignore,no_run
18710    /// # use google_cloud_securitycenter_v2::model::GetNotificationConfigRequest;
18711    /// # let organization_id = "organization_id";
18712    /// # let location_id = "location_id";
18713    /// # let notification_config_id = "notification_config_id";
18714    /// let x = GetNotificationConfigRequest::new().set_name(format!("organizations/{organization_id}/locations/{location_id}/notificationConfigs/{notification_config_id}"));
18715    /// ```
18716    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18717        self.name = v.into();
18718        self
18719    }
18720}
18721
18722impl wkt::message::Message for GetNotificationConfigRequest {
18723    fn typename() -> &'static str {
18724        "type.googleapis.com/google.cloud.securitycenter.v2.GetNotificationConfigRequest"
18725    }
18726}
18727
18728/// Request message to get resource value config
18729#[derive(Clone, Default, PartialEq)]
18730#[non_exhaustive]
18731pub struct GetResourceValueConfigRequest {
18732    /// Required. Name of the resource value config to retrieve. Its format is
18733    /// organizations/{organization}/resourceValueConfigs/{config_id}.
18734    pub name: std::string::String,
18735
18736    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18737}
18738
18739impl GetResourceValueConfigRequest {
18740    /// Creates a new default instance.
18741    pub fn new() -> Self {
18742        std::default::Default::default()
18743    }
18744
18745    /// Sets the value of [name][crate::model::GetResourceValueConfigRequest::name].
18746    ///
18747    /// # Example
18748    /// ```ignore,no_run
18749    /// # use google_cloud_securitycenter_v2::model::GetResourceValueConfigRequest;
18750    /// # let organization_id = "organization_id";
18751    /// # let resource_value_config_id = "resource_value_config_id";
18752    /// let x = GetResourceValueConfigRequest::new().set_name(format!("organizations/{organization_id}/resourceValueConfigs/{resource_value_config_id}"));
18753    /// ```
18754    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18755        self.name = v.into();
18756        self
18757    }
18758}
18759
18760impl wkt::message::Message for GetResourceValueConfigRequest {
18761    fn typename() -> &'static str {
18762        "type.googleapis.com/google.cloud.securitycenter.v2.GetResourceValueConfigRequest"
18763    }
18764}
18765
18766/// Request message for getting a source.
18767#[derive(Clone, Default, PartialEq)]
18768#[non_exhaustive]
18769pub struct GetSourceRequest {
18770    /// Required. Relative resource name of the source. Its format is
18771    /// `organizations/[organization_id]/source/[source_id]`.
18772    pub name: std::string::String,
18773
18774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18775}
18776
18777impl GetSourceRequest {
18778    /// Creates a new default instance.
18779    pub fn new() -> Self {
18780        std::default::Default::default()
18781    }
18782
18783    /// Sets the value of [name][crate::model::GetSourceRequest::name].
18784    ///
18785    /// # Example
18786    /// ```ignore,no_run
18787    /// # use google_cloud_securitycenter_v2::model::GetSourceRequest;
18788    /// # let organization_id = "organization_id";
18789    /// # let source_id = "source_id";
18790    /// let x = GetSourceRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}"));
18791    /// ```
18792    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18793        self.name = v.into();
18794        self
18795    }
18796}
18797
18798impl wkt::message::Message for GetSourceRequest {
18799    fn typename() -> &'static str {
18800        "type.googleapis.com/google.cloud.securitycenter.v2.GetSourceRequest"
18801    }
18802}
18803
18804/// Request message for grouping by findings.
18805#[derive(Clone, Default, PartialEq)]
18806#[non_exhaustive]
18807pub struct GroupFindingsRequest {
18808    /// Required. Name of the source to groupBy. If no location is specified,
18809    /// finding is assumed to be in global.
18810    /// The following list shows some examples:
18811    ///
18812    /// + `organizations/[organization_id]/sources/[source_id]`
18813    ///
18814    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
18815    ///
18816    /// + `folders/[folder_id]/sources/[source_id]`
18817    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
18818    /// + `projects/[project_id]/sources/[source_id]`
18819    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
18820    ///
18821    /// To groupBy across all sources provide a source_id of `-`. The following
18822    /// list shows some examples:
18823    ///
18824    /// + `organizations/{organization_id}/sources/-`
18825    /// + `organizations/{organization_id}/sources/-/locations/[location_id]`
18826    /// + `folders/{folder_id}/sources/-`
18827    /// + `folders/{folder_id}/sources/-/locations/[location_id]`
18828    /// + `projects/{project_id}/sources/-`
18829    /// + `projects/{project_id}/sources/-/locations/[location_id]`
18830    pub parent: std::string::String,
18831
18832    /// Expression that defines the filter to apply across findings.
18833    /// The expression is a list of one or more restrictions combined via logical
18834    /// operators `AND` and `OR`.
18835    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
18836    ///
18837    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
18838    /// character in front of them to indicate negation. Examples include:
18839    ///
18840    /// * name
18841    /// * security_marks.marks.marka
18842    ///
18843    /// The supported operators are:
18844    ///
18845    /// * `=` for all value types.
18846    /// * `>`, `<`, `>=`, `<=` for integer values.
18847    /// * `:`, meaning substring matching, for strings.
18848    ///
18849    /// The supported value types are:
18850    ///
18851    /// * string literals in quotes.
18852    /// * integer literals without quotes.
18853    /// * boolean literals `true` and `false` without quotes.
18854    ///
18855    /// The following field and operator combinations are supported:
18856    ///
18857    /// * name: `=`
18858    ///
18859    /// * parent: `=`, `:`
18860    ///
18861    /// * resource_name: `=`, `:`
18862    ///
18863    /// * state: `=`, `:`
18864    ///
18865    /// * category: `=`, `:`
18866    ///
18867    /// * external_uri: `=`, `:`
18868    ///
18869    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
18870    ///
18871    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
18872    ///   Examples:
18873    ///   `event_time = "2019-06-10T16:07:18-07:00"`
18874    ///   `event_time = 1560208038000`
18875    ///
18876    /// * severity: `=`, `:`
18877    ///
18878    /// * security_marks.marks: `=`, `:`
18879    ///
18880    /// * resource:
18881    ///
18882    ///   * resource.name: `=`, `:`
18883    ///   * resource.parent_name: `=`, `:`
18884    ///   * resource.parent_display_name: `=`, `:`
18885    ///   * resource.project_name: `=`, `:`
18886    ///   * resource.project_display_name: `=`, `:`
18887    ///   * resource.type: `=`, `:`
18888    pub filter: std::string::String,
18889
18890    /// Required. Expression that defines what assets fields to use for grouping.
18891    /// The string value should follow SQL syntax: comma separated list of fields.
18892    /// For example: "parent,resource_name".
18893    pub group_by: std::string::String,
18894
18895    /// The value returned by the last `GroupFindingsResponse`; indicates
18896    /// that this is a continuation of a prior `GroupFindings` call, and
18897    /// that the system should return the next page of data.
18898    pub page_token: std::string::String,
18899
18900    /// The maximum number of results to return in a single response. Default is
18901    /// 10, minimum is 1, maximum is 1000.
18902    pub page_size: i32,
18903
18904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18905}
18906
18907impl GroupFindingsRequest {
18908    /// Creates a new default instance.
18909    pub fn new() -> Self {
18910        std::default::Default::default()
18911    }
18912
18913    /// Sets the value of [parent][crate::model::GroupFindingsRequest::parent].
18914    ///
18915    /// # Example
18916    /// ```ignore,no_run
18917    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18918    /// # let organization_id = "organization_id";
18919    /// # let source_id = "source_id";
18920    /// let x = GroupFindingsRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
18921    /// ```
18922    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18923        self.parent = v.into();
18924        self
18925    }
18926
18927    /// Sets the value of [filter][crate::model::GroupFindingsRequest::filter].
18928    ///
18929    /// # Example
18930    /// ```ignore,no_run
18931    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18932    /// let x = GroupFindingsRequest::new().set_filter("example");
18933    /// ```
18934    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18935        self.filter = v.into();
18936        self
18937    }
18938
18939    /// Sets the value of [group_by][crate::model::GroupFindingsRequest::group_by].
18940    ///
18941    /// # Example
18942    /// ```ignore,no_run
18943    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18944    /// let x = GroupFindingsRequest::new().set_group_by("example");
18945    /// ```
18946    pub fn set_group_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18947        self.group_by = v.into();
18948        self
18949    }
18950
18951    /// Sets the value of [page_token][crate::model::GroupFindingsRequest::page_token].
18952    ///
18953    /// # Example
18954    /// ```ignore,no_run
18955    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18956    /// let x = GroupFindingsRequest::new().set_page_token("example");
18957    /// ```
18958    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18959        self.page_token = v.into();
18960        self
18961    }
18962
18963    /// Sets the value of [page_size][crate::model::GroupFindingsRequest::page_size].
18964    ///
18965    /// # Example
18966    /// ```ignore,no_run
18967    /// # use google_cloud_securitycenter_v2::model::GroupFindingsRequest;
18968    /// let x = GroupFindingsRequest::new().set_page_size(42);
18969    /// ```
18970    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18971        self.page_size = v.into();
18972        self
18973    }
18974}
18975
18976impl wkt::message::Message for GroupFindingsRequest {
18977    fn typename() -> &'static str {
18978        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsRequest"
18979    }
18980}
18981
18982/// Response message for group by findings.
18983#[derive(Clone, Default, PartialEq)]
18984#[non_exhaustive]
18985pub struct GroupFindingsResponse {
18986    /// Group results. There exists an element for each existing unique
18987    /// combination of property/values. The element contains a count for the number
18988    /// of times those specific property/values appear.
18989    pub group_by_results: std::vec::Vec<crate::model::GroupResult>,
18990
18991    /// Token to retrieve the next page of results, or empty if there are no more
18992    /// results.
18993    pub next_page_token: std::string::String,
18994
18995    /// The total number of results matching the query.
18996    pub total_size: i32,
18997
18998    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18999}
19000
19001impl GroupFindingsResponse {
19002    /// Creates a new default instance.
19003    pub fn new() -> Self {
19004        std::default::Default::default()
19005    }
19006
19007    /// Sets the value of [group_by_results][crate::model::GroupFindingsResponse::group_by_results].
19008    ///
19009    /// # Example
19010    /// ```ignore,no_run
19011    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
19012    /// use google_cloud_securitycenter_v2::model::GroupResult;
19013    /// let x = GroupFindingsResponse::new()
19014    ///     .set_group_by_results([
19015    ///         GroupResult::default()/* use setters */,
19016    ///         GroupResult::default()/* use (different) setters */,
19017    ///     ]);
19018    /// ```
19019    pub fn set_group_by_results<T, V>(mut self, v: T) -> Self
19020    where
19021        T: std::iter::IntoIterator<Item = V>,
19022        V: std::convert::Into<crate::model::GroupResult>,
19023    {
19024        use std::iter::Iterator;
19025        self.group_by_results = v.into_iter().map(|i| i.into()).collect();
19026        self
19027    }
19028
19029    /// Sets the value of [next_page_token][crate::model::GroupFindingsResponse::next_page_token].
19030    ///
19031    /// # Example
19032    /// ```ignore,no_run
19033    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
19034    /// let x = GroupFindingsResponse::new().set_next_page_token("example");
19035    /// ```
19036    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19037        self.next_page_token = v.into();
19038        self
19039    }
19040
19041    /// Sets the value of [total_size][crate::model::GroupFindingsResponse::total_size].
19042    ///
19043    /// # Example
19044    /// ```ignore,no_run
19045    /// # use google_cloud_securitycenter_v2::model::GroupFindingsResponse;
19046    /// let x = GroupFindingsResponse::new().set_total_size(42);
19047    /// ```
19048    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19049        self.total_size = v.into();
19050        self
19051    }
19052}
19053
19054impl wkt::message::Message for GroupFindingsResponse {
19055    fn typename() -> &'static str {
19056        "type.googleapis.com/google.cloud.securitycenter.v2.GroupFindingsResponse"
19057    }
19058}
19059
19060#[doc(hidden)]
19061impl google_cloud_gax::paginator::internal::PageableResponse for GroupFindingsResponse {
19062    type PageItem = crate::model::GroupResult;
19063
19064    fn items(self) -> std::vec::Vec<Self::PageItem> {
19065        self.group_by_results
19066    }
19067
19068    fn next_page_token(&self) -> std::string::String {
19069        use std::clone::Clone;
19070        self.next_page_token.clone()
19071    }
19072}
19073
19074/// Result containing the properties and count of a groupBy request.
19075#[derive(Clone, Default, PartialEq)]
19076#[non_exhaustive]
19077pub struct GroupResult {
19078    /// Properties matching the groupBy fields in the request.
19079    pub properties: std::collections::HashMap<std::string::String, wkt::Value>,
19080
19081    /// Total count of resources for the given properties.
19082    pub count: i64,
19083
19084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19085}
19086
19087impl GroupResult {
19088    /// Creates a new default instance.
19089    pub fn new() -> Self {
19090        std::default::Default::default()
19091    }
19092
19093    /// Sets the value of [properties][crate::model::GroupResult::properties].
19094    ///
19095    /// # Example
19096    /// ```ignore,no_run
19097    /// # use google_cloud_securitycenter_v2::model::GroupResult;
19098    /// use wkt::Value;
19099    /// let x = GroupResult::new().set_properties([
19100    ///     ("key0", Value::default()/* use setters */),
19101    ///     ("key1", Value::default()/* use (different) setters */),
19102    /// ]);
19103    /// ```
19104    pub fn set_properties<T, K, V>(mut self, v: T) -> Self
19105    where
19106        T: std::iter::IntoIterator<Item = (K, V)>,
19107        K: std::convert::Into<std::string::String>,
19108        V: std::convert::Into<wkt::Value>,
19109    {
19110        use std::iter::Iterator;
19111        self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19112        self
19113    }
19114
19115    /// Sets the value of [count][crate::model::GroupResult::count].
19116    ///
19117    /// # Example
19118    /// ```ignore,no_run
19119    /// # use google_cloud_securitycenter_v2::model::GroupResult;
19120    /// let x = GroupResult::new().set_count(42);
19121    /// ```
19122    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
19123        self.count = v.into();
19124        self
19125    }
19126}
19127
19128impl wkt::message::Message for GroupResult {
19129    fn typename() -> &'static str {
19130        "type.googleapis.com/google.cloud.securitycenter.v2.GroupResult"
19131    }
19132}
19133
19134/// Request message for listing the attack paths for a given simulation or valued
19135/// resource.
19136#[derive(Clone, Default, PartialEq)]
19137#[non_exhaustive]
19138pub struct ListAttackPathsRequest {
19139    /// Required. Name of parent to list attack paths.
19140    ///
19141    /// Valid formats:
19142    /// `organizations/{organization}`,
19143    /// `organizations/{organization}/simulations/{simulation}`
19144    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
19145    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
19146    pub parent: std::string::String,
19147
19148    /// The filter expression that filters the attack path in the response.
19149    /// Supported fields:
19150    ///
19151    /// * `valued_resources` supports =
19152    pub filter: std::string::String,
19153
19154    /// The value returned by the last `ListAttackPathsResponse`; indicates
19155    /// that this is a continuation of a prior `ListAttackPaths` call, and
19156    /// that the system should return the next page of data.
19157    pub page_token: std::string::String,
19158
19159    /// The maximum number of results to return in a single response. Default is
19160    /// 10, minimum is 1, maximum is 1000.
19161    pub page_size: i32,
19162
19163    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19164}
19165
19166impl ListAttackPathsRequest {
19167    /// Creates a new default instance.
19168    pub fn new() -> Self {
19169        std::default::Default::default()
19170    }
19171
19172    /// Sets the value of [parent][crate::model::ListAttackPathsRequest::parent].
19173    ///
19174    /// # Example
19175    /// ```ignore,no_run
19176    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
19177    /// # let organization_id = "organization_id";
19178    /// # let simulation_id = "simulation_id";
19179    /// # let valued_resource_id = "valued_resource_id";
19180    /// let x = ListAttackPathsRequest::new().set_parent(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
19181    /// ```
19182    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19183        self.parent = v.into();
19184        self
19185    }
19186
19187    /// Sets the value of [filter][crate::model::ListAttackPathsRequest::filter].
19188    ///
19189    /// # Example
19190    /// ```ignore,no_run
19191    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
19192    /// let x = ListAttackPathsRequest::new().set_filter("example");
19193    /// ```
19194    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19195        self.filter = v.into();
19196        self
19197    }
19198
19199    /// Sets the value of [page_token][crate::model::ListAttackPathsRequest::page_token].
19200    ///
19201    /// # Example
19202    /// ```ignore,no_run
19203    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
19204    /// let x = ListAttackPathsRequest::new().set_page_token("example");
19205    /// ```
19206    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19207        self.page_token = v.into();
19208        self
19209    }
19210
19211    /// Sets the value of [page_size][crate::model::ListAttackPathsRequest::page_size].
19212    ///
19213    /// # Example
19214    /// ```ignore,no_run
19215    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsRequest;
19216    /// let x = ListAttackPathsRequest::new().set_page_size(42);
19217    /// ```
19218    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19219        self.page_size = v.into();
19220        self
19221    }
19222}
19223
19224impl wkt::message::Message for ListAttackPathsRequest {
19225    fn typename() -> &'static str {
19226        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsRequest"
19227    }
19228}
19229
19230/// Response message for listing the attack paths for a given simulation or
19231/// valued resource.
19232#[derive(Clone, Default, PartialEq)]
19233#[non_exhaustive]
19234pub struct ListAttackPathsResponse {
19235    /// The attack paths that the attack path simulation identified.
19236    pub attack_paths: std::vec::Vec<crate::model::AttackPath>,
19237
19238    /// Token to retrieve the next page of results, or empty if there are no more
19239    /// results.
19240    pub next_page_token: std::string::String,
19241
19242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19243}
19244
19245impl ListAttackPathsResponse {
19246    /// Creates a new default instance.
19247    pub fn new() -> Self {
19248        std::default::Default::default()
19249    }
19250
19251    /// Sets the value of [attack_paths][crate::model::ListAttackPathsResponse::attack_paths].
19252    ///
19253    /// # Example
19254    /// ```ignore,no_run
19255    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
19256    /// use google_cloud_securitycenter_v2::model::AttackPath;
19257    /// let x = ListAttackPathsResponse::new()
19258    ///     .set_attack_paths([
19259    ///         AttackPath::default()/* use setters */,
19260    ///         AttackPath::default()/* use (different) setters */,
19261    ///     ]);
19262    /// ```
19263    pub fn set_attack_paths<T, V>(mut self, v: T) -> Self
19264    where
19265        T: std::iter::IntoIterator<Item = V>,
19266        V: std::convert::Into<crate::model::AttackPath>,
19267    {
19268        use std::iter::Iterator;
19269        self.attack_paths = v.into_iter().map(|i| i.into()).collect();
19270        self
19271    }
19272
19273    /// Sets the value of [next_page_token][crate::model::ListAttackPathsResponse::next_page_token].
19274    ///
19275    /// # Example
19276    /// ```ignore,no_run
19277    /// # use google_cloud_securitycenter_v2::model::ListAttackPathsResponse;
19278    /// let x = ListAttackPathsResponse::new().set_next_page_token("example");
19279    /// ```
19280    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19281        self.next_page_token = v.into();
19282        self
19283    }
19284}
19285
19286impl wkt::message::Message for ListAttackPathsResponse {
19287    fn typename() -> &'static str {
19288        "type.googleapis.com/google.cloud.securitycenter.v2.ListAttackPathsResponse"
19289    }
19290}
19291
19292#[doc(hidden)]
19293impl google_cloud_gax::paginator::internal::PageableResponse for ListAttackPathsResponse {
19294    type PageItem = crate::model::AttackPath;
19295
19296    fn items(self) -> std::vec::Vec<Self::PageItem> {
19297        self.attack_paths
19298    }
19299
19300    fn next_page_token(&self) -> std::string::String {
19301        use std::clone::Clone;
19302        self.next_page_token.clone()
19303    }
19304}
19305
19306/// Request message for getting simulation.
19307/// Simulation name can include "latest" to retrieve the latest simulation
19308/// For example, "organizations/123/simulations/latest"
19309#[derive(Clone, Default, PartialEq)]
19310#[non_exhaustive]
19311pub struct GetSimulationRequest {
19312    /// Required. The organization name or simulation name of this simulation
19313    ///
19314    /// Valid format:
19315    /// `organizations/{organization}/simulations/latest`
19316    /// `organizations/{organization}/simulations/{simulation}`
19317    pub name: std::string::String,
19318
19319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19320}
19321
19322impl GetSimulationRequest {
19323    /// Creates a new default instance.
19324    pub fn new() -> Self {
19325        std::default::Default::default()
19326    }
19327
19328    /// Sets the value of [name][crate::model::GetSimulationRequest::name].
19329    ///
19330    /// # Example
19331    /// ```ignore,no_run
19332    /// # use google_cloud_securitycenter_v2::model::GetSimulationRequest;
19333    /// # let organization_id = "organization_id";
19334    /// # let simulation_id = "simulation_id";
19335    /// let x = GetSimulationRequest::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}"));
19336    /// ```
19337    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19338        self.name = v.into();
19339        self
19340    }
19341}
19342
19343impl wkt::message::Message for GetSimulationRequest {
19344    fn typename() -> &'static str {
19345        "type.googleapis.com/google.cloud.securitycenter.v2.GetSimulationRequest"
19346    }
19347}
19348
19349/// Request message for getting a valued resource.
19350#[derive(Clone, Default, PartialEq)]
19351#[non_exhaustive]
19352pub struct GetValuedResourceRequest {
19353    /// Required. The name of this valued resource
19354    ///
19355    /// Valid format:
19356    /// `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
19357    pub name: std::string::String,
19358
19359    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19360}
19361
19362impl GetValuedResourceRequest {
19363    /// Creates a new default instance.
19364    pub fn new() -> Self {
19365        std::default::Default::default()
19366    }
19367
19368    /// Sets the value of [name][crate::model::GetValuedResourceRequest::name].
19369    ///
19370    /// # Example
19371    /// ```ignore,no_run
19372    /// # use google_cloud_securitycenter_v2::model::GetValuedResourceRequest;
19373    /// # let organization_id = "organization_id";
19374    /// # let simulation_id = "simulation_id";
19375    /// # let valued_resource_id = "valued_resource_id";
19376    /// let x = GetValuedResourceRequest::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
19377    /// ```
19378    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19379        self.name = v.into();
19380        self
19381    }
19382}
19383
19384impl wkt::message::Message for GetValuedResourceRequest {
19385    fn typename() -> &'static str {
19386        "type.googleapis.com/google.cloud.securitycenter.v2.GetValuedResourceRequest"
19387    }
19388}
19389
19390/// Request message for listing BigQuery exports at a given scope e.g.
19391/// organization, folder or project.
19392#[derive(Clone, Default, PartialEq)]
19393#[non_exhaustive]
19394pub struct ListBigQueryExportsRequest {
19395    /// Required. The parent, which owns the collection of BigQuery exports. Its
19396    /// format is `organizations/[organization_id]/locations/[location_id]`,
19397    /// `folders/[folder_id]/locations/[location_id]`, or
19398    /// `projects/[project_id]/locations/[location_id]`.
19399    pub parent: std::string::String,
19400
19401    /// The maximum number of configs to return. The service may return fewer than
19402    /// this value.
19403    /// If unspecified, at most 10 configs will be returned.
19404    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
19405    pub page_size: i32,
19406
19407    /// A page token, received from a previous `ListBigQueryExports` call.
19408    /// Provide this to retrieve the subsequent page.
19409    /// When paginating, all other parameters provided to `ListBigQueryExports`
19410    /// must match the call that provided the page token.
19411    pub page_token: std::string::String,
19412
19413    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19414}
19415
19416impl ListBigQueryExportsRequest {
19417    /// Creates a new default instance.
19418    pub fn new() -> Self {
19419        std::default::Default::default()
19420    }
19421
19422    /// Sets the value of [parent][crate::model::ListBigQueryExportsRequest::parent].
19423    ///
19424    /// # Example
19425    /// ```ignore,no_run
19426    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
19427    /// # let organization_id = "organization_id";
19428    /// # let location_id = "location_id";
19429    /// let x = ListBigQueryExportsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
19430    /// ```
19431    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19432        self.parent = v.into();
19433        self
19434    }
19435
19436    /// Sets the value of [page_size][crate::model::ListBigQueryExportsRequest::page_size].
19437    ///
19438    /// # Example
19439    /// ```ignore,no_run
19440    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
19441    /// let x = ListBigQueryExportsRequest::new().set_page_size(42);
19442    /// ```
19443    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19444        self.page_size = v.into();
19445        self
19446    }
19447
19448    /// Sets the value of [page_token][crate::model::ListBigQueryExportsRequest::page_token].
19449    ///
19450    /// # Example
19451    /// ```ignore,no_run
19452    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsRequest;
19453    /// let x = ListBigQueryExportsRequest::new().set_page_token("example");
19454    /// ```
19455    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19456        self.page_token = v.into();
19457        self
19458    }
19459}
19460
19461impl wkt::message::Message for ListBigQueryExportsRequest {
19462    fn typename() -> &'static str {
19463        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsRequest"
19464    }
19465}
19466
19467/// Response message for listing BigQuery exports.
19468#[derive(Clone, Default, PartialEq)]
19469#[non_exhaustive]
19470pub struct ListBigQueryExportsResponse {
19471    /// The BigQuery exports from the specified parent.
19472    pub big_query_exports: std::vec::Vec<crate::model::BigQueryExport>,
19473
19474    /// A token, which can be sent as `page_token` to retrieve the next page.
19475    /// If this field is omitted, there are no subsequent pages.
19476    pub next_page_token: std::string::String,
19477
19478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19479}
19480
19481impl ListBigQueryExportsResponse {
19482    /// Creates a new default instance.
19483    pub fn new() -> Self {
19484        std::default::Default::default()
19485    }
19486
19487    /// Sets the value of [big_query_exports][crate::model::ListBigQueryExportsResponse::big_query_exports].
19488    ///
19489    /// # Example
19490    /// ```ignore,no_run
19491    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
19492    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
19493    /// let x = ListBigQueryExportsResponse::new()
19494    ///     .set_big_query_exports([
19495    ///         BigQueryExport::default()/* use setters */,
19496    ///         BigQueryExport::default()/* use (different) setters */,
19497    ///     ]);
19498    /// ```
19499    pub fn set_big_query_exports<T, V>(mut self, v: T) -> Self
19500    where
19501        T: std::iter::IntoIterator<Item = V>,
19502        V: std::convert::Into<crate::model::BigQueryExport>,
19503    {
19504        use std::iter::Iterator;
19505        self.big_query_exports = v.into_iter().map(|i| i.into()).collect();
19506        self
19507    }
19508
19509    /// Sets the value of [next_page_token][crate::model::ListBigQueryExportsResponse::next_page_token].
19510    ///
19511    /// # Example
19512    /// ```ignore,no_run
19513    /// # use google_cloud_securitycenter_v2::model::ListBigQueryExportsResponse;
19514    /// let x = ListBigQueryExportsResponse::new().set_next_page_token("example");
19515    /// ```
19516    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19517        self.next_page_token = v.into();
19518        self
19519    }
19520}
19521
19522impl wkt::message::Message for ListBigQueryExportsResponse {
19523    fn typename() -> &'static str {
19524        "type.googleapis.com/google.cloud.securitycenter.v2.ListBigQueryExportsResponse"
19525    }
19526}
19527
19528#[doc(hidden)]
19529impl google_cloud_gax::paginator::internal::PageableResponse for ListBigQueryExportsResponse {
19530    type PageItem = crate::model::BigQueryExport;
19531
19532    fn items(self) -> std::vec::Vec<Self::PageItem> {
19533        self.big_query_exports
19534    }
19535
19536    fn next_page_token(&self) -> std::string::String {
19537        use std::clone::Clone;
19538        self.next_page_token.clone()
19539    }
19540}
19541
19542/// Request message for listing findings.
19543#[derive(Clone, Default, PartialEq)]
19544#[non_exhaustive]
19545pub struct ListFindingsRequest {
19546    /// Required. Name of the source the findings belong to. If no location is
19547    /// specified, the default is global. The following list shows some examples:
19548    ///
19549    /// + `organizations/[organization_id]/sources/[source_id]`
19550    ///
19551    /// `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
19552    ///
19553    /// + `folders/[folder_id]/sources/[source_id]`
19554    /// + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
19555    /// + `projects/[project_id]/sources/[source_id]`
19556    /// + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
19557    ///
19558    /// To list across all sources provide a source_id of `-`. The following
19559    /// list shows some examples:
19560    ///
19561    /// + `organizations/{organization_id}/sources/-`
19562    /// + `organizations/{organization_id}/sources/-/locations/{location_id}`
19563    /// + `folders/{folder_id}/sources/-`
19564    /// + `folders/{folder_id}/sources/-locations/{location_id}`
19565    /// + `projects/{projects_id}/sources/-`
19566    /// + `projects/{projects_id}/sources/-/locations/{location_id}`
19567    pub parent: std::string::String,
19568
19569    /// Expression that defines the filter to apply across findings.
19570    /// The expression is a list of one or more restrictions combined via logical
19571    /// operators `AND` and `OR`.
19572    /// Parentheses are supported, and `OR` has higher precedence than `AND`.
19573    ///
19574    /// Restrictions have the form `<field> <operator> <value>` and may have a `-`
19575    /// character in front of them to indicate negation. Examples include:
19576    ///
19577    /// * name
19578    /// * security_marks.marks.marka
19579    ///
19580    /// The supported operators are:
19581    ///
19582    /// * `=` for all value types.
19583    /// * `>`, `<`, `>=`, `<=` for integer values.
19584    /// * `:`, meaning substring matching, for strings.
19585    ///
19586    /// The supported value types are:
19587    ///
19588    /// * string literals in quotes.
19589    /// * integer literals without quotes.
19590    /// * boolean literals `true` and `false` without quotes.
19591    ///
19592    /// The following field and operator combinations are supported:
19593    ///
19594    /// * name: `=`
19595    ///
19596    /// * parent: `=`, `:`
19597    ///
19598    /// * resource_name: `=`, `:`
19599    ///
19600    /// * state: `=`, `:`
19601    ///
19602    /// * category: `=`, `:`
19603    ///
19604    /// * external_uri: `=`, `:`
19605    ///
19606    /// * event_time: `=`, `>`, `<`, `>=`, `<=`
19607    ///
19608    ///   Usage: This should be milliseconds since epoch or an RFC3339 string.
19609    ///   Examples:
19610    ///   `event_time = "2019-06-10T16:07:18-07:00"`
19611    ///   `event_time = 1560208038000`
19612    ///
19613    /// * severity: `=`, `:`
19614    ///
19615    /// * security_marks.marks: `=`, `:`
19616    ///
19617    /// * resource:
19618    ///
19619    ///   * resource.name: `=`, `:`
19620    ///   * resource.parent_name: `=`, `:`
19621    ///   * resource.parent_display_name: `=`, `:`
19622    ///   * resource.project_name: `=`, `:`
19623    ///   * resource.project_display_name: `=`, `:`
19624    ///   * resource.type: `=`, `:`
19625    ///   * resource.folders.resource_folder: `=`, `:`
19626    ///   * resource.display_name: `=`, `:`
19627    pub filter: std::string::String,
19628
19629    /// Expression that defines what fields and order to use for sorting. The
19630    /// string value should follow SQL syntax: comma separated list of fields. For
19631    /// example: "name,parent". The default sorting order
19632    /// is ascending. To specify descending order for a field, a suffix " desc"
19633    /// should be appended to the field name. For example: "name
19634    /// desc,parent". Redundant space characters in the
19635    /// syntax are insignificant. "name desc,parent" and "
19636    /// name     desc  ,   parent  " are equivalent.
19637    ///
19638    /// The following fields are supported:
19639    /// name
19640    /// parent
19641    /// state
19642    /// category
19643    /// resource_name
19644    /// event_time
19645    /// security_marks.marks
19646    pub order_by: std::string::String,
19647
19648    /// A field mask to specify the Finding fields to be listed in the response.
19649    /// An empty field mask will list all fields.
19650    pub field_mask: std::option::Option<wkt::FieldMask>,
19651
19652    /// The value returned by the last `ListFindingsResponse`; indicates
19653    /// that this is a continuation of a prior `ListFindings` call, and
19654    /// that the system should return the next page of data.
19655    pub page_token: std::string::String,
19656
19657    /// The maximum number of results to return in a single response. Default is
19658    /// 10, minimum is 1, maximum is 1000.
19659    pub page_size: i32,
19660
19661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19662}
19663
19664impl ListFindingsRequest {
19665    /// Creates a new default instance.
19666    pub fn new() -> Self {
19667        std::default::Default::default()
19668    }
19669
19670    /// Sets the value of [parent][crate::model::ListFindingsRequest::parent].
19671    ///
19672    /// # Example
19673    /// ```ignore,no_run
19674    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19675    /// # let organization_id = "organization_id";
19676    /// # let source_id = "source_id";
19677    /// let x = ListFindingsRequest::new().set_parent(format!("organizations/{organization_id}/sources/{source_id}"));
19678    /// ```
19679    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19680        self.parent = v.into();
19681        self
19682    }
19683
19684    /// Sets the value of [filter][crate::model::ListFindingsRequest::filter].
19685    ///
19686    /// # Example
19687    /// ```ignore,no_run
19688    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19689    /// let x = ListFindingsRequest::new().set_filter("example");
19690    /// ```
19691    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19692        self.filter = v.into();
19693        self
19694    }
19695
19696    /// Sets the value of [order_by][crate::model::ListFindingsRequest::order_by].
19697    ///
19698    /// # Example
19699    /// ```ignore,no_run
19700    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19701    /// let x = ListFindingsRequest::new().set_order_by("example");
19702    /// ```
19703    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19704        self.order_by = v.into();
19705        self
19706    }
19707
19708    /// Sets the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
19709    ///
19710    /// # Example
19711    /// ```ignore,no_run
19712    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19713    /// use wkt::FieldMask;
19714    /// let x = ListFindingsRequest::new().set_field_mask(FieldMask::default()/* use setters */);
19715    /// ```
19716    pub fn set_field_mask<T>(mut self, v: T) -> Self
19717    where
19718        T: std::convert::Into<wkt::FieldMask>,
19719    {
19720        self.field_mask = std::option::Option::Some(v.into());
19721        self
19722    }
19723
19724    /// Sets or clears the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
19725    ///
19726    /// # Example
19727    /// ```ignore,no_run
19728    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19729    /// use wkt::FieldMask;
19730    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(Some(FieldMask::default()/* use setters */));
19731    /// let x = ListFindingsRequest::new().set_or_clear_field_mask(None::<FieldMask>);
19732    /// ```
19733    pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
19734    where
19735        T: std::convert::Into<wkt::FieldMask>,
19736    {
19737        self.field_mask = v.map(|x| x.into());
19738        self
19739    }
19740
19741    /// Sets the value of [page_token][crate::model::ListFindingsRequest::page_token].
19742    ///
19743    /// # Example
19744    /// ```ignore,no_run
19745    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19746    /// let x = ListFindingsRequest::new().set_page_token("example");
19747    /// ```
19748    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19749        self.page_token = v.into();
19750        self
19751    }
19752
19753    /// Sets the value of [page_size][crate::model::ListFindingsRequest::page_size].
19754    ///
19755    /// # Example
19756    /// ```ignore,no_run
19757    /// # use google_cloud_securitycenter_v2::model::ListFindingsRequest;
19758    /// let x = ListFindingsRequest::new().set_page_size(42);
19759    /// ```
19760    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19761        self.page_size = v.into();
19762        self
19763    }
19764}
19765
19766impl wkt::message::Message for ListFindingsRequest {
19767    fn typename() -> &'static str {
19768        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsRequest"
19769    }
19770}
19771
19772/// Response message for listing findings.
19773#[derive(Clone, Default, PartialEq)]
19774#[non_exhaustive]
19775pub struct ListFindingsResponse {
19776    /// Findings matching the list request.
19777    pub list_findings_results:
19778        std::vec::Vec<crate::model::list_findings_response::ListFindingsResult>,
19779
19780    /// Token to retrieve the next page of results, or empty if there are no more
19781    /// results.
19782    pub next_page_token: std::string::String,
19783
19784    /// The total number of findings matching the query.
19785    pub total_size: i32,
19786
19787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19788}
19789
19790impl ListFindingsResponse {
19791    /// Creates a new default instance.
19792    pub fn new() -> Self {
19793        std::default::Default::default()
19794    }
19795
19796    /// Sets the value of [list_findings_results][crate::model::ListFindingsResponse::list_findings_results].
19797    ///
19798    /// # Example
19799    /// ```ignore,no_run
19800    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19801    /// use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19802    /// let x = ListFindingsResponse::new()
19803    ///     .set_list_findings_results([
19804    ///         ListFindingsResult::default()/* use setters */,
19805    ///         ListFindingsResult::default()/* use (different) setters */,
19806    ///     ]);
19807    /// ```
19808    pub fn set_list_findings_results<T, V>(mut self, v: T) -> Self
19809    where
19810        T: std::iter::IntoIterator<Item = V>,
19811        V: std::convert::Into<crate::model::list_findings_response::ListFindingsResult>,
19812    {
19813        use std::iter::Iterator;
19814        self.list_findings_results = v.into_iter().map(|i| i.into()).collect();
19815        self
19816    }
19817
19818    /// Sets the value of [next_page_token][crate::model::ListFindingsResponse::next_page_token].
19819    ///
19820    /// # Example
19821    /// ```ignore,no_run
19822    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19823    /// let x = ListFindingsResponse::new().set_next_page_token("example");
19824    /// ```
19825    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19826        self.next_page_token = v.into();
19827        self
19828    }
19829
19830    /// Sets the value of [total_size][crate::model::ListFindingsResponse::total_size].
19831    ///
19832    /// # Example
19833    /// ```ignore,no_run
19834    /// # use google_cloud_securitycenter_v2::model::ListFindingsResponse;
19835    /// let x = ListFindingsResponse::new().set_total_size(42);
19836    /// ```
19837    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19838        self.total_size = v.into();
19839        self
19840    }
19841}
19842
19843impl wkt::message::Message for ListFindingsResponse {
19844    fn typename() -> &'static str {
19845        "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse"
19846    }
19847}
19848
19849#[doc(hidden)]
19850impl google_cloud_gax::paginator::internal::PageableResponse for ListFindingsResponse {
19851    type PageItem = crate::model::list_findings_response::ListFindingsResult;
19852
19853    fn items(self) -> std::vec::Vec<Self::PageItem> {
19854        self.list_findings_results
19855    }
19856
19857    fn next_page_token(&self) -> std::string::String {
19858        use std::clone::Clone;
19859        self.next_page_token.clone()
19860    }
19861}
19862
19863/// Defines additional types related to [ListFindingsResponse].
19864pub mod list_findings_response {
19865    #[allow(unused_imports)]
19866    use super::*;
19867
19868    /// Result containing the Finding.
19869    #[derive(Clone, Default, PartialEq)]
19870    #[non_exhaustive]
19871    pub struct ListFindingsResult {
19872        /// Finding matching the search request.
19873        pub finding: std::option::Option<crate::model::Finding>,
19874
19875        /// Output only. Resource that is associated with this finding.
19876        pub resource: std::option::Option<
19877            crate::model::list_findings_response::list_findings_result::Resource,
19878        >,
19879
19880        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19881    }
19882
19883    impl ListFindingsResult {
19884        /// Creates a new default instance.
19885        pub fn new() -> Self {
19886            std::default::Default::default()
19887        }
19888
19889        /// Sets the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19890        ///
19891        /// # Example
19892        /// ```ignore,no_run
19893        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19894        /// use google_cloud_securitycenter_v2::model::Finding;
19895        /// let x = ListFindingsResult::new().set_finding(Finding::default()/* use setters */);
19896        /// ```
19897        pub fn set_finding<T>(mut self, v: T) -> Self
19898        where
19899            T: std::convert::Into<crate::model::Finding>,
19900        {
19901            self.finding = std::option::Option::Some(v.into());
19902            self
19903        }
19904
19905        /// Sets or clears the value of [finding][crate::model::list_findings_response::ListFindingsResult::finding].
19906        ///
19907        /// # Example
19908        /// ```ignore,no_run
19909        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19910        /// use google_cloud_securitycenter_v2::model::Finding;
19911        /// let x = ListFindingsResult::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
19912        /// let x = ListFindingsResult::new().set_or_clear_finding(None::<Finding>);
19913        /// ```
19914        pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
19915        where
19916            T: std::convert::Into<crate::model::Finding>,
19917        {
19918            self.finding = v.map(|x| x.into());
19919            self
19920        }
19921
19922        /// Sets the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19923        ///
19924        /// # Example
19925        /// ```ignore,no_run
19926        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19927        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19928        /// let x = ListFindingsResult::new().set_resource(Resource::default()/* use setters */);
19929        /// ```
19930        pub fn set_resource<T>(mut self, v: T) -> Self
19931        where
19932            T: std::convert::Into<
19933                    crate::model::list_findings_response::list_findings_result::Resource,
19934                >,
19935        {
19936            self.resource = std::option::Option::Some(v.into());
19937            self
19938        }
19939
19940        /// Sets or clears the value of [resource][crate::model::list_findings_response::ListFindingsResult::resource].
19941        ///
19942        /// # Example
19943        /// ```ignore,no_run
19944        /// # use google_cloud_securitycenter_v2::model::list_findings_response::ListFindingsResult;
19945        /// use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
19946        /// let x = ListFindingsResult::new().set_or_clear_resource(Some(Resource::default()/* use setters */));
19947        /// let x = ListFindingsResult::new().set_or_clear_resource(None::<Resource>);
19948        /// ```
19949        pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
19950        where
19951            T: std::convert::Into<
19952                    crate::model::list_findings_response::list_findings_result::Resource,
19953                >,
19954        {
19955            self.resource = v.map(|x| x.into());
19956            self
19957        }
19958    }
19959
19960    impl wkt::message::Message for ListFindingsResult {
19961        fn typename() -> &'static str {
19962            "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult"
19963        }
19964    }
19965
19966    /// Defines additional types related to [ListFindingsResult].
19967    pub mod list_findings_result {
19968        #[allow(unused_imports)]
19969        use super::*;
19970
19971        /// Information related to the Google Cloud resource that is
19972        /// associated with this finding.
19973        #[derive(Clone, Default, PartialEq)]
19974        #[non_exhaustive]
19975        pub struct Resource {
19976
19977            /// The full resource name of the resource. See:
19978            /// <https://cloud.google.com/apis/design/resource_names#full_resource_name>
19979            pub name: std::string::String,
19980
19981            /// The human readable name of the resource.
19982            pub display_name: std::string::String,
19983
19984            /// The full resource type of the resource.
19985            pub r#type: std::string::String,
19986
19987            /// Indicates which cloud provider the finding is from.
19988            pub cloud_provider: crate::model::CloudProvider,
19989
19990            /// The service or resource provider associated with the resource.
19991            pub service: std::string::String,
19992
19993            /// The region or location of the service (if applicable).
19994            pub location: std::string::String,
19995
19996            /// Provides the path to the resource within the resource hierarchy.
19997            pub resource_path: std::option::Option<crate::model::ResourcePath>,
19998
19999            /// A string representation of the resource path.
20000            /// For Google Cloud, it has the format of
20001            /// `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}`
20002            /// where there can be any number of folders.
20003            /// For AWS, it has the format of
20004            /// `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}`
20005            /// where there can be any number of organizational units.
20006            /// For Azure, it has the format of
20007            /// `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}`
20008            /// where there can be any number of management groups.
20009            pub resource_path_string: std::string::String,
20010
20011            /// The metadata associated with the cloud provider.
20012            pub cloud_provider_metadata: std::option::Option<crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata>,
20013
20014            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20015        }
20016
20017        impl Resource {
20018            /// Creates a new default instance.
20019            pub fn new() -> Self {
20020                std::default::Default::default()
20021            }
20022
20023            /// Sets the value of [name][crate::model::list_findings_response::list_findings_result::Resource::name].
20024            ///
20025            /// # Example
20026            /// ```ignore,no_run
20027            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20028            /// let x = Resource::new().set_name("example");
20029            /// ```
20030            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20031                self.name = v.into();
20032                self
20033            }
20034
20035            /// Sets the value of [display_name][crate::model::list_findings_response::list_findings_result::Resource::display_name].
20036            ///
20037            /// # Example
20038            /// ```ignore,no_run
20039            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20040            /// let x = Resource::new().set_display_name("example");
20041            /// ```
20042            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
20043                mut self,
20044                v: T,
20045            ) -> Self {
20046                self.display_name = v.into();
20047                self
20048            }
20049
20050            /// Sets the value of [r#type][crate::model::list_findings_response::list_findings_result::Resource::type].
20051            ///
20052            /// # Example
20053            /// ```ignore,no_run
20054            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20055            /// let x = Resource::new().set_type("example");
20056            /// ```
20057            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20058                self.r#type = v.into();
20059                self
20060            }
20061
20062            /// Sets the value of [cloud_provider][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider].
20063            ///
20064            /// # Example
20065            /// ```ignore,no_run
20066            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20067            /// use google_cloud_securitycenter_v2::model::CloudProvider;
20068            /// let x0 = Resource::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
20069            /// let x1 = Resource::new().set_cloud_provider(CloudProvider::AmazonWebServices);
20070            /// let x2 = Resource::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
20071            /// ```
20072            pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
20073                mut self,
20074                v: T,
20075            ) -> Self {
20076                self.cloud_provider = v.into();
20077                self
20078            }
20079
20080            /// Sets the value of [service][crate::model::list_findings_response::list_findings_result::Resource::service].
20081            ///
20082            /// # Example
20083            /// ```ignore,no_run
20084            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20085            /// let x = Resource::new().set_service("example");
20086            /// ```
20087            pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20088                self.service = v.into();
20089                self
20090            }
20091
20092            /// Sets the value of [location][crate::model::list_findings_response::list_findings_result::Resource::location].
20093            ///
20094            /// # Example
20095            /// ```ignore,no_run
20096            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20097            /// let x = Resource::new().set_location("example");
20098            /// ```
20099            pub fn set_location<T: std::convert::Into<std::string::String>>(
20100                mut self,
20101                v: T,
20102            ) -> Self {
20103                self.location = v.into();
20104                self
20105            }
20106
20107            /// Sets the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
20108            ///
20109            /// # Example
20110            /// ```ignore,no_run
20111            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20112            /// use google_cloud_securitycenter_v2::model::ResourcePath;
20113            /// let x = Resource::new().set_resource_path(ResourcePath::default()/* use setters */);
20114            /// ```
20115            pub fn set_resource_path<T>(mut self, v: T) -> Self
20116            where
20117                T: std::convert::Into<crate::model::ResourcePath>,
20118            {
20119                self.resource_path = std::option::Option::Some(v.into());
20120                self
20121            }
20122
20123            /// Sets or clears the value of [resource_path][crate::model::list_findings_response::list_findings_result::Resource::resource_path].
20124            ///
20125            /// # Example
20126            /// ```ignore,no_run
20127            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20128            /// use google_cloud_securitycenter_v2::model::ResourcePath;
20129            /// let x = Resource::new().set_or_clear_resource_path(Some(ResourcePath::default()/* use setters */));
20130            /// let x = Resource::new().set_or_clear_resource_path(None::<ResourcePath>);
20131            /// ```
20132            pub fn set_or_clear_resource_path<T>(mut self, v: std::option::Option<T>) -> Self
20133            where
20134                T: std::convert::Into<crate::model::ResourcePath>,
20135            {
20136                self.resource_path = v.map(|x| x.into());
20137                self
20138            }
20139
20140            /// Sets the value of [resource_path_string][crate::model::list_findings_response::list_findings_result::Resource::resource_path_string].
20141            ///
20142            /// # Example
20143            /// ```ignore,no_run
20144            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20145            /// let x = Resource::new().set_resource_path_string("example");
20146            /// ```
20147            pub fn set_resource_path_string<T: std::convert::Into<std::string::String>>(
20148                mut self,
20149                v: T,
20150            ) -> Self {
20151                self.resource_path_string = v.into();
20152                self
20153            }
20154
20155            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata].
20156            ///
20157            /// Note that all the setters affecting `cloud_provider_metadata` are mutually
20158            /// exclusive.
20159            ///
20160            /// # Example
20161            /// ```ignore,no_run
20162            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20163            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
20164            /// let x = Resource::new().set_cloud_provider_metadata(Some(
20165            ///     google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(GcpMetadata::default().into())));
20166            /// ```
20167            pub fn set_cloud_provider_metadata<T: std::convert::Into<std::option::Option<crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata>>>(mut self, v: T) -> Self
20168            {
20169                self.cloud_provider_metadata = v.into();
20170                self
20171            }
20172
20173            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20174            /// if it holds a `GcpMetadata`, `None` if the field is not set or
20175            /// holds a different branch.
20176            pub fn gcp_metadata(
20177                &self,
20178            ) -> std::option::Option<&std::boxed::Box<crate::model::GcpMetadata>> {
20179                #[allow(unreachable_patterns)]
20180                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
20181                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(v) => std::option::Option::Some(v),
20182                    _ => std::option::Option::None,
20183                })
20184            }
20185
20186            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20187            /// to hold a `GcpMetadata`.
20188            ///
20189            /// Note that all the setters affecting `cloud_provider_metadata` are
20190            /// mutually exclusive.
20191            ///
20192            /// # Example
20193            /// ```ignore,no_run
20194            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20195            /// use google_cloud_securitycenter_v2::model::GcpMetadata;
20196            /// let x = Resource::new().set_gcp_metadata(GcpMetadata::default()/* use setters */);
20197            /// assert!(x.gcp_metadata().is_some());
20198            /// assert!(x.aws_metadata().is_none());
20199            /// assert!(x.azure_metadata().is_none());
20200            /// ```
20201            pub fn set_gcp_metadata<
20202                T: std::convert::Into<std::boxed::Box<crate::model::GcpMetadata>>,
20203            >(
20204                mut self,
20205                v: T,
20206            ) -> Self {
20207                self.cloud_provider_metadata = std::option::Option::Some(
20208                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::GcpMetadata(
20209                        v.into()
20210                    )
20211                );
20212                self
20213            }
20214
20215            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20216            /// if it holds a `AwsMetadata`, `None` if the field is not set or
20217            /// holds a different branch.
20218            pub fn aws_metadata(
20219                &self,
20220            ) -> std::option::Option<&std::boxed::Box<crate::model::AwsMetadata>> {
20221                #[allow(unreachable_patterns)]
20222                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
20223                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(v) => std::option::Option::Some(v),
20224                    _ => std::option::Option::None,
20225                })
20226            }
20227
20228            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20229            /// to hold a `AwsMetadata`.
20230            ///
20231            /// Note that all the setters affecting `cloud_provider_metadata` are
20232            /// mutually exclusive.
20233            ///
20234            /// # Example
20235            /// ```ignore,no_run
20236            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20237            /// use google_cloud_securitycenter_v2::model::AwsMetadata;
20238            /// let x = Resource::new().set_aws_metadata(AwsMetadata::default()/* use setters */);
20239            /// assert!(x.aws_metadata().is_some());
20240            /// assert!(x.gcp_metadata().is_none());
20241            /// assert!(x.azure_metadata().is_none());
20242            /// ```
20243            pub fn set_aws_metadata<
20244                T: std::convert::Into<std::boxed::Box<crate::model::AwsMetadata>>,
20245            >(
20246                mut self,
20247                v: T,
20248            ) -> Self {
20249                self.cloud_provider_metadata = std::option::Option::Some(
20250                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AwsMetadata(
20251                        v.into()
20252                    )
20253                );
20254                self
20255            }
20256
20257            /// The value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20258            /// if it holds a `AzureMetadata`, `None` if the field is not set or
20259            /// holds a different branch.
20260            pub fn azure_metadata(
20261                &self,
20262            ) -> std::option::Option<&std::boxed::Box<crate::model::AzureMetadata>> {
20263                #[allow(unreachable_patterns)]
20264                self.cloud_provider_metadata.as_ref().and_then(|v| match v {
20265                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(v) => std::option::Option::Some(v),
20266                    _ => std::option::Option::None,
20267                })
20268            }
20269
20270            /// Sets the value of [cloud_provider_metadata][crate::model::list_findings_response::list_findings_result::Resource::cloud_provider_metadata]
20271            /// to hold a `AzureMetadata`.
20272            ///
20273            /// Note that all the setters affecting `cloud_provider_metadata` are
20274            /// mutually exclusive.
20275            ///
20276            /// # Example
20277            /// ```ignore,no_run
20278            /// # use google_cloud_securitycenter_v2::model::list_findings_response::list_findings_result::Resource;
20279            /// use google_cloud_securitycenter_v2::model::AzureMetadata;
20280            /// let x = Resource::new().set_azure_metadata(AzureMetadata::default()/* use setters */);
20281            /// assert!(x.azure_metadata().is_some());
20282            /// assert!(x.gcp_metadata().is_none());
20283            /// assert!(x.aws_metadata().is_none());
20284            /// ```
20285            pub fn set_azure_metadata<
20286                T: std::convert::Into<std::boxed::Box<crate::model::AzureMetadata>>,
20287            >(
20288                mut self,
20289                v: T,
20290            ) -> Self {
20291                self.cloud_provider_metadata = std::option::Option::Some(
20292                    crate::model::list_findings_response::list_findings_result::resource::CloudProviderMetadata::AzureMetadata(
20293                        v.into()
20294                    )
20295                );
20296                self
20297            }
20298        }
20299
20300        impl wkt::message::Message for Resource {
20301            fn typename() -> &'static str {
20302                "type.googleapis.com/google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource"
20303            }
20304        }
20305
20306        /// Defines additional types related to [Resource].
20307        pub mod resource {
20308            #[allow(unused_imports)]
20309            use super::*;
20310
20311            /// The metadata associated with the cloud provider.
20312            #[derive(Clone, Debug, PartialEq)]
20313            #[non_exhaustive]
20314            pub enum CloudProviderMetadata {
20315                /// The GCP metadata associated with the finding.
20316                GcpMetadata(std::boxed::Box<crate::model::GcpMetadata>),
20317                /// The AWS metadata associated with the finding.
20318                AwsMetadata(std::boxed::Box<crate::model::AwsMetadata>),
20319                /// The Azure metadata associated with the finding.
20320                AzureMetadata(std::boxed::Box<crate::model::AzureMetadata>),
20321            }
20322        }
20323    }
20324}
20325
20326/// Request message for listing  mute configs at a given scope e.g. organization,
20327/// folder or project. If no location is specified, default is
20328/// global.
20329#[derive(Clone, Default, PartialEq)]
20330#[non_exhaustive]
20331pub struct ListMuteConfigsRequest {
20332    /// Required. The parent, which owns the collection of mute configs. Its format
20333    /// is `organizations/[organization_id]", "folders/[folder_id]`,
20334    /// `projects/[project_id]`,
20335    /// `organizations/[organization_id]/locations/[location_id]`,
20336    /// `folders/[folder_id]/locations/[location_id]`,
20337    /// `projects/[project_id]/locations/[location_id]`.
20338    pub parent: std::string::String,
20339
20340    /// The maximum number of configs to return. The service may return fewer than
20341    /// this value.
20342    /// If unspecified, at most 10 configs will be returned.
20343    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20344    pub page_size: i32,
20345
20346    /// A page token, received from a previous `ListMuteConfigs` call.
20347    /// Provide this to retrieve the subsequent page.
20348    ///
20349    /// When paginating, all other parameters provided to `ListMuteConfigs` must
20350    /// match the call that provided the page token.
20351    pub page_token: std::string::String,
20352
20353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20354}
20355
20356impl ListMuteConfigsRequest {
20357    /// Creates a new default instance.
20358    pub fn new() -> Self {
20359        std::default::Default::default()
20360    }
20361
20362    /// Sets the value of [parent][crate::model::ListMuteConfigsRequest::parent].
20363    ///
20364    /// # Example
20365    /// ```ignore,no_run
20366    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
20367    /// # let organization_id = "organization_id";
20368    /// let x = ListMuteConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
20369    /// ```
20370    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20371        self.parent = v.into();
20372        self
20373    }
20374
20375    /// Sets the value of [page_size][crate::model::ListMuteConfigsRequest::page_size].
20376    ///
20377    /// # Example
20378    /// ```ignore,no_run
20379    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
20380    /// let x = ListMuteConfigsRequest::new().set_page_size(42);
20381    /// ```
20382    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20383        self.page_size = v.into();
20384        self
20385    }
20386
20387    /// Sets the value of [page_token][crate::model::ListMuteConfigsRequest::page_token].
20388    ///
20389    /// # Example
20390    /// ```ignore,no_run
20391    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsRequest;
20392    /// let x = ListMuteConfigsRequest::new().set_page_token("example");
20393    /// ```
20394    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20395        self.page_token = v.into();
20396        self
20397    }
20398}
20399
20400impl wkt::message::Message for ListMuteConfigsRequest {
20401    fn typename() -> &'static str {
20402        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsRequest"
20403    }
20404}
20405
20406/// Response message for listing mute configs.
20407#[derive(Clone, Default, PartialEq)]
20408#[non_exhaustive]
20409pub struct ListMuteConfigsResponse {
20410    /// The mute configs from the specified parent.
20411    pub mute_configs: std::vec::Vec<crate::model::MuteConfig>,
20412
20413    /// A token, which can be sent as `page_token` to retrieve the next page.
20414    /// If this field is omitted, there are no subsequent pages.
20415    pub next_page_token: std::string::String,
20416
20417    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20418}
20419
20420impl ListMuteConfigsResponse {
20421    /// Creates a new default instance.
20422    pub fn new() -> Self {
20423        std::default::Default::default()
20424    }
20425
20426    /// Sets the value of [mute_configs][crate::model::ListMuteConfigsResponse::mute_configs].
20427    ///
20428    /// # Example
20429    /// ```ignore,no_run
20430    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
20431    /// use google_cloud_securitycenter_v2::model::MuteConfig;
20432    /// let x = ListMuteConfigsResponse::new()
20433    ///     .set_mute_configs([
20434    ///         MuteConfig::default()/* use setters */,
20435    ///         MuteConfig::default()/* use (different) setters */,
20436    ///     ]);
20437    /// ```
20438    pub fn set_mute_configs<T, V>(mut self, v: T) -> Self
20439    where
20440        T: std::iter::IntoIterator<Item = V>,
20441        V: std::convert::Into<crate::model::MuteConfig>,
20442    {
20443        use std::iter::Iterator;
20444        self.mute_configs = v.into_iter().map(|i| i.into()).collect();
20445        self
20446    }
20447
20448    /// Sets the value of [next_page_token][crate::model::ListMuteConfigsResponse::next_page_token].
20449    ///
20450    /// # Example
20451    /// ```ignore,no_run
20452    /// # use google_cloud_securitycenter_v2::model::ListMuteConfigsResponse;
20453    /// let x = ListMuteConfigsResponse::new().set_next_page_token("example");
20454    /// ```
20455    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20456        self.next_page_token = v.into();
20457        self
20458    }
20459}
20460
20461impl wkt::message::Message for ListMuteConfigsResponse {
20462    fn typename() -> &'static str {
20463        "type.googleapis.com/google.cloud.securitycenter.v2.ListMuteConfigsResponse"
20464    }
20465}
20466
20467#[doc(hidden)]
20468impl google_cloud_gax::paginator::internal::PageableResponse for ListMuteConfigsResponse {
20469    type PageItem = crate::model::MuteConfig;
20470
20471    fn items(self) -> std::vec::Vec<Self::PageItem> {
20472        self.mute_configs
20473    }
20474
20475    fn next_page_token(&self) -> std::string::String {
20476        use std::clone::Clone;
20477        self.next_page_token.clone()
20478    }
20479}
20480
20481/// Request message for listing notification configs.
20482#[derive(Clone, Default, PartialEq)]
20483#[non_exhaustive]
20484pub struct ListNotificationConfigsRequest {
20485    /// Required. The name of the parent in which to list the notification
20486    /// configurations. Its format is
20487    /// "organizations/[organization_id]/locations/[location_id]",
20488    /// "folders/[folder_id]/locations/[location_id]", or
20489    /// "projects/[project_id]/locations/[location_id]".
20490    pub parent: std::string::String,
20491
20492    /// The value returned by the last `ListNotificationConfigsResponse`; indicates
20493    /// that this is a continuation of a prior `ListNotificationConfigs` call, and
20494    /// that the system should return the next page of data.
20495    pub page_token: std::string::String,
20496
20497    /// The maximum number of results to return in a single response. Default is
20498    /// 10, minimum is 1, maximum is 1000.
20499    pub page_size: i32,
20500
20501    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20502}
20503
20504impl ListNotificationConfigsRequest {
20505    /// Creates a new default instance.
20506    pub fn new() -> Self {
20507        std::default::Default::default()
20508    }
20509
20510    /// Sets the value of [parent][crate::model::ListNotificationConfigsRequest::parent].
20511    ///
20512    /// # Example
20513    /// ```ignore,no_run
20514    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
20515    /// # let organization_id = "organization_id";
20516    /// # let location_id = "location_id";
20517    /// let x = ListNotificationConfigsRequest::new().set_parent(format!("organizations/{organization_id}/locations/{location_id}"));
20518    /// ```
20519    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20520        self.parent = v.into();
20521        self
20522    }
20523
20524    /// Sets the value of [page_token][crate::model::ListNotificationConfigsRequest::page_token].
20525    ///
20526    /// # Example
20527    /// ```ignore,no_run
20528    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
20529    /// let x = ListNotificationConfigsRequest::new().set_page_token("example");
20530    /// ```
20531    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20532        self.page_token = v.into();
20533        self
20534    }
20535
20536    /// Sets the value of [page_size][crate::model::ListNotificationConfigsRequest::page_size].
20537    ///
20538    /// # Example
20539    /// ```ignore,no_run
20540    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsRequest;
20541    /// let x = ListNotificationConfigsRequest::new().set_page_size(42);
20542    /// ```
20543    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20544        self.page_size = v.into();
20545        self
20546    }
20547}
20548
20549impl wkt::message::Message for ListNotificationConfigsRequest {
20550    fn typename() -> &'static str {
20551        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsRequest"
20552    }
20553}
20554
20555/// Response message for listing notification configs.
20556#[derive(Clone, Default, PartialEq)]
20557#[non_exhaustive]
20558pub struct ListNotificationConfigsResponse {
20559    /// Notification configs belonging to the requested parent.
20560    pub notification_configs: std::vec::Vec<crate::model::NotificationConfig>,
20561
20562    /// Token to retrieve the next page of results, or empty if there are no more
20563    /// results.
20564    pub next_page_token: std::string::String,
20565
20566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20567}
20568
20569impl ListNotificationConfigsResponse {
20570    /// Creates a new default instance.
20571    pub fn new() -> Self {
20572        std::default::Default::default()
20573    }
20574
20575    /// Sets the value of [notification_configs][crate::model::ListNotificationConfigsResponse::notification_configs].
20576    ///
20577    /// # Example
20578    /// ```ignore,no_run
20579    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
20580    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
20581    /// let x = ListNotificationConfigsResponse::new()
20582    ///     .set_notification_configs([
20583    ///         NotificationConfig::default()/* use setters */,
20584    ///         NotificationConfig::default()/* use (different) setters */,
20585    ///     ]);
20586    /// ```
20587    pub fn set_notification_configs<T, V>(mut self, v: T) -> Self
20588    where
20589        T: std::iter::IntoIterator<Item = V>,
20590        V: std::convert::Into<crate::model::NotificationConfig>,
20591    {
20592        use std::iter::Iterator;
20593        self.notification_configs = v.into_iter().map(|i| i.into()).collect();
20594        self
20595    }
20596
20597    /// Sets the value of [next_page_token][crate::model::ListNotificationConfigsResponse::next_page_token].
20598    ///
20599    /// # Example
20600    /// ```ignore,no_run
20601    /// # use google_cloud_securitycenter_v2::model::ListNotificationConfigsResponse;
20602    /// let x = ListNotificationConfigsResponse::new().set_next_page_token("example");
20603    /// ```
20604    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20605        self.next_page_token = v.into();
20606        self
20607    }
20608}
20609
20610impl wkt::message::Message for ListNotificationConfigsResponse {
20611    fn typename() -> &'static str {
20612        "type.googleapis.com/google.cloud.securitycenter.v2.ListNotificationConfigsResponse"
20613    }
20614}
20615
20616#[doc(hidden)]
20617impl google_cloud_gax::paginator::internal::PageableResponse for ListNotificationConfigsResponse {
20618    type PageItem = crate::model::NotificationConfig;
20619
20620    fn items(self) -> std::vec::Vec<Self::PageItem> {
20621        self.notification_configs
20622    }
20623
20624    fn next_page_token(&self) -> std::string::String {
20625        use std::clone::Clone;
20626        self.next_page_token.clone()
20627    }
20628}
20629
20630/// Request message to list resource value configs of a parent
20631#[derive(Clone, Default, PartialEq)]
20632#[non_exhaustive]
20633pub struct ListResourceValueConfigsRequest {
20634    /// Required. The parent, which owns the collection of resource value configs.
20635    /// Its format is
20636    /// `organizations/[organization_id]`
20637    pub parent: std::string::String,
20638
20639    /// The maximum number of configs to return. The service may return fewer than
20640    /// this value.
20641    /// If unspecified, at most 10 configs will be returned.
20642    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20643    pub page_size: i32,
20644
20645    /// A page token, received from a previous `ListResourceValueConfigs` call.
20646    /// Provide this to retrieve the subsequent page.
20647    ///
20648    /// When paginating, all other parameters provided to
20649    /// `ListResourceValueConfigs` must match the call that provided the
20650    /// page token.
20651    ///
20652    /// page_size can be specified, and the new page_size will be used.
20653    pub page_token: std::string::String,
20654
20655    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20656}
20657
20658impl ListResourceValueConfigsRequest {
20659    /// Creates a new default instance.
20660    pub fn new() -> Self {
20661        std::default::Default::default()
20662    }
20663
20664    /// Sets the value of [parent][crate::model::ListResourceValueConfigsRequest::parent].
20665    ///
20666    /// # Example
20667    /// ```ignore,no_run
20668    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20669    /// # let organization_id = "organization_id";
20670    /// let x = ListResourceValueConfigsRequest::new().set_parent(format!("organizations/{organization_id}"));
20671    /// ```
20672    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20673        self.parent = v.into();
20674        self
20675    }
20676
20677    /// Sets the value of [page_size][crate::model::ListResourceValueConfigsRequest::page_size].
20678    ///
20679    /// # Example
20680    /// ```ignore,no_run
20681    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20682    /// let x = ListResourceValueConfigsRequest::new().set_page_size(42);
20683    /// ```
20684    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20685        self.page_size = v.into();
20686        self
20687    }
20688
20689    /// Sets the value of [page_token][crate::model::ListResourceValueConfigsRequest::page_token].
20690    ///
20691    /// # Example
20692    /// ```ignore,no_run
20693    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsRequest;
20694    /// let x = ListResourceValueConfigsRequest::new().set_page_token("example");
20695    /// ```
20696    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20697        self.page_token = v.into();
20698        self
20699    }
20700}
20701
20702impl wkt::message::Message for ListResourceValueConfigsRequest {
20703    fn typename() -> &'static str {
20704        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsRequest"
20705    }
20706}
20707
20708/// Response message to list resource value configs
20709#[derive(Clone, Default, PartialEq)]
20710#[non_exhaustive]
20711pub struct ListResourceValueConfigsResponse {
20712    /// The resource value configs from the specified parent.
20713    pub resource_value_configs: std::vec::Vec<crate::model::ResourceValueConfig>,
20714
20715    /// A token, which can be sent as `page_token` to retrieve the next page.
20716    /// If this field is empty, there are no subsequent pages.
20717    pub next_page_token: std::string::String,
20718
20719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20720}
20721
20722impl ListResourceValueConfigsResponse {
20723    /// Creates a new default instance.
20724    pub fn new() -> Self {
20725        std::default::Default::default()
20726    }
20727
20728    /// Sets the value of [resource_value_configs][crate::model::ListResourceValueConfigsResponse::resource_value_configs].
20729    ///
20730    /// # Example
20731    /// ```ignore,no_run
20732    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
20733    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
20734    /// let x = ListResourceValueConfigsResponse::new()
20735    ///     .set_resource_value_configs([
20736    ///         ResourceValueConfig::default()/* use setters */,
20737    ///         ResourceValueConfig::default()/* use (different) setters */,
20738    ///     ]);
20739    /// ```
20740    pub fn set_resource_value_configs<T, V>(mut self, v: T) -> Self
20741    where
20742        T: std::iter::IntoIterator<Item = V>,
20743        V: std::convert::Into<crate::model::ResourceValueConfig>,
20744    {
20745        use std::iter::Iterator;
20746        self.resource_value_configs = v.into_iter().map(|i| i.into()).collect();
20747        self
20748    }
20749
20750    /// Sets the value of [next_page_token][crate::model::ListResourceValueConfigsResponse::next_page_token].
20751    ///
20752    /// # Example
20753    /// ```ignore,no_run
20754    /// # use google_cloud_securitycenter_v2::model::ListResourceValueConfigsResponse;
20755    /// let x = ListResourceValueConfigsResponse::new().set_next_page_token("example");
20756    /// ```
20757    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20758        self.next_page_token = v.into();
20759        self
20760    }
20761}
20762
20763impl wkt::message::Message for ListResourceValueConfigsResponse {
20764    fn typename() -> &'static str {
20765        "type.googleapis.com/google.cloud.securitycenter.v2.ListResourceValueConfigsResponse"
20766    }
20767}
20768
20769#[doc(hidden)]
20770impl google_cloud_gax::paginator::internal::PageableResponse for ListResourceValueConfigsResponse {
20771    type PageItem = crate::model::ResourceValueConfig;
20772
20773    fn items(self) -> std::vec::Vec<Self::PageItem> {
20774        self.resource_value_configs
20775    }
20776
20777    fn next_page_token(&self) -> std::string::String {
20778        use std::clone::Clone;
20779        self.next_page_token.clone()
20780    }
20781}
20782
20783/// Request message for listing sources.
20784#[derive(Clone, Default, PartialEq)]
20785#[non_exhaustive]
20786pub struct ListSourcesRequest {
20787    /// Required. Resource name of the parent of sources to list. Its format should
20788    /// be `organizations/[organization_id]`, `folders/[folder_id]`, or
20789    /// `projects/[project_id]`.
20790    pub parent: std::string::String,
20791
20792    /// The value returned by the last `ListSourcesResponse`; indicates
20793    /// that this is a continuation of a prior `ListSources` call, and
20794    /// that the system should return the next page of data.
20795    pub page_token: std::string::String,
20796
20797    /// The maximum number of results to return in a single response. Default is
20798    /// 10, minimum is 1, maximum is 1000.
20799    pub page_size: i32,
20800
20801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20802}
20803
20804impl ListSourcesRequest {
20805    /// Creates a new default instance.
20806    pub fn new() -> Self {
20807        std::default::Default::default()
20808    }
20809
20810    /// Sets the value of [parent][crate::model::ListSourcesRequest::parent].
20811    ///
20812    /// # Example
20813    /// ```ignore,no_run
20814    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20815    /// # let organization_id = "organization_id";
20816    /// let x = ListSourcesRequest::new().set_parent(format!("organizations/{organization_id}"));
20817    /// ```
20818    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20819        self.parent = v.into();
20820        self
20821    }
20822
20823    /// Sets the value of [page_token][crate::model::ListSourcesRequest::page_token].
20824    ///
20825    /// # Example
20826    /// ```ignore,no_run
20827    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20828    /// let x = ListSourcesRequest::new().set_page_token("example");
20829    /// ```
20830    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20831        self.page_token = v.into();
20832        self
20833    }
20834
20835    /// Sets the value of [page_size][crate::model::ListSourcesRequest::page_size].
20836    ///
20837    /// # Example
20838    /// ```ignore,no_run
20839    /// # use google_cloud_securitycenter_v2::model::ListSourcesRequest;
20840    /// let x = ListSourcesRequest::new().set_page_size(42);
20841    /// ```
20842    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20843        self.page_size = v.into();
20844        self
20845    }
20846}
20847
20848impl wkt::message::Message for ListSourcesRequest {
20849    fn typename() -> &'static str {
20850        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesRequest"
20851    }
20852}
20853
20854/// Response message for listing sources.
20855#[derive(Clone, Default, PartialEq)]
20856#[non_exhaustive]
20857pub struct ListSourcesResponse {
20858    /// Sources belonging to the requested parent.
20859    pub sources: std::vec::Vec<crate::model::Source>,
20860
20861    /// Token to retrieve the next page of results, or empty if there are no more
20862    /// results.
20863    pub next_page_token: std::string::String,
20864
20865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20866}
20867
20868impl ListSourcesResponse {
20869    /// Creates a new default instance.
20870    pub fn new() -> Self {
20871        std::default::Default::default()
20872    }
20873
20874    /// Sets the value of [sources][crate::model::ListSourcesResponse::sources].
20875    ///
20876    /// # Example
20877    /// ```ignore,no_run
20878    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20879    /// use google_cloud_securitycenter_v2::model::Source;
20880    /// let x = ListSourcesResponse::new()
20881    ///     .set_sources([
20882    ///         Source::default()/* use setters */,
20883    ///         Source::default()/* use (different) setters */,
20884    ///     ]);
20885    /// ```
20886    pub fn set_sources<T, V>(mut self, v: T) -> Self
20887    where
20888        T: std::iter::IntoIterator<Item = V>,
20889        V: std::convert::Into<crate::model::Source>,
20890    {
20891        use std::iter::Iterator;
20892        self.sources = v.into_iter().map(|i| i.into()).collect();
20893        self
20894    }
20895
20896    /// Sets the value of [next_page_token][crate::model::ListSourcesResponse::next_page_token].
20897    ///
20898    /// # Example
20899    /// ```ignore,no_run
20900    /// # use google_cloud_securitycenter_v2::model::ListSourcesResponse;
20901    /// let x = ListSourcesResponse::new().set_next_page_token("example");
20902    /// ```
20903    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20904        self.next_page_token = v.into();
20905        self
20906    }
20907}
20908
20909impl wkt::message::Message for ListSourcesResponse {
20910    fn typename() -> &'static str {
20911        "type.googleapis.com/google.cloud.securitycenter.v2.ListSourcesResponse"
20912    }
20913}
20914
20915#[doc(hidden)]
20916impl google_cloud_gax::paginator::internal::PageableResponse for ListSourcesResponse {
20917    type PageItem = crate::model::Source;
20918
20919    fn items(self) -> std::vec::Vec<Self::PageItem> {
20920        self.sources
20921    }
20922
20923    fn next_page_token(&self) -> std::string::String {
20924        use std::clone::Clone;
20925        self.next_page_token.clone()
20926    }
20927}
20928
20929/// Request message for listing the valued resources for a given simulation.
20930#[derive(Clone, Default, PartialEq)]
20931#[non_exhaustive]
20932pub struct ListValuedResourcesRequest {
20933    /// Required. Name of parent to list exposed resources.
20934    ///
20935    /// Valid formats:
20936    /// `organizations/{organization}`,
20937    /// `organizations/{organization}/simulations/{simulation}`
20938    /// `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
20939    pub parent: std::string::String,
20940
20941    /// The filter expression that filters the valued resources in the response.
20942    /// Supported fields:
20943    ///
20944    /// * `resource_value` supports =
20945    /// * `resource_type` supports =
20946    pub filter: std::string::String,
20947
20948    /// The value returned by the last `ListValuedResourcesResponse`; indicates
20949    /// that this is a continuation of a prior `ListValuedResources` call, and
20950    /// that the system should return the next page of data.
20951    pub page_token: std::string::String,
20952
20953    /// The maximum number of results to return in a single response. Default is
20954    /// 10, minimum is 1, maximum is 1000.
20955    pub page_size: i32,
20956
20957    /// Optional. The fields by which to order the valued resources response.
20958    ///
20959    /// Supported fields:
20960    ///
20961    /// * `exposed_score`
20962    ///
20963    /// * `resource_value`
20964    ///
20965    /// * `resource_type`
20966    ///
20967    ///
20968    /// Values should be a comma separated list of fields. For example:
20969    /// `exposed_score,resource_value`.
20970    ///
20971    /// The default sorting order is descending. To specify ascending or descending
20972    /// order for a field, append a " ASC" or a " DESC" suffix, respectively; for
20973    /// example: `exposed_score DESC`.
20974    pub order_by: std::string::String,
20975
20976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20977}
20978
20979impl ListValuedResourcesRequest {
20980    /// Creates a new default instance.
20981    pub fn new() -> Self {
20982        std::default::Default::default()
20983    }
20984
20985    /// Sets the value of [parent][crate::model::ListValuedResourcesRequest::parent].
20986    ///
20987    /// # Example
20988    /// ```ignore,no_run
20989    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
20990    /// # let organization_id = "organization_id";
20991    /// # let simulation_id = "simulation_id";
20992    /// let x = ListValuedResourcesRequest::new().set_parent(format!("organizations/{organization_id}/simulations/{simulation_id}"));
20993    /// ```
20994    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20995        self.parent = v.into();
20996        self
20997    }
20998
20999    /// Sets the value of [filter][crate::model::ListValuedResourcesRequest::filter].
21000    ///
21001    /// # Example
21002    /// ```ignore,no_run
21003    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
21004    /// let x = ListValuedResourcesRequest::new().set_filter("example");
21005    /// ```
21006    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21007        self.filter = v.into();
21008        self
21009    }
21010
21011    /// Sets the value of [page_token][crate::model::ListValuedResourcesRequest::page_token].
21012    ///
21013    /// # Example
21014    /// ```ignore,no_run
21015    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
21016    /// let x = ListValuedResourcesRequest::new().set_page_token("example");
21017    /// ```
21018    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21019        self.page_token = v.into();
21020        self
21021    }
21022
21023    /// Sets the value of [page_size][crate::model::ListValuedResourcesRequest::page_size].
21024    ///
21025    /// # Example
21026    /// ```ignore,no_run
21027    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
21028    /// let x = ListValuedResourcesRequest::new().set_page_size(42);
21029    /// ```
21030    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21031        self.page_size = v.into();
21032        self
21033    }
21034
21035    /// Sets the value of [order_by][crate::model::ListValuedResourcesRequest::order_by].
21036    ///
21037    /// # Example
21038    /// ```ignore,no_run
21039    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesRequest;
21040    /// let x = ListValuedResourcesRequest::new().set_order_by("example");
21041    /// ```
21042    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21043        self.order_by = v.into();
21044        self
21045    }
21046}
21047
21048impl wkt::message::Message for ListValuedResourcesRequest {
21049    fn typename() -> &'static str {
21050        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesRequest"
21051    }
21052}
21053
21054/// Response message for listing the valued resources for a given simulation.
21055#[derive(Clone, Default, PartialEq)]
21056#[non_exhaustive]
21057pub struct ListValuedResourcesResponse {
21058    /// The valued resources that the attack path simulation identified.
21059    pub valued_resources: std::vec::Vec<crate::model::ValuedResource>,
21060
21061    /// Token to retrieve the next page of results, or empty if there are no more
21062    /// results.
21063    pub next_page_token: std::string::String,
21064
21065    /// The estimated total number of results matching the query.
21066    pub total_size: i32,
21067
21068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21069}
21070
21071impl ListValuedResourcesResponse {
21072    /// Creates a new default instance.
21073    pub fn new() -> Self {
21074        std::default::Default::default()
21075    }
21076
21077    /// Sets the value of [valued_resources][crate::model::ListValuedResourcesResponse::valued_resources].
21078    ///
21079    /// # Example
21080    /// ```ignore,no_run
21081    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
21082    /// use google_cloud_securitycenter_v2::model::ValuedResource;
21083    /// let x = ListValuedResourcesResponse::new()
21084    ///     .set_valued_resources([
21085    ///         ValuedResource::default()/* use setters */,
21086    ///         ValuedResource::default()/* use (different) setters */,
21087    ///     ]);
21088    /// ```
21089    pub fn set_valued_resources<T, V>(mut self, v: T) -> Self
21090    where
21091        T: std::iter::IntoIterator<Item = V>,
21092        V: std::convert::Into<crate::model::ValuedResource>,
21093    {
21094        use std::iter::Iterator;
21095        self.valued_resources = v.into_iter().map(|i| i.into()).collect();
21096        self
21097    }
21098
21099    /// Sets the value of [next_page_token][crate::model::ListValuedResourcesResponse::next_page_token].
21100    ///
21101    /// # Example
21102    /// ```ignore,no_run
21103    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
21104    /// let x = ListValuedResourcesResponse::new().set_next_page_token("example");
21105    /// ```
21106    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21107        self.next_page_token = v.into();
21108        self
21109    }
21110
21111    /// Sets the value of [total_size][crate::model::ListValuedResourcesResponse::total_size].
21112    ///
21113    /// # Example
21114    /// ```ignore,no_run
21115    /// # use google_cloud_securitycenter_v2::model::ListValuedResourcesResponse;
21116    /// let x = ListValuedResourcesResponse::new().set_total_size(42);
21117    /// ```
21118    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21119        self.total_size = v.into();
21120        self
21121    }
21122}
21123
21124impl wkt::message::Message for ListValuedResourcesResponse {
21125    fn typename() -> &'static str {
21126        "type.googleapis.com/google.cloud.securitycenter.v2.ListValuedResourcesResponse"
21127    }
21128}
21129
21130#[doc(hidden)]
21131impl google_cloud_gax::paginator::internal::PageableResponse for ListValuedResourcesResponse {
21132    type PageItem = crate::model::ValuedResource;
21133
21134    fn items(self) -> std::vec::Vec<Self::PageItem> {
21135        self.valued_resources
21136    }
21137
21138    fn next_page_token(&self) -> std::string::String {
21139        use std::clone::Clone;
21140        self.next_page_token.clone()
21141    }
21142}
21143
21144/// Request message for updating a finding's state.
21145#[derive(Clone, Default, PartialEq)]
21146#[non_exhaustive]
21147pub struct SetFindingStateRequest {
21148    /// Required. The [relative resource
21149    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
21150    /// of the finding. If no location is specified, finding is assumed to be in
21151    /// global. The following list shows some examples:
21152    ///
21153    ///
21154    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
21155    /// +
21156    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21157    ///
21158    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
21159    ///
21160    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21161    ///
21162    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
21163    ///
21164    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21165    pub name: std::string::String,
21166
21167    /// Required. The desired State of the finding.
21168    pub state: crate::model::finding::State,
21169
21170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21171}
21172
21173impl SetFindingStateRequest {
21174    /// Creates a new default instance.
21175    pub fn new() -> Self {
21176        std::default::Default::default()
21177    }
21178
21179    /// Sets the value of [name][crate::model::SetFindingStateRequest::name].
21180    ///
21181    /// # Example
21182    /// ```ignore,no_run
21183    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
21184    /// # let organization_id = "organization_id";
21185    /// # let source_id = "source_id";
21186    /// # let finding_id = "finding_id";
21187    /// let x = SetFindingStateRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
21188    /// ```
21189    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21190        self.name = v.into();
21191        self
21192    }
21193
21194    /// Sets the value of [state][crate::model::SetFindingStateRequest::state].
21195    ///
21196    /// # Example
21197    /// ```ignore,no_run
21198    /// # use google_cloud_securitycenter_v2::model::SetFindingStateRequest;
21199    /// use google_cloud_securitycenter_v2::model::finding::State;
21200    /// let x0 = SetFindingStateRequest::new().set_state(State::Active);
21201    /// let x1 = SetFindingStateRequest::new().set_state(State::Inactive);
21202    /// ```
21203    pub fn set_state<T: std::convert::Into<crate::model::finding::State>>(mut self, v: T) -> Self {
21204        self.state = v.into();
21205        self
21206    }
21207}
21208
21209impl wkt::message::Message for SetFindingStateRequest {
21210    fn typename() -> &'static str {
21211        "type.googleapis.com/google.cloud.securitycenter.v2.SetFindingStateRequest"
21212    }
21213}
21214
21215/// Request message for updating a finding's mute status.
21216#[derive(Clone, Default, PartialEq)]
21217#[non_exhaustive]
21218pub struct SetMuteRequest {
21219    /// Required. The [relative resource
21220    /// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
21221    /// of the finding. If no location is specified, finding is assumed to be in
21222    /// global. The following list shows some examples:
21223    ///
21224    ///
21225    /// `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
21226    /// +
21227    /// `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21228    ///
21229    /// + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
21230    ///
21231    /// `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21232    ///
21233    /// + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
21234    ///
21235    /// `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
21236    pub name: std::string::String,
21237
21238    /// Required. The desired state of the Mute.
21239    pub mute: crate::model::finding::Mute,
21240
21241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21242}
21243
21244impl SetMuteRequest {
21245    /// Creates a new default instance.
21246    pub fn new() -> Self {
21247        std::default::Default::default()
21248    }
21249
21250    /// Sets the value of [name][crate::model::SetMuteRequest::name].
21251    ///
21252    /// # Example
21253    /// ```ignore,no_run
21254    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
21255    /// # let organization_id = "organization_id";
21256    /// # let source_id = "source_id";
21257    /// # let finding_id = "finding_id";
21258    /// let x = SetMuteRequest::new().set_name(format!("organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"));
21259    /// ```
21260    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21261        self.name = v.into();
21262        self
21263    }
21264
21265    /// Sets the value of [mute][crate::model::SetMuteRequest::mute].
21266    ///
21267    /// # Example
21268    /// ```ignore,no_run
21269    /// # use google_cloud_securitycenter_v2::model::SetMuteRequest;
21270    /// use google_cloud_securitycenter_v2::model::finding::Mute;
21271    /// let x0 = SetMuteRequest::new().set_mute(Mute::Muted);
21272    /// let x1 = SetMuteRequest::new().set_mute(Mute::Unmuted);
21273    /// let x2 = SetMuteRequest::new().set_mute(Mute::Undefined);
21274    /// ```
21275    pub fn set_mute<T: std::convert::Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
21276        self.mute = v.into();
21277        self
21278    }
21279}
21280
21281impl wkt::message::Message for SetMuteRequest {
21282    fn typename() -> &'static str {
21283        "type.googleapis.com/google.cloud.securitycenter.v2.SetMuteRequest"
21284    }
21285}
21286
21287/// Request message for updating a BigQuery export.
21288#[derive(Clone, Default, PartialEq)]
21289#[non_exhaustive]
21290pub struct UpdateBigQueryExportRequest {
21291    /// Required. The BigQuery export being updated.
21292    pub big_query_export: std::option::Option<crate::model::BigQueryExport>,
21293
21294    /// The list of fields to be updated.
21295    /// If empty all mutable fields will be updated.
21296    pub update_mask: std::option::Option<wkt::FieldMask>,
21297
21298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21299}
21300
21301impl UpdateBigQueryExportRequest {
21302    /// Creates a new default instance.
21303    pub fn new() -> Self {
21304        std::default::Default::default()
21305    }
21306
21307    /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
21308    ///
21309    /// # Example
21310    /// ```ignore,no_run
21311    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
21312    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
21313    /// let x = UpdateBigQueryExportRequest::new().set_big_query_export(BigQueryExport::default()/* use setters */);
21314    /// ```
21315    pub fn set_big_query_export<T>(mut self, v: T) -> Self
21316    where
21317        T: std::convert::Into<crate::model::BigQueryExport>,
21318    {
21319        self.big_query_export = std::option::Option::Some(v.into());
21320        self
21321    }
21322
21323    /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
21324    ///
21325    /// # Example
21326    /// ```ignore,no_run
21327    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
21328    /// use google_cloud_securitycenter_v2::model::BigQueryExport;
21329    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(Some(BigQueryExport::default()/* use setters */));
21330    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_big_query_export(None::<BigQueryExport>);
21331    /// ```
21332    pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
21333    where
21334        T: std::convert::Into<crate::model::BigQueryExport>,
21335    {
21336        self.big_query_export = v.map(|x| x.into());
21337        self
21338    }
21339
21340    /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
21341    ///
21342    /// # Example
21343    /// ```ignore,no_run
21344    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
21345    /// use wkt::FieldMask;
21346    /// let x = UpdateBigQueryExportRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21347    /// ```
21348    pub fn set_update_mask<T>(mut self, v: T) -> Self
21349    where
21350        T: std::convert::Into<wkt::FieldMask>,
21351    {
21352        self.update_mask = std::option::Option::Some(v.into());
21353        self
21354    }
21355
21356    /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
21357    ///
21358    /// # Example
21359    /// ```ignore,no_run
21360    /// # use google_cloud_securitycenter_v2::model::UpdateBigQueryExportRequest;
21361    /// use wkt::FieldMask;
21362    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21363    /// let x = UpdateBigQueryExportRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21364    /// ```
21365    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21366    where
21367        T: std::convert::Into<wkt::FieldMask>,
21368    {
21369        self.update_mask = v.map(|x| x.into());
21370        self
21371    }
21372}
21373
21374impl wkt::message::Message for UpdateBigQueryExportRequest {
21375    fn typename() -> &'static str {
21376        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateBigQueryExportRequest"
21377    }
21378}
21379
21380/// Request message for updating a ExternalSystem resource.
21381#[derive(Clone, Default, PartialEq)]
21382#[non_exhaustive]
21383pub struct UpdateExternalSystemRequest {
21384    /// Required. The external system resource to update.
21385    pub external_system: std::option::Option<crate::model::ExternalSystem>,
21386
21387    /// The FieldMask to use when updating the external system resource.
21388    ///
21389    /// If empty all mutable fields will be updated.
21390    pub update_mask: std::option::Option<wkt::FieldMask>,
21391
21392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21393}
21394
21395impl UpdateExternalSystemRequest {
21396    /// Creates a new default instance.
21397    pub fn new() -> Self {
21398        std::default::Default::default()
21399    }
21400
21401    /// Sets the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
21402    ///
21403    /// # Example
21404    /// ```ignore,no_run
21405    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
21406    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
21407    /// let x = UpdateExternalSystemRequest::new().set_external_system(ExternalSystem::default()/* use setters */);
21408    /// ```
21409    pub fn set_external_system<T>(mut self, v: T) -> Self
21410    where
21411        T: std::convert::Into<crate::model::ExternalSystem>,
21412    {
21413        self.external_system = std::option::Option::Some(v.into());
21414        self
21415    }
21416
21417    /// Sets or clears the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
21418    ///
21419    /// # Example
21420    /// ```ignore,no_run
21421    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
21422    /// use google_cloud_securitycenter_v2::model::ExternalSystem;
21423    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(Some(ExternalSystem::default()/* use setters */));
21424    /// let x = UpdateExternalSystemRequest::new().set_or_clear_external_system(None::<ExternalSystem>);
21425    /// ```
21426    pub fn set_or_clear_external_system<T>(mut self, v: std::option::Option<T>) -> Self
21427    where
21428        T: std::convert::Into<crate::model::ExternalSystem>,
21429    {
21430        self.external_system = v.map(|x| x.into());
21431        self
21432    }
21433
21434    /// Sets the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
21435    ///
21436    /// # Example
21437    /// ```ignore,no_run
21438    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
21439    /// use wkt::FieldMask;
21440    /// let x = UpdateExternalSystemRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21441    /// ```
21442    pub fn set_update_mask<T>(mut self, v: T) -> Self
21443    where
21444        T: std::convert::Into<wkt::FieldMask>,
21445    {
21446        self.update_mask = std::option::Option::Some(v.into());
21447        self
21448    }
21449
21450    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
21451    ///
21452    /// # Example
21453    /// ```ignore,no_run
21454    /// # use google_cloud_securitycenter_v2::model::UpdateExternalSystemRequest;
21455    /// use wkt::FieldMask;
21456    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21457    /// let x = UpdateExternalSystemRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21458    /// ```
21459    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21460    where
21461        T: std::convert::Into<wkt::FieldMask>,
21462    {
21463        self.update_mask = v.map(|x| x.into());
21464        self
21465    }
21466}
21467
21468impl wkt::message::Message for UpdateExternalSystemRequest {
21469    fn typename() -> &'static str {
21470        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateExternalSystemRequest"
21471    }
21472}
21473
21474/// Request message for updating or creating a finding.
21475#[derive(Clone, Default, PartialEq)]
21476#[non_exhaustive]
21477pub struct UpdateFindingRequest {
21478    /// Required. The finding resource to update or create if it does not already
21479    /// exist. parent, security_marks, and update_time will be ignored.
21480    ///
21481    /// In the case of creation, the finding id portion of the name must be
21482    /// alphanumeric and less than or equal to 32 characters and greater than 0
21483    /// characters in length.
21484    pub finding: std::option::Option<crate::model::Finding>,
21485
21486    /// The FieldMask to use when updating the finding resource. This field should
21487    /// not be specified when creating a finding.
21488    ///
21489    /// When updating a finding, an empty mask is treated as updating all mutable
21490    /// fields and replacing source_properties.  Individual source_properties can
21491    /// be added/updated by using "source_properties.\<property key\>" in the field
21492    /// mask.
21493    pub update_mask: std::option::Option<wkt::FieldMask>,
21494
21495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21496}
21497
21498impl UpdateFindingRequest {
21499    /// Creates a new default instance.
21500    pub fn new() -> Self {
21501        std::default::Default::default()
21502    }
21503
21504    /// Sets the value of [finding][crate::model::UpdateFindingRequest::finding].
21505    ///
21506    /// # Example
21507    /// ```ignore,no_run
21508    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
21509    /// use google_cloud_securitycenter_v2::model::Finding;
21510    /// let x = UpdateFindingRequest::new().set_finding(Finding::default()/* use setters */);
21511    /// ```
21512    pub fn set_finding<T>(mut self, v: T) -> Self
21513    where
21514        T: std::convert::Into<crate::model::Finding>,
21515    {
21516        self.finding = std::option::Option::Some(v.into());
21517        self
21518    }
21519
21520    /// Sets or clears the value of [finding][crate::model::UpdateFindingRequest::finding].
21521    ///
21522    /// # Example
21523    /// ```ignore,no_run
21524    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
21525    /// use google_cloud_securitycenter_v2::model::Finding;
21526    /// let x = UpdateFindingRequest::new().set_or_clear_finding(Some(Finding::default()/* use setters */));
21527    /// let x = UpdateFindingRequest::new().set_or_clear_finding(None::<Finding>);
21528    /// ```
21529    pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
21530    where
21531        T: std::convert::Into<crate::model::Finding>,
21532    {
21533        self.finding = v.map(|x| x.into());
21534        self
21535    }
21536
21537    /// Sets the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
21538    ///
21539    /// # Example
21540    /// ```ignore,no_run
21541    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
21542    /// use wkt::FieldMask;
21543    /// let x = UpdateFindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21544    /// ```
21545    pub fn set_update_mask<T>(mut self, v: T) -> Self
21546    where
21547        T: std::convert::Into<wkt::FieldMask>,
21548    {
21549        self.update_mask = std::option::Option::Some(v.into());
21550        self
21551    }
21552
21553    /// Sets or clears the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
21554    ///
21555    /// # Example
21556    /// ```ignore,no_run
21557    /// # use google_cloud_securitycenter_v2::model::UpdateFindingRequest;
21558    /// use wkt::FieldMask;
21559    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21560    /// let x = UpdateFindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21561    /// ```
21562    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21563    where
21564        T: std::convert::Into<wkt::FieldMask>,
21565    {
21566        self.update_mask = v.map(|x| x.into());
21567        self
21568    }
21569}
21570
21571impl wkt::message::Message for UpdateFindingRequest {
21572    fn typename() -> &'static str {
21573        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateFindingRequest"
21574    }
21575}
21576
21577/// Request message for updating a mute config.
21578#[derive(Clone, Default, PartialEq)]
21579#[non_exhaustive]
21580pub struct UpdateMuteConfigRequest {
21581    /// Required. The mute config being updated.
21582    pub mute_config: std::option::Option<crate::model::MuteConfig>,
21583
21584    /// The list of fields to be updated.
21585    /// If empty all mutable fields will be updated.
21586    pub update_mask: std::option::Option<wkt::FieldMask>,
21587
21588    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21589}
21590
21591impl UpdateMuteConfigRequest {
21592    /// Creates a new default instance.
21593    pub fn new() -> Self {
21594        std::default::Default::default()
21595    }
21596
21597    /// Sets the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
21598    ///
21599    /// # Example
21600    /// ```ignore,no_run
21601    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21602    /// use google_cloud_securitycenter_v2::model::MuteConfig;
21603    /// let x = UpdateMuteConfigRequest::new().set_mute_config(MuteConfig::default()/* use setters */);
21604    /// ```
21605    pub fn set_mute_config<T>(mut self, v: T) -> Self
21606    where
21607        T: std::convert::Into<crate::model::MuteConfig>,
21608    {
21609        self.mute_config = std::option::Option::Some(v.into());
21610        self
21611    }
21612
21613    /// Sets or clears the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
21614    ///
21615    /// # Example
21616    /// ```ignore,no_run
21617    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21618    /// use google_cloud_securitycenter_v2::model::MuteConfig;
21619    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(Some(MuteConfig::default()/* use setters */));
21620    /// let x = UpdateMuteConfigRequest::new().set_or_clear_mute_config(None::<MuteConfig>);
21621    /// ```
21622    pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
21623    where
21624        T: std::convert::Into<crate::model::MuteConfig>,
21625    {
21626        self.mute_config = v.map(|x| x.into());
21627        self
21628    }
21629
21630    /// Sets the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
21631    ///
21632    /// # Example
21633    /// ```ignore,no_run
21634    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21635    /// use wkt::FieldMask;
21636    /// let x = UpdateMuteConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21637    /// ```
21638    pub fn set_update_mask<T>(mut self, v: T) -> Self
21639    where
21640        T: std::convert::Into<wkt::FieldMask>,
21641    {
21642        self.update_mask = std::option::Option::Some(v.into());
21643        self
21644    }
21645
21646    /// Sets or clears the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
21647    ///
21648    /// # Example
21649    /// ```ignore,no_run
21650    /// # use google_cloud_securitycenter_v2::model::UpdateMuteConfigRequest;
21651    /// use wkt::FieldMask;
21652    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21653    /// let x = UpdateMuteConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21654    /// ```
21655    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21656    where
21657        T: std::convert::Into<wkt::FieldMask>,
21658    {
21659        self.update_mask = v.map(|x| x.into());
21660        self
21661    }
21662}
21663
21664impl wkt::message::Message for UpdateMuteConfigRequest {
21665    fn typename() -> &'static str {
21666        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateMuteConfigRequest"
21667    }
21668}
21669
21670/// Request message for updating a notification config.
21671#[derive(Clone, Default, PartialEq)]
21672#[non_exhaustive]
21673pub struct UpdateNotificationConfigRequest {
21674    /// Required. The notification config to update.
21675    pub notification_config: std::option::Option<crate::model::NotificationConfig>,
21676
21677    /// The FieldMask to use when updating the notification config.
21678    ///
21679    /// If empty all mutable fields will be updated.
21680    pub update_mask: std::option::Option<wkt::FieldMask>,
21681
21682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21683}
21684
21685impl UpdateNotificationConfigRequest {
21686    /// Creates a new default instance.
21687    pub fn new() -> Self {
21688        std::default::Default::default()
21689    }
21690
21691    /// Sets the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
21692    ///
21693    /// # Example
21694    /// ```ignore,no_run
21695    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21696    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
21697    /// let x = UpdateNotificationConfigRequest::new().set_notification_config(NotificationConfig::default()/* use setters */);
21698    /// ```
21699    pub fn set_notification_config<T>(mut self, v: T) -> Self
21700    where
21701        T: std::convert::Into<crate::model::NotificationConfig>,
21702    {
21703        self.notification_config = std::option::Option::Some(v.into());
21704        self
21705    }
21706
21707    /// Sets or clears the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
21708    ///
21709    /// # Example
21710    /// ```ignore,no_run
21711    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21712    /// use google_cloud_securitycenter_v2::model::NotificationConfig;
21713    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(Some(NotificationConfig::default()/* use setters */));
21714    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_notification_config(None::<NotificationConfig>);
21715    /// ```
21716    pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
21717    where
21718        T: std::convert::Into<crate::model::NotificationConfig>,
21719    {
21720        self.notification_config = v.map(|x| x.into());
21721        self
21722    }
21723
21724    /// Sets the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
21725    ///
21726    /// # Example
21727    /// ```ignore,no_run
21728    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21729    /// use wkt::FieldMask;
21730    /// let x = UpdateNotificationConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21731    /// ```
21732    pub fn set_update_mask<T>(mut self, v: T) -> Self
21733    where
21734        T: std::convert::Into<wkt::FieldMask>,
21735    {
21736        self.update_mask = std::option::Option::Some(v.into());
21737        self
21738    }
21739
21740    /// Sets or clears the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
21741    ///
21742    /// # Example
21743    /// ```ignore,no_run
21744    /// # use google_cloud_securitycenter_v2::model::UpdateNotificationConfigRequest;
21745    /// use wkt::FieldMask;
21746    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21747    /// let x = UpdateNotificationConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21748    /// ```
21749    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21750    where
21751        T: std::convert::Into<wkt::FieldMask>,
21752    {
21753        self.update_mask = v.map(|x| x.into());
21754        self
21755    }
21756}
21757
21758impl wkt::message::Message for UpdateNotificationConfigRequest {
21759    fn typename() -> &'static str {
21760        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateNotificationConfigRequest"
21761    }
21762}
21763
21764/// Request message to update resource value config
21765#[derive(Clone, Default, PartialEq)]
21766#[non_exhaustive]
21767pub struct UpdateResourceValueConfigRequest {
21768    /// Required. The resource value config being updated.
21769    pub resource_value_config: std::option::Option<crate::model::ResourceValueConfig>,
21770
21771    /// The list of fields to be updated.
21772    /// If empty all mutable fields will be updated.
21773    ///
21774    /// To update nested fields, include the top level field in the mask
21775    /// For example, to update gcp_metadata.resource_type, include the
21776    /// "gcp_metadata" field mask
21777    pub update_mask: std::option::Option<wkt::FieldMask>,
21778
21779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21780}
21781
21782impl UpdateResourceValueConfigRequest {
21783    /// Creates a new default instance.
21784    pub fn new() -> Self {
21785        std::default::Default::default()
21786    }
21787
21788    /// Sets the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
21789    ///
21790    /// # Example
21791    /// ```ignore,no_run
21792    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21793    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
21794    /// let x = UpdateResourceValueConfigRequest::new().set_resource_value_config(ResourceValueConfig::default()/* use setters */);
21795    /// ```
21796    pub fn set_resource_value_config<T>(mut self, v: T) -> Self
21797    where
21798        T: std::convert::Into<crate::model::ResourceValueConfig>,
21799    {
21800        self.resource_value_config = std::option::Option::Some(v.into());
21801        self
21802    }
21803
21804    /// Sets or clears the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
21805    ///
21806    /// # Example
21807    /// ```ignore,no_run
21808    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21809    /// use google_cloud_securitycenter_v2::model::ResourceValueConfig;
21810    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(Some(ResourceValueConfig::default()/* use setters */));
21811    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_resource_value_config(None::<ResourceValueConfig>);
21812    /// ```
21813    pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
21814    where
21815        T: std::convert::Into<crate::model::ResourceValueConfig>,
21816    {
21817        self.resource_value_config = v.map(|x| x.into());
21818        self
21819    }
21820
21821    /// Sets the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21822    ///
21823    /// # Example
21824    /// ```ignore,no_run
21825    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21826    /// use wkt::FieldMask;
21827    /// let x = UpdateResourceValueConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21828    /// ```
21829    pub fn set_update_mask<T>(mut self, v: T) -> Self
21830    where
21831        T: std::convert::Into<wkt::FieldMask>,
21832    {
21833        self.update_mask = std::option::Option::Some(v.into());
21834        self
21835    }
21836
21837    /// Sets or clears the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
21838    ///
21839    /// # Example
21840    /// ```ignore,no_run
21841    /// # use google_cloud_securitycenter_v2::model::UpdateResourceValueConfigRequest;
21842    /// use wkt::FieldMask;
21843    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21844    /// let x = UpdateResourceValueConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21845    /// ```
21846    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21847    where
21848        T: std::convert::Into<wkt::FieldMask>,
21849    {
21850        self.update_mask = v.map(|x| x.into());
21851        self
21852    }
21853}
21854
21855impl wkt::message::Message for UpdateResourceValueConfigRequest {
21856    fn typename() -> &'static str {
21857        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest"
21858    }
21859}
21860
21861/// Request message for updating a SecurityMarks resource.
21862#[derive(Clone, Default, PartialEq)]
21863#[non_exhaustive]
21864pub struct UpdateSecurityMarksRequest {
21865    /// Required. The security marks resource to update.
21866    pub security_marks: std::option::Option<crate::model::SecurityMarks>,
21867
21868    /// The FieldMask to use when updating the security marks resource.
21869    ///
21870    /// The field mask must not contain duplicate fields.
21871    /// If empty or set to "marks", all marks will be replaced.  Individual
21872    /// marks can be updated using "marks.<mark_key>".
21873    pub update_mask: std::option::Option<wkt::FieldMask>,
21874
21875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21876}
21877
21878impl UpdateSecurityMarksRequest {
21879    /// Creates a new default instance.
21880    pub fn new() -> Self {
21881        std::default::Default::default()
21882    }
21883
21884    /// Sets the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21885    ///
21886    /// # Example
21887    /// ```ignore,no_run
21888    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21889    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21890    /// let x = UpdateSecurityMarksRequest::new().set_security_marks(SecurityMarks::default()/* use setters */);
21891    /// ```
21892    pub fn set_security_marks<T>(mut self, v: T) -> Self
21893    where
21894        T: std::convert::Into<crate::model::SecurityMarks>,
21895    {
21896        self.security_marks = std::option::Option::Some(v.into());
21897        self
21898    }
21899
21900    /// Sets or clears the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
21901    ///
21902    /// # Example
21903    /// ```ignore,no_run
21904    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21905    /// use google_cloud_securitycenter_v2::model::SecurityMarks;
21906    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(Some(SecurityMarks::default()/* use setters */));
21907    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_security_marks(None::<SecurityMarks>);
21908    /// ```
21909    pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
21910    where
21911        T: std::convert::Into<crate::model::SecurityMarks>,
21912    {
21913        self.security_marks = v.map(|x| x.into());
21914        self
21915    }
21916
21917    /// Sets the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21918    ///
21919    /// # Example
21920    /// ```ignore,no_run
21921    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21922    /// use wkt::FieldMask;
21923    /// let x = UpdateSecurityMarksRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21924    /// ```
21925    pub fn set_update_mask<T>(mut self, v: T) -> Self
21926    where
21927        T: std::convert::Into<wkt::FieldMask>,
21928    {
21929        self.update_mask = std::option::Option::Some(v.into());
21930        self
21931    }
21932
21933    /// Sets or clears the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
21934    ///
21935    /// # Example
21936    /// ```ignore,no_run
21937    /// # use google_cloud_securitycenter_v2::model::UpdateSecurityMarksRequest;
21938    /// use wkt::FieldMask;
21939    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21940    /// let x = UpdateSecurityMarksRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21941    /// ```
21942    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21943    where
21944        T: std::convert::Into<wkt::FieldMask>,
21945    {
21946        self.update_mask = v.map(|x| x.into());
21947        self
21948    }
21949}
21950
21951impl wkt::message::Message for UpdateSecurityMarksRequest {
21952    fn typename() -> &'static str {
21953        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSecurityMarksRequest"
21954    }
21955}
21956
21957/// Request message for updating a source.
21958#[derive(Clone, Default, PartialEq)]
21959#[non_exhaustive]
21960pub struct UpdateSourceRequest {
21961    /// Required. The source resource to update.
21962    pub source: std::option::Option<crate::model::Source>,
21963
21964    /// The FieldMask to use when updating the source resource.
21965    ///
21966    /// If empty all mutable fields will be updated.
21967    pub update_mask: std::option::Option<wkt::FieldMask>,
21968
21969    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21970}
21971
21972impl UpdateSourceRequest {
21973    /// Creates a new default instance.
21974    pub fn new() -> Self {
21975        std::default::Default::default()
21976    }
21977
21978    /// Sets the value of [source][crate::model::UpdateSourceRequest::source].
21979    ///
21980    /// # Example
21981    /// ```ignore,no_run
21982    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21983    /// use google_cloud_securitycenter_v2::model::Source;
21984    /// let x = UpdateSourceRequest::new().set_source(Source::default()/* use setters */);
21985    /// ```
21986    pub fn set_source<T>(mut self, v: T) -> Self
21987    where
21988        T: std::convert::Into<crate::model::Source>,
21989    {
21990        self.source = std::option::Option::Some(v.into());
21991        self
21992    }
21993
21994    /// Sets or clears the value of [source][crate::model::UpdateSourceRequest::source].
21995    ///
21996    /// # Example
21997    /// ```ignore,no_run
21998    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
21999    /// use google_cloud_securitycenter_v2::model::Source;
22000    /// let x = UpdateSourceRequest::new().set_or_clear_source(Some(Source::default()/* use setters */));
22001    /// let x = UpdateSourceRequest::new().set_or_clear_source(None::<Source>);
22002    /// ```
22003    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
22004    where
22005        T: std::convert::Into<crate::model::Source>,
22006    {
22007        self.source = v.map(|x| x.into());
22008        self
22009    }
22010
22011    /// Sets the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
22012    ///
22013    /// # Example
22014    /// ```ignore,no_run
22015    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
22016    /// use wkt::FieldMask;
22017    /// let x = UpdateSourceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
22018    /// ```
22019    pub fn set_update_mask<T>(mut self, v: T) -> Self
22020    where
22021        T: std::convert::Into<wkt::FieldMask>,
22022    {
22023        self.update_mask = std::option::Option::Some(v.into());
22024        self
22025    }
22026
22027    /// Sets or clears the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
22028    ///
22029    /// # Example
22030    /// ```ignore,no_run
22031    /// # use google_cloud_securitycenter_v2::model::UpdateSourceRequest;
22032    /// use wkt::FieldMask;
22033    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
22034    /// let x = UpdateSourceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
22035    /// ```
22036    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
22037    where
22038        T: std::convert::Into<wkt::FieldMask>,
22039    {
22040        self.update_mask = v.map(|x| x.into());
22041        self
22042    }
22043}
22044
22045impl wkt::message::Message for UpdateSourceRequest {
22046    fn typename() -> &'static str {
22047        "type.googleapis.com/google.cloud.securitycenter.v2.UpdateSourceRequest"
22048    }
22049}
22050
22051/// Attack path simulation
22052#[derive(Clone, Default, PartialEq)]
22053#[non_exhaustive]
22054pub struct Simulation {
22055    /// Full resource name of the Simulation:
22056    /// `organizations/123/simulations/456`
22057    pub name: std::string::String,
22058
22059    /// Output only. Time simulation was created
22060    pub create_time: std::option::Option<wkt::Timestamp>,
22061
22062    /// Resource value configurations' metadata used in this simulation. Maximum of
22063    /// 100.
22064    pub resource_value_configs_metadata: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
22065
22066    /// Indicates which cloud provider was used in this simulation.
22067    pub cloud_provider: crate::model::CloudProvider,
22068
22069    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22070}
22071
22072impl Simulation {
22073    /// Creates a new default instance.
22074    pub fn new() -> Self {
22075        std::default::Default::default()
22076    }
22077
22078    /// Sets the value of [name][crate::model::Simulation::name].
22079    ///
22080    /// # Example
22081    /// ```ignore,no_run
22082    /// # use google_cloud_securitycenter_v2::model::Simulation;
22083    /// # let organization_id = "organization_id";
22084    /// # let simulation_id = "simulation_id";
22085    /// let x = Simulation::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}"));
22086    /// ```
22087    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22088        self.name = v.into();
22089        self
22090    }
22091
22092    /// Sets the value of [create_time][crate::model::Simulation::create_time].
22093    ///
22094    /// # Example
22095    /// ```ignore,no_run
22096    /// # use google_cloud_securitycenter_v2::model::Simulation;
22097    /// use wkt::Timestamp;
22098    /// let x = Simulation::new().set_create_time(Timestamp::default()/* use setters */);
22099    /// ```
22100    pub fn set_create_time<T>(mut self, v: T) -> Self
22101    where
22102        T: std::convert::Into<wkt::Timestamp>,
22103    {
22104        self.create_time = std::option::Option::Some(v.into());
22105        self
22106    }
22107
22108    /// Sets or clears the value of [create_time][crate::model::Simulation::create_time].
22109    ///
22110    /// # Example
22111    /// ```ignore,no_run
22112    /// # use google_cloud_securitycenter_v2::model::Simulation;
22113    /// use wkt::Timestamp;
22114    /// let x = Simulation::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
22115    /// let x = Simulation::new().set_or_clear_create_time(None::<Timestamp>);
22116    /// ```
22117    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
22118    where
22119        T: std::convert::Into<wkt::Timestamp>,
22120    {
22121        self.create_time = v.map(|x| x.into());
22122        self
22123    }
22124
22125    /// Sets the value of [resource_value_configs_metadata][crate::model::Simulation::resource_value_configs_metadata].
22126    ///
22127    /// # Example
22128    /// ```ignore,no_run
22129    /// # use google_cloud_securitycenter_v2::model::Simulation;
22130    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
22131    /// let x = Simulation::new()
22132    ///     .set_resource_value_configs_metadata([
22133    ///         ResourceValueConfigMetadata::default()/* use setters */,
22134    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
22135    ///     ]);
22136    /// ```
22137    pub fn set_resource_value_configs_metadata<T, V>(mut self, v: T) -> Self
22138    where
22139        T: std::iter::IntoIterator<Item = V>,
22140        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
22141    {
22142        use std::iter::Iterator;
22143        self.resource_value_configs_metadata = v.into_iter().map(|i| i.into()).collect();
22144        self
22145    }
22146
22147    /// Sets the value of [cloud_provider][crate::model::Simulation::cloud_provider].
22148    ///
22149    /// # Example
22150    /// ```ignore,no_run
22151    /// # use google_cloud_securitycenter_v2::model::Simulation;
22152    /// use google_cloud_securitycenter_v2::model::CloudProvider;
22153    /// let x0 = Simulation::new().set_cloud_provider(CloudProvider::GoogleCloudPlatform);
22154    /// let x1 = Simulation::new().set_cloud_provider(CloudProvider::AmazonWebServices);
22155    /// let x2 = Simulation::new().set_cloud_provider(CloudProvider::MicrosoftAzure);
22156    /// ```
22157    pub fn set_cloud_provider<T: std::convert::Into<crate::model::CloudProvider>>(
22158        mut self,
22159        v: T,
22160    ) -> Self {
22161        self.cloud_provider = v.into();
22162        self
22163    }
22164}
22165
22166impl wkt::message::Message for Simulation {
22167    fn typename() -> &'static str {
22168        "type.googleapis.com/google.cloud.securitycenter.v2.Simulation"
22169    }
22170}
22171
22172/// Security Command Center finding source. A finding source
22173/// is an entity or a mechanism that can produce a finding. A source is like a
22174/// container of findings that come from the same scanner, logger, monitor, and
22175/// other tools.
22176#[derive(Clone, Default, PartialEq)]
22177#[non_exhaustive]
22178pub struct Source {
22179    /// The relative resource name of this source. See:
22180    /// <https://cloud.google.com/apis/design/resource_names#relative_resource_name>
22181    /// Example:
22182    /// "organizations/{organization_id}/sources/{source_id}"
22183    pub name: std::string::String,
22184
22185    /// The source's display name.
22186    /// A source's display name must be unique amongst its siblings, for example,
22187    /// two sources with the same parent can't share the same display name.
22188    /// The display name must have a length between 1 and 64 characters
22189    /// (inclusive).
22190    pub display_name: std::string::String,
22191
22192    /// The description of the source (max of 1024 characters).
22193    /// Example:
22194    /// "Web Security Scanner is a web security scanner for common
22195    /// vulnerabilities in App Engine applications. It can automatically
22196    /// scan and detect four common vulnerabilities, including cross-site-scripting
22197    /// (XSS), Flash injection, mixed content (HTTP in HTTPS), and
22198    /// outdated or insecure libraries."
22199    pub description: std::string::String,
22200
22201    /// The canonical name of the finding source. It's either
22202    /// "organizations/{organization_id}/sources/{source_id}",
22203    /// "folders/{folder_id}/sources/{source_id}", or
22204    /// "projects/{project_number}/sources/{source_id}",
22205    /// depending on the closest CRM ancestor of the resource associated with the
22206    /// finding.
22207    pub canonical_name: std::string::String,
22208
22209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22210}
22211
22212impl Source {
22213    /// Creates a new default instance.
22214    pub fn new() -> Self {
22215        std::default::Default::default()
22216    }
22217
22218    /// Sets the value of [name][crate::model::Source::name].
22219    ///
22220    /// # Example
22221    /// ```ignore,no_run
22222    /// # use google_cloud_securitycenter_v2::model::Source;
22223    /// # let organization_id = "organization_id";
22224    /// # let source_id = "source_id";
22225    /// let x = Source::new().set_name(format!("organizations/{organization_id}/sources/{source_id}"));
22226    /// ```
22227    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22228        self.name = v.into();
22229        self
22230    }
22231
22232    /// Sets the value of [display_name][crate::model::Source::display_name].
22233    ///
22234    /// # Example
22235    /// ```ignore,no_run
22236    /// # use google_cloud_securitycenter_v2::model::Source;
22237    /// let x = Source::new().set_display_name("example");
22238    /// ```
22239    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22240        self.display_name = v.into();
22241        self
22242    }
22243
22244    /// Sets the value of [description][crate::model::Source::description].
22245    ///
22246    /// # Example
22247    /// ```ignore,no_run
22248    /// # use google_cloud_securitycenter_v2::model::Source;
22249    /// let x = Source::new().set_description("example");
22250    /// ```
22251    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22252        self.description = v.into();
22253        self
22254    }
22255
22256    /// Sets the value of [canonical_name][crate::model::Source::canonical_name].
22257    ///
22258    /// # Example
22259    /// ```ignore,no_run
22260    /// # use google_cloud_securitycenter_v2::model::Source;
22261    /// let x = Source::new().set_canonical_name("example");
22262    /// ```
22263    pub fn set_canonical_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22264        self.canonical_name = v.into();
22265        self
22266    }
22267}
22268
22269impl wkt::message::Message for Source {
22270    fn typename() -> &'static str {
22271        "type.googleapis.com/google.cloud.securitycenter.v2.Source"
22272    }
22273}
22274
22275/// Contains details about a group of security issues that, when the issues
22276/// occur together, represent a greater risk than when the issues occur
22277/// independently. A group of such issues is referred to as a toxic
22278/// combination.
22279#[derive(Clone, Default, PartialEq)]
22280#[non_exhaustive]
22281pub struct ToxicCombination {
22282    /// The
22283    /// [Attack exposure
22284    /// score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores)
22285    /// of this toxic combination. The score is a measure of how much this toxic
22286    /// combination exposes one or more high-value resources to potential attack.
22287    pub attack_exposure_score: f64,
22288
22289    /// List of resource names of findings associated with this toxic combination.
22290    /// For example, `organizations/123/sources/456/findings/789`.
22291    pub related_findings: std::vec::Vec<std::string::String>,
22292
22293    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22294}
22295
22296impl ToxicCombination {
22297    /// Creates a new default instance.
22298    pub fn new() -> Self {
22299        std::default::Default::default()
22300    }
22301
22302    /// Sets the value of [attack_exposure_score][crate::model::ToxicCombination::attack_exposure_score].
22303    ///
22304    /// # Example
22305    /// ```ignore,no_run
22306    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
22307    /// let x = ToxicCombination::new().set_attack_exposure_score(42.0);
22308    /// ```
22309    pub fn set_attack_exposure_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
22310        self.attack_exposure_score = v.into();
22311        self
22312    }
22313
22314    /// Sets the value of [related_findings][crate::model::ToxicCombination::related_findings].
22315    ///
22316    /// # Example
22317    /// ```ignore,no_run
22318    /// # use google_cloud_securitycenter_v2::model::ToxicCombination;
22319    /// let x = ToxicCombination::new().set_related_findings(["a", "b", "c"]);
22320    /// ```
22321    pub fn set_related_findings<T, V>(mut self, v: T) -> Self
22322    where
22323        T: std::iter::IntoIterator<Item = V>,
22324        V: std::convert::Into<std::string::String>,
22325    {
22326        use std::iter::Iterator;
22327        self.related_findings = v.into_iter().map(|i| i.into()).collect();
22328        self
22329    }
22330}
22331
22332impl wkt::message::Message for ToxicCombination {
22333    fn typename() -> &'static str {
22334        "type.googleapis.com/google.cloud.securitycenter.v2.ToxicCombination"
22335    }
22336}
22337
22338/// A resource that is determined to have value to a user's system
22339#[derive(Clone, Default, PartialEq)]
22340#[non_exhaustive]
22341pub struct ValuedResource {
22342    /// Valued resource name, for example,
22343    /// e.g.:
22344    /// `organizations/123/simulations/456/valuedResources/789`
22345    pub name: std::string::String,
22346
22347    /// The
22348    /// [full resource
22349    /// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
22350    /// of the valued resource.
22351    pub resource: std::string::String,
22352
22353    /// The [resource
22354    /// type](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
22355    /// of the valued resource.
22356    pub resource_type: std::string::String,
22357
22358    /// Human-readable name of the valued resource.
22359    pub display_name: std::string::String,
22360
22361    /// How valuable this resource is.
22362    pub resource_value: crate::model::valued_resource::ResourceValue,
22363
22364    /// Exposed score for this valued resource. A value of 0 means no exposure was
22365    /// detected exposure.
22366    pub exposed_score: f64,
22367
22368    /// List of resource value configurations' metadata used to determine the value
22369    /// of this resource. Maximum of 100.
22370    pub resource_value_configs_used: std::vec::Vec<crate::model::ResourceValueConfigMetadata>,
22371
22372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22373}
22374
22375impl ValuedResource {
22376    /// Creates a new default instance.
22377    pub fn new() -> Self {
22378        std::default::Default::default()
22379    }
22380
22381    /// Sets the value of [name][crate::model::ValuedResource::name].
22382    ///
22383    /// # Example
22384    /// ```ignore,no_run
22385    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22386    /// # let organization_id = "organization_id";
22387    /// # let simulation_id = "simulation_id";
22388    /// # let valued_resource_id = "valued_resource_id";
22389    /// let x = ValuedResource::new().set_name(format!("organizations/{organization_id}/simulations/{simulation_id}/valuedResources/{valued_resource_id}"));
22390    /// ```
22391    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22392        self.name = v.into();
22393        self
22394    }
22395
22396    /// Sets the value of [resource][crate::model::ValuedResource::resource].
22397    ///
22398    /// # Example
22399    /// ```ignore,no_run
22400    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22401    /// let x = ValuedResource::new().set_resource("example");
22402    /// ```
22403    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22404        self.resource = v.into();
22405        self
22406    }
22407
22408    /// Sets the value of [resource_type][crate::model::ValuedResource::resource_type].
22409    ///
22410    /// # Example
22411    /// ```ignore,no_run
22412    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22413    /// let x = ValuedResource::new().set_resource_type("example");
22414    /// ```
22415    pub fn set_resource_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22416        self.resource_type = v.into();
22417        self
22418    }
22419
22420    /// Sets the value of [display_name][crate::model::ValuedResource::display_name].
22421    ///
22422    /// # Example
22423    /// ```ignore,no_run
22424    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22425    /// let x = ValuedResource::new().set_display_name("example");
22426    /// ```
22427    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22428        self.display_name = v.into();
22429        self
22430    }
22431
22432    /// Sets the value of [resource_value][crate::model::ValuedResource::resource_value].
22433    ///
22434    /// # Example
22435    /// ```ignore,no_run
22436    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22437    /// use google_cloud_securitycenter_v2::model::valued_resource::ResourceValue;
22438    /// let x0 = ValuedResource::new().set_resource_value(ResourceValue::Low);
22439    /// let x1 = ValuedResource::new().set_resource_value(ResourceValue::Medium);
22440    /// let x2 = ValuedResource::new().set_resource_value(ResourceValue::High);
22441    /// ```
22442    pub fn set_resource_value<
22443        T: std::convert::Into<crate::model::valued_resource::ResourceValue>,
22444    >(
22445        mut self,
22446        v: T,
22447    ) -> Self {
22448        self.resource_value = v.into();
22449        self
22450    }
22451
22452    /// Sets the value of [exposed_score][crate::model::ValuedResource::exposed_score].
22453    ///
22454    /// # Example
22455    /// ```ignore,no_run
22456    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22457    /// let x = ValuedResource::new().set_exposed_score(42.0);
22458    /// ```
22459    pub fn set_exposed_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
22460        self.exposed_score = v.into();
22461        self
22462    }
22463
22464    /// Sets the value of [resource_value_configs_used][crate::model::ValuedResource::resource_value_configs_used].
22465    ///
22466    /// # Example
22467    /// ```ignore,no_run
22468    /// # use google_cloud_securitycenter_v2::model::ValuedResource;
22469    /// use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
22470    /// let x = ValuedResource::new()
22471    ///     .set_resource_value_configs_used([
22472    ///         ResourceValueConfigMetadata::default()/* use setters */,
22473    ///         ResourceValueConfigMetadata::default()/* use (different) setters */,
22474    ///     ]);
22475    /// ```
22476    pub fn set_resource_value_configs_used<T, V>(mut self, v: T) -> Self
22477    where
22478        T: std::iter::IntoIterator<Item = V>,
22479        V: std::convert::Into<crate::model::ResourceValueConfigMetadata>,
22480    {
22481        use std::iter::Iterator;
22482        self.resource_value_configs_used = v.into_iter().map(|i| i.into()).collect();
22483        self
22484    }
22485}
22486
22487impl wkt::message::Message for ValuedResource {
22488    fn typename() -> &'static str {
22489        "type.googleapis.com/google.cloud.securitycenter.v2.ValuedResource"
22490    }
22491}
22492
22493/// Defines additional types related to [ValuedResource].
22494pub mod valued_resource {
22495    #[allow(unused_imports)]
22496    use super::*;
22497
22498    /// How valuable the resource is.
22499    ///
22500    /// # Working with unknown values
22501    ///
22502    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22503    /// additional enum variants at any time. Adding new variants is not considered
22504    /// a breaking change. Applications should write their code in anticipation of:
22505    ///
22506    /// - New values appearing in future releases of the client library, **and**
22507    /// - New values received dynamically, without application changes.
22508    ///
22509    /// Please consult the [Working with enums] section in the user guide for some
22510    /// guidelines.
22511    ///
22512    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
22513    #[derive(Clone, Debug, PartialEq)]
22514    #[non_exhaustive]
22515    pub enum ResourceValue {
22516        /// The resource value isn't specified.
22517        Unspecified,
22518        /// This is a low-value resource.
22519        Low,
22520        /// This is a medium-value resource.
22521        Medium,
22522        /// This is a high-value resource.
22523        High,
22524        /// If set, the enum was initialized with an unknown value.
22525        ///
22526        /// Applications can examine the value using [ResourceValue::value] or
22527        /// [ResourceValue::name].
22528        UnknownValue(resource_value::UnknownValue),
22529    }
22530
22531    #[doc(hidden)]
22532    pub mod resource_value {
22533        #[allow(unused_imports)]
22534        use super::*;
22535        #[derive(Clone, Debug, PartialEq)]
22536        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22537    }
22538
22539    impl ResourceValue {
22540        /// Gets the enum value.
22541        ///
22542        /// Returns `None` if the enum contains an unknown value deserialized from
22543        /// the string representation of enums.
22544        pub fn value(&self) -> std::option::Option<i32> {
22545            match self {
22546                Self::Unspecified => std::option::Option::Some(0),
22547                Self::Low => std::option::Option::Some(1),
22548                Self::Medium => std::option::Option::Some(2),
22549                Self::High => std::option::Option::Some(3),
22550                Self::UnknownValue(u) => u.0.value(),
22551            }
22552        }
22553
22554        /// Gets the enum value as a string.
22555        ///
22556        /// Returns `None` if the enum contains an unknown value deserialized from
22557        /// the integer representation of enums.
22558        pub fn name(&self) -> std::option::Option<&str> {
22559            match self {
22560                Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
22561                Self::Low => std::option::Option::Some("RESOURCE_VALUE_LOW"),
22562                Self::Medium => std::option::Option::Some("RESOURCE_VALUE_MEDIUM"),
22563                Self::High => std::option::Option::Some("RESOURCE_VALUE_HIGH"),
22564                Self::UnknownValue(u) => u.0.name(),
22565            }
22566        }
22567    }
22568
22569    impl std::default::Default for ResourceValue {
22570        fn default() -> Self {
22571            use std::convert::From;
22572            Self::from(0)
22573        }
22574    }
22575
22576    impl std::fmt::Display for ResourceValue {
22577        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22578            wkt::internal::display_enum(f, self.name(), self.value())
22579        }
22580    }
22581
22582    impl std::convert::From<i32> for ResourceValue {
22583        fn from(value: i32) -> Self {
22584            match value {
22585                0 => Self::Unspecified,
22586                1 => Self::Low,
22587                2 => Self::Medium,
22588                3 => Self::High,
22589                _ => Self::UnknownValue(resource_value::UnknownValue(
22590                    wkt::internal::UnknownEnumValue::Integer(value),
22591                )),
22592            }
22593        }
22594    }
22595
22596    impl std::convert::From<&str> for ResourceValue {
22597        fn from(value: &str) -> Self {
22598            use std::string::ToString;
22599            match value {
22600                "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
22601                "RESOURCE_VALUE_LOW" => Self::Low,
22602                "RESOURCE_VALUE_MEDIUM" => Self::Medium,
22603                "RESOURCE_VALUE_HIGH" => Self::High,
22604                _ => Self::UnknownValue(resource_value::UnknownValue(
22605                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22606                )),
22607            }
22608        }
22609    }
22610
22611    impl serde::ser::Serialize for ResourceValue {
22612        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22613        where
22614            S: serde::Serializer,
22615        {
22616            match self {
22617                Self::Unspecified => serializer.serialize_i32(0),
22618                Self::Low => serializer.serialize_i32(1),
22619                Self::Medium => serializer.serialize_i32(2),
22620                Self::High => serializer.serialize_i32(3),
22621                Self::UnknownValue(u) => u.0.serialize(serializer),
22622            }
22623        }
22624    }
22625
22626    impl<'de> serde::de::Deserialize<'de> for ResourceValue {
22627        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22628        where
22629            D: serde::Deserializer<'de>,
22630        {
22631            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
22632                ".google.cloud.securitycenter.v2.ValuedResource.ResourceValue",
22633            ))
22634        }
22635    }
22636}
22637
22638/// Metadata about a ResourceValueConfig. For example, id and name.
22639#[derive(Clone, Default, PartialEq)]
22640#[non_exhaustive]
22641pub struct ResourceValueConfigMetadata {
22642    /// Resource value config name
22643    pub name: std::string::String,
22644
22645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22646}
22647
22648impl ResourceValueConfigMetadata {
22649    /// Creates a new default instance.
22650    pub fn new() -> Self {
22651        std::default::Default::default()
22652    }
22653
22654    /// Sets the value of [name][crate::model::ResourceValueConfigMetadata::name].
22655    ///
22656    /// # Example
22657    /// ```ignore,no_run
22658    /// # use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
22659    /// let x = ResourceValueConfigMetadata::new().set_name("example");
22660    /// ```
22661    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22662        self.name = v.into();
22663        self
22664    }
22665}
22666
22667impl wkt::message::Message for ResourceValueConfigMetadata {
22668    fn typename() -> &'static str {
22669        "type.googleapis.com/google.cloud.securitycenter.v2.ResourceValueConfigMetadata"
22670    }
22671}
22672
22673/// Vertex AI-related information associated with the finding.
22674#[derive(Clone, Default, PartialEq)]
22675#[non_exhaustive]
22676pub struct VertexAi {
22677    /// Datasets associated with the finding.
22678    pub datasets: std::vec::Vec<crate::model::vertex_ai::Dataset>,
22679
22680    /// Pipelines associated with the finding.
22681    pub pipelines: std::vec::Vec<crate::model::vertex_ai::Pipeline>,
22682
22683    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22684}
22685
22686impl VertexAi {
22687    /// Creates a new default instance.
22688    pub fn new() -> Self {
22689        std::default::Default::default()
22690    }
22691
22692    /// Sets the value of [datasets][crate::model::VertexAi::datasets].
22693    ///
22694    /// # Example
22695    /// ```ignore,no_run
22696    /// # use google_cloud_securitycenter_v2::model::VertexAi;
22697    /// use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22698    /// let x = VertexAi::new()
22699    ///     .set_datasets([
22700    ///         Dataset::default()/* use setters */,
22701    ///         Dataset::default()/* use (different) setters */,
22702    ///     ]);
22703    /// ```
22704    pub fn set_datasets<T, V>(mut self, v: T) -> Self
22705    where
22706        T: std::iter::IntoIterator<Item = V>,
22707        V: std::convert::Into<crate::model::vertex_ai::Dataset>,
22708    {
22709        use std::iter::Iterator;
22710        self.datasets = v.into_iter().map(|i| i.into()).collect();
22711        self
22712    }
22713
22714    /// Sets the value of [pipelines][crate::model::VertexAi::pipelines].
22715    ///
22716    /// # Example
22717    /// ```ignore,no_run
22718    /// # use google_cloud_securitycenter_v2::model::VertexAi;
22719    /// use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22720    /// let x = VertexAi::new()
22721    ///     .set_pipelines([
22722    ///         Pipeline::default()/* use setters */,
22723    ///         Pipeline::default()/* use (different) setters */,
22724    ///     ]);
22725    /// ```
22726    pub fn set_pipelines<T, V>(mut self, v: T) -> Self
22727    where
22728        T: std::iter::IntoIterator<Item = V>,
22729        V: std::convert::Into<crate::model::vertex_ai::Pipeline>,
22730    {
22731        use std::iter::Iterator;
22732        self.pipelines = v.into_iter().map(|i| i.into()).collect();
22733        self
22734    }
22735}
22736
22737impl wkt::message::Message for VertexAi {
22738    fn typename() -> &'static str {
22739        "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi"
22740    }
22741}
22742
22743/// Defines additional types related to [VertexAi].
22744pub mod vertex_ai {
22745    #[allow(unused_imports)]
22746    use super::*;
22747
22748    /// Vertex AI dataset associated with the finding.
22749    #[derive(Clone, Default, PartialEq)]
22750    #[non_exhaustive]
22751    pub struct Dataset {
22752        /// Resource name of the dataset, e.g.
22753        /// projects/{project}/locations/{location}/datasets/2094040236064505856
22754        pub name: std::string::String,
22755
22756        /// The user defined display name of dataset, e.g. plants-dataset
22757        pub display_name: std::string::String,
22758
22759        /// Data source, such as a BigQuery source URI, e.g.
22760        /// bq://scc-nexus-test.AIPPtest.gsod
22761        pub source: std::string::String,
22762
22763        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22764    }
22765
22766    impl Dataset {
22767        /// Creates a new default instance.
22768        pub fn new() -> Self {
22769            std::default::Default::default()
22770        }
22771
22772        /// Sets the value of [name][crate::model::vertex_ai::Dataset::name].
22773        ///
22774        /// # Example
22775        /// ```ignore,no_run
22776        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22777        /// let x = Dataset::new().set_name("example");
22778        /// ```
22779        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22780            self.name = v.into();
22781            self
22782        }
22783
22784        /// Sets the value of [display_name][crate::model::vertex_ai::Dataset::display_name].
22785        ///
22786        /// # Example
22787        /// ```ignore,no_run
22788        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22789        /// let x = Dataset::new().set_display_name("example");
22790        /// ```
22791        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
22792            mut self,
22793            v: T,
22794        ) -> Self {
22795            self.display_name = v.into();
22796            self
22797        }
22798
22799        /// Sets the value of [source][crate::model::vertex_ai::Dataset::source].
22800        ///
22801        /// # Example
22802        /// ```ignore,no_run
22803        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Dataset;
22804        /// let x = Dataset::new().set_source("example");
22805        /// ```
22806        pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22807            self.source = v.into();
22808            self
22809        }
22810    }
22811
22812    impl wkt::message::Message for Dataset {
22813        fn typename() -> &'static str {
22814            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Dataset"
22815        }
22816    }
22817
22818    /// Vertex AI training pipeline associated with the finding.
22819    #[derive(Clone, Default, PartialEq)]
22820    #[non_exhaustive]
22821    pub struct Pipeline {
22822        /// Resource name of the pipeline, e.g.
22823        /// projects/{project}/locations/{location}/trainingPipelines/5253428229225578496
22824        pub name: std::string::String,
22825
22826        /// The user-defined display name of pipeline, e.g. plants-classification
22827        pub display_name: std::string::String,
22828
22829        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22830    }
22831
22832    impl Pipeline {
22833        /// Creates a new default instance.
22834        pub fn new() -> Self {
22835            std::default::Default::default()
22836        }
22837
22838        /// Sets the value of [name][crate::model::vertex_ai::Pipeline::name].
22839        ///
22840        /// # Example
22841        /// ```ignore,no_run
22842        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22843        /// let x = Pipeline::new().set_name("example");
22844        /// ```
22845        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22846            self.name = v.into();
22847            self
22848        }
22849
22850        /// Sets the value of [display_name][crate::model::vertex_ai::Pipeline::display_name].
22851        ///
22852        /// # Example
22853        /// ```ignore,no_run
22854        /// # use google_cloud_securitycenter_v2::model::vertex_ai::Pipeline;
22855        /// let x = Pipeline::new().set_display_name("example");
22856        /// ```
22857        pub fn set_display_name<T: std::convert::Into<std::string::String>>(
22858            mut self,
22859            v: T,
22860        ) -> Self {
22861            self.display_name = v.into();
22862            self
22863        }
22864    }
22865
22866    impl wkt::message::Message for Pipeline {
22867        fn typename() -> &'static str {
22868            "type.googleapis.com/google.cloud.securitycenter.v2.VertexAi.Pipeline"
22869        }
22870    }
22871}
22872
22873/// Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
22874#[derive(Clone, Default, PartialEq)]
22875#[non_exhaustive]
22876pub struct Vulnerability {
22877    /// CVE stands for Common Vulnerabilities and Exposures
22878    /// (<https://cve.mitre.org/about/>)
22879    pub cve: std::option::Option<crate::model::Cve>,
22880
22881    /// The offending package is relevant to the finding.
22882    pub offending_package: std::option::Option<crate::model::Package>,
22883
22884    /// The fixed package is relevant to the finding.
22885    pub fixed_package: std::option::Option<crate::model::Package>,
22886
22887    /// The security bulletin is relevant to this finding.
22888    pub security_bulletin: std::option::Option<crate::model::SecurityBulletin>,
22889
22890    /// Provider provided risk_score based on multiple factors. The higher the risk
22891    /// score, the more risky the vulnerability is.
22892    pub provider_risk_score: i64,
22893
22894    /// Represents whether the vulnerability is reachable (detected via static
22895    /// analysis)
22896    pub reachable: bool,
22897
22898    /// Represents one or more Common Weakness Enumeration (CWE) information on
22899    /// this vulnerability.
22900    pub cwes: std::vec::Vec<crate::model::Cwe>,
22901
22902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22903}
22904
22905impl Vulnerability {
22906    /// Creates a new default instance.
22907    pub fn new() -> Self {
22908        std::default::Default::default()
22909    }
22910
22911    /// Sets the value of [cve][crate::model::Vulnerability::cve].
22912    ///
22913    /// # Example
22914    /// ```ignore,no_run
22915    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22916    /// use google_cloud_securitycenter_v2::model::Cve;
22917    /// let x = Vulnerability::new().set_cve(Cve::default()/* use setters */);
22918    /// ```
22919    pub fn set_cve<T>(mut self, v: T) -> Self
22920    where
22921        T: std::convert::Into<crate::model::Cve>,
22922    {
22923        self.cve = std::option::Option::Some(v.into());
22924        self
22925    }
22926
22927    /// Sets or clears the value of [cve][crate::model::Vulnerability::cve].
22928    ///
22929    /// # Example
22930    /// ```ignore,no_run
22931    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22932    /// use google_cloud_securitycenter_v2::model::Cve;
22933    /// let x = Vulnerability::new().set_or_clear_cve(Some(Cve::default()/* use setters */));
22934    /// let x = Vulnerability::new().set_or_clear_cve(None::<Cve>);
22935    /// ```
22936    pub fn set_or_clear_cve<T>(mut self, v: std::option::Option<T>) -> Self
22937    where
22938        T: std::convert::Into<crate::model::Cve>,
22939    {
22940        self.cve = v.map(|x| x.into());
22941        self
22942    }
22943
22944    /// Sets the value of [offending_package][crate::model::Vulnerability::offending_package].
22945    ///
22946    /// # Example
22947    /// ```ignore,no_run
22948    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22949    /// use google_cloud_securitycenter_v2::model::Package;
22950    /// let x = Vulnerability::new().set_offending_package(Package::default()/* use setters */);
22951    /// ```
22952    pub fn set_offending_package<T>(mut self, v: T) -> Self
22953    where
22954        T: std::convert::Into<crate::model::Package>,
22955    {
22956        self.offending_package = std::option::Option::Some(v.into());
22957        self
22958    }
22959
22960    /// Sets or clears the value of [offending_package][crate::model::Vulnerability::offending_package].
22961    ///
22962    /// # Example
22963    /// ```ignore,no_run
22964    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22965    /// use google_cloud_securitycenter_v2::model::Package;
22966    /// let x = Vulnerability::new().set_or_clear_offending_package(Some(Package::default()/* use setters */));
22967    /// let x = Vulnerability::new().set_or_clear_offending_package(None::<Package>);
22968    /// ```
22969    pub fn set_or_clear_offending_package<T>(mut self, v: std::option::Option<T>) -> Self
22970    where
22971        T: std::convert::Into<crate::model::Package>,
22972    {
22973        self.offending_package = v.map(|x| x.into());
22974        self
22975    }
22976
22977    /// Sets the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22978    ///
22979    /// # Example
22980    /// ```ignore,no_run
22981    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22982    /// use google_cloud_securitycenter_v2::model::Package;
22983    /// let x = Vulnerability::new().set_fixed_package(Package::default()/* use setters */);
22984    /// ```
22985    pub fn set_fixed_package<T>(mut self, v: T) -> Self
22986    where
22987        T: std::convert::Into<crate::model::Package>,
22988    {
22989        self.fixed_package = std::option::Option::Some(v.into());
22990        self
22991    }
22992
22993    /// Sets or clears the value of [fixed_package][crate::model::Vulnerability::fixed_package].
22994    ///
22995    /// # Example
22996    /// ```ignore,no_run
22997    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
22998    /// use google_cloud_securitycenter_v2::model::Package;
22999    /// let x = Vulnerability::new().set_or_clear_fixed_package(Some(Package::default()/* use setters */));
23000    /// let x = Vulnerability::new().set_or_clear_fixed_package(None::<Package>);
23001    /// ```
23002    pub fn set_or_clear_fixed_package<T>(mut self, v: std::option::Option<T>) -> Self
23003    where
23004        T: std::convert::Into<crate::model::Package>,
23005    {
23006        self.fixed_package = v.map(|x| x.into());
23007        self
23008    }
23009
23010    /// Sets the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
23011    ///
23012    /// # Example
23013    /// ```ignore,no_run
23014    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
23015    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
23016    /// let x = Vulnerability::new().set_security_bulletin(SecurityBulletin::default()/* use setters */);
23017    /// ```
23018    pub fn set_security_bulletin<T>(mut self, v: T) -> Self
23019    where
23020        T: std::convert::Into<crate::model::SecurityBulletin>,
23021    {
23022        self.security_bulletin = std::option::Option::Some(v.into());
23023        self
23024    }
23025
23026    /// Sets or clears the value of [security_bulletin][crate::model::Vulnerability::security_bulletin].
23027    ///
23028    /// # Example
23029    /// ```ignore,no_run
23030    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
23031    /// use google_cloud_securitycenter_v2::model::SecurityBulletin;
23032    /// let x = Vulnerability::new().set_or_clear_security_bulletin(Some(SecurityBulletin::default()/* use setters */));
23033    /// let x = Vulnerability::new().set_or_clear_security_bulletin(None::<SecurityBulletin>);
23034    /// ```
23035    pub fn set_or_clear_security_bulletin<T>(mut self, v: std::option::Option<T>) -> Self
23036    where
23037        T: std::convert::Into<crate::model::SecurityBulletin>,
23038    {
23039        self.security_bulletin = v.map(|x| x.into());
23040        self
23041    }
23042
23043    /// Sets the value of [provider_risk_score][crate::model::Vulnerability::provider_risk_score].
23044    ///
23045    /// # Example
23046    /// ```ignore,no_run
23047    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
23048    /// let x = Vulnerability::new().set_provider_risk_score(42);
23049    /// ```
23050    pub fn set_provider_risk_score<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23051        self.provider_risk_score = v.into();
23052        self
23053    }
23054
23055    /// Sets the value of [reachable][crate::model::Vulnerability::reachable].
23056    ///
23057    /// # Example
23058    /// ```ignore,no_run
23059    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
23060    /// let x = Vulnerability::new().set_reachable(true);
23061    /// ```
23062    pub fn set_reachable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23063        self.reachable = v.into();
23064        self
23065    }
23066
23067    /// Sets the value of [cwes][crate::model::Vulnerability::cwes].
23068    ///
23069    /// # Example
23070    /// ```ignore,no_run
23071    /// # use google_cloud_securitycenter_v2::model::Vulnerability;
23072    /// use google_cloud_securitycenter_v2::model::Cwe;
23073    /// let x = Vulnerability::new()
23074    ///     .set_cwes([
23075    ///         Cwe::default()/* use setters */,
23076    ///         Cwe::default()/* use (different) setters */,
23077    ///     ]);
23078    /// ```
23079    pub fn set_cwes<T, V>(mut self, v: T) -> Self
23080    where
23081        T: std::iter::IntoIterator<Item = V>,
23082        V: std::convert::Into<crate::model::Cwe>,
23083    {
23084        use std::iter::Iterator;
23085        self.cwes = v.into_iter().map(|i| i.into()).collect();
23086        self
23087    }
23088}
23089
23090impl wkt::message::Message for Vulnerability {
23091    fn typename() -> &'static str {
23092        "type.googleapis.com/google.cloud.securitycenter.v2.Vulnerability"
23093    }
23094}
23095
23096/// CVE stands for Common Vulnerabilities and Exposures.
23097/// Information from the [CVE
23098/// record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
23099/// vulnerability.
23100#[derive(Clone, Default, PartialEq)]
23101#[non_exhaustive]
23102pub struct Cve {
23103    /// The unique identifier for the vulnerability. e.g. CVE-2021-34527
23104    pub id: std::string::String,
23105
23106    /// Additional information about the CVE.
23107    /// e.g. <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>
23108    pub references: std::vec::Vec<crate::model::Reference>,
23109
23110    /// Describe Common Vulnerability Scoring System specified at
23111    /// <https://www.first.org/cvss/v3.1/specification-document>
23112    pub cvssv3: std::option::Option<crate::model::Cvssv3>,
23113
23114    /// Whether upstream fix is available for the CVE.
23115    pub upstream_fix_available: bool,
23116
23117    /// The potential impact of the vulnerability if it was to be exploited.
23118    pub impact: crate::model::cve::RiskRating,
23119
23120    /// The exploitation activity of the vulnerability in the wild.
23121    pub exploitation_activity: crate::model::cve::ExploitationActivity,
23122
23123    /// Whether or not the vulnerability has been observed in the wild.
23124    pub observed_in_the_wild: bool,
23125
23126    /// Whether or not the vulnerability was zero day when the finding was
23127    /// published.
23128    pub zero_day: bool,
23129
23130    /// Date the first publicly available exploit or PoC was released.
23131    pub exploit_release_date: std::option::Option<wkt::Timestamp>,
23132
23133    /// Date of the earliest known exploitation.
23134    pub first_exploitation_date: std::option::Option<wkt::Timestamp>,
23135
23136    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23137}
23138
23139impl Cve {
23140    /// Creates a new default instance.
23141    pub fn new() -> Self {
23142        std::default::Default::default()
23143    }
23144
23145    /// Sets the value of [id][crate::model::Cve::id].
23146    ///
23147    /// # Example
23148    /// ```ignore,no_run
23149    /// # use google_cloud_securitycenter_v2::model::Cve;
23150    /// let x = Cve::new().set_id("example");
23151    /// ```
23152    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23153        self.id = v.into();
23154        self
23155    }
23156
23157    /// Sets the value of [references][crate::model::Cve::references].
23158    ///
23159    /// # Example
23160    /// ```ignore,no_run
23161    /// # use google_cloud_securitycenter_v2::model::Cve;
23162    /// use google_cloud_securitycenter_v2::model::Reference;
23163    /// let x = Cve::new()
23164    ///     .set_references([
23165    ///         Reference::default()/* use setters */,
23166    ///         Reference::default()/* use (different) setters */,
23167    ///     ]);
23168    /// ```
23169    pub fn set_references<T, V>(mut self, v: T) -> Self
23170    where
23171        T: std::iter::IntoIterator<Item = V>,
23172        V: std::convert::Into<crate::model::Reference>,
23173    {
23174        use std::iter::Iterator;
23175        self.references = v.into_iter().map(|i| i.into()).collect();
23176        self
23177    }
23178
23179    /// Sets the value of [cvssv3][crate::model::Cve::cvssv3].
23180    ///
23181    /// # Example
23182    /// ```ignore,no_run
23183    /// # use google_cloud_securitycenter_v2::model::Cve;
23184    /// use google_cloud_securitycenter_v2::model::Cvssv3;
23185    /// let x = Cve::new().set_cvssv3(Cvssv3::default()/* use setters */);
23186    /// ```
23187    pub fn set_cvssv3<T>(mut self, v: T) -> Self
23188    where
23189        T: std::convert::Into<crate::model::Cvssv3>,
23190    {
23191        self.cvssv3 = std::option::Option::Some(v.into());
23192        self
23193    }
23194
23195    /// Sets or clears the value of [cvssv3][crate::model::Cve::cvssv3].
23196    ///
23197    /// # Example
23198    /// ```ignore,no_run
23199    /// # use google_cloud_securitycenter_v2::model::Cve;
23200    /// use google_cloud_securitycenter_v2::model::Cvssv3;
23201    /// let x = Cve::new().set_or_clear_cvssv3(Some(Cvssv3::default()/* use setters */));
23202    /// let x = Cve::new().set_or_clear_cvssv3(None::<Cvssv3>);
23203    /// ```
23204    pub fn set_or_clear_cvssv3<T>(mut self, v: std::option::Option<T>) -> Self
23205    where
23206        T: std::convert::Into<crate::model::Cvssv3>,
23207    {
23208        self.cvssv3 = v.map(|x| x.into());
23209        self
23210    }
23211
23212    /// Sets the value of [upstream_fix_available][crate::model::Cve::upstream_fix_available].
23213    ///
23214    /// # Example
23215    /// ```ignore,no_run
23216    /// # use google_cloud_securitycenter_v2::model::Cve;
23217    /// let x = Cve::new().set_upstream_fix_available(true);
23218    /// ```
23219    pub fn set_upstream_fix_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23220        self.upstream_fix_available = v.into();
23221        self
23222    }
23223
23224    /// Sets the value of [impact][crate::model::Cve::impact].
23225    ///
23226    /// # Example
23227    /// ```ignore,no_run
23228    /// # use google_cloud_securitycenter_v2::model::Cve;
23229    /// use google_cloud_securitycenter_v2::model::cve::RiskRating;
23230    /// let x0 = Cve::new().set_impact(RiskRating::Low);
23231    /// let x1 = Cve::new().set_impact(RiskRating::Medium);
23232    /// let x2 = Cve::new().set_impact(RiskRating::High);
23233    /// ```
23234    pub fn set_impact<T: std::convert::Into<crate::model::cve::RiskRating>>(
23235        mut self,
23236        v: T,
23237    ) -> Self {
23238        self.impact = v.into();
23239        self
23240    }
23241
23242    /// Sets the value of [exploitation_activity][crate::model::Cve::exploitation_activity].
23243    ///
23244    /// # Example
23245    /// ```ignore,no_run
23246    /// # use google_cloud_securitycenter_v2::model::Cve;
23247    /// use google_cloud_securitycenter_v2::model::cve::ExploitationActivity;
23248    /// let x0 = Cve::new().set_exploitation_activity(ExploitationActivity::Wide);
23249    /// let x1 = Cve::new().set_exploitation_activity(ExploitationActivity::Confirmed);
23250    /// let x2 = Cve::new().set_exploitation_activity(ExploitationActivity::Available);
23251    /// ```
23252    pub fn set_exploitation_activity<
23253        T: std::convert::Into<crate::model::cve::ExploitationActivity>,
23254    >(
23255        mut self,
23256        v: T,
23257    ) -> Self {
23258        self.exploitation_activity = v.into();
23259        self
23260    }
23261
23262    /// Sets the value of [observed_in_the_wild][crate::model::Cve::observed_in_the_wild].
23263    ///
23264    /// # Example
23265    /// ```ignore,no_run
23266    /// # use google_cloud_securitycenter_v2::model::Cve;
23267    /// let x = Cve::new().set_observed_in_the_wild(true);
23268    /// ```
23269    pub fn set_observed_in_the_wild<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23270        self.observed_in_the_wild = v.into();
23271        self
23272    }
23273
23274    /// Sets the value of [zero_day][crate::model::Cve::zero_day].
23275    ///
23276    /// # Example
23277    /// ```ignore,no_run
23278    /// # use google_cloud_securitycenter_v2::model::Cve;
23279    /// let x = Cve::new().set_zero_day(true);
23280    /// ```
23281    pub fn set_zero_day<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23282        self.zero_day = v.into();
23283        self
23284    }
23285
23286    /// Sets the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
23287    ///
23288    /// # Example
23289    /// ```ignore,no_run
23290    /// # use google_cloud_securitycenter_v2::model::Cve;
23291    /// use wkt::Timestamp;
23292    /// let x = Cve::new().set_exploit_release_date(Timestamp::default()/* use setters */);
23293    /// ```
23294    pub fn set_exploit_release_date<T>(mut self, v: T) -> Self
23295    where
23296        T: std::convert::Into<wkt::Timestamp>,
23297    {
23298        self.exploit_release_date = std::option::Option::Some(v.into());
23299        self
23300    }
23301
23302    /// Sets or clears the value of [exploit_release_date][crate::model::Cve::exploit_release_date].
23303    ///
23304    /// # Example
23305    /// ```ignore,no_run
23306    /// # use google_cloud_securitycenter_v2::model::Cve;
23307    /// use wkt::Timestamp;
23308    /// let x = Cve::new().set_or_clear_exploit_release_date(Some(Timestamp::default()/* use setters */));
23309    /// let x = Cve::new().set_or_clear_exploit_release_date(None::<Timestamp>);
23310    /// ```
23311    pub fn set_or_clear_exploit_release_date<T>(mut self, v: std::option::Option<T>) -> Self
23312    where
23313        T: std::convert::Into<wkt::Timestamp>,
23314    {
23315        self.exploit_release_date = v.map(|x| x.into());
23316        self
23317    }
23318
23319    /// Sets the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
23320    ///
23321    /// # Example
23322    /// ```ignore,no_run
23323    /// # use google_cloud_securitycenter_v2::model::Cve;
23324    /// use wkt::Timestamp;
23325    /// let x = Cve::new().set_first_exploitation_date(Timestamp::default()/* use setters */);
23326    /// ```
23327    pub fn set_first_exploitation_date<T>(mut self, v: T) -> Self
23328    where
23329        T: std::convert::Into<wkt::Timestamp>,
23330    {
23331        self.first_exploitation_date = std::option::Option::Some(v.into());
23332        self
23333    }
23334
23335    /// Sets or clears the value of [first_exploitation_date][crate::model::Cve::first_exploitation_date].
23336    ///
23337    /// # Example
23338    /// ```ignore,no_run
23339    /// # use google_cloud_securitycenter_v2::model::Cve;
23340    /// use wkt::Timestamp;
23341    /// let x = Cve::new().set_or_clear_first_exploitation_date(Some(Timestamp::default()/* use setters */));
23342    /// let x = Cve::new().set_or_clear_first_exploitation_date(None::<Timestamp>);
23343    /// ```
23344    pub fn set_or_clear_first_exploitation_date<T>(mut self, v: std::option::Option<T>) -> Self
23345    where
23346        T: std::convert::Into<wkt::Timestamp>,
23347    {
23348        self.first_exploitation_date = v.map(|x| x.into());
23349        self
23350    }
23351}
23352
23353impl wkt::message::Message for Cve {
23354    fn typename() -> &'static str {
23355        "type.googleapis.com/google.cloud.securitycenter.v2.Cve"
23356    }
23357}
23358
23359/// Defines additional types related to [Cve].
23360pub mod cve {
23361    #[allow(unused_imports)]
23362    use super::*;
23363
23364    /// The possible values of impact of the vulnerability if it was to be
23365    /// exploited.
23366    ///
23367    /// # Working with unknown values
23368    ///
23369    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23370    /// additional enum variants at any time. Adding new variants is not considered
23371    /// a breaking change. Applications should write their code in anticipation of:
23372    ///
23373    /// - New values appearing in future releases of the client library, **and**
23374    /// - New values received dynamically, without application changes.
23375    ///
23376    /// Please consult the [Working with enums] section in the user guide for some
23377    /// guidelines.
23378    ///
23379    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23380    #[derive(Clone, Debug, PartialEq)]
23381    #[non_exhaustive]
23382    pub enum RiskRating {
23383        /// Invalid or empty value.
23384        Unspecified,
23385        /// Exploitation would have little to no security impact.
23386        Low,
23387        /// Exploitation would enable attackers to perform activities, or could allow
23388        /// attackers to have a direct impact, but would require additional steps.
23389        Medium,
23390        /// Exploitation would enable attackers to have a notable direct impact
23391        /// without needing to overcome any major mitigating factors.
23392        High,
23393        /// Exploitation would fundamentally undermine the security of affected
23394        /// systems, enable actors to perform significant attacks with minimal
23395        /// effort, with little to no mitigating factors to overcome.
23396        Critical,
23397        /// If set, the enum was initialized with an unknown value.
23398        ///
23399        /// Applications can examine the value using [RiskRating::value] or
23400        /// [RiskRating::name].
23401        UnknownValue(risk_rating::UnknownValue),
23402    }
23403
23404    #[doc(hidden)]
23405    pub mod risk_rating {
23406        #[allow(unused_imports)]
23407        use super::*;
23408        #[derive(Clone, Debug, PartialEq)]
23409        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23410    }
23411
23412    impl RiskRating {
23413        /// Gets the enum value.
23414        ///
23415        /// Returns `None` if the enum contains an unknown value deserialized from
23416        /// the string representation of enums.
23417        pub fn value(&self) -> std::option::Option<i32> {
23418            match self {
23419                Self::Unspecified => std::option::Option::Some(0),
23420                Self::Low => std::option::Option::Some(1),
23421                Self::Medium => std::option::Option::Some(2),
23422                Self::High => std::option::Option::Some(3),
23423                Self::Critical => std::option::Option::Some(4),
23424                Self::UnknownValue(u) => u.0.value(),
23425            }
23426        }
23427
23428        /// Gets the enum value as a string.
23429        ///
23430        /// Returns `None` if the enum contains an unknown value deserialized from
23431        /// the integer representation of enums.
23432        pub fn name(&self) -> std::option::Option<&str> {
23433            match self {
23434                Self::Unspecified => std::option::Option::Some("RISK_RATING_UNSPECIFIED"),
23435                Self::Low => std::option::Option::Some("LOW"),
23436                Self::Medium => std::option::Option::Some("MEDIUM"),
23437                Self::High => std::option::Option::Some("HIGH"),
23438                Self::Critical => std::option::Option::Some("CRITICAL"),
23439                Self::UnknownValue(u) => u.0.name(),
23440            }
23441        }
23442    }
23443
23444    impl std::default::Default for RiskRating {
23445        fn default() -> Self {
23446            use std::convert::From;
23447            Self::from(0)
23448        }
23449    }
23450
23451    impl std::fmt::Display for RiskRating {
23452        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23453            wkt::internal::display_enum(f, self.name(), self.value())
23454        }
23455    }
23456
23457    impl std::convert::From<i32> for RiskRating {
23458        fn from(value: i32) -> Self {
23459            match value {
23460                0 => Self::Unspecified,
23461                1 => Self::Low,
23462                2 => Self::Medium,
23463                3 => Self::High,
23464                4 => Self::Critical,
23465                _ => Self::UnknownValue(risk_rating::UnknownValue(
23466                    wkt::internal::UnknownEnumValue::Integer(value),
23467                )),
23468            }
23469        }
23470    }
23471
23472    impl std::convert::From<&str> for RiskRating {
23473        fn from(value: &str) -> Self {
23474            use std::string::ToString;
23475            match value {
23476                "RISK_RATING_UNSPECIFIED" => Self::Unspecified,
23477                "LOW" => Self::Low,
23478                "MEDIUM" => Self::Medium,
23479                "HIGH" => Self::High,
23480                "CRITICAL" => Self::Critical,
23481                _ => Self::UnknownValue(risk_rating::UnknownValue(
23482                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23483                )),
23484            }
23485        }
23486    }
23487
23488    impl serde::ser::Serialize for RiskRating {
23489        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23490        where
23491            S: serde::Serializer,
23492        {
23493            match self {
23494                Self::Unspecified => serializer.serialize_i32(0),
23495                Self::Low => serializer.serialize_i32(1),
23496                Self::Medium => serializer.serialize_i32(2),
23497                Self::High => serializer.serialize_i32(3),
23498                Self::Critical => serializer.serialize_i32(4),
23499                Self::UnknownValue(u) => u.0.serialize(serializer),
23500            }
23501        }
23502    }
23503
23504    impl<'de> serde::de::Deserialize<'de> for RiskRating {
23505        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23506        where
23507            D: serde::Deserializer<'de>,
23508        {
23509            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RiskRating>::new(
23510                ".google.cloud.securitycenter.v2.Cve.RiskRating",
23511            ))
23512        }
23513    }
23514
23515    /// The possible values of exploitation activity of the vulnerability in the
23516    /// wild.
23517    ///
23518    /// # Working with unknown values
23519    ///
23520    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23521    /// additional enum variants at any time. Adding new variants is not considered
23522    /// a breaking change. Applications should write their code in anticipation of:
23523    ///
23524    /// - New values appearing in future releases of the client library, **and**
23525    /// - New values received dynamically, without application changes.
23526    ///
23527    /// Please consult the [Working with enums] section in the user guide for some
23528    /// guidelines.
23529    ///
23530    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23531    #[derive(Clone, Debug, PartialEq)]
23532    #[non_exhaustive]
23533    pub enum ExploitationActivity {
23534        /// Invalid or empty value.
23535        Unspecified,
23536        /// Exploitation has been reported or confirmed to widely occur.
23537        Wide,
23538        /// Limited reported or confirmed exploitation activities.
23539        Confirmed,
23540        /// Exploit is publicly available.
23541        Available,
23542        /// No known exploitation activity, but has a high potential for
23543        /// exploitation.
23544        Anticipated,
23545        /// No known exploitation activity.
23546        NoKnown,
23547        /// If set, the enum was initialized with an unknown value.
23548        ///
23549        /// Applications can examine the value using [ExploitationActivity::value] or
23550        /// [ExploitationActivity::name].
23551        UnknownValue(exploitation_activity::UnknownValue),
23552    }
23553
23554    #[doc(hidden)]
23555    pub mod exploitation_activity {
23556        #[allow(unused_imports)]
23557        use super::*;
23558        #[derive(Clone, Debug, PartialEq)]
23559        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23560    }
23561
23562    impl ExploitationActivity {
23563        /// Gets the enum value.
23564        ///
23565        /// Returns `None` if the enum contains an unknown value deserialized from
23566        /// the string representation of enums.
23567        pub fn value(&self) -> std::option::Option<i32> {
23568            match self {
23569                Self::Unspecified => std::option::Option::Some(0),
23570                Self::Wide => std::option::Option::Some(1),
23571                Self::Confirmed => std::option::Option::Some(2),
23572                Self::Available => std::option::Option::Some(3),
23573                Self::Anticipated => std::option::Option::Some(4),
23574                Self::NoKnown => std::option::Option::Some(5),
23575                Self::UnknownValue(u) => u.0.value(),
23576            }
23577        }
23578
23579        /// Gets the enum value as a string.
23580        ///
23581        /// Returns `None` if the enum contains an unknown value deserialized from
23582        /// the integer representation of enums.
23583        pub fn name(&self) -> std::option::Option<&str> {
23584            match self {
23585                Self::Unspecified => std::option::Option::Some("EXPLOITATION_ACTIVITY_UNSPECIFIED"),
23586                Self::Wide => std::option::Option::Some("WIDE"),
23587                Self::Confirmed => std::option::Option::Some("CONFIRMED"),
23588                Self::Available => std::option::Option::Some("AVAILABLE"),
23589                Self::Anticipated => std::option::Option::Some("ANTICIPATED"),
23590                Self::NoKnown => std::option::Option::Some("NO_KNOWN"),
23591                Self::UnknownValue(u) => u.0.name(),
23592            }
23593        }
23594    }
23595
23596    impl std::default::Default for ExploitationActivity {
23597        fn default() -> Self {
23598            use std::convert::From;
23599            Self::from(0)
23600        }
23601    }
23602
23603    impl std::fmt::Display for ExploitationActivity {
23604        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23605            wkt::internal::display_enum(f, self.name(), self.value())
23606        }
23607    }
23608
23609    impl std::convert::From<i32> for ExploitationActivity {
23610        fn from(value: i32) -> Self {
23611            match value {
23612                0 => Self::Unspecified,
23613                1 => Self::Wide,
23614                2 => Self::Confirmed,
23615                3 => Self::Available,
23616                4 => Self::Anticipated,
23617                5 => Self::NoKnown,
23618                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
23619                    wkt::internal::UnknownEnumValue::Integer(value),
23620                )),
23621            }
23622        }
23623    }
23624
23625    impl std::convert::From<&str> for ExploitationActivity {
23626        fn from(value: &str) -> Self {
23627            use std::string::ToString;
23628            match value {
23629                "EXPLOITATION_ACTIVITY_UNSPECIFIED" => Self::Unspecified,
23630                "WIDE" => Self::Wide,
23631                "CONFIRMED" => Self::Confirmed,
23632                "AVAILABLE" => Self::Available,
23633                "ANTICIPATED" => Self::Anticipated,
23634                "NO_KNOWN" => Self::NoKnown,
23635                _ => Self::UnknownValue(exploitation_activity::UnknownValue(
23636                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23637                )),
23638            }
23639        }
23640    }
23641
23642    impl serde::ser::Serialize for ExploitationActivity {
23643        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23644        where
23645            S: serde::Serializer,
23646        {
23647            match self {
23648                Self::Unspecified => serializer.serialize_i32(0),
23649                Self::Wide => serializer.serialize_i32(1),
23650                Self::Confirmed => serializer.serialize_i32(2),
23651                Self::Available => serializer.serialize_i32(3),
23652                Self::Anticipated => serializer.serialize_i32(4),
23653                Self::NoKnown => serializer.serialize_i32(5),
23654                Self::UnknownValue(u) => u.0.serialize(serializer),
23655            }
23656        }
23657    }
23658
23659    impl<'de> serde::de::Deserialize<'de> for ExploitationActivity {
23660        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23661        where
23662            D: serde::Deserializer<'de>,
23663        {
23664            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExploitationActivity>::new(
23665                ".google.cloud.securitycenter.v2.Cve.ExploitationActivity",
23666            ))
23667        }
23668    }
23669}
23670
23671/// Additional Links
23672#[derive(Clone, Default, PartialEq)]
23673#[non_exhaustive]
23674pub struct Reference {
23675    /// Source of the reference e.g. NVD
23676    pub source: std::string::String,
23677
23678    /// Uri for the mentioned source e.g.
23679    /// <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527>.
23680    pub uri: std::string::String,
23681
23682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23683}
23684
23685impl Reference {
23686    /// Creates a new default instance.
23687    pub fn new() -> Self {
23688        std::default::Default::default()
23689    }
23690
23691    /// Sets the value of [source][crate::model::Reference::source].
23692    ///
23693    /// # Example
23694    /// ```ignore,no_run
23695    /// # use google_cloud_securitycenter_v2::model::Reference;
23696    /// let x = Reference::new().set_source("example");
23697    /// ```
23698    pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23699        self.source = v.into();
23700        self
23701    }
23702
23703    /// Sets the value of [uri][crate::model::Reference::uri].
23704    ///
23705    /// # Example
23706    /// ```ignore,no_run
23707    /// # use google_cloud_securitycenter_v2::model::Reference;
23708    /// let x = Reference::new().set_uri("example");
23709    /// ```
23710    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23711        self.uri = v.into();
23712        self
23713    }
23714}
23715
23716impl wkt::message::Message for Reference {
23717    fn typename() -> &'static str {
23718        "type.googleapis.com/google.cloud.securitycenter.v2.Reference"
23719    }
23720}
23721
23722/// Common Vulnerability Scoring System version 3.
23723#[derive(Clone, Default, PartialEq)]
23724#[non_exhaustive]
23725pub struct Cvssv3 {
23726    /// The base score is a function of the base metric scores.
23727    pub base_score: f64,
23728
23729    /// Base Metrics
23730    /// Represents the intrinsic characteristics of a vulnerability that are
23731    /// constant over time and across user environments.
23732    /// This metric reflects the context by which vulnerability exploitation is
23733    /// possible.
23734    pub attack_vector: crate::model::cvssv_3::AttackVector,
23735
23736    /// This metric describes the conditions beyond the attacker's control that
23737    /// must exist in order to exploit the vulnerability.
23738    pub attack_complexity: crate::model::cvssv_3::AttackComplexity,
23739
23740    /// This metric describes the level of privileges an attacker must possess
23741    /// before successfully exploiting the vulnerability.
23742    pub privileges_required: crate::model::cvssv_3::PrivilegesRequired,
23743
23744    /// This metric captures the requirement for a human user, other than the
23745    /// attacker, to participate in the successful compromise of the vulnerable
23746    /// component.
23747    pub user_interaction: crate::model::cvssv_3::UserInteraction,
23748
23749    /// The Scope metric captures whether a vulnerability in one vulnerable
23750    /// component impacts resources in components beyond its security scope.
23751    pub scope: crate::model::cvssv_3::Scope,
23752
23753    /// This metric measures the impact to the confidentiality of the information
23754    /// resources managed by a software component due to a successfully exploited
23755    /// vulnerability.
23756    pub confidentiality_impact: crate::model::cvssv_3::Impact,
23757
23758    /// This metric measures the impact to integrity of a successfully exploited
23759    /// vulnerability.
23760    pub integrity_impact: crate::model::cvssv_3::Impact,
23761
23762    /// This metric measures the impact to the availability of the impacted
23763    /// component resulting from a successfully exploited vulnerability.
23764    pub availability_impact: crate::model::cvssv_3::Impact,
23765
23766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23767}
23768
23769impl Cvssv3 {
23770    /// Creates a new default instance.
23771    pub fn new() -> Self {
23772        std::default::Default::default()
23773    }
23774
23775    /// Sets the value of [base_score][crate::model::Cvssv3::base_score].
23776    ///
23777    /// # Example
23778    /// ```ignore,no_run
23779    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23780    /// let x = Cvssv3::new().set_base_score(42.0);
23781    /// ```
23782    pub fn set_base_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
23783        self.base_score = v.into();
23784        self
23785    }
23786
23787    /// Sets the value of [attack_vector][crate::model::Cvssv3::attack_vector].
23788    ///
23789    /// # Example
23790    /// ```ignore,no_run
23791    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23792    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackVector;
23793    /// let x0 = Cvssv3::new().set_attack_vector(AttackVector::Network);
23794    /// let x1 = Cvssv3::new().set_attack_vector(AttackVector::Adjacent);
23795    /// let x2 = Cvssv3::new().set_attack_vector(AttackVector::Local);
23796    /// ```
23797    pub fn set_attack_vector<T: std::convert::Into<crate::model::cvssv_3::AttackVector>>(
23798        mut self,
23799        v: T,
23800    ) -> Self {
23801        self.attack_vector = v.into();
23802        self
23803    }
23804
23805    /// Sets the value of [attack_complexity][crate::model::Cvssv3::attack_complexity].
23806    ///
23807    /// # Example
23808    /// ```ignore,no_run
23809    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23810    /// use google_cloud_securitycenter_v2::model::cvssv_3::AttackComplexity;
23811    /// let x0 = Cvssv3::new().set_attack_complexity(AttackComplexity::Low);
23812    /// let x1 = Cvssv3::new().set_attack_complexity(AttackComplexity::High);
23813    /// ```
23814    pub fn set_attack_complexity<T: std::convert::Into<crate::model::cvssv_3::AttackComplexity>>(
23815        mut self,
23816        v: T,
23817    ) -> Self {
23818        self.attack_complexity = v.into();
23819        self
23820    }
23821
23822    /// Sets the value of [privileges_required][crate::model::Cvssv3::privileges_required].
23823    ///
23824    /// # Example
23825    /// ```ignore,no_run
23826    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23827    /// use google_cloud_securitycenter_v2::model::cvssv_3::PrivilegesRequired;
23828    /// let x0 = Cvssv3::new().set_privileges_required(PrivilegesRequired::None);
23829    /// let x1 = Cvssv3::new().set_privileges_required(PrivilegesRequired::Low);
23830    /// let x2 = Cvssv3::new().set_privileges_required(PrivilegesRequired::High);
23831    /// ```
23832    pub fn set_privileges_required<
23833        T: std::convert::Into<crate::model::cvssv_3::PrivilegesRequired>,
23834    >(
23835        mut self,
23836        v: T,
23837    ) -> Self {
23838        self.privileges_required = v.into();
23839        self
23840    }
23841
23842    /// Sets the value of [user_interaction][crate::model::Cvssv3::user_interaction].
23843    ///
23844    /// # Example
23845    /// ```ignore,no_run
23846    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23847    /// use google_cloud_securitycenter_v2::model::cvssv_3::UserInteraction;
23848    /// let x0 = Cvssv3::new().set_user_interaction(UserInteraction::None);
23849    /// let x1 = Cvssv3::new().set_user_interaction(UserInteraction::Required);
23850    /// ```
23851    pub fn set_user_interaction<T: std::convert::Into<crate::model::cvssv_3::UserInteraction>>(
23852        mut self,
23853        v: T,
23854    ) -> Self {
23855        self.user_interaction = v.into();
23856        self
23857    }
23858
23859    /// Sets the value of [scope][crate::model::Cvssv3::scope].
23860    ///
23861    /// # Example
23862    /// ```ignore,no_run
23863    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23864    /// use google_cloud_securitycenter_v2::model::cvssv_3::Scope;
23865    /// let x0 = Cvssv3::new().set_scope(Scope::Unchanged);
23866    /// let x1 = Cvssv3::new().set_scope(Scope::Changed);
23867    /// ```
23868    pub fn set_scope<T: std::convert::Into<crate::model::cvssv_3::Scope>>(mut self, v: T) -> Self {
23869        self.scope = v.into();
23870        self
23871    }
23872
23873    /// Sets the value of [confidentiality_impact][crate::model::Cvssv3::confidentiality_impact].
23874    ///
23875    /// # Example
23876    /// ```ignore,no_run
23877    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23878    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23879    /// let x0 = Cvssv3::new().set_confidentiality_impact(Impact::High);
23880    /// let x1 = Cvssv3::new().set_confidentiality_impact(Impact::Low);
23881    /// let x2 = Cvssv3::new().set_confidentiality_impact(Impact::None);
23882    /// ```
23883    pub fn set_confidentiality_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23884        mut self,
23885        v: T,
23886    ) -> Self {
23887        self.confidentiality_impact = v.into();
23888        self
23889    }
23890
23891    /// Sets the value of [integrity_impact][crate::model::Cvssv3::integrity_impact].
23892    ///
23893    /// # Example
23894    /// ```ignore,no_run
23895    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23896    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23897    /// let x0 = Cvssv3::new().set_integrity_impact(Impact::High);
23898    /// let x1 = Cvssv3::new().set_integrity_impact(Impact::Low);
23899    /// let x2 = Cvssv3::new().set_integrity_impact(Impact::None);
23900    /// ```
23901    pub fn set_integrity_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23902        mut self,
23903        v: T,
23904    ) -> Self {
23905        self.integrity_impact = v.into();
23906        self
23907    }
23908
23909    /// Sets the value of [availability_impact][crate::model::Cvssv3::availability_impact].
23910    ///
23911    /// # Example
23912    /// ```ignore,no_run
23913    /// # use google_cloud_securitycenter_v2::model::Cvssv3;
23914    /// use google_cloud_securitycenter_v2::model::cvssv_3::Impact;
23915    /// let x0 = Cvssv3::new().set_availability_impact(Impact::High);
23916    /// let x1 = Cvssv3::new().set_availability_impact(Impact::Low);
23917    /// let x2 = Cvssv3::new().set_availability_impact(Impact::None);
23918    /// ```
23919    pub fn set_availability_impact<T: std::convert::Into<crate::model::cvssv_3::Impact>>(
23920        mut self,
23921        v: T,
23922    ) -> Self {
23923        self.availability_impact = v.into();
23924        self
23925    }
23926}
23927
23928impl wkt::message::Message for Cvssv3 {
23929    fn typename() -> &'static str {
23930        "type.googleapis.com/google.cloud.securitycenter.v2.Cvssv3"
23931    }
23932}
23933
23934/// Defines additional types related to [Cvssv3].
23935pub mod cvssv_3 {
23936    #[allow(unused_imports)]
23937    use super::*;
23938
23939    /// This metric reflects the context by which vulnerability exploitation is
23940    /// possible.
23941    ///
23942    /// # Working with unknown values
23943    ///
23944    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23945    /// additional enum variants at any time. Adding new variants is not considered
23946    /// a breaking change. Applications should write their code in anticipation of:
23947    ///
23948    /// - New values appearing in future releases of the client library, **and**
23949    /// - New values received dynamically, without application changes.
23950    ///
23951    /// Please consult the [Working with enums] section in the user guide for some
23952    /// guidelines.
23953    ///
23954    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
23955    #[derive(Clone, Debug, PartialEq)]
23956    #[non_exhaustive]
23957    pub enum AttackVector {
23958        /// Invalid value.
23959        Unspecified,
23960        /// The vulnerable component is bound to the network stack and the set of
23961        /// possible attackers extends beyond the other options listed below, up to
23962        /// and including the entire Internet.
23963        Network,
23964        /// The vulnerable component is bound to the network stack, but the attack is
23965        /// limited at the protocol level to a logically adjacent topology.
23966        Adjacent,
23967        /// The vulnerable component is not bound to the network stack and the
23968        /// attacker's path is via read/write/execute capabilities.
23969        Local,
23970        /// The attack requires the attacker to physically touch or manipulate the
23971        /// vulnerable component.
23972        Physical,
23973        /// If set, the enum was initialized with an unknown value.
23974        ///
23975        /// Applications can examine the value using [AttackVector::value] or
23976        /// [AttackVector::name].
23977        UnknownValue(attack_vector::UnknownValue),
23978    }
23979
23980    #[doc(hidden)]
23981    pub mod attack_vector {
23982        #[allow(unused_imports)]
23983        use super::*;
23984        #[derive(Clone, Debug, PartialEq)]
23985        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23986    }
23987
23988    impl AttackVector {
23989        /// Gets the enum value.
23990        ///
23991        /// Returns `None` if the enum contains an unknown value deserialized from
23992        /// the string representation of enums.
23993        pub fn value(&self) -> std::option::Option<i32> {
23994            match self {
23995                Self::Unspecified => std::option::Option::Some(0),
23996                Self::Network => std::option::Option::Some(1),
23997                Self::Adjacent => std::option::Option::Some(2),
23998                Self::Local => std::option::Option::Some(3),
23999                Self::Physical => std::option::Option::Some(4),
24000                Self::UnknownValue(u) => u.0.value(),
24001            }
24002        }
24003
24004        /// Gets the enum value as a string.
24005        ///
24006        /// Returns `None` if the enum contains an unknown value deserialized from
24007        /// the integer representation of enums.
24008        pub fn name(&self) -> std::option::Option<&str> {
24009            match self {
24010                Self::Unspecified => std::option::Option::Some("ATTACK_VECTOR_UNSPECIFIED"),
24011                Self::Network => std::option::Option::Some("ATTACK_VECTOR_NETWORK"),
24012                Self::Adjacent => std::option::Option::Some("ATTACK_VECTOR_ADJACENT"),
24013                Self::Local => std::option::Option::Some("ATTACK_VECTOR_LOCAL"),
24014                Self::Physical => std::option::Option::Some("ATTACK_VECTOR_PHYSICAL"),
24015                Self::UnknownValue(u) => u.0.name(),
24016            }
24017        }
24018    }
24019
24020    impl std::default::Default for AttackVector {
24021        fn default() -> Self {
24022            use std::convert::From;
24023            Self::from(0)
24024        }
24025    }
24026
24027    impl std::fmt::Display for AttackVector {
24028        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24029            wkt::internal::display_enum(f, self.name(), self.value())
24030        }
24031    }
24032
24033    impl std::convert::From<i32> for AttackVector {
24034        fn from(value: i32) -> Self {
24035            match value {
24036                0 => Self::Unspecified,
24037                1 => Self::Network,
24038                2 => Self::Adjacent,
24039                3 => Self::Local,
24040                4 => Self::Physical,
24041                _ => Self::UnknownValue(attack_vector::UnknownValue(
24042                    wkt::internal::UnknownEnumValue::Integer(value),
24043                )),
24044            }
24045        }
24046    }
24047
24048    impl std::convert::From<&str> for AttackVector {
24049        fn from(value: &str) -> Self {
24050            use std::string::ToString;
24051            match value {
24052                "ATTACK_VECTOR_UNSPECIFIED" => Self::Unspecified,
24053                "ATTACK_VECTOR_NETWORK" => Self::Network,
24054                "ATTACK_VECTOR_ADJACENT" => Self::Adjacent,
24055                "ATTACK_VECTOR_LOCAL" => Self::Local,
24056                "ATTACK_VECTOR_PHYSICAL" => Self::Physical,
24057                _ => Self::UnknownValue(attack_vector::UnknownValue(
24058                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24059                )),
24060            }
24061        }
24062    }
24063
24064    impl serde::ser::Serialize for AttackVector {
24065        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24066        where
24067            S: serde::Serializer,
24068        {
24069            match self {
24070                Self::Unspecified => serializer.serialize_i32(0),
24071                Self::Network => serializer.serialize_i32(1),
24072                Self::Adjacent => serializer.serialize_i32(2),
24073                Self::Local => serializer.serialize_i32(3),
24074                Self::Physical => serializer.serialize_i32(4),
24075                Self::UnknownValue(u) => u.0.serialize(serializer),
24076            }
24077        }
24078    }
24079
24080    impl<'de> serde::de::Deserialize<'de> for AttackVector {
24081        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24082        where
24083            D: serde::Deserializer<'de>,
24084        {
24085            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackVector>::new(
24086                ".google.cloud.securitycenter.v2.Cvssv3.AttackVector",
24087            ))
24088        }
24089    }
24090
24091    /// This metric describes the conditions beyond the attacker's control that
24092    /// must exist in order to exploit the vulnerability.
24093    ///
24094    /// # Working with unknown values
24095    ///
24096    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24097    /// additional enum variants at any time. Adding new variants is not considered
24098    /// a breaking change. Applications should write their code in anticipation of:
24099    ///
24100    /// - New values appearing in future releases of the client library, **and**
24101    /// - New values received dynamically, without application changes.
24102    ///
24103    /// Please consult the [Working with enums] section in the user guide for some
24104    /// guidelines.
24105    ///
24106    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24107    #[derive(Clone, Debug, PartialEq)]
24108    #[non_exhaustive]
24109    pub enum AttackComplexity {
24110        /// Invalid value.
24111        Unspecified,
24112        /// Specialized access conditions or extenuating circumstances do not exist.
24113        /// An attacker can expect repeatable success when attacking the vulnerable
24114        /// component.
24115        Low,
24116        /// A successful attack depends on conditions beyond the attacker's control.
24117        /// That is, a successful attack cannot be accomplished at will, but requires
24118        /// the attacker to invest in some measurable amount of effort in preparation
24119        /// or execution against the vulnerable component before a successful attack
24120        /// can be expected.
24121        High,
24122        /// If set, the enum was initialized with an unknown value.
24123        ///
24124        /// Applications can examine the value using [AttackComplexity::value] or
24125        /// [AttackComplexity::name].
24126        UnknownValue(attack_complexity::UnknownValue),
24127    }
24128
24129    #[doc(hidden)]
24130    pub mod attack_complexity {
24131        #[allow(unused_imports)]
24132        use super::*;
24133        #[derive(Clone, Debug, PartialEq)]
24134        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24135    }
24136
24137    impl AttackComplexity {
24138        /// Gets the enum value.
24139        ///
24140        /// Returns `None` if the enum contains an unknown value deserialized from
24141        /// the string representation of enums.
24142        pub fn value(&self) -> std::option::Option<i32> {
24143            match self {
24144                Self::Unspecified => std::option::Option::Some(0),
24145                Self::Low => std::option::Option::Some(1),
24146                Self::High => std::option::Option::Some(2),
24147                Self::UnknownValue(u) => u.0.value(),
24148            }
24149        }
24150
24151        /// Gets the enum value as a string.
24152        ///
24153        /// Returns `None` if the enum contains an unknown value deserialized from
24154        /// the integer representation of enums.
24155        pub fn name(&self) -> std::option::Option<&str> {
24156            match self {
24157                Self::Unspecified => std::option::Option::Some("ATTACK_COMPLEXITY_UNSPECIFIED"),
24158                Self::Low => std::option::Option::Some("ATTACK_COMPLEXITY_LOW"),
24159                Self::High => std::option::Option::Some("ATTACK_COMPLEXITY_HIGH"),
24160                Self::UnknownValue(u) => u.0.name(),
24161            }
24162        }
24163    }
24164
24165    impl std::default::Default for AttackComplexity {
24166        fn default() -> Self {
24167            use std::convert::From;
24168            Self::from(0)
24169        }
24170    }
24171
24172    impl std::fmt::Display for AttackComplexity {
24173        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24174            wkt::internal::display_enum(f, self.name(), self.value())
24175        }
24176    }
24177
24178    impl std::convert::From<i32> for AttackComplexity {
24179        fn from(value: i32) -> Self {
24180            match value {
24181                0 => Self::Unspecified,
24182                1 => Self::Low,
24183                2 => Self::High,
24184                _ => Self::UnknownValue(attack_complexity::UnknownValue(
24185                    wkt::internal::UnknownEnumValue::Integer(value),
24186                )),
24187            }
24188        }
24189    }
24190
24191    impl std::convert::From<&str> for AttackComplexity {
24192        fn from(value: &str) -> Self {
24193            use std::string::ToString;
24194            match value {
24195                "ATTACK_COMPLEXITY_UNSPECIFIED" => Self::Unspecified,
24196                "ATTACK_COMPLEXITY_LOW" => Self::Low,
24197                "ATTACK_COMPLEXITY_HIGH" => Self::High,
24198                _ => Self::UnknownValue(attack_complexity::UnknownValue(
24199                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24200                )),
24201            }
24202        }
24203    }
24204
24205    impl serde::ser::Serialize for AttackComplexity {
24206        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24207        where
24208            S: serde::Serializer,
24209        {
24210            match self {
24211                Self::Unspecified => serializer.serialize_i32(0),
24212                Self::Low => serializer.serialize_i32(1),
24213                Self::High => serializer.serialize_i32(2),
24214                Self::UnknownValue(u) => u.0.serialize(serializer),
24215            }
24216        }
24217    }
24218
24219    impl<'de> serde::de::Deserialize<'de> for AttackComplexity {
24220        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24221        where
24222            D: serde::Deserializer<'de>,
24223        {
24224            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AttackComplexity>::new(
24225                ".google.cloud.securitycenter.v2.Cvssv3.AttackComplexity",
24226            ))
24227        }
24228    }
24229
24230    /// This metric describes the level of privileges an attacker must possess
24231    /// before successfully exploiting the vulnerability.
24232    ///
24233    /// # Working with unknown values
24234    ///
24235    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24236    /// additional enum variants at any time. Adding new variants is not considered
24237    /// a breaking change. Applications should write their code in anticipation of:
24238    ///
24239    /// - New values appearing in future releases of the client library, **and**
24240    /// - New values received dynamically, without application changes.
24241    ///
24242    /// Please consult the [Working with enums] section in the user guide for some
24243    /// guidelines.
24244    ///
24245    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24246    #[derive(Clone, Debug, PartialEq)]
24247    #[non_exhaustive]
24248    pub enum PrivilegesRequired {
24249        /// Invalid value.
24250        Unspecified,
24251        /// The attacker is unauthorized prior to attack, and therefore does not
24252        /// require any access to settings or files of the vulnerable system to
24253        /// carry out an attack.
24254        None,
24255        /// The attacker requires privileges that provide basic user capabilities
24256        /// that could normally affect only settings and files owned by a user.
24257        /// Alternatively, an attacker with Low privileges has the ability to access
24258        /// only non-sensitive resources.
24259        Low,
24260        /// The attacker requires privileges that provide significant (e.g.,
24261        /// administrative) control over the vulnerable component allowing access to
24262        /// component-wide settings and files.
24263        High,
24264        /// If set, the enum was initialized with an unknown value.
24265        ///
24266        /// Applications can examine the value using [PrivilegesRequired::value] or
24267        /// [PrivilegesRequired::name].
24268        UnknownValue(privileges_required::UnknownValue),
24269    }
24270
24271    #[doc(hidden)]
24272    pub mod privileges_required {
24273        #[allow(unused_imports)]
24274        use super::*;
24275        #[derive(Clone, Debug, PartialEq)]
24276        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24277    }
24278
24279    impl PrivilegesRequired {
24280        /// Gets the enum value.
24281        ///
24282        /// Returns `None` if the enum contains an unknown value deserialized from
24283        /// the string representation of enums.
24284        pub fn value(&self) -> std::option::Option<i32> {
24285            match self {
24286                Self::Unspecified => std::option::Option::Some(0),
24287                Self::None => std::option::Option::Some(1),
24288                Self::Low => std::option::Option::Some(2),
24289                Self::High => std::option::Option::Some(3),
24290                Self::UnknownValue(u) => u.0.value(),
24291            }
24292        }
24293
24294        /// Gets the enum value as a string.
24295        ///
24296        /// Returns `None` if the enum contains an unknown value deserialized from
24297        /// the integer representation of enums.
24298        pub fn name(&self) -> std::option::Option<&str> {
24299            match self {
24300                Self::Unspecified => std::option::Option::Some("PRIVILEGES_REQUIRED_UNSPECIFIED"),
24301                Self::None => std::option::Option::Some("PRIVILEGES_REQUIRED_NONE"),
24302                Self::Low => std::option::Option::Some("PRIVILEGES_REQUIRED_LOW"),
24303                Self::High => std::option::Option::Some("PRIVILEGES_REQUIRED_HIGH"),
24304                Self::UnknownValue(u) => u.0.name(),
24305            }
24306        }
24307    }
24308
24309    impl std::default::Default for PrivilegesRequired {
24310        fn default() -> Self {
24311            use std::convert::From;
24312            Self::from(0)
24313        }
24314    }
24315
24316    impl std::fmt::Display for PrivilegesRequired {
24317        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24318            wkt::internal::display_enum(f, self.name(), self.value())
24319        }
24320    }
24321
24322    impl std::convert::From<i32> for PrivilegesRequired {
24323        fn from(value: i32) -> Self {
24324            match value {
24325                0 => Self::Unspecified,
24326                1 => Self::None,
24327                2 => Self::Low,
24328                3 => Self::High,
24329                _ => Self::UnknownValue(privileges_required::UnknownValue(
24330                    wkt::internal::UnknownEnumValue::Integer(value),
24331                )),
24332            }
24333        }
24334    }
24335
24336    impl std::convert::From<&str> for PrivilegesRequired {
24337        fn from(value: &str) -> Self {
24338            use std::string::ToString;
24339            match value {
24340                "PRIVILEGES_REQUIRED_UNSPECIFIED" => Self::Unspecified,
24341                "PRIVILEGES_REQUIRED_NONE" => Self::None,
24342                "PRIVILEGES_REQUIRED_LOW" => Self::Low,
24343                "PRIVILEGES_REQUIRED_HIGH" => Self::High,
24344                _ => Self::UnknownValue(privileges_required::UnknownValue(
24345                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24346                )),
24347            }
24348        }
24349    }
24350
24351    impl serde::ser::Serialize for PrivilegesRequired {
24352        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24353        where
24354            S: serde::Serializer,
24355        {
24356            match self {
24357                Self::Unspecified => serializer.serialize_i32(0),
24358                Self::None => serializer.serialize_i32(1),
24359                Self::Low => serializer.serialize_i32(2),
24360                Self::High => serializer.serialize_i32(3),
24361                Self::UnknownValue(u) => u.0.serialize(serializer),
24362            }
24363        }
24364    }
24365
24366    impl<'de> serde::de::Deserialize<'de> for PrivilegesRequired {
24367        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24368        where
24369            D: serde::Deserializer<'de>,
24370        {
24371            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PrivilegesRequired>::new(
24372                ".google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired",
24373            ))
24374        }
24375    }
24376
24377    /// This metric captures the requirement for a human user, other than the
24378    /// attacker, to participate in the successful compromise of the vulnerable
24379    /// component.
24380    ///
24381    /// # Working with unknown values
24382    ///
24383    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24384    /// additional enum variants at any time. Adding new variants is not considered
24385    /// a breaking change. Applications should write their code in anticipation of:
24386    ///
24387    /// - New values appearing in future releases of the client library, **and**
24388    /// - New values received dynamically, without application changes.
24389    ///
24390    /// Please consult the [Working with enums] section in the user guide for some
24391    /// guidelines.
24392    ///
24393    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24394    #[derive(Clone, Debug, PartialEq)]
24395    #[non_exhaustive]
24396    pub enum UserInteraction {
24397        /// Invalid value.
24398        Unspecified,
24399        /// The vulnerable system can be exploited without interaction from any user.
24400        None,
24401        /// Successful exploitation of this vulnerability requires a user to take
24402        /// some action before the vulnerability can be exploited.
24403        Required,
24404        /// If set, the enum was initialized with an unknown value.
24405        ///
24406        /// Applications can examine the value using [UserInteraction::value] or
24407        /// [UserInteraction::name].
24408        UnknownValue(user_interaction::UnknownValue),
24409    }
24410
24411    #[doc(hidden)]
24412    pub mod user_interaction {
24413        #[allow(unused_imports)]
24414        use super::*;
24415        #[derive(Clone, Debug, PartialEq)]
24416        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24417    }
24418
24419    impl UserInteraction {
24420        /// Gets the enum value.
24421        ///
24422        /// Returns `None` if the enum contains an unknown value deserialized from
24423        /// the string representation of enums.
24424        pub fn value(&self) -> std::option::Option<i32> {
24425            match self {
24426                Self::Unspecified => std::option::Option::Some(0),
24427                Self::None => std::option::Option::Some(1),
24428                Self::Required => std::option::Option::Some(2),
24429                Self::UnknownValue(u) => u.0.value(),
24430            }
24431        }
24432
24433        /// Gets the enum value as a string.
24434        ///
24435        /// Returns `None` if the enum contains an unknown value deserialized from
24436        /// the integer representation of enums.
24437        pub fn name(&self) -> std::option::Option<&str> {
24438            match self {
24439                Self::Unspecified => std::option::Option::Some("USER_INTERACTION_UNSPECIFIED"),
24440                Self::None => std::option::Option::Some("USER_INTERACTION_NONE"),
24441                Self::Required => std::option::Option::Some("USER_INTERACTION_REQUIRED"),
24442                Self::UnknownValue(u) => u.0.name(),
24443            }
24444        }
24445    }
24446
24447    impl std::default::Default for UserInteraction {
24448        fn default() -> Self {
24449            use std::convert::From;
24450            Self::from(0)
24451        }
24452    }
24453
24454    impl std::fmt::Display for UserInteraction {
24455        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24456            wkt::internal::display_enum(f, self.name(), self.value())
24457        }
24458    }
24459
24460    impl std::convert::From<i32> for UserInteraction {
24461        fn from(value: i32) -> Self {
24462            match value {
24463                0 => Self::Unspecified,
24464                1 => Self::None,
24465                2 => Self::Required,
24466                _ => Self::UnknownValue(user_interaction::UnknownValue(
24467                    wkt::internal::UnknownEnumValue::Integer(value),
24468                )),
24469            }
24470        }
24471    }
24472
24473    impl std::convert::From<&str> for UserInteraction {
24474        fn from(value: &str) -> Self {
24475            use std::string::ToString;
24476            match value {
24477                "USER_INTERACTION_UNSPECIFIED" => Self::Unspecified,
24478                "USER_INTERACTION_NONE" => Self::None,
24479                "USER_INTERACTION_REQUIRED" => Self::Required,
24480                _ => Self::UnknownValue(user_interaction::UnknownValue(
24481                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24482                )),
24483            }
24484        }
24485    }
24486
24487    impl serde::ser::Serialize for UserInteraction {
24488        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24489        where
24490            S: serde::Serializer,
24491        {
24492            match self {
24493                Self::Unspecified => serializer.serialize_i32(0),
24494                Self::None => serializer.serialize_i32(1),
24495                Self::Required => serializer.serialize_i32(2),
24496                Self::UnknownValue(u) => u.0.serialize(serializer),
24497            }
24498        }
24499    }
24500
24501    impl<'de> serde::de::Deserialize<'de> for UserInteraction {
24502        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24503        where
24504            D: serde::Deserializer<'de>,
24505        {
24506            deserializer.deserialize_any(wkt::internal::EnumVisitor::<UserInteraction>::new(
24507                ".google.cloud.securitycenter.v2.Cvssv3.UserInteraction",
24508            ))
24509        }
24510    }
24511
24512    /// The Scope metric captures whether a vulnerability in one vulnerable
24513    /// component impacts resources in components beyond its security scope.
24514    ///
24515    /// # Working with unknown values
24516    ///
24517    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24518    /// additional enum variants at any time. Adding new variants is not considered
24519    /// a breaking change. Applications should write their code in anticipation of:
24520    ///
24521    /// - New values appearing in future releases of the client library, **and**
24522    /// - New values received dynamically, without application changes.
24523    ///
24524    /// Please consult the [Working with enums] section in the user guide for some
24525    /// guidelines.
24526    ///
24527    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24528    #[derive(Clone, Debug, PartialEq)]
24529    #[non_exhaustive]
24530    pub enum Scope {
24531        /// Invalid value.
24532        Unspecified,
24533        /// An exploited vulnerability can only affect resources managed by the same
24534        /// security authority.
24535        Unchanged,
24536        /// An exploited vulnerability can affect resources beyond the security scope
24537        /// managed by the security authority of the vulnerable component.
24538        Changed,
24539        /// If set, the enum was initialized with an unknown value.
24540        ///
24541        /// Applications can examine the value using [Scope::value] or
24542        /// [Scope::name].
24543        UnknownValue(scope::UnknownValue),
24544    }
24545
24546    #[doc(hidden)]
24547    pub mod scope {
24548        #[allow(unused_imports)]
24549        use super::*;
24550        #[derive(Clone, Debug, PartialEq)]
24551        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24552    }
24553
24554    impl Scope {
24555        /// Gets the enum value.
24556        ///
24557        /// Returns `None` if the enum contains an unknown value deserialized from
24558        /// the string representation of enums.
24559        pub fn value(&self) -> std::option::Option<i32> {
24560            match self {
24561                Self::Unspecified => std::option::Option::Some(0),
24562                Self::Unchanged => std::option::Option::Some(1),
24563                Self::Changed => std::option::Option::Some(2),
24564                Self::UnknownValue(u) => u.0.value(),
24565            }
24566        }
24567
24568        /// Gets the enum value as a string.
24569        ///
24570        /// Returns `None` if the enum contains an unknown value deserialized from
24571        /// the integer representation of enums.
24572        pub fn name(&self) -> std::option::Option<&str> {
24573            match self {
24574                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
24575                Self::Unchanged => std::option::Option::Some("SCOPE_UNCHANGED"),
24576                Self::Changed => std::option::Option::Some("SCOPE_CHANGED"),
24577                Self::UnknownValue(u) => u.0.name(),
24578            }
24579        }
24580    }
24581
24582    impl std::default::Default for Scope {
24583        fn default() -> Self {
24584            use std::convert::From;
24585            Self::from(0)
24586        }
24587    }
24588
24589    impl std::fmt::Display for Scope {
24590        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24591            wkt::internal::display_enum(f, self.name(), self.value())
24592        }
24593    }
24594
24595    impl std::convert::From<i32> for Scope {
24596        fn from(value: i32) -> Self {
24597            match value {
24598                0 => Self::Unspecified,
24599                1 => Self::Unchanged,
24600                2 => Self::Changed,
24601                _ => Self::UnknownValue(scope::UnknownValue(
24602                    wkt::internal::UnknownEnumValue::Integer(value),
24603                )),
24604            }
24605        }
24606    }
24607
24608    impl std::convert::From<&str> for Scope {
24609        fn from(value: &str) -> Self {
24610            use std::string::ToString;
24611            match value {
24612                "SCOPE_UNSPECIFIED" => Self::Unspecified,
24613                "SCOPE_UNCHANGED" => Self::Unchanged,
24614                "SCOPE_CHANGED" => Self::Changed,
24615                _ => Self::UnknownValue(scope::UnknownValue(
24616                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24617                )),
24618            }
24619        }
24620    }
24621
24622    impl serde::ser::Serialize for Scope {
24623        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24624        where
24625            S: serde::Serializer,
24626        {
24627            match self {
24628                Self::Unspecified => serializer.serialize_i32(0),
24629                Self::Unchanged => serializer.serialize_i32(1),
24630                Self::Changed => serializer.serialize_i32(2),
24631                Self::UnknownValue(u) => u.0.serialize(serializer),
24632            }
24633        }
24634    }
24635
24636    impl<'de> serde::de::Deserialize<'de> for Scope {
24637        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24638        where
24639            D: serde::Deserializer<'de>,
24640        {
24641            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
24642                ".google.cloud.securitycenter.v2.Cvssv3.Scope",
24643            ))
24644        }
24645    }
24646
24647    /// The Impact metrics capture the effects of a successfully exploited
24648    /// vulnerability on the component that suffers the worst outcome that is most
24649    /// directly and predictably associated with the attack.
24650    ///
24651    /// # Working with unknown values
24652    ///
24653    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24654    /// additional enum variants at any time. Adding new variants is not considered
24655    /// a breaking change. Applications should write their code in anticipation of:
24656    ///
24657    /// - New values appearing in future releases of the client library, **and**
24658    /// - New values received dynamically, without application changes.
24659    ///
24660    /// Please consult the [Working with enums] section in the user guide for some
24661    /// guidelines.
24662    ///
24663    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
24664    #[derive(Clone, Debug, PartialEq)]
24665    #[non_exhaustive]
24666    pub enum Impact {
24667        /// Invalid value.
24668        Unspecified,
24669        /// High impact.
24670        High,
24671        /// Low impact.
24672        Low,
24673        /// No impact.
24674        None,
24675        /// If set, the enum was initialized with an unknown value.
24676        ///
24677        /// Applications can examine the value using [Impact::value] or
24678        /// [Impact::name].
24679        UnknownValue(impact::UnknownValue),
24680    }
24681
24682    #[doc(hidden)]
24683    pub mod impact {
24684        #[allow(unused_imports)]
24685        use super::*;
24686        #[derive(Clone, Debug, PartialEq)]
24687        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24688    }
24689
24690    impl Impact {
24691        /// Gets the enum value.
24692        ///
24693        /// Returns `None` if the enum contains an unknown value deserialized from
24694        /// the string representation of enums.
24695        pub fn value(&self) -> std::option::Option<i32> {
24696            match self {
24697                Self::Unspecified => std::option::Option::Some(0),
24698                Self::High => std::option::Option::Some(1),
24699                Self::Low => std::option::Option::Some(2),
24700                Self::None => std::option::Option::Some(3),
24701                Self::UnknownValue(u) => u.0.value(),
24702            }
24703        }
24704
24705        /// Gets the enum value as a string.
24706        ///
24707        /// Returns `None` if the enum contains an unknown value deserialized from
24708        /// the integer representation of enums.
24709        pub fn name(&self) -> std::option::Option<&str> {
24710            match self {
24711                Self::Unspecified => std::option::Option::Some("IMPACT_UNSPECIFIED"),
24712                Self::High => std::option::Option::Some("IMPACT_HIGH"),
24713                Self::Low => std::option::Option::Some("IMPACT_LOW"),
24714                Self::None => std::option::Option::Some("IMPACT_NONE"),
24715                Self::UnknownValue(u) => u.0.name(),
24716            }
24717        }
24718    }
24719
24720    impl std::default::Default for Impact {
24721        fn default() -> Self {
24722            use std::convert::From;
24723            Self::from(0)
24724        }
24725    }
24726
24727    impl std::fmt::Display for Impact {
24728        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24729            wkt::internal::display_enum(f, self.name(), self.value())
24730        }
24731    }
24732
24733    impl std::convert::From<i32> for Impact {
24734        fn from(value: i32) -> Self {
24735            match value {
24736                0 => Self::Unspecified,
24737                1 => Self::High,
24738                2 => Self::Low,
24739                3 => Self::None,
24740                _ => Self::UnknownValue(impact::UnknownValue(
24741                    wkt::internal::UnknownEnumValue::Integer(value),
24742                )),
24743            }
24744        }
24745    }
24746
24747    impl std::convert::From<&str> for Impact {
24748        fn from(value: &str) -> Self {
24749            use std::string::ToString;
24750            match value {
24751                "IMPACT_UNSPECIFIED" => Self::Unspecified,
24752                "IMPACT_HIGH" => Self::High,
24753                "IMPACT_LOW" => Self::Low,
24754                "IMPACT_NONE" => Self::None,
24755                _ => Self::UnknownValue(impact::UnknownValue(
24756                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24757                )),
24758            }
24759        }
24760    }
24761
24762    impl serde::ser::Serialize for Impact {
24763        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24764        where
24765            S: serde::Serializer,
24766        {
24767            match self {
24768                Self::Unspecified => serializer.serialize_i32(0),
24769                Self::High => serializer.serialize_i32(1),
24770                Self::Low => serializer.serialize_i32(2),
24771                Self::None => serializer.serialize_i32(3),
24772                Self::UnknownValue(u) => u.0.serialize(serializer),
24773            }
24774        }
24775    }
24776
24777    impl<'de> serde::de::Deserialize<'de> for Impact {
24778        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24779        where
24780            D: serde::Deserializer<'de>,
24781        {
24782            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Impact>::new(
24783                ".google.cloud.securitycenter.v2.Cvssv3.Impact",
24784            ))
24785        }
24786    }
24787}
24788
24789/// Package is a generic definition of a package.
24790#[derive(Clone, Default, PartialEq)]
24791#[non_exhaustive]
24792pub struct Package {
24793    /// The name of the package where the vulnerability was detected.
24794    pub package_name: std::string::String,
24795
24796    /// The CPE URI where the vulnerability was detected.
24797    pub cpe_uri: std::string::String,
24798
24799    /// Type of package, for example, os, maven, or go.
24800    pub package_type: std::string::String,
24801
24802    /// The version of the package.
24803    pub package_version: std::string::String,
24804
24805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24806}
24807
24808impl Package {
24809    /// Creates a new default instance.
24810    pub fn new() -> Self {
24811        std::default::Default::default()
24812    }
24813
24814    /// Sets the value of [package_name][crate::model::Package::package_name].
24815    ///
24816    /// # Example
24817    /// ```ignore,no_run
24818    /// # use google_cloud_securitycenter_v2::model::Package;
24819    /// let x = Package::new().set_package_name("example");
24820    /// ```
24821    pub fn set_package_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24822        self.package_name = v.into();
24823        self
24824    }
24825
24826    /// Sets the value of [cpe_uri][crate::model::Package::cpe_uri].
24827    ///
24828    /// # Example
24829    /// ```ignore,no_run
24830    /// # use google_cloud_securitycenter_v2::model::Package;
24831    /// let x = Package::new().set_cpe_uri("example");
24832    /// ```
24833    pub fn set_cpe_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24834        self.cpe_uri = v.into();
24835        self
24836    }
24837
24838    /// Sets the value of [package_type][crate::model::Package::package_type].
24839    ///
24840    /// # Example
24841    /// ```ignore,no_run
24842    /// # use google_cloud_securitycenter_v2::model::Package;
24843    /// let x = Package::new().set_package_type("example");
24844    /// ```
24845    pub fn set_package_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24846        self.package_type = v.into();
24847        self
24848    }
24849
24850    /// Sets the value of [package_version][crate::model::Package::package_version].
24851    ///
24852    /// # Example
24853    /// ```ignore,no_run
24854    /// # use google_cloud_securitycenter_v2::model::Package;
24855    /// let x = Package::new().set_package_version("example");
24856    /// ```
24857    pub fn set_package_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24858        self.package_version = v.into();
24859        self
24860    }
24861}
24862
24863impl wkt::message::Message for Package {
24864    fn typename() -> &'static str {
24865        "type.googleapis.com/google.cloud.securitycenter.v2.Package"
24866    }
24867}
24868
24869/// SecurityBulletin are notifications of vulnerabilities of Google products.
24870#[derive(Clone, Default, PartialEq)]
24871#[non_exhaustive]
24872pub struct SecurityBulletin {
24873    /// ID of the bulletin corresponding to the vulnerability.
24874    pub bulletin_id: std::string::String,
24875
24876    /// Submission time of this Security Bulletin.
24877    pub submission_time: std::option::Option<wkt::Timestamp>,
24878
24879    /// This represents a version that the cluster receiving this notification
24880    /// should be upgraded to, based on its current version. For example, 1.15.0
24881    pub suggested_upgrade_version: std::string::String,
24882
24883    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24884}
24885
24886impl SecurityBulletin {
24887    /// Creates a new default instance.
24888    pub fn new() -> Self {
24889        std::default::Default::default()
24890    }
24891
24892    /// Sets the value of [bulletin_id][crate::model::SecurityBulletin::bulletin_id].
24893    ///
24894    /// # Example
24895    /// ```ignore,no_run
24896    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24897    /// let x = SecurityBulletin::new().set_bulletin_id("example");
24898    /// ```
24899    pub fn set_bulletin_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24900        self.bulletin_id = v.into();
24901        self
24902    }
24903
24904    /// Sets the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24905    ///
24906    /// # Example
24907    /// ```ignore,no_run
24908    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24909    /// use wkt::Timestamp;
24910    /// let x = SecurityBulletin::new().set_submission_time(Timestamp::default()/* use setters */);
24911    /// ```
24912    pub fn set_submission_time<T>(mut self, v: T) -> Self
24913    where
24914        T: std::convert::Into<wkt::Timestamp>,
24915    {
24916        self.submission_time = std::option::Option::Some(v.into());
24917        self
24918    }
24919
24920    /// Sets or clears the value of [submission_time][crate::model::SecurityBulletin::submission_time].
24921    ///
24922    /// # Example
24923    /// ```ignore,no_run
24924    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24925    /// use wkt::Timestamp;
24926    /// let x = SecurityBulletin::new().set_or_clear_submission_time(Some(Timestamp::default()/* use setters */));
24927    /// let x = SecurityBulletin::new().set_or_clear_submission_time(None::<Timestamp>);
24928    /// ```
24929    pub fn set_or_clear_submission_time<T>(mut self, v: std::option::Option<T>) -> Self
24930    where
24931        T: std::convert::Into<wkt::Timestamp>,
24932    {
24933        self.submission_time = v.map(|x| x.into());
24934        self
24935    }
24936
24937    /// Sets the value of [suggested_upgrade_version][crate::model::SecurityBulletin::suggested_upgrade_version].
24938    ///
24939    /// # Example
24940    /// ```ignore,no_run
24941    /// # use google_cloud_securitycenter_v2::model::SecurityBulletin;
24942    /// let x = SecurityBulletin::new().set_suggested_upgrade_version("example");
24943    /// ```
24944    pub fn set_suggested_upgrade_version<T: std::convert::Into<std::string::String>>(
24945        mut self,
24946        v: T,
24947    ) -> Self {
24948        self.suggested_upgrade_version = v.into();
24949        self
24950    }
24951}
24952
24953impl wkt::message::Message for SecurityBulletin {
24954    fn typename() -> &'static str {
24955        "type.googleapis.com/google.cloud.securitycenter.v2.SecurityBulletin"
24956    }
24957}
24958
24959/// CWE stands for Common Weakness Enumeration. Information about this weakness,
24960/// as described by [CWE](https://cwe.mitre.org/).
24961#[derive(Clone, Default, PartialEq)]
24962#[non_exhaustive]
24963pub struct Cwe {
24964    /// The CWE identifier, e.g. CWE-94
24965    pub id: std::string::String,
24966
24967    /// Any reference to the details on the CWE, for example,
24968    /// <https://cwe.mitre.org/data/definitions/94.html>
24969    pub references: std::vec::Vec<crate::model::Reference>,
24970
24971    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24972}
24973
24974impl Cwe {
24975    /// Creates a new default instance.
24976    pub fn new() -> Self {
24977        std::default::Default::default()
24978    }
24979
24980    /// Sets the value of [id][crate::model::Cwe::id].
24981    ///
24982    /// # Example
24983    /// ```ignore,no_run
24984    /// # use google_cloud_securitycenter_v2::model::Cwe;
24985    /// let x = Cwe::new().set_id("example");
24986    /// ```
24987    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24988        self.id = v.into();
24989        self
24990    }
24991
24992    /// Sets the value of [references][crate::model::Cwe::references].
24993    ///
24994    /// # Example
24995    /// ```ignore,no_run
24996    /// # use google_cloud_securitycenter_v2::model::Cwe;
24997    /// use google_cloud_securitycenter_v2::model::Reference;
24998    /// let x = Cwe::new()
24999    ///     .set_references([
25000    ///         Reference::default()/* use setters */,
25001    ///         Reference::default()/* use (different) setters */,
25002    ///     ]);
25003    /// ```
25004    pub fn set_references<T, V>(mut self, v: T) -> Self
25005    where
25006        T: std::iter::IntoIterator<Item = V>,
25007        V: std::convert::Into<crate::model::Reference>,
25008    {
25009        use std::iter::Iterator;
25010        self.references = v.into_iter().map(|i| i.into()).collect();
25011        self
25012    }
25013}
25014
25015impl wkt::message::Message for Cwe {
25016    fn typename() -> &'static str {
25017        "type.googleapis.com/google.cloud.securitycenter.v2.Cwe"
25018    }
25019}
25020
25021/// JobState represents the state of the job.
25022///
25023/// # Working with unknown values
25024///
25025/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25026/// additional enum variants at any time. Adding new variants is not considered
25027/// a breaking change. Applications should write their code in anticipation of:
25028///
25029/// - New values appearing in future releases of the client library, **and**
25030/// - New values received dynamically, without application changes.
25031///
25032/// Please consult the [Working with enums] section in the user guide for some
25033/// guidelines.
25034///
25035/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
25036#[derive(Clone, Debug, PartialEq)]
25037#[non_exhaustive]
25038pub enum JobState {
25039    /// Unspecified represents an unknown state and should not be used.
25040    Unspecified,
25041    /// Job is scheduled and pending for run
25042    Pending,
25043    /// Job in progress
25044    Running,
25045    /// Job has completed with success
25046    Succeeded,
25047    /// Job has completed but with failure
25048    Failed,
25049    /// If set, the enum was initialized with an unknown value.
25050    ///
25051    /// Applications can examine the value using [JobState::value] or
25052    /// [JobState::name].
25053    UnknownValue(job_state::UnknownValue),
25054}
25055
25056#[doc(hidden)]
25057pub mod job_state {
25058    #[allow(unused_imports)]
25059    use super::*;
25060    #[derive(Clone, Debug, PartialEq)]
25061    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25062}
25063
25064impl JobState {
25065    /// Gets the enum value.
25066    ///
25067    /// Returns `None` if the enum contains an unknown value deserialized from
25068    /// the string representation of enums.
25069    pub fn value(&self) -> std::option::Option<i32> {
25070        match self {
25071            Self::Unspecified => std::option::Option::Some(0),
25072            Self::Pending => std::option::Option::Some(1),
25073            Self::Running => std::option::Option::Some(2),
25074            Self::Succeeded => std::option::Option::Some(3),
25075            Self::Failed => std::option::Option::Some(4),
25076            Self::UnknownValue(u) => u.0.value(),
25077        }
25078    }
25079
25080    /// Gets the enum value as a string.
25081    ///
25082    /// Returns `None` if the enum contains an unknown value deserialized from
25083    /// the integer representation of enums.
25084    pub fn name(&self) -> std::option::Option<&str> {
25085        match self {
25086            Self::Unspecified => std::option::Option::Some("JOB_STATE_UNSPECIFIED"),
25087            Self::Pending => std::option::Option::Some("PENDING"),
25088            Self::Running => std::option::Option::Some("RUNNING"),
25089            Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
25090            Self::Failed => std::option::Option::Some("FAILED"),
25091            Self::UnknownValue(u) => u.0.name(),
25092        }
25093    }
25094}
25095
25096impl std::default::Default for JobState {
25097    fn default() -> Self {
25098        use std::convert::From;
25099        Self::from(0)
25100    }
25101}
25102
25103impl std::fmt::Display for JobState {
25104    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25105        wkt::internal::display_enum(f, self.name(), self.value())
25106    }
25107}
25108
25109impl std::convert::From<i32> for JobState {
25110    fn from(value: i32) -> Self {
25111        match value {
25112            0 => Self::Unspecified,
25113            1 => Self::Pending,
25114            2 => Self::Running,
25115            3 => Self::Succeeded,
25116            4 => Self::Failed,
25117            _ => Self::UnknownValue(job_state::UnknownValue(
25118                wkt::internal::UnknownEnumValue::Integer(value),
25119            )),
25120        }
25121    }
25122}
25123
25124impl std::convert::From<&str> for JobState {
25125    fn from(value: &str) -> Self {
25126        use std::string::ToString;
25127        match value {
25128            "JOB_STATE_UNSPECIFIED" => Self::Unspecified,
25129            "PENDING" => Self::Pending,
25130            "RUNNING" => Self::Running,
25131            "SUCCEEDED" => Self::Succeeded,
25132            "FAILED" => Self::Failed,
25133            _ => Self::UnknownValue(job_state::UnknownValue(
25134                wkt::internal::UnknownEnumValue::String(value.to_string()),
25135            )),
25136        }
25137    }
25138}
25139
25140impl serde::ser::Serialize for JobState {
25141    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25142    where
25143        S: serde::Serializer,
25144    {
25145        match self {
25146            Self::Unspecified => serializer.serialize_i32(0),
25147            Self::Pending => serializer.serialize_i32(1),
25148            Self::Running => serializer.serialize_i32(2),
25149            Self::Succeeded => serializer.serialize_i32(3),
25150            Self::Failed => serializer.serialize_i32(4),
25151            Self::UnknownValue(u) => u.0.serialize(serializer),
25152        }
25153    }
25154}
25155
25156impl<'de> serde::de::Deserialize<'de> for JobState {
25157    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25158    where
25159        D: serde::Deserializer<'de>,
25160    {
25161        deserializer.deserialize_any(wkt::internal::EnumVisitor::<JobState>::new(
25162            ".google.cloud.securitycenter.v2.JobState",
25163        ))
25164    }
25165}
25166
25167/// The cloud provider the finding pertains to.
25168///
25169/// # Working with unknown values
25170///
25171/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25172/// additional enum variants at any time. Adding new variants is not considered
25173/// a breaking change. Applications should write their code in anticipation of:
25174///
25175/// - New values appearing in future releases of the client library, **and**
25176/// - New values received dynamically, without application changes.
25177///
25178/// Please consult the [Working with enums] section in the user guide for some
25179/// guidelines.
25180///
25181/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
25182#[derive(Clone, Debug, PartialEq)]
25183#[non_exhaustive]
25184pub enum CloudProvider {
25185    /// The cloud provider is unspecified.
25186    Unspecified,
25187    /// The cloud provider is Google Cloud.
25188    GoogleCloudPlatform,
25189    /// The cloud provider is Amazon Web Services.
25190    AmazonWebServices,
25191    /// The cloud provider is Microsoft Azure.
25192    MicrosoftAzure,
25193    /// If set, the enum was initialized with an unknown value.
25194    ///
25195    /// Applications can examine the value using [CloudProvider::value] or
25196    /// [CloudProvider::name].
25197    UnknownValue(cloud_provider::UnknownValue),
25198}
25199
25200#[doc(hidden)]
25201pub mod cloud_provider {
25202    #[allow(unused_imports)]
25203    use super::*;
25204    #[derive(Clone, Debug, PartialEq)]
25205    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25206}
25207
25208impl CloudProvider {
25209    /// Gets the enum value.
25210    ///
25211    /// Returns `None` if the enum contains an unknown value deserialized from
25212    /// the string representation of enums.
25213    pub fn value(&self) -> std::option::Option<i32> {
25214        match self {
25215            Self::Unspecified => std::option::Option::Some(0),
25216            Self::GoogleCloudPlatform => std::option::Option::Some(1),
25217            Self::AmazonWebServices => std::option::Option::Some(2),
25218            Self::MicrosoftAzure => std::option::Option::Some(3),
25219            Self::UnknownValue(u) => u.0.value(),
25220        }
25221    }
25222
25223    /// Gets the enum value as a string.
25224    ///
25225    /// Returns `None` if the enum contains an unknown value deserialized from
25226    /// the integer representation of enums.
25227    pub fn name(&self) -> std::option::Option<&str> {
25228        match self {
25229            Self::Unspecified => std::option::Option::Some("CLOUD_PROVIDER_UNSPECIFIED"),
25230            Self::GoogleCloudPlatform => std::option::Option::Some("GOOGLE_CLOUD_PLATFORM"),
25231            Self::AmazonWebServices => std::option::Option::Some("AMAZON_WEB_SERVICES"),
25232            Self::MicrosoftAzure => std::option::Option::Some("MICROSOFT_AZURE"),
25233            Self::UnknownValue(u) => u.0.name(),
25234        }
25235    }
25236}
25237
25238impl std::default::Default for CloudProvider {
25239    fn default() -> Self {
25240        use std::convert::From;
25241        Self::from(0)
25242    }
25243}
25244
25245impl std::fmt::Display for CloudProvider {
25246    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25247        wkt::internal::display_enum(f, self.name(), self.value())
25248    }
25249}
25250
25251impl std::convert::From<i32> for CloudProvider {
25252    fn from(value: i32) -> Self {
25253        match value {
25254            0 => Self::Unspecified,
25255            1 => Self::GoogleCloudPlatform,
25256            2 => Self::AmazonWebServices,
25257            3 => Self::MicrosoftAzure,
25258            _ => Self::UnknownValue(cloud_provider::UnknownValue(
25259                wkt::internal::UnknownEnumValue::Integer(value),
25260            )),
25261        }
25262    }
25263}
25264
25265impl std::convert::From<&str> for CloudProvider {
25266    fn from(value: &str) -> Self {
25267        use std::string::ToString;
25268        match value {
25269            "CLOUD_PROVIDER_UNSPECIFIED" => Self::Unspecified,
25270            "GOOGLE_CLOUD_PLATFORM" => Self::GoogleCloudPlatform,
25271            "AMAZON_WEB_SERVICES" => Self::AmazonWebServices,
25272            "MICROSOFT_AZURE" => Self::MicrosoftAzure,
25273            _ => Self::UnknownValue(cloud_provider::UnknownValue(
25274                wkt::internal::UnknownEnumValue::String(value.to_string()),
25275            )),
25276        }
25277    }
25278}
25279
25280impl serde::ser::Serialize for CloudProvider {
25281    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25282    where
25283        S: serde::Serializer,
25284    {
25285        match self {
25286            Self::Unspecified => serializer.serialize_i32(0),
25287            Self::GoogleCloudPlatform => serializer.serialize_i32(1),
25288            Self::AmazonWebServices => serializer.serialize_i32(2),
25289            Self::MicrosoftAzure => serializer.serialize_i32(3),
25290            Self::UnknownValue(u) => u.0.serialize(serializer),
25291        }
25292    }
25293}
25294
25295impl<'de> serde::de::Deserialize<'de> for CloudProvider {
25296    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25297    where
25298        D: serde::Deserializer<'de>,
25299    {
25300        deserializer.deserialize_any(wkt::internal::EnumVisitor::<CloudProvider>::new(
25301            ".google.cloud.securitycenter.v2.CloudProvider",
25302        ))
25303    }
25304}
25305
25306/// Value enum to map to a resource
25307///
25308/// # Working with unknown values
25309///
25310/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25311/// additional enum variants at any time. Adding new variants is not considered
25312/// a breaking change. Applications should write their code in anticipation of:
25313///
25314/// - New values appearing in future releases of the client library, **and**
25315/// - New values received dynamically, without application changes.
25316///
25317/// Please consult the [Working with enums] section in the user guide for some
25318/// guidelines.
25319///
25320/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
25321#[derive(Clone, Debug, PartialEq)]
25322#[non_exhaustive]
25323pub enum ResourceValue {
25324    /// Unspecific value
25325    Unspecified,
25326    /// High resource value
25327    High,
25328    /// Medium resource value
25329    Medium,
25330    /// Low resource value
25331    Low,
25332    /// No resource value, e.g. ignore these resources
25333    None,
25334    /// If set, the enum was initialized with an unknown value.
25335    ///
25336    /// Applications can examine the value using [ResourceValue::value] or
25337    /// [ResourceValue::name].
25338    UnknownValue(resource_value::UnknownValue),
25339}
25340
25341#[doc(hidden)]
25342pub mod resource_value {
25343    #[allow(unused_imports)]
25344    use super::*;
25345    #[derive(Clone, Debug, PartialEq)]
25346    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25347}
25348
25349impl ResourceValue {
25350    /// Gets the enum value.
25351    ///
25352    /// Returns `None` if the enum contains an unknown value deserialized from
25353    /// the string representation of enums.
25354    pub fn value(&self) -> std::option::Option<i32> {
25355        match self {
25356            Self::Unspecified => std::option::Option::Some(0),
25357            Self::High => std::option::Option::Some(1),
25358            Self::Medium => std::option::Option::Some(2),
25359            Self::Low => std::option::Option::Some(3),
25360            Self::None => std::option::Option::Some(4),
25361            Self::UnknownValue(u) => u.0.value(),
25362        }
25363    }
25364
25365    /// Gets the enum value as a string.
25366    ///
25367    /// Returns `None` if the enum contains an unknown value deserialized from
25368    /// the integer representation of enums.
25369    pub fn name(&self) -> std::option::Option<&str> {
25370        match self {
25371            Self::Unspecified => std::option::Option::Some("RESOURCE_VALUE_UNSPECIFIED"),
25372            Self::High => std::option::Option::Some("HIGH"),
25373            Self::Medium => std::option::Option::Some("MEDIUM"),
25374            Self::Low => std::option::Option::Some("LOW"),
25375            Self::None => std::option::Option::Some("NONE"),
25376            Self::UnknownValue(u) => u.0.name(),
25377        }
25378    }
25379}
25380
25381impl std::default::Default for ResourceValue {
25382    fn default() -> Self {
25383        use std::convert::From;
25384        Self::from(0)
25385    }
25386}
25387
25388impl std::fmt::Display for ResourceValue {
25389    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25390        wkt::internal::display_enum(f, self.name(), self.value())
25391    }
25392}
25393
25394impl std::convert::From<i32> for ResourceValue {
25395    fn from(value: i32) -> Self {
25396        match value {
25397            0 => Self::Unspecified,
25398            1 => Self::High,
25399            2 => Self::Medium,
25400            3 => Self::Low,
25401            4 => Self::None,
25402            _ => Self::UnknownValue(resource_value::UnknownValue(
25403                wkt::internal::UnknownEnumValue::Integer(value),
25404            )),
25405        }
25406    }
25407}
25408
25409impl std::convert::From<&str> for ResourceValue {
25410    fn from(value: &str) -> Self {
25411        use std::string::ToString;
25412        match value {
25413            "RESOURCE_VALUE_UNSPECIFIED" => Self::Unspecified,
25414            "HIGH" => Self::High,
25415            "MEDIUM" => Self::Medium,
25416            "LOW" => Self::Low,
25417            "NONE" => Self::None,
25418            _ => Self::UnknownValue(resource_value::UnknownValue(
25419                wkt::internal::UnknownEnumValue::String(value.to_string()),
25420            )),
25421        }
25422    }
25423}
25424
25425impl serde::ser::Serialize for ResourceValue {
25426    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25427    where
25428        S: serde::Serializer,
25429    {
25430        match self {
25431            Self::Unspecified => serializer.serialize_i32(0),
25432            Self::High => serializer.serialize_i32(1),
25433            Self::Medium => serializer.serialize_i32(2),
25434            Self::Low => serializer.serialize_i32(3),
25435            Self::None => serializer.serialize_i32(4),
25436            Self::UnknownValue(u) => u.0.serialize(serializer),
25437        }
25438    }
25439}
25440
25441impl<'de> serde::de::Deserialize<'de> for ResourceValue {
25442    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25443    where
25444        D: serde::Deserializer<'de>,
25445    {
25446        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceValue>::new(
25447            ".google.cloud.securitycenter.v2.ResourceValue",
25448        ))
25449    }
25450}